diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-04-04 14:33:16 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-04-06 16:48:12 +0200 |
commit | 8ed2fb306ffa8c7fef336b858fc5074c309c3c9f (patch) | |
tree | 8699322ccfd3bfef66af56437bb9dabfa249a719 /sw/source/uibase/shells/grfshex.cxx | |
parent | 79ae6cc6b3b19252473f6987106ea7d8aa17a5ea (diff) |
weld linkeditdialog
which enables changing FileDialogHelper over to welded
Change-Id: I988342a6574cb7ed09b2724929e8c7117474a56c
Reviewed-on: https://gerrit.libreoffice.org/52388
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 'sw/source/uibase/shells/grfshex.cxx')
-rw-r--r-- | sw/source/uibase/shells/grfshex.cxx | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/sw/source/uibase/shells/grfshex.cxx b/sw/source/uibase/shells/grfshex.cxx index 7b2562b0ee99..6536cf576d97 100644 --- a/sw/source/uibase/shells/grfshex.cxx +++ b/sw/source/uibase/shells/grfshex.cxx @@ -60,7 +60,7 @@ bool SwTextShell::InsertMediaDlg( SfxRequest const & rReq ) { OUString aURL; const SfxItemSet* pReqArgs = rReq.GetArgs(); - vcl::Window* pWindow = &GetView().GetViewFrame()->GetWindow(); + vcl::Window& rWindow = GetView().GetViewFrame()->GetWindow(); bool bAPI = false, bRet = false; if( pReqArgs ) @@ -74,20 +74,18 @@ bool SwTextShell::InsertMediaDlg( SfxRequest const & rReq ) } bool bLink(true); - if (bAPI || ::avmedia::MediaWindow::executeMediaURLDialog(pWindow, aURL, & bLink)) + if (bAPI || ::avmedia::MediaWindow::executeMediaURLDialog(rWindow.GetFrameWeld(), aURL, & bLink)) { Size aPrefSize; - if( pWindow ) - pWindow->EnterWait(); + rWindow.EnterWait(); if( !::avmedia::MediaWindow::isMediaURL( aURL, "", true, &aPrefSize ) ) { - if( pWindow ) - pWindow->LeaveWait(); + rWindow.LeaveWait(); if( !bAPI ) - ::avmedia::MediaWindow::executeFormatErrorBox(pWindow ? pWindow->GetFrameWeld() : nullptr); + ::avmedia::MediaWindow::executeFormatErrorBox(rWindow.GetFrameWeld()); } else { @@ -108,12 +106,7 @@ bool SwTextShell::InsertMediaDlg( SfxRequest const & rReq ) aPos.setY( aDocSz.Height() / 2 + rVisArea.Top() ); if( aPrefSize.Width() && aPrefSize.Height() ) - { - if( pWindow ) - aSize = pWindow->PixelToLogic(aPrefSize, MapMode(MapUnit::MapTwip)); - else - aSize = Application::GetDefaultDevice()->PixelToLogic(aPrefSize, MapMode(MapUnit::MapTwip)); - } + aSize = rWindow.PixelToLogic(aPrefSize, MapMode(MapUnit::MapTwip)); else aSize = Size( 2835, 2835 ); @@ -138,8 +131,7 @@ bool SwTextShell::InsertMediaDlg( SfxRequest const & rReq ) rSh.SwFEShell::InsertDrawObj( *pObj, aPos ); bRet = true; - if( pWindow ) - pWindow->LeaveWait(); + rWindow.LeaveWait(); } } |