Kaydet (Commit) 51242678 authored tarafından Miklos Vajna's avatar Miklos Vajna Kaydeden (comit) Michael Meeks

filter: avoid casting BitmapChecksum to sal_uInt32

Since BitmapChecksum is a typedef for sal_uInt64.

Change-Id: I768fa5134fa6e86559f3c6cbe1071093b4e68152
üst d9096da5
...@@ -1302,7 +1302,7 @@ bool SVGFilter::implExportTextEmbeddedBitmaps() ...@@ -1302,7 +1302,7 @@ bool SVGFilter::implExportTextEmbeddedBitmaps()
MetaAction* pAction = aMtf.GetAction( 0 ); MetaAction* pAction = aMtf.GetAction( 0 );
if( pAction ) if( pAction )
{ {
sal_uInt32 nId = (sal_uInt32)(GetBitmapChecksum( pAction )); BitmapChecksum nId = GetBitmapChecksum( pAction );
sId = "bitmap(" + OUString::number( nId ) + ")"; sId = "bitmap(" + OUString::number( nId ) + ")";
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", sId ); mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", sId );
......
...@@ -1359,7 +1359,7 @@ void SVGTextWriter::writeBitmapPlaceholder( const MetaBitmapActionType* pAction ...@@ -1359,7 +1359,7 @@ void SVGTextWriter::writeBitmapPlaceholder( const MetaBitmapActionType* pAction
} }
// bitmap placeholder element // bitmap placeholder element
sal_uInt32 nId = SVGActionWriter::GetChecksum( pAction ); BitmapChecksum nId = SVGActionWriter::GetChecksum( pAction );
OUString sId = "bitmap-placeholder(" + msShapeId + "." + OUString sId = "bitmap-placeholder(" + msShapeId + "." +
OUString::number( nId ) + ")"; OUString::number( nId ) + ")";
...@@ -1381,7 +1381,7 @@ void SVGTextWriter::implWriteEmbeddedBitmaps() ...@@ -1381,7 +1381,7 @@ void SVGTextWriter::implWriteEmbeddedBitmaps()
const GDIMetaFile& rMtf = *mpTextEmbeddedBitmapMtf; const GDIMetaFile& rMtf = *mpTextEmbeddedBitmapMtf;
OUString sId, sRefId; OUString sId, sRefId;
sal_uInt32 nId, nChecksum = 0; BitmapChecksum nId, nChecksum = 0;
Point aPt; Point aPt;
Size aSz; Size aSz;
sal_uLong nCount = rMtf.GetActionSize(); sal_uLong nCount = rMtf.GetActionSize();
...@@ -1396,7 +1396,7 @@ void SVGTextWriter::implWriteEmbeddedBitmaps() ...@@ -1396,7 +1396,7 @@ void SVGTextWriter::implWriteEmbeddedBitmaps()
case( MetaActionType::BMPSCALE ): case( MetaActionType::BMPSCALE ):
{ {
const MetaBmpScaleAction* pA = static_cast<const MetaBmpScaleAction*>(pAction); const MetaBmpScaleAction* pA = static_cast<const MetaBmpScaleAction*>(pAction);
nChecksum = (sal_uInt32)(pA->GetBitmap().GetChecksum()); nChecksum = pA->GetBitmap().GetChecksum();
aPt = pA->GetPoint(); aPt = pA->GetPoint();
aSz = pA->GetSize(); aSz = pA->GetSize();
} }
...@@ -1404,7 +1404,7 @@ void SVGTextWriter::implWriteEmbeddedBitmaps() ...@@ -1404,7 +1404,7 @@ void SVGTextWriter::implWriteEmbeddedBitmaps()
case( MetaActionType::BMPEXSCALE ): case( MetaActionType::BMPEXSCALE ):
{ {
const MetaBmpExScaleAction* pA = static_cast<const MetaBmpExScaleAction*>(pAction); const MetaBmpExScaleAction* pA = static_cast<const MetaBmpExScaleAction*>(pAction);
nChecksum = (sal_uInt32)(pA->GetBitmapEx().GetChecksum()); nChecksum = pA->GetBitmapEx().GetChecksum();
aPt = pA->GetPoint(); aPt = pA->GetPoint();
aSz = pA->GetSize(); aSz = pA->GetSize();
} }
...@@ -1779,13 +1779,13 @@ OUString SVGActionWriter::GetPathString( const tools::PolyPolygon& rPolyPoly, bo ...@@ -1779,13 +1779,13 @@ OUString SVGActionWriter::GetPathString( const tools::PolyPolygon& rPolyPoly, bo
return aPathData; return aPathData;
} }
sal_uInt32 SVGActionWriter::GetChecksum( const MetaAction* pAction ) BitmapChecksum SVGActionWriter::GetChecksum( const MetaAction* pAction )
{ {
GDIMetaFile aMtf; GDIMetaFile aMtf;
MetaAction* pA = const_cast<MetaAction*>(pAction); MetaAction* pA = const_cast<MetaAction*>(pAction);
pA->Duplicate(); pA->Duplicate();
aMtf.AddAction( pA ); aMtf.AddAction( pA );
return (sal_uInt32)(aMtf.GetChecksum()); return aMtf.GetChecksum();
} }
void SVGActionWriter::ImplWriteLine( const Point& rPt1, const Point& rPt2, void SVGActionWriter::ImplWriteLine( const Point& rPt1, const Point& rPt2,
......
...@@ -357,7 +357,7 @@ private: ...@@ -357,7 +357,7 @@ private:
public: public:
static OUString GetPathString( const tools::PolyPolygon& rPolyPoly, bool bLine ); static OUString GetPathString( const tools::PolyPolygon& rPolyPoly, bool bLine );
static sal_uInt32 GetChecksum( const MetaAction* pAction ); static BitmapChecksum GetChecksum( const MetaAction* pAction );
public: public:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment