summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/window.hxx1
-rw-r--r--sfx2/source/view/viewfrm.cxx5
-rw-r--r--sfx2/source/view/viewsh.cxx11
-rw-r--r--vcl/source/window/window2.cxx6
4 files changed, 18 insertions, 5 deletions
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index f090fef97203..8c87a78510cb 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -527,6 +527,7 @@ public:
SAL_DLLPRIVATE vcl::Window* ImplGetFrameWindow() const;
weld::Window* GetFrameWeld() const;
+ vcl::Window* GetFrameWindow() const;
SalFrame* ImplGetFrame() const;
SAL_DLLPRIVATE ImplFrameData* ImplGetFrameData();
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 7c0efa142fda..082c77aeba5a 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1460,8 +1460,9 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
case SfxHintId::Deinitializing:
{
- if (GetWindow().GetLOKNotifier())
- GetWindow().ReleaseLOKNotifier();
+ vcl::Window* pFrameWin = GetWindow().GetFrameWindow();
+ if (pFrameWin && pFrameWin->GetLOKNotifier())
+ pFrameWin->ReleaseLOKNotifier();
GetFrame().DoClose();
break;
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 8a199623fa58..e62a87b06b14 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1094,7 +1094,11 @@ SfxViewShell::SfxViewShell
rViewArr.push_back(this);
if (comphelper::LibreOfficeKit::isActive())
- pViewFrame->GetWindow().SetLOKNotifier(this, true);
+ {
+ vcl::Window* pFrameWin = pViewFrame->GetWindow().GetFrameWindow();
+ if (pFrameWin)
+ pFrameWin->SetLOKNotifier(this, true);
+ }
}
@@ -1119,8 +1123,9 @@ SfxViewShell::~SfxViewShell()
pImpl->m_pController.clear();
}
- if (GetViewFrame()->GetWindow().GetLOKNotifier())
- GetViewFrame()->GetWindow().ReleaseLOKNotifier();
+ vcl::Window* pFrameWin = GetViewFrame()->GetWindow().GetFrameWindow();
+ if (pFrameWin && pFrameWin->GetLOKNotifier())
+ pFrameWin->ReleaseLOKNotifier();
}
bool SfxViewShell::PrepareClose
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 4b0c7e8f571d..2ad4bfcb4571 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -856,6 +856,12 @@ weld::Window* Window::GetFrameWeld() const
return pFrame ? pFrame->GetFrameWeld() : nullptr;
}
+vcl::Window* Window::GetFrameWindow() const
+{
+ SalFrame* pFrame = ImplGetFrame();
+ return pFrame ? pFrame->GetWindow() : nullptr;
+}
+
vcl::Window* Window::ImplGetParent() const
{
return mpWindowImpl ? mpWindowImpl->mpParent.get() : nullptr;