diff options
Diffstat (limited to 'sc/source/ui/drawfunc/chartsh.cxx')
-rw-r--r-- | sc/source/ui/drawfunc/chartsh.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sc/source/ui/drawfunc/chartsh.cxx b/sc/source/ui/drawfunc/chartsh.cxx index 95b06385335e..2f714c976cf8 100644 --- a/sc/source/ui/drawfunc/chartsh.cxx +++ b/sc/source/ui/drawfunc/chartsh.cxx @@ -137,8 +137,15 @@ void ScChartShell::ExecuteExportAsGraphic( SfxRequest& ) if( dynamic_cast<const SdrOle2Obj*>( pObject) ) { vcl::Window* pWin = GetViewData().GetActiveWin(); + css::uno::Reference<css::lang::XComponent> xComponent; + const SfxObjectShell* pShell = GetObjectShell(); + if (pShell) + { + xComponent = pShell->GetModel(); + } Reference< drawing::XShape > xSourceDoc( pObject->getUnoShape(), UNO_QUERY_THROW ); - GraphicHelper::SaveShapeAsGraphic(pWin ? pWin->GetFrameWeld() : nullptr, xSourceDoc); + GraphicHelper::SaveShapeAsGraphic(pWin ? pWin->GetFrameWeld() : nullptr, xComponent, + xSourceDoc); } } |