summaryrefslogtreecommitdiff
path: root/cppcanvas/source/mtfrenderer
diff options
context:
space:
mode:
authorMark Hung <marklh9@gmail.com>2018-10-24 00:03:41 +0800
committerMark Hung <marklh9@gmail.com>2018-10-31 00:28:33 +0100
commit144416c428712b039927ff9d6b1eae05bc2c2478 (patch)
tree13021606ad165ff233a5212aa8f1c671c32d4cee /cppcanvas/source/mtfrenderer
parent4fa9e6f7f891b335ae1b432e0848c1e46c8fe3ef (diff)
tdf#43671 creatCanvasFont with EmphasisMark.
Change-Id: I8c7592e9bdb212fcbb07655e81faadd07ed880f7 Reviewed-on: https://gerrit.libreoffice.org/62244 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
Diffstat (limited to 'cppcanvas/source/mtfrenderer')
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 8108ffbb4564..237f69bf7af3 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -306,7 +306,7 @@ namespace cppcanvas
aCalculatedNewState.textOverlineStyle = rNewState.textOverlineStyle;
aCalculatedNewState.textUnderlineStyle = rNewState.textUnderlineStyle;
aCalculatedNewState.textStrikeoutStyle = rNewState.textStrikeoutStyle;
- aCalculatedNewState.textEmphasisMarkStyle = rNewState.textEmphasisMarkStyle;
+ aCalculatedNewState.textEmphasisMark = rNewState.textEmphasisMark;
aCalculatedNewState.isTextEffectShadowSet = rNewState.isTextEffectShadowSet;
aCalculatedNewState.isTextWordUnderlineSet = rNewState.isTextWordUnderlineSet;
aCalculatedNewState.isTextOutlineModeSet = rNewState.isTextOutlineModeSet;
@@ -840,6 +840,16 @@ namespace cppcanvas
}
aFontRequest.CellSize = (rState.mapModeTransform * vcl::unotools::b2DSizeFromSize(rFontSizeLog)).getY();
+ if (rFont.GetEmphasisMark() != FontEmphasisMark::NONE)
+ {
+ uno::Sequence< beans::PropertyValue > aProperties(1);
+ aProperties[0].Name = "EmphasisMark";
+ aProperties[0].Value <<= sal_uInt32(rFont.GetEmphasisMark());
+ return rParms.mrCanvas->getUNOCanvas()->createFont(aFontRequest,
+ aProperties,
+ aFontMatrix);
+ }
+
return rParms.mrCanvas->getUNOCanvas()->createFont( aFontRequest,
uno::Sequence< beans::PropertyValue >(),
aFontMatrix );
@@ -1488,7 +1498,7 @@ namespace cppcanvas
(*rParms.maFontUnderline ? sal_Int8(LINESTYLE_SINGLE) : sal_Int8(LINESTYLE_NONE)) :
static_cast<sal_Int8>(rFont.GetUnderline());
rState.textStrikeoutStyle = static_cast<sal_Int8>(rFont.GetStrikeout());
- rState.textEmphasisMarkStyle = rFont.GetEmphasisMark() & FontEmphasisMark::Style;
+ rState.textEmphasisMark = rFont.GetEmphasisMark();
rState.isTextEffectShadowSet = rFont.IsShadow();
rState.isTextWordUnderlineSet = rFont.IsWordLineMode();
rState.isTextOutlineModeSet = rFont.IsOutline();