diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-04-08 10:34:19 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-04-09 10:07:13 +0200 |
commit | 200626e41f004b6b8588f89fa3707c71ae2b375c (patch) | |
tree | f81bf21c9442ea75d80d1ceb7f1cc3ad11ca71fa /sfx2/source/view | |
parent | ce9f23c6196b17985d14e441aa93175b31650f34 (diff) |
remove need for an intermediate vcl::Window
Change-Id: I59f24888e47ec17e46bf651d8530fc9468f16f62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113795
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2/source/view')
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 360ed8f75adb..596d8ab3d9fb 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -2512,6 +2512,11 @@ vcl::Window& SfxViewFrame::GetWindow() const return m_pImpl->pWindow ? *m_pImpl->pWindow : GetFrame().GetWindow(); } +weld::Window* SfxViewFrame::GetFrameWeld() const +{ + return GetWindow().GetFrameWeld(); +} + bool SfxViewFrame::DoClose() { return GetFrame().DoClose(); diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index d3554ed0be1a..671e6888e102 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -447,7 +447,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) { SfxObjectShell* pDoc = GetObjectShell(); if ( pDoc && pDoc->QueryHiddenInformation( - HiddenWarningFact::WhenSaving, GetViewFrame()->GetWindow().GetFrameWeld() ) != RET_YES ) + HiddenWarningFact::WhenSaving, GetViewFrame()->GetFrameWeld() ) != RET_YES ) break; @@ -507,7 +507,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) SfxBluetoothModel aModel; SfxObjectShell* pDoc = GetObjectShell(); if ( pDoc && pDoc->QueryHiddenInformation( - HiddenWarningFact::WhenSaving, GetViewFrame()->GetWindow().GetFrameWeld() ) != RET_YES ) + HiddenWarningFact::WhenSaving, GetViewFrame()->GetFrameWeld() ) != RET_YES ) break; uno::Reference < frame::XFrame > xFrame( pFrame->GetFrame().GetFrameInterface() ); SfxMailModel::SendMailResult eResult = aModel.SaveAndSend( xFrame ); @@ -1133,7 +1133,7 @@ bool SfxViewShell::PrepareClose { if ( bUI ) { - std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetViewFrame()->GetWindow().GetFrameWeld(), + std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetViewFrame()->GetFrameWeld(), VclMessageType::Info, VclButtonsType::Ok, SfxResId(STR_CANT_CLOSE))); xBox->run(); |