summaryrefslogtreecommitdiff
path: root/svtools/source/filter/wmf/emfwr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source/filter/wmf/emfwr.cxx')
-rw-r--r--svtools/source/filter/wmf/emfwr.cxx166
1 files changed, 84 insertions, 82 deletions
diff --git a/svtools/source/filter/wmf/emfwr.cxx b/svtools/source/filter/wmf/emfwr.cxx
index 99ca92c76abb..4efaa1bbbb88 100644
--- a/svtools/source/filter/wmf/emfwr.cxx
+++ b/svtools/source/filter/wmf/emfwr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -169,9 +170,9 @@
// - EMFWriter -
// -------------
-sal_Bool EMFWriter::WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfigItem* pFilterConfigItem )
+sal_Bool EMFWriter::WriteEMF( const GDIMetaFile& rMtf, FilterConfigItem* pFilterConfigItem )
{
- const sal_uLong nHeaderPos = rOStm.Tell();
+ const sal_uLong nHeaderPos = m_rStm.Tell();
mpHandlesUsed = new sal_Bool[ MAXHANDLES ];
memset( mpHandlesUsed, 0, MAXHANDLES * sizeof( sal_Bool ) );
@@ -179,7 +180,6 @@ sal_Bool EMFWriter::WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterCo
mnLineHandle = mnFillHandle = mnTextHandle = HANDLE_INVALID;
mbRecordOpen = sal_False;
- mpStm = &rOStm;
maVDev.EnableOutput( sal_False );
maVDev.SetMapMode( rMtf.GetPrefMapMode() );
mpFilterConfigItem = pFilterConfigItem;
@@ -192,51 +192,51 @@ sal_Bool EMFWriter::WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterCo
// seek over header
// use [MS-EMF 2.2.11] HeaderExtension2 Object, otherwise resulting EMF cannot be converted with GetWinMetaFileBits()
- rOStm.SeekRel( 108 );
+ m_rStm.SeekRel( 108 );
// write initial values
// set 100th mm map mode in EMF
ImplBeginRecord( WIN_EMR_SETMAPMODE );
- (*mpStm) << (sal_Int32) MM_ANISOTROPIC;
+ m_rStm << (sal_Int32) MM_ANISOTROPIC;
ImplEndRecord();
ImplBeginRecord( WIN_EMR_SETVIEWPORTEXTEX );
- (*mpStm) << (sal_Int32) maVDev.ImplGetDPIX() << (sal_Int32) maVDev.ImplGetDPIY();
+ m_rStm << (sal_Int32) maVDev.ImplGetDPIX() << (sal_Int32) maVDev.ImplGetDPIY();
ImplEndRecord();
ImplBeginRecord( WIN_EMR_SETWINDOWEXTEX );
- (*mpStm) << (sal_Int32) 2540 << (sal_Int32) 2540;
+ m_rStm << (sal_Int32) 2540 << (sal_Int32) 2540;
ImplEndRecord();
ImplBeginRecord( WIN_EMR_SETVIEWPORTORGEX );
- (*mpStm) << (sal_Int32) 0 << (sal_Int32) 0;
+ m_rStm << (sal_Int32) 0 << (sal_Int32) 0;
ImplEndRecord();
ImplBeginRecord( WIN_EMR_SETWINDOWORGEX );
- (*mpStm) << (sal_Int32) 0 << (sal_Int32) 0;
+ m_rStm << (sal_Int32) 0 << (sal_Int32) 0;
ImplEndRecord();
ImplWriteRasterOp( ROP_OVERPAINT );
ImplBeginRecord( WIN_EMR_SETBKMODE );
- (*mpStm) << (sal_uInt32) 1; // TRANSPARENT
+ m_rStm << (sal_uInt32) 1; // TRANSPARENT
ImplEndRecord();
// write emf data
ImplWrite( rMtf );
ImplBeginRecord( WIN_EMR_EOF );
- (*mpStm)<< (sal_uInt32)0 // nPalEntries
+ m_rStm<< (sal_uInt32)0 // nPalEntries
<< (sal_uInt32)0x10 // offPalEntries
<< (sal_uInt32)0x14; // nSizeLast
ImplEndRecord();
// write header
- const sal_uLong nEndPos = mpStm->Tell(); mpStm->Seek( nHeaderPos );
+ const sal_uLong nEndPos = m_rStm.Tell(); m_rStm.Seek( nHeaderPos );
- (*mpStm) << (sal_uInt32) 0x00000001 << (sal_uInt32) 108 //use [MS-EMF 2.2.11] HeaderExtension2 Object
+ m_rStm << (sal_uInt32) 0x00000001 << (sal_uInt32) 108 //use [MS-EMF 2.2.11] HeaderExtension2 Object
<< (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int32) ( aMtfSizePix.Width() - 1 ) << (sal_Int32) ( aMtfSizePix.Height() - 1 )
<< (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int32) ( aMtfSizeLog.Width() - 1 ) << (sal_Int32) ( aMtfSizeLog.Height() - 1 )
<< (sal_uInt32) 0x464d4520 << (sal_uInt32) 0x10000 << (sal_uInt32) ( nEndPos - nHeaderPos )
@@ -246,10 +246,10 @@ sal_Bool EMFWriter::WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterCo
<< (sal_uInt32) 0 << (sal_uInt32) 0 << (sal_uInt32) 0
<< (sal_Int32) ( aMtfSizeLog.Width() * 10 ) << (sal_Int32) ( aMtfSizeLog.Height() * 10 ); //use [MS-EMF 2.2.11] HeaderExtension2 Object
- mpStm->Seek( nEndPos );
+ m_rStm.Seek( nEndPos );
delete[] mpHandlesUsed;
- return( mpStm->GetError() == ERRCODE_NONE );
+ return( m_rStm.GetError() == ERRCODE_NONE );
}
// -----------------------------------------------------------------------------
@@ -290,10 +290,10 @@ void EMFWriter::ImplBeginRecord( sal_uInt32 nType )
if( !mbRecordOpen )
{
mbRecordOpen = sal_True;
- mnRecordPos = mpStm->Tell();
+ mnRecordPos = m_rStm.Tell();
- (*mpStm) << nType;
- mpStm->SeekRel( 4 );
+ m_rStm << nType;
+ m_rStm.SeekRel( 4 );
}
}
@@ -305,16 +305,16 @@ void EMFWriter::ImplEndRecord()
if( mbRecordOpen )
{
- sal_Int32 nFillBytes, nActPos = mpStm->Tell();
- mpStm->Seek( mnRecordPos + 4 );
+ sal_Int32 nFillBytes, nActPos = m_rStm.Tell();
+ m_rStm.Seek( mnRecordPos + 4 );
nFillBytes = nActPos - mnRecordPos;
nFillBytes += 3; // each record has to be dword aligned
nFillBytes ^= 3;
nFillBytes &= 3;
- *mpStm << (sal_uInt32)( ( nActPos - mnRecordPos ) + nFillBytes );
- mpStm->Seek( nActPos );
+ m_rStm << (sal_uInt32)( ( nActPos - mnRecordPos ) + nFillBytes );
+ m_rStm.Seek( nActPos );
while( nFillBytes-- )
- *mpStm << (sal_uInt8)0;
+ m_rStm << (sal_uInt8)0;
mnRecordCount++;
mbRecordOpen = sal_False;
}
@@ -337,12 +337,12 @@ sal_Bool EMFWriter::ImplPrepareHandleSelect( sal_uInt32& rHandle, sal_uLong nSel
// select stock object first
ImplBeginRecord( WIN_EMR_SELECTOBJECT );
- ( *mpStm ) << nStockObject;
+ m_rStm << nStockObject;
ImplEndRecord();
// destroy handle of created object
ImplBeginRecord( WIN_EMR_DELETEOBJECT );
- ( *mpStm ) << rHandle;
+ m_rStm << rHandle;
ImplEndRecord();
// mark handle as free
@@ -364,12 +364,12 @@ void EMFWriter::ImplCheckLineAttr()
sal_uInt32 nWidth = 0, nHeight = 0;
ImplBeginRecord( WIN_EMR_CREATEPEN );
- (*mpStm) << mnLineHandle << nStyle << nWidth << nHeight;
+ m_rStm << mnLineHandle << nStyle << nWidth << nHeight;
ImplWriteColor( maVDev.GetLineColor() );
ImplEndRecord();
ImplBeginRecord( WIN_EMR_SELECTOBJECT );
- (*mpStm) << mnLineHandle;
+ m_rStm << mnLineHandle;
ImplEndRecord();
}
}
@@ -384,13 +384,13 @@ void EMFWriter::ImplCheckFillAttr()
sal_uInt32 nPatternStyle = 0;
ImplBeginRecord( WIN_EMR_CREATEBRUSHINDIRECT );
- (*mpStm) << mnFillHandle << nStyle;
+ m_rStm << mnFillHandle << nStyle;
ImplWriteColor( maVDev.GetFillColor() );
- (*mpStm) << nPatternStyle;
+ m_rStm << nPatternStyle;
ImplEndRecord();
ImplBeginRecord( WIN_EMR_SELECTOBJECT );
- (*mpStm) << mnFillHandle;
+ m_rStm << mnFillHandle;
ImplEndRecord();
}
}
@@ -408,10 +408,10 @@ void EMFWriter::ImplCheckTextAttr()
sal_uInt8 nPitchAndFamily;
ImplBeginRecord( WIN_EMR_EXTCREATEFONTINDIRECTW );
- (*mpStm) << mnTextHandle;
+ m_rStm << mnTextHandle;
ImplWriteExtent( -rFont.GetSize().Height() );
ImplWriteExtent( rFont.GetSize().Width() );
- (*mpStm) << (sal_Int32) rFont.GetOrientation() << (sal_Int32) rFont.GetOrientation();
+ m_rStm << (sal_Int32) rFont.GetOrientation() << (sal_Int32) rFont.GetOrientation();
switch( rFont.GetWeight() )
{
@@ -428,12 +428,12 @@ void EMFWriter::ImplCheckTextAttr()
default: nWeight = 0; break;
}
- (*mpStm) << nWeight;
- (*mpStm) << (sal_uInt8) ( ( ITALIC_NONE == rFont.GetItalic() ) ? 0 : 1 );
- (*mpStm) << (sal_uInt8) ( ( UNDERLINE_NONE == rFont.GetUnderline() ) ? 0 : 1 );
- (*mpStm) << (sal_uInt8) ( ( STRIKEOUT_NONE == rFont.GetStrikeout() ) ? 0 : 1 );
- (*mpStm) << (sal_uInt8) ( ( RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet() ) ? 2 : 0 );
- (*mpStm) << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0;
+ m_rStm << nWeight;
+ m_rStm << (sal_uInt8) ( ( ITALIC_NONE == rFont.GetItalic() ) ? 0 : 1 );
+ m_rStm << (sal_uInt8) ( ( UNDERLINE_NONE == rFont.GetUnderline() ) ? 0 : 1 );
+ m_rStm << (sal_uInt8) ( ( STRIKEOUT_NONE == rFont.GetStrikeout() ) ? 0 : 1 );
+ m_rStm << (sal_uInt8) ( ( RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet() ) ? 2 : 0 );
+ m_rStm << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0;
switch( rFont.GetPitch() )
{
@@ -452,33 +452,33 @@ void EMFWriter::ImplCheckTextAttr()
default: break;
}
- (*mpStm) << nPitchAndFamily;
+ m_rStm << nPitchAndFamily;
for( i = 0; i < 32; i++ )
- (*mpStm) << (sal_Unicode) ( ( i < aFontName.Len() ) ? aFontName.GetChar( i ) : 0 );
+ m_rStm << (sal_Unicode) ( ( i < aFontName.Len() ) ? aFontName.GetChar( i ) : 0 );
// dummy elfFullName
for( i = 0; i < 64; i++ )
- (*mpStm) << (sal_Unicode) 0;
+ m_rStm << (sal_Unicode) 0;
// dummy elfStyle
for( i = 0; i < 32; i++ )
- (*mpStm) << (sal_Unicode) 0;
+ m_rStm << (sal_Unicode) 0;
// dummy elfVersion, elfStyleSize, elfMatch, elfReserved
- (*mpStm) << (sal_uInt32) 0 << (sal_uInt32) 0 << (sal_uInt32) 0 << (sal_uInt32) 0 ;
+ m_rStm << (sal_uInt32) 0 << (sal_uInt32) 0 << (sal_uInt32) 0 << (sal_uInt32) 0 ;
// dummy elfVendorId
- (*mpStm) << (sal_uInt32) 0;
+ m_rStm << (sal_uInt32) 0;
// dummy elfCulture
- (*mpStm) << (sal_uInt32) 0;
+ m_rStm << (sal_uInt32) 0;
// dummy elfPanose
- (*mpStm) << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0;
+ m_rStm << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0;
// fill record to get a record size divideable by 4
- (*mpStm) << (sal_uInt16) 0;
+ m_rStm << (sal_uInt16) 0;
ImplEndRecord();
@@ -494,7 +494,7 @@ void EMFWriter::ImplCheckTextAttr()
nTextAlign |= mnHorTextAlign;
ImplBeginRecord( WIN_EMR_SETTEXTALIGN );
- (*mpStm) << nTextAlign;
+ m_rStm << nTextAlign;
ImplEndRecord();
// Text color
@@ -503,7 +503,7 @@ void EMFWriter::ImplCheckTextAttr()
ImplEndRecord();
ImplBeginRecord( WIN_EMR_SELECTOBJECT );
- (*mpStm) << mnTextHandle;
+ m_rStm << mnTextHandle;
ImplEndRecord();
}
}
@@ -517,7 +517,7 @@ void EMFWriter::ImplWriteColor( const Color& rColor )
nCol |= ( (sal_uInt32) rColor.GetGreen() ) << 8;
nCol |= ( (sal_uInt32) rColor.GetBlue() ) << 16;
- (*mpStm) << nCol;
+ m_rStm << nCol;
}
// -----------------------------------------------------------------------------
@@ -534,7 +534,7 @@ void EMFWriter::ImplWriteRasterOp( RasterOp eRop )
}
ImplBeginRecord( WIN_EMR_SETROP2 );
- (*mpStm) << nROP2;
+ m_rStm << nROP2;
ImplEndRecord();
}
@@ -543,7 +543,7 @@ void EMFWriter::ImplWriteRasterOp( RasterOp eRop )
void EMFWriter::ImplWriteExtent( long nExtent )
{
nExtent = maVDev.LogicToLogic( Size( nExtent, 0 ), maVDev.GetMapMode(), maDestMapMode ).Width();
- (*mpStm) << (sal_Int32) nExtent;
+ m_rStm << (sal_Int32) nExtent;
}
// -----------------------------------------------------------------------------
@@ -551,7 +551,7 @@ void EMFWriter::ImplWriteExtent( long nExtent )
void EMFWriter::ImplWritePoint( const Point& rPoint )
{
const Point aPoint( maVDev.LogicToLogic( rPoint, maVDev.GetMapMode(), maDestMapMode ));
- (*mpStm) << (sal_Int32) aPoint.X() << (sal_Int32) aPoint.Y();
+ m_rStm << (sal_Int32) aPoint.X() << (sal_Int32) aPoint.Y();
}
// -----------------------------------------------------------------------------
@@ -559,7 +559,7 @@ void EMFWriter::ImplWritePoint( const Point& rPoint )
void EMFWriter::ImplWriteSize( const Size& rSize)
{
const Size aSize( maVDev.LogicToLogic( rSize, maVDev.GetMapMode(), maDestMapMode ));
- (*mpStm) << (sal_Int32) aSize.Width() << (sal_Int32) aSize.Height();
+ m_rStm << (sal_Int32) aSize.Width() << (sal_Int32) aSize.Height();
}
// -----------------------------------------------------------------------------
@@ -567,7 +567,7 @@ void EMFWriter::ImplWriteSize( const Size& rSize)
void EMFWriter::ImplWriteRect( const Rectangle& rRect )
{
const Rectangle aRect( maVDev.LogicToLogic ( rRect, maVDev.GetMapMode(), maDestMapMode ));
- (*mpStm) << aRect.Left() << aRect.Top() << aRect.Right() << aRect.Bottom();
+ m_rStm << aRect.Left() << aRect.Top() << aRect.Right() << aRect.Bottom();
}
// -----------------------------------------------------------------------------
@@ -587,7 +587,7 @@ void EMFWriter::ImplWritePolygonRecord( const Polygon& rPoly, sal_Bool bClose )
ImplBeginRecord( bClose ? WIN_EMR_POLYGON : WIN_EMR_POLYLINE );
ImplWriteRect( rPoly.GetBoundRect() );
- (*mpStm) << (sal_uInt32) rPoly.GetSize();
+ m_rStm << (sal_uInt32) rPoly.GetSize();
for( sal_uInt16 i = 0; i < rPoly.GetSize(); i++ )
ImplWritePoint( rPoly[ i ] );
@@ -629,10 +629,10 @@ void EMFWriter::ImplWritePolyPolygonRecord( const PolyPolygon& rPolyPoly )
ImplBeginRecord( WIN_EMR_POLYPOLYGON );
ImplWriteRect( rPolyPoly.GetBoundRect() );
- (*mpStm) << (sal_uInt32)nPolyCount << nTotalPoints;
+ m_rStm << (sal_uInt32)nPolyCount << nTotalPoints;
for( i = 0; i < nPolyCount; i++ )
- (*mpStm) << (sal_uInt32)rPolyPoly[ i ].GetSize();
+ m_rStm << (sal_uInt32)rPolyPoly[ i ].GetSize();
for( i = 0; i < nPolyCount; i++ )
{
@@ -688,7 +688,7 @@ void EMFWriter::ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClosed )
for ( o = 0; o < nBezPoints; o++ )
aNewPoly[ o + 1 ] = rPoly[ n + o ];
ImplWriteRect( aNewPoly.GetBoundRect() );
- (*mpStm) << (sal_uInt32)nBezPoints;
+ m_rStm << (sal_uInt32)nBezPoints;
for( o = 1; o < aNewPoly.GetSize(); o++ )
ImplWritePoint( aNewPoly[ o ] );
ImplEndRecord();
@@ -708,7 +708,7 @@ void EMFWriter::ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClosed )
for ( o = 1; o <= nPoints; o++ )
aNewPoly[ o ] = rPoly[ n - 1 + o ];
ImplWriteRect( aNewPoly.GetBoundRect() );
- (*mpStm) << (sal_uInt32)( nPoints );
+ m_rStm << (sal_uInt32)( nPoints );
for( o = 1; o < aNewPoly.GetSize(); o++ )
ImplWritePoint( aNewPoly[ o ] );
ImplEndRecord();
@@ -748,13 +748,13 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt,
ImplBeginRecord( WIN_EMR_STRETCHDIBITS );
ImplWriteRect( Rectangle( rPt, rSz ) );
ImplWritePoint( rPt );
- (*mpStm) << (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int32) aBmpSizePixel.Width() << (sal_Int32) aBmpSizePixel.Height();
+ m_rStm << (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int32) aBmpSizePixel.Width() << (sal_Int32) aBmpSizePixel.Height();
// write offset positions and sizes later
- const sal_uLong nOffPos = mpStm->Tell();
- mpStm->SeekRel( 16 );
+ const sal_uLong nOffPos = m_rStm.Tell();
+ m_rStm.SeekRel( 16 );
- (*mpStm) << (sal_uInt32) 0 << ( ( ROP_XOR == maVDev.GetRasterOp() && WIN_SRCCOPY == nROP ) ? WIN_SRCINVERT : nROP );
+ m_rStm << (sal_uInt32) 0 << ( ( ROP_XOR == maVDev.GetRasterOp() && WIN_SRCCOPY == nROP ) ? WIN_SRCINVERT : nROP );
ImplWriteSize( rSz );
rBmp.Write( aMemStm, sal_True, sal_False );
@@ -773,13 +773,13 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt,
nPalCount = ( nBitCount <= 8 ) ? ( nColsUsed ? nColsUsed : ( 1 << (sal_uInt32) nBitCount ) ) :
( ( 3 == nCompression ) ? 12 : 0 );
- mpStm->Write( aMemStm.GetData(), nDIBSize );
+ m_rStm.Write( aMemStm.GetData(), nDIBSize );
- const sal_uLong nEndPos = mpStm->Tell();
- mpStm->Seek( nOffPos );
- (*mpStm) << (sal_uInt32) 80 << (sal_uInt32)( nHeaderSize + ( nPalCount << 2 ) );
- (*mpStm) << (sal_uInt32)( 80 + ( nHeaderSize + ( nPalCount << 2 ) ) ) << nImageSize;
- mpStm->Seek( nEndPos );
+ const sal_uLong nEndPos = m_rStm.Tell();
+ m_rStm.Seek( nOffPos );
+ m_rStm << (sal_uInt32) 80 << (sal_uInt32)( nHeaderSize + ( nPalCount << 2 ) );
+ m_rStm << (sal_uInt32)( 80 + ( nHeaderSize + ( nPalCount << 2 ) ) ) << nImageSize;
+ m_rStm.Seek( nEndPos );
ImplEndRecord();
}
@@ -828,20 +828,20 @@ void EMFWriter::ImplWriteTextRecord( const Point& rPos, const String rText, cons
ImplBeginRecord( WIN_EMR_EXTTEXTOUTW );
ImplWriteRect( Rectangle( rPos, Size( nNormWidth, maVDev.GetTextHeight() ) ) );
- (*mpStm) << (sal_uInt32)1;
- (*mpStm) << (sal_Int32) 0 << (sal_Int32) 0;
+ m_rStm << (sal_uInt32)1;
+ m_rStm << (sal_Int32) 0 << (sal_Int32) 0;
ImplWritePoint( rPos );
- (*mpStm) << (sal_uInt32) nLen << (sal_uInt32) 76 << (sal_uInt32) 2;
- (*mpStm) << (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int32) 0;
- (*mpStm) << (sal_uInt32) ( 76 + ( nLen << 1 ) + ( (nLen & 1 ) ? 2 : 0 ) );
+ m_rStm << (sal_uInt32) nLen << (sal_uInt32) 76 << (sal_uInt32) 2;
+ m_rStm << (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int32) 0;
+ m_rStm << (sal_uInt32) ( 76 + ( nLen << 1 ) + ( (nLen & 1 ) ? 2 : 0 ) );
// write text
for( i = 0; i < nLen; i++ )
- (*mpStm) << (sal_Unicode)rText.GetChar( i );
+ m_rStm << (sal_Unicode)rText.GetChar( i );
// padding word
if( nLen & 1 )
- (*mpStm) << (sal_uInt16) 0;
+ m_rStm << (sal_uInt16) 0;
// write DX array
ImplWriteExtent( pDX[ 0 ] );
@@ -903,7 +903,7 @@ void EMFWriter::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const bas
void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
{
- for( sal_uLong j = 0, nActionCount = rMtf.GetActionCount(); j < nActionCount; j++ )
+ for( size_t j = 0, nActionCount = rMtf.GetActionSize(); j < nActionCount; j++ )
{
const MetaAction* pAction = rMtf.GetAction( j );
const sal_uInt16 nType = pAction->GetType();
@@ -1157,7 +1157,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
const MetaEPSAction* pA = (const MetaEPSAction*) pAction;
const GDIMetaFile aSubstitute( pA->GetSubstitute() );
- for( sal_uLong i = 0, nCount = aSubstitute.GetActionCount(); i < nCount; i++ )
+ for( size_t i = 0, nCount = aSubstitute.GetActionSize(); i < nCount; i++ )
{
const MetaAction* pSubstAct = aSubstitute.GetAction( i );
if( pSubstAct->GetType() == META_BMPSCALE_ACTION )
@@ -1176,7 +1176,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
maVDev.Pop();
ImplBeginRecord( WIN_EMR_RESTOREDC );
- (*mpStm) << (sal_Int32) -1;
+ m_rStm << (sal_Int32) -1;
ImplEndRecord();
break;
}
@@ -1366,7 +1366,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
( (MetaAction*) pAction )->Execute( &maVDev );
ImplBeginRecord( WIN_EMR_RESTOREDC );
- (*mpStm) << (sal_Int32) -1;
+ m_rStm << (sal_Int32) -1;
ImplEndRecord();
ImplWriteRasterOp( maVDev.GetRasterOp() );
@@ -1429,8 +1429,10 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
break;
default:
- DBG_ERROR( ( ByteString( "EMFWriter::ImplWriteActions: unsupported MetaAction #" ) += ByteString::CreateFromInt32( nType ) ).GetBuffer() );
+ OSL_FAIL( ( ByteString( "EMFWriter::ImplWriteActions: unsupported MetaAction #" ) += ByteString::CreateFromInt32( nType ) ).GetBuffer() );
break;
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */