[Libreoffice-commits] core.git: drawinglayer/source
Chris Sherlock (via logerrit)
logerrit at kemper.freedesktop.org
Sun Dec 22 09:23:12 UTC 2019
drawinglayer/source/tools/emfppen.cxx | 23 +++++++++++++++++++++--
drawinglayer/source/tools/emfppen.hxx | 15 +++++++++++++++
2 files changed, 36 insertions(+), 2 deletions(-)
New commits:
commit 2d5442dd1181ad0d261fe642a483383df6500848
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
AuthorDate: Tue Dec 10 11:24:16 2019 +1100
Commit: Bartosz Kosiorek <gang65 at poczta.onet.pl>
CommitDate: Sun Dec 22 10:22:29 2019 +0100
drawinglayer: improve logging - LineCapTypeToString()
Change-Id: If8314cab56a44b6045501490ed027f8c88bd6619
Reviewed-on: https://gerrit.libreoffice.org/84834
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65 at poczta.onet.pl>
diff --git a/drawinglayer/source/tools/emfppen.cxx b/drawinglayer/source/tools/emfppen.cxx
index fa0ea00d503d..14d1951c9fa9 100644
--- a/drawinglayer/source/tools/emfppen.cxx
+++ b/drawinglayer/source/tools/emfppen.cxx
@@ -117,6 +117,25 @@ namespace emfplushelper
return sFlags;
}
+ static OUString LineCapTypeToString(sal_uInt32 linecap)
+ {
+ switch (linecap)
+ {
+ case LineCapTypeFlat: return "LineCapTypeFlat";
+ case LineCapTypeSquare: return "LineCapTypeSquare";
+ case LineCapTypeRound: return "LineCapTypeRound";
+ case LineCapTypeTriangle: return "LineCapTypeTriangle";
+ case LineCapTypeNoAnchor: return "LineCapTypeNoAnchor";
+ case LineCapTypeSquareAnchor: return "LineCapTypeSquareAnchor";
+ case LineCapTypeRoundAnchor: return "LineCapTypeRoundAchor";
+ case LineCapTypeDiamondAnchor: return "LineCapTypeDiamondAnchor";
+ case LineCapTypeArrowAnchor: return "LineCapTypeArrowAnchor";
+ case LineCapTypeAnchorMask: return "LineCapTypeAnchorMask";
+ case LineCapTypeCustom: return "LineCapTypeCustom";
+ }
+ return "";
+ }
+
/// Convert stroke caps between EMF+ and rendering API
sal_Int8 EMFPPen::lcl_convertStrokeCap(sal_uInt32 nEmfStroke)
{
@@ -174,7 +193,7 @@ namespace emfplushelper
if (penDataFlags & PenDataStartCap)
{
s.ReadInt32(startCap);
- SAL_INFO("drawinglayer", "EMF+\t\tstartCap: 0x" << std::hex << startCap);
+ SAL_INFO("drawinglayer", "EMF+\t\tstartCap: " << LineCapTypeToString(startCap) << " (0x" << std::hex << startCap << ")");
}
else
{
@@ -184,7 +203,7 @@ namespace emfplushelper
if (penDataFlags & PenDataEndCap)
{
s.ReadInt32(endCap);
- SAL_INFO("drawinglayer", "EMF+\t\tendCap: 0x" << std::hex << endCap);
+ SAL_INFO("drawinglayer", "EMF+\t\tendCap: " << LineCapTypeToString(endCap) << " (0x" << std::hex << startCap << ")");
}
else
{
diff --git a/drawinglayer/source/tools/emfppen.hxx b/drawinglayer/source/tools/emfppen.hxx
index ecc6f1c83dc3..7f255fd7b172 100644
--- a/drawinglayer/source/tools/emfppen.hxx
+++ b/drawinglayer/source/tools/emfppen.hxx
@@ -54,6 +54,21 @@ namespace emfplushelper
const sal_uInt32 EmfPlusPenDataCustomStartCap = 0x00000800;
const sal_uInt32 EmfPlusPenDataCustomEndCap = 0x000001000;
+ enum LineCapType
+ {
+ LineCapTypeFlat = 0x00000000,
+ LineCapTypeSquare = 0x00000001,
+ LineCapTypeRound = 0x00000002,
+ LineCapTypeTriangle = 0x00000003,
+ LineCapTypeNoAnchor = 0x00000010,
+ LineCapTypeSquareAnchor = 0x00000011,
+ LineCapTypeRoundAnchor = 0x00000012,
+ LineCapTypeDiamondAnchor = 0x00000013,
+ LineCapTypeArrowAnchor = 0x00000014,
+ LineCapTypeAnchorMask = 0x000000F0,
+ LineCapTypeCustom = 0x000000FF
+ };
+
struct EMFPCustomLineCap;
struct EMFPPen : public EMFPBrush
More information about the Libreoffice-commits
mailing list