summaryrefslogtreecommitdiff
path: root/sc/source/ui/drawfunc/graphsh.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-09-07 10:54:22 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-09-08 11:27:18 +0200
commit1af5f6e8d1bdec9bd2f14d0f5f8fad9c0fdead2b (patch)
tree84773114c08ca86424af4f8a17ec69d295908e01 /sc/source/ui/drawfunc/graphsh.cxx
parentbb2258f7e4bcf078810cf1e40fdec2f17576c3b2 (diff)
set parent for file dialog helper
Change-Id: I3994ee48dcb5b2732cb27cb9ccb54926abf0828a Reviewed-on: https://gerrit.libreoffice.org/42048 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/drawfunc/graphsh.cxx')
-rw-r--r--sc/source/ui/drawfunc/graphsh.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx
index 44a21ded58b7..3a55971f4dd4 100644
--- a/sc/source/ui/drawfunc/graphsh.cxx
+++ b/sc/source/ui/drawfunc/graphsh.cxx
@@ -266,9 +266,9 @@ void ScGraphicShell::ExecuteSaveGraphic( SAL_UNUSED_PARAMETER SfxRequest& /*rReq
{
GraphicAttr aGraphicAttr = pObj->GetGraphicAttr();
short nState = RET_CANCEL;
+ vcl::Window* pWin = GetViewData()->GetActiveWin();
if (aGraphicAttr != GraphicAttr()) // the image has been modified
{
- vcl::Window* pWin = GetViewData()->GetActiveWin();
if (pWin)
{
nState = GraphicHelper::HasToSaveTransformedImage(pWin);
@@ -281,12 +281,12 @@ void ScGraphicShell::ExecuteSaveGraphic( SAL_UNUSED_PARAMETER SfxRequest& /*rReq
if (nState == RET_YES)
{
- GraphicHelper::ExportGraphic( pObj->GetTransformedGraphic(), "" );
+ GraphicHelper::ExportGraphic(pWin, pObj->GetTransformedGraphic(), "");
}
else if (nState == RET_NO)
{
GraphicObject aGraphicObject(pObj->GetGraphicObject());
- GraphicHelper::ExportGraphic( aGraphicObject.GetGraphic(), "" );
+ GraphicHelper::ExportGraphic(pWin, aGraphicObject.GetGraphic(), "");
}
}
}
@@ -323,7 +323,8 @@ void ScGraphicShell::ExecuteChangePicture( SAL_UNUSED_PARAMETER SfxRequest& /*rR
if( pObj && nullptr != dynamic_cast<const SdrGrafObj*>( pObj) && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GraphicType::Bitmap )
{
SdrGrafObj* pGraphicObj = static_cast<SdrGrafObj*>(pObj);
- SvxOpenGraphicDialog aDlg(ScResId(STR_INSERTGRAPHIC));
+ vcl::Window* pWin = GetViewData()->GetActiveWin();
+ SvxOpenGraphicDialog aDlg(ScResId(STR_INSERTGRAPHIC), pWin);
if( aDlg.Execute() == ERRCODE_NONE )
{