Kaydet (Commit) 0ee6b72b authored tarafından Tor Lillqvist's avatar Tor Lillqvist

SwModule is a convenient (?) place for passing events to Automation clients

Generate Application.DocumentChange and Application.Quit events.

SfxHintId::DocChanged seems to correspond nicely enough to
Application.DocumentChange. It is generated a bit eagerly, but as its
documentation is fairly vague and no specific detailed information is
passed in parameters anyway, it probably doesn't hurt if a client gets
it a bit more often with LO than with some other product.

Can now remove the FIXME-marked Quit event things in SwVbaApplication.

Now need oovbaapi in many makefiles for them to compile.

Change-Id: I4d0c5b93b584f198bcc854002eec7aaba7909ecc
Reviewed-on: https://gerrit.libreoffice.org/55106Reviewed-by: 's avatarTor Lillqvist <tml@collabora.com>
Tested-by: 's avatarTor Lillqvist <tml@collabora.com>
üst ae507627
......@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_addin_functions_test,\
$(eval $(call gb_CppunitTest_use_api,sc_addin_functions_test,\
offapi \
udkapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_addin_functions_test))
......
......@@ -59,7 +59,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_anchor_test,\
$$(INCLUDE) \
))
$(eval $(call gb_CppunitTest_use_sdk_api,sc_anchor_test))
$(eval $(call gb_CppunitTest_use_api,sc_anchor_test,\
udkapi \
offapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_anchor_test))
$(eval $(call gb_CppunitTest_use_vcl,sc_anchor_test))
......
......@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_array_functions_test,\
$(eval $(call gb_CppunitTest_use_api,sc_array_functions_test,\
offapi \
udkapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_array_functions_test))
......
......@@ -61,7 +61,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_bugfix_test,\
$$(INCLUDE) \
))
$(eval $(call gb_CppunitTest_use_sdk_api,sc_bugfix_test))
$(eval $(call gb_CppunitTest_use_api,sc_bugfix_test,\
udkapi \
offapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_bugfix_test))
$(eval $(call gb_CppunitTest_use_vcl,sc_bugfix_test))
......
......@@ -62,7 +62,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_chart2dataprovider,\
$$(INCLUDE) \
))
$(eval $(call gb_CppunitTest_use_sdk_api,sc_chart2dataprovider))
$(eval $(call gb_CppunitTest_use_api,sc_chart2dataprovider,\
udkapi \
offapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_chart2dataprovider))
$(eval $(call gb_CppunitTest_use_vcl,sc_chart2dataprovider))
......
......@@ -59,7 +59,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_cond_format_merge,\
$$(INCLUDE) \
))
$(eval $(call gb_CppunitTest_use_sdk_api,sc_cond_format_merge))
$(eval $(call gb_CppunitTest_use_api,sc_cond_format_merge,\
udkapi \
offapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_cond_format_merge))
$(eval $(call gb_CppunitTest_use_vcl,sc_cond_format_merge))
......
......@@ -61,7 +61,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_copypaste,\
$$(INCLUDE) \
))
$(eval $(call gb_CppunitTest_use_sdk_api,sc_copypaste))
$(eval $(call gb_CppunitTest_use_api,sc_copypaste,\
udkapi \
offapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_copypaste))
$(eval $(call gb_CppunitTest_use_vcl,sc_copypaste))
......
......@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_database_functions_test,\
$(eval $(call gb_CppunitTest_use_api,sc_database_functions_test,\
offapi \
udkapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_database_functions_test))
......
......@@ -67,7 +67,11 @@ $(eval $(call gb_CppunitTest_use_custom_headers,sc_dataprovider,\
officecfg/registry \
))
$(eval $(call gb_CppunitTest_use_sdk_api,sc_dataprovider))
$(eval $(call gb_CppunitTest_use_api,sc_dataprovider,\
udkapi \
offapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_dataprovider))
$(eval $(call gb_CppunitTest_use_vcl,sc_dataprovider))
......
......@@ -67,7 +67,11 @@ $(eval $(call gb_CppunitTest_use_custom_headers,sc_datatransformation,\
officecfg/registry \
))
$(eval $(call gb_CppunitTest_use_sdk_api,sc_datatransformation))
$(eval $(call gb_CppunitTest_use_api,sc_datatransformation,\
udkapi \
offapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_datatransformation))
$(eval $(call gb_CppunitTest_use_vcl,sc_datatransformation))
......
......@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_datetime_functions_test,\
$(eval $(call gb_CppunitTest_use_api,sc_datetime_functions_test,\
offapi \
udkapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_datetime_functions_test))
......
......@@ -63,7 +63,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_filters_test,\
$$(INCLUDE) \
))
$(eval $(call gb_CppunitTest_use_sdk_api,sc_filters_test))
$(eval $(call gb_CppunitTest_use_api,sc_filters_test,\
udkapi \
offapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_filters_test))
$(eval $(call gb_CppunitTest_use_vcl,sc_filters_test))
......
......@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_financial_functions_test,\
$(eval $(call gb_CppunitTest_use_api,sc_financial_functions_test,\
offapi \
udkapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_financial_functions_test))
......
......@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_functions_test_old,\
$(eval $(call gb_CppunitTest_use_api,sc_functions_test_old,\
offapi \
udkapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_functions_test_old))
......
......@@ -57,7 +57,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_html_export_test,\
$$(INCLUDE) \
))
$(eval $(call gb_CppunitTest_use_sdk_api,sc_html_export_test))
$(eval $(call gb_CppunitTest_use_api,sc_html_export_test,\
udkapi \
offapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_html_export_test))
$(eval $(call gb_CppunitTest_use_vcl,sc_html_export_test))
......
......@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_information_functions_test,\
$(eval $(call gb_CppunitTest_use_api,sc_information_functions_test,\
offapi \
udkapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_information_functions_test))
......
......@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_logical_functions_test,\
$(eval $(call gb_CppunitTest_use_api,sc_logical_functions_test,\
offapi \
udkapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_logical_functions_test))
......
......@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_mathematical_functions_test,\
$(eval $(call gb_CppunitTest_use_api,sc_mathematical_functions_test,\
offapi \
udkapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_mathematical_functions_test))
......
......@@ -59,7 +59,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_opencl_test,\
$$(INCLUDE) \
))
$(eval $(call gb_CppunitTest_use_sdk_api,sc_opencl_test))
$(eval $(call gb_CppunitTest_use_api,sc_opencl_test,\
udkapi \
offapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_opencl_test))
$(eval $(call gb_CppunitTest_use_vcl,sc_opencl_test))
......
......@@ -59,7 +59,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_parallelism,\
$$(INCLUDE) \
))
$(eval $(call gb_CppunitTest_use_sdk_api,sc_parallelism))
$(eval $(call gb_CppunitTest_use_api,sc_parallelism,\
udkapi \
offapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_custom_headers,sc_parallelism,\
officecfg/registry \
......
......@@ -58,7 +58,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_pivottable_filters_test,\
$$(INCLUDE) \
))
$(eval $(call gb_CppunitTest_use_sdk_api,sc_pivottable_filters_test))
$(eval $(call gb_CppunitTest_use_api,sc_pivottable_filters_test,\
udkapi \
offapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_pivottable_filters_test))
$(eval $(call gb_CppunitTest_use_vcl,sc_pivottable_filters_test))
......
......@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_spreadsheet_functions_test,\
$(eval $(call gb_CppunitTest_use_api,sc_spreadsheet_functions_test,\
offapi \
udkapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_spreadsheet_functions_test))
......
......@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_statistical_functions_test,\
$(eval $(call gb_CppunitTest_use_api,sc_statistical_functions_test,\
offapi \
udkapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_statistical_functions_test))
......
......@@ -58,7 +58,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_subsequent_export_test,\
$$(INCLUDE) \
))
$(eval $(call gb_CppunitTest_use_sdk_api,sc_subsequent_export_test))
$(eval $(call gb_CppunitTest_use_api,sc_subsequent_export_test,\
udkapi \
offapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_subsequent_export_test))
$(eval $(call gb_CppunitTest_use_vcl,sc_subsequent_export_test))
......
......@@ -62,7 +62,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_subsequent_filters_test,\
$$(INCLUDE) \
))
$(eval $(call gb_CppunitTest_use_sdk_api,sc_subsequent_filters_test))
$(eval $(call gb_CppunitTest_use_api,sc_subsequent_filters_test,\
udkapi \
offapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_subsequent_filters_test))
$(eval $(call gb_CppunitTest_use_vcl,sc_subsequent_filters_test))
......
......@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_text_functions_test,\
$(eval $(call gb_CppunitTest_use_api,sc_text_functions_test,\
offapi \
udkapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_text_functions_test))
......
......@@ -82,7 +82,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_ucalc,\
$$(INCLUDE) \
))
$(eval $(call gb_CppunitTest_use_sdk_api,sc_ucalc))
$(eval $(call gb_CppunitTest_use_api,sc_ucalc,\
udkapi \
offapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_custom_headers,sc_ucalc,\
officecfg/registry \
......
......@@ -32,7 +32,11 @@ $(eval $(call gb_Library_add_defs,scqahelper,\
-DSCQAHELPER_DLLIMPLEMENTATION \
))
$(eval $(call gb_Library_use_sdk_api,scqahelper))
$(eval $(call gb_Library_use_api,scqahelper,\
udkapi \
offapi \
oovbaapi \
))
$(eval $(call gb_Library_use_libraries,scqahelper,\
comphelper \
......
......@@ -14,7 +14,11 @@ $(eval $(call gb_CppunitTest_use_externals,svtools_graphic,\
libxml2 \
))
$(eval $(call gb_CppunitTest_use_sdk_api,svtools_graphic))
$(eval $(call gb_CppunitTest_use_api,svtools_graphic,\
udkapi \
offapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,svtools_graphic))
......
......@@ -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))
......
......@@ -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))
......
......@@ -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))
......
......@@ -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))
......
......@@ -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))
......
......@@ -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))
......
......@@ -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))
......
......@@ -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 \
......
......@@ -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))
......
......@@ -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))
......
......@@ -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))
......
......@@ -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))
......
......@@ -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))
......
......@@ -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))
......
......@@ -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))
......
......@@ -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))
......
......@@ -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))
......
......@@ -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))
......
......@@ -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))
......
......@@ -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))
......
......@@ -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))
......
......@@ -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))
......
......@@ -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))
......
......@@ -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))
......
......@@ -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))
......
......@@ -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))
......
......@@ -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))
......
......@@ -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))
......
......@@ -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 \
......
......@@ -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 \
......
......@@ -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,\
......
......@@ -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 >&
......
......@@ -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)))
......
......@@ -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
......
......@@ -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;
};
......
......@@ -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 )
......
......@@ -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: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment