drawinglayer/source/tools/emfppen.cxx | 24 +++++++++++++++++++----- drawinglayer/source/tools/emfppen.hxx | 11 ++++++++++- 2 files changed, 29 insertions(+), 6 deletions(-)
New commits: commit 34b876e3cbef16505c4e1790e01f13ef5a07b42c Author: Chris Sherlock <chris.sherloc...@gmail.com> AuthorDate: Tue Dec 10 12:10:59 2019 +1100 Commit: Bartosz Kosiorek <gan...@poczta.onet.pl> CommitDate: Mon Dec 23 14:34:59 2019 +0100 drawinglayer: rename PenDataNonCenter to PenAlignment, use PenAlignmentToString Change-Id: I700f1b164e065b42928b05a4ead493c8ce2c57c2 Reviewed-on: https://gerrit.libreoffice.org/84838 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gan...@poczta.onet.pl> diff --git a/drawinglayer/source/tools/emfppen.cxx b/drawinglayer/source/tools/emfppen.cxx index a34cd2b5b5b4..d0fc763929fe 100644 --- a/drawinglayer/source/tools/emfppen.cxx +++ b/drawinglayer/source/tools/emfppen.cxx @@ -20,6 +20,7 @@ #include <com/sun/star/rendering/PathCapType.hpp> #include <com/sun/star/rendering/PathJoinType.hpp> #include <sal/log.hxx> + #include "emfppen.hxx" #include "emfpcustomlinecap.hxx" @@ -41,7 +42,7 @@ namespace emfplushelper PenDataDashedLineCap = 0x00000040, PenDataDashedLineOffset = 0x00000080, PenDataDashedLine = 0x00000100, - PenDataNonCenter = 0x00000200, + PenDataAlignment = 0x00000200, PenDataCompoundLine = 0x00000400, PenDataCustomStartCap = 0x00000800, PenDataCustomEndCap = 0x00001000 @@ -102,8 +103,8 @@ namespace emfplushelper if (flags & EmfPlusPenDataDashedLine) sFlags = sFlags.concat("\nEMF+\t\t\tEmfPlusPenDataDashedLine"); - if (flags & EmfPlusPenDataNonCenter) - sFlags = sFlags.concat("\nEMF+\t\t\tEmfPlusPenDataNonCenter"); + if (flags & EmfPlusPenDataAlignment) + sFlags = sFlags.concat("\nEMF+\t\t\tEmfPlusPenDataAlignment"); if (flags & EmfPlusPenDataCompoundLine) sFlags = sFlags.concat("\nEMF+\t\t\tEmfPlusPenDataCompoundLine"); @@ -159,6 +160,19 @@ namespace emfplushelper return ""; } + static OUString PenAlignmentToString(sal_uInt32 penalignment) + { + switch (penalignment) + { + case PenAlignmentCenter: return "PenAlignmentCenter"; + case PenAlignmentInset: return "PenAlignmentInset"; + case PenAlignmentLeft: return "PenAlignmentLeft"; + case PenAlignmentOutset: return "PenAlignmentOutset"; + case PenAlignmentRight: return "PenAlignmentRight"; + } + return ""; + } + /// Convert stroke caps between EMF+ and rendering API sal_Int8 EMFPPen::lcl_convertStrokeCap(sal_uInt32 nEmfStroke) { @@ -305,10 +319,10 @@ namespace emfplushelper } } - if (penDataFlags & PenDataNonCenter) + if (penDataFlags & PenDataAlignment) { s.ReadInt32(alignment); - SAL_WARN("drawinglayer", "EMF+\t\t TODO PenDataNonCenter: 0x" << std::hex << alignment); + SAL_WARN("drawinglayer", "EMF+\t\tTODO PenDataAlignment: " << PenAlignmentToString(alignment) << " (0x" << std::hex << alignment << ")"); } else { diff --git a/drawinglayer/source/tools/emfppen.hxx b/drawinglayer/source/tools/emfppen.hxx index 16884cb1ca54..72ec12a2bed4 100644 --- a/drawinglayer/source/tools/emfppen.hxx +++ b/drawinglayer/source/tools/emfppen.hxx @@ -49,7 +49,7 @@ namespace emfplushelper const sal_uInt32 EmfPlusPenDataDashedLineCap = 0x00000040; const sal_uInt32 EmfPlusPenDataDashedLineOffset = 0x00000080; const sal_uInt32 EmfPlusPenDataDashedLine = 0x00000100; - const sal_uInt32 EmfPlusPenDataNonCenter = 0x00000200; + const sal_uInt32 EmfPlusPenDataAlignment = 0x00000200; const sal_uInt32 EmfPlusPenDataCompoundLine = 0x00000400; const sal_uInt32 EmfPlusPenDataCustomStartCap = 0x00000800; const sal_uInt32 EmfPlusPenDataCustomEndCap = 0x000001000; @@ -84,6 +84,15 @@ namespace emfplushelper DashedLineCapTypeTriangle = 0x00000003 }; + enum PenAlignment + { + PenAlignmentCenter = 0x00000000, + PenAlignmentInset = 0x00000001, + PenAlignmentLeft = 0x00000002, + PenAlignmentOutset = 0x00000003, + PenAlignmentRight = 0x00000004 + }; + struct EMFPCustomLineCap; struct EMFPPen : public EMFPBrush _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits