Kaydet (Commit) 144416c4 authored tarafından Mark Hung's avatar Mark Hung

tdf#43671 creatCanvasFont with EmphasisMark.

Change-Id: I8c7592e9bdb212fcbb07655e81faadd07ed880f7
Reviewed-on: https://gerrit.libreoffice.org/62244
Tested-by: Jenkins
Reviewed-by: 's avatarMark Hung <marklh9@gmail.com>
üst 4fa9e6f7
......@@ -57,7 +57,7 @@ namespace cppcanvas
mapModeTransform(),
fontRotation(0.0),
textEmphasisMarkStyle(FontEmphasisMark::NONE),
textEmphasisMark(FontEmphasisMark::NONE),
pushFlags(PushFlags::ALL),
textDirection(css::rendering::TextDirection::WEAK_LEFT_TO_RIGHT),
textAlignment(0), // TODO(Q2): Synchronize with implrenderer
......@@ -99,7 +99,7 @@ namespace cppcanvas
::basegfx::B2DHomMatrix mapModeTransform;
double fontRotation;
FontEmphasisMark textEmphasisMarkStyle;
FontEmphasisMark textEmphasisMark;
PushFlags pushFlags;
sal_Int8 textDirection;
sal_Int8 textAlignment;
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment