summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-10-30 11:34:27 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-10-31 13:30:59 +0100
commite2aa85a6fbc039e8b1950f0e4b8484595d0b47eb (patch)
tree2658525d24372ee535be570d682c9f1ca75a178b /forms
parent32c53b465bc2052c2756f12294699fabae754756 (diff)
avoid intermediate vcl::Windows
Change-Id: Iac6bc83265e007a699a8993b89ac2efaa3739d95 Reviewed-on: https://gerrit.libreoffice.org/81761 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'forms')
-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 );