diff --git a/tools/source/generic/fract.cxx b/tools/source/generic/fract.cxx index 207676151c1a..7dc4b5b844fc 100644 --- a/tools/source/generic/fract.cxx +++ b/tools/source/generic/fract.cxx @@ -612,8 +612,12 @@ bool operator > ( const Fraction& rVal1, const Fraction& rVal2 ) *************************************************************************/ SvStream& operator >> ( SvStream& rIStream, Fraction& rFract ) { - rIStream >> rFract.nNumerator; - rIStream >> rFract.nDenominator; + //fdo#39428 SvStream no longer supports operator>>(long&) + sal_Int32 nTmp(0); + rIStream >> nTmp; + rFract.nNumerator = nTmp; + rIStream >> nTmp; + rFract.nDenominator = nTmp; return rIStream; } @@ -624,8 +628,9 @@ SvStream& operator >> ( SvStream& rIStream, Fraction& rFract ) *************************************************************************/ SvStream& operator << ( SvStream& rOStream, const Fraction& rFract ) { - rOStream << rFract.nNumerator; - rOStream << rFract.nDenominator; + //fdo#39428 SvStream no longer supports operator<<(long) + rOStream << sal::static_int_cast(rFract.nNumerator); + rOStream << sal::static_int_cast(rFract.nDenominator); return rOStream; } diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx index be16230fb52d..17316e2fedcb 100644 --- a/tools/source/generic/gen.cxx +++ b/tools/source/generic/gen.cxx @@ -36,7 +36,11 @@ SvStream& operator>>( SvStream& rIStream, Pair& rPair ) { DBG_ASSERTWARNING( rIStream.GetVersion(), "Pair::>> - Solar-Version not set on rIStream" ); - rIStream >> rPair.nA >> rPair.nB; + //39428 SvStream no longer supports operator>>(long&) + sal_Int32 nTmpA(0), nTmpB(0); + rIStream >> nTmpA >> nTmpB; + rPair.nA = nTmpA; + rPair.nB = nTmpB; return rIStream; } @@ -47,7 +51,8 @@ SvStream& operator<<( SvStream& rOStream, const Pair& rPair ) { DBG_ASSERTWARNING( rOStream.GetVersion(), "Pair::<< - Solar-Version not set on rOStream" ); - rOStream << rPair.nA << rPair.nB; + //39428 SvStream no longer supports operator<<(long) + rOStream << sal::static_int_cast(rPair.nA) << sal::static_int_cast(rPair.nB); return rOStream; } @@ -227,7 +232,15 @@ SvStream& operator>>( SvStream& rIStream, Rectangle& rRect ) { DBG_ASSERTWARNING( rIStream.GetVersion(), "Rectangle::>> - Solar-Version not set on rIStream" ); - rIStream >> rRect.nLeft >> rRect.nTop >> rRect.nRight >> rRect.nBottom; + //fdo#39428 SvStream no longer supports operator>>(long&) + sal_Int32 nTmpL(0), nTmpT(0), nTmpR(0), nTmpB(0); + + rIStream >> nTmpL >> nTmpT >> nTmpR >> nTmpB; + + rRect.nLeft = nTmpL; + rRect.nTop = nTmpT; + rRect.nRight = nTmpR; + rRect.nBottom = nTmpB; return rIStream; } @@ -238,7 +251,11 @@ SvStream& operator<<( SvStream& rOStream, const Rectangle& rRect ) { DBG_ASSERTWARNING( rOStream.GetVersion(), "Rectangle::<< - Solar-Version not set on rOStream" ); - rOStream << rRect.nLeft << rRect.nTop << rRect.nRight << rRect.nBottom; + //fdo#39428 SvStream no longer supports operator<<(long) + rOStream << sal::static_int_cast(rRect.nLeft) + << sal::static_int_cast(rRect.nTop) + << sal::static_int_cast(rRect.nRight) + << sal::static_int_cast(rRect.nBottom); return rOStream; } diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index 8c64a9f55246..3c86a7a45572 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -1701,8 +1701,11 @@ SvStream& operator>>( SvStream& rIStream, Polygon& rPoly ) { for( i = 0; i < nPoints; i++ ) { - rIStream >> rPoly.mpImplPolygon->mpPointAry[i].X() - >> rPoly.mpImplPolygon->mpPointAry[i].Y(); + //fdo#39428 SvStream no longer supports operator>>(long&) + sal_Int32 nTmpX(0), nTmpY(0); + rIStream >> nTmpX >> nTmpY; + rPoly.mpImplPolygon->mpPointAry[i].X() = nTmpX; + rPoly.mpImplPolygon->mpPointAry[i].Y() = nTmpY; } } else @@ -1739,8 +1742,9 @@ SvStream& operator<<( SvStream& rOStream, const Polygon& rPoly ) { for( i = 0; i < nPoints; i++ ) { - rOStream << rPoly.mpImplPolygon->mpPointAry[i].X() - << rPoly.mpImplPolygon->mpPointAry[i].Y(); + //fdo#39428 SvStream no longer supports operator<<(long) + rOStream << sal::static_int_cast( rPoly.mpImplPolygon->mpPointAry[i].X() ) + << sal::static_int_cast( rPoly.mpImplPolygon->mpPointAry[i].Y() ); } } else