summaryrefslogtreecommitdiff
path: root/cppcanvas/source/mtfrenderer
diff options
context:
space:
mode:
authorMark Hung <marklh9@gmail.com>2018-10-31 23:55:31 +0800
committerMark Hung <marklh9@gmail.com>2018-11-05 12:20:15 +0100
commit9709061a570a4867a4c5898ffed936b4b47ce90f (patch)
treee8a30cd3d44c544ef22b0d9a12b30ae1302411ee /cppcanvas/source/mtfrenderer
parent729af05280a5b1755f78eee4669e36e287048253 (diff)
tdf#37636 take care of MetaOverlineColorAction in mtfrenderer.
Keep the overline color in DevOutState so that it can be used in text actions later. Change-Id: Ia584de9b78e1adf6862c09fb50cbed1f16e2ad0b Reviewed-on: https://gerrit.libreoffice.org/62829 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
Diffstat (limited to 'cppcanvas/source/mtfrenderer')
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx25
1 files changed, 25 insertions, 0 deletions
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 237f69bf7af3..cee91bcd3853 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -356,6 +356,12 @@ namespace cppcanvas
aCalculatedNewState.isTextLineColorSet = rNewState.isTextLineColorSet;
}
+ if( aCalculatedNewState.pushFlags & PushFlags::OVERLINECOLOR )
+ {
+ aCalculatedNewState.textOverlineColor = rNewState.textOverlineColor;
+ aCalculatedNewState.isTextOverlineColorSet = rNewState.isTextOverlineColorSet;
+ }
+
if( aCalculatedNewState.pushFlags & PushFlags::TEXTLAYOUTMODE )
{
aCalculatedNewState.textAlignment = rNewState.textAlignment;
@@ -1473,6 +1479,22 @@ namespace cppcanvas
}
break;
+ case MetaActionType::OVERLINECOLOR:
+ if( !rParms.maTextColor.is_initialized() )
+ {
+ setStateColor( static_cast<MetaOverlineColorAction*>(pCurrAct),
+ rStates.getState().isTextOverlineColorSet,
+ rStates.getState().textOverlineColor,
+ rCanvas );
+ }
+ else
+ {
+ bool bSetting(static_cast<MetaOverlineColorAction*>(pCurrAct)->IsSetting());
+
+ rStates.getState().isTextOverlineColorSet = bSetting;
+ }
+ break;
+
case MetaActionType::TEXTALIGN:
{
::cppcanvas::internal::OutDevState& rState = rStates.getState();
@@ -2921,6 +2943,7 @@ namespace cppcanvas
// setup default text color to black
rState.textColor =
rState.textFillColor =
+ rState.textOverlineColor =
rState.textLineColor = tools::intSRGBAToDoubleSequence( 0x000000FF );
}
@@ -2941,9 +2964,11 @@ namespace cppcanvas
{
::cppcanvas::internal::OutDevState& rState = aStateStack.getState();
rState.isTextFillColorSet = true;
+ rState.isTextOverlineColorSet = true;
rState.isTextLineColorSet = true;
rState.textColor =
rState.textFillColor =
+ rState.textOverlineColor =
rState.textLineColor = tools::intSRGBAToDoubleSequence( *rParams.maTextColor );
}
if( rParams.maFontName.is_initialized() ||