[Libreoffice-commits] core.git: include/vcl vcl/source

panoskorovesis (via logerrit) logerrit at kemper.freedesktop.org
Fri Aug 6 23:01:10 UTC 2021


 include/vcl/filter/SvmWriter.hxx    |    1 +
 vcl/source/filter/svm/SvmWriter.cxx |   14 ++++++++++++++
 2 files changed, 15 insertions(+)

New commits:
commit 0eb1b82dbc2dbaeefa06f42f4fc376b54d99bd1c
Author:     panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Wed Aug 4 13:06:15 2021 +0300
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Sat Aug 7 01:00:32 2021 +0200

    Add Handler for LayoutMode Write
    
    The handler separates MetaLayoutModeAction::Write from metaact.hxx
    Write implementation is now in SvmWriter.hxx
    
    Change-Id: I63b045cb9bdb40e1b6c961d30df8bcfbe1b8129b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120110
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/include/vcl/filter/SvmWriter.hxx b/include/vcl/filter/SvmWriter.hxx
index d1466c60a334..9162dc1af0e8 100644
--- a/include/vcl/filter/SvmWriter.hxx
+++ b/include/vcl/filter/SvmWriter.hxx
@@ -68,4 +68,5 @@ public:
     void EPSHandler(MetaEPSAction* pAction);
     void RefPointHandler(MetaRefPointAction* pAction);
     void CommentHandler(MetaCommentAction* pAction);
+    void LayoutModeHandler(MetaLayoutModeAction* pAction);
 };
\ No newline at end of file
diff --git a/vcl/source/filter/svm/SvmWriter.cxx b/vcl/source/filter/svm/SvmWriter.cxx
index afddcf80bb67..3cddbd48edb5 100644
--- a/vcl/source/filter/svm/SvmWriter.cxx
+++ b/vcl/source/filter/svm/SvmWriter.cxx
@@ -283,6 +283,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData)
         }
         break;
 
+        case MetaActionType::LAYOUTMODE:
+        {
+            auto* pMetaAction = static_cast<MetaLayoutModeAction*>(pAction);
+            LayoutModeHandler(pMetaAction);
+        }
+        break;
+
         /* default case prevents test failure and will be
         removed once all the handlers are completed */
         default:
@@ -658,4 +665,11 @@ void SvmWriter::CommentHandler(MetaCommentAction* pAction)
     if (pAction->GetDataSize())
         mrStream.WriteBytes(pAction->GetData(), pAction->GetDataSize());
 }
+
+void SvmWriter::LayoutModeHandler(MetaLayoutModeAction* pAction)
+{
+    mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType()));
+    VersionCompatWrite aCompat(mrStream, 1);
+    mrStream.WriteUInt32(static_cast<sal_uInt32>(pAction->GetLayoutMode()));
+}
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list