summaryrefslogtreecommitdiff
path: root/forms/source/component/ImageControl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'forms/source/component/ImageControl.cxx')
-rw-r--r--forms/source/component/ImageControl.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index 7f5d323fe691..12d44e59e963 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -776,10 +776,9 @@ bool OImageControlControl::implInsertGraphics()
// build some arguments for the upcoming dialog
try
{
- Reference< XWindowPeer > xWindowPeer = getPeer();
- VclPtr<vcl::Window> xWin = VCLUnoHelper::GetWindow(xWindowPeer);
+ Reference< XWindow > xWindow( static_cast< ::cppu::OWeakObject* >( this ), UNO_QUERY );
::sfx2::FileDialogHelper aDialog(TemplateDescription::FILEOPEN_LINK_PREVIEW, FileDialogFlags::Graphic,
- xWin ? xWin->GetFrameWeld() : nullptr);
+ Application::GetFrameWeld(xWindow));
aDialog.SetTitle( sTitle );
Reference< XFilePickerControlAccess > xController( aDialog.GetFilePicker(), UNO_QUERY_THROW );