vcl/source/treelist/transfer.cxx |    8 ++++----
 vcl/unx/gtk3/gtkinst.cxx         |    9 +++++----
 2 files changed, 9 insertions(+), 8 deletions(-)

New commits:
commit 7785a62cd74e5924e4ade4d69519966c63a0decf
Author:     offtkp <[email protected]>
AuthorDate: Sat Jul 16 19:16:01 2022 +0300
Commit:     Tomaž Vajngerl <[email protected]>
CommitDate: Tue Jul 19 13:24:22 2022 +0200

    Replace old png writer in transfer.cxx
    
    Change-Id: I1423bd4e7650da71f31de50df8a88ee3c09db33b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137135
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <[email protected]>

diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx
index 4506fa2ffea7..f2c453792a6f 100644
--- a/vcl/source/treelist/transfer.cxx
+++ b/vcl/source/treelist/transfer.cxx
@@ -64,7 +64,7 @@
 #include <cstdio>
 #include <vcl/dibtools.hxx>
 #include <vcl/filter/PngImageReader.hxx>
-#include <vcl/pngwrite.hxx>
+#include <vcl/filter/PngImageWriter.hxx>
 #include <vcl/graphicfilter.hxx>
 #include <memory>
 #include <utility>
@@ -668,9 +668,9 @@ bool TransferableHelper::SetBitmapEx( const BitmapEx& 
rBitmapEx, const DataFlavo
 
             aFilterData.getArray()[aFilterData.getLength() - 1].Value <<= 1;
 #endif
-            vcl::PNGWriter aPNGWriter(rBitmapEx, &aFilterData);
-
-            aPNGWriter.Write(aMemStm);
+            vcl::PngImageWriter aPNGWriter(aMemStm);
+            aPNGWriter.setParameters(aFilterData);
+            aPNGWriter.write(rBitmapEx);
         }
         else
         {
commit 20d0d2d2ff5ee0b8e1f40ca1adda115a82d974b6
Author:     offtkp <[email protected]>
AuthorDate: Sat Jul 16 19:18:43 2022 +0300
Commit:     Tomaž Vajngerl <[email protected]>
CommitDate: Tue Jul 19 13:24:09 2022 +0200

    Replace old png writer in gtkinst.cxx
    
    Change-Id: I5a9aefe1b957b800b5c56f3200d28ef727324cac
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137136
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <[email protected]>

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index c88c6886ee85..4aacd3979b4e 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -86,7 +86,7 @@
 #include <vcl/i18nhelp.hxx>
 #include <vcl/quickselectionengine.hxx>
 #include <vcl/mnemonic.hxx>
-#include <vcl/pngwrite.hxx>
+#include <vcl/filter/PngImageWriter.hxx>
 #include <vcl/stdtext.hxx>
 #include <vcl/syswin.hxx>
 #include <vcl/virdev.hxx>
@@ -4814,9 +4814,10 @@ namespace
         // We "know" that this gets passed to zlib's deflateInit2_(). 1 means 
best speed.
         css::uno::Sequence<css::beans::PropertyValue> aFilterData{ 
comphelper::makePropertyValue(
             "Compression", sal_Int32(1)) };
-
-        vcl::PNGWriter aWriter(aImage.GetBitmapEx(), &aFilterData);
-        aWriter.Write(aMemStm);
+        auto aBitmapEx = aImage.GetBitmapEx();
+        vcl::PngImageWriter aWriter(aMemStm);
+        aWriter.setParameters(aFilterData);
+        aWriter.write(aBitmapEx);
 
         return load_icon_from_stream(aMemStm);
     }

Reply via email to