[Libreoffice-commits] .: unusedcode.easy vcl/inc vcl/source
Joseph Powers
jpowers at kemper.freedesktop.org
Thu Sep 1 21:00:38 PDT 2011
unusedcode.easy | 20 ---
vcl/inc/vcl/pdfwriter.hxx | 79 -------------
vcl/source/gdi/pdfwriter.cxx | 103 -----------------
vcl/source/gdi/pdfwriter_impl.cxx | 227 --------------------------------------
vcl/source/gdi/pdfwriter_impl.hxx | 15 --
5 files changed, 444 deletions(-)
New commits:
commit 581e7d7057afa87036d84e42c0e0a8a7368e20c7
Author: Joseph Powers <jpowers27 at cox.net>
Date: Thu Sep 1 20:51:15 2011 -0700
unusedcode.easy: PDFWriter cleanup
diff --git a/unusedcode.easy b/unusedcode.easy
index 539bccf..55b9074 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -3123,27 +3123,7 @@ vcl::PDFExtOutDevData::SetAutoAdvanceTime(unsigned int, int)
vcl::PDFExtOutDevData::SetOutlineItemDest(int, int)
vcl::PDFExtOutDevData::SetOutlineItemParent(int, int)
vcl::PDFExtOutDevData::SetOutlineItemText(int, rtl::OUString const&)
-vcl::PDFWriter::BeginPattern(Rectangle const&)
-vcl::PDFWriter::DrawBitmap(Point const&, Bitmap const&)
-vcl::PDFWriter::DrawBitmap(Point const&, Size const&, Point const&, Size const&, Bitmap const&)
-vcl::PDFWriter::DrawBitmapEx(Point const&, BitmapEx const&)
-vcl::PDFWriter::DrawBitmapEx(Point const&, Size const&, Point const&, Size const&, BitmapEx const&)
-vcl::PDFWriter::DrawGradient(PolyPolygon const&, Gradient const&)
-vcl::PDFWriter::DrawGradient(Rectangle const&, Gradient const&)
-vcl::PDFWriter::DrawMask(Point const&, Bitmap const&, Color const&)
-vcl::PDFWriter::DrawMask(Point const&, Size const&, Bitmap const&, Color const&)
-vcl::PDFWriter::DrawMask(Point const&, Size const&, Point const&, Size const&, Bitmap const&, Color const&)
vcl::PDFWriter::DrawPixel(Polygon const&, Color const*)
-vcl::PDFWriter::DrawPolyPolygon(PolyPolygon const&, int, bool)
-vcl::PDFWriter::EndPattern(SvtGraphicFill::Transform const&)
-vcl::PDFWriter::EndTransparencyGroup(Rectangle const&, Bitmap const&)
-vcl::PDFWriter::GetCurrentStructureElement()
-vcl::PDFWriter::GetVersion() const
-vcl::PDFWriter::SetAntialiasing(unsigned short)
-vcl::PDFWriter::SetMapMode()
-vcl::PDFWriterImpl::beginControlAppearance(int)
-vcl::PDFWriterImpl::drawWaveLine(Point const&, Point const&, int, int)
-vcl::PDFWriterImpl::endControlAppearance(vcl::PDFWriter::WidgetState)
vcl::PrintDialog::getCopyCount()
vcl::PrinterController::PrinterController()
vcl::PrinterController::enableUIOption(rtl::OUString const&, bool)
diff --git a/vcl/inc/vcl/pdfwriter.hxx b/vcl/inc/vcl/pdfwriter.hxx
index 9df687d..6406928 100644
--- a/vcl/inc/vcl/pdfwriter.hxx
+++ b/vcl/inc/vcl/pdfwriter.hxx
@@ -698,8 +698,6 @@ The following structure describes the permissions used in PDF security
*/
std::set< ErrorCode > GetErrors();
- PDFVersion GetVersion() const;
-
static com::sun::star::uno::Reference< com::sun::star::beans::XMaterialHolder >
InitEncryption( const rtl::OUString& i_rOwnerPassword,
const rtl::OUString& i_rUserPassword,
@@ -717,8 +715,6 @@ The following structure describes the permissions used in PDF security
void IntersectClipRegion( const Rectangle& rRect );
void IntersectClipRegion( const basegfx::B2DPolyPolygon& rRegion );
- void SetAntialiasing( sal_uInt16 nMode = 0 );
-
void SetLayoutMode( sal_uLong nMode );
void SetDigitLanguage( LanguageType eLang );
@@ -739,7 +735,6 @@ The following structure describes the permissions used in PDF security
void SetOverlineColor( const Color& rColor );
void SetTextAlign( ::TextAlign eAlign );
- void SetMapMode();
void SetMapMode( const MapMode& rNewMapMode );
@@ -788,30 +783,12 @@ The following structure describes the permissions used in PDF security
void DrawChord( const Rectangle& rRect,
const Point& rStartPt, const Point& rEndPt );
- void DrawBitmap( const Point& rDestPt,
- const Bitmap& rBitmap );
- void DrawBitmap( const Point& rDestPt, const Size& rDestSize,
- const Bitmap& rBitmap );
void DrawBitmap( const Point& rDestPt, const Size& rDestSize,
- const Point& rSrcPtPixel, const Size& rSrcSizePixel,
const Bitmap& rBitmap );
- void DrawBitmapEx( const Point& rDestPt,
- const BitmapEx& rBitmapEx );
- void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
- const BitmapEx& rBitmapEx );
void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
- const Point& rSrcPtPixel, const Size& rSrcSizePixel,
const BitmapEx& rBitmapEx );
- void DrawMask( const Point& rDestPt,
- const Bitmap& rBitmap, const Color& rMaskColor );
- void DrawMask( const Point& rDestPt, const Size& rDestSize,
- const Bitmap& rBitmap, const Color& rMaskColor );
- void DrawMask( const Point& rDestPt, const Size& rDestSize,
- const Point& rSrcPtPixel, const Size& rSrcSizePixel,
- const Bitmap& rBitmap, const Color& rMaskColor );
-
void DrawGradient( const Rectangle& rRect, const Gradient& rGradient );
void DrawGradient( const PolyPolygon& rPolyPoly, const Gradient& rGradient );
@@ -854,19 +831,6 @@ The following structure describes the permissions used in PDF security
*/
void EndTransparencyGroup( const Rectangle& rBoundRect, sal_uInt16 nTransparencePercent );
- /** End a transparency group with an alpha mask
-
- This ends a transparency group and inserts it on the current page. The
- coordinates of the group result out of the grouped drawing operations.
-
- @param rBoundRect
- The bounding rectangle of the group
-
- @param rAlphaMask
- The transparency mask; must be an 8 bit grayscale image
- */
- void EndTransparencyGroup( const Rectangle& rBoundRect, const Bitmap& rAlphaMask );
-
/** Insert a JPG encoded image (optionally with mask)
@param rJPGData
@@ -1180,13 +1144,6 @@ The following structure describes the permissions used in PDF security
(e.g. if the passed element id is invalid)
*/
bool SetCurrentStructureElement( sal_Int32 nElement );
- /** get the current structure element's id
-
- @returns
- the id of the current structure element or -1 if no structure exists
- (e.g. if no tagged PDF is being produced)
- */
- sal_Int32 GetCurrentStructureElement();
/** set a structure attribute on the current structural element
@@ -1320,42 +1277,6 @@ The following structure describes the permissions used in PDF security
*/
void AddStream( const String& rMimeType, PDFOutputStream* pStream, bool bCompress );
- /** create a new pattern for filling operations
-
- This function creates a new pattern to be used for subsequent filling operations.
- A pattern can consist of arbitrary drawing operations; all drawing operations
- between <code>BeingPattern()</code> and <code>EndPattern()</code> calls
- will be recorded and considered as forming up the pattern.
-
- @param rCellBounds
- a rectangle defining the "cell" that will be repeated to form the pattern
- */
- void BeginPattern( const Rectangle& );
- /** finish a new pattern for filling operations
-
- This functions finishes the pattern create begun with <code>BeginPattern()</code>
- and returns a pattern id to be used in subsequent drawing operations.
-
- @param rMatrix
- a transformation to be imposed on the drawing operations that make up the pattern
-
- @returns
- the new pattern's id
- */
- sal_Int32 EndPattern( const SvtGraphicFill::Transform& rTransformation );
- /** draw a polypolygon filled with a pattern
-
- @param rPolyPoly
- PolyPolygon to filled
-
- @param nPatternId
- the pattern previously obtained in the <code>EndPattern</code> call.
-
- @param bEOFill
- true: polypolygon gets filled with EvenOdd method,
- false: polypolygon gets filled with nonzero winding method
- */
- void DrawPolyPolygon( const PolyPolygon& rPolyPoly, sal_Int32 nPatternId, bool bEOFill );
};
}
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index 481ad2b..abee05f 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -65,11 +65,6 @@ bool PDFWriter::Emit()
return ((PDFWriterImpl*)pImplementation)->emit();
}
-PDFWriter::PDFVersion PDFWriter::GetVersion() const
-{
- return ((PDFWriterImpl*)pImplementation)->getVersion();
-}
-
void PDFWriter::SetDocumentLocale( const com::sun::star::lang::Locale& rLoc )
{
((PDFWriterImpl*)pImplementation)->setDocumentLocale( rLoc );
@@ -199,79 +194,16 @@ void PDFWriter::DrawPixel( const Polygon& rPts, const Color* pColors )
((PDFWriterImpl*)pImplementation)->drawPixel( rPts, pColors );
}
-void PDFWriter::DrawBitmap( const Point& rDestPt, const Bitmap& rBitmap )
-{
- Size aSize = OutputDevice::LogicToLogic( rBitmap.GetPrefSize(),
- rBitmap.GetPrefMapMode(),
- ((PDFWriterImpl*)pImplementation)->getMapMode() );
- ((PDFWriterImpl*)pImplementation)->drawBitmap( rDestPt, aSize, rBitmap );
-}
-
void PDFWriter::DrawBitmap( const Point& rDestPt, const Size& rDestSize, const Bitmap& rBitmap )
{
((PDFWriterImpl*)pImplementation)->drawBitmap( rDestPt, rDestSize, rBitmap );
}
-void PDFWriter::DrawBitmap( const Point& rDestPt, const Size& rDestSize, const Point& rSrcPtPixel, const Size& rSrcSizePixel, const Bitmap& rBitmap )
-{
- Bitmap aBitmap( rBitmap );
- aBitmap.Crop( Rectangle( rSrcPtPixel, rSrcSizePixel ) );
- ((PDFWriterImpl*)pImplementation)->drawBitmap( rDestPt, rDestSize, aBitmap );
-}
-
-void PDFWriter::DrawBitmapEx( const Point& rDestPt, const BitmapEx& rBitmap )
-{
- Size aSize = OutputDevice::LogicToLogic( rBitmap.GetPrefSize(),
- rBitmap.GetPrefMapMode(),
- ((PDFWriterImpl*)pImplementation)->getMapMode() );
- ((PDFWriterImpl*)pImplementation)->drawBitmap( rDestPt, aSize, rBitmap );
-}
-
void PDFWriter::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, const BitmapEx& rBitmap )
{
((PDFWriterImpl*)pImplementation)->drawBitmap( rDestPt, rDestSize, rBitmap );
}
-void PDFWriter::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, const Point& rSrcPtPixel, const Size& rSrcSizePixel, const BitmapEx& rBitmap )
-{
- if ( !!rBitmap )
- {
- BitmapEx aBitmap( rBitmap );
- aBitmap.Crop( Rectangle( rSrcPtPixel, rSrcSizePixel ) );
- ((PDFWriterImpl*)pImplementation)->drawBitmap( rDestPt, rDestSize, aBitmap );
- }
-}
-
-void PDFWriter::DrawMask( const Point& rDestPt, const Bitmap& rBitmap, const Color& rMaskColor )
-{
- Size aSize = OutputDevice::LogicToLogic( rBitmap.GetPrefSize(),
- rBitmap.GetPrefMapMode(),
- ((PDFWriterImpl*)pImplementation)->getMapMode() );
- ((PDFWriterImpl*)pImplementation)->drawMask( rDestPt, aSize, rBitmap, rMaskColor );
-}
-
-void PDFWriter::DrawMask( const Point& rDestPt, const Size& rDestSize, const Bitmap& rBitmap, const Color& rMaskColor )
-{
- ((PDFWriterImpl*)pImplementation)->drawMask( rDestPt, rDestSize, rBitmap, rMaskColor );
-}
-
-void PDFWriter::DrawMask( const Point& rDestPt, const Size& rDestSize, const Point& rSrcPtPixel, const Size& rSrcSizePixel, const Bitmap& rBitmap, const Color& rMaskColor )
-{
- Bitmap aBitmap( rBitmap );
- aBitmap.Crop( Rectangle( rSrcPtPixel, rSrcSizePixel ) );
- ((PDFWriterImpl*)pImplementation)->drawMask( rDestPt, rDestSize, aBitmap, rMaskColor );
-}
-
-void PDFWriter::DrawGradient( const Rectangle& rRect, const Gradient& rGradient )
-{
- ((PDFWriterImpl*)pImplementation)->drawGradient( rRect, rGradient );
-}
-
-void PDFWriter::DrawGradient( const PolyPolygon& rPolyPoly, const Gradient& rGradient )
-{
- ((PDFWriterImpl*)pImplementation)->drawGradient( rPolyPoly, rGradient );
-}
-
void PDFWriter::DrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch )
{
((PDFWriterImpl*)pImplementation)->drawHatch( rPolyPoly, rHatch );
@@ -297,11 +229,6 @@ void PDFWriter::EndTransparencyGroup( const Rectangle& rRect, sal_uInt16 nTransp
((PDFWriterImpl*)pImplementation)->endTransparencyGroup( rRect, nTransparentPercent );
}
-void PDFWriter::EndTransparencyGroup( const Rectangle& rRect, const Bitmap& rAlphaMask )
-{
- ((PDFWriterImpl*)pImplementation)->endTransparencyGroup( rRect, rAlphaMask );
-}
-
void PDFWriter::Push( sal_uInt16 nFlags )
{
((PDFWriterImpl*)pImplementation)->push( nFlags );
@@ -317,11 +244,6 @@ void PDFWriter::SetMapMode( const MapMode& rMapMode )
((PDFWriterImpl*)pImplementation)->setMapMode( rMapMode );
}
-void PDFWriter::SetMapMode()
-{
- ((PDFWriterImpl*)pImplementation)->setMapMode();
-}
-
void PDFWriter::SetLineColor( const Color& rColor )
{
((PDFWriterImpl*)pImplementation)->setLineColor( rColor );
@@ -357,11 +279,6 @@ void PDFWriter::IntersectClipRegion( const Rectangle& rRect )
((PDFWriterImpl*)pImplementation)->intersectClipRegion( rRect );
}
-void PDFWriter::SetAntialiasing( sal_uInt16 nMode )
-{
- ((PDFWriterImpl*)pImplementation)->setAntiAlias( (sal_Int32)nMode );
-}
-
void PDFWriter::SetLayoutMode( sal_uLong nMode )
{
((PDFWriterImpl*)pImplementation)->setLayoutMode( (sal_Int32)nMode );
@@ -490,11 +407,6 @@ bool PDFWriter::SetCurrentStructureElement( sal_Int32 nID )
return ((PDFWriterImpl*)pImplementation)->setCurrentStructureElement( nID );
}
-sal_Int32 PDFWriter::GetCurrentStructureElement()
-{
- return ((PDFWriterImpl*)pImplementation)->getCurrentStructureElement();
-}
-
bool PDFWriter::SetStructureAttribute( enum StructAttribute eAttr, enum StructAttributeValue eVal )
{
return ((PDFWriterImpl*)pImplementation)->setStructureAttribute( eAttr, eVal );
@@ -544,21 +456,6 @@ void PDFWriter::AddStream( const String& rMimeType, PDFOutputStream* pStream, bo
((PDFWriterImpl*)pImplementation)->addStream( rMimeType, pStream, bCompress );
}
-void PDFWriter::BeginPattern( const Rectangle& rCellRect )
-{
- ((PDFWriterImpl*)pImplementation)->beginPattern( rCellRect );
-}
-
-sal_Int32 PDFWriter::EndPattern( const SvtGraphicFill::Transform& rTransform )
-{
- return ((PDFWriterImpl*)pImplementation)->endPattern( rTransform );
-}
-
-void PDFWriter::DrawPolyPolygon( const PolyPolygon& rPolyPoly, sal_Int32 nPattern, bool bEOFill )
-{
- ((PDFWriterImpl*)pImplementation)->drawPolyPolygon( rPolyPoly, nPattern, bEOFill );
-}
-
std::set< PDFWriter::ErrorCode > PDFWriter::GetErrors()
{
return ((PDFWriterImpl*)pImplementation)->getErrors();
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index e315609..1b73da6 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -1731,7 +1731,6 @@ void PDFWriterImpl::PDFPage::appendWaveLine( sal_Int32 nWidth, sal_Int32 nY, sal
m_nCurrentStructElement( 0 ),
m_bEmitStructure( true ),
m_bNewMCID( false ),
- m_nCurrentControl( -1 ),
m_bEmbedStandardFonts( false ),
m_nNextFID( 1 ),
m_nInheritedPageWidth( 595 ), // default A4
@@ -7934,39 +7933,6 @@ void PDFWriterImpl::drawLine( const Point& rStart, const Point& rStop, const Lin
}
}
-void PDFWriterImpl::drawWaveLine( const Point& rStart, const Point& rStop, sal_Int32 nDelta, sal_Int32 nLineWidth )
-{
- Point aDiff( rStop-rStart );
- double fLen = sqrt( (double)(aDiff.X()*aDiff.X() + aDiff.Y()*aDiff.Y()) );
- if( fLen < 1.0 )
- return;
-
- MARK( "drawWaveLine" );
- updateGraphicsState();
-
- if( m_aGraphicsStack.front().m_aLineColor == Color( COL_TRANSPARENT ) )
- return;
-
- OStringBuffer aLine( 512 );
- aLine.append( "q " );
- m_aPages.back().appendMappedLength( nLineWidth, aLine, true );
- aLine.append( " w " );
-
- appendDouble( (double)aDiff.X()/fLen, aLine );
- aLine.append( ' ' );
- appendDouble( -(double)aDiff.Y()/fLen, aLine );
- aLine.append( ' ' );
- appendDouble( (double)aDiff.Y()/fLen, aLine );
- aLine.append( ' ' );
- appendDouble( (double)aDiff.X()/fLen, aLine );
- aLine.append( ' ' );
- m_aPages.back().appendPoint( rStart, aLine );
- aLine.append( " cm " );
- m_aPages.back().appendWaveLine( (sal_Int32)fLen, 0, nDelta, aLine );
- aLine.append( "Q\n" );
- writeBuffer( aLine.getStr(), aLine.getLength() );
-}
-
#define WCONV( x ) m_pReferenceDevice->ImplDevicePixelToLogicWidth( x )
#define HCONV( x ) m_pReferenceDevice->ImplDevicePixelToLogicHeight( x )
@@ -8668,48 +8634,6 @@ void PDFWriterImpl::endTransparencyGroup( const Rectangle& rBoundingBox, sal_uIn
}
}
-void PDFWriterImpl::endTransparencyGroup( const Rectangle& rBoundingBox, const Bitmap& rAlphaMask )
-{
- if( m_aContext.Version >= PDFWriter::PDF_1_4 )
- {
- // create XObject
- m_aTransparentObjects.push_back( TransparencyEmit() );
- m_aTransparentObjects.back().m_aBoundRect = rBoundingBox;
- // convert rectangle to default user space
- m_aPages.back().convertRect( m_aTransparentObjects.back().m_aBoundRect );
- m_aTransparentObjects.back().m_nObject = createObject();
- m_aTransparentObjects.back().m_fAlpha = 0.0;
- // get XObject's content stream
- m_aTransparentObjects.back().m_pContentStream = static_cast<SvMemoryStream*>(endRedirect());
- m_aTransparentObjects.back().m_nExtGStateObject = createObject();
-
- // draw soft mask
- beginRedirect( new SvMemoryStream( 1024, 1024 ), Rectangle() );
- drawBitmap( rBoundingBox.TopLeft(), rBoundingBox.GetSize(), rAlphaMask );
- m_aTransparentObjects.back().m_pSoftMaskStream = static_cast<SvMemoryStream*>(endRedirect());
-
- OStringBuffer aObjName( 16 );
- aObjName.append( "Tr" );
- aObjName.append( m_aTransparentObjects.back().m_nObject );
- OString aTrName( aObjName.makeStringAndClear() );
- aObjName.append( "EGS" );
- aObjName.append( m_aTransparentObjects.back().m_nExtGStateObject );
- OString aExtName( aObjName.makeStringAndClear() );
-
- OStringBuffer aLine( 80 );
- // insert XObject
- aLine.append( "q /" );
- aLine.append( aExtName );
- aLine.append( " gs /" );
- aLine.append( aTrName );
- aLine.append( " Do Q\n" );
- writeBuffer( aLine.getStr(), aLine.getLength() );
-
- pushResource( ResXObject, aTrName, m_aTransparentObjects.back().m_nObject );
- pushResource( ResExtGState, aExtName, m_aTransparentObjects.back().m_nExtGStateObject );
- }
-}
-
void PDFWriterImpl::drawRectangle( const Rectangle& rRect )
{
MARK( "drawRectangle" );
@@ -10070,23 +9994,6 @@ void PDFWriterImpl::drawBitmap( const Point& rDestPoint, const Size& rDestSize,
drawBitmap( rDestPoint, rDestSize, rEmit, Color( COL_TRANSPARENT ) );
}
-void PDFWriterImpl::drawMask( const Point& rDestPoint, const Size& rDestSize, const Bitmap& rBitmap, const Color& rFillColor )
-{
- MARK( "drawMask" );
-
- // #i40055# sanity check
- if( ! (rDestSize.Width() && rDestSize.Height()) )
- return;
-
- Bitmap aBitmap( rBitmap );
- if( aBitmap.GetBitCount() > 1 )
- aBitmap.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
- DBG_ASSERT( aBitmap.GetBitCount() == 1, "mask conversion failed" );
-
- const BitmapEmit& rEmit = createBitmapEmit( BitmapEx( aBitmap ), true );
- drawBitmap( rDestPoint, rDestSize, rEmit, rFillColor );
-}
-
sal_Int32 PDFWriterImpl::createGradient( const Gradient& rGradient, const Size& rSize )
{
Size aPtSize( lcl_convert( m_aGraphicsStack.front().m_aMapMode,
@@ -10169,44 +10076,6 @@ void PDFWriterImpl::drawGradient( const Rectangle& rRect, const Gradient& rGradi
writeBuffer( aLine.getStr(), aLine.getLength() );
}
-void PDFWriterImpl::drawGradient( const PolyPolygon& rPolyPoly, const Gradient& rGradient )
-{
- MARK( "drawGradient (PolyPolygon)" );
-
- if( m_aContext.Version == PDFWriter::PDF_1_2 )
- {
- drawPolyPolygon( rPolyPoly );
- return;
- }
-
- Rectangle aBoundRect = rPolyPoly.GetBoundRect();
- sal_Int32 nGradient = createGradient( rGradient, aBoundRect.GetSize() );
-
- updateGraphicsState();
-
- Point aTranslate = aBoundRect.BottomLeft();
- int nPolygons = rPolyPoly.Count();
-
- OStringBuffer aLine( 80*nPolygons );
- aLine.append( "q " );
- // set PolyPolygon as clip path
- m_aPages.back().appendPolyPolygon( rPolyPoly, aLine );
- aLine.append( "W* n\n" );
- aLine.append( "1 0 0 1 " );
- m_aPages.back().appendPoint( aTranslate, aLine );
- aLine.append( " cm\n" );
- aLine.append( "/P" );
- aLine.append( nGradient );
- aLine.append( " sh Q\n" );
- if( m_aGraphicsStack.front().m_aLineColor != Color( COL_TRANSPARENT ) )
- {
- // and draw the surrounding path
- m_aPages.back().appendPolyPolygon( rPolyPoly, aLine );
- aLine.append( "S\n" );
- }
- writeBuffer( aLine.getStr(), aLine.getLength() );
-}
-
void PDFWriterImpl::drawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch )
{
MARK( "drawHatch" );
@@ -12022,102 +11891,6 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa
return nNewWidget;
}
-void PDFWriterImpl::beginControlAppearance( sal_Int32 nControl )
-{
- if( nControl < 0 || nControl >= (sal_Int32)m_aWidgets.size() )
- return;
-
- PDFWidget& rWidget = m_aWidgets[ nControl ];
- m_nCurrentControl = nControl;
-
- SvMemoryStream* pControlStream = new SvMemoryStream( 1024, 1024 );
- // back conversion of control rect to current MapMode; necessary because
- // MapMode between createControl and beginControlAppearance
- // could have changed; therefore the widget rectangle is
- // already converted
- Rectangle aBack( Point( rWidget.m_aRect.Left(), pointToPixel(m_aPages[m_nCurrentPage].getHeight()) - rWidget.m_aRect.Top() - rWidget.m_aRect.GetHeight() ),
- rWidget.m_aRect.GetSize() );
- aBack = lcl_convert( m_aMapMode,
- m_aGraphicsStack.front().m_aMapMode,
- getReferenceDevice(),
- aBack );
- beginRedirect( pControlStream, aBack );
- writeBuffer( "/Tx BMC\n", 8 );
-}
-
-bool PDFWriterImpl::endControlAppearance( PDFWriter::WidgetState eState )
-{
- bool bRet = false;
- if( ! m_aOutputStreams.empty() )
- writeBuffer( "\nEMC\n", 5 );
- SvMemoryStream* pAppearance = static_cast<SvMemoryStream*>(endRedirect());
- if( pAppearance && m_nCurrentControl >= 0 && m_nCurrentControl < (sal_Int32)m_aWidgets.size() )
- {
- PDFWidget& rWidget = m_aWidgets[ m_nCurrentControl ];
- OString aState, aStyle;
- switch( rWidget.m_eType )
- {
- case PDFWriter::PushButton:
- if( eState == PDFWriter::Up || eState == PDFWriter::Down )
- {
- aState = (eState == PDFWriter::Up) ? "N" : "D";
- aStyle = "Standard";
- }
- break;
- case PDFWriter::CheckBox:
- if( eState == PDFWriter::Up || eState == PDFWriter::Down )
- {
- aState = "N";
- aStyle = (eState == PDFWriter::Up) ? "Off" : "Yes";
- /* cf PDFReference 3rd ed. V1.4 p539:
- recommended name for on state is "Yes",
- recommended name for off state is "Off"
- */
- }
- break;
- case PDFWriter::RadioButton:
- if( eState == PDFWriter::Up || eState == PDFWriter::Down )
- {
- aState = "N";
- if( eState == PDFWriter::Up )
- aStyle = "Off";
- else
- {
- OStringBuffer aBuf( rWidget.m_aOnValue.getLength()*2 );
- appendName( rWidget.m_aOnValue, aBuf );
- aStyle = aBuf.makeStringAndClear();
- }
- }
- break;
- case PDFWriter::Edit:
- aState = "N";
- aStyle = "Standard";
- break;
- case PDFWriter::ListBox:
- case PDFWriter::ComboBox:
- case PDFWriter::Hierarchy:
- break;
- }
- if( aState.getLength() && aStyle.getLength() )
- {
- // delete eventual existing stream
- PDFAppearanceStreams::iterator it =
- rWidget.m_aAppearances[ aState ].find( aStyle );
- if( it != rWidget.m_aAppearances[ aState ].end() )
- delete it->second;
- rWidget.m_aAppearances[ aState ][ aStyle ] = pAppearance;
- bRet = true;
- }
- }
-
- if( ! bRet )
- delete pAppearance;
-
- m_nCurrentControl = -1;
-
- return bRet;
-}
-
void PDFWriterImpl::addStream( const String& rMimeType, PDFOutputStream* pStream, bool bCompress )
{
if( pStream )
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index 8649bef..09c68b1 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -655,8 +655,6 @@ private:
std::vector<PDFWidget> m_aWidgets;
/* maps radio group id to index of radio group control in m_aWidgets */
std::map< sal_Int32, sal_Int32 > m_aRadioGroupWidgets;
- /* used to store control id during beginControlAppearance/endControlAppearance */
- sal_Int32 m_nCurrentControl;
/* boost::unordered_map for field names, used to ensure unique field names */
boost::unordered_map< rtl::OString, sal_Int32, rtl::OStringHash > m_aFieldNameMap;
@@ -1122,7 +1120,6 @@ public:
void setFont( const Font& rFont );
void setMapMode( const MapMode& rMapMode );
- void setMapMode() { setMapMode( m_aMapMode ); }
const MapMode& getMapMode() { return m_aGraphicsStack.front().m_aMapMode; }
@@ -1214,12 +1211,6 @@ public:
m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateFont;
}
- void setAntiAlias( sal_Int32 nAntiAlias )
- {
- m_aGraphicsStack.front().m_nAntiAlias = nAntiAlias;
- m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateAntiAlias;
- }
-
/* actual drawing functions */
void drawText( const Point& rPos, const String& rText, xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN, bool bTextLines = true );
void drawTextArray( const Point& rPos, const String& rText, const sal_Int32* pDXArray = NULL, xub_StrLen nIndex = 0, xub_StrLen nLen = STRING_LEN, bool bTextLines = true );
@@ -1240,7 +1231,6 @@ public:
void drawPolyLine( const Polygon& rPoly );
void drawPolyLine( const Polygon& rPoly, const LineInfo& rInfo );
void drawPolyLine( const Polygon& rPoly, const PDFWriter::ExtLineInfo& rInfo );
- void drawWaveLine( const Point& rStart, const Point& rStop, sal_Int32 nDelta, sal_Int32 nLineWidth );
void drawPixel( const Point& rPt, const Color& rColor );
void drawPixel( const Polygon& rPts, const Color* pColors = NULL );
@@ -1252,17 +1242,14 @@ public:
void drawBitmap( const Point& rDestPoint, const Size& rDestSize, const Bitmap& rBitmap );
void drawBitmap( const Point& rDestPoint, const Size& rDestSize, const BitmapEx& rBitmap );
- void drawMask( const Point& rDestPoint, const Size& rDestSize, const Bitmap& rBitmap, const Color& rFillColor );
void drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const Size& rSizePixel, const Rectangle& rTargetArea, const Bitmap& rMask );
void drawGradient( const Rectangle& rRect, const Gradient& rGradient );
- void drawGradient( const PolyPolygon& rPolyPoly, const Gradient& rGradient );
void drawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch );
void drawWallpaper( const Rectangle& rRect, const Wallpaper& rWall );
void drawTransparent( const PolyPolygon& rPolyPoly, sal_uInt32 nTransparentPercent );
void beginTransparencyGroup();
void endTransparencyGroup( const Rectangle& rBoundingBox, sal_uInt32 nTransparentPercent );
- void endTransparencyGroup( const Rectangle& rBoundingBox, const Bitmap& rAlphaMask );
void beginPattern( const Rectangle& rCell );
sal_Int32 endPattern( const SvtGraphicFill::Transform& rTransform );
void drawPolyPolygon( const PolyPolygon& rPolyPoly, sal_Int32 nPattern, bool bEOFill );
@@ -1312,8 +1299,6 @@ public:
// controls
sal_Int32 createControl( const PDFWriter::AnyWidget& rControl, sal_Int32 nPageNr = -1 );
- void beginControlAppearance( sal_Int32 nControl );
- bool endControlAppearance( PDFWriter::WidgetState eState );
// additional streams
void addStream( const String& rMimeType, PDFOutputStream* pStream, bool bCompress );
More information about the Libreoffice-commits
mailing list