summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2010-05-20 15:46:46 +0200
committersb <sb@openoffice.org>2010-05-20 15:46:46 +0200
commitd18de1ac029a718f36afd501b73a774901c06e8a (patch)
tree9d2582336e5e76e5104268bbf6a8e6ed172770fc /svtools
parentb57975f75a01d5e79f8473c2b5481bed283bec2a (diff)
parent51066323fd14918f65ea7ba66e14b9c7604eb978 (diff)
sb120: merged in DEV300_m78
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/filter.vcl/wmf/winmtf.cxx12
-rw-r--r--svtools/source/filter.vcl/wmf/winmtf.hxx3
2 files changed, 10 insertions, 5 deletions
diff --git a/svtools/source/filter.vcl/wmf/winmtf.cxx b/svtools/source/filter.vcl/wmf/winmtf.cxx
index 21f6e69c8d9e..bf176015fd77 100644
--- a/svtools/source/filter.vcl/wmf/winmtf.cxx
+++ b/svtools/source/filter.vcl/wmf/winmtf.cxx
@@ -36,7 +36,7 @@
// ------------------------------------------------------------------------
-#define WIN_MTF_MAX_POLYPOLYCOUNT 16
+#define WIN_MTF_MAX_CLIP_DEPTH 16
void WinMtfClipPath::ImpUpdateType()
{
@@ -54,26 +54,28 @@ void WinMtfClipPath::IntersectClipRect( const Rectangle& rRect )
{
if ( !aPolyPoly.Count() )
aPolyPoly = Polygon( rRect );
- else if ( aPolyPoly.Count() < WIN_MTF_MAX_POLYPOLYCOUNT )
+ else if ( nDepth < WIN_MTF_MAX_CLIP_DEPTH )
{
Polygon aPolygon( rRect );
PolyPolygon aIntersection;
PolyPolygon aPolyPolyRect( aPolygon );
aPolyPoly.GetIntersection( aPolyPolyRect, aIntersection );
aPolyPoly = aIntersection;
+ nDepth++;
}
ImpUpdateType();
}
void WinMtfClipPath::ExcludeClipRect( const Rectangle& rRect )
{
- if ( aPolyPoly.Count() && ( aPolyPoly.Count() < WIN_MTF_MAX_POLYPOLYCOUNT ) )
+ if ( aPolyPoly.Count() && ( nDepth < WIN_MTF_MAX_CLIP_DEPTH ) )
{
Polygon aPolygon( rRect );
PolyPolygon aPolyPolyRect( aPolygon );
PolyPolygon aDifference;
aPolyPoly.GetDifference( aPolyPolyRect, aDifference );
aPolyPoly = aDifference;
+ nDepth++;
}
ImpUpdateType();
}
@@ -82,8 +84,10 @@ void WinMtfClipPath::SetClipPath( const PolyPolygon& rPolyPolygon, sal_Int32 nCl
{
if ( !rPolyPolygon.Count() )
aPolyPoly = rPolyPolygon;
- else if ( rPolyPolygon.Count() < WIN_MTF_MAX_POLYPOLYCOUNT )
+ else if ( nDepth < WIN_MTF_MAX_CLIP_DEPTH )
{
+ nDepth++;
+
PolyPolygon aNewClipPath;
// #115345# Watch out for empty aPolyPoly here - conceptually,
diff --git a/svtools/source/filter.vcl/wmf/winmtf.hxx b/svtools/source/filter.vcl/wmf/winmtf.hxx
index beb1f62e22d6..fb4fd2fe0c57 100644
--- a/svtools/source/filter.vcl/wmf/winmtf.hxx
+++ b/svtools/source/filter.vcl/wmf/winmtf.hxx
@@ -314,6 +314,7 @@ class WinMtfClipPath
{
PolyPolygon aPolyPoly;
WinMtfClipPathType eType;
+ sal_Int32 nDepth;
void ImpUpdateType();
@@ -321,7 +322,7 @@ class WinMtfClipPath
sal_Bool bNeedsUpdate;
- WinMtfClipPath(): eType(EMPTY), bNeedsUpdate( sal_False ){};
+ WinMtfClipPath(): eType(EMPTY), nDepth( 0 ), bNeedsUpdate( sal_False ){};
void SetClipPath( const PolyPolygon& rPolyPolygon, sal_Int32 nClippingMode );
void IntersectClipRect( const Rectangle& rRect );