[Libreoffice-commits] core.git: cppcanvas/source

Andrzej Hunt andrzej.hunt at collabora.com
Fri Dec 27 03:32:03 PST 2013


 cppcanvas/source/mtfrenderer/emfplus.cxx |   15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

New commits:
commit 793f14db156fab0c3e1ef2e19618ae7f8e01d758
Author: Andrzej Hunt <andrzej.hunt at collabora.com>
Date:   Thu Dec 26 19:41:57 2013 +0000

    EMF+: Add EMFPlusPointR detection to EMFPPath.
    
    Change-Id: Iff1ae9806ee05654762b313ed00ada206e51337f

diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 3d1e3ec..5bea4fc 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -167,18 +167,23 @@ namespace cppcanvas
             {
                 for (int i = 0; i < nPoints; i ++) {
                     if (pathFlags & 0x4000) {
-                        // points are stored in signed short 16bit integer format
+                        // EMFPlusPoint: stored in signed short 16bit integer format
                         sal_Int16 x, y;
 
                         s >> x >> y;
-                        SAL_INFO ("cppcanvas.emf", "EMF+\tpoint [x,y]: " << x << "," << y);
+                        SAL_INFO ("cppcanvas.emf", "EMF+\tEMFPlusPoint [x,y]: " << x << "," << y);
                         pPoints [i*2] = x;
                         pPoints [i*2 + 1] = y;
-                    } else {
-                        // points are stored in Single (float) format
+                    } else if (!(pathFlags & 0xC000)) {
+                        // EMFPlusPointF: stored in Single (float) format
                         s >> pPoints [i*2] >> pPoints [i*2 + 1];
-                        SAL_INFO ("cppcanvas.emf", "EMF+\tpoint [x,y]: " << pPoints [i*2] << "," << pPoints [i*2 + 1]);
+                        SAL_INFO ("cppcanvas.emf", "EMF+\tEMFPlusPointF [x,y]: " << pPoints [i*2] << "," << pPoints [i*2 + 1]);
+                    } else { //if (pathFlags & 0x8000)
+                        // EMFPlusPointR: points are stored in EMFPlusInteger7 or
+                        // EMFPlusInteger15 objects, see section 2.2.2.21/22
+                        SAL_INFO("cppcanvas.emf", "EMF+\t\tTODO - parse EMFPlusPointR object (section 2.2.1.6)");
                     }
+
                 }
 
                 if (pPointTypes)


More information about the Libreoffice-commits mailing list