summaryrefslogtreecommitdiff
path: root/basebmp
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-10-29 14:11:45 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-10-31 15:56:14 +0000
commit223f6b631c1b087754c0f9051fb55f029f2503ce (patch)
tree14582be2894a88d16c6b0debbc8491350f9a5cce /basebmp
parent9069e26d1fe1fbbe7bceab0bae8a186d8cdb47cc (diff)
Resolves: #i123433# Detect pseudo-vertices at svg import...
unify svg:d handling, correct svg:d import for relative sub-polygons in svg import; changed default for moveto writes for svg:d in ODF to absolute (cherry picked from commit f15874d8f976f3874bdbcb53429eeefa65c28841) Conflicts: basegfx/inc/basegfx/polygon/b2dpolygontools.hxx basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx basegfx/inc/basegfx/polygon/b3dpolypolygontools.hxx basegfx/source/polygon/b2dpolypolygontools.cxx basegfx/source/polygon/b2dsvgpolypolygon.cxx basegfx/source/polygon/b3dpolypolygontools.cxx basegfx/source/tools/makefile.mk basegfx/test/boxclipper.cxx basegfx/test/clipstate.cxx basegfx/test/genericclipper.cxx canvas/source/tools/surfaceproxy.cxx sdext/source/pdfimport/tree/drawtreevisiting.cxx sdext/source/pdfimport/tree/writertreevisiting.cxx xmloff/inc/xexptran.hxx xmloff/source/draw/XMLImageMapContext.cxx xmloff/source/draw/XMLImageMapExport.cxx xmloff/source/draw/shapeexport2.cxx xmloff/source/draw/shapeexport3.cxx xmloff/source/draw/xexptran.cxx xmloff/source/draw/ximp3dobject.cxx xmloff/source/draw/ximpshap.cxx xmloff/source/style/MarkerStyle.cxx xmloff/source/text/XMLTextFrameContext.cxx xmloff/source/text/txtparae.cxx Change-Id: I5171b4a3559ea116bea45152e1f2685666463635
Diffstat (limited to 'basebmp')
-rw-r--r--basebmp/CppunitTest_basebmp.mk2
-rw-r--r--basebmp/test/bmpmasktest.cxx4
-rw-r--r--basebmp/test/bmptest.cxx2
-rw-r--r--basebmp/test/cliptest.cxx4
-rw-r--r--basebmp/test/filltest.cxx2
-rw-r--r--basebmp/test/masktest.cxx2
-rw-r--r--basebmp/test/polytest.cxx22
7 files changed, 22 insertions, 16 deletions
diff --git a/basebmp/CppunitTest_basebmp.mk b/basebmp/CppunitTest_basebmp.mk
index 67113ff0d874..c2ffb5f7d5b6 100644
--- a/basebmp/CppunitTest_basebmp.mk
+++ b/basebmp/CppunitTest_basebmp.mk
@@ -9,6 +9,8 @@
$(eval $(call gb_CppunitTest_CppunitTest,basebmp_cpputest))
+$(eval $(call gb_CppunitTest_use_sdk_api,basebmp_cpputest))
+
$(eval $(call gb_CppunitTest_use_external,basebmp_cpputest,boost_headers))
$(eval $(call gb_CppunitTest_use_libraries,basebmp_cpputest,\
diff --git a/basebmp/test/bmpmasktest.cxx b/basebmp/test/bmpmasktest.cxx
index d98fb6209606..a0209dfabfd6 100644
--- a/basebmp/test/bmpmasktest.cxx
+++ b/basebmp/test/bmpmasktest.cxx
@@ -112,7 +112,7 @@ public:
OUString aSvg( "m 0 0h5v10h5v-5h-10z" );
basegfx::B2DPolyPolygon aPoly;
- basegfx::tools::importFromSvgD( aPoly, aSvg );
+ basegfx::tools::importFromSvgD( aPoly, aSvg, false, NULL );
const Color aColWhite(0xFFFFFFFF);
const Color aColBlack(0);
mpBmp1bpp->fillPolyPolygon(
@@ -127,7 +127,7 @@ public:
aSvg = "m 0 0 h6 v10 h-6z" ;
aPoly.clear();
- basegfx::tools::importFromSvgD( aPoly, aSvg );
+ basegfx::tools::importFromSvgD( aPoly, aSvg, false, NULL );
mpMaskBmp1bpp->clear(aColWhite);
mpMaskBmp1bpp->fillPolyPolygon(
aPoly,
diff --git a/basebmp/test/bmptest.cxx b/basebmp/test/bmptest.cxx
index 59adac5feeae..e364804a391e 100644
--- a/basebmp/test/bmptest.cxx
+++ b/basebmp/test/bmptest.cxx
@@ -165,7 +165,7 @@ public:
OUString aSvg( "m 0 0h5v10h5v-5h-10z" );
basegfx::B2DPolyPolygon aPoly;
- basegfx::tools::importFromSvgD( aPoly, aSvg );
+ basegfx::tools::importFromSvgD( aPoly, aSvg, false, NULL );
const Color aCol(0xFFFFFFFF);
mpBmp1bpp->fillPolyPolygon(
aPoly,
diff --git a/basebmp/test/cliptest.cxx b/basebmp/test/cliptest.cxx
index cc1dbb0ce384..bcde756adeee 100644
--- a/basebmp/test/cliptest.cxx
+++ b/basebmp/test/cliptest.cxx
@@ -161,7 +161,7 @@ private:
OUString aSvg( "m 0 0h5v10h5v-5h-10z" );
basegfx::B2DPolyPolygon aPoly;
- basegfx::tools::importFromSvgD( aPoly, aSvg );
+ basegfx::tools::importFromSvgD( aPoly, aSvg, false, NULL );
const basebmp::Color aCol(0xFF);
pBmp->clear( basebmp::Color(0) );
pBmp->fillPolyPolygon(
@@ -200,7 +200,7 @@ public:
OUString aSvg( "m 0 0 h5 l5 5 v5 h-5 l-5-5 z" );
basegfx::B2DPolyPolygon aPoly;
- basegfx::tools::importFromSvgD( aPoly, aSvg );
+ basegfx::tools::importFromSvgD( aPoly, aSvg, false, NULL );
mpClipMask->clear(Color(0));
mpClipMask->drawPolygon(
aPoly.getB2DPolygon(0),
diff --git a/basebmp/test/filltest.cxx b/basebmp/test/filltest.cxx
index 6c0079583cd5..3adf26a0a97c 100644
--- a/basebmp/test/filltest.cxx
+++ b/basebmp/test/filltest.cxx
@@ -149,7 +149,7 @@ private:
OUString aSvg( "m 0 0l7 7h-1z" );
basegfx::B2DPolyPolygon aPoly;
- basegfx::tools::importFromSvgD( aPoly, aSvg );
+ basegfx::tools::importFromSvgD( aPoly, aSvg, false, NULL );
rDevice->fillPolyPolygon(
aPoly,
aCol,
diff --git a/basebmp/test/masktest.cxx b/basebmp/test/masktest.cxx
index bdc870d28193..1662c81f9b98 100644
--- a/basebmp/test/masktest.cxx
+++ b/basebmp/test/masktest.cxx
@@ -116,7 +116,7 @@ public:
OUString aSvg( "m 0 0h5v10h5v-5h-10z" );
basegfx::B2DPolyPolygon aPoly;
- basegfx::tools::importFromSvgD( aPoly, aSvg );
+ basegfx::tools::importFromSvgD( aPoly, aSvg, false, NULL );
const Color aCol(0xFF);
mpMask->fillPolyPolygon(
aPoly,
diff --git a/basebmp/test/polytest.cxx b/basebmp/test/polytest.cxx
index a32d099c3834..3ed416b1dfef 100644
--- a/basebmp/test/polytest.cxx
+++ b/basebmp/test/polytest.cxx
@@ -54,7 +54,7 @@ private:
basegfx::tools::importFromSvgD(
aPoly,
- OUString( "M2 2 l7 7 z" ) );
+ OUString( "M2 2 l7 7 z" ), false, NULL );
rDevice->fillPolyPolygon(
aPoly,
aCol,
@@ -68,7 +68,7 @@ private:
aPoly.clear();
basegfx::tools::importFromSvgD(
aPoly,
- OUString( "M7 2 l-6 6 z" ) );
+ OUString( "M7 2 l-6 6 z" ), false, NULL );
rDevice->fillPolyPolygon(
aPoly,
aCol,
@@ -86,7 +86,7 @@ private:
basegfx::tools::importFromSvgD(
aPoly,
- OUString( "M2 2 h1 l7 7 h-1 z" ) );
+ OUString( "M2 2 h1 l7 7 h-1 z" ), false, NULL );
rDevice->fillPolyPolygon(
aPoly,
aCol,
@@ -100,7 +100,7 @@ private:
aPoly.clear();
basegfx::tools::importFromSvgD(
aPoly,
- OUString( "M7 2 h-1 l-6 6 h1 z" ) );
+ OUString( "M7 2 h-1 l-6 6 h1 z" ), false, NULL );
rDevice->fillPolyPolygon(
aPoly,
aCol,
@@ -114,7 +114,7 @@ private:
aPoly.clear();
basegfx::tools::importFromSvgD(
aPoly,
- OUString( "M0 0 l7 7 h-1 l-5-7 z" ) );
+ OUString( "M0 0 l7 7 h-1 l-5-7 z" ), false, NULL );
rDevice->fillPolyPolygon(
aPoly,
aCol,
@@ -131,7 +131,8 @@ private:
basegfx::B2DPolyPolygon aPoly;
basegfx::tools::importFromSvgD( aPoly,
- OUString( "M0 0 h7 v7 h-7 z M2 2 v3 h3 v-3 z" ) );
+ OUString( "M0 0 h7 v7 h-7 z M2 2 v3 h3 v-3 z" ),
+ false, NULL );
rDevice->fillPolyPolygon(
aPoly,
@@ -149,7 +150,8 @@ private:
basegfx::B2DPolyPolygon aPoly;
basegfx::tools::importFromSvgD( aPoly,
- OUString( "M0 0 h7 v7 h-7 z M2 2 v3 h3 v-3 z" ) );
+ OUString( "M0 0 h7 v7 h-7 z M2 2 v3 h3 v-3 z" ),
+ false, NULL );
basegfx::B2DHomMatrix aMat;
aMat.translate(-3,-3);
aMat.rotate( 1.7 );
@@ -249,7 +251,8 @@ private:
// *all* of the four two-pixel lines in that polygon do *not*
// generate a single pixel, due to the rasterization effect.
basegfx::tools::importFromSvgD( aPoly,
- OUString( "M2 3 l1 -1 M4 2 l1 1 M2 8 l1 1 M5 8 l-1 1 M2 5 h4 M3 0 v10" ) );
+ OUString( "M2 3 l1 -1 M4 2 l1 1 M2 8 l1 1 M5 8 l-1 1 M2 5 h4 M3 0 v10" ),
+ false, NULL );
BitmapDeviceSharedPtr pClippedDevice=(
subsetBitmapDevice( rDevice,
basegfx::B2IBox(3,3,5,9) ));
@@ -276,7 +279,8 @@ private:
"M10 6 v-2 l-10 2 v2 z"
"M1 0 h1 v10 h-1 z"
"M4 0 h1 v10 h-1 z"
- "M8 0 h1 v10 h-1 z" ) );
+ "M8 0 h1 v10 h-1 z" ),
+ false, NULL );
rDevice->fillPolyPolygon(
aPoly,
aCol,