include/oox/token/tokenmap.hxx | 5 +++-- oox/CppunitTest_oox_tokenmap.mk | 38 +------------------------------------- 2 files changed, 4 insertions(+), 39 deletions(-)
New commits: commit b475873cd0f6abafb81cb02edc7db577f83d682f Author: Stephan Bergmann <[email protected]> AuthorDate: Wed Mar 4 10:01:59 2026 +0100 Commit: Stephan Bergmann <[email protected]> CommitDate: Wed Mar 4 12:36:00 2026 +0100 Stop using gb_CppunitTest_use_library_objects in CppunitTest_oox_tokenmap ...by simply making the two used functions OOX_DLLPUBLIC. This solves an issue for mergelibs builds, where 09605513f455972a3ad64d3bf4b5fe12af87e483 "SmartArt: Progress in standard FileFormat RoundTrip" had started to make this test fail with > cppunittester: oox/source/drawingml/diagram/diagramhelper_oox.cxx:542: oox::drawingml::DiagramHelperFactory_oox::DiagramHelperFactory_oox(): Assertion `nullptr == pSingleGlobalDiagramHelperFactory_svx && "DiagramHelperFactory initialized multiple times (!)"' failed. as that > static DiagramHelperFactory_oox aSingleGlobalDiagramHelperFactory_oox; in oox/source/drawingml/diagram/diagramhelper_oox.cxx was present twice now in the process, in workdir/LinkTarget/CppunitTest/libtest_oox_tokenmap.so and in instdir/program/libmergedlo.so. Change-Id: I9c7ea35339a188c427a50e18d7eb7978e63e52fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200931 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> diff --git a/include/oox/token/tokenmap.hxx b/include/oox/token/tokenmap.hxx index cad16f77b35a..a47a042d5d7c 100644 --- a/include/oox/token/tokenmap.hxx +++ b/include/oox/token/tokenmap.hxx @@ -25,6 +25,7 @@ #include <string_view> #include <com/sun/star/uno/Sequence.hxx> +#include <oox/dllapi.h> #include <rtl/ustring.hxx> #include <sal/types.h> @@ -34,7 +35,7 @@ namespace oox { namespace TokenMap { /** Returns the token identifier for a UTF8 string passed in pToken */ -sal_Int32 getTokenFromUtf8(std::string_view token); +OOX_DLLPUBLIC sal_Int32 getTokenFromUtf8(std::string_view token); /** Returns the token identifier for the passed Unicode token name. */ inline sal_Int32 getTokenFromUnicode(std::u16string_view rUnicodeName) @@ -43,7 +44,7 @@ inline sal_Int32 getTokenFromUnicode(std::u16string_view rUnicodeName) } /** Returns the UTF8 name of the passed token identifier as byte sequence. */ -css::uno::Sequence<sal_Int8> const& getUtf8TokenName(sal_Int32 nToken); +OOX_DLLPUBLIC css::uno::Sequence<sal_Int8> const& getUtf8TokenName(sal_Int32 nToken); /** Returns the name of the passed token identifier as OUString. */ inline OUString getUnicodeTokenName(sal_Int32 nToken) diff --git a/oox/CppunitTest_oox_tokenmap.mk b/oox/CppunitTest_oox_tokenmap.mk index ddd7b8ef1fcd..e4cc2d6ec9e7 100644 --- a/oox/CppunitTest_oox_tokenmap.mk +++ b/oox/CppunitTest_oox_tokenmap.mk @@ -18,46 +18,10 @@ $(eval $(call gb_CppunitTest_use_custom_headers,oox_tokenmap,oox/generated)) $(eval $(call gb_CppunitTest_use_sdk_api,oox_tokenmap)) -$(eval $(call gb_CppunitTest_use_library_objects,oox_tokenmap,oox)) - -ifeq ($(TLS),OPENSSL) -$(eval $(call gb_CppunitTest_use_externals,oox_tokenmap,\ - openssl \ - openssl_headers \ -)) -else -ifeq ($(TLS),NSS) -$(eval $(call gb_CppunitTest_use_externals,oox_tokenmap,\ - plc4 \ - nss3 \ -)) -endif -endif - $(eval $(call gb_CppunitTest_use_libraries,oox_tokenmap,\ - $(call gb_Helper_optional,AVMEDIA,avmedia) \ - basegfx \ - comphelper \ cppu \ - cppuhelper \ - docmodel \ - editeng \ - drawinglayer \ - msfilter \ + oox \ sal \ - i18nlangtag \ - sax \ - sfx \ - svl \ - svt \ - svx \ - svxcore \ - sot \ - tl \ - utl \ - vcl \ - xo \ - xmlscript \ )) # vim: set noet sw=4 ts=4:
