Kaydet (Commit) 3849a867 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 05aa70c1
...@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_addin_functions_test,\ ...@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_addin_functions_test,\
$(eval $(call gb_CppunitTest_use_api,sc_addin_functions_test,\ $(eval $(call gb_CppunitTest_use_api,sc_addin_functions_test,\
offapi \ offapi \
udkapi \ udkapi \
oovbaapi \
)) ))
$(eval $(call gb_CppunitTest_use_ure,sc_addin_functions_test)) $(eval $(call gb_CppunitTest_use_ure,sc_addin_functions_test))
......
...@@ -59,7 +59,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_anchor_test,\ ...@@ -59,7 +59,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_anchor_test,\
$$(INCLUDE) \ $$(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_ure,sc_anchor_test))
$(eval $(call gb_CppunitTest_use_vcl,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,\ ...@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_array_functions_test,\
$(eval $(call gb_CppunitTest_use_api,sc_array_functions_test,\ $(eval $(call gb_CppunitTest_use_api,sc_array_functions_test,\
offapi \ offapi \
udkapi \ udkapi \
oovbaapi \
)) ))
$(eval $(call gb_CppunitTest_use_ure,sc_array_functions_test)) $(eval $(call gb_CppunitTest_use_ure,sc_array_functions_test))
......
...@@ -61,7 +61,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_bugfix_test,\ ...@@ -61,7 +61,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_bugfix_test,\
$$(INCLUDE) \ $$(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_ure,sc_bugfix_test))
$(eval $(call gb_CppunitTest_use_vcl,sc_bugfix_test)) $(eval $(call gb_CppunitTest_use_vcl,sc_bugfix_test))
......
...@@ -59,7 +59,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_cond_format_merge,\ ...@@ -59,7 +59,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_cond_format_merge,\
$$(INCLUDE) \ $$(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_ure,sc_cond_format_merge))
$(eval $(call gb_CppunitTest_use_vcl,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,\ ...@@ -61,7 +61,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_copypaste,\
$$(INCLUDE) \ $$(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_ure,sc_copypaste))
$(eval $(call gb_CppunitTest_use_vcl,sc_copypaste)) $(eval $(call gb_CppunitTest_use_vcl,sc_copypaste))
......
...@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_database_functions_test,\ ...@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_database_functions_test,\
$(eval $(call gb_CppunitTest_use_api,sc_database_functions_test,\ $(eval $(call gb_CppunitTest_use_api,sc_database_functions_test,\
offapi \ offapi \
udkapi \ udkapi \
oovbaapi \
)) ))
$(eval $(call gb_CppunitTest_use_ure,sc_database_functions_test)) $(eval $(call gb_CppunitTest_use_ure,sc_database_functions_test))
......
...@@ -67,7 +67,11 @@ $(eval $(call gb_CppunitTest_use_custom_headers,sc_dataprovider,\ ...@@ -67,7 +67,11 @@ $(eval $(call gb_CppunitTest_use_custom_headers,sc_dataprovider,\
officecfg/registry \ 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_ure,sc_dataprovider))
$(eval $(call gb_CppunitTest_use_vcl,sc_dataprovider)) $(eval $(call gb_CppunitTest_use_vcl,sc_dataprovider))
......
...@@ -67,7 +67,11 @@ $(eval $(call gb_CppunitTest_use_custom_headers,sc_datatransformation,\ ...@@ -67,7 +67,11 @@ $(eval $(call gb_CppunitTest_use_custom_headers,sc_datatransformation,\
officecfg/registry \ 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_ure,sc_datatransformation))
$(eval $(call gb_CppunitTest_use_vcl,sc_datatransformation)) $(eval $(call gb_CppunitTest_use_vcl,sc_datatransformation))
......
...@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_datetime_functions_test,\ ...@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_datetime_functions_test,\
$(eval $(call gb_CppunitTest_use_api,sc_datetime_functions_test,\ $(eval $(call gb_CppunitTest_use_api,sc_datetime_functions_test,\
offapi \ offapi \
udkapi \ udkapi \
oovbaapi \
)) ))
$(eval $(call gb_CppunitTest_use_ure,sc_datetime_functions_test)) $(eval $(call gb_CppunitTest_use_ure,sc_datetime_functions_test))
......
...@@ -63,7 +63,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_filters_test,\ ...@@ -63,7 +63,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_filters_test,\
$$(INCLUDE) \ $$(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_ure,sc_filters_test))
$(eval $(call gb_CppunitTest_use_vcl,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,\ ...@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_financial_functions_test,\
$(eval $(call gb_CppunitTest_use_api,sc_financial_functions_test,\ $(eval $(call gb_CppunitTest_use_api,sc_financial_functions_test,\
offapi \ offapi \
udkapi \ udkapi \
oovbaapi \
)) ))
$(eval $(call gb_CppunitTest_use_ure,sc_financial_functions_test)) $(eval $(call gb_CppunitTest_use_ure,sc_financial_functions_test))
......
...@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_functions_test_old,\ ...@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_functions_test_old,\
$(eval $(call gb_CppunitTest_use_api,sc_functions_test_old,\ $(eval $(call gb_CppunitTest_use_api,sc_functions_test_old,\
offapi \ offapi \
udkapi \ udkapi \
oovbaapi \
)) ))
$(eval $(call gb_CppunitTest_use_ure,sc_functions_test_old)) $(eval $(call gb_CppunitTest_use_ure,sc_functions_test_old))
......
...@@ -57,7 +57,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_html_export_test,\ ...@@ -57,7 +57,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_html_export_test,\
$$(INCLUDE) \ $$(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_ure,sc_html_export_test))
$(eval $(call gb_CppunitTest_use_vcl,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,\ ...@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_information_functions_test,\
$(eval $(call gb_CppunitTest_use_api,sc_information_functions_test,\ $(eval $(call gb_CppunitTest_use_api,sc_information_functions_test,\
offapi \ offapi \
udkapi \ udkapi \
oovbaapi \
)) ))
$(eval $(call gb_CppunitTest_use_ure,sc_information_functions_test)) $(eval $(call gb_CppunitTest_use_ure,sc_information_functions_test))
......
...@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_logical_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,\ $(eval $(call gb_CppunitTest_use_api,sc_logical_functions_test,\
offapi \ offapi \
udkapi \ udkapi \
oovbaapi \
)) ))
$(eval $(call gb_CppunitTest_use_ure,sc_logical_functions_test)) $(eval $(call gb_CppunitTest_use_ure,sc_logical_functions_test))
......
...@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_mathematical_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,\ $(eval $(call gb_CppunitTest_use_api,sc_mathematical_functions_test,\
offapi \ offapi \
udkapi \ udkapi \
oovbaapi \
)) ))
$(eval $(call gb_CppunitTest_use_ure,sc_mathematical_functions_test)) $(eval $(call gb_CppunitTest_use_ure,sc_mathematical_functions_test))
......
...@@ -59,7 +59,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_opencl_test,\ ...@@ -59,7 +59,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_opencl_test,\
$$(INCLUDE) \ $$(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_ure,sc_opencl_test))
$(eval $(call gb_CppunitTest_use_vcl,sc_opencl_test)) $(eval $(call gb_CppunitTest_use_vcl,sc_opencl_test))
......
...@@ -59,7 +59,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_parallelism,\ ...@@ -59,7 +59,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_parallelism,\
$$(INCLUDE) \ $$(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_ure,sc_parallelism)) $(eval $(call gb_CppunitTest_use_ure,sc_parallelism))
$(eval $(call gb_CppunitTest_use_vcl,sc_parallelism)) $(eval $(call gb_CppunitTest_use_vcl,sc_parallelism))
......
...@@ -58,7 +58,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_pivottable_filters_test,\ ...@@ -58,7 +58,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_pivottable_filters_test,\
$$(INCLUDE) \ $$(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_ure,sc_pivottable_filters_test))
$(eval $(call gb_CppunitTest_use_vcl,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,\ ...@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_spreadsheet_functions_test,\
$(eval $(call gb_CppunitTest_use_api,sc_spreadsheet_functions_test,\ $(eval $(call gb_CppunitTest_use_api,sc_spreadsheet_functions_test,\
offapi \ offapi \
udkapi \ udkapi \
oovbaapi \
)) ))
$(eval $(call gb_CppunitTest_use_ure,sc_spreadsheet_functions_test)) $(eval $(call gb_CppunitTest_use_ure,sc_spreadsheet_functions_test))
......
...@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_statistical_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,\ $(eval $(call gb_CppunitTest_use_api,sc_statistical_functions_test,\
offapi \ offapi \
udkapi \ udkapi \
oovbaapi \
)) ))
$(eval $(call gb_CppunitTest_use_ure,sc_statistical_functions_test)) $(eval $(call gb_CppunitTest_use_ure,sc_statistical_functions_test))
......
...@@ -58,7 +58,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_subsequent_export_test,\ ...@@ -58,7 +58,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_subsequent_export_test,\
$$(INCLUDE) \ $$(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_ure,sc_subsequent_export_test))
$(eval $(call gb_CppunitTest_use_vcl,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,\ ...@@ -62,7 +62,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_subsequent_filters_test,\
$$(INCLUDE) \ $$(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_ure,sc_subsequent_filters_test))
$(eval $(call gb_CppunitTest_use_vcl,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,\ ...@@ -60,6 +60,7 @@ $(eval $(call gb_CppunitTest_set_include,sc_text_functions_test,\
$(eval $(call gb_CppunitTest_use_api,sc_text_functions_test,\ $(eval $(call gb_CppunitTest_use_api,sc_text_functions_test,\
offapi \ offapi \
udkapi \ udkapi \
oovbaapi \
)) ))
$(eval $(call gb_CppunitTest_use_ure,sc_text_functions_test)) $(eval $(call gb_CppunitTest_use_ure,sc_text_functions_test))
......
...@@ -82,7 +82,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_ucalc,\ ...@@ -82,7 +82,11 @@ $(eval $(call gb_CppunitTest_set_include,sc_ucalc,\
$$(INCLUDE) \ $$(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,\ $(eval $(call gb_CppunitTest_use_custom_headers,sc_ucalc,\
officecfg/registry \ officecfg/registry \
......
...@@ -32,7 +32,11 @@ $(eval $(call gb_Library_add_defs,scqahelper,\ ...@@ -32,7 +32,11 @@ $(eval $(call gb_Library_add_defs,scqahelper,\
-DSCQAHELPER_DLLIMPLEMENTATION \ -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,\ $(eval $(call gb_Library_use_libraries,scqahelper,\
comphelper \ comphelper \
......
...@@ -14,7 +14,11 @@ $(eval $(call gb_CppunitTest_use_externals,svtools_graphic,\ ...@@ -14,7 +14,11 @@ $(eval $(call gb_CppunitTest_use_externals,svtools_graphic,\
libxml2 \ 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)) $(eval $(call gb_CppunitTest_use_ure,svtools_graphic))
......
...@@ -43,7 +43,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_docbookexport,\ ...@@ -43,7 +43,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_docbookexport,\
$$(INCLUDE) \ $$(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_ure,sw_docbookexport))
$(eval $(call gb_CppunitTest_use_vcl,sw_docbookexport)) $(eval $(call gb_CppunitTest_use_vcl,sw_docbookexport))
......
...@@ -44,7 +44,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_filters_test,\ ...@@ -44,7 +44,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_filters_test,\
$$(INCLUDE) \ $$(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_ure,sw_filters_test))
$(eval $(call gb_CppunitTest_use_vcl,sw_filters_test)) $(eval $(call gb_CppunitTest_use_vcl,sw_filters_test))
......
...@@ -41,7 +41,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_fodfexport,\ ...@@ -41,7 +41,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_fodfexport,\
$$(INCLUDE) \ $$(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_ure,sw_fodfexport))
$(eval $(call gb_CppunitTest_use_vcl,sw_fodfexport)) $(eval $(call gb_CppunitTest_use_vcl,sw_fodfexport))
......
...@@ -42,7 +42,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_globalfilter,\ ...@@ -42,7 +42,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_globalfilter,\
$$(INCLUDE) \ $$(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_ure,sw_globalfilter))
$(eval $(call gb_CppunitTest_use_vcl,sw_globalfilter)) $(eval $(call gb_CppunitTest_use_vcl,sw_globalfilter))
......
...@@ -43,7 +43,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_htmlexport,\ ...@@ -43,7 +43,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_htmlexport,\
$$(INCLUDE) \ $$(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_ure,sw_htmlexport))
$(eval $(call gb_CppunitTest_use_vcl,sw_htmlexport)) $(eval $(call gb_CppunitTest_use_vcl,sw_htmlexport))
......
...@@ -44,7 +44,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_htmlimport,\ ...@@ -44,7 +44,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_htmlimport,\
$$(INCLUDE) \ $$(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_ure,sw_htmlimport))
$(eval $(call gb_CppunitTest_use_vcl,sw_htmlimport)) $(eval $(call gb_CppunitTest_use_vcl,sw_htmlimport))
......
...@@ -48,7 +48,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_layoutwriter,\ ...@@ -48,7 +48,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_layoutwriter,\
$$(INCLUDE) \ $$(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_ure,sw_layoutwriter))
$(eval $(call gb_CppunitTest_use_vcl,sw_layoutwriter)) $(eval $(call gb_CppunitTest_use_vcl,sw_layoutwriter))
......
...@@ -31,7 +31,11 @@ $(eval $(call gb_CppunitTest_use_externals,sw_mailmerge, \ ...@@ -31,7 +31,11 @@ $(eval $(call gb_CppunitTest_use_externals,sw_mailmerge, \
libxml2 \ 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, \ $(eval $(call gb_CppunitTest_use_components,sw_mailmerge, \
basic/util/sb \ basic/util/sb \
......
...@@ -42,7 +42,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_odfexport,\ ...@@ -42,7 +42,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_odfexport,\
$$(INCLUDE) \ $$(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_ure,sw_odfexport))
$(eval $(call gb_CppunitTest_use_vcl,sw_odfexport)) $(eval $(call gb_CppunitTest_use_vcl,sw_odfexport))
......
...@@ -43,7 +43,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_odfimport,\ ...@@ -43,7 +43,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_odfimport,\
$$(INCLUDE) \ $$(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_ure,sw_odfimport))
$(eval $(call gb_CppunitTest_use_vcl,sw_odfimport)) $(eval $(call gb_CppunitTest_use_vcl,sw_odfimport))
......
...@@ -31,7 +31,12 @@ $(eval $(call gb_CppunitTest_set_include,sw_ooxmlencryption,\ ...@@ -31,7 +31,12 @@ $(eval $(call gb_CppunitTest_set_include,sw_ooxmlencryption,\
$$(INCLUDE) \ $$(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_ure,sw_ooxmlencryption))
$(eval $(call gb_CppunitTest_use_vcl,sw_ooxmlencryption)) $(eval $(call gb_CppunitTest_use_vcl,sw_ooxmlencryption))
......
...@@ -55,7 +55,11 @@ $(eval $(call gb_CppunitTest_use_system_darwin_frameworks,sw_ooxmlexport8,\ ...@@ -55,7 +55,11 @@ $(eval $(call gb_CppunitTest_use_system_darwin_frameworks,sw_ooxmlexport8,\
endif 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_ure,sw_ooxmlexport8))
$(eval $(call gb_CppunitTest_use_vcl,sw_ooxmlexport8)) $(eval $(call gb_CppunitTest_use_vcl,sw_ooxmlexport8))
......
...@@ -31,7 +31,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_ooxmlfieldexport,\ ...@@ -31,7 +31,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_ooxmlfieldexport,\
$$(INCLUDE) \ $$(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_ure,sw_ooxmlfieldexport))
$(eval $(call gb_CppunitTest_use_vcl,sw_ooxmlfieldexport)) $(eval $(call gb_CppunitTest_use_vcl,sw_ooxmlfieldexport))
......
...@@ -55,7 +55,11 @@ $(eval $(call gb_CppunitTest_use_system_darwin_frameworks,sw_ooxmlimport,\ ...@@ -55,7 +55,11 @@ $(eval $(call gb_CppunitTest_use_system_darwin_frameworks,sw_ooxmlimport,\
endif 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_ure,sw_ooxmlimport))
$(eval $(call gb_CppunitTest_use_vcl,sw_ooxmlimport)) $(eval $(call gb_CppunitTest_use_vcl,sw_ooxmlimport))
......
...@@ -31,7 +31,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_ooxmllinks,\ ...@@ -31,7 +31,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_ooxmllinks,\
$$(INCLUDE) \ $$(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_ure,sw_ooxmllinks))
$(eval $(call gb_CppunitTest_use_vcl,sw_ooxmllinks)) $(eval $(call gb_CppunitTest_use_vcl,sw_ooxmllinks))
......
...@@ -31,7 +31,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_ooxmlw14export,\ ...@@ -31,7 +31,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_ooxmlw14export,\
$$(INCLUDE) \ $$(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_ure,sw_ooxmlw14export))
$(eval $(call gb_CppunitTest_use_vcl,sw_ooxmlw14export)) $(eval $(call gb_CppunitTest_use_vcl,sw_ooxmlw14export))
......
...@@ -46,7 +46,11 @@ $(eval $(call gb_CppunitTest_add_cxxflags,sw_rtfexport,\ ...@@ -46,7 +46,11 @@ $(eval $(call gb_CppunitTest_add_cxxflags,sw_rtfexport,\
)) ))
endif 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_ure,sw_rtfexport))
$(eval $(call gb_CppunitTest_use_vcl,sw_rtfexport)) $(eval $(call gb_CppunitTest_use_vcl,sw_rtfexport))
......
...@@ -48,7 +48,11 @@ $(eval $(call gb_CppunitTest_add_cxxflags,sw_rtfexport2,\ ...@@ -48,7 +48,11 @@ $(eval $(call gb_CppunitTest_add_cxxflags,sw_rtfexport2,\
)) ))
endif 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_ure,sw_rtfexport2))
$(eval $(call gb_CppunitTest_use_vcl,sw_rtfexport2)) $(eval $(call gb_CppunitTest_use_vcl,sw_rtfexport2))
......
...@@ -46,7 +46,11 @@ $(eval $(call gb_CppunitTest_add_cxxflags,sw_rtfexport3,\ ...@@ -46,7 +46,11 @@ $(eval $(call gb_CppunitTest_add_cxxflags,sw_rtfexport3,\
)) ))
endif 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_ure,sw_rtfexport3))
$(eval $(call gb_CppunitTest_use_vcl,sw_rtfexport3)) $(eval $(call gb_CppunitTest_use_vcl,sw_rtfexport3))
......
...@@ -48,7 +48,11 @@ $(eval $(call gb_CppunitTest_add_cxxflags,sw_rtfimport,\ ...@@ -48,7 +48,11 @@ $(eval $(call gb_CppunitTest_add_cxxflags,sw_rtfimport,\
)) ))
endif 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_ure,sw_rtfimport))
$(eval $(call gb_CppunitTest_use_vcl,sw_rtfimport)) $(eval $(call gb_CppunitTest_use_vcl,sw_rtfimport))
......
...@@ -46,7 +46,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_tiledrendering,\ ...@@ -46,7 +46,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_tiledrendering,\
$$(INCLUDE) \ $$(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_ure,sw_tiledrendering))
$(eval $(call gb_CppunitTest_use_vcl,sw_tiledrendering)) $(eval $(call gb_CppunitTest_use_vcl,sw_tiledrendering))
......
...@@ -44,7 +44,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_txtexport,\ ...@@ -44,7 +44,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_txtexport,\
$$(INCLUDE) \ $$(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_ure,sw_txtexport))
$(eval $(call gb_CppunitTest_use_vcl,sw_txtexport)) $(eval $(call gb_CppunitTest_use_vcl,sw_txtexport))
......
...@@ -49,7 +49,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_uiwriter,\ ...@@ -49,7 +49,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_uiwriter,\
$$(INCLUDE) \ $$(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_ure,sw_uiwriter))
$(eval $(call gb_CppunitTest_use_vcl,sw_uiwriter)) $(eval $(call gb_CppunitTest_use_vcl,sw_uiwriter))
......
...@@ -71,7 +71,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_uwriter,\ ...@@ -71,7 +71,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_uwriter,\
$$(INCLUDE) \ $$(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_ure,sw_uwriter))
$(eval $(call gb_CppunitTest_use_vcl,sw_uwriter)) $(eval $(call gb_CppunitTest_use_vcl,sw_uwriter))
......
...@@ -43,7 +43,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_ww8export,\ ...@@ -43,7 +43,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_ww8export,\
$$(INCLUDE) \ $$(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_ure,sw_ww8export))
$(eval $(call gb_CppunitTest_use_vcl,sw_ww8export)) $(eval $(call gb_CppunitTest_use_vcl,sw_ww8export))
......
...@@ -42,7 +42,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_ww8export2,\ ...@@ -42,7 +42,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_ww8export2,\
$$(INCLUDE) \ $$(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_ure,sw_ww8export2))
$(eval $(call gb_CppunitTest_use_vcl,sw_ww8export2)) $(eval $(call gb_CppunitTest_use_vcl,sw_ww8export2))
......
...@@ -40,7 +40,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_ww8import,\ ...@@ -40,7 +40,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_ww8import,\
$$(INCLUDE) \ $$(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_ure,sw_ww8import))
$(eval $(call gb_CppunitTest_use_vcl,sw_ww8import)) $(eval $(call gb_CppunitTest_use_vcl,sw_ww8import))
......
...@@ -33,7 +33,11 @@ $(eval $(call gb_Library_set_include,msword,\ ...@@ -33,7 +33,11 @@ $(eval $(call gb_Library_set_include,msword,\
$$(INCLUDE) \ $$(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,\ $(eval $(call gb_Library_use_libraries,msword,\
basegfx \ basegfx \
......
...@@ -39,7 +39,11 @@ $(eval $(call gb_Library_use_custom_headers,sw,\ ...@@ -39,7 +39,11 @@ $(eval $(call gb_Library_use_custom_headers,sw,\
sw/generated \ 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,\ $(eval $(call gb_Library_add_defs,sw,\
-DSW_DLLIMPLEMENTATION \ -DSW_DLLIMPLEMENTATION \
......
...@@ -38,7 +38,11 @@ $(eval $(call gb_Library_use_custom_headers,swui,\ ...@@ -38,7 +38,11 @@ $(eval $(call gb_Library_use_custom_headers,swui,\
officecfg/registry \ officecfg/registry \
)) ))
$(eval $(call gb_Library_use_sdk_api,swui)) $(eval $(call gb_Library_use_api,swui,\
udkapi \
offapi \
oovbaapi \
))
ifneq ($(SYSTEM_LIBXML),) ifneq ($(SYSTEM_LIBXML),)
$(eval $(call gb_Library_add_cxxflags,swui,\ $(eval $(call gb_Library_add_cxxflags,swui,\
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "fldupde.hxx" #include "fldupde.hxx"
#include <com/sun/star/linguistic2/XLinguServiceEventListener.hpp> #include <com/sun/star/linguistic2/XLinguServiceEventListener.hpp>
#include <com/sun/star/linguistic2/XLanguageGuessing.hpp> #include <com/sun/star/linguistic2/XLanguageGuessing.hpp>
#include <ooo/vba/XSinkCaller.hpp>
class Color; class Color;
class SfxItemSet; class SfxItemSet;
...@@ -119,6 +120,8 @@ class SW_DLLPUBLIC SwModule final : public SfxModule, public SfxListener, public ...@@ -119,6 +120,8 @@ class SW_DLLPUBLIC SwModule final : public SfxModule, public SfxListener, public
void InsertEnv(SfxRequest&); void InsertEnv(SfxRequest&);
void InsertLab(SfxRequest&, bool bLabel); void InsertLab(SfxRequest&, bool bLabel);
css::uno::Reference< ooo::vba::XSinkCaller > mxAutomationApplicationEventsCaller;
public: public:
// public Data - used for internal Clipboard / Drag & Drop / XSelection // public Data - used for internal Clipboard / Drag & Drop / XSelection
SwTransferable *m_pDragDrop, *m_pXSelection; SwTransferable *m_pDragDrop, *m_pXSelection;
...@@ -243,6 +246,9 @@ public: ...@@ -243,6 +246,9 @@ public:
css::uno::Reference< css::linguistic2::XLanguageGuessing > const & css::uno::Reference< css::linguistic2::XLanguageGuessing > const &
GetLanguageGuesser(); 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 >& inline const css::uno::Reference< css::linguistic2::XLinguServiceEventListener >&
......
...@@ -105,7 +105,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_ooxmlexport$(1),\ ...@@ -105,7 +105,11 @@ $(eval $(call gb_CppunitTest_set_include,sw_ooxmlexport$(1),\
$$(INCLUDE) \ $$(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_ure,sw_ooxmlexport$(1)))
$(eval $(call gb_CppunitTest_use_vcl,sw_ooxmlexport$(1))) $(eval $(call gb_CppunitTest_use_vcl,sw_ooxmlexport$(1)))
......
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
#include <editeng/acorrcfg.hxx> #include <editeng/acorrcfg.hxx>
#include "wordvbahelper.hxx" #include "wordvbahelper.hxx"
#include <docsh.hxx> #include <docsh.hxx>
#include <swdll.hxx>
#include <swmodule.hxx>
#include "vbalistgalleries.hxx" #include "vbalistgalleries.hxx"
using namespace ::ooo; using namespace ::ooo;
...@@ -60,17 +62,17 @@ SwVbaApplication::SwVbaApplication( uno::Reference<uno::XComponentContext >& xCo ...@@ -60,17 +62,17 @@ SwVbaApplication::SwVbaApplication( uno::Reference<uno::XComponentContext >& xCo
SwVbaApplication::~SwVbaApplication() 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 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); mvSinks.push_back(xSink);
return mvSinks.size();; return mvSinks.size();;
} }
...@@ -132,13 +134,6 @@ SwVbaApplication::getSelection() ...@@ -132,13 +134,6 @@ SwVbaApplication::getSelection()
uno::Any SAL_CALL uno::Any SAL_CALL
SwVbaApplication::Documents( const uno::Any& index ) 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 ) ); uno::Reference< XCollection > xCol( new SwVbaDocuments( this, mxContext ) );
if ( index.hasValue() ) if ( index.hasValue() )
return xCol->Item( index, uno::Any() ); return xCol->Item( index, uno::Any() );
...@@ -269,6 +264,18 @@ SwVbaApplicationOutgoingConnectionPoint::SwVbaApplicationOutgoingConnectionPoint ...@@ -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 // SwVbaApplicationOutgoingConnectionPoint
// XConnectionPoint // XConnectionPoint
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <vector> #include <vector>
#include <ooo/vba/XSink.hpp> #include <ooo/vba/XSink.hpp>
#include <ooo/vba/XSinkCaller.hpp>
#include <ooo/vba/word/XApplication.hpp> #include <ooo/vba/word/XApplication.hpp>
#include <ooo/vba/word/XDocument.hpp> #include <ooo/vba/word/XDocument.hpp>
#include <ooo/vba/word/XWindow.hpp> #include <ooo/vba/word/XWindow.hpp>
...@@ -34,7 +35,15 @@ ...@@ -34,7 +35,15 @@
#include <cppuhelper/implbase.hxx> #include <cppuhelper/implbase.hxx>
//typedef InheritedHelperInterfaceWeakImpl< ooo::vba::word::XApplication > SwVbaApplication_BASE; //typedef InheritedHelperInterfaceWeakImpl< ooo::vba::word::XApplication > SwVbaApplication_BASE;
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 class SwVbaApplication : public SwVbaApplication_BASE
{ {
...@@ -77,6 +86,10 @@ public: ...@@ -77,6 +86,10 @@ public:
// XHelperInterface // XHelperInterface
virtual OUString getServiceImplName() override; virtual OUString getServiceImplName() override;
virtual css::uno::Sequence<OUString> getServiceNames() 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: protected:
virtual css::uno::Reference< css::frame::XModel > getCurrentDocument() override; virtual css::uno::Reference< css::frame::XModel > getCurrentDocument() override;
}; };
......
...@@ -249,6 +249,9 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) ...@@ -249,6 +249,9 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
if( xVbaEvents.is() ) if( xVbaEvents.is() )
lcl_processCompatibleSfxHint( xVbaEvents, rHint ); lcl_processCompatibleSfxHint( xVbaEvents, rHint );
if ( rHint.GetId() == SfxHintId::DocChanged )
SW_MOD()->CallAutomationApplicationEventSinks( "DocumentChange", css::uno::Sequence< css::uno::Any >() );
sal_uInt16 nAction = 0; sal_uInt16 nAction = 0;
auto pEventHint = dynamic_cast<const SfxEventHint*>(&rHint); auto pEventHint = dynamic_cast<const SfxEventHint*>(&rHint);
if( pEventHint && pEventHint->GetEventId() == SfxEventHintId::LoadFinished ) if( pEventHint && pEventHint->GetEventId() == SfxEventHintId::LoadFinished )
......
...@@ -221,6 +221,7 @@ uno::Reference< linguistic2::XLanguageGuessing > const & SwModule::GetLanguageGu ...@@ -221,6 +221,7 @@ uno::Reference< linguistic2::XLanguageGuessing > const & SwModule::GetLanguageGu
SwModule::~SwModule() SwModule::~SwModule()
{ {
CallAutomationApplicationEventSinks( "Quit", css::uno::Sequence< css::uno::Any >() );
delete m_pErrorHandler; delete m_pErrorHandler;
EndListening( *SfxGetpApp() ); EndListening( *SfxGetpApp() );
} }
...@@ -433,4 +434,15 @@ SfxStyleFamilies* SwModule::CreateStyleFamilies() ...@@ -433,4 +434,15 @@ SfxStyleFamilies* SwModule::CreateStyleFamilies()
return pStyleFamilies; 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: */ /* 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