[Libreoffice-commits] .: 2 commits - cppcanvas/source svx/source
Radek DoulÃk
rodo at kemper.freedesktop.org
Mon Nov 28 01:24:39 PST 2011
cppcanvas/source/mtfrenderer/emfplus.cxx | 23 ++++++++++++++++++++++
svx/source/customshapes/EnhancedCustomShape2d.cxx | 1
2 files changed, 24 insertions(+)
New commits:
commit c08d55eccc1b2e26d8d0408d70654751e8672fa7
Author: Radek Doulik <rodo at novell.com>
Date: Fri Nov 25 16:12:42 2011 +0100
make sure the bOOXMLShape flag is initialized
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 8e25997..12fb3e4 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -694,6 +694,7 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) :
nCoordTop ( 0 ),
nCoordWidth ( 21600 ),
nCoordHeight ( 21600 ),
+ bOOXMLShape ( sal_False ),
nXRef ( 0x80000000 ),
nYRef ( 0x80000000 ),
nFlags ( 0 ),
commit d169860411a7fea060079d8ca27797b10af44732
Author: Radek Doulik <rodo at novell.com>
Date: Wed Nov 16 09:23:39 2011 +0100
more debug info for emf+ rendering - path
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index fe5a129..91c9560 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -207,6 +207,7 @@ namespace cppcanvas
if ((pPointTypes [i] & 0x07) == 3) {
if (((i - last_normal )% 3) == 1) {
polygon.setNextControlPoint (p - 1, mapped);
+ EMFP_DEBUG (printf ("polygon append next: %d mapped: %f,%f\n", p - 1, mapped.getX (), mapped.getY ()));
continue;
} else if (((i - last_normal) % 3) == 2) {
prev = mapped;
@@ -217,14 +218,17 @@ namespace cppcanvas
last_normal = i;
}
polygon.append (mapped);
+ EMFP_DEBUG (printf ("polygon append point: %f,%f mapped: %f,%f\n", pPoints [i*2], pPoints [i*2 + 1], mapped.getX (), mapped.getY ()));
if (hasPrev) {
polygon.setPrevControlPoint (p, prev);
+ EMFP_DEBUG (printf ("polygon append prev: %d mapped: %f,%f\n", p, prev.getX (), prev.getY ()));
hasPrev = false;
}
p ++;
if (pPointTypes && (pPointTypes [i] & 0x80)) { // closed polygon
polygon.setClosed (true);
aPolygon.append (polygon);
+ EMFP_DEBUG (printf ("close polygon\n"));
last_normal = i + 1;
p = 0;
polygon.clear ();
@@ -234,6 +238,25 @@ namespace cppcanvas
if (polygon.count ())
aPolygon.append (polygon);
+ EMFP_DEBUG (
+ for (unsigned int i=0; i<aPolygon.count(); i++) {
+ polygon = aPolygon.getB2DPolygon(i);
+ printf ("polygon: %d\n", i);
+ for (unsigned int j=0; j<polygon.count(); j++) {
+ ::basegfx::B2DPoint point = polygon.getB2DPoint(j);
+ printf ("point: %f,%f\n", point.getX(), point.getY());
+ if (polygon.isPrevControlPointUsed(j)) {
+ point = polygon.getPrevControlPoint(j);
+ printf ("prev: %f,%f\n", point.getX(), point.getY());
+ }
+ if (polygon.isNextControlPointUsed(j)) {
+ point = polygon.getNextControlPoint(j);
+ printf ("next: %f,%f\n", point.getX(), point.getY());
+ }
+ }
+ }
+ );
+
return aPolygon;
}
};
More information about the Libreoffice-commits
mailing list