summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorpanoskorovesis <panoskorovesis@outlook.com>2021-07-14 22:57:10 +0300
committerMiklos Vajna <vmiklos@collabora.com>2021-07-15 09:00:58 +0200
commiteea6033404aebcba6f6473dda6c6d435bd31e831 (patch)
tree6cbc9eeb834d96fe43e5e1018fa6a40d2d0413ee /vcl
parent892488b64f09190896d5a14e3f555ca91b3449e3 (diff)
Add Handler for TextFillColor Read
The handler separates MetaTextFillColorAction::Read from metaact.hxx Read implementation is now in SvmReader.hxx Change-Id: Ifbd9fc21090d02cf4acba48482089ccaa245ff91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118955 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/filter/svm/SvmReader.cxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/vcl/source/filter/svm/SvmReader.cxx b/vcl/source/filter/svm/SvmReader.cxx
index f8336068a0ac..2a0af4cd9441 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -271,7 +271,7 @@ rtl::Reference<MetaAction> SvmReader::MetaActionHandler(ImplMetaReadData* pData)
return TextColorHandler();
break;
case MetaActionType::TEXTFILLCOLOR:
- pAction = new MetaTextFillColorAction;
+ return TextFillColorHandler();
break;
case MetaActionType::TEXTLINECOLOR:
pAction = new MetaTextLineColorAction;
@@ -1167,4 +1167,20 @@ rtl::Reference<MetaAction> SvmReader::TextColorHandler()
return pAction;
}
+
+rtl::Reference<MetaAction> SvmReader::TextFillColorHandler()
+{
+ auto pAction = new MetaTextFillColorAction();
+
+ VersionCompatRead aCompat(mrStream);
+ Color aColor;
+ ReadColor(aColor);
+ bool bSet;
+ mrStream.ReadCharAsBool(bSet);
+
+ pAction->SetColor(aColor);
+ pAction->SetSetting(bSet);
+
+ return pAction;
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */