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

Chris Sherlock (via logerrit) logerrit at kemper.freedesktop.org
Fri Dec 20 07:44:42 UTC 2019


 drawinglayer/source/tools/emfphelperdata.cxx |   20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

New commits:
commit 2d46f14fa0ef555069795bd4e889b6871e7ce943
Author:     Chris Sherlock <chris.sherlock79 at gmail.com>
AuthorDate: Tue Dec 10 18:04:59 2019 +1100
Commit:     Bartosz Kosiorek <gang65 at poczta.onet.pl>
CommitDate: Fri Dec 20 08:43:36 2019 +0100

    drawinglayer: better logging for brushes in EmfPlusRecordTypeDrawString
    
    Change-Id: I8ac039fd81767a52593721f211f3887276230ccf
    Reviewed-on: https://gerrit.libreoffice.org/84841
    Tested-by: Jenkins
    Reviewed-by: Bartosz Kosiorek <gang65 at poczta.onet.pl>

diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx
index b7a0c893c7af..3dbb663a6f82 100644
--- a/drawinglayer/source/tools/emfphelperdata.cxx
+++ b/drawinglayer/source/tools/emfphelperdata.cxx
@@ -195,6 +195,23 @@ namespace emfplushelper
         return "";
     }
 
+    static bool IsBrush(sal_uInt16 flags)
+    {
+        return (!((flags >> 15) & 0x0001));
+    }
+
+    static OUString BrushIDToString(sal_uInt16 flags, sal_uInt32 brushid)
+    {
+        OUString sBrushId;
+
+        if (IsBrush(flags))
+            sBrushId = sBrushId.concat("EmfPlusBrush ID: ").concat(OUString::number(brushid));
+        else
+            sBrushId = sBrushId.concat("ARGB: 0x").concat(OUString::number(brushid, 16));
+
+        return sBrushId;
+    }
+
     EMFPObject::~EMFPObject()
     {
     }
@@ -1477,7 +1494,8 @@ namespace emfplushelper
                         sal_uInt32 formatId;
                         sal_uInt32 stringLength;
                         rMS.ReadUInt32(brushId).ReadUInt32(formatId).ReadUInt32(stringLength);
-                        SAL_INFO("drawinglayer", "EMF+\t DrawString brushId: " << brushId);
+                        SAL_INFO("drawinglayer", "EMF+\t FontId: " << OUString::number(flags & 0xFF));
+                        SAL_INFO("drawinglayer", "EMF+\t BrushId: " << BrushIDToString(flags, brushId));
                         SAL_INFO("drawinglayer", "EMF+\t FormatId: " << formatId);
                         SAL_INFO("drawinglayer", "EMF+\t Length: " << stringLength);
 


More information about the Libreoffice-commits mailing list