summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-02-28 16:58:25 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-02-28 16:59:01 +0000
commitac08d3f6967b241d6028d9cd17cce583ac72871e (patch)
treeb58118c044cd90c7b0f59e364bc3c1a97fb2fba5 /editeng
parentdc505d3a5cdebe6271fcd6dae7b4d69e7c1af13e (diff)
we don't want any of these to be streamed out/in as 64bit values
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/items/bulitem.cxx2
-rw-r--r--editeng/source/items/frmitems.cxx4
-rw-r--r--editeng/source/items/numitem.cxx6
-rw-r--r--editeng/source/rtf/rtfgrf.cxx36
4 files changed, 24 insertions, 24 deletions
diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx
index ce6c789f9a8e..89913116c631 100644
--- a/editeng/source/items/bulitem.cxx
+++ b/editeng/source/items/bulitem.cxx
@@ -360,7 +360,7 @@ SvStream& SvxBulletItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) c
if ( (nEnd-_nStart) > 0xFF00 )
rStrm.Seek( _nStart );
}
- rStrm << nWidth;
+ rStrm << static_cast<sal_Int32>(nWidth);
rStrm << nStart;
rStrm << nJustify;
rStrm << rtl::OUStringToOString(rtl::OUString(cSymbol), aFont.GetCharSet()).toChar();
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 26c273648c74..849439d0e86a 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -686,8 +686,8 @@ SvStream& SvxLRSpaceItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) con
if( 0x80 & nAutoFirst )
{
- rStrm << nLeftMargin;
- rStrm << nRightMargin;
+ rStrm << static_cast<sal_Int32>(nLeftMargin);
+ rStrm << static_cast<sal_Int32>(nRightMargin);
}
}
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index ccb34556cf95..7346805b9de9 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -259,9 +259,9 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC
rStream << ( sal_uInt16 ) mePositionAndSpaceMode;
rStream << ( sal_uInt16 ) meLabelFollowedBy;
- rStream << ( long ) mnListtabPos;
- rStream << ( long ) mnFirstLineIndent;
- rStream << ( long ) mnIndentAt;
+ rStream << ( sal_Int32 ) mnListtabPos;
+ rStream << ( sal_Int32 ) mnFirstLineIndent;
+ rStream << ( sal_Int32 ) mnIndentAt;
return rStream;
}
diff --git a/editeng/source/rtf/rtfgrf.cxx b/editeng/source/rtf/rtfgrf.cxx
index 142b48d8541b..d6572be69cab 100644
--- a/editeng/source/rtf/rtfgrf.cxx
+++ b/editeng/source/rtf/rtfgrf.cxx
@@ -161,7 +161,7 @@ static sal_uInt8 aPal8[ 256 * 4 ] =
-inline long SwapLong( long n )
+inline sal_Int32 SwapDWord( sal_Int32 n )
{
#ifndef OSL_LITENDIAN
return OSL_SWAPDWORD( n );
@@ -170,7 +170,7 @@ inline long SwapLong( long n )
#endif
}
-inline short SwapShort( short n )
+inline sal_Int16 SwapWord( sal_Int16 n )
{
#ifndef OSL_LITENDIAN
return OSL_SWAPWORD( n );
@@ -192,31 +192,31 @@ static void WriteBMPHeader( SvStream& rStream,
if( !nWdtOut )
nWdtOut = (sal_uInt16)((( n4Width * n4ColBits + 31 ) / 32 ) * 4 );
- long nOffset = 14 + 40; // BMP_FILE_HD_SIZ + sizeof(*pBmpInfo);
+ sal_Int32 nOffset = 14 + 40; // BMP_FILE_HD_SIZ + sizeof(*pBmpInfo);
if( 256 >= nColors )
nOffset += nColors * 4;
- long nSize = nOffset + nWdtOut * n4Height;
+ sal_Int32 nSize = nOffset + nWdtOut * n4Height;
rStream << "BM" // = "BM"
- << SwapLong(nSize) // Filesize in Bytes
- << SwapShort(0) // Reserved
- << SwapShort(0) // Reserved
- << SwapLong(nOffset); // Offset?
-
- rStream << SwapLong(40) // sizeof( BmpInfo )
- << SwapLong(n4Width)
- << SwapLong(n4Height)
+ << SwapDWord(nSize) // Filesize in Bytes
+ << SwapWord(0) // Reserved
+ << SwapWord(0) // Reserved
+ << SwapDWord(nOffset); // Offset?
+
+ rStream << SwapDWord(40) // sizeof( BmpInfo )
+ << SwapDWord(n4Width)
+ << SwapDWord(n4Height)
<< (sal_uInt16)1
<< n4ColBits
- << SwapLong(0)
- << SwapLong(0)
- << SwapLong( rPicType.nGoalWidth
+ << SwapDWord(0)
+ << SwapDWord(0)
+ << SwapDWord( rPicType.nGoalWidth
? rPicType.nGoalWidth * 1000L / 254L
: 0 ) // DPI in Pixel per Meter
- << SwapLong( rPicType.nGoalHeight
+ << SwapDWord( rPicType.nGoalHeight
? rPicType.nGoalHeight * 1000L / 254L // dito
: 0 )
- << SwapLong(0)
- << SwapLong(0);
+ << SwapDWord(0)
+ << SwapDWord(0);
switch( rPicType.nBitsPerPixel )