diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-06-04 08:45:54 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-06-04 08:55:12 +0200 |
commit | 369d95931f42267eb2f55e066f58ee859183025d (patch) | |
tree | f6047cebccb31dea56653bb1adfa08f853d09918 | |
parent | 9e13afeaf67b9c07762692cd858de4b577234ab7 (diff) |
DeInitVCL at end of tests
This required some changes to the framework:
* Init-/DeInitVCL is no longer done per individual test in BootstrapFixture, but
once per CppunitTest invocation in a new vclbootstrapprotector (similarly to
the exisiting unobootstrapprotector). CppunitTests that need VCL now need to
declare gb_CppunitTest_use_vcl.
* For things to work properly, the UNO component context needs to be disposed
from within DeInitVCL (cf. Desktop's Application::DeInit called from
DeInitVCL). The easiest solution was to introduce an
Application::setDeInitHook (where the hook is called from DeInitVCL)
specifically for vclbootstrapprotector to call.
* PythonTests don't (yet) call DeInitVCL; they still hook into
BootstrapFixture's original test_init functionality (to call InitVCL), and do
not make use of the vclbootstrapprotector.
Change-Id: I4f3a3c75db30b58c1cd49d81c51db14902ed68b2
92 files changed, 142 insertions, 18 deletions
diff --git a/Repository.mk b/Repository.mk index 700d9f5a3de5..1f0d38ba87b2 100644 --- a/Repository.mk +++ b/Repository.mk @@ -453,6 +453,7 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE, \ unobootstrapprotector \ unoexceptionprotector \ unotest \ + vclbootstrapprotector \ scqahelper \ unowinreg \ )) diff --git a/basic/CppunitTest_basic_coverage.mk b/basic/CppunitTest_basic_coverage.mk index 52585fb0b898..4031177288ba 100644 --- a/basic/CppunitTest_basic_coverage.mk +++ b/basic/CppunitTest_basic_coverage.mk @@ -55,6 +55,7 @@ $(eval $(call gb_CppunitTest_use_api,basic_coverage,\ )) $(eval $(call gb_CppunitTest_use_ure,basic_coverage)) +$(eval $(call gb_CppunitTest_use_vcl,basic_coverage)) $(eval $(call gb_CppunitTest_use_components,basic_coverage,\ configmgr/source/configmgr \ diff --git a/basic/CppunitTest_basic_enable.mk b/basic/CppunitTest_basic_enable.mk index 1e3f6195bda1..c9bdef7483b4 100644 --- a/basic/CppunitTest_basic_enable.mk +++ b/basic/CppunitTest_basic_enable.mk @@ -51,6 +51,7 @@ $(eval $(call gb_CppunitTest_use_api,basic_enable,\ )) $(eval $(call gb_CppunitTest_use_ure,basic_enable)) +$(eval $(call gb_CppunitTest_use_vcl,basic_enable)) $(eval $(call gb_CppunitTest_use_components,basic_enable,\ configmgr/source/configmgr \ diff --git a/basic/CppunitTest_basic_nested_struct.mk b/basic/CppunitTest_basic_nested_struct.mk index fcb4583d5a4c..0c08cdcbe39e 100644 --- a/basic/CppunitTest_basic_nested_struct.mk +++ b/basic/CppunitTest_basic_nested_struct.mk @@ -52,6 +52,7 @@ $(eval $(call gb_CppunitTest_use_api,basic_nested_struct,\ )) $(eval $(call gb_CppunitTest_use_ure,basic_nested_struct)) +$(eval $(call gb_CppunitTest_use_vcl,basic_nested_struct)) $(eval $(call gb_CppunitTest_use_components,basic_nested_struct,\ configmgr/source/configmgr \ diff --git a/basic/CppunitTest_basic_vba.mk b/basic/CppunitTest_basic_vba.mk index 9d61671b64e3..02ac3eb3ffc3 100644 --- a/basic/CppunitTest_basic_vba.mk +++ b/basic/CppunitTest_basic_vba.mk @@ -56,6 +56,7 @@ $(eval $(call gb_CppunitTest_use_api,basic_vba,\ )) $(eval $(call gb_CppunitTest_use_ure,basic_vba)) +$(eval $(call gb_CppunitTest_use_vcl,basic_vba)) $(eval $(call gb_CppunitTest_use_components,basic_vba,\ configmgr/source/configmgr \ diff --git a/chart2/CppunitTest_chart2_export.mk b/chart2/CppunitTest_chart2_export.mk index 7a32da076313..b2bf0a0b0f8e 100644 --- a/chart2/CppunitTest_chart2_export.mk +++ b/chart2/CppunitTest_chart2_export.mk @@ -66,6 +66,7 @@ $(eval $(call gb_CppunitTest_use_api,chart2_export,\ )) $(eval $(call gb_CppunitTest_use_ure,chart2_export)) +$(eval $(call gb_CppunitTest_use_vcl,chart2_export)) $(eval $(call gb_CppunitTest_use_components,chart2_export,\ basic/util/sb \ diff --git a/chart2/CppunitTest_chart2_import.mk b/chart2/CppunitTest_chart2_import.mk index 4413cf3433a1..7805a0314264 100644 --- a/chart2/CppunitTest_chart2_import.mk +++ b/chart2/CppunitTest_chart2_import.mk @@ -68,6 +68,7 @@ $(eval $(call gb_CppunitTest_use_api,chart2_import,\ )) $(eval $(call gb_CppunitTest_use_ure,chart2_import)) +$(eval $(call gb_CppunitTest_use_vcl,chart2_import)) $(eval $(call gb_CppunitTest_use_components,chart2_import,\ basic/util/sb \ diff --git a/chart2/CppunitTest_chart2_xshape.mk b/chart2/CppunitTest_chart2_xshape.mk index 12d0952c3b7a..47c03d23e9c7 100644 --- a/chart2/CppunitTest_chart2_xshape.mk +++ b/chart2/CppunitTest_chart2_xshape.mk @@ -69,6 +69,7 @@ $(eval $(call gb_CppunitTest_use_api,chart2_xshape,\ )) $(eval $(call gb_CppunitTest_use_ure,chart2_xshape)) +$(eval $(call gb_CppunitTest_use_vcl,chart2_xshape)) $(eval $(call gb_CppunitTest_use_components,chart2_xshape,\ basic/util/sb \ diff --git a/connectivity/CppunitTest_connectivity_commontools.mk b/connectivity/CppunitTest_connectivity_commontools.mk index dc726dcd4b42..e1c899ee1780 100644 --- a/connectivity/CppunitTest_connectivity_commontools.mk +++ b/connectivity/CppunitTest_connectivity_commontools.mk @@ -15,6 +15,7 @@ $(eval $(call gb_CppunitTest_set_include,connectivity_commontools,\ )) $(eval $(call gb_CppunitTest_use_ure,connectivity_commontools)) +$(eval $(call gb_CppunitTest_use_vcl,connectivity_commontools)) $(eval $(call gb_CppunitTest_use_external,connectivity_commontools,boost_headers)) diff --git a/connectivity/CppunitTest_connectivity_mork.mk b/connectivity/CppunitTest_connectivity_mork.mk index f4e31d52dc49..f07601493871 100644 --- a/connectivity/CppunitTest_connectivity_mork.mk +++ b/connectivity/CppunitTest_connectivity_mork.mk @@ -23,6 +23,7 @@ $(eval $(call gb_CppunitTest_use_api,connectivity_mork,\ )) $(eval $(call gb_CppunitTest_use_ure,connectivity_mork)) +$(eval $(call gb_CppunitTest_use_vcl,connectivity_mork)) $(eval $(call gb_CppunitTest_use_sdk_api,connectivity_mork)) diff --git a/cppcanvas/CppunitTest_cppcanvas_emfplus.mk b/cppcanvas/CppunitTest_cppcanvas_emfplus.mk index d6a73b57d499..8cd15066e0af 100644 --- a/cppcanvas/CppunitTest_cppcanvas_emfplus.mk +++ b/cppcanvas/CppunitTest_cppcanvas_emfplus.mk @@ -36,6 +36,7 @@ $(eval $(call gb_CppunitTest_use_api,cppcanvas_emfplus,\ )) $(eval $(call gb_CppunitTest_use_ure,cppcanvas_emfplus)) +$(eval $(call gb_CppunitTest_use_vcl,cppcanvas_emfplus)) $(eval $(call gb_CppunitTest_use_components,cppcanvas_emfplus,\ canvas/source/cairo/cairocanvas \ diff --git a/cppcanvas/CppunitTest_cppcanvas_test.mk b/cppcanvas/CppunitTest_cppcanvas_test.mk index e8b10940d951..b39c22639a5d 100644 --- a/cppcanvas/CppunitTest_cppcanvas_test.mk +++ b/cppcanvas/CppunitTest_cppcanvas_test.mk @@ -41,6 +41,7 @@ $(eval $(call gb_CppunitTest_use_api,cppcanvas_test,\ )) $(eval $(call gb_CppunitTest_use_ure,cppcanvas_test)) +$(eval $(call gb_CppunitTest_use_vcl,cppcanvas_test)) $(eval $(call gb_CppunitTest_use_components,cppcanvas_test,\ canvas/source/cairo/cairocanvas \ diff --git a/dbaccess/CppunitTest_dbaccess_dialog_save.mk b/dbaccess/CppunitTest_dbaccess_dialog_save.mk index 66abc7c58ac0..d5ff6bd3203c 100644 --- a/dbaccess/CppunitTest_dbaccess_dialog_save.mk +++ b/dbaccess/CppunitTest_dbaccess_dialog_save.mk @@ -66,6 +66,7 @@ $(eval $(call gb_CppunitTest_use_api,dbaccess_dialog_save,\ )) $(eval $(call gb_CppunitTest_use_ure,dbaccess_dialog_save)) +$(eval $(call gb_CppunitTest_use_vcl,dbaccess_dialog_save)) $(eval $(call gb_CppunitTest_use_components,dbaccess_dialog_save,\ basic/util/sb \ diff --git a/dbaccess/CppunitTest_dbaccess_embeddeddb_performancetest.mk b/dbaccess/CppunitTest_dbaccess_embeddeddb_performancetest.mk index 631c72e17f4f..2fe7e9476132 100644 --- a/dbaccess/CppunitTest_dbaccess_embeddeddb_performancetest.mk +++ b/dbaccess/CppunitTest_dbaccess_embeddeddb_performancetest.mk @@ -41,6 +41,7 @@ $(eval $(call gb_CppunitTest_use_api,dbaccess_embeddeddb_performancetest,\ )) $(eval $(call gb_CppunitTest_use_ure,dbaccess_embeddeddb_performancetest)) +$(eval $(call gb_CppunitTest_use_vcl,dbaccess_embeddeddb_performancetest)) $(eval $(call gb_CppunitTest_use_components,dbaccess_embeddeddb_performancetest,\ basic/util/sb \ diff --git a/dbaccess/CppunitTest_dbaccess_firebird_test.mk b/dbaccess/CppunitTest_dbaccess_firebird_test.mk index 1cb545d955ca..68351a7c54f3 100644 --- a/dbaccess/CppunitTest_dbaccess_firebird_test.mk +++ b/dbaccess/CppunitTest_dbaccess_firebird_test.mk @@ -36,6 +36,7 @@ $(eval $(call gb_CppunitTest_use_api,dbaccess_firebird_test,\ )) $(eval $(call gb_CppunitTest_use_ure,dbaccess_firebird_test)) +$(eval $(call gb_CppunitTest_use_vcl,dbaccess_firebird_test)) $(eval $(call gb_CppunitTest_use_components,dbaccess_firebird_test,\ basic/util/sb \ diff --git a/dbaccess/CppunitTest_dbaccess_hsqldb_test.mk b/dbaccess/CppunitTest_dbaccess_hsqldb_test.mk index 5bdaef6101a3..75b7a3e0599a 100644 --- a/dbaccess/CppunitTest_dbaccess_hsqldb_test.mk +++ b/dbaccess/CppunitTest_dbaccess_hsqldb_test.mk @@ -39,6 +39,7 @@ $(eval $(call gb_CppunitTest_use_api,dbaccess_hsqldb_test,\ )) $(eval $(call gb_CppunitTest_use_ure,dbaccess_hsqldb_test)) +$(eval $(call gb_CppunitTest_use_vcl,dbaccess_hsqldb_test)) $(eval $(call gb_CppunitTest_use_components,dbaccess_hsqldb_test,\ basic/util/sb \ diff --git a/dbaccess/CppunitTest_dbaccess_macros_test.mk b/dbaccess/CppunitTest_dbaccess_macros_test.mk index df8d67bf79dc..e0b81c8a06ab 100644 --- a/dbaccess/CppunitTest_dbaccess_macros_test.mk +++ b/dbaccess/CppunitTest_dbaccess_macros_test.mk @@ -66,6 +66,7 @@ $(eval $(call gb_CppunitTest_use_api,dbaccess_macros_test,\ )) $(eval $(call gb_CppunitTest_use_ure,dbaccess_macros_test)) +$(eval $(call gb_CppunitTest_use_vcl,dbaccess_macros_test)) $(eval $(call gb_CppunitTest_use_components,dbaccess_macros_test,\ basic/util/sb \ diff --git a/editeng/CppunitTest_editeng_core.mk b/editeng/CppunitTest_editeng_core.mk index 301c7604772b..171a03fb46b5 100644 --- a/editeng/CppunitTest_editeng_core.mk +++ b/editeng/CppunitTest_editeng_core.mk @@ -56,6 +56,7 @@ $(eval $(call gb_CppunitTest_use_api,editeng_core,\ )) $(eval $(call gb_CppunitTest_use_ure,editeng_core)) +$(eval $(call gb_CppunitTest_use_vcl,editeng_core)) $(eval $(call gb_CppunitTest_use_components,editeng_core,\ configmgr/source/configmgr \ diff --git a/extensions/CppunitTest_extensions_test_update.mk b/extensions/CppunitTest_extensions_test_update.mk index 4eebeb570152..80309ecf47ae 100644 --- a/extensions/CppunitTest_extensions_test_update.mk +++ b/extensions/CppunitTest_extensions_test_update.mk @@ -47,6 +47,7 @@ $(eval $(call gb_CppunitTest_use_api,extensions_test_update,\ )) $(eval $(call gb_CppunitTest_use_ure,extensions_test_update)) +$(eval $(call gb_CppunitTest_use_vcl,extensions_test_update)) $(eval $(call gb_CppunitTest_use_components,extensions_test_update,\ configmgr/source/configmgr \ diff --git a/filter/CppunitTest_filter_pcx_test.mk b/filter/CppunitTest_filter_pcx_test.mk index 5a5f6d6e08be..6f054ca6793f 100644 --- a/filter/CppunitTest_filter_pcx_test.mk +++ b/filter/CppunitTest_filter_pcx_test.mk @@ -31,6 +31,7 @@ $(eval $(call gb_CppunitTest_use_api,filter_pcx_test,\ )) $(eval $(call gb_CppunitTest_use_ure,filter_pcx_test)) +$(eval $(call gb_CppunitTest_use_vcl,filter_pcx_test)) $(eval $(call gb_CppunitTest_use_components,filter_pcx_test,\ configmgr/source/configmgr \ diff --git a/filter/CppunitTest_filter_pict_test.mk b/filter/CppunitTest_filter_pict_test.mk index a3fabd1615a9..174274570a65 100644 --- a/filter/CppunitTest_filter_pict_test.mk +++ b/filter/CppunitTest_filter_pict_test.mk @@ -30,6 +30,7 @@ $(eval $(call gb_CppunitTest_use_api,filter_pict_test,\ )) $(eval $(call gb_CppunitTest_use_ure,filter_pict_test)) +$(eval $(call gb_CppunitTest_use_vcl,filter_pict_test)) $(eval $(call gb_CppunitTest_use_components,filter_pict_test,\ configmgr/source/configmgr \ diff --git a/filter/CppunitTest_filter_ppm_test.mk b/filter/CppunitTest_filter_ppm_test.mk index cce904126206..147d8e9a9000 100644 --- a/filter/CppunitTest_filter_ppm_test.mk +++ b/filter/CppunitTest_filter_ppm_test.mk @@ -31,6 +31,7 @@ $(eval $(call gb_CppunitTest_use_api,filter_ppm_test,\ )) $(eval $(call gb_CppunitTest_use_ure,filter_ppm_test)) +$(eval $(call gb_CppunitTest_use_vcl,filter_ppm_test)) $(eval $(call gb_CppunitTest_use_components,filter_ppm_test,\ configmgr/source/configmgr \ diff --git a/filter/CppunitTest_filter_psd_test.mk b/filter/CppunitTest_filter_psd_test.mk index 850cc32dcac3..9df6c4e27dd8 100644 --- a/filter/CppunitTest_filter_psd_test.mk +++ b/filter/CppunitTest_filter_psd_test.mk @@ -31,6 +31,7 @@ $(eval $(call gb_CppunitTest_use_api,filter_psd_test,\ )) $(eval $(call gb_CppunitTest_use_ure,filter_psd_test)) +$(eval $(call gb_CppunitTest_use_vcl,filter_psd_test)) $(eval $(call gb_CppunitTest_use_components,filter_psd_test,\ configmgr/source/configmgr \ diff --git a/filter/CppunitTest_filter_ras_test.mk b/filter/CppunitTest_filter_ras_test.mk index feead9d3b597..22a49508c0fa 100644 --- a/filter/CppunitTest_filter_ras_test.mk +++ b/filter/CppunitTest_filter_ras_test.mk @@ -31,6 +31,7 @@ $(eval $(call gb_CppunitTest_use_api,filter_ras_test,\ )) $(eval $(call gb_CppunitTest_use_ure,filter_ras_test)) +$(eval $(call gb_CppunitTest_use_vcl,filter_ras_test)) $(eval $(call gb_CppunitTest_use_components,filter_ras_test,\ configmgr/source/configmgr \ diff --git a/filter/CppunitTest_filter_tga_test.mk b/filter/CppunitTest_filter_tga_test.mk index 3707f7998f0e..f788611352ad 100644 --- a/filter/CppunitTest_filter_tga_test.mk +++ b/filter/CppunitTest_filter_tga_test.mk @@ -31,6 +31,7 @@ $(eval $(call gb_CppunitTest_use_api,filter_tga_test,\ )) $(eval $(call gb_CppunitTest_use_ure,filter_tga_test)) +$(eval $(call gb_CppunitTest_use_vcl,filter_tga_test)) $(eval $(call gb_CppunitTest_use_components,filter_tga_test,\ configmgr/source/configmgr \ diff --git a/filter/CppunitTest_filter_tiff_test.mk b/filter/CppunitTest_filter_tiff_test.mk index 3d653da77186..42122c8f79d7 100644 --- a/filter/CppunitTest_filter_tiff_test.mk +++ b/filter/CppunitTest_filter_tiff_test.mk @@ -31,6 +31,7 @@ $(eval $(call gb_CppunitTest_use_api,filter_tiff_test,\ )) $(eval $(call gb_CppunitTest_use_ure,filter_tiff_test)) +$(eval $(call gb_CppunitTest_use_vcl,filter_tiff_test)) $(eval $(call gb_CppunitTest_use_components,filter_tiff_test,\ configmgr/source/configmgr \ diff --git a/filter/CppunitTest_filter_xslt.mk b/filter/CppunitTest_filter_xslt.mk index 181f4824b59f..feaf5028530f 100644 --- a/filter/CppunitTest_filter_xslt.mk +++ b/filter/CppunitTest_filter_xslt.mk @@ -15,6 +15,7 @@ $(eval $(call gb_CppunitTest_use_api,filter_xslt,\ )) $(eval $(call gb_CppunitTest_use_ure,filter_xslt)) +$(eval $(call gb_CppunitTest_use_vcl,filter_xslt)) $(eval $(call gb_CppunitTest_use_configuration,filter_xslt)) diff --git a/hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk b/hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk index 0098ebb9cf94..f205d80becb0 100644 --- a/hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk +++ b/hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk @@ -32,6 +32,7 @@ $(eval $(call gb_CppunitTest_use_api,hwpfilter_test_hwpfilter,\ )) $(eval $(call gb_CppunitTest_use_ure,hwpfilter_test_hwpfilter)) +$(eval $(call gb_CppunitTest_use_vcl,hwpfilter_test_hwpfilter)) $(eval $(call gb_CppunitTest_use_components,hwpfilter_test_hwpfilter,\ configmgr/source/configmgr \ diff --git a/include/cppunittester/protectorfactory.hxx b/include/cppunittester/protectorfactory.hxx index b0b21bd1b259..a0246970311f 100644 --- a/include/cppunittester/protectorfactory.hxx +++ b/include/cppunittester/protectorfactory.hxx @@ -33,6 +33,7 @@ namespace cppunittester #ifdef DISABLE_DYNLOADING extern "C" CppUnit::Protector *unoexceptionprotector(); extern "C" CppUnit::Protector *unobootstrapprotector(); +extern "C" CppUnit::Protector *vclbootstrapprotector(); #endif #endif diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx index 810aa2b6c13c..8b3ef420b17f 100644 --- a/include/vcl/svapp.hxx +++ b/include/vcl/svapp.hxx @@ -1541,6 +1541,9 @@ public: ///@} + // For vclbootstrapprotector: + static void setDeInitHook(Link const & hook); + private: static void InitSettings(); diff --git a/lotuswordpro/CppunitTest_lotuswordpro_test_lotuswordpro.mk b/lotuswordpro/CppunitTest_lotuswordpro_test_lotuswordpro.mk index 17b4f2b522a3..74d0a6fb134c 100644 --- a/lotuswordpro/CppunitTest_lotuswordpro_test_lotuswordpro.mk +++ b/lotuswordpro/CppunitTest_lotuswordpro_test_lotuswordpro.mk @@ -32,6 +32,7 @@ $(eval $(call gb_CppunitTest_use_api,lotuswordpro_test_lotuswordpro,\ )) $(eval $(call gb_CppunitTest_use_ure,lotuswordpro_test_lotuswordpro)) +$(eval $(call gb_CppunitTest_use_vcl,lotuswordpro_test_lotuswordpro)) $(eval $(call gb_CppunitTest_use_components,lotuswordpro_test_lotuswordpro,\ configmgr/source/configmgr \ diff --git a/postprocess/CppunitTest_services.mk b/postprocess/CppunitTest_services.mk index 5a8a65dbe298..bdcae7bbe0c6 100644 --- a/postprocess/CppunitTest_services.mk +++ b/postprocess/CppunitTest_services.mk @@ -27,6 +27,7 @@ $(eval $(call gb_CppunitTest_use_libraries,services, \ $(eval $(call gb_CppunitTest_use_sdk_api,services)) $(eval $(call gb_CppunitTest_use_ure,services)) +$(eval $(call gb_CppunitTest_use_vcl,services)) $(eval $(call gb_CppunitTest_use_rdb,services,services)) ifneq ($(DISABLE_PYTHON),TRUE) diff --git a/sax/CppunitTest_sax_parser.mk b/sax/CppunitTest_sax_parser.mk index b94b826059b1..330842804acf 100644 --- a/sax/CppunitTest_sax_parser.mk +++ b/sax/CppunitTest_sax_parser.mk @@ -28,6 +28,7 @@ $(eval $(call gb_CppunitTest_use_externals,sax_parser, \ $(eval $(call gb_CppunitTest_use_sdk_api,sax_parser)) $(eval $(call gb_CppunitTest_use_ure,sax_parser)) +$(eval $(call gb_CppunitTest_use_vcl,sax_parser)) $(eval $(call gb_CppunitTest_use_components,sax_parser,\ configmgr/source/configmgr \ diff --git a/sc/CppunitTest_sc_annotationobj.mk b/sc/CppunitTest_sc_annotationobj.mk index fc7890b5b6c3..5eb53c0a7d96 100644 --- a/sc/CppunitTest_sc_annotationobj.mk +++ b/sc/CppunitTest_sc_annotationobj.mk @@ -65,6 +65,7 @@ $(eval $(call gb_CppunitTest_use_api,sc_annotationobj,\ )) $(eval $(call gb_CppunitTest_use_ure,sc_annotationobj)) +$(eval $(call gb_CppunitTest_use_vcl,sc_annotationobj)) $(eval $(call gb_CppunitTest_use_components,sc_annotationobj,\ basic/util/sb \ diff --git a/sc/CppunitTest_sc_annotationsobj.mk b/sc/CppunitTest_sc_annotationsobj.mk index 71fa8c60c8ac..f91f1d3bff25 100644 --- a/sc/CppunitTest_sc_annotationsobj.mk +++ b/sc/CppunitTest_sc_annotationsobj.mk @@ -65,6 +65,7 @@ $(eval $(call gb_CppunitTest_use_api,sc_annotationsobj,\ )) $(eval $(call gb_CppunitTest_use_ure,sc_annotationsobj)) +$(eval $(call gb_CppunitTest_use_vcl,sc_annotationsobj)) $(eval $(call gb_CppunitTest_use_components,sc_annotationsobj,\ basic/util/sb \ diff --git a/sc/CppunitTest_sc_cellrangeobj.mk b/sc/CppunitTest_sc_cellrangeobj.mk index 2260beff4aed..804e4543cde9 100644 --- a/sc/CppunitTest_sc_cellrangeobj.mk +++ b/sc/CppunitTest_sc_cellrangeobj.mk @@ -65,6 +65,7 @@ $(eval $(call gb_CppunitTest_use_api,sc_cellrangeobj,\ )) $(eval $(call gb_CppunitTest_use_ure,sc_cellrangeobj)) +$(eval $(call gb_CppunitTest_use_vcl,sc_cellrangeobj)) $(eval $(call gb_CppunitTest_use_components,sc_cellrangeobj,\ basic/util/sb \ diff --git a/sc/CppunitTest_sc_databaserangeobj.mk b/sc/CppunitTest_sc_databaserangeobj.mk index e558f2d20b6e..442dcfdc7c3c 100644 --- a/sc/CppunitTest_sc_databaserangeobj.mk +++ b/sc/CppunitTest_sc_databaserangeobj.mk @@ -65,6 +65,7 @@ $(eval $(call gb_CppunitTest_use_api,sc_databaserangeobj,\ )) $(eval $(call gb_CppunitTest_use_ure,sc_databaserangeobj)) +$(eval $(call gb_CppunitTest_use_vcl,sc_databaserangeobj)) $(eval $(call gb_CppunitTest_use_components,sc_databaserangeobj,\ basic/util/sb \ diff --git a/sc/CppunitTest_sc_datapilotfieldobj.mk b/sc/CppunitTest_sc_datapilotfieldobj.mk index 98ad5d24a916..1786af50ece8 100644 --- a/sc/CppunitTest_sc_datapilotfieldobj.mk +++ b/sc/CppunitTest_sc_datapilotfieldobj.mk @@ -65,6 +65,7 @@ $(eval $(call gb_CppunitTest_use_api,sc_datapilotfieldobj,\ )) $(eval $(call gb_CppunitTest_use_ure,sc_datapilotfieldobj)) +$(eval $(call gb_CppunitTest_use_vcl,sc_datapilotfieldobj)) $(eval $(call gb_CppunitTest_use_components,sc_datapilotfieldobj,\ basic/util/sb \ diff --git a/sc/CppunitTest_sc_datapilottableobj.mk b/sc/CppunitTest_sc_datapilottableobj.mk index 4e2fc40c74e2..76ffe9a847c1 100644 --- a/sc/CppunitTest_sc_datapilottableobj.mk +++ b/sc/CppunitTest_sc_datapilottableobj.mk @@ -65,6 +65,7 @@ $(eval $(call gb_CppunitTest_use_api,sc_datapilottableobj,\ )) $(eval $(call gb_CppunitTest_use_ure,sc_datapilottableobj)) +$(eval $(call gb_CppunitTest_use_vcl,sc_datapilottableobj)) $(eval $(call gb_CppunitTest_use_components,sc_datapilottableobj,\ basic/util/sb \ diff --git a/sc/CppunitTest_sc_editfieldobj_cell.mk b/sc/CppunitTest_sc_editfieldobj_cell.mk index b84ba964e9af..cc4d5d166cc8 100644 --- a/sc/CppunitTest_sc_editfieldobj_cell.mk +++ b/sc/CppunitTest_sc_editfieldobj_cell.mk @@ -65,6 +65,7 @@ $(eval $(call gb_CppunitTest_use_api,sc_editfieldobj_cell,\ )) $(eval $(call gb_CppunitTest_use_ure,sc_editfieldobj_cell)) +$(eval $(call gb_CppunitTest_use_vcl,sc_editfieldobj_cell)) $(eval $(call gb_CppunitTest_use_components,sc_editfieldobj_cell,\ basic/util/sb \ diff --git a/sc/CppunitTest_sc_editfieldobj_header.mk b/sc/CppunitTest_sc_editfieldobj_header.mk index 12532f309a9e..049becc8e4fd 100644 --- a/sc/CppunitTest_sc_editfieldobj_header.mk +++ b/sc/CppunitTest_sc_editfieldobj_header.mk @@ -65,6 +65,7 @@ $(eval $(call gb_CppunitTest_use_api,sc_editfieldobj_header,\ )) $(eval $(call gb_CppunitTest_use_ure,sc_editfieldobj_header)) +$(eval $(call gb_CppunitTest_use_vcl,sc_editfieldobj_header)) $(eval $(call gb_CppunitTest_use_components,sc_editfieldobj_header,\ basic/util/sb \ diff --git a/sc/CppunitTest_sc_filters_test.mk b/sc/CppunitTest_sc_filters_test.mk index 1d4e3d167af8..ff12276e4439 100644 --- a/sc/CppunitTest_sc_filters_test.mk +++ b/sc/CppunitTest_sc_filters_test.mk @@ -72,6 +72,7 @@ $(eval $(call gb_CppunitTest_use_api,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_components,sc_filters_test,\ basic/util/sb \ diff --git a/sc/CppunitTest_sc_html_export_test.mk b/sc/CppunitTest_sc_html_export_test.mk index 7d95a7332325..f4ee040e13a1 100644 --- a/sc/CppunitTest_sc_html_export_test.mk +++ b/sc/CppunitTest_sc_html_export_test.mk @@ -64,6 +64,7 @@ $(eval $(call gb_CppunitTest_use_api,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_components,sc_html_export_test,\ basic/util/sb \ diff --git a/sc/CppunitTest_sc_macros_test.mk b/sc/CppunitTest_sc_macros_test.mk index 7251d48a4243..8298b633fd69 100644 --- a/sc/CppunitTest_sc_macros_test.mk +++ b/sc/CppunitTest_sc_macros_test.mk @@ -67,6 +67,7 @@ $(eval $(call gb_CppunitTest_use_api,sc_macros_test,\ )) $(eval $(call gb_CppunitTest_use_ure,sc_macros_test)) +$(eval $(call gb_CppunitTest_use_vcl,sc_macros_test)) $(eval $(call gb_CppunitTest_use_components,sc_macros_test,\ basic/util/sb \ diff --git a/sc/CppunitTest_sc_modelobj.mk b/sc/CppunitTest_sc_modelobj.mk index 90f70f51da52..4a3f1f3e0ec9 100644 --- a/sc/CppunitTest_sc_modelobj.mk +++ b/sc/CppunitTest_sc_modelobj.mk @@ -65,6 +65,7 @@ $(eval $(call gb_CppunitTest_use_api,sc_modelobj,\ )) $(eval $(call gb_CppunitTest_use_ure,sc_modelobj)) +$(eval $(call gb_CppunitTest_use_vcl,sc_modelobj)) $(eval $(call gb_CppunitTest_use_components,sc_modelobj,\ basic/util/sb \ diff --git a/sc/CppunitTest_sc_namedrangeobj.mk b/sc/CppunitTest_sc_namedrangeobj.mk index d83525cda338..b405008f5083 100644 --- a/sc/CppunitTest_sc_namedrangeobj.mk +++ b/sc/CppunitTest_sc_namedrangeobj.mk @@ -65,6 +65,7 @@ $(eval $(call gb_CppunitTest_use_api,sc_namedrangeobj,\ )) $(eval $(call gb_CppunitTest_use_ure,sc_namedrangeobj)) +$(eval $(call gb_CppunitTest_use_vcl,sc_namedrangeobj)) $(eval $(call gb_CppunitTest_use_components,sc_namedrangeobj,\ basic/util/sb \ diff --git a/sc/CppunitTest_sc_namedrangesobj.mk b/sc/CppunitTest_sc_namedrangesobj.mk index 01adaef54a25..724d61c502ff 100644 --- a/sc/CppunitTest_sc_namedrangesobj.mk +++ b/sc/CppunitTest_sc_namedrangesobj.mk @@ -65,6 +65,7 @@ $(eval $(call gb_CppunitTest_use_api,sc_namedrangesobj,\ )) $(eval $(call gb_CppunitTest_use_ure,sc_namedrangesobj)) +$(eval $(call gb_CppunitTest_use_vcl,sc_namedrangesobj)) $(eval $(call gb_CppunitTest_use_components,sc_namedrangesobj,\ basic/util/sb \ diff --git a/sc/CppunitTest_sc_opencl_test.mk b/sc/CppunitTest_sc_opencl_test.mk index 1a892fa64640..4adafd6bfd00 100644 --- a/sc/CppunitTest_sc_opencl_test.mk +++ b/sc/CppunitTest_sc_opencl_test.mk @@ -68,6 +68,7 @@ $(eval $(call gb_CppunitTest_use_api,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_components,sc_opencl_test,\ basic/util/sb \ diff --git a/sc/CppunitTest_sc_outlineobj.mk b/sc/CppunitTest_sc_outlineobj.mk index aeecc5873ba7..e319284e346a 100644 --- a/sc/CppunitTest_sc_outlineobj.mk +++ b/sc/CppunitTest_sc_outlineobj.mk @@ -65,6 +65,7 @@ $(eval $(call gb_CppunitTest_use_api,sc_outlineobj,\ )) $(eval $(call gb_CppunitTest_use_ure,sc_outlineobj)) +$(eval $(call gb_CppunitTest_use_vcl,sc_outlineobj)) $(eval $(call gb_CppunitTest_use_components,sc_outlineobj,\ basic/util/sb \ diff --git a/sc/CppunitTest_sc_rangelst_test.mk b/sc/CppunitTest_sc_rangelst_test.mk index 6d0e33c89089..2a394b1dc64c 100644 --- a/sc/CppunitTest_sc_rangelst_test.mk +++ b/sc/CppunitTest_sc_rangelst_test.mk @@ -76,6 +76,7 @@ $(eval $(call gb_CppunitTest_use_api,sc_rangelst_test,\ )) $(eval $(call gb_CppunitTest_use_ure,sc_rangelst_test)) +$(eval $(call gb_CppunitTest_use_vcl,sc_rangelst_test)) $(eval $(call gb_CppunitTest_use_components,sc_rangelst_test,\ basic/util/sb \ diff --git a/sc/CppunitTest_sc_subsequent_export_test.mk b/sc/CppunitTest_sc_subsequent_export_test.mk index 65fa468a057e..4d02d6bc79f7 100644 --- a/sc/CppunitTest_sc_subsequent_export_test.mk +++ b/sc/CppunitTest_sc_subsequent_export_test.mk @@ -66,6 +66,7 @@ $(eval $(call gb_CppunitTest_use_api,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_components,sc_subsequent_export_test,\ chart2/source/controller/chartcontroller \ diff --git a/sc/CppunitTest_sc_subsequent_filters_test.mk b/sc/CppunitTest_sc_subsequent_filters_test.mk index 3ad9d3b9a433..b53bb2461b81 100644 --- a/sc/CppunitTest_sc_subsequent_filters_test.mk +++ b/sc/CppunitTest_sc_subsequent_filters_test.mk @@ -66,6 +66,7 @@ $(eval $(call gb_CppunitTest_use_api,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_components,sc_subsequent_filters_test,\ chart2/source/controller/chartcontroller \ diff --git a/sc/CppunitTest_sc_tablesheetobj.mk b/sc/CppunitTest_sc_tablesheetobj.mk index 0f27f7056ad4..bf9d53bfdb52 100644 --- a/sc/CppunitTest_sc_tablesheetobj.mk +++ b/sc/CppunitTest_sc_tablesheetobj.mk @@ -65,6 +65,7 @@ $(eval $(call gb_CppunitTest_use_api,sc_tablesheetobj,\ )) $(eval $(call gb_CppunitTest_use_ure,sc_tablesheetobj)) +$(eval $(call gb_CppunitTest_use_vcl,sc_tablesheetobj)) $(eval $(call gb_CppunitTest_use_components,sc_tablesheetobj,\ basic/util/sb \ diff --git a/sc/CppunitTest_sc_tablesheetsobj.mk b/sc/CppunitTest_sc_tablesheetsobj.mk index f5a5c4641420..60c1c22d6195 100644 --- a/sc/CppunitTest_sc_tablesheetsobj.mk +++ b/sc/CppunitTest_sc_tablesheetsobj.mk @@ -65,6 +65,7 @@ $(eval $(call gb_CppunitTest_use_api,sc_tablesheetsobj,\ )) $(eval $(call gb_CppunitTest_use_ure,sc_tablesheetsobj)) +$(eval $(call gb_CppunitTest_use_vcl,sc_tablesheetsobj)) $(eval $(call gb_CppunitTest_use_components,sc_tablesheetsobj,\ basic/util/sb \ diff --git a/sc/CppunitTest_sc_ucalc.mk b/sc/CppunitTest_sc_ucalc.mk index 9b3c4988ce6f..fa5c3e9afa97 100644 --- a/sc/CppunitTest_sc_ucalc.mk +++ b/sc/CppunitTest_sc_ucalc.mk @@ -87,6 +87,7 @@ $(eval $(call gb_CppunitTest_use_api,sc_ucalc,\ )) $(eval $(call gb_CppunitTest_use_ure,sc_ucalc)) +$(eval $(call gb_CppunitTest_use_vcl,sc_ucalc)) $(eval $(call gb_CppunitTest_use_components,sc_ucalc,\ configmgr/source/configmgr \ diff --git a/sccomp/CppunitTest_sccomp_lpsolver.mk b/sccomp/CppunitTest_sccomp_lpsolver.mk index 1c0c72a36dd4..5c89fb27d7bb 100644 --- a/sccomp/CppunitTest_sccomp_lpsolver.mk +++ b/sccomp/CppunitTest_sccomp_lpsolver.mk @@ -41,6 +41,7 @@ $(eval $(call gb_CppunitTest_use_api,sccomp_lpsolver,\ )) $(eval $(call gb_CppunitTest_use_ure,sccomp_lpsolver)) +$(eval $(call gb_CppunitTest_use_vcl,sccomp_lpsolver)) $(eval $(call gb_CppunitTest_use_rdb,sccomp_lpsolver,services)) diff --git a/sd/CppunitTest_sd_filters_test.mk b/sd/CppunitTest_sd_filters_test.mk index 646b112b09d5..43a8d1329f38 100644 --- a/sd/CppunitTest_sd_filters_test.mk +++ b/sd/CppunitTest_sd_filters_test.mk @@ -67,6 +67,7 @@ $(eval $(call gb_CppunitTest_use_api,sd_filters_test,\ )) $(eval $(call gb_CppunitTest_use_ure,sd_filters_test)) +$(eval $(call gb_CppunitTest_use_vcl,sd_filters_test)) $(eval $(call gb_CppunitTest_use_components,sd_filters_test,\ animations/source/animcore/animcore \ diff --git a/sd/CppunitTest_sd_html_export_tests.mk b/sd/CppunitTest_sd_html_export_tests.mk index 457e90775a57..0feb03b63cc2 100644 --- a/sd/CppunitTest_sd_html_export_tests.mk +++ b/sd/CppunitTest_sd_html_export_tests.mk @@ -65,6 +65,7 @@ $(eval $(call gb_CppunitTest_use_api,sd_html_export_tests,\ )) $(eval $(call gb_CppunitTest_use_ure,sd_html_export_tests)) +$(eval $(call gb_CppunitTest_use_vcl,sd_html_export_tests)) $(eval $(call gb_CppunitTest_use_components,sd_html_export_tests,\ animations/source/animcore/animcore \ diff --git a/sd/CppunitTest_sd_import_tests.mk b/sd/CppunitTest_sd_import_tests.mk index ce8ad634bb57..e4801ac8151b 100644 --- a/sd/CppunitTest_sd_import_tests.mk +++ b/sd/CppunitTest_sd_import_tests.mk @@ -63,6 +63,7 @@ $(eval $(call gb_CppunitTest_use_api,sd_import_tests,\ )) $(eval $(call gb_CppunitTest_use_ure,sd_import_tests)) +$(eval $(call gb_CppunitTest_use_vcl,sd_import_tests)) $(eval $(call gb_CppunitTest_use_components,sd_import_tests,\ animations/source/animcore/animcore \ diff --git a/sdext/CppunitTest_sdext_pdfimport.mk b/sdext/CppunitTest_sdext_pdfimport.mk index a7e2a869260b..56680f2e56c2 100644 --- a/sdext/CppunitTest_sdext_pdfimport.mk +++ b/sdext/CppunitTest_sdext_pdfimport.mk @@ -47,6 +47,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sdext_pdfimport,\ $(eval $(call gb_CppunitTest_use_executable,sdext_pdfimport,xpdfimport)) $(eval $(call gb_CppunitTest_use_ure,sdext_pdfimport)) +$(eval $(call gb_CppunitTest_use_vcl,sdext_pdfimport)) $(eval $(call gb_CppunitTest_use_components,sdext_pdfimport,\ comphelper/util/comphelp \ diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk index cfbfd815eeab..c442601bd84c 100644 --- a/solenv/gbuild/CppunitTest.mk +++ b/solenv/gbuild/CppunitTest.mk @@ -57,7 +57,11 @@ $(if $(URE),\ -env:LO_JAVA_DIR=$(call gb_Helper_make_url,$(INSTROOT)/$(LIBO_SHARE_JAVA_FOLDER)) \ --protector $(call gb_Library_get_target,unoexceptionprotector) unoexceptionprotector \ --protector $(call gb_Library_get_target,unobootstrapprotector) unobootstrapprotector \ - ) $(ARGS) + ) \ +$(if $(VCL),\ + --protector $(call gb_Library_get_target,vclbootstrapprotector) vclbootstrapprotector \ + ) \ +$(ARGS) endef .PHONY : $(call gb_CppunitTest_get_clean_target,%) @@ -115,6 +119,7 @@ $(call gb_CppunitTest_CppunitTest_platform,$(1),$(2),$(gb_CppunitTest_DLLDIR)/$( $(call gb_CppunitTest_get_target,$(1)) : ARGS := $(call gb_CppunitTest_get_target,$(1)) : CONFIGURATION_LAYERS := $(call gb_CppunitTest_get_target,$(1)) : URE := $(false) +$(call gb_CppunitTest_get_target,$(1)) : VCL := $(false) $(call gb_CppunitTest_get_target,$(1)) : UNO_SERVICES := $(call gb_CppunitTest_get_target,$(1)) : UNO_TYPES := $(call gb_CppunitTest_get_target,$(1)) : HEADLESS := --headless @@ -142,6 +147,12 @@ $(call gb_CppunitTest_get_target,$(1)) : $(call gb_Library_get_target,unoexcepti endef +define gb_CppunitTest_use_vcl +$(call gb_CppunitTest_get_target,$(1)) : VCL := $(true) +$(call gb_CppunitTest_get_target,$(1)) : $(call gb_Library_get_target,vclbootstrapprotector) + +endef + define gb_CppunitTest__use_api $(call gb_CppunitTest_get_target,$(1)) : $(call gb_UnoApi_get_target,$(2)) $(call gb_CppunitTest_get_target,$(1)) : UNO_TYPES += $(call gb_UnoApi_get_target,$(2)) diff --git a/starmath/CppunitTest_starmath_qa_cppunit.mk b/starmath/CppunitTest_starmath_qa_cppunit.mk index 32b6b5684362..2130a228c128 100644 --- a/starmath/CppunitTest_starmath_qa_cppunit.mk +++ b/starmath/CppunitTest_starmath_qa_cppunit.mk @@ -58,6 +58,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,starmath_qa_cppunit,\ )) $(eval $(call gb_CppunitTest_use_ure,starmath_qa_cppunit)) +$(eval $(call gb_CppunitTest_use_vcl,starmath_qa_cppunit)) $(eval $(call gb_CppunitTest_use_components,starmath_qa_cppunit,\ configmgr/source/configmgr \ diff --git a/svgio/CppunitTest_svgio.mk b/svgio/CppunitTest_svgio.mk index 7fe8370df781..6c1380ce40b2 100644 --- a/svgio/CppunitTest_svgio.mk +++ b/svgio/CppunitTest_svgio.mk @@ -46,6 +46,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,svgio_import_test,\ )) $(eval $(call gb_CppunitTest_use_ure,svgio_import_test)) +$(eval $(call gb_CppunitTest_use_vcl,svgio_import_test)) $(eval $(call gb_CppunitTest_use_components,svgio_import_test,\ configmgr/source/configmgr \ diff --git a/sw/CppunitTest_sw_filters_test.mk b/sw/CppunitTest_sw_filters_test.mk index c5fd73cf0f42..c7805b413660 100644 --- a/sw/CppunitTest_sw_filters_test.mk +++ b/sw/CppunitTest_sw_filters_test.mk @@ -51,6 +51,7 @@ $(eval $(call gb_CppunitTest_use_api,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_components,sw_filters_test,\ basic/util/sb \ diff --git a/sw/CppunitTest_sw_htmlexport.mk b/sw/CppunitTest_sw_htmlexport.mk index ad79cfdf7db0..59afe0aa1589 100644 --- a/sw/CppunitTest_sw_htmlexport.mk +++ b/sw/CppunitTest_sw_htmlexport.mk @@ -49,6 +49,7 @@ $(eval $(call gb_CppunitTest_use_api,sw_htmlexport,\ )) $(eval $(call gb_CppunitTest_use_ure,sw_htmlexport)) +$(eval $(call gb_CppunitTest_use_vcl,sw_htmlexport)) $(eval $(call gb_CppunitTest_use_components,sw_htmlexport,\ basic/util/sb \ diff --git a/sw/CppunitTest_sw_macros_test.mk b/sw/CppunitTest_sw_macros_test.mk index a33fe67837ea..e83100d6ef9c 100644 --- a/sw/CppunitTest_sw_macros_test.mk +++ b/sw/CppunitTest_sw_macros_test.mk @@ -64,6 +64,7 @@ $(eval $(call gb_CppunitTest_use_api,sw_macros_test,\ )) $(eval $(call gb_CppunitTest_use_ure,sw_macros_test)) +$(eval $(call gb_CppunitTest_use_vcl,sw_macros_test)) $(eval $(call gb_CppunitTest_use_components,sw_macros_test,\ basic/util/sb \ diff --git a/sw/CppunitTest_sw_odfexport.mk b/sw/CppunitTest_sw_odfexport.mk index 2c0e19a3b429..080a840aa8ff 100644 --- a/sw/CppunitTest_sw_odfexport.mk +++ b/sw/CppunitTest_sw_odfexport.mk @@ -47,6 +47,7 @@ $(eval $(call gb_CppunitTest_use_api,sw_odfexport,\ )) $(eval $(call gb_CppunitTest_use_ure,sw_odfexport)) +$(eval $(call gb_CppunitTest_use_vcl,sw_odfexport)) $(eval $(call gb_CppunitTest_use_components,sw_odfexport,\ basic/util/sb \ diff --git a/sw/CppunitTest_sw_odfimport.mk b/sw/CppunitTest_sw_odfimport.mk index 95e452df8d74..57086ef34875 100644 --- a/sw/CppunitTest_sw_odfimport.mk +++ b/sw/CppunitTest_sw_odfimport.mk @@ -49,6 +49,7 @@ $(eval $(call gb_CppunitTest_use_api,sw_odfimport,\ )) $(eval $(call gb_CppunitTest_use_ure,sw_odfimport)) +$(eval $(call gb_CppunitTest_use_vcl,sw_odfimport)) $(eval $(call gb_CppunitTest_use_components,sw_odfimport,\ basic/util/sb \ diff --git a/sw/CppunitTest_sw_ooxmlexport.mk b/sw/CppunitTest_sw_ooxmlexport.mk index f60da29021f9..369f1ae99ea4 100644 --- a/sw/CppunitTest_sw_ooxmlexport.mk +++ b/sw/CppunitTest_sw_ooxmlexport.mk @@ -39,6 +39,7 @@ $(eval $(call gb_CppunitTest_use_api,sw_ooxmlexport,\ )) $(eval $(call gb_CppunitTest_use_ure,sw_ooxmlexport)) +$(eval $(call gb_CppunitTest_use_vcl,sw_ooxmlexport)) $(eval $(call gb_CppunitTest_use_components,sw_ooxmlexport,\ $(sw_ooxmlexport_components) \ diff --git a/sw/CppunitTest_sw_ooxmlimport.mk b/sw/CppunitTest_sw_ooxmlimport.mk index 2c4682bc2252..7eff1bc68ea3 100644 --- a/sw/CppunitTest_sw_ooxmlimport.mk +++ b/sw/CppunitTest_sw_ooxmlimport.mk @@ -46,6 +46,7 @@ $(eval $(call gb_CppunitTest_use_api,sw_ooxmlimport,\ )) $(eval $(call gb_CppunitTest_use_ure,sw_ooxmlimport)) +$(eval $(call gb_CppunitTest_use_vcl,sw_ooxmlimport)) $(eval $(call gb_CppunitTest_use_components,sw_ooxmlimport,\ basic/util/sb \ diff --git a/sw/CppunitTest_sw_ooxmlsdrexport.mk b/sw/CppunitTest_sw_ooxmlsdrexport.mk index 97b17b4ea14a..4907b2fa0755 100644 --- a/sw/CppunitTest_sw_ooxmlsdrexport.mk +++ b/sw/CppunitTest_sw_ooxmlsdrexport.mk @@ -39,6 +39,7 @@ $(eval $(call gb_CppunitTest_use_api,sw_ooxmlsdrexport,\ )) $(eval $(call gb_CppunitTest_use_ure,sw_ooxmlsdrexport)) +$(eval $(call gb_CppunitTest_use_vcl,sw_ooxmlsdrexport)) $(eval $(call gb_CppunitTest_use_components,sw_ooxmlsdrexport,\ $(sw_ooxmlexport_components) \ diff --git a/sw/CppunitTest_sw_ooxmlw14export.mk b/sw/CppunitTest_sw_ooxmlw14export.mk index 986767099d99..10583ec53c86 100644 --- a/sw/CppunitTest_sw_ooxmlw14export.mk +++ b/sw/CppunitTest_sw_ooxmlw14export.mk @@ -39,6 +39,7 @@ $(eval $(call gb_CppunitTest_use_api,sw_ooxmlw14export,\ )) $(eval $(call gb_CppunitTest_use_ure,sw_ooxmlw14export)) +$(eval $(call gb_CppunitTest_use_vcl,sw_ooxmlw14export)) $(eval $(call gb_CppunitTest_use_components,sw_ooxmlw14export,\ $(sw_ooxmlexport_components) \ diff --git a/sw/CppunitTest_sw_rtfexport.mk b/sw/CppunitTest_sw_rtfexport.mk index 9c5e175cc830..fc692d76a0f4 100644 --- a/sw/CppunitTest_sw_rtfexport.mk +++ b/sw/CppunitTest_sw_rtfexport.mk @@ -46,6 +46,7 @@ $(eval $(call gb_CppunitTest_use_api,sw_rtfexport,\ )) $(eval $(call gb_CppunitTest_use_ure,sw_rtfexport)) +$(eval $(call gb_CppunitTest_use_vcl,sw_rtfexport)) $(eval $(call gb_CppunitTest_use_components,sw_rtfexport,\ basic/util/sb \ diff --git a/sw/CppunitTest_sw_rtfimport.mk b/sw/CppunitTest_sw_rtfimport.mk index 772c5eb1e560..049e1a13cc37 100644 --- a/sw/CppunitTest_sw_rtfimport.mk +++ b/sw/CppunitTest_sw_rtfimport.mk @@ -48,6 +48,7 @@ $(eval $(call gb_CppunitTest_use_api,sw_rtfimport,\ )) $(eval $(call gb_CppunitTest_use_ure,sw_rtfimport)) +$(eval $(call gb_CppunitTest_use_vcl,sw_rtfimport)) $(eval $(call gb_CppunitTest_use_components,sw_rtfimport,\ basic/util/sb \ diff --git a/sw/CppunitTest_sw_uiwriter.mk b/sw/CppunitTest_sw_uiwriter.mk index 25925434f143..7bfa0eaff9c9 100644 --- a/sw/CppunitTest_sw_uiwriter.mk +++ b/sw/CppunitTest_sw_uiwriter.mk @@ -49,6 +49,7 @@ $(eval $(call gb_CppunitTest_use_api,sw_uiwriter,\ )) $(eval $(call gb_CppunitTest_use_ure,sw_uiwriter)) +$(eval $(call gb_CppunitTest_use_vcl,sw_uiwriter)) $(eval $(call gb_CppunitTest_use_components,sw_uiwriter,\ basic/util/sb \ diff --git a/sw/CppunitTest_sw_uwriter.mk b/sw/CppunitTest_sw_uwriter.mk index 9c43d3dace5c..495d0887b530 100644 --- a/sw/CppunitTest_sw_uwriter.mk +++ b/sw/CppunitTest_sw_uwriter.mk @@ -71,6 +71,7 @@ $(eval $(call gb_CppunitTest_use_api,sw_uwriter,\ )) $(eval $(call gb_CppunitTest_use_ure,sw_uwriter)) +$(eval $(call gb_CppunitTest_use_vcl,sw_uwriter)) $(eval $(call gb_CppunitTest_use_components,sw_uwriter,\ comphelper/util/comphelp \ diff --git a/sw/CppunitTest_sw_ww8export.mk b/sw/CppunitTest_sw_ww8export.mk index 37e9170bede3..6a661028cad5 100644 --- a/sw/CppunitTest_sw_ww8export.mk +++ b/sw/CppunitTest_sw_ww8export.mk @@ -47,6 +47,7 @@ $(eval $(call gb_CppunitTest_use_api,sw_ww8export,\ )) $(eval $(call gb_CppunitTest_use_ure,sw_ww8export)) +$(eval $(call gb_CppunitTest_use_vcl,sw_ww8export)) $(eval $(call gb_CppunitTest_use_components,sw_ww8export,\ basic/util/sb \ diff --git a/sw/CppunitTest_sw_ww8import.mk b/sw/CppunitTest_sw_ww8import.mk index d2282f5dd298..b916cefeff20 100644 --- a/sw/CppunitTest_sw_ww8import.mk +++ b/sw/CppunitTest_sw_ww8import.mk @@ -45,6 +45,7 @@ $(eval $(call gb_CppunitTest_use_api,sw_ww8import,\ )) $(eval $(call gb_CppunitTest_use_ure,sw_ww8import)) +$(eval $(call gb_CppunitTest_use_vcl,sw_ww8import)) $(eval $(call gb_CppunitTest_use_components,sw_ww8import,\ basic/util/sb \ diff --git a/test/Module_test.mk b/test/Module_test.mk index 905d66b52c6f..7482d280e94e 100644 --- a/test/Module_test.mk +++ b/test/Module_test.mk @@ -14,6 +14,7 @@ ifneq (,$(filter DESKTOP,$(BUILD_TYPE))) $(eval $(call gb_Module_add_targets,test,\ Library_test \ Library_subsequenttest \ + Library_vclbootstrapprotector \ Package_unittest \ )) diff --git a/test/source/bootstrapfixture.cxx b/test/source/bootstrapfixture.cxx index e8dcfa80c32e..110e0a53cf26 100644 --- a/test/source/bootstrapfixture.cxx +++ b/test/source/bootstrapfixture.cxx @@ -60,21 +60,6 @@ extern "C" void test_init_impl(bool bAssertOnDialog, bool bNeedUCB, lang::XMultiServiceFactory * pSFactory) { - // force locale (and resource files loaded) to en-US - OUString aLangISO( "en-US" ); - ResMgr::SetDefaultLocale( LanguageTag( aLangISO) ); - - SvtSysLocaleOptions aLocalOptions; - aLocalOptions.SetLocaleConfigString( aLangISO ); - aLocalOptions.SetUILocaleConfigString( aLangISO ); - - MsLangId::setConfiguredSystemUILanguage(LANGUAGE_ENGLISH_US); - LanguageTag::setConfiguredSystemLanguage(LANGUAGE_ENGLISH_US); - - InitVCL(); - if (Application::IsHeadlessModeRequested()) - Application::EnableHeadlessMode(true); - if (bAssertOnDialog) ErrorHandler::RegisterDisplay( aBasicErrorFunc ); @@ -102,6 +87,22 @@ SAL_DLLPUBLIC_EXPORT void test_init(lang::XMultiServiceFactory *pFactory) try { ::comphelper::setProcessServiceFactory(pFactory); + + // force locale (and resource files loaded) to en-US + OUString aLangISO( "en-US" ); + ResMgr::SetDefaultLocale( LanguageTag( aLangISO) ); + + SvtSysLocaleOptions aLocalOptions; + aLocalOptions.SetLocaleConfigString( aLangISO ); + aLocalOptions.SetUILocaleConfigString( aLangISO ); + + MsLangId::setConfiguredSystemUILanguage(LANGUAGE_ENGLISH_US); + LanguageTag::setConfiguredSystemLanguage(LANGUAGE_ENGLISH_US); + + InitVCL(); + if (Application::IsHeadlessModeRequested()) + Application::EnableHeadlessMode(true); + test_init_impl(false, true, pFactory); } catch (...) { abort(); } diff --git a/vcl/CppunitTest_vcl_complextext.mk b/vcl/CppunitTest_vcl_complextext.mk index dd85f1292105..60011a541a9e 100644 --- a/vcl/CppunitTest_vcl_complextext.mk +++ b/vcl/CppunitTest_vcl_complextext.mk @@ -40,6 +40,7 @@ $(eval $(call gb_CppunitTest_use_api,vcl_complextext,\ )) $(eval $(call gb_CppunitTest_use_ure,vcl_complextext)) +$(eval $(call gb_CppunitTest_use_vcl,vcl_complextext)) $(eval $(call gb_CppunitTest_use_components,vcl_complextext,\ configmgr/source/configmgr \ diff --git a/vcl/CppunitTest_vcl_filters_test.mk b/vcl/CppunitTest_vcl_filters_test.mk index 6edcff216e36..53122b1a73da 100644 --- a/vcl/CppunitTest_vcl_filters_test.mk +++ b/vcl/CppunitTest_vcl_filters_test.mk @@ -40,6 +40,7 @@ $(eval $(call gb_CppunitTest_use_api,vcl_filters_test,\ )) $(eval $(call gb_CppunitTest_use_ure,vcl_filters_test)) +$(eval $(call gb_CppunitTest_use_vcl,vcl_filters_test)) $(eval $(call gb_CppunitTest_use_components,vcl_filters_test,\ configmgr/source/configmgr \ diff --git a/vcl/CppunitTest_vcl_wmf_test.mk b/vcl/CppunitTest_vcl_wmf_test.mk index f7272c9f6e0d..5fb4e72acea6 100644 --- a/vcl/CppunitTest_vcl_wmf_test.mk +++ b/vcl/CppunitTest_vcl_wmf_test.mk @@ -44,6 +44,7 @@ $(eval $(call gb_CppunitTest_use_api,vcl_wmf_test,\ )) $(eval $(call gb_CppunitTest_use_ure,vcl_wmf_test)) +$(eval $(call gb_CppunitTest_use_vcl,vcl_wmf_test)) $(eval $(call gb_CppunitTest_use_components,vcl_wmf_test,\ configmgr/source/configmgr \ diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx index 21e6c548c7cd..b505ad6b6add 100644 --- a/vcl/inc/svdata.hxx +++ b/vcl/inc/svdata.hxx @@ -337,6 +337,8 @@ struct ImplSVData ::vcl::SettingsConfigItem* mpSettingsConfigItem; std::list< vcl::DeleteOnDeinitBase* >* mpDeinitDeleteList; boost::unordered_map< int, OUString >* mpPaperNames; + + Link maDeInitHook; }; void ImplInitSVData(); diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index b27b9c31174e..50cda48010c6 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -68,6 +68,7 @@ #include "comphelper/solarmutex.hxx" #include "osl/process.h" +#include <cassert> #include <utility> using namespace ::com::sun::star; @@ -1654,6 +1655,15 @@ Application::createFolderPicker( const Reference< uno::XComponentContext >& xSM return pSVData->mpDefInst->createFolderPicker( xSM ); } +void Application::setDeInitHook(Link const & hook) { + ImplSVData * pSVData = ImplGetSVData(); + assert(!pSVData->maDeInitHook.IsSet()); + pSVData->maDeInitHook = hook; + // Fake this for VCLXToolkit ctor instantiated from + // postprocess/CppunitTest_services.mk: + pSVData->maAppData.mbInAppMain = true; +} + // helper method to allow inline constructor even for pWindow!=NULL case void ImplDelData::AttachToWindow( const Window* pWindow ) { diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index 25c8f995a0db..0acb009292a5 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -17,6 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + +#include <cassert> + #include "rtl/logfile.hxx" #include <osl/file.hxx> @@ -464,13 +468,20 @@ void DeInitVCL() } } - if( pSVData->mpApp ) + if( pSVData->mpApp || pSVData->maDeInitHook.IsSet() ) { sal_uLong nCount = Application::ReleaseSolarMutex(); // call deinit to deinitialize application class // soffice/sfx implementation disposes the global service manager // Warning: After this call you can't call uno services - pSVData->mpApp->DeInit(); + if( pSVData->mpApp ) + { + pSVData->mpApp->DeInit(); + } + if( pSVData->maDeInitHook.IsSet() ) + { + pSVData->maDeInitHook.Call(0); + } Application::AcquireSolarMutex(nCount); } diff --git a/writerfilter/CppunitTest_writerfilter_rtftok.mk b/writerfilter/CppunitTest_writerfilter_rtftok.mk index 7bec367ca163..bb198006f6a6 100644 --- a/writerfilter/CppunitTest_writerfilter_rtftok.mk +++ b/writerfilter/CppunitTest_writerfilter_rtftok.mk @@ -35,6 +35,7 @@ $(eval $(call gb_CppunitTest_use_api,writerfilter_rtftok,\ )) $(eval $(call gb_CppunitTest_use_ure,writerfilter_rtftok)) +$(eval $(call gb_CppunitTest_use_vcl,writerfilter_rtftok)) $(eval $(call gb_CppunitTest_use_components,writerfilter_rtftok,\ configmgr/source/configmgr \ diff --git a/writerperfect/CppunitTest_writerperfect_calc.mk b/writerperfect/CppunitTest_writerperfect_calc.mk index 1a05595056b6..462871f072bd 100644 --- a/writerperfect/CppunitTest_writerperfect_calc.mk +++ b/writerperfect/CppunitTest_writerperfect_calc.mk @@ -34,6 +34,7 @@ $(eval $(call gb_CppunitTest_use_static_libraries,writerperfect_calc,\ )) $(eval $(call gb_CppunitTest_use_ure,writerperfect_calc)) +$(eval $(call gb_CppunitTest_use_vcl,writerperfect_calc)) $(eval $(call gb_CppunitTest_use_rdb,writerperfect_calc,services)) diff --git a/writerperfect/CppunitTest_writerperfect_draw.mk b/writerperfect/CppunitTest_writerperfect_draw.mk index de022846ff2e..fac4476a1457 100644 --- a/writerperfect/CppunitTest_writerperfect_draw.mk +++ b/writerperfect/CppunitTest_writerperfect_draw.mk @@ -34,6 +34,7 @@ $(eval $(call gb_CppunitTest_use_static_libraries,writerperfect_draw,\ )) $(eval $(call gb_CppunitTest_use_ure,writerperfect_draw)) +$(eval $(call gb_CppunitTest_use_vcl,writerperfect_draw)) $(eval $(call gb_CppunitTest_use_rdb,writerperfect_draw,services)) diff --git a/writerperfect/CppunitTest_writerperfect_impress.mk b/writerperfect/CppunitTest_writerperfect_impress.mk index bc361f7d768a..4da810cb8f0d 100644 --- a/writerperfect/CppunitTest_writerperfect_impress.mk +++ b/writerperfect/CppunitTest_writerperfect_impress.mk @@ -34,6 +34,7 @@ $(eval $(call gb_CppunitTest_use_static_libraries,writerperfect_impress,\ )) $(eval $(call gb_CppunitTest_use_ure,writerperfect_impress)) +$(eval $(call gb_CppunitTest_use_vcl,writerperfect_impress)) $(eval $(call gb_CppunitTest_use_rdb,writerperfect_impress,services)) diff --git a/writerperfect/CppunitTest_writerperfect_stream.mk b/writerperfect/CppunitTest_writerperfect_stream.mk index ad943e092692..337d6f1b480d 100644 --- a/writerperfect/CppunitTest_writerperfect_stream.mk +++ b/writerperfect/CppunitTest_writerperfect_stream.mk @@ -20,6 +20,7 @@ $(eval $(call gb_CppunitTest_use_api,writerperfect_stream,\ )) $(eval $(call gb_CppunitTest_use_ure,writerperfect_stream)) +$(eval $(call gb_CppunitTest_use_vcl,writerperfect_stream)) $(eval $(call gb_CppunitTest_use_externals,writerperfect_stream,\ boost_headers \ diff --git a/xmloff/CppunitTest_xmloff_uxmloff.mk b/xmloff/CppunitTest_xmloff_uxmloff.mk index 41fed906204f..1fa4ca473b72 100644 --- a/xmloff/CppunitTest_xmloff_uxmloff.mk +++ b/xmloff/CppunitTest_xmloff_uxmloff.mk @@ -27,6 +27,7 @@ $(eval $(call gb_CppunitTest_use_api,xmloff_uxmloff,\ )) $(eval $(call gb_CppunitTest_use_ure,xmloff_uxmloff)) +$(eval $(call gb_CppunitTest_use_vcl,xmloff_uxmloff)) $(eval $(call gb_CppunitTest_use_library_objects,xmloff_uxmloff,xo)) |