[Libreoffice-commits] core.git: include/vcl vcl/source
panoskorovesis (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jul 19 08:00:49 UTC 2021
include/vcl/filter/SvmReader.hxx | 1 +
include/vcl/metaact.hxx | 1 +
vcl/source/filter/svm/SvmReader.cxx | 16 +++++++++++++++-
3 files changed, 17 insertions(+), 1 deletion(-)
New commits:
commit a452a9180e5cdecf6fe4cb59c8658e11640bbb6e
Author: panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Thu Jul 15 09:56:55 2021 +0300
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Jul 19 10:00:16 2021 +0200
Add Handler for MapMode Read
The handler separates MetaMapModeAction::Read from metaact.hxx
Read implementation is now in SvmReader.hxx
Change-Id: I514fc1927705ae0e2ca870ad39af845e3d9285cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118968
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 aab715edd408..60d60dacedf4 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -78,6 +78,7 @@ public:
rtl::Reference<MetaAction> TextLineColorHandler();
rtl::Reference<MetaAction> OverlineColorHandler();
rtl::Reference<MetaAction> TextAlignHandler();
+ rtl::Reference<MetaAction> MapModeHandler();
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 4bf7c9b842c1..e6fce271d9be 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -1512,6 +1512,7 @@ public:
virtual void Scale( double fScaleX, double fScaleY ) override;
const MapMode& GetMapMode() const { return maMapMode; }
+ void SetMapMode(const MapMode& rMapMode) { maMapMode = rMapMode; }
};
// tdf#127471 decl for friend below
diff --git a/vcl/source/filter/svm/SvmReader.cxx b/vcl/source/filter/svm/SvmReader.cxx
index 004565f3e563..5f1947bffe76 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -283,7 +283,7 @@ rtl::Reference<MetaAction> SvmReader::MetaActionHandler(ImplMetaReadData* pData)
return TextAlignHandler();
break;
case MetaActionType::MAPMODE:
- pAction = new MetaMapModeAction;
+ return MapModeHandler();
break;
case MetaActionType::FONT:
pAction = new MetaFontAction;
@@ -1229,4 +1229,18 @@ rtl::Reference<MetaAction> SvmReader::TextAlignHandler()
return pAction;
}
+
+rtl::Reference<MetaAction> SvmReader::MapModeHandler()
+{
+ auto pAction = new MetaMapModeAction();
+
+ VersionCompatRead aCompat(mrStream);
+ TypeSerializer aSerializer(mrStream);
+ MapMode aMapMode;
+ aSerializer.readMapMode(aMapMode);
+
+ pAction->SetMapMode(aMapMode);
+
+ return pAction;
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list