[Libreoffice-commits] core.git: include/vcl vcl/source
panoskorovesis (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jul 15 07:01:30 UTC 2021
include/vcl/filter/SvmReader.hxx | 1 +
include/vcl/metaact.hxx | 3 +++
vcl/source/filter/svm/SvmReader.cxx | 18 +++++++++++++++++-
3 files changed, 21 insertions(+), 1 deletion(-)
New commits:
commit eea6033404aebcba6f6473dda6c6d435bd31e831
Author: panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Wed Jul 14 22:57:10 2021 +0300
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Thu Jul 15 09:00:58 2021 +0200
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 at collabora.com>
diff --git a/include/vcl/filter/SvmReader.hxx b/include/vcl/filter/SvmReader.hxx
index 66ec96b1afce..ce35d15c8165 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -74,6 +74,7 @@ public:
rtl::Reference<MetaAction> ISectRegionClipRegionHandler();
rtl::Reference<MetaAction> MoveClipRegionHandler();
rtl::Reference<MetaAction> TextColorHandler();
+ rtl::Reference<MetaAction> TextFillColorHandler();
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index bfbd08c3b0d9..b1c1b42e1bbf 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -1397,7 +1397,10 @@ public:
MetaTextFillColorAction( const Color& rColor, bool bSet );
const Color& GetColor() const { return maColor; }
+ void SetColor(Color& rColor) { maColor = rColor; }
+ void SetSetting(bool bSet) { mbSet = bSet; }
bool IsSetting() const { return mbSet; }
+
};
class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaTextLineColorAction final : public MetaAction
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: */
More information about the Libreoffice-commits
mailing list