sw/source/uibase/app/docstyle.cxx | 2 +- xmloff/source/core/xmlimp.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
New commits: commit 4041cdbadc71350e146155f1a8e3c279cbc7dfce Author: Samuel Mehrbrodt <[email protected]> AuthorDate: Mon Feb 23 14:25:10 2026 +0100 Commit: Samuel Mehrbrodt <[email protected]> CommitDate: Thu Feb 26 07:46:01 2026 +0100 Check if entry exists in storage before accessing it Prevents warnings like warn:xmloff.core:1530244:1530244:xmloff/source/core/xmlimp.cxx:579: DBG_UNHANDLED_EXCEPTION in load when: exception getting BuildId exception: com.sun.star.container.NoSuchElementException message: "at package/source/xstor/xstorage.cxx:2688" Change-Id: I4bdb4d10bf96a9b4d24a928114b2f8351b46148e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200057 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <[email protected]> diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 1c2ab9682398..95628b22c471 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -491,7 +491,7 @@ namespace { { try { OUString streamName = u"l10n"_ustr; - if (xStorage && xStorage->isStreamElement(streamName)) + if (xStorage && xStorage->hasByName(streamName) && xStorage->isStreamElement(streamName)) { auto xIn = xStorage->openStreamElement(streamName, css::embed::ElementModes::READ|css::embed::ElementModes::NOCREATE); if (!xIn) commit 7f469271191681ea2746083d66aa03f00a2c3ed4 Author: Samuel Mehrbrodt <[email protected]> AuthorDate: Mon Feb 23 13:55:05 2026 +0100 Commit: Samuel Mehrbrodt <[email protected]> CommitDate: Thu Feb 26 07:45:50 2026 +0100 Create style before setting parent This prevents warnings seen on document load like: warn:legacy.osl:1377066:1377066:sw/source/uibase/app/docstyle.cxx:1343: Collection missing! Change-Id: I555cf8fe5ca24bc860bf5ce783cb2d69e8ebbd29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200055 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <[email protected]> diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index 5f8ea37308fe..45d0d8ad3c67 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -2673,8 +2673,8 @@ SfxStyleSheetBase& SwDocStyleSheetPool::Make( const OUString& rName, mxStyleSheet->SetMask(_nMask) ; mxStyleSheet->SetFamily(eFam); mxStyleSheet->SetPhysical(true); - mxStyleSheet->SetParent(rParentStyleSheetName); mxStyleSheet->Create(); + mxStyleSheet->SetParent(rParentStyleSheetName); return *mxStyleSheet; }
