include/vcl/bitmap/Vectorizer.hxx |    4 ++--
 sd/source/ui/dlg/vectdlg.cxx      |    8 ++++----
 vcl/source/bitmap/Vectorizer.cxx  |    6 ++----
 3 files changed, 8 insertions(+), 10 deletions(-)

New commits:
commit 70f851bab57d71eed75cd9e6e66365acabe35396
Author:     Noel Grandin <[email protected]>
AuthorDate: Tue Aug 5 16:13:41 2025 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Tue Aug 5 18:41:10 2025 +0200

    BitmapEx->Bitmap in vcl::Vectorizer
    
    now that Bitmap can handle transparency
    
    Change-Id: Iecfb2f5905f7eeef8411cca974a17973e0e8dbda
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188961
    Reviewed-by: Noel Grandin <[email protected]>
    Tested-by: Jenkins

diff --git a/include/vcl/bitmap/Vectorizer.hxx 
b/include/vcl/bitmap/Vectorizer.hxx
index 16f810e428e4..1210c113d720 100644
--- a/include/vcl/bitmap/Vectorizer.hxx
+++ b/include/vcl/bitmap/Vectorizer.hxx
@@ -22,7 +22,7 @@
 #include <vcl/dllapi.h>
 
 class GDIMetaFile;
-class BitmapEx;
+class Bitmap;
 
 template <typename Arg, typename Ret> class Link;
 
@@ -52,7 +52,7 @@ public:
         : mnReduce(nReduce)
     {}
 
-    bool vectorize(BitmapEx const& rBitmap, GDIMetaFile& rMetafile);
+    bool vectorize(Bitmap const& rBitmap, GDIMetaFile& rMetafile);
 
     void setProgressCallback(const Link<tools::Long,void>* pProgress)
     {
diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx
index f91a6b5e7d03..7765613a15a7 100644
--- a/sd/source/ui/dlg/vectdlg.cxx
+++ b/sd/source/ui/dlg/vectdlg.cxx
@@ -131,20 +131,20 @@ void SdVectorizeDlg::Calculate( Bitmap const & rBmp, 
GDIMetaFile& rMtf )
     m_xPrgs->set_percentage(0);
 
     Fraction aScale;
-    BitmapEx aBitmapEx(GetPreparedBitmap(rBmp, aScale));
+    Bitmap aBitmap(GetPreparedBitmap(rBmp, aScale));
 
-    if (!aBitmapEx.IsEmpty())
+    if (!aBitmap.IsEmpty())
     {
         const Link<::tools::Long,void> aPrgsHdl( LINK( this, SdVectorizeDlg, 
ProgressHdl ) );
         sal_uInt8 nReduce = sal_uInt8(m_xMtReduce->get_value(FieldUnit::NONE));
         vcl::Vectorizer aVecotrizer(nReduce);
-        aVecotrizer.vectorize(aBitmapEx, rMtf);
+        aVecotrizer.vectorize(aBitmap, rMtf);
         aVecotrizer.setProgressCallback(&aPrgsHdl);
 
         if (m_xCbFillHoles->get_active())
         {
             GDIMetaFile aNewMtf;
-            BitmapScopedReadAccess pRAcc(aBitmapEx.GetBitmap());
+            BitmapScopedReadAccess pRAcc(aBitmap);
 
             if( pRAcc )
             {
diff --git a/vcl/source/bitmap/Vectorizer.cxx b/vcl/source/bitmap/Vectorizer.cxx
index f9ffa6ef618d..efc064e01778 100644
--- a/vcl/source/bitmap/Vectorizer.cxx
+++ b/vcl/source/bitmap/Vectorizer.cxx
@@ -644,14 +644,13 @@ void Vectorizer::updateProgress(tools::Long nProgress)
        mpProgress->Call(nProgress);
 }
 
-bool Vectorizer::vectorize(BitmapEx const& rBitmap, GDIMetaFile& rMetafile)
+bool Vectorizer::vectorize(Bitmap const& rBitmap, GDIMetaFile& rMetafile)
 {
     bool bRet = false;
 
     updateProgress(0);
 
-    std::optional<Bitmap> xBmp(std::in_place, rBitmap.GetBitmap());
-    BitmapScopedReadAccess pRAcc(*xBmp);
+    BitmapScopedReadAccess pRAcc(rBitmap);
 
     if( pRAcc )
     {
@@ -741,7 +740,6 @@ bool Vectorizer::vectorize(BitmapEx const& rBitmap, 
GDIMetaFile& rMetafile)
     }
 
     pRAcc.reset();
-    xBmp.reset();
     updateProgress(100);
 
     return bRet;

Reply via email to