[Libreoffice-commits] core.git: include/vcl vcl/source
panoskorovesis (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jul 15 11:27:13 UTC 2021
include/vcl/filter/SvmReader.hxx | 1 +
include/vcl/metaact.hxx | 2 ++
vcl/source/filter/svm/SvmReader.cxx | 18 +++++++++++++++++-
3 files changed, 20 insertions(+), 1 deletion(-)
New commits:
commit f07e428f76c3498583cf4870e96a3b759bcc364c
Author: panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Wed Jul 14 23:20:05 2021 +0300
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Thu Jul 15 13:26:40 2021 +0200
Add Handler for OverlineColor Read
The handler separates MetaOverlineColorAction::Read from metaact.hxx
Read implementation is now in SvmReader.hxx
Change-Id: I3d713e7579e45efd49249425108b74ca1d54eb0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118957
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 c9439ecb6c06..cda79e0a9045 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -76,6 +76,7 @@ public:
rtl::Reference<MetaAction> TextColorHandler();
rtl::Reference<MetaAction> TextFillColorHandler();
rtl::Reference<MetaAction> TextLineColorHandler();
+ rtl::Reference<MetaAction> OverlineColorHandler();
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 81adb9c0cd1a..4fd9b39d98bb 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -1456,6 +1456,8 @@ public:
MetaOverlineColorAction( const Color& rColor, bool bSet );
const Color& GetColor() const { return maColor; }
+ void SetColor(const Color& rColor) { maColor = rColor; }
+ void SetSetting(bool bSet) { mbSet = bSet; }
bool IsSetting() const { return mbSet; }
};
diff --git a/vcl/source/filter/svm/SvmReader.cxx b/vcl/source/filter/svm/SvmReader.cxx
index 663fd3955c30..29f2e5516681 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -277,7 +277,7 @@ rtl::Reference<MetaAction> SvmReader::MetaActionHandler(ImplMetaReadData* pData)
return TextLineColorHandler();
break;
case MetaActionType::OVERLINECOLOR:
- pAction = new MetaOverlineColorAction;
+ return OverlineColorHandler();
break;
case MetaActionType::TEXTALIGN:
pAction = new MetaTextAlignAction;
@@ -1199,4 +1199,20 @@ rtl::Reference<MetaAction> SvmReader::TextLineColorHandler()
return pAction;
}
+
+rtl::Reference<MetaAction> SvmReader::OverlineColorHandler()
+{
+ auto pAction = new MetaOverlineColorAction();
+
+ 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