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

Bartosz Kosiorek gang65 at poczta.onet.pl
Sat Oct 28 02:12:11 UTC 2017


 drawinglayer/source/tools/emfphelperdata.cxx |   18 ++++++++++++++++++
 drawinglayer/source/tools/emfphelperdata.hxx |    2 +-
 2 files changed, 19 insertions(+), 1 deletion(-)

New commits:
commit 9270e6ad00b75eb35cae71998642a7c306eb4d03
Author: Bartosz Kosiorek <gang65 at poczta.onet.pl>
Date:   Thu Oct 26 01:28:51 2017 +0200

    tdf#106084 EMF+ Add support for RotateWorldTransform record
    
    Change-Id: If5ce156b7d60d30be8451902beb8330b7177b26e
    Reviewed-on: https://gerrit.libreoffice.org/43858
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx
index 79ce930a5358..ad67d6994d06 100644
--- a/drawinglayer/source/tools/emfphelperdata.cxx
+++ b/drawinglayer/source/tools/emfphelperdata.cxx
@@ -1440,6 +1440,24 @@ namespace emfplushelper
                             "EMF+\t dx: " << maWorldTransform.get(2, 0) << ", dy: " << maWorldTransform.get(2, 1));
                         break;
                     }
+                    case EmfPlusRecordTypeRotateWorldTransform:
+                    {
+                        // Angle of rotation in degrees
+                        float eAngle;
+                        rMS.ReadFloat(eAngle);
+
+                        SAL_INFO("cppcanvas.emf", "EMF+ EmfPlusRecordTypeRotateWorldTransform Angle: " << eAngle);
+
+                        // Skipping flags & 0x2000
+                        // For rotation transformation there is no difference between post and pre multiply
+                        maWorldTransform.rotate(eAngle * F_PI180);
+
+                        mappingChanged();
+
+                        SAL_INFO("cppcanvas.emf",
+                                "EMF+\t " << maWorldTransform);
+                        break;
+                    }
                     case EmfPlusRecordTypeSetClipRect:
                     {
                         int combineMode = (flags >> 8) & 0xf;
diff --git a/drawinglayer/source/tools/emfphelperdata.hxx b/drawinglayer/source/tools/emfphelperdata.hxx
index 99ef9964b945..082ad1ae4c69 100644
--- a/drawinglayer/source/tools/emfphelperdata.hxx
+++ b/drawinglayer/source/tools/emfphelperdata.hxx
@@ -80,7 +80,7 @@ namespace emfplushelper
     #define EmfPlusRecordTypeMultiplyWorldTransform 0x402C
     #define EmfPlusRecordTypeTranslateWorldTransform 0x402D
     #define EmfPlusRecordTypeScaleWorldTransform 0x402E
-    //TODO EmfPlusRecordTypeRotateWorldTransform 0x402F
+    #define EmfPlusRecordTypeRotateWorldTransform 0x402F
     #define EmfPlusRecordTypeSetPageTransform 0x4030
     //TODO EmfPlusRecordTypeResetClip 0x4031
     #define EmfPlusRecordTypeSetClipRect 0x4032


More information about the Libreoffice-commits mailing list