diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-10-06 16:27:16 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-10-06 21:58:10 +0200 |
commit | b8633c58dc7fa43076abeeb7e53a931d92119f26 (patch) | |
tree | a83e2d579ce00ce5416ca5b45e5f4dc1511b6576 /sw/source/uibase/uiview | |
parent | 7aa30262d543ed87d673264d6f51146694120d94 (diff) |
weld FontWorkGalleryDialog
Change-Id: I6a3a2b445d6f79d0c259c69176e1b23de1ff05d3
Reviewed-on: https://gerrit.libreoffice.org/61474
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/uibase/uiview')
-rw-r--r-- | sw/source/uibase/uiview/viewdraw.cxx | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx index d1939e6df0b6..8a94bb84f346 100644 --- a/sw/source/uibase/uiview/viewdraw.cxx +++ b/sw/source/uibase/uiview/viewdraw.cxx @@ -144,10 +144,9 @@ void SwView::ExecDraw(SfxRequest& rReq) } else if ( nSlotId == SID_FONTWORK_GALLERY_FLOATER ) { - vcl::Window* pWin = &( m_pWrtShell->GetView().GetViewFrame()->GetWindow() ); + vcl::Window& rWin = m_pWrtShell->GetView().GetViewFrame()->GetWindow(); - if ( pWin ) - pWin->EnterWait(); + rWin.EnterWait(); if( !m_pWrtShell->HasDrawView() ) m_pWrtShell->MakeDrawView(); @@ -156,9 +155,9 @@ void SwView::ExecDraw(SfxRequest& rReq) if ( pSdrView ) { SdrObject* pObj = nullptr; - ScopedVclPtrInstance< svx::FontWorkGalleryDialog > aDlg( pSdrView, pWin ); - aDlg->SetSdrObjectRef( &pObj, pSdrView->GetModel() ); - aDlg->Execute(); + svx::FontWorkGalleryDialog aDlg(rWin.GetFrameWeld(), pSdrView); + aDlg.SetSdrObjectRef( &pObj, pSdrView->GetModel() ); + aDlg.run(); if ( pObj ) { Size aDocSize( m_pWrtShell->GetDocSize() ); @@ -174,12 +173,7 @@ void SwView::ExecDraw(SfxRequest& rReq) aPos.setY( aDocSize.Height() / 2 + rVisArea.Top() ); if( aPrefSize.Width() && aPrefSize.Height() ) - { - if( pWin ) - aSize = pWin->PixelToLogic(aPrefSize, MapMode(MapUnit::MapTwip)); - else - aSize = Application::GetDefaultDevice()->PixelToLogic(aPrefSize, MapMode(MapUnit::MapTwip)); - } + aSize = rWin.PixelToLogic(aPrefSize, MapMode(MapUnit::MapTwip)); else aSize = Size( 2835, 2835 ); @@ -188,8 +182,7 @@ void SwView::ExecDraw(SfxRequest& rReq) rReq.Ignore (); } } - if( pWin ) - pWin->LeaveWait(); + rWin.LeaveWait(); } else if ( m_nFormSfxId != USHRT_MAX ) GetViewFrame()->GetDispatcher()->Execute( SID_FM_LEAVE_CREATE ); |