diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-02-13 23:34:30 +1100 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-02-13 23:34:30 +1100 |
commit | 52942f142ec40f762c1de0751d802fd42eaabed3 (patch) | |
tree | 54b3d566be1587001d00853c08fd31710d7ce933 /filter | |
parent | 2edd7bed44f1e2d67238a383ac3338e7c7da5086 (diff) |
filter: tab spacing and remove extraneous newlines in eps.cxx
Change-Id: Ib142aa42999557e77520eb4e0ec6602e12782433
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/graphicfilter/eps/eps.cxx | 62 |
1 files changed, 11 insertions, 51 deletions
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index d1cdf9710080..0800b4cf7c07 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -94,14 +94,14 @@ struct PSLZWCTreeNode class PSWriter { private: - bool mbStatus; + bool mbStatus; sal_uLong mnLevelWarning; // number of embedded eps files which was not exported sal_uLong mnLastPercent; // the number with which pCallback was called the last time sal_uInt32 mnLatestPush; // offset to streamposition, where last push was done long mnLevel; // dialog options - bool mbGrayScale; - bool mbCompression; + bool mbGrayScale; + bool mbCompression; sal_Int32 mnPreview; sal_Int32 mnTextMode; @@ -118,15 +118,15 @@ private: StackMember* pGDIStack; sal_uLong mnCursorPos; // current cursor position in output Color aColor; // current color which is used for output - bool bLineColor; + bool bLineColor; Color aLineColor; // current GDIMetafile color settings - bool bFillColor; + bool bFillColor; Color aFillColor; Color aTextColor; - bool bTextFillColor; + bool bTextFillColor; Color aTextFillColor; Color aBackgroundColor; - bool bRegionChanged; + bool bRegionChanged; TextAlign eTextAlign; double fLineWidth; @@ -288,13 +288,11 @@ PSWriter::PSWriter() pAMTF = nullptr; } - PSWriter::~PSWriter() { delete pAMTF; } - bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, FilterConfigItem* pFilterConfigItem ) { sal_uInt32 nStreamPosition = 0, nPSPosition = 0; // -Wall warning, unset, check @@ -478,7 +476,6 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter return mbStatus; } - void PSWriter::ImplWriteProlog( const Graphic* pPreview ) { ImplWriteLine( "%!PS-Adobe-3.0 EPSF-3.0 " ); @@ -613,7 +610,6 @@ void PSWriter::ImplWriteProlog( const Graphic* pPreview ) ImplWriteLine( "/tm matrix currentmatrix def" ); } - void PSWriter::ImplWriteEpilog() { ImplTranslate( 0, nBoundingY2 ); @@ -626,7 +622,6 @@ void PSWriter::ImplWriteEpilog() ImplWriteLine( "%%EOF" ); } - void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) { tools::PolyPolygon aFillPath; @@ -1188,7 +1183,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) case MetaActionType::Transparent: { - // TODO: Implement! + // TODO: implement! } break; @@ -1243,6 +1238,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) break; } } + if( pGradAction ) ImplWriteGradient( pGradAction->GetPolyPolygon(), pGradAction->GetGradient(), rVDev ); } @@ -1426,14 +1422,12 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) } } - inline void PSWriter::ImplWritePoint( const Point& rPoint, sal_uInt32 nMode ) { ImplWriteDouble( rPoint.X() ); ImplWriteDouble( rPoint.Y(), nMode ); } - void PSWriter::ImplMoveTo( const Point& rPoint, sal_uInt32 nMode ) { ImplWritePoint( rPoint ); @@ -1441,7 +1435,6 @@ void PSWriter::ImplMoveTo( const Point& rPoint, sal_uInt32 nMode ) ImplExecMode( nMode ); } - void PSWriter::ImplLineTo( const Point& rPoint, sal_uInt32 nMode ) { ImplWritePoint( rPoint ); @@ -1449,7 +1442,6 @@ void PSWriter::ImplLineTo( const Point& rPoint, sal_uInt32 nMode ) ImplExecMode( nMode ); } - void PSWriter::ImplCurveTo( const Point& rP1, const Point& rP2, const Point& rP3, sal_uInt32 nMode ) { ImplWritePoint( rP1 ); @@ -1459,7 +1451,6 @@ void PSWriter::ImplCurveTo( const Point& rP1, const Point& rP2, const Point& rP3 ImplExecMode( nMode ); } - void PSWriter::ImplTranslate( const double& fX, const double& fY, sal_uInt32 nMode ) { ImplWriteDouble( fX ); @@ -1468,7 +1459,6 @@ void PSWriter::ImplTranslate( const double& fX, const double& fY, sal_uInt32 nMo ImplExecMode( nMode ); } - void PSWriter::ImplScale( const double& fX, const double& fY, sal_uInt32 nMode ) { ImplWriteDouble( fX ); @@ -1477,7 +1467,6 @@ void PSWriter::ImplScale( const double& fX, const double& fY, sal_uInt32 nMode ) ImplExecMode( nMode ); } - void PSWriter::ImplRect( const Rectangle & rRect ) { if ( bFillColor ) @@ -1501,7 +1490,6 @@ void PSWriter::ImplRect( const Rectangle & rRect ) mnCursorPos = 0; } - void PSWriter::ImplRectFill( const Rectangle & rRect ) { double nWidth = rRect.GetWidth(); @@ -1520,7 +1508,6 @@ void PSWriter::ImplRectFill( const Rectangle & rRect ) ImplExecMode( PS_RET ); } - void PSWriter::ImplAddPath( const tools::Polygon & rPolygon ) { sal_uInt16 nPointCount = rPolygon.GetSize(); @@ -1544,7 +1531,6 @@ void PSWriter::ImplAddPath( const tools::Polygon & rPolygon ) } } - void PSWriter::ImplIntersect( const tools::PolyPolygon& rPolyPoly ) { sal_uInt16 i, nPolyCount = rPolyPoly.Count(); @@ -1561,7 +1547,6 @@ void PSWriter::ImplIntersect( const tools::PolyPolygon& rPolyPoly ) ImplWriteLine( "eoclip newpath" ); } - void PSWriter::ImplWriteGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient, VirtualDevice& rVDev ) { ScopedVclPtrInstance< VirtualDevice > l_pVDev; @@ -1571,7 +1556,6 @@ void PSWriter::ImplWriteGradient( const tools::PolyPolygon& rPolyPoly, const Gra ImplWriteActions( aTmpMtf, rVDev ); } - void PSWriter::ImplPolyPoly( const tools::PolyPolygon & rPolyPoly, bool bTextOutline ) { sal_uInt16 i, nPolyCount = rPolyPoly.Count(); @@ -1607,7 +1591,6 @@ void PSWriter::ImplPolyPoly( const tools::PolyPolygon & rPolyPoly, bool bTextOut } } - void PSWriter::ImplPolyLine( const tools::Polygon & rPoly ) { if ( bLineColor ) @@ -1644,7 +1627,6 @@ void PSWriter::ImplPolyLine( const tools::Polygon & rPoly ) } } - void PSWriter::ImplSetClipRegion( vcl::Region& rClipRegion ) { if ( !rClipRegion.IsEmpty() ) @@ -1680,7 +1662,6 @@ void PSWriter::ImplSetClipRegion( vcl::Region& rClipRegion ) } } - // possible gfx formats: // // level 1: grayscale 8 bit @@ -1991,7 +1972,6 @@ void PSWriter::ImplBmp( Bitmap* pBitmap, Bitmap* pMaskBitmap, const Point & rPoi } } - void PSWriter::ImplWriteCharacter( sal_Char nChar ) { switch( nChar ) @@ -2004,7 +1984,6 @@ void PSWriter::ImplWriteCharacter( sal_Char nChar ) ImplWriteByte( (sal_uInt8)nChar, PS_NONE ); } - void PSWriter::ImplWriteString( const OString& rString, VirtualDevice& rVDev, const long* pDXArry, bool bStretch ) { sal_Int32 nLen = rString.getLength(); @@ -2035,7 +2014,6 @@ void PSWriter::ImplWriteString( const OString& rString, VirtualDevice& rVDev, co } } - void PSWriter::ImplText( const OUString& rUniString, const Point& rPos, const long* pDXArry, sal_Int32 nWidth, VirtualDevice& rVDev ) { if ( rUniString.isEmpty() ) @@ -2095,7 +2073,6 @@ void PSWriter::ImplText( const OUString& rUniString, const Point& rPos, const lo } } - void PSWriter::ImplSetAttrForText( const Point& rPoint ) { Point aPoint( rPoint ); @@ -2137,7 +2114,6 @@ void PSWriter::ImplSetAttrForText( const Point& rPoint ) } } - void PSWriter::ImplDefineFont( const char* pOriginalName, const char* pItalic ) { mpPS->WriteUChar( '/' ); //convert the font pOriginalName using ISOLatin1Encoding @@ -2160,7 +2136,6 @@ void PSWriter::ImplDefineFont( const char* pOriginalName, const char* pItalic ) ImplWriteLine( " f" ); } - void PSWriter::ImplClosePathDraw( sal_uLong nMode ) { mpPS->WriteCharPtr( "pc" ); @@ -2184,6 +2159,7 @@ inline void PSWriter::ImplWriteLineColor( sal_uLong nMode ) ImplWriteColor( nMode ); } } + inline void PSWriter::ImplWriteFillColor( sal_uLong nMode ) { if ( aColor != aFillColor ) @@ -2192,6 +2168,7 @@ inline void PSWriter::ImplWriteFillColor( sal_uLong nMode ) ImplWriteColor( nMode ); } } + inline void PSWriter::ImplWriteTextColor( sal_uLong nMode ) { if ( aColor != aTextColor ) @@ -2220,7 +2197,6 @@ void PSWriter::ImplWriteColor( sal_uLong nMode ) ImplExecMode( nMode ); } - double PSWriter::ImplGetScaling( const MapMode& rMapMode ) { double nMul; @@ -2267,7 +2243,6 @@ double PSWriter::ImplGetScaling( const MapMode& rMapMode ) return nMul; } - void PSWriter::ImplGetMapMode( const MapMode& rMapMode ) { ImplWriteLine( "tm setmatrix" ); @@ -2278,7 +2253,6 @@ void PSWriter::ImplGetMapMode( const MapMode& rMapMode ) ImplScale( fScaleX, fScaleY ); } - inline void PSWriter::ImplExecMode( sal_uLong nMode ) { if ( nMode & PS_WRAP ) @@ -2302,7 +2276,6 @@ inline void PSWriter::ImplExecMode( sal_uLong nMode ) } } - inline void PSWriter::ImplWriteLine( const char* pString, sal_uLong nMode ) { sal_uLong i = 0; @@ -2358,7 +2331,6 @@ void PSWriter::ImplWriteLineInfo( double fLWidth, double fMLimit, } } - void PSWriter::ImplWriteLineInfo( const LineInfo& rLineInfo ) { SvtGraphicStroke::DashArray l_aDashArray; @@ -2407,7 +2379,6 @@ void PSWriter::ImplWriteLineInfo( const LineInfo& rLineInfo ) ImplWriteLineInfo( fLWidth, fMiterLimit, aCapType, aJoinType, l_aDashArray ); } - void PSWriter::ImplWriteLong(sal_Int32 nNumber, sal_uLong nMode) { const OString aNumber(OString::number(nNumber)); @@ -2416,7 +2387,6 @@ void PSWriter::ImplWriteLong(sal_Int32 nNumber, sal_uLong nMode) ImplExecMode(nMode); } - void PSWriter::ImplWriteDouble( double fNumber, sal_uLong nMode ) { sal_Int32 nPTemp = (sal_Int32)fNumber; @@ -2459,7 +2429,6 @@ void PSWriter::ImplWriteDouble( double fNumber, sal_uLong nMode ) ImplExecMode( nMode ); } - /// Writes the number to stream: nNumber / ( 10^nCount ) void PSWriter::ImplWriteF( sal_Int32 nNumber, sal_uLong nCount, sal_uLong nMode ) { @@ -2499,7 +2468,6 @@ void PSWriter::ImplWriteF( sal_Int32 nNumber, sal_uLong nCount, sal_uLong nMode ImplExecMode( nMode ); } - void PSWriter::ImplWriteByte( sal_uInt8 nNumb, sal_uLong nMode ) { mpPS->WriteUChar( nNumb ); @@ -2507,7 +2475,6 @@ void PSWriter::ImplWriteByte( sal_uInt8 nNumb, sal_uLong nMode ) ImplExecMode( nMode ); } - void PSWriter::ImplWriteHexByte( sal_uInt8 nNumb, sal_uLong nMode ) { if ( ( nNumb >> 4 ) > 9 ) @@ -2523,7 +2490,6 @@ void PSWriter::ImplWriteHexByte( sal_uInt8 nNumb, sal_uLong nMode ) ImplExecMode( nMode ); } - // writes the sal_uInt8 nNumb as a Number from 0.000 up to 1.000 void PSWriter::ImplWriteB1( sal_uInt8 nNumb, sal_uLong nMode ) @@ -2531,7 +2497,6 @@ void PSWriter::ImplWriteB1( sal_uInt8 nNumb, sal_uLong nMode ) ImplWriteF( 1000 * ( nNumb + 1 ) / 256 , 3, nMode ); } - inline void PSWriter::WriteBits( sal_uInt16 nCode, sal_uInt16 nCodeLen ) { dwShift |= ( nCode << ( nOffset - nCodeLen ) ); @@ -2546,7 +2511,6 @@ inline void PSWriter::WriteBits( sal_uInt16 nCode, sal_uInt16 nCodeLen ) ImplWriteHexByte( (sal_uInt8)( dwShift >> 24 ) ); } - void PSWriter::StartCompression() { sal_uInt16 i; @@ -2571,7 +2535,6 @@ void PSWriter::StartCompression() WriteBits( nClearCode, nCodeSize ); } - void PSWriter::Compress( sal_uInt8 nCompThis ) { PSLZWCTreeNode* p; @@ -2624,7 +2587,6 @@ void PSWriter::Compress( sal_uInt8 nCompThis ) } } - void PSWriter::EndCompression() { if( pPrefix ) @@ -2634,7 +2596,6 @@ void PSWriter::EndCompression() delete[] pTable; } - sal_uInt8* PSWriter::ImplSearchEntry( sal_uInt8* pSource, sal_uInt8 const * pDest, sal_uLong nComp, sal_uLong nSize ) { while ( nComp-- >= nSize ) @@ -2652,7 +2613,6 @@ sal_uInt8* PSWriter::ImplSearchEntry( sal_uInt8* pSource, sal_uInt8 const * pDes return nullptr; } - bool PSWriter::ImplGetBoundingBox( double* nNumb, sal_uInt8* pSource, sal_uLong nSize ) { bool bRetValue = false; |