sw/source/uibase/app/docsh.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 8255c79ef4798f7312bfbac21206ca2deeaf55a1 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Thu Jun 12 07:47:25 2025 +0200 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Thu Jun 12 10:57:03 2025 +0200 dynamic_cast -> static_cast Change-Id: Ie699763b23a96abb2ba8420a401d43c3ae563ac6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186396 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 3ad41f436836..b24ecbd58464 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -893,7 +893,9 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup, rtl::Reference<SwXTextDocument> SwDocShell::GetBaseModel() const { - return dynamic_cast<SwXTextDocument*>(SfxObjectShell::GetBaseModel().get()); + const auto xModel = SfxObjectShell::GetBaseModel(); + assert(!xModel || dynamic_cast<SwXTextDocument*>(xModel.get())); + return static_cast<SwXTextDocument*>(xModel.get()); } void SwDocShell::SetVisArea( const tools::Rectangle &rRect )