summaryrefslogtreecommitdiff
path: root/sc/source/ui/drawfunc
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/drawfunc')
-rw-r--r--sc/source/ui/drawfunc/chartsh.cxx2
-rw-r--r--sc/source/ui/drawfunc/fuins1.cxx4
-rw-r--r--sc/source/ui/drawfunc/graphsh.cxx9
3 files changed, 8 insertions, 7 deletions
diff --git a/sc/source/ui/drawfunc/chartsh.cxx b/sc/source/ui/drawfunc/chartsh.cxx
index 054cce77a439..bc6e2bb48c74 100644
--- a/sc/source/ui/drawfunc/chartsh.cxx
+++ b/sc/source/ui/drawfunc/chartsh.cxx
@@ -98,7 +98,7 @@ void ScChartShell::ExecuteExportAsGraphic( SfxRequest& )
{
vcl::Window* pWin = GetViewData()->GetActiveWin();
Reference< drawing::XShape > xSourceDoc( pObject->getUnoShape(), UNO_QUERY_THROW );
- GraphicHelper::SaveShapeAsGraphic(pWin, xSourceDoc);
+ GraphicHelper::SaveShapeAsGraphic(pWin ? pWin->GetFrameWeld() : nullptr, xSourceDoc);
}
}
diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx
index b7c4ed8d5e8b..5574a6f5b6cc 100644
--- a/sc/source/ui/drawfunc/fuins1.cxx
+++ b/sc/source/ui/drawfunc/fuins1.cxx
@@ -282,7 +282,7 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh,
}
else
{
- SvxOpenGraphicDialog aDlg(ScResId(STR_INSERTGRAPHIC), pWin,
+ SvxOpenGraphicDialog aDlg(ScResId(STR_INSERTGRAPHIC), pWin ? pWin->GetFrameWeld() : nullptr,
ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW_IMAGE_ANCHOR);
Reference<ui::dialogs::XFilePickerControlAccess> xCtrlAcc = aDlg.GetFilePickerControlAccess();
@@ -388,7 +388,7 @@ FuInsertMedia::FuInsertMedia( ScTabViewShell* pViewSh,
bool bLink(true);
if (bAPI
#if HAVE_FEATURE_AVMEDIA
- || ::avmedia::MediaWindow::executeMediaURLDialog(pWin, aURL, &bLink)
+ || ::avmedia::MediaWindow::executeMediaURLDialog(pWin ? pWin->GetFrameWeld() : nullptr, aURL, &bLink)
#endif
)
{
diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx
index 641d3854ebb3..9855beee0125 100644
--- a/sc/source/ui/drawfunc/graphsh.cxx
+++ b/sc/source/ui/drawfunc/graphsh.cxx
@@ -266,11 +266,12 @@ void ScGraphicShell::ExecuteSaveGraphic( SAL_UNUSED_PARAMETER SfxRequest& /*rReq
GraphicAttr aGraphicAttr = pObj->GetGraphicAttr();
short nState = RET_CANCEL;
vcl::Window* pWin = GetViewData()->GetActiveWin();
+ weld::Window* pWinFrame = pWin ? pWin->GetFrameWeld() : nullptr;
if (aGraphicAttr != GraphicAttr()) // the image has been modified
{
if (pWin)
{
- nState = GraphicHelper::HasToSaveTransformedImage(pWin->GetFrameWeld());
+ nState = GraphicHelper::HasToSaveTransformedImage(pWinFrame);
}
}
else
@@ -280,12 +281,12 @@ void ScGraphicShell::ExecuteSaveGraphic( SAL_UNUSED_PARAMETER SfxRequest& /*rReq
if (nState == RET_YES)
{
- GraphicHelper::ExportGraphic(pWin, pObj->GetTransformedGraphic(), "");
+ GraphicHelper::ExportGraphic(pWinFrame, pObj->GetTransformedGraphic(), "");
}
else if (nState == RET_NO)
{
GraphicObject aGraphicObject(pObj->GetGraphicObject());
- GraphicHelper::ExportGraphic(pWin, aGraphicObject.GetGraphic(), "");
+ GraphicHelper::ExportGraphic(pWinFrame, aGraphicObject.GetGraphic(), "");
}
}
}
@@ -323,7 +324,7 @@ void ScGraphicShell::ExecuteChangePicture( SAL_UNUSED_PARAMETER SfxRequest& /*rR
{
SdrGrafObj* pGraphicObj = static_cast<SdrGrafObj*>(pObj);
vcl::Window* pWin = GetViewData()->GetActiveWin();
- SvxOpenGraphicDialog aDlg(ScResId(STR_INSERTGRAPHIC), pWin);
+ SvxOpenGraphicDialog aDlg(ScResId(STR_INSERTGRAPHIC), pWin ? pWin->GetFrameWeld() : nullptr);
if( aDlg.Execute() == ERRCODE_NONE )
{