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

panoskorovesis (via logerrit) logerrit at kemper.freedesktop.org
Tue Aug 10 07:50:15 UTC 2021


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

New commits:
commit 23bb4465057ff71e3042fdb10d3a722ff54b861f
Author:     panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Wed Aug 4 16:10:02 2021 +0300
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Tue Aug 10 09:49:36 2021 +0200

    Add Handler for BmpEx Write
    
    The handler separates MetaBmpExAction::Write from metaact.hxx
    Write implementation is now in SvmWriter.hxx
    
    Change-Id: Iee5fb4f2745feedffd96a00f4b233deb64d50de5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120156
    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 54a968837290..54deb03a52dc 100644
--- a/include/vcl/filter/SvmWriter.hxx
+++ b/include/vcl/filter/SvmWriter.hxx
@@ -59,6 +59,7 @@ public:
     void BmpHandler(MetaBmpAction* pAction);
     void BmpScaleHandler(MetaBmpScaleAction* pAction);
     void BmpScalePartHandler(MetaBmpScalePartAction* pAction);
+    void BmpExHandler(MetaBmpExAction* pAction);
     void OverlineColorHandler(MetaOverlineColorAction* pAction);
     void TextAlignHandler(MetaTextAlignAction* pAction);
     void MapModeHandler(MetaMapModeAction* pAction);
diff --git a/vcl/source/filter/svm/SvmWriter.cxx b/vcl/source/filter/svm/SvmWriter.cxx
index e38f724aa8a8..acd14be4ddda 100644
--- a/vcl/source/filter/svm/SvmWriter.cxx
+++ b/vcl/source/filter/svm/SvmWriter.cxx
@@ -221,6 +221,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData)
         }
         break;
 
+        case MetaActionType::BMPEX:
+        {
+            auto* pMetaAction = static_cast<MetaBmpExAction*>(pAction);
+            BmpExHandler(pMetaAction);
+        }
+        break;
+
         case MetaActionType::OVERLINECOLOR:
         {
             auto* pMetaAction = static_cast<MetaOverlineColorAction*>(pAction);
@@ -611,6 +618,18 @@ void SvmWriter::BmpScalePartHandler(MetaBmpScalePartAction* pAction)
     }
 }
 
+void SvmWriter::BmpExHandler(MetaBmpExAction* pAction)
+{
+    if (!pAction->GetBitmapEx().GetBitmap().IsEmpty())
+    {
+        mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType()));
+        VersionCompatWrite aCompat(mrStream, 1);
+        WriteDIBBitmapEx(pAction->GetBitmapEx(), mrStream);
+        TypeSerializer aSerializer(mrStream);
+        aSerializer.writePoint(pAction->GetPoint());
+    }
+}
+
 void SvmWriter::OverlineColorHandler(MetaOverlineColorAction* pAction)
 {
     mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType()));


More information about the Libreoffice-commits mailing list