diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-10-25 10:16:24 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-10-25 14:28:14 +0200 |
commit | d8805b6fa554f8a7b720c79599cff5d88ddccd05 (patch) | |
tree | 5d684a0eb95137c270d8eaee93c1c85a1bebc753 | |
parent | cf39ee6cbfed2ec6e82c136712910bf3f4954bdf (diff) |
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.grandin@collabora.co.uk>
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index aafee36fa8b4..16d765e1bd3f 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -1338,34 +1338,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(); |