20#ifndef INCLUDED_TOOLS_SOLAR_H
21#define INCLUDED_TOOLS_SOLAR_H
24#include <osl/endian.h>
47inline sal_uInt16 SVBT16ToUInt16(
const SVBT16 p ) {
return static_cast<sal_uInt16
>
48 (
static_cast<sal_uInt16
>(
p[0])
49 + (
static_cast<sal_uInt16
>(
p[1]) << 8)); }
50inline sal_Int16 SVBT16ToInt16(
const SVBT16 p ) {
return sal_Int16(SVBT16ToUInt16(p)); }
51inline sal_uInt32 SVBT32ToUInt32 (
const SVBT32 p ) {
return static_cast<sal_uInt32
>
52 (
static_cast<sal_uInt32
>(
p[0])
53 + (
static_cast<sal_uInt32
>(p[1]) << 8)
54 + (
static_cast<sal_uInt32
>(p[2]) << 16)
55 + (
static_cast<sal_uInt32
>(p[3]) << 24)); }
56#if defined OSL_LITENDIAN
57inline double SVBT64ToDouble(
const SVBT64 p )
71inline double SVBT64ToDouble(
const SVBT64 p ) {
double n;
83inline void ShortToSVBT16( sal_uInt16 n,
SVBT16 p )
88inline void UInt32ToSVBT32 ( sal_uInt32 n,
SVBT32 p )
95inline void Int32ToSVBT32 ( sal_Int32 n,
SVBT32 p ) { UInt32ToSVBT32(sal_uInt32(n), p); }
96#if defined OSL_LITENDIAN
97inline void DoubleToSVBT64(
double n,
SVBT64 p ) {
p[0] =
reinterpret_cast<sal_uInt8*
>(&
n)[0];
106inline void DoubleToSVBT64(
double n,
SVBT64 p ) {
p[0] =
reinterpret_cast<sal_uInt8*
>(&
n)[7];
sal_uIntPtr sal_uLong
Intermediate type to solve type clash with Windows headers.