external/icu/ExternalProject_icu.mk | 3 ++- external/nss/ExternalProject_nss.mk | 3 ++- setup_native/Library_instooofiltmsi.mk | 4 +++- setup_native/Library_qslnkmsi.mk | 4 +++- setup_native/Library_reg4allmsdoc.mk | 4 +++- setup_native/Library_reg_dlls.mk | 4 +++- setup_native/Library_regactivex.mk | 4 +++- setup_native/Library_sdqsmsi.mk | 4 +++- setup_native/Library_sellangmsi.mk | 4 +++- setup_native/Library_shlxtmsi.mk | 4 +++- setup_native/Library_sn_tools.mk | 4 +++- setup_native/StaticLibrary_quickstarter.mk | 4 +++- setup_native/StaticLibrary_seterror.mk | 4 +++- sw/inc/unosett.hxx | 2 ++ sw/inc/unotxdoc.hxx | 1 + sw/source/core/unocore/unosett.cxx | 18 ++++++++++-------- sw/source/uibase/uno/unotxdoc.cxx | 5 +++++ sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx | 8 ++++---- 18 files changed, 59 insertions(+), 25 deletions(-)
New commits: commit c28615d0c4d0493907d2dea9cefd2f6ac7293ffb Author: Noel Grandin <[email protected]> AuthorDate: Mon Dec 1 10:18:26 2025 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Mon Dec 1 12:01:29 2025 +0100 use more concrete UNO in DomainMapper_Impl Change-Id: I572aa3e165e8e2f59d80ec51bd91aa3a059fd532 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194853 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx index 717083ca2334..daf20f125611 100644 --- a/sw/inc/unosett.hxx +++ b/sw/inc/unosett.hxx @@ -187,6 +187,8 @@ public: virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; + SW_DLLPUBLIC css::uno::Sequence<css::beans::PropertyValue> getRuleByIndex(sal_Int32 nIndex); + css::uno::Sequence< css::beans::PropertyValue> GetNumberingRuleByIndex(const SwNumRule& rNumRule, sal_Int32 nIndex)const; /// @throws css::uno::RuntimeException diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx index 8f463b3cc7b0..53c9814f6ff1 100644 --- a/sw/inc/unotxdoc.hxx +++ b/sw/inc/unotxdoc.hxx @@ -554,6 +554,7 @@ public: rtl::Reference<SwXTextFieldTypes> getSwTextFields(); rtl::Reference<SwXTextFrames> getSwTextFrames(); rtl::Reference<SwXTextSections> getSwTextSections(); + rtl::Reference<SwXChapterNumbering> getSwChapterNumberingRules(); }; class SwXLinkTargetSupplier final : public cppu::WeakImplHelper diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index 78e0bfce281d..e6296e5dc54f 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -1173,31 +1173,33 @@ uno::Any SwXNumberingRules::getPropertyByIndex(sal_Int32 nIndex, const OUString& } uno::Any SwXNumberingRules::getByIndex(sal_Int32 nIndex) +{ + uno::Sequence<beans::PropertyValue> aRet = getRuleByIndex(nIndex); + uno::Any aVal; + aVal <<= aRet; + return aVal; +} + +uno::Sequence<beans::PropertyValue> SwXNumberingRules::getRuleByIndex(sal_Int32 nIndex) { SolarMutexGuard aGuard; if(nIndex < 0 || MAXLEVEL <= nIndex) throw lang::IndexOutOfBoundsException(); - uno::Any aVal; const SwNumRule* pRule = m_pNumRule; if(!pRule && m_pDoc && !m_sCreatedNumRuleName.isEmpty()) pRule = m_pDoc->FindNumRulePtr( m_sCreatedNumRuleName ); if(pRule) { - uno::Sequence<beans::PropertyValue> aRet = GetNumberingRuleByIndex( - *pRule, nIndex); - aVal <<= aRet; + return GetNumberingRuleByIndex(*pRule, nIndex); } else if(m_pDocShell) { - uno::Sequence<beans::PropertyValue> aRet = GetNumberingRuleByIndex( - *m_pDocShell->GetDoc()->GetOutlineNumRule(), nIndex); - aVal <<= aRet; + return GetNumberingRuleByIndex(*m_pDocShell->GetDoc()->GetOutlineNumRule(), nIndex); } else throw uno::RuntimeException(u"Could not get numbering rule."_ustr); - return aVal; } uno::Type SwXNumberingRules::getElementType() diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index ccd71c75ff8d..cc9a3d1b22b3 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -602,6 +602,11 @@ Reference< XPropertySet > SwXTextDocument::getLineNumberingProperties() } Reference< XIndexReplace > SwXTextDocument::getChapterNumberingRules() +{ + return getSwChapterNumberingRules(); +} + +rtl::Reference< SwXChapterNumbering > SwXTextDocument::getSwChapterNumberingRules() { SolarMutexGuard aGuard; ThrowIfInvalid(); diff --git a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx index 5072443a391a..641f37d51349 100644 --- a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx +++ b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx @@ -7611,9 +7611,9 @@ void DomainMapper_Impl::handleToc } - uno::Reference<container::XIndexAccess> xChapterNumberingRules; + rtl::Reference<SwXChapterNumbering> xChapterNumberingRules; if (m_xTextDocument) - xChapterNumberingRules = m_xTextDocument->getChapterNumberingRules(); + xChapterNumberingRules = m_xTextDocument->getSwChapterNumberingRules(); rtl::Reference<SwXStyleFamily> xStyles; if (m_xTextDocument) { @@ -7636,8 +7636,8 @@ void DomainMapper_Impl::handleToc { // This relies on the chapter numbering rules already defined // (see ListDef::CreateNumberingRules) - uno::Sequence<beans::PropertyValue> props; - xChapterNumberingRules->getByIndex(nLevel - 1) >>= props; + uno::Sequence<beans::PropertyValue> props = + xChapterNumberingRules->getRuleByIndex(nLevel - 1); bool bHasNumbering = false; bool bUseTabStop = false; for (const auto& propval : props) commit 3ff253e277a8b67d04c87dfae74f503b4cb0dc5e Author: Michael Stahl <[email protected]> AuthorDate: Thu Nov 27 17:32:22 2025 +0100 Commit: Michael Stahl <[email protected]> CommitDate: Mon Dec 1 12:01:23 2025 +0100 gbuild: -fsanitize=address MSVC build setup_native assorted DLLs must have ASAN disabled. ICU build doesn't work, so disable ASAN for that. This built with MSVC 2022 and: CC=...cl.exe -fsanitize=address CXX=...cl.exe -fsanitize=address --disable-firebird-sdbc --disable-skia --disable-pdfium Change-Id: I296241e43b68579fdd9b6af9c98a5b541c8ae89a (cherry picked from commit 98b92b339fa3c28319f3f6cec94abb04229f487a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194728 Reviewed-by: Stephan Bergmann <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> (cherry picked from commit 579956c4c54f498a22b8e5ed20468ceb9a6e0e30) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194866 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Jenkins diff --git a/external/icu/ExternalProject_icu.mk b/external/icu/ExternalProject_icu.mk index 5abacf423039..d7b45f4c030f 100644 --- a/external/icu/ExternalProject_icu.mk +++ b/external/icu/ExternalProject_icu.mk @@ -23,7 +23,8 @@ $(call gb_ExternalProject_get_state_target,icu,build) : $(call gb_Trace_StartRange,icu,EXTERNAL) $(call gb_ExternalProject_run,build,\ $(WSL) autoconf -f \ - && export LIB="$(ILIB)" PYTHONWARNINGS="default" \ + && export CC="$(filter-out -fsanitize%,$(CC))" CXX="$(filter-out -fsanitize%,$(CXX))" \ + LIB="$(ILIB)" PYTHONWARNINGS="default" \ gb_ICU_XFLAGS="-FS $(SOLARINC) $(gb_DEBUGINFO_FLAGS) $(if $(MSVC_USE_DEBUG_RUNTIME),-MDd,-MD -Gy)" \ && CFLAGS="$${gb_ICU_XFLAGS}" CPPFLAGS="$(SOLARINC)" CXXFLAGS="$${gb_ICU_XFLAGS} $(CXXFLAGS_CXX11)" \ INSTALL=`cygpath -m /usr/bin/install` $(if $(MSVC_USE_DEBUG_RUNTIME),LDFLAGS="-DEBUG") \ diff --git a/external/nss/ExternalProject_nss.mk b/external/nss/ExternalProject_nss.mk index 3a9715862abe..bc0b18f7fc39 100644 --- a/external/nss/ExternalProject_nss.mk +++ b/external/nss/ExternalProject_nss.mk @@ -43,7 +43,8 @@ $(call gb_ExternalProject_get_state_target,nss,build): \ $(MAKE) nss_build_all RC="rc.exe $(SOLARINC)" \ NSINSTALL='$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/external/nss/nsinstall.py' \ NSS_DISABLE_GTESTS=1 \ - CCC="$(CXX)" \ + CC="$(patsubst %,\"%\",$(CC))" \ + CCC="$(patsubst %,\"%\",$(CXX))" \ ,nss) $(call gb_Trace_EndRange,nss,EXTERNAL) diff --git a/setup_native/Library_instooofiltmsi.mk b/setup_native/Library_instooofiltmsi.mk index 785fda3f35e6..9238a8c5a800 100644 --- a/setup_native/Library_instooofiltmsi.mk +++ b/setup_native/Library_instooofiltmsi.mk @@ -15,7 +15,6 @@ $(eval $(call gb_Library_add_defs,instooofiltmsi,\ $(eval $(call gb_Library_add_cxxflags,instooofiltmsi,\ $(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \ - $(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \ )) $(eval $(call gb_Library_add_ldflags,instooofiltmsi,\ @@ -36,4 +35,7 @@ $(eval $(call gb_Library_use_system_win32_libs,instooofiltmsi,\ advapi32 \ )) +$(call gb_Library_get_linktarget_target,instooofiltmsi): gb_CC := $(filter-out -fsanitize%,$(gb_CC)) +$(call gb_Library_get_linktarget_target,instooofiltmsi): gb_CXX := $(filter-out -fsanitize%,$(gb_CXX)) + # vim: set noet sw=4 ts=4: diff --git a/setup_native/Library_qslnkmsi.mk b/setup_native/Library_qslnkmsi.mk index f2246a1b6395..4703c403de9c 100644 --- a/setup_native/Library_qslnkmsi.mk +++ b/setup_native/Library_qslnkmsi.mk @@ -15,7 +15,6 @@ $(eval $(call gb_Library_add_defs,qslnkmsi,\ $(eval $(call gb_Library_add_cxxflags,qslnkmsi,\ $(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \ - $(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \ )) $(eval $(call gb_Library_add_ldflags,qslnkmsi,\ @@ -43,4 +42,7 @@ $(eval $(call gb_Library_use_system_win32_libs,qslnkmsi,\ shell32 \ )) +$(call gb_Library_get_linktarget_target,qslnkmsi): gb_CC := $(filter-out -fsanitize%,$(gb_CC)) +$(call gb_Library_get_linktarget_target,qslnkmsi): gb_CXX := $(filter-out -fsanitize%,$(gb_CXX)) + # vim: set noet sw=4 ts=4: diff --git a/setup_native/Library_reg4allmsdoc.mk b/setup_native/Library_reg4allmsdoc.mk index 0e67147dfe49..bdb63c0f578b 100644 --- a/setup_native/Library_reg4allmsdoc.mk +++ b/setup_native/Library_reg4allmsdoc.mk @@ -15,7 +15,6 @@ $(eval $(call gb_Library_add_defs,reg4allmsdoc,\ $(eval $(call gb_Library_add_cxxflags,reg4allmsdoc,\ $(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \ - $(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \ )) $(eval $(call gb_Library_add_ldflags,reg4allmsdoc,\ @@ -40,4 +39,7 @@ $(eval $(call gb_Library_use_system_win32_libs,reg4allmsdoc,\ shlwapi \ )) +$(call gb_Library_get_linktarget_target,reg4allmsdoc): gb_CC := $(filter-out -fsanitize%,$(gb_CC)) +$(call gb_Library_get_linktarget_target,reg4allmsdoc): gb_CXX := $(filter-out -fsanitize%,$(gb_CXX)) + # vim: set noet sw=4 ts=4: diff --git a/setup_native/Library_reg_dlls.mk b/setup_native/Library_reg_dlls.mk index d4decdcce2a4..34ecb919f9f7 100644 --- a/setup_native/Library_reg_dlls.mk +++ b/setup_native/Library_reg_dlls.mk @@ -15,7 +15,6 @@ $(eval $(call gb_Library_add_defs,reg_dlls,\ $(eval $(call gb_Library_add_cxxflags,reg_dlls,\ $(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \ - $(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \ )) $(eval $(call gb_Library_add_ldflags,reg_dlls,\ @@ -38,4 +37,7 @@ $(eval $(call gb_Library_use_system_win32_libs,reg_dlls,\ Msi \ )) +$(call gb_Library_get_linktarget_target,reg_dlls): gb_CC := $(filter-out -fsanitize%,$(gb_CC)) +$(call gb_Library_get_linktarget_target,reg_dlls): gb_CXX := $(filter-out -fsanitize%,$(gb_CXX)) + # vim: set noet sw=4 ts=4: diff --git a/setup_native/Library_regactivex.mk b/setup_native/Library_regactivex.mk index 0789da0dbd03..7978f8872e55 100644 --- a/setup_native/Library_regactivex.mk +++ b/setup_native/Library_regactivex.mk @@ -15,7 +15,6 @@ $(eval $(call gb_Library_add_defs,regactivex,\ $(eval $(call gb_Library_add_cxxflags,regactivex,\ $(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \ - $(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \ )) $(eval $(call gb_Library_add_ldflags,regactivex,\ @@ -36,4 +35,7 @@ $(eval $(call gb_Library_use_system_win32_libs,regactivex,\ msi \ )) +$(call gb_Library_get_linktarget_target,regactivex): gb_CC := $(filter-out -fsanitize%,$(gb_CC)) +$(call gb_Library_get_linktarget_target,regactivex): gb_CXX := $(filter-out -fsanitize%,$(gb_CXX)) + # vim: set noet sw=4 ts=4: diff --git a/setup_native/Library_sdqsmsi.mk b/setup_native/Library_sdqsmsi.mk index bc769c65b85c..162d499e62c4 100644 --- a/setup_native/Library_sdqsmsi.mk +++ b/setup_native/Library_sdqsmsi.mk @@ -15,7 +15,6 @@ $(eval $(call gb_Library_add_defs,sdqsmsi,\ $(eval $(call gb_Library_add_cxxflags,sdqsmsi,\ $(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \ - $(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \ )) $(eval $(call gb_Library_add_ldflags,sdqsmsi,\ @@ -43,4 +42,7 @@ $(eval $(call gb_Library_use_system_win32_libs,sdqsmsi,\ shell32 \ )) +$(call gb_Library_get_linktarget_target,sdqsmsi): gb_CC := $(filter-out -fsanitize%,$(gb_CC)) +$(call gb_Library_get_linktarget_target,sdqsmsi): gb_CXX := $(filter-out -fsanitize%,$(gb_CXX)) + # vim: set noet sw=4 ts=4: diff --git a/setup_native/Library_sellangmsi.mk b/setup_native/Library_sellangmsi.mk index 962ebf7639c0..b98f2df039fe 100644 --- a/setup_native/Library_sellangmsi.mk +++ b/setup_native/Library_sellangmsi.mk @@ -19,7 +19,6 @@ $(eval $(call gb_Library_add_defs,sellangmsi,\ $(eval $(call gb_Library_add_cxxflags,sellangmsi,\ $(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \ - $(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \ )) $(eval $(call gb_Library_add_ldflags,sellangmsi,\ @@ -44,4 +43,7 @@ $(eval $(call gb_Library_use_system_win32_libs,sellangmsi,\ shell32 \ )) +$(call gb_Library_get_linktarget_target,sellangmsi): gb_CC := $(filter-out -fsanitize%,$(gb_CC)) +$(call gb_Library_get_linktarget_target,sellangmsi): gb_CXX := $(filter-out -fsanitize%,$(gb_CXX)) + # vim: set noet sw=4 ts=4: diff --git a/setup_native/Library_shlxtmsi.mk b/setup_native/Library_shlxtmsi.mk index 63488e79a989..78653d9bd8f4 100644 --- a/setup_native/Library_shlxtmsi.mk +++ b/setup_native/Library_shlxtmsi.mk @@ -17,7 +17,6 @@ $(eval $(call gb_Library_add_defs,shlxtmsi,\ $(eval $(call gb_Library_add_cxxflags,shlxtmsi,\ $(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \ - $(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \ )) $(eval $(call gb_Library_add_ldflags,shlxtmsi,\ @@ -50,4 +49,7 @@ $(eval $(call gb_Library_use_system_win32_libs,shlxtmsi,\ psapi \ )) +$(call gb_Library_get_linktarget_target,shlxtmsi): gb_CC := $(filter-out -fsanitize%,$(gb_CC)) +$(call gb_Library_get_linktarget_target,shlxtmsi): gb_CXX := $(filter-out -fsanitize%,$(gb_CXX)) + # vim: set noet sw=4 ts=4: diff --git a/setup_native/Library_sn_tools.mk b/setup_native/Library_sn_tools.mk index 061cdbad37f1..4a16090cd0de 100644 --- a/setup_native/Library_sn_tools.mk +++ b/setup_native/Library_sn_tools.mk @@ -15,7 +15,6 @@ $(eval $(call gb_Library_add_defs,sn_tools,\ $(eval $(call gb_Library_add_cxxflags,sn_tools,\ $(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \ - $(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \ )) $(eval $(call gb_Library_add_ldflags,sn_tools,\ @@ -41,4 +40,7 @@ $(eval $(call gb_Library_use_system_win32_libs,sn_tools,\ advapi32 \ )) +$(call gb_Library_get_linktarget_target,sn_tools): gb_CC := $(filter-out -fsanitize%,$(gb_CC)) +$(call gb_Library_get_linktarget_target,sn_tools): gb_CXX := $(filter-out -fsanitize%,$(gb_CXX)) + # vim: set noet sw=4 ts=4: diff --git a/setup_native/StaticLibrary_quickstarter.mk b/setup_native/StaticLibrary_quickstarter.mk index 1bb0c5405c0c..66dba4534a7b 100644 --- a/setup_native/StaticLibrary_quickstarter.mk +++ b/setup_native/StaticLibrary_quickstarter.mk @@ -15,11 +15,13 @@ $(eval $(call gb_StaticLibrary_add_defs,quickstarter,\ $(eval $(call gb_StaticLibrary_add_cxxflags,quickstarter,\ $(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \ - $(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \ )) $(eval $(call gb_StaticLibrary_add_exception_objects,quickstarter,\ setup_native/source/win32/customactions/quickstarter/quickstarter \ )) +$(call gb_StaticLibrary_get_linktarget_target,quickstarter): gb_CC := $(filter-out -fsanitize%,$(gb_CC)) +$(call gb_StaticLibrary_get_linktarget_target,quickstarter): gb_CXX := $(filter-out -fsanitize%,$(gb_CXX)) + # vim: set noet sw=4 ts=4: diff --git a/setup_native/StaticLibrary_seterror.mk b/setup_native/StaticLibrary_seterror.mk index c6fdb80c9889..c33b8c2011e0 100644 --- a/setup_native/StaticLibrary_seterror.mk +++ b/setup_native/StaticLibrary_seterror.mk @@ -15,11 +15,13 @@ $(eval $(call gb_StaticLibrary_add_defs,seterror,\ $(eval $(call gb_StaticLibrary_add_cxxflags,seterror,\ $(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \ - $(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \ )) $(eval $(call gb_StaticLibrary_add_exception_objects,seterror,\ setup_native/source/win32/customactions/tools/seterror \ )) +$(call gb_StaticLibrary_get_linktarget_target,seterror): gb_CC := $(filter-out -fsanitize%,$(gb_CC)) +$(call gb_StaticLibrary_get_linktarget_target,seterror): gb_CXX := $(filter-out -fsanitize%,$(gb_CXX)) + # vim: set noet sw=4 ts=4:
