diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-08-31 14:09:33 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-09-01 16:28:49 +0100 |
commit | 51242678e2132d2172b9a63125a0974044baf8aa (patch) | |
tree | 82e74ea17e64c0cec8f4daab42f45ffcada8c79a | |
parent | d9096da5413984cfa65151f9dbdcc5da271c74a1 (diff) |
filter: avoid casting BitmapChecksum to sal_uInt32
Since BitmapChecksum is a typedef for sal_uInt64.
Change-Id: I768fa5134fa6e86559f3c6cbe1071093b4e68152
-rw-r--r-- | filter/source/svg/svgexport.cxx | 2 | ||||
-rw-r--r-- | filter/source/svg/svgwriter.cxx | 12 | ||||
-rw-r--r-- | filter/source/svg/svgwriter.hxx | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 75ccb4541272..1773740f5754 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -1302,7 +1302,7 @@ bool SVGFilter::implExportTextEmbeddedBitmaps() MetaAction* pAction = aMtf.GetAction( 0 ); if( pAction ) { - sal_uInt32 nId = (sal_uInt32)(GetBitmapChecksum( pAction )); + BitmapChecksum nId = GetBitmapChecksum( pAction ); sId = "bitmap(" + OUString::number( nId ) + ")"; mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", sId ); diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index c6665bc3ee50..62b9f29afd26 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -1359,7 +1359,7 @@ void SVGTextWriter::writeBitmapPlaceholder( const MetaBitmapActionType* pAction } // bitmap placeholder element - sal_uInt32 nId = SVGActionWriter::GetChecksum( pAction ); + BitmapChecksum nId = SVGActionWriter::GetChecksum( pAction ); OUString sId = "bitmap-placeholder(" + msShapeId + "." + OUString::number( nId ) + ")"; @@ -1381,7 +1381,7 @@ void SVGTextWriter::implWriteEmbeddedBitmaps() const GDIMetaFile& rMtf = *mpTextEmbeddedBitmapMtf; OUString sId, sRefId; - sal_uInt32 nId, nChecksum = 0; + BitmapChecksum nId, nChecksum = 0; Point aPt; Size aSz; sal_uLong nCount = rMtf.GetActionSize(); @@ -1396,7 +1396,7 @@ void SVGTextWriter::implWriteEmbeddedBitmaps() case( MetaActionType::BMPSCALE ): { const MetaBmpScaleAction* pA = static_cast<const MetaBmpScaleAction*>(pAction); - nChecksum = (sal_uInt32)(pA->GetBitmap().GetChecksum()); + nChecksum = pA->GetBitmap().GetChecksum(); aPt = pA->GetPoint(); aSz = pA->GetSize(); } @@ -1404,7 +1404,7 @@ void SVGTextWriter::implWriteEmbeddedBitmaps() case( MetaActionType::BMPEXSCALE ): { const MetaBmpExScaleAction* pA = static_cast<const MetaBmpExScaleAction*>(pAction); - nChecksum = (sal_uInt32)(pA->GetBitmapEx().GetChecksum()); + nChecksum = pA->GetBitmapEx().GetChecksum(); aPt = pA->GetPoint(); aSz = pA->GetSize(); } @@ -1779,13 +1779,13 @@ OUString SVGActionWriter::GetPathString( const tools::PolyPolygon& rPolyPoly, bo return aPathData; } -sal_uInt32 SVGActionWriter::GetChecksum( const MetaAction* pAction ) +BitmapChecksum SVGActionWriter::GetChecksum( const MetaAction* pAction ) { GDIMetaFile aMtf; MetaAction* pA = const_cast<MetaAction*>(pAction); pA->Duplicate(); aMtf.AddAction( pA ); - return (sal_uInt32)(aMtf.GetChecksum()); + return aMtf.GetChecksum(); } void SVGActionWriter::ImplWriteLine( const Point& rPt1, const Point& rPt2, diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx index e96e5169ff08..6251dda69353 100644 --- a/filter/source/svg/svgwriter.hxx +++ b/filter/source/svg/svgwriter.hxx @@ -357,7 +357,7 @@ private: public: static OUString GetPathString( const tools::PolyPolygon& rPolyPoly, bool bLine ); - static sal_uInt32 GetChecksum( const MetaAction* pAction ); + static BitmapChecksum GetChecksum( const MetaAction* pAction ); public: |