summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorVladimir Glazunov <vg@openoffice.org>2010-03-22 18:17:46 +0100
committerVladimir Glazunov <vg@openoffice.org>2010-03-22 18:17:46 +0100
commit85298fa82b939c0366c15b6488df7b8d4079ee9f (patch)
treef4c3569f56ae749328259af04f036ec97e9aa4e8 /filter
parent33007ead24daa4cafbbc069ddfb82b3094c3c879 (diff)
parent6b7c5d6ab9e8fd277dda2962e62993c93235144b (diff)
CWS-TOOLING: integrate CWS vcl109
Diffstat (limited to 'filter')
-rw-r--r--filter/source/pdf/makefile.mk1
-rw-r--r--filter/source/pdf/pdfexport.cxx23
2 files changed, 19 insertions, 5 deletions
diff --git a/filter/source/pdf/makefile.mk b/filter/source/pdf/makefile.mk
index e2319422691f..02ed88337774 100644
--- a/filter/source/pdf/makefile.mk
+++ b/filter/source/pdf/makefile.mk
@@ -61,6 +61,7 @@ SHL1STDLIBS=\
$(TKLIB) \
$(VCLLIB) \
$(SVLLIB) \
+ $(BASEGFXLIB) \
$(SFX2LIB) \
$(UNOTOOLSLIB) \
$(TOOLSLIB) \
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 3ff1b23aad5d..793503abf9ba 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -50,6 +50,9 @@
#include <svtools/filter.hxx>
#include <svl/solar.hrc>
#include <comphelper/string.hxx>
+#include "basegfx/polygon/b2dpolygon.hxx"
+#include "basegfx/polygon/b2dpolypolygon.hxx"
+#include "basegfx/polygon/b2dpolygontools.hxx"
#include <unotools/saveopt.hxx> // only for testing of relative saving options in PDF
@@ -940,7 +943,8 @@ sal_Bool PDFExport::ImplExportPage( PDFWriter& rWriter, PDFExtOutDevData& rPDFEx
rWriter.NewPage( aSizePDF.Width(), aSizePDF.Height() );
rWriter.SetMapMode( rMtf.GetPrefMapMode() );
- rWriter.SetClipRegion( aPageRect );
+ basegfx::B2DRectangle aB2DRect( aPageRect.Left(), aPageRect.Top(), aPageRect.Right(), aPageRect.Bottom() );
+ rWriter.SetClipRegion( basegfx::B2DPolyPolygon( basegfx::tools::createPolygonFromRect( aB2DRect ) ) );
bRet = ImplWriteActions( rWriter, &rPDFExtOutDevData, rMtf, aDummyVDev );
rPDFExtOutDevData.ResetSyncData();
@@ -1643,7 +1647,15 @@ sal_Bool PDFExport::ImplWriteActions( PDFWriter& rWriter, PDFExtOutDevData* pPDF
const MetaClipRegionAction* pA = (const MetaClipRegionAction*) pAction;
if( pA->IsClipping() )
- rWriter.SetClipRegion( pA->GetRegion() );
+ {
+ if( pA->GetRegion().IsEmpty() )
+ rWriter.SetClipRegion( basegfx::B2DPolyPolygon() );
+ else
+ {
+ Region aReg( pA->GetRegion() );
+ rWriter.SetClipRegion( aReg.ConvertToB2DPolyPolygon() );
+ }
+ }
else
rWriter.SetClipRegion();
}
@@ -1658,8 +1670,9 @@ sal_Bool PDFExport::ImplWriteActions( PDFWriter& rWriter, PDFExtOutDevData* pPDF
case( META_ISECTREGIONCLIPREGION_ACTION ):
{
- const MetaISectRegionClipRegionAction* pA = (const MetaISectRegionClipRegionAction*) pAction;
- rWriter.IntersectClipRegion( pA->GetRegion() );
+ const MetaISectRegionClipRegionAction* pA = (const MetaISectRegionClipRegionAction*) pAction;
+ Region aReg( pA->GetRegion() );
+ rWriter.IntersectClipRegion( aReg.ConvertToB2DPolyPolygon() );
}
break;
@@ -1829,7 +1842,7 @@ void PDFExport::ImplWriteGradient( PDFWriter& rWriter, const PolyPolygon& rPolyP
rDummyVDev.AddGradientActions( rPolyPoly.GetBoundRect(), rGradient, aTmpMtf );
rWriter.Push();
- rWriter.IntersectClipRegion( rPolyPoly );
+ rWriter.IntersectClipRegion( rPolyPoly.getB2DPolyPolygon() );
ImplWriteActions( rWriter, NULL, aTmpMtf, rDummyVDev );
rWriter.Pop();
}