sd/source/ui/view/drviews2.cxx |   46 ++++++++++++++++++++---------------------
 1 file changed, 23 insertions(+), 23 deletions(-)

New commits:
commit 7b7ee2adaf608cd9a5ba544c83acd1d0d775c77b
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Oct 25 10:16:24 2024 +0200
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Sat Oct 26 03:12:28 2024 +0200

    tdf#95680 Convert - Metafile - Save Image... No function.
    
    The obvious fix seems to work
    
    Change-Id: Iabbde43f18b49f19149a9a7ee44efd0b6b445736
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175624
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    (cherry picked from commit d8805b6fa554f8a7b720c79599cff5d88ddccd05)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175606
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index d3aa0ee2312f..92e18c868ad4 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -1360,34 +1360,34 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
         {
             if( rMarkList.GetMarkCount() == 1 )
             {
-                const SdrGrafObj* pObj = dynamic_cast<const 
SdrGrafObj*>(rMarkList.GetMark(0)->GetMarkedSdrObj());
-                if (pObj && pObj->GetGraphicType() == GraphicType::Bitmap)
-                {
-                    weld::Window* pFrame = GetFrameWeld();
-                    GraphicAttr aGraphicAttr = pObj->GetGraphicAttr();
-                    short nState = RET_CANCEL;
-                    if (aGraphicAttr != GraphicAttr()) // the image has been 
modified
+                if (const SdrGrafObj* pObj = dynamic_cast<const 
SdrGrafObj*>(rMarkList.GetMark(0)->GetMarkedSdrObj()))
+                    if (pObj->GetGraphicType() == GraphicType::Bitmap || 
pObj->GetGraphicType() == GraphicType::GdiMetafile)
                     {
-                        if (pFrame)
+                        weld::Window* pFrame = GetFrameWeld();
+                        GraphicAttr aGraphicAttr = pObj->GetGraphicAttr();
+                        short nState = RET_CANCEL;
+                        if (aGraphicAttr != GraphicAttr()) // the image has 
been modified
                         {
-                            nState = 
GraphicHelper::HasToSaveTransformedImage(pFrame);
+                            if (pFrame)
+                            {
+                                nState = 
GraphicHelper::HasToSaveTransformedImage(pFrame);
+                            }
+                        }
+                        else
+                        {
+                            nState = RET_NO;
                         }
-                    }
-                    else
-                    {
-                        nState = RET_NO;
-                    }
 
-                    if (nState == RET_YES)
-                    {
-                        GraphicHelper::ExportGraphic(pFrame, 
pObj->GetTransformedGraphic(), u""_ustr);
-                    }
-                    else if (nState == RET_NO)
-                    {
-                        const GraphicObject& 
aGraphicObject(pObj->GetGraphicObject());
-                        GraphicHelper::ExportGraphic(pFrame, 
aGraphicObject.GetGraphic(), u""_ustr);
+                        if (nState == RET_YES)
+                        {
+                            GraphicHelper::ExportGraphic(pFrame, 
pObj->GetTransformedGraphic(), u""_ustr);
+                        }
+                        else if (nState == RET_NO)
+                        {
+                            const GraphicObject& 
aGraphicObject(pObj->GetGraphicObject());
+                            GraphicHelper::ExportGraphic(pFrame, 
aGraphicObject.GetGraphic(), u""_ustr);
+                        }
                     }
-                }
             }
             Cancel();
             rReq.Ignore();

Reply via email to