include/vcl/filter/SvmReader.hxx    |    1 +
 include/vcl/metaact.hxx             |    2 ++
 vcl/source/filter/svm/SvmReader.cxx |   20 +++++++++++++++++++-
 3 files changed, 22 insertions(+), 1 deletion(-)

New commits:
commit 96294b206f02c9856dbcb8a21a0b20ce1180dd8c
Author:     panoskorovesis <panoskorove...@outlook.com>
AuthorDate: Thu Jul 15 11:50:34 2021 +0300
Commit:     Tomaž Vajngerl <qui...@gmail.com>
CommitDate: Tue Jul 27 08:04:19 2021 +0200

    Add Handler for RefPoint Read
    
    The handler separates MetaRefPointAction::Read from metaact.hxx
    Read implementation is now in SvmReader.hxx
    
    Change-Id: I0de2cbefbb91a89e24b8c6e43fea80a7595baa5a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119193
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>

diff --git a/include/vcl/filter/SvmReader.hxx b/include/vcl/filter/SvmReader.hxx
index d19922cf774d..3ef53c4a7962 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -86,6 +86,7 @@ public:
     rtl::Reference<MetaAction> TransparentHandler();
     rtl::Reference<MetaAction> FloatTransparentHandler(ImplMetaReadData* 
pData);
     rtl::Reference<MetaAction> EPSHandler();
+    rtl::Reference<MetaAction> RefPointHandler();
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 1914c31c192e..fe79942ac28e 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -1759,6 +1759,8 @@ public:
                         MetaRefPointAction( const Point& rRefPoint, bool bSet 
);
 
     const Point&        GetRefPoint() const { return maRefPoint; }
+    void                SetRefPoint(const Point& rRefPoint) { maRefPoint = 
rRefPoint; }
+    void                SetSetting(const 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 44c6705007b3..675bba95f7da 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -308,7 +308,7 @@ rtl::Reference<MetaAction> 
SvmReader::MetaActionHandler(ImplMetaReadData* pData)
             return EPSHandler();
             break;
         case MetaActionType::REFPOINT:
-            pAction = new MetaRefPointAction;
+            return RefPointHandler();
             break;
         case MetaActionType::COMMENT:
             pAction = new MetaCommentAction;
@@ -1359,4 +1359,22 @@ rtl::Reference<MetaAction> SvmReader::EPSHandler()
 
     return pAction;
 }
+
+rtl::Reference<MetaAction> SvmReader::RefPointHandler()
+{
+    auto pAction = new MetaRefPointAction();
+
+    VersionCompatRead aCompat(mrStream);
+    TypeSerializer aSerializer(mrStream);
+
+    Point aRefPoint;
+    aSerializer.readPoint(aRefPoint);
+    bool bSet;
+    mrStream.ReadCharAsBool(bSet);
+
+    pAction->SetRefPoint(aRefPoint);
+    pAction->SetSetting(bSet);
+
+    return pAction;
+}
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to