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

panoskorovesis (via logerrit) logerrit at kemper.freedesktop.org
Tue Aug 3 22:52:50 UTC 2021


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

New commits:
commit e76a3e759454f1e2d1987fe983cd7286b9156be0
Author:     panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Tue Aug 3 09:47:33 2021 +0300
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Wed Aug 4 00:52:13 2021 +0200

    Add Handler for TextAlign Write
    
    The handler separates MetaTextAlignAction::Write from metaact.hxx
    Write implementation is now in SvmWriter.hxx
    
    Change-Id: I464389a0c1e4e5867759174e8580be9e0c239408
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119921
    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 d7a66a3e5b27..c27476bde453 100644
--- a/include/vcl/filter/SvmWriter.hxx
+++ b/include/vcl/filter/SvmWriter.hxx
@@ -57,4 +57,5 @@ public:
     void TextRectHandler(MetaTextRectAction* pAction, ImplMetaWriteData* pData);
     void TextLineHandler(MetaTextLineAction* pAction);
     void OverlineColorHandler(MetaOverlineColorAction* pAction);
+    void TextAlignHandler(MetaTextAlignAction* pAction);
 };
\ No newline at end of file
diff --git a/vcl/source/filter/svm/SvmWriter.cxx b/vcl/source/filter/svm/SvmWriter.cxx
index bd2dae5c9926..73dacc499a5e 100644
--- a/vcl/source/filter/svm/SvmWriter.cxx
+++ b/vcl/source/filter/svm/SvmWriter.cxx
@@ -204,6 +204,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData)
         }
         break;
 
+        case MetaActionType::TEXTALIGN:
+        {
+            auto* pMetaAction = static_cast<MetaTextAlignAction*>(pAction);
+            TextAlignHandler(pMetaAction);
+        }
+        break;
+
         /* default case prevents test failure and will be
         removed once all the handlers are completed */
         default:
@@ -463,4 +470,11 @@ void SvmWriter::OverlineColorHandler(MetaOverlineColorAction* pAction)
     WriteColor(pAction->GetColor());
     mrStream.WriteBool(pAction->IsSetting());
 }
+
+void SvmWriter::TextAlignHandler(MetaTextAlignAction* pAction)
+{
+    mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType()));
+    VersionCompatWrite aCompat(mrStream, 1);
+    mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetTextAlign()));
+}
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list