diff options
Diffstat (limited to 'sw')
37 files changed, 217 insertions, 47 deletions
diff --git a/sw/CppunitTest_sw_docbookexport.mk b/sw/CppunitTest_sw_docbookexport.mk index bbb3c9e8f8bd..2e34f8b8767b 100644 --- a/sw/CppunitTest_sw_docbookexport.mk +++ b/sw/CppunitTest_sw_docbookexport.mk @@ -43,7 +43,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_docbookexport,\ $$(INCLUDE) \ )) -$(eval $(call gb_CppunitTest_use_sdk_api,sw_docbookexport)) +$(eval $(call gb_CppunitTest_use_api,sw_docbookexport,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_docbookexport)) $(eval $(call gb_CppunitTest_use_vcl,sw_docbookexport)) diff --git a/sw/CppunitTest_sw_filters_test.mk b/sw/CppunitTest_sw_filters_test.mk index cf0f978a26eb..9415a1adca43 100644 --- a/sw/CppunitTest_sw_filters_test.mk +++ b/sw/CppunitTest_sw_filters_test.mk @@ -44,7 +44,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_filters_test,\ $$(INCLUDE) \ )) -$(eval $(call gb_CppunitTest_use_sdk_api,sw_filters_test)) +$(eval $(call gb_CppunitTest_use_api,sw_filters_test,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_filters_test)) $(eval $(call gb_CppunitTest_use_vcl,sw_filters_test)) diff --git a/sw/CppunitTest_sw_fodfexport.mk b/sw/CppunitTest_sw_fodfexport.mk index 4703b85435f7..d49c8c5795ca 100644 --- a/sw/CppunitTest_sw_fodfexport.mk +++ b/sw/CppunitTest_sw_fodfexport.mk @@ -41,7 +41,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_fodfexport,\ $$(INCLUDE) \ )) -$(eval $(call gb_CppunitTest_use_sdk_api,sw_fodfexport)) +$(eval $(call gb_CppunitTest_use_api,sw_fodfexport,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_fodfexport)) $(eval $(call gb_CppunitTest_use_vcl,sw_fodfexport)) diff --git a/sw/CppunitTest_sw_globalfilter.mk b/sw/CppunitTest_sw_globalfilter.mk index 97ce20201c6d..d07ecf840daa 100644 --- a/sw/CppunitTest_sw_globalfilter.mk +++ b/sw/CppunitTest_sw_globalfilter.mk @@ -42,7 +42,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_globalfilter,\ $$(INCLUDE) \ )) -$(eval $(call gb_CppunitTest_use_sdk_api,sw_globalfilter)) +$(eval $(call gb_CppunitTest_use_api,sw_globalfilter,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_globalfilter)) $(eval $(call gb_CppunitTest_use_vcl,sw_globalfilter)) diff --git a/sw/CppunitTest_sw_htmlexport.mk b/sw/CppunitTest_sw_htmlexport.mk index 4dabbe61606f..2ff28694f452 100644 --- a/sw/CppunitTest_sw_htmlexport.mk +++ b/sw/CppunitTest_sw_htmlexport.mk @@ -43,7 +43,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_htmlexport,\ $$(INCLUDE) \ )) -$(eval $(call gb_CppunitTest_use_sdk_api,sw_htmlexport)) +$(eval $(call gb_CppunitTest_use_api,sw_htmlexport,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_htmlexport)) $(eval $(call gb_CppunitTest_use_vcl,sw_htmlexport)) diff --git a/sw/CppunitTest_sw_htmlimport.mk b/sw/CppunitTest_sw_htmlimport.mk index f1cf2fd24d67..16147462cb6c 100644 --- a/sw/CppunitTest_sw_htmlimport.mk +++ b/sw/CppunitTest_sw_htmlimport.mk @@ -46,7 +46,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_htmlimport,\ $$(INCLUDE) \ )) -$(eval $(call gb_CppunitTest_use_sdk_api,sw_htmlimport)) +$(eval $(call gb_CppunitTest_use_api,sw_htmlimport,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_htmlimport)) $(eval $(call gb_CppunitTest_use_vcl,sw_htmlimport)) diff --git a/sw/CppunitTest_sw_layoutwriter.mk b/sw/CppunitTest_sw_layoutwriter.mk index 675299180e44..e5f5a180920e 100644 --- a/sw/CppunitTest_sw_layoutwriter.mk +++ b/sw/CppunitTest_sw_layoutwriter.mk @@ -48,7 +48,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_layoutwriter,\ $$(INCLUDE) \ )) -$(eval $(call gb_CppunitTest_use_sdk_api,sw_layoutwriter)) +$(eval $(call gb_CppunitTest_use_api,sw_layoutwriter,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_layoutwriter)) $(eval $(call gb_CppunitTest_use_vcl,sw_layoutwriter)) diff --git a/sw/CppunitTest_sw_mailmerge.mk b/sw/CppunitTest_sw_mailmerge.mk index 766be12acbb2..3db2df0cf2fd 100644 --- a/sw/CppunitTest_sw_mailmerge.mk +++ b/sw/CppunitTest_sw_mailmerge.mk @@ -31,7 +31,11 @@ $(eval $(call gb_CppunitTest_use_externals,sw_mailmerge, \ libxml2 \ )) -$(eval $(call gb_CppunitTest_use_sdk_api,sw_mailmerge)) +$(eval $(call gb_CppunitTest_use_api,sw_mailmerge,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_components,sw_mailmerge, \ basic/util/sb \ diff --git a/sw/CppunitTest_sw_odfexport.mk b/sw/CppunitTest_sw_odfexport.mk index 75687878d3ab..b3771e3af57d 100644 --- a/sw/CppunitTest_sw_odfexport.mk +++ b/sw/CppunitTest_sw_odfexport.mk @@ -42,7 +42,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_odfexport,\ $$(INCLUDE) \ )) -$(eval $(call gb_CppunitTest_use_sdk_api,sw_odfexport)) +$(eval $(call gb_CppunitTest_use_api,sw_odfexport,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_odfexport)) $(eval $(call gb_CppunitTest_use_vcl,sw_odfexport)) diff --git a/sw/CppunitTest_sw_odfimport.mk b/sw/CppunitTest_sw_odfimport.mk index 2f33310d9cf8..e322445d052f 100644 --- a/sw/CppunitTest_sw_odfimport.mk +++ b/sw/CppunitTest_sw_odfimport.mk @@ -43,7 +43,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_odfimport,\ $$(INCLUDE) \ )) -$(eval $(call gb_CppunitTest_use_sdk_api,sw_odfimport)) +$(eval $(call gb_CppunitTest_use_api,sw_odfimport,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_odfimport)) $(eval $(call gb_CppunitTest_use_vcl,sw_odfimport)) diff --git a/sw/CppunitTest_sw_ooxmlencryption.mk b/sw/CppunitTest_sw_ooxmlencryption.mk index 09b2fb1c0130..5485199be139 100644 --- a/sw/CppunitTest_sw_ooxmlencryption.mk +++ b/sw/CppunitTest_sw_ooxmlencryption.mk @@ -31,7 +31,12 @@ $(eval $(call gb_CppunitTest_set_include,sw_ooxmlencryption,\ $$(INCLUDE) \ )) -$(eval $(call gb_CppunitTest_use_sdk_api,sw_ooxmlencryption)) +$(eval $(call gb_CppunitTest_use_api,sw_ooxmlencryption,\ + udkapi \ + offapi \ + oovbaapi \ +)) + $(eval $(call gb_CppunitTest_use_ure,sw_ooxmlencryption)) $(eval $(call gb_CppunitTest_use_vcl,sw_ooxmlencryption)) diff --git a/sw/CppunitTest_sw_ooxmlexport8.mk b/sw/CppunitTest_sw_ooxmlexport8.mk index c46530afaef0..13e9bd6c1140 100644 --- a/sw/CppunitTest_sw_ooxmlexport8.mk +++ b/sw/CppunitTest_sw_ooxmlexport8.mk @@ -55,7 +55,11 @@ $(eval $(call gb_CppunitTest_use_system_darwin_frameworks,sw_ooxmlexport8,\ endif -$(eval $(call gb_CppunitTest_use_sdk_api,sw_ooxmlexport8)) +$(eval $(call gb_CppunitTest_use_api,sw_ooxmlexport8,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_ooxmlexport8)) $(eval $(call gb_CppunitTest_use_vcl,sw_ooxmlexport8)) diff --git a/sw/CppunitTest_sw_ooxmlfieldexport.mk b/sw/CppunitTest_sw_ooxmlfieldexport.mk index 8c753950b161..192e4bc7a5fc 100644 --- a/sw/CppunitTest_sw_ooxmlfieldexport.mk +++ b/sw/CppunitTest_sw_ooxmlfieldexport.mk @@ -31,7 +31,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_ooxmlfieldexport,\ $$(INCLUDE) \ )) -$(eval $(call gb_CppunitTest_use_sdk_api,sw_ooxmlfieldexport)) +$(eval $(call gb_CppunitTest_use_api,sw_ooxmlfieldexport,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_ooxmlfieldexport)) $(eval $(call gb_CppunitTest_use_vcl,sw_ooxmlfieldexport)) diff --git a/sw/CppunitTest_sw_ooxmlimport.mk b/sw/CppunitTest_sw_ooxmlimport.mk index 3f887efa53ed..e969118f99d5 100644 --- a/sw/CppunitTest_sw_ooxmlimport.mk +++ b/sw/CppunitTest_sw_ooxmlimport.mk @@ -55,7 +55,11 @@ $(eval $(call gb_CppunitTest_use_system_darwin_frameworks,sw_ooxmlimport,\ endif -$(eval $(call gb_CppunitTest_use_sdk_api,sw_ooxmlimport)) +$(eval $(call gb_CppunitTest_use_api,sw_ooxmlimport,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_ooxmlimport)) $(eval $(call gb_CppunitTest_use_vcl,sw_ooxmlimport)) diff --git a/sw/CppunitTest_sw_ooxmlimport2.mk b/sw/CppunitTest_sw_ooxmlimport2.mk index d170cb822b2e..1d41899668af 100644 --- a/sw/CppunitTest_sw_ooxmlimport2.mk +++ b/sw/CppunitTest_sw_ooxmlimport2.mk @@ -55,7 +55,11 @@ $(eval $(call gb_CppunitTest_use_system_darwin_frameworks,sw_ooxmlimport2,\ endif -$(eval $(call gb_CppunitTest_use_sdk_api,sw_ooxmlimport2)) +$(eval $(call gb_CppunitTest_use_api,sw_ooxmlimport2,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_ooxmlimport2)) $(eval $(call gb_CppunitTest_use_vcl,sw_ooxmlimport2)) diff --git a/sw/CppunitTest_sw_ooxmllinks.mk b/sw/CppunitTest_sw_ooxmllinks.mk index 78b81d4a14b4..6e7babb03a5e 100644 --- a/sw/CppunitTest_sw_ooxmllinks.mk +++ b/sw/CppunitTest_sw_ooxmllinks.mk @@ -31,7 +31,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_ooxmllinks,\ $$(INCLUDE) \ )) -$(eval $(call gb_CppunitTest_use_sdk_api,sw_ooxmllinks)) +$(eval $(call gb_CppunitTest_use_api,sw_ooxmllinks,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_ooxmllinks)) $(eval $(call gb_CppunitTest_use_vcl,sw_ooxmllinks)) diff --git a/sw/CppunitTest_sw_ooxmlw14export.mk b/sw/CppunitTest_sw_ooxmlw14export.mk index a12d9fe2270c..d04297aa0ddf 100644 --- a/sw/CppunitTest_sw_ooxmlw14export.mk +++ b/sw/CppunitTest_sw_ooxmlw14export.mk @@ -31,7 +31,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_ooxmlw14export,\ $$(INCLUDE) \ )) -$(eval $(call gb_CppunitTest_use_sdk_api,sw_ooxmlw14export)) +$(eval $(call gb_CppunitTest_use_api,sw_ooxmlw14export,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_ooxmlw14export)) $(eval $(call gb_CppunitTest_use_vcl,sw_ooxmlw14export)) diff --git a/sw/CppunitTest_sw_rtfexport.mk b/sw/CppunitTest_sw_rtfexport.mk index a09d3b4a5985..fc77c7cc67e3 100644 --- a/sw/CppunitTest_sw_rtfexport.mk +++ b/sw/CppunitTest_sw_rtfexport.mk @@ -46,7 +46,11 @@ $(eval $(call gb_CppunitTest_add_cxxflags,sw_rtfexport,\ )) endif -$(eval $(call gb_CppunitTest_use_sdk_api,sw_rtfexport)) +$(eval $(call gb_CppunitTest_use_api,sw_rtfexport,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_rtfexport)) $(eval $(call gb_CppunitTest_use_vcl,sw_rtfexport)) diff --git a/sw/CppunitTest_sw_rtfexport2.mk b/sw/CppunitTest_sw_rtfexport2.mk index 3519afec5e7a..98edcaee2fb1 100644 --- a/sw/CppunitTest_sw_rtfexport2.mk +++ b/sw/CppunitTest_sw_rtfexport2.mk @@ -48,7 +48,11 @@ $(eval $(call gb_CppunitTest_add_cxxflags,sw_rtfexport2,\ )) endif -$(eval $(call gb_CppunitTest_use_sdk_api,sw_rtfexport2)) +$(eval $(call gb_CppunitTest_use_api,sw_rtfexport2,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_rtfexport2)) $(eval $(call gb_CppunitTest_use_vcl,sw_rtfexport2)) diff --git a/sw/CppunitTest_sw_rtfexport3.mk b/sw/CppunitTest_sw_rtfexport3.mk index d0ebff13c4aa..51b8583fc0d6 100644 --- a/sw/CppunitTest_sw_rtfexport3.mk +++ b/sw/CppunitTest_sw_rtfexport3.mk @@ -46,7 +46,11 @@ $(eval $(call gb_CppunitTest_add_cxxflags,sw_rtfexport3,\ )) endif -$(eval $(call gb_CppunitTest_use_sdk_api,sw_rtfexport3)) +$(eval $(call gb_CppunitTest_use_api,sw_rtfexport3,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_rtfexport3)) $(eval $(call gb_CppunitTest_use_vcl,sw_rtfexport3)) diff --git a/sw/CppunitTest_sw_rtfimport.mk b/sw/CppunitTest_sw_rtfimport.mk index 4f227b919fa1..fc68b95d1141 100644 --- a/sw/CppunitTest_sw_rtfimport.mk +++ b/sw/CppunitTest_sw_rtfimport.mk @@ -48,7 +48,11 @@ $(eval $(call gb_CppunitTest_add_cxxflags,sw_rtfimport,\ )) endif -$(eval $(call gb_CppunitTest_use_sdk_api,sw_rtfimport)) +$(eval $(call gb_CppunitTest_use_api,sw_rtfimport,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_rtfimport)) $(eval $(call gb_CppunitTest_use_vcl,sw_rtfimport)) diff --git a/sw/CppunitTest_sw_tiledrendering.mk b/sw/CppunitTest_sw_tiledrendering.mk index 3ba3d3eb4e53..9893914197f8 100644 --- a/sw/CppunitTest_sw_tiledrendering.mk +++ b/sw/CppunitTest_sw_tiledrendering.mk @@ -46,7 +46,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_tiledrendering,\ $$(INCLUDE) \ )) -$(eval $(call gb_CppunitTest_use_sdk_api,sw_tiledrendering)) +$(eval $(call gb_CppunitTest_use_api,sw_tiledrendering,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_tiledrendering)) $(eval $(call gb_CppunitTest_use_vcl,sw_tiledrendering)) diff --git a/sw/CppunitTest_sw_txtexport.mk b/sw/CppunitTest_sw_txtexport.mk index 700a174edc5b..285ac611704f 100644 --- a/sw/CppunitTest_sw_txtexport.mk +++ b/sw/CppunitTest_sw_txtexport.mk @@ -44,7 +44,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_txtexport,\ $$(INCLUDE) \ )) -$(eval $(call gb_CppunitTest_use_sdk_api,sw_txtexport)) +$(eval $(call gb_CppunitTest_use_api,sw_txtexport,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_txtexport)) $(eval $(call gb_CppunitTest_use_vcl,sw_txtexport)) diff --git a/sw/CppunitTest_sw_uiwriter.mk b/sw/CppunitTest_sw_uiwriter.mk index 05ce1b5c90d8..bb3271ec9fa3 100644 --- a/sw/CppunitTest_sw_uiwriter.mk +++ b/sw/CppunitTest_sw_uiwriter.mk @@ -51,7 +51,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_uiwriter,\ $$(INCLUDE) \ )) -$(eval $(call gb_CppunitTest_use_sdk_api,sw_uiwriter)) +$(eval $(call gb_CppunitTest_use_api,sw_uiwriter,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_uiwriter)) $(eval $(call gb_CppunitTest_use_vcl,sw_uiwriter)) diff --git a/sw/CppunitTest_sw_uwriter.mk b/sw/CppunitTest_sw_uwriter.mk index 9c305d3dcbb3..910976c4b950 100644 --- a/sw/CppunitTest_sw_uwriter.mk +++ b/sw/CppunitTest_sw_uwriter.mk @@ -72,7 +72,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_uwriter,\ $$(INCLUDE) \ )) -$(eval $(call gb_CppunitTest_use_sdk_api,sw_uwriter)) +$(eval $(call gb_CppunitTest_use_api,sw_uwriter,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_uwriter)) $(eval $(call gb_CppunitTest_use_vcl,sw_uwriter)) diff --git a/sw/CppunitTest_sw_ww8export.mk b/sw/CppunitTest_sw_ww8export.mk index fda20b5c2e28..41210a8b88b3 100644 --- a/sw/CppunitTest_sw_ww8export.mk +++ b/sw/CppunitTest_sw_ww8export.mk @@ -43,7 +43,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_ww8export,\ $$(INCLUDE) \ )) -$(eval $(call gb_CppunitTest_use_sdk_api,sw_ww8export)) +$(eval $(call gb_CppunitTest_use_api,sw_ww8export,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_ww8export)) $(eval $(call gb_CppunitTest_use_vcl,sw_ww8export)) diff --git a/sw/CppunitTest_sw_ww8export2.mk b/sw/CppunitTest_sw_ww8export2.mk index 616347d52904..a701a81180a8 100644 --- a/sw/CppunitTest_sw_ww8export2.mk +++ b/sw/CppunitTest_sw_ww8export2.mk @@ -42,7 +42,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_ww8export2,\ $$(INCLUDE) \ )) -$(eval $(call gb_CppunitTest_use_sdk_api,sw_ww8export2)) +$(eval $(call gb_CppunitTest_use_api,sw_ww8export2,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_ww8export2)) $(eval $(call gb_CppunitTest_use_vcl,sw_ww8export2)) diff --git a/sw/CppunitTest_sw_ww8import.mk b/sw/CppunitTest_sw_ww8import.mk index b7102196a27f..1ccc1a3f20aa 100644 --- a/sw/CppunitTest_sw_ww8import.mk +++ b/sw/CppunitTest_sw_ww8import.mk @@ -41,7 +41,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_ww8import,\ $$(INCLUDE) \ )) -$(eval $(call gb_CppunitTest_use_sdk_api,sw_ww8import)) +$(eval $(call gb_CppunitTest_use_api,sw_ww8import,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_ww8import)) $(eval $(call gb_CppunitTest_use_vcl,sw_ww8import)) diff --git a/sw/Library_msword.mk b/sw/Library_msword.mk index c468fbdc8e43..457c7351a9bc 100644 --- a/sw/Library_msword.mk +++ b/sw/Library_msword.mk @@ -33,7 +33,11 @@ $(eval $(call gb_Library_set_include,msword,\ $$(INCLUDE) \ )) -$(eval $(call gb_Library_use_sdk_api,msword)) +$(eval $(call gb_Library_use_api,msword,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_Library_use_libraries,msword,\ basegfx \ diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk index 78d62e03809e..446600957649 100644 --- a/sw/Library_sw.mk +++ b/sw/Library_sw.mk @@ -39,7 +39,11 @@ $(eval $(call gb_Library_use_custom_headers,sw,\ sw/generated \ )) -$(eval $(call gb_Library_use_sdk_api,sw)) +$(eval $(call gb_Library_use_api,sw,\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_Library_add_defs,sw,\ -DSW_DLLIMPLEMENTATION \ diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk index 23c737e2a740..bbacb517f697 100644 --- a/sw/Library_swui.mk +++ b/sw/Library_swui.mk @@ -38,7 +38,11 @@ $(eval $(call gb_Library_use_custom_headers,swui,\ officecfg/registry \ )) -$(eval $(call gb_Library_use_sdk_api,swui)) +$(eval $(call gb_Library_use_api,swui,\ + udkapi \ + offapi \ + oovbaapi \ +)) ifneq ($(SYSTEM_LIBXML),) $(eval $(call gb_Library_add_cxxflags,swui,\ diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx index 4a454faa970f..b9d871a50b08 100644 --- a/sw/inc/swmodule.hxx +++ b/sw/inc/swmodule.hxx @@ -31,6 +31,7 @@ #include "swdllapi.h" #include "shellid.hxx" #include "fldupde.hxx" +#include <ooo/vba/XSinkCaller.hpp> class Color; class SfxItemSet; @@ -119,6 +120,8 @@ class SW_DLLPUBLIC SwModule final : public SfxModule, public SfxListener, public void InsertEnv(SfxRequest&); void InsertLab(SfxRequest&, bool bLabel); + css::uno::Reference< ooo::vba::XSinkCaller > mxAutomationApplicationEventsCaller; + public: // public Data - used for internal Clipboard / Drag & Drop / XSelection SwTransferable *m_pDragDrop, *m_pXSelection; @@ -243,6 +246,9 @@ public: css::uno::Reference< css::linguistic2::XLanguageGuessing > const & GetLanguageGuesser(); + + void RegisterAutomationApplicationEventsCaller(css::uno::Reference< ooo::vba::XSinkCaller > const& xCaller); + void CallAutomationApplicationEventSinks(const OUString& Method, const css::uno::Sequence< css::uno::Any >& Arguments); }; inline const css::uno::Reference< css::linguistic2::XLinguServiceEventListener >& diff --git a/sw/ooxmlexport_setup.mk b/sw/ooxmlexport_setup.mk index 443556f02d30..cf3a15bc61e0 100644 --- a/sw/ooxmlexport_setup.mk +++ b/sw/ooxmlexport_setup.mk @@ -106,7 +106,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_ooxmlexport$(1),\ $$(INCLUDE) \ )) -$(eval $(call gb_CppunitTest_use_sdk_api,sw_ooxmlexport$(1),)) +$(eval $(call gb_CppunitTest_use_api,sw_ooxmlexport$(1),\ + udkapi \ + offapi \ + oovbaapi \ +)) $(eval $(call gb_CppunitTest_use_ure,sw_ooxmlexport$(1))) $(eval $(call gb_CppunitTest_use_vcl,sw_ooxmlexport$(1))) diff --git a/sw/source/ui/vba/vbaapplication.cxx b/sw/source/ui/vba/vbaapplication.cxx index f86032a249e7..d76e7730a783 100644 --- a/sw/source/ui/vba/vbaapplication.cxx +++ b/sw/source/ui/vba/vbaapplication.cxx @@ -34,6 +34,8 @@ #include <editeng/acorrcfg.hxx> #include "wordvbahelper.hxx" #include <docsh.hxx> +#include <swdll.hxx> +#include <swmodule.hxx> #include "vbalistgalleries.hxx" using namespace ::ooo; @@ -60,17 +62,17 @@ SwVbaApplication::SwVbaApplication( uno::Reference<uno::XComponentContext >& xCo SwVbaApplication::~SwVbaApplication() { - // FIXME: Sadly this is not the place to do this, this dtor is never called, it seems - for (auto& i : mvSinks) - { - if (i.is()) - i->Call("Quit", uno::Sequence<uno::Any>()); - } } sal_uInt32 -SwVbaApplication::AddSink( const css::uno::Reference< XSink >& xSink ) +SwVbaApplication::AddSink( const uno::Reference< XSink >& xSink ) { + { + SolarMutexGuard aGuard; + SwGlobals::ensure(); + } + // No harm in potentially calling this several times + SW_MOD()->RegisterAutomationApplicationEventsCaller( uno::Reference< XSinkCaller >(this) ); mvSinks.push_back(xSink); return mvSinks.size();; } @@ -132,13 +134,6 @@ SwVbaApplication::getSelection() uno::Any SAL_CALL SwVbaApplication::Documents( const uno::Any& index ) { - // FIXME DUMMY just to test calling this somewhere... the dtor is never called - for (auto& i : mvSinks) - { - if (i.is()) - i->Call("Quit", uno::Sequence<uno::Any>()); - } - uno::Reference< XCollection > xCol( new SwVbaDocuments( this, mxContext ) ); if ( index.hasValue() ) return xCol->Item( index, uno::Any() ); @@ -269,6 +264,18 @@ SwVbaApplicationOutgoingConnectionPoint::SwVbaApplicationOutgoingConnectionPoint { } +// XSinkCaller + +void SAL_CALL +SwVbaApplication::CallSinks( const OUString& Method, const uno::Sequence< uno::Any >& Arguments ) +{ + for (auto& i : mvSinks) + { + if (i.is()) + i->Call(Method, Arguments); + } +} + // SwVbaApplicationOutgoingConnectionPoint // XConnectionPoint diff --git a/sw/source/ui/vba/vbaapplication.hxx b/sw/source/ui/vba/vbaapplication.hxx index 8b8b85f86c8c..681c4f9159c6 100644 --- a/sw/source/ui/vba/vbaapplication.hxx +++ b/sw/source/ui/vba/vbaapplication.hxx @@ -22,6 +22,7 @@ #include <vector> #include <ooo/vba/XSink.hpp> +#include <ooo/vba/XSinkCaller.hpp> #include <ooo/vba/word/XApplication.hpp> #include <ooo/vba/word/XDocument.hpp> #include <ooo/vba/word/XWindow.hpp> @@ -33,7 +34,15 @@ #include <vbahelper/vbaapplicationbase.hxx> #include <cppuhelper/implbase.hxx> -typedef cppu::ImplInheritanceHelper< VbaApplicationBase, ooo::vba::word::XApplication > SwVbaApplication_BASE; +typedef cppu::ImplInheritanceHelper< VbaApplicationBase, ooo::vba::word::XApplication, ooo::vba::XSinkCaller > SwVbaApplication_BASE; + +// This class is currently not a singleton. One instance is created per document with (potential?) +// StarBasic code in it, I think, and a shared one for all Automation clients connected to the +// ooo::vba::word::Application (Writer.Application) service. (Of course it probably is not common to +// have several Automation clients at once.) + +// Should it be a true singleton? Hard to say. Anyway, it is actually the SwVbaGlobals class that +// should be a singleton in that case, I think. class SwVbaApplication : public SwVbaApplication_BASE { @@ -76,6 +85,10 @@ public: // XHelperInterface virtual OUString getServiceImplName() override; virtual css::uno::Sequence<OUString> getServiceNames() override; + + // XSinkCaller + virtual void SAL_CALL CallSinks( const OUString& Method, const css::uno::Sequence< css::uno::Any >& Arguments ) override; + protected: virtual css::uno::Reference< css::frame::XModel > getCurrentDocument() override; }; diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 7f7df1db893e..91c86d8c74ff 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -254,6 +254,9 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) if( xVbaEvents.is() ) lcl_processCompatibleSfxHint( xVbaEvents, rHint ); + if ( rHint.GetId() == SfxHintId::DocChanged ) + SW_MOD()->CallAutomationApplicationEventSinks( "DocumentChange", css::uno::Sequence< css::uno::Any >() ); + sal_uInt16 nAction = 0; auto pEventHint = dynamic_cast<const SfxEventHint*>(&rHint); if( pEventHint && pEventHint->GetEventId() == SfxEventHintId::LoadFinished ) diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx index 9b901012e86c..e82aa7f25eb1 100644 --- a/sw/source/uibase/app/swmodule.cxx +++ b/sw/source/uibase/app/swmodule.cxx @@ -221,6 +221,7 @@ uno::Reference< linguistic2::XLanguageGuessing > const & SwModule::GetLanguageGu SwModule::~SwModule() { + CallAutomationApplicationEventSinks( "Quit", css::uno::Sequence< css::uno::Any >() ); delete m_pErrorHandler; EndListening( *SfxGetpApp() ); } @@ -435,4 +436,15 @@ SfxStyleFamilies* SwModule::CreateStyleFamilies() return pStyleFamilies; } +void SwModule::RegisterAutomationApplicationEventsCaller(css::uno::Reference< ooo::vba::XSinkCaller > const& xCaller) +{ + mxAutomationApplicationEventsCaller = xCaller; +} + +void SwModule::CallAutomationApplicationEventSinks(const OUString& Method, const css::uno::Sequence< css::uno::Any >& Arguments) +{ + if (mxAutomationApplicationEventsCaller.is()) + mxAutomationApplicationEventsCaller->CallSinks(Method, Arguments); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |