[Libreoffice-commits] core.git: Branch 'feature/emfplusprimitiveparser' - drawinglayer/source emfio/source

Armin Le Grand Armin.Le.Grand at cib.de
Fri Jun 23 19:51:10 UTC 2017


Rebased ref, commits from common ancestor:
commit 245a46cdb444e568de37ffb44d0d72e9e6f74233
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date:   Fri Jun 23 14:02:38 2017 +0200

    emfplus: more corrections due to linux build
    
    Change-Id: Ib2c3bff23043638d315405b5a91b2596e92f7ffa

diff --git a/drawinglayer/source/tools/emfpbrush.cxx b/drawinglayer/source/tools/emfpbrush.cxx
index d55a16ad30d7..19b1441ddb1d 100644
--- a/drawinglayer/source/tools/emfpbrush.cxx
+++ b/drawinglayer/source/tools/emfpbrush.cxx
@@ -211,7 +211,7 @@ namespace emfplushelper
                 if (additionalFlags & 0x02)
                 {
                     SAL_INFO("cppcanvas.emf", "EMF+\tuse transformation");
-                    rR.readXForm(s, brush_transformation);
+                    EmfPlusHelperData::readXForm(s, brush_transformation);
                     hasTransformation = true;
                     SAL_INFO("cppcanvas.emf",
                                 "EMF+\tm11: " << brush_transformation.get(0,0) << " m12: " << brush_transformation.get(1,0) <<
@@ -297,7 +297,7 @@ namespace emfplushelper
                 if (additionalFlags & 0x02)
                 {
                     SAL_INFO("cppcanvas.emf", "EMF+\tuse transformation");
-                    rR.readXForm(s, brush_transformation);
+                    EmfPlusHelperData::readXForm(s, brush_transformation);
                     hasTransformation = true;
                     SAL_INFO("cppcanvas.emf",
                         "EMF+\tm11: " << brush_transformation.get(0,0) << " m12: " << brush_transformation.get(1,0) <<
diff --git a/drawinglayer/source/tools/emfphelperdata.hxx b/drawinglayer/source/tools/emfphelperdata.hxx
index 67f423436fa4..21f5dcdddabd 100644
--- a/drawinglayer/source/tools/emfphelperdata.hxx
+++ b/drawinglayer/source/tools/emfphelperdata.hxx
@@ -223,7 +223,7 @@ namespace emfplushelper
 
         // readers
         void processObjectRecord(SvMemoryStream& rObjectStream, sal_uInt16 flags, sal_uInt32 dataSize, bool bUseWholeStream = false);
-        void ReadPoint(SvStream& s, float& x, float& y, sal_uInt32 flags);
+        static void ReadPoint(SvStream& s, float& x, float& y, sal_uInt32 flags);
 
         // internal mapper
         void mappingChanged();
@@ -248,8 +248,8 @@ namespace emfplushelper
         ::basegfx::B2DSize MapSize(double iwidth, double iheight);
 
         // readers
-        void ReadRectangle(SvStream& s, float& x, float& y, float &width, float& height, bool bCompressed = false);
-        bool readXForm(SvStream& rIn, basegfx::B2DHomMatrix& rTarget);
+        static void ReadRectangle(SvStream& s, float& x, float& y, float &width, float& height, bool bCompressed = false);
+        static bool readXForm(SvStream& rIn, basegfx::B2DHomMatrix& rTarget);
     };
 }
 
diff --git a/drawinglayer/source/tools/emfppen.cxx b/drawinglayer/source/tools/emfppen.cxx
index 851518b486f5..cb8bbf4cb8d5 100644
--- a/drawinglayer/source/tools/emfppen.cxx
+++ b/drawinglayer/source/tools/emfppen.cxx
@@ -184,7 +184,7 @@ namespace emfplushelper
 
         if (penDataFlags & PenDataTransform)
         {
-            rR.readXForm(s, pen_transformation);
+            EmfPlusHelperData::readXForm(s, pen_transformation);
         }
 
         if (penDataFlags & PenDataStartCap)
diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx
index 243b84fb7395..9e36a9afe113 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -454,6 +454,17 @@ namespace emfio
         mpInputStream->SeekRel(nRemainder);
     }
 
+    // these are referenced from inside the templates
+    SvStream& operator >> (SvStream& rStream, sal_Int16 &n)
+    {
+        return rStream.ReadInt16(n);
+    }
+
+    SvStream& operator >> (SvStream& rStream, sal_Int32 &n)
+    {
+        return rStream.ReadInt32(n);
+    }
+
     /**
      * Reads polygons from the stream.
      * The \<class T> parameter is for the type of the points (sal_uInt32 or sal_uInt16).
@@ -542,18 +553,6 @@ namespace emfio
         }
     }
 
-    // these are referenced from inside the templates
-
-    SvStream& operator>>(SvStream& rStream, sal_Int16 &n)
-    {
-        return rStream.ReadInt16(n);
-    }
-
-    SvStream& operator>>(SvStream& rStream, sal_Int32 &n)
-    {
-        return rStream.ReadInt32(n);
-    }
-
     /**
      * Reads a poly polygon from the WMF file and draws it.
      * The \<class T> parameter refers to the type of the points. (e.g. sal_uInt16 or sal_uInt32)
diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx
index 9cbe518d7e28..61f61abb4b84 100644
--- a/emfio/source/reader/wmfreader.cxx
+++ b/emfio/source/reader/wmfreader.cxx
@@ -114,7 +114,7 @@
 
 namespace
 {
-    static void GetWinExtMax(const Point& rSource, tools::Rectangle& rPlaceableBound, const sal_Int16 nMapMode)
+    void GetWinExtMax(const Point& rSource, tools::Rectangle& rPlaceableBound, const sal_Int16 nMapMode)
     {
         Point aSource(rSource);
         if (nMapMode == MM_HIMETRIC)
@@ -129,7 +129,7 @@ namespace
             rPlaceableBound.Bottom() = aSource.Y();
     }
 
-    static void GetWinExtMax(const tools::Rectangle& rSource, tools::Rectangle& rPlaceableBound, const sal_Int16 nMapMode)
+    void GetWinExtMax(const tools::Rectangle& rSource, tools::Rectangle& rPlaceableBound, const sal_Int16 nMapMode)
     {
         GetWinExtMax(rSource.TopLeft(), rPlaceableBound, nMapMode);
         GetWinExtMax(rSource.BottomRight(), rPlaceableBound, nMapMode);


More information about the Libreoffice-commits mailing list