summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/regionband.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-06-30 00:16:59 +0200
committerMichael Stahl <mstahl@redhat.com>2013-06-30 00:34:33 +0200
commit9bd0a976017fadf4344cbf6746abd395dfcc3cb7 (patch)
tree229d2eea41f95f481f736cf5089d5a11eae824f1 /vcl/source/gdi/regionband.cxx
parent36e42c0bc094231cb80157a871862c76d6a2d03a (diff)
fdo#66288: fix RegionBand (de)serialization
Commit e717d1dcce7f8906311c5ccdbb2326b61a702630 interacts badly with commit 7b2a0e541567be9750dfc7d98374555967da3470: the newly added "long" variables serialized to SvStream with operator>>/<< now read/write 8 bytes. Using "long" for binary serialized integers is an idiotic idea in the first place. Change-Id: I9432c1bb2c339e797c064371f2cbdcfec2200994
Diffstat (limited to 'vcl/source/gdi/regionband.cxx')
-rw-r--r--vcl/source/gdi/regionband.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/vcl/source/gdi/regionband.cxx b/vcl/source/gdi/regionband.cxx
index 1a4d249c0a1d..4268e0f2205a 100644
--- a/vcl/source/gdi/regionband.cxx
+++ b/vcl/source/gdi/regionband.cxx
@@ -224,8 +224,8 @@ void RegionBand::load(SvStream& rIStrm)
// insert new band or new separation?
if(STREAMENTRY_BANDHEADER == (StreamEntryType)nTmp16)
{
- long nYTop;
- long nYBottom;
+ sal_Int32 nYTop(0);
+ sal_Int32 nYBottom(0);
rIStrm >> nYTop;
rIStrm >> nYBottom;
@@ -248,8 +248,8 @@ void RegionBand::load(SvStream& rIStrm)
}
else
{
- long nXLeft;
- long nXRight;
+ sal_Int32 nXLeft(0);
+ sal_Int32 nXRight(0);
rIStrm >> nXLeft;
rIStrm >> nXRight;
@@ -284,8 +284,8 @@ void RegionBand::save(SvStream& rOStrm) const
{
// put boundaries
rOStrm << (sal_uInt16)STREAMENTRY_BANDHEADER;
- rOStrm << pBand->mnYTop;
- rOStrm << pBand->mnYBottom;
+ rOStrm << static_cast<sal_Int32>(pBand->mnYTop);
+ rOStrm << static_cast<sal_Int32>(pBand->mnYBottom);
// put separations of current band
ImplRegionBandSep* pSep = pBand->mpFirstSep;
@@ -294,8 +294,8 @@ void RegionBand::save(SvStream& rOStrm) const
{
// put separation
rOStrm << (sal_uInt16)STREAMENTRY_SEPARATION;
- rOStrm << pSep->mnXLeft;
- rOStrm << pSep->mnXRight;
+ rOStrm << static_cast<sal_Int32>(pSep->mnXLeft);
+ rOStrm << static_cast<sal_Int32>(pSep->mnXRight);
// next separation from current band
pSep = pSep->mpNextSep;