From 18be96dc73c64d16f63fc6d3382d7d7d3a8fee24 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 11 Dec 2009 14:29:59 +0100 Subject: [PATCH 01/23] sb118: Replace (heavily modified) CppUnit 1.8.0 with (unmodified) latest 1.12.1. - Old modifications were necessary for testshl2, which has simply been excluded from the build for now. - Tests in basebmp, basegfx, o3tl (that are executed during build) have been converted from using modified CppUnit/testshl2 to using unmodified CppUnit. - CppUnit's DllPlugInTester has problems with OOo tests on Windows, see #i107562#, so for now a new cppunittester from sal is used instead. --- basebmp/test/basictest.cxx | 15 ++++++------- basebmp/test/bmpmasktest.cxx | 6 ++++-- basebmp/test/bmptest.cxx | 6 ++++-- basebmp/test/cliptest.cxx | 6 ++++-- basebmp/test/export.map | 2 +- basebmp/test/filltest.cxx | 6 ++++-- basebmp/test/linetest.cxx | 6 ++++-- basebmp/test/makefile.mk | 3 +-- basebmp/test/masktest.cxx | 6 ++++-- basebmp/test/polytest.cxx | 6 ++++-- basegfx/prj/build.lst | 2 +- basegfx/test/basegfx1d.cxx | 16 ++++++-------- basegfx/test/basegfx2d.cxx | 42 ++++++++++++++++-------------------- basegfx/test/basegfx3d.cxx | 22 ++++++++----------- basegfx/test/export.map | 2 +- basegfx/test/makefile.mk | 3 +-- basegfx/test/tests.txt | 20 ----------------- o3tl/prj/build.lst | 2 +- o3tl/qa/export.map | 2 +- o3tl/qa/makefile.mk | 3 +-- o3tl/qa/test-cow_wrapper.cxx | 18 ++++++---------- o3tl/qa/test-heap_ptr.cxx | 6 ++++-- o3tl/qa/test-range.cxx | 7 +++--- 23 files changed, 89 insertions(+), 118 deletions(-) delete mode 100644 basegfx/test/tests.txt diff --git a/basebmp/test/basictest.cxx b/basebmp/test/basictest.cxx index 15d2da39851a..52693a41f129 100644 --- a/basebmp/test/basictest.cxx +++ b/basebmp/test/basictest.cxx @@ -30,7 +30,10 @@ // autogenerated file with codegen.pl -#include +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" +#include "cppunit/plugin/TestPlugIn.h" #include #include @@ -294,13 +297,7 @@ public: }; // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(BasicTest, "BasicTest"); +CPPUNIT_TEST_SUITE_REGISTRATION(BasicTest); } - -// ----------------------------------------------------------------------------- - -// this macro creates an empty function, which will called by the RegisterAllFunctions() -// to let the user the possibility to also register some functions by hand. -NOADDITIONAL; - +CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/basebmp/test/bmpmasktest.cxx b/basebmp/test/bmpmasktest.cxx index afadcad3b3fb..9c622157ca8f 100644 --- a/basebmp/test/bmpmasktest.cxx +++ b/basebmp/test/bmpmasktest.cxx @@ -30,7 +30,9 @@ // autogenerated file with codegen.pl -#include +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" #include #include @@ -180,7 +182,7 @@ public: }; // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(BmpMaskTest, "BmpMaskTest"); +CPPUNIT_TEST_SUITE_REGISTRATION(BmpMaskTest); } diff --git a/basebmp/test/bmptest.cxx b/basebmp/test/bmptest.cxx index 33ed58c25402..92d0c9b50f67 100644 --- a/basebmp/test/bmptest.cxx +++ b/basebmp/test/bmptest.cxx @@ -30,7 +30,9 @@ // autogenerated file with codegen.pl -#include +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" #include #include @@ -207,7 +209,7 @@ public: }; // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(BmpTest, "BmpTest"); +CPPUNIT_TEST_SUITE_REGISTRATION(BmpTest); } diff --git a/basebmp/test/cliptest.cxx b/basebmp/test/cliptest.cxx index 2172b0b667a7..89cd7ede6293 100644 --- a/basebmp/test/cliptest.cxx +++ b/basebmp/test/cliptest.cxx @@ -30,7 +30,9 @@ // autogenerated file with codegen.pl -#include +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" #include #include @@ -274,7 +276,7 @@ public: }; // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(ClipTest, "ClipTest"); +CPPUNIT_TEST_SUITE_REGISTRATION(ClipTest); } diff --git a/basebmp/test/export.map b/basebmp/test/export.map index bfd13f454044..ac406a4096dd 100644 --- a/basebmp/test/export.map +++ b/basebmp/test/export.map @@ -31,7 +31,7 @@ UDK_3.1 { global: - registerAllTestFunction; + cppunitTestPlugIn; local: *; diff --git a/basebmp/test/filltest.cxx b/basebmp/test/filltest.cxx index fcc4e5df5fa3..e2e5b32f7fed 100644 --- a/basebmp/test/filltest.cxx +++ b/basebmp/test/filltest.cxx @@ -30,7 +30,9 @@ // autogenerated file with codegen.pl -#include +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" #include #include @@ -268,7 +270,7 @@ public: }; // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(FillTest, "FillTest"); +CPPUNIT_TEST_SUITE_REGISTRATION(FillTest); } diff --git a/basebmp/test/linetest.cxx b/basebmp/test/linetest.cxx index 1a424864f893..488c6cf7c91b 100644 --- a/basebmp/test/linetest.cxx +++ b/basebmp/test/linetest.cxx @@ -30,7 +30,9 @@ // autogenerated file with codegen.pl -#include +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" #include #include @@ -216,7 +218,7 @@ public: }; // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(LineTest, "LineTest"); +CPPUNIT_TEST_SUITE_REGISTRATION(LineTest); } diff --git a/basebmp/test/makefile.mk b/basebmp/test/makefile.mk index 3ea13868aeb4..7061a77a8e09 100644 --- a/basebmp/test/makefile.mk +++ b/basebmp/test/makefile.mk @@ -124,7 +124,6 @@ SLOFILES=$(SHL1OBJS) # --- Targets ------------------------------------------------------ .INCLUDE : target.mk -.INCLUDE : _cppunit.mk # --- Enable test execution in normal build ------------------------ .IF "$(L10N_framework)"=="" @@ -133,7 +132,7 @@ unittest : $(SHL1TARGETN) @echo ---------------------------------------------------------- @echo - start unit test on library $(SHL1TARGETN) @echo ---------------------------------------------------------- - $(TESTSHL2) -sf $(mktmp ) $(SHL1TARGETN) + $(CPPUNITTESTER) $(SHL1TARGETN) ALLTAR : unittest .ENDIF diff --git a/basebmp/test/masktest.cxx b/basebmp/test/masktest.cxx index 61f329f094f2..f00ac66aff39 100644 --- a/basebmp/test/masktest.cxx +++ b/basebmp/test/masktest.cxx @@ -30,7 +30,9 @@ // autogenerated file with codegen.pl -#include +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" #include #include @@ -168,7 +170,7 @@ public: }; // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(MaskTest, "MaskTest"); +CPPUNIT_TEST_SUITE_REGISTRATION(MaskTest); } diff --git a/basebmp/test/polytest.cxx b/basebmp/test/polytest.cxx index e35c8c834bd9..c1e066eac562 100644 --- a/basebmp/test/polytest.cxx +++ b/basebmp/test/polytest.cxx @@ -30,7 +30,9 @@ // autogenerated file with codegen.pl -#include +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" #include #include @@ -288,7 +290,7 @@ public: }; // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(PolyTest, "PolyTest"); +CPPUNIT_TEST_SUITE_REGISTRATION(PolyTest); } diff --git a/basegfx/prj/build.lst b/basegfx/prj/build.lst index 418b3822a7ee..e4122616e769 100644 --- a/basegfx/prj/build.lst +++ b/basegfx/prj/build.lst @@ -1,4 +1,4 @@ -fx basegfx : o3tl sal offuh cppuhelper cppu testshl2 NULL +fx basegfx : o3tl sal offuh cppuhelper cppu cppunit NULL fx basegfx usr1 - all fx_mkout NULL fx basegfx\inc nmake - all fx_inc NULL fx basegfx\prj get - all fx_prj NULL diff --git a/basegfx/test/basegfx1d.cxx b/basegfx/test/basegfx1d.cxx index f058b0034fa7..8a10f3a77102 100644 --- a/basegfx/test/basegfx1d.cxx +++ b/basegfx/test/basegfx1d.cxx @@ -33,7 +33,10 @@ #include "precompiled_basegfx.hxx" // autogenerated file with codegen.pl -#include +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" +#include "cppunit/plugin/TestPlugIn.h" namespace basegfx1d { @@ -55,7 +58,6 @@ public: void EmptyMethod() { // CPPUNIT_ASSERT_MESSAGE("a message", 1 == 1); - CPPUNIT_ASSERT_STUB(); } // Change the following lines only, if you add, remove or rename @@ -68,13 +70,7 @@ public: }; // class b1drange // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(basegfx1d::b1drange, "basegfx1d"); +CPPUNIT_TEST_SUITE_REGISTRATION(basegfx1d::b1drange); } // namespace basegfx1d - -// ----------------------------------------------------------------------------- - -// this macro creates an empty function, which will called by the RegisterAllFunctions() -// to let the user the possibility to also register some functions by hand. -NOADDITIONAL; - +CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/basegfx/test/basegfx2d.cxx b/basegfx/test/basegfx2d.cxx index 4f0305df953f..0e0159dfab08 100644 --- a/basegfx/test/basegfx2d.cxx +++ b/basegfx/test/basegfx2d.cxx @@ -33,7 +33,9 @@ #include "precompiled_basegfx.hxx" // autogenerated file with codegen.pl -#include +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" #include #include @@ -753,7 +755,6 @@ public: { // this is demonstration code // CPPUNIT_ASSERT_MESSAGE("a message", 1 == 1); - CPPUNIT_ASSERT_STUB(); } // Change the following lines only, if you add, remove or rename @@ -1105,7 +1106,6 @@ public: // insert your test code here. void EmptyMethod() { - CPPUNIT_ASSERT_STUB(); } // Change the following lines only, if you add, remove or rename @@ -1135,7 +1135,6 @@ public: void EmptyMethod() { // CPPUNIT_ASSERT_MESSAGE("a message", 1 == 1); - CPPUNIT_ASSERT_STUB(); } // Change the following lines only, if you add, remove or rename @@ -1317,7 +1316,6 @@ public: // insert your test code here. void EmptyMethod() { - CPPUNIT_ASSERT_STUB(); } // Change the following lines only, if you add, remove or rename @@ -1347,7 +1345,6 @@ public: void EmptyMethod() { // CPPUNIT_ASSERT_MESSAGE("a message", 1 == 1); - CPPUNIT_ASSERT_STUB(); } // Change the following lines only, if you add, remove or rename @@ -1375,7 +1372,6 @@ public: // insert your test code here. void EmptyMethod() { - CPPUNIT_ASSERT_STUB(); } // Change the following lines only, if you add, remove or rename @@ -1405,7 +1401,6 @@ public: void EmptyMethod() { // CPPUNIT_ASSERT_MESSAGE("a message", 1 == 1); - CPPUNIT_ASSERT_STUB(); } // Change the following lines only, if you add, remove or rename @@ -1433,7 +1428,6 @@ public: // insert your test code here. void EmptyMethod() { - CPPUNIT_ASSERT_STUB(); } // Change the following lines only, if you add, remove or rename @@ -1618,21 +1612,21 @@ public: }; // class b2dvector // ----------------------------------------------------------------------------- -//CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(basegfx2d::b2dmultirange, "basegfx2d"); -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(basegfx2d::b2dsvgdimpex, "basegfx2d"); -//CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(basegfx2d::b2dbeziertools, "basegfx2d"); -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(basegfx2d::b2dcubicbezier, "basegfx2d"); -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(basegfx2d::b2dhommatrix, "basegfx2d"); -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(basegfx2d::b2dhompoint, "basegfx2d"); -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(basegfx2d::b2dpoint, "basegfx2d"); -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(basegfx2d::b2dpolygon, "basegfx2d"); -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(basegfx2d::b2dpolygontools, "basegfx2d"); -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(basegfx2d::b2dpolypolygon, "basegfx2d"); -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(basegfx2d::b2dquadraticbezier, "basegfx2d"); -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(basegfx2d::b2drange, "basegfx2d"); -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(basegfx2d::b2dtuple, "basegfx2d"); -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(basegfx2d::b2dvector, "basegfx2d"); -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(basegfx2d::bcolor, "basegfx2d"); +//CPPUNIT_TEST_SUITE_REGISTRATION(basegfx2d::b2dmultirange); +CPPUNIT_TEST_SUITE_REGISTRATION(basegfx2d::b2dsvgdimpex); +//CPPUNIT_TEST_SUITE_REGISTRATION(basegfx2d::b2dbeziertools); +CPPUNIT_TEST_SUITE_REGISTRATION(basegfx2d::b2dcubicbezier); +CPPUNIT_TEST_SUITE_REGISTRATION(basegfx2d::b2dhommatrix); +CPPUNIT_TEST_SUITE_REGISTRATION(basegfx2d::b2dhompoint); +CPPUNIT_TEST_SUITE_REGISTRATION(basegfx2d::b2dpoint); +CPPUNIT_TEST_SUITE_REGISTRATION(basegfx2d::b2dpolygon); +CPPUNIT_TEST_SUITE_REGISTRATION(basegfx2d::b2dpolygontools); +CPPUNIT_TEST_SUITE_REGISTRATION(basegfx2d::b2dpolypolygon); +CPPUNIT_TEST_SUITE_REGISTRATION(basegfx2d::b2dquadraticbezier); +CPPUNIT_TEST_SUITE_REGISTRATION(basegfx2d::b2drange); +CPPUNIT_TEST_SUITE_REGISTRATION(basegfx2d::b2dtuple); +CPPUNIT_TEST_SUITE_REGISTRATION(basegfx2d::b2dvector); +CPPUNIT_TEST_SUITE_REGISTRATION(basegfx2d::bcolor); } // namespace basegfx2d diff --git a/basegfx/test/basegfx3d.cxx b/basegfx/test/basegfx3d.cxx index fc59ffbced4e..4272fd6a8615 100644 --- a/basegfx/test/basegfx3d.cxx +++ b/basegfx/test/basegfx3d.cxx @@ -33,7 +33,9 @@ #include "precompiled_basegfx.hxx" // autogenerated file with codegen.pl -#include +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" namespace basegfx3d { @@ -55,7 +57,6 @@ public: void EmptyMethod() { // CPPUNIT_ASSERT_MESSAGE("a message", 1 == 1); - CPPUNIT_ASSERT_STUB(); } // Change the following lines only, if you add, remove or rename @@ -83,7 +84,6 @@ public: // insert your test code here. void EmptyMethod() { - CPPUNIT_ASSERT_STUB(); } // Change the following lines only, if you add, remove or rename @@ -113,7 +113,6 @@ public: void EmptyMethod() { // CPPUNIT_ASSERT_MESSAGE("a message", 1 == 1); - CPPUNIT_ASSERT_STUB(); } // Change the following lines only, if you add, remove or rename @@ -141,7 +140,6 @@ public: // insert your test code here. void EmptyMethod() { - CPPUNIT_ASSERT_STUB(); } // Change the following lines only, if you add, remove or rename @@ -171,7 +169,6 @@ public: void EmptyMethod() { // CPPUNIT_ASSERT_MESSAGE("a message", 1 == 1); - CPPUNIT_ASSERT_STUB(); } // Change the following lines only, if you add, remove or rename @@ -199,7 +196,6 @@ public: // insert your test code here. void EmptyMethod() { - CPPUNIT_ASSERT_STUB(); } // Change the following lines only, if you add, remove or rename @@ -212,12 +208,12 @@ public: }; // class b3dvector // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(basegfx3d::b3dhommatrix, "basegfx3d"); -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(basegfx3d::b3dhompoint, "basegfx3d"); -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(basegfx3d::b3dpoint, "basegfx3d"); -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(basegfx3d::b3drange, "basegfx3d"); -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(basegfx3d::b3dtuple, "basegfx3d"); -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(basegfx3d::b3dvector, "basegfx3d"); +CPPUNIT_TEST_SUITE_REGISTRATION(basegfx3d::b3dhommatrix); +CPPUNIT_TEST_SUITE_REGISTRATION(basegfx3d::b3dhompoint); +CPPUNIT_TEST_SUITE_REGISTRATION(basegfx3d::b3dpoint); +CPPUNIT_TEST_SUITE_REGISTRATION(basegfx3d::b3drange); +CPPUNIT_TEST_SUITE_REGISTRATION(basegfx3d::b3dtuple); +CPPUNIT_TEST_SUITE_REGISTRATION(basegfx3d::b3dvector); } // namespace basegfx3d diff --git a/basegfx/test/export.map b/basegfx/test/export.map index 37f3bf2c55d2..eef13a7090fb 100644 --- a/basegfx/test/export.map +++ b/basegfx/test/export.map @@ -31,7 +31,7 @@ UDK_3.1 { global: - registerAllTestFunction; + cppunitTestPlugIn; local: *; diff --git a/basegfx/test/makefile.mk b/basegfx/test/makefile.mk index 1bd4d59b98d5..3685b2a50eda 100644 --- a/basegfx/test/makefile.mk +++ b/basegfx/test/makefile.mk @@ -82,7 +82,6 @@ SLOFILES=$(SHL1OBJS) # --- Targets ------------------------------------------------------ .INCLUDE : target.mk -.INCLUDE : _cppunit.mk # --- Enable testshl2 execution in normal build ------------------------ @@ -90,7 +89,7 @@ $(MISC)$/unittest_succeeded : $(SHL1TARGETN) @echo ---------------------------------------------------------- @echo - start unit test on library $(SHL1TARGETN) @echo ---------------------------------------------------------- - $(TESTSHL2) -sf $(mktmp ) -forward $(BIN)$/ $(SHL1TARGETN) + $(CPPUNITTESTER) $(SHL1TARGETN) $(TOUCH) $@ ALLTAR : $(MISC)$/unittest_succeeded diff --git a/basegfx/test/tests.txt b/basegfx/test/tests.txt deleted file mode 100644 index fc2d33ab51d5..000000000000 --- a/basegfx/test/tests.txt +++ /dev/null @@ -1,20 +0,0 @@ -# Jobfile -basegfx1d.b1drange -basegfx2d.b2dcubicbezier -basegfx2d.b2dhommatrix -basegfx2d.b2dhompoint -basegfx2d.b2dpoint -basegfx2d.b2dpolygon -basegfx2d.b2dpolygontools -basegfx2d.b2dpolypolygon -basegfx2d.b2dquadraticbezier -basegfx2d.b2drange -basegfx2d.b2dtuple -basegfx2d.b2dvector -basegfx3d.b3dhommatrix -basegfx3d.b3dhompoint -basegfx3d.b3dhompoint -basegfx3d.b3dpoint -basegfx3d.b3drange -basegfx3d.b3dtuple -basegfx3d.b3dvector diff --git a/o3tl/prj/build.lst b/o3tl/prj/build.lst index 98293257e4bd..fe6b53d1c732 100644 --- a/o3tl/prj/build.lst +++ b/o3tl/prj/build.lst @@ -1,4 +1,4 @@ -ot o3tl : sal testshl2 BOOST:boost NULL +ot o3tl : sal cppunit BOOST:boost NULL ot o3tl usr1 - all ot_mkout NULL ot o3tl\inc get - all ot_inc NULL ot o3tl\prj get - all ot_prj NULL diff --git a/o3tl/qa/export.map b/o3tl/qa/export.map index bfd13f454044..ac406a4096dd 100644 --- a/o3tl/qa/export.map +++ b/o3tl/qa/export.map @@ -31,7 +31,7 @@ UDK_3.1 { global: - registerAllTestFunction; + cppunitTestPlugIn; local: *; diff --git a/o3tl/qa/makefile.mk b/o3tl/qa/makefile.mk index 70fe224cf6a9..778c24d6b9f2 100644 --- a/o3tl/qa/makefile.mk +++ b/o3tl/qa/makefile.mk @@ -68,7 +68,6 @@ SLOFILES=$(SHL1OBJS) .ENDIF # L10N_framework .INCLUDE : target.mk -.INCLUDE : _cppunit.mk # --- Enable test execution in normal build ------------------------ .IF "$(L10N_framework)"=="" @@ -76,7 +75,7 @@ unittest : $(SHL1TARGETN) @echo ---------------------------------------------------------- @echo - start unit test on library $(SHL1TARGETN) @echo ---------------------------------------------------------- - $(TESTSHL2) -sf $(mktmp ) $(SHL1TARGETN) + $(CPPUNITTESTER) $(SHL1TARGETN) ALLTAR : unittest .ENDIF # L10N_framework diff --git a/o3tl/qa/test-cow_wrapper.cxx b/o3tl/qa/test-cow_wrapper.cxx index 6bb169e951a4..84d615fca3db 100644 --- a/o3tl/qa/test-cow_wrapper.cxx +++ b/o3tl/qa/test-cow_wrapper.cxx @@ -1,6 +1,9 @@ // autogenerated file with codegen.pl -#include +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" +#include "cppunit/plugin/TestPlugIn.h" #include "cow_wrapper_clients.hxx" @@ -119,15 +122,6 @@ public: }; // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(cow_wrapper_test, "cow_wrapper_test"); - - -// ----------------------------------------------------------------------------- - -// this macro creates an empty function, which will called by the RegisterAllFunctions() -// to let the user the possibility to also register some functions by hand. -void RegisterAdditionalFunctions(FktRegFuncPtr ) -{ -} -// NOADDITIONAL; +CPPUNIT_TEST_SUITE_REGISTRATION(cow_wrapper_test); +CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/o3tl/qa/test-heap_ptr.cxx b/o3tl/qa/test-heap_ptr.cxx index 5e247a8b9abc..3c50c68872d2 100644 --- a/o3tl/qa/test-heap_ptr.cxx +++ b/o3tl/qa/test-heap_ptr.cxx @@ -28,7 +28,9 @@ * ************************************************************************/ -#include +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" #include @@ -163,4 +165,4 @@ class heap_ptr_test : public CppUnit::TestFixture }; // class heap_ptr_test // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(heap_ptr_test, "o3tltests"); +CPPUNIT_TEST_SUITE_REGISTRATION(heap_ptr_test); diff --git a/o3tl/qa/test-range.cxx b/o3tl/qa/test-range.cxx index 626d9b6e3a90..326f8d4e06ef 100644 --- a/o3tl/qa/test-range.cxx +++ b/o3tl/qa/test-range.cxx @@ -28,8 +28,9 @@ * ************************************************************************/ - -#include +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" #include #include @@ -233,4 +234,4 @@ public: }; // class range_test // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(range_test, "o3tltests"); +CPPUNIT_TEST_SUITE_REGISTRATION(range_test); From 7397e8c1bb3d3f5562590c07a535d9749dca4279 Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 7 Jan 2010 11:18:02 +0100 Subject: [PATCH 02/23] sb118: make test libraries RPATH=NONE --- basebmp/test/makefile.mk | 2 ++ basegfx/test/makefile.mk | 1 + o3tl/qa/makefile.mk | 1 + 3 files changed, 4 insertions(+) diff --git a/basebmp/test/makefile.mk b/basebmp/test/makefile.mk index 25cb06eb413d..94be97c81038 100644 --- a/basebmp/test/makefile.mk +++ b/basebmp/test/makefile.mk @@ -95,6 +95,8 @@ SHL1IMPLIB= i$(SHL1TARGET) DEF1NAME =$(SHL1TARGET) SHL1VERSIONMAP = export.map +SHL1RPATH = NONE + .ENDIF # END ------------------------------------------------------------------ diff --git a/basegfx/test/makefile.mk b/basegfx/test/makefile.mk index 5165952a0e4b..fd9633ab6f2d 100644 --- a/basegfx/test/makefile.mk +++ b/basegfx/test/makefile.mk @@ -72,6 +72,7 @@ SHL1IMPLIB= i$(SHL1TARGET) DEF1NAME =$(SHL1TARGET) SHL1VERSIONMAP = export.map +SHL1RPATH = NONE # END ------------------------------------------------------------------ diff --git a/o3tl/qa/makefile.mk b/o3tl/qa/makefile.mk index a27c99a74df9..491c50ec2095 100644 --- a/o3tl/qa/makefile.mk +++ b/o3tl/qa/makefile.mk @@ -57,6 +57,7 @@ SHL1IMPLIB= i$(SHL1TARGET) DEF1NAME =$(SHL1TARGET) SHL1VERSIONMAP = export.map +SHL1RPATH = NONE # END ------------------------------------------------------------------ From 949256f2a9f042e258478bdd5c0ef631e5e55b7b Mon Sep 17 00:00:00 2001 From: sb Date: Mon, 11 Jan 2010 11:30:25 +0100 Subject: [PATCH 03/23] sb118: introduced AUGMENT_LIBRARY_PATH_LOCAL, used by CPPUNITTESTER so that tests within a module pick up shared libs from that module in the local output tree --- basebmp/test/makefile.mk | 12 +++--------- basegfx/test/makefile.mk | 14 +------------- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/basebmp/test/makefile.mk b/basebmp/test/makefile.mk index 94be97c81038..36b540231188 100644 --- a/basebmp/test/makefile.mk +++ b/basebmp/test/makefile.mk @@ -78,16 +78,10 @@ SHL1OBJS= \ $(SLO)$/linetest.obj \ $(SLO)$/masktest.obj \ $(SLO)$/polytest.obj \ - $(SLO)$/tools.obj \ - $(SLO)$/bitmapdevice.obj \ - $(SLO)$/debug.obj \ - $(SLO)$/polypolygonrenderer.obj -# last three objs are a bit of a hack: cannot link against LIBBASEBMP -# here, because not yet delivered. Need the functionality to test, so -# we're linking it in statically. Need to keep this in sync with -# source/makefile.mk + $(SLO)$/tools.obj SHL1TARGET= tests -SHL1STDLIBS= $(SALLIB) \ +SHL1STDLIBS= $(BASEBMPLIB) \ + $(SALLIB) \ $(CPPUNITLIB) \ $(BASEGFXLIB) diff --git a/basegfx/test/makefile.mk b/basegfx/test/makefile.mk index fd9633ab6f2d..be6e537ba25a 100644 --- a/basegfx/test/makefile.mk +++ b/basegfx/test/makefile.mk @@ -48,21 +48,9 @@ SHL1OBJS= \ $(SLO)$/basegfx3d.obj \ $(SLO)$/testtools.obj -# linking statically against basegfx parts -SHL1LIBS=\ - $(SLB)$/curve.lib \ - $(SLB)$/matrix.lib \ - $(SLB)$/numeric.lib \ - $(SLB)$/point.lib \ - $(SLB)$/polygon.lib \ - $(SLB)$/range.lib \ - $(SLB)$/tuple.lib \ - $(SLB)$/tools.lib \ - $(SLB)$/color.lib \ - $(SLB)$/vector.lib - SHL1TARGET= basegfx_tests SHL1STDLIBS= \ + $(BASEGFXLIB) \ $(SALLIB) \ $(CPPUHELPERLIB) \ $(CPPULIB) \ From 24532f08558415d3520500e80db65152da3a5a61 Mon Sep 17 00:00:00 2001 From: sb Date: Tue, 12 Jan 2010 18:49:59 +0100 Subject: [PATCH 04/23] sb118: #i108269# first step of removing tcsh support --- .../java/transex3/model/SdfString.java | 25 --------- transex3/scripts/fast_merge.pl | 10 +--- transex3/scripts/localize.pl | 38 ++++--------- transex3/scripts/localize_old.pl | 56 +------------------ 4 files changed, 16 insertions(+), 113 deletions(-) diff --git a/transex3/java/receditor/java/transex3/model/SdfString.java b/transex3/java/receditor/java/transex3/model/SdfString.java index 7419aeb5578b..7eec2151b7c3 100644 --- a/transex3/java/receditor/java/transex3/model/SdfString.java +++ b/transex3/java/receditor/java/transex3/model/SdfString.java @@ -97,32 +97,7 @@ public class SdfString { public void setModuleName(String modulename) { this.modulename = modulename; } - /* - public String getRealFileName(){ - //String srcroot = "U:\\cws01\\l10ncleanup\\SRC680\\src.m213";//java.lang.System.getProperty( "SOLARSRC"); - //String isWindows = "4nt";//java.lang.System.getProperty( "USE_SHELL"); - String srcroot = java.lang.System.getProperty( "SOLARSRC" ); - String isWindows = java.lang.System.getProperty( "USE_SHELL" ); - //System.out.println("srcroot="+srcroot+" isWindows="+isWindows ); - //if( true ) return; - //String relpath = sourceString.getFileId().substring( sourceString.getFileId().lastIndexOf("\\") - // , sourceString.getFileId().length() ); - String filename; - if( isWindows != null && isWindows.compareTo( "4nt") == 0 ) - { - filename = srcroot + "\\" + //sourceString.getProject() + "\\" + - sourceString.getFileId() +".recommand"; - } - else - { - String filepart = sourceString.getFileId(); - filepart = filepart.replaceAll( "\\\\" , "/" ); - filename = srcroot + "/" + //sourceString.getProject() + "//" + - filepart +".recommand"; - } - return filename; - }*/ public String getRealFileName(){ String filepart = sourceString.getFileId(); filepart = filepart.replaceAll( "\\\\" , "_" ); diff --git a/transex3/scripts/fast_merge.pl b/transex3/scripts/fast_merge.pl index 7321a9a42911..d2505cf79dca 100644 --- a/transex3/scripts/fast_merge.pl +++ b/transex3/scripts/fast_merge.pl @@ -53,12 +53,8 @@ my $last_localize_file; my $first_run = "1"; my $sdf_filename; my $merge_dir; -my $WIN; my $state = "none"; -if ( defined $ENV{USE_SHELL} && $ENV{USE_SHELL} eq '4nt' ) { $WIN = 'TRUE'; } -else { $WIN = ''; } - $SIG{INT} = 'inthandler'; $SIG{QUIT} = 'quithandler'; @@ -75,7 +71,6 @@ struct ( sdf_obj => parse_options(); my $lock_file = $merge_dir."/lock.mk"; -$lock_file =~ s/\//\\/g , if ( $WIN ) ; acquire_lock(); read_sdf_file_names(); init(); @@ -255,10 +250,9 @@ sub make_paths { my $localizeFile = $merge_dir."\\".$current[ 0 ]->module."\\".$current[ 0 ]->file; my $path = getDir( $localizeFile ); - if ( !$WIN ) { $path =~ s/\\/\//g; } + $path =~ s/\\/\//g; - $localizeFile = $path."\\localize.sdf"; - if ( !$WIN ) { $localizeFile =~ s/\\/\//g; } + $localizeFile = $path."/localize.sdf"; return ( $path , $localizeFile ); } diff --git a/transex3/scripts/localize.pl b/transex3/scripts/localize.pl index 10e8124027b1..9f733481a587 100755 --- a/transex3/scripts/localize.pl +++ b/transex3/scripts/localize.pl @@ -74,13 +74,11 @@ my $no_gsicheck = ''; my $mode = ''; my $bVerbose = "0"; my $srcpath = ''; -my $WIN; my $languages; #my %sl_modules; # Contains all modules where en-US and de is source language my $use_default_date = '0'; my %is_ooo_module; my %is_so_module; -my $DELIMITER; # ( leftpart ) ( rightpart ) # prj file dummy type gid lid helpid pform width lang text helptext qhelptext title timestamp @@ -94,23 +92,14 @@ my @sdfparticles; parse_options(); check_modules_scm(); -if ( defined $ENV{USE_SHELL} && $ENV{USE_SHELL} eq '4nt' ) { - $WIN = 'TRUE'; - $DELIMITER = "\\"; -} - else { - $WIN = ''; - $DELIMITER = "/"; -} - my $binpath = ''; if( defined $ENV{UPDMINOREXT} ) { - $binpath = $ENV{SOLARVER}.$DELIMITER.$ENV{INPATH}.$DELIMITER."bin".$ENV{UPDMINOREXT}.$DELIMITER ; + $binpath = $ENV{SOLARVER}."/".$ENV{INPATH}."/bin".$ENV{UPDMINOREXT}."/" ; } else { - $binpath = $ENV{SOLARVER}.$DELIMITER.$ENV{INPATH}.$DELIMITER."bin".$DELIMITER ; + $binpath = $ENV{SOLARVER}."/".$ENV{INPATH}."/bin/" ; } #%sl_modules = fetch_sourcelanguage_dirlist(); @@ -190,9 +179,8 @@ sub splitfile{ exit( -1 ); } my $src_root = $ENV{SRC_ROOT}; - #print $WIN eq "TRUE" ? $src_root."\\l10n_so\n" : $src_root."/l10n_so\n"; - my $so_l10n_path = $WIN eq "TRUE" ? $src_root."\\l10n_so\\source" : $src_root."/l10n_so/source"; - my $ooo_l10n_path = $WIN eq "TRUE" ? $src_root."\\l10n\\source" : $src_root."/l10n/source"; + my $so_l10n_path = $src_root."/l10n_so/source"; + my $ooo_l10n_path = $src_root."/l10n/source"; #print "$so_l10n_path\n"; #print "$ooo_l10n_path\n"; @@ -289,7 +277,7 @@ sub write_sdf my @sdf_file; # mkdir!!!! - my $current_l10n_file = $WIN eq "TRUE" ? $l10n_file."\\$lang\\localize.sdf" : $l10n_file."/$lang/localize.sdf"; + my $current_l10n_file = $l10n_file."/$lang/localize.sdf"; print "Writing '$current_l10n_file'\n"; if( open DESTFILE , "< $current_l10n_file" ){ @@ -439,17 +427,17 @@ sub add_paths { my $langhash_ref = shift; my $root_dir = $ENV{ SRC_ROOT }; - my $ooo_l10n_dir = "$root_dir"."$DELIMITER"."l10n"."$DELIMITER"."source"; - my $so_l10n_dir = "$root_dir"."$DELIMITER"."l10n_so"."$DELIMITER"."source"; + my $ooo_l10n_dir = "$root_dir/l10n/source"; + my $so_l10n_dir = "$root_dir/l10n_so/source"; if( -e $ooo_l10n_dir ) { foreach my $lang ( keys( %{ $langhash_ref } ) ) { - my $loc_file = "$ooo_l10n_dir"."$DELIMITER"."$lang"."$DELIMITER"."localize.sdf"; + my $loc_file = "$ooo_l10n_dir/$lang/localize.sdf"; if( -e $loc_file ) { - push @sdfparticles , "$ooo_l10n_dir"."$DELIMITER"."$lang"."$DELIMITER"."localize.sdf"; + push @sdfparticles , "$ooo_l10n_dir/$lang/localize.sdf"; } else { print "WARNING: $loc_file not found ....\n"; } } @@ -459,10 +447,10 @@ sub add_paths { foreach my $lang ( keys( %{ $langhash_ref } ) ) { - my $loc_file = "$so_l10n_dir"."$DELIMITER"."$lang"."$DELIMITER"."localize.sdf"; + my $loc_file = "$so_l10n_dir/$lang/localize.sdf"; if( -e $loc_file ) { - push @sdfparticles , "$ooo_l10n_dir"."$DELIMITER"."$lang"."$DELIMITER"."localize.sdf"; + push @sdfparticles , "$ooo_l10n_dir/$lang/localize.sdf"; } else { #print "WARNING: $loc_file not found ....\n"; } @@ -539,10 +527,6 @@ sub collectfiles{ } #foreach } # if } # if -# if ( !$bVerbose ){ -# if ( $WIN eq "TRUE" ) { $args .= " > $my_localize_log"; } -# else { $args .= " >& $my_localize_log"; } -# } if ( $bVerbose ) { print STDOUT $command.$args."\n"; } my $rc = system( $command.$args ); diff --git a/transex3/scripts/localize_old.pl b/transex3/scripts/localize_old.pl index 151399d22002..68060200145c 100755 --- a/transex3/scripts/localize_old.pl +++ b/transex3/scripts/localize_old.pl @@ -67,7 +67,6 @@ my $outputfile = ''; my $mode = ''; my $bVerbose="0"; my $srcpath = ''; -my $WIN; my $languages; #my %sl_modules; # Contains all modules where en-US and de is source language my $use_default_date = '0'; @@ -82,13 +81,6 @@ my $default_date = "2002-02-02 02:02:02"; #### main #### parse_options(); -if ( defined $ENV{USE_SHELL} && $ENV{USE_SHELL} eq '4nt' ) { - $WIN = 'TRUE'; -} - else { - $WIN = ''; -} - #%sl_modules = fetch_sourcelanguage_dirlist(); @@ -140,13 +132,11 @@ sub splitfile{ next if( $prj eq "binfilter" ); # Don't merge strings into binfilter module chomp( $line ); $currentFile = $srcpath . '\\' . $prj . '\\' . $file; - if ( $WIN ) { $currentFile =~ s/\//\\/g; } - else { $currentFile =~ s/\\/\//g; } + $currentFile =~ s/\\/\//g; $cur_sdffile = $currentFile; #if( $cur_sdffile =~ /\.$file_types[\s]*$/ ){ - if( $WIN ) { $cur_sdffile =~ s/\\[^\\]*\.$file_types[\s]*$/\\localize.sdf/; } - else { $cur_sdffile =~ s/\/[^\/]*\.$file_types[\s]*$/\/localize.sdf/; } + $cur_sdffile =~ s/\/[^\/]*\.$file_types[\s]*$/\/localize.sdf/; #} # Set default date @@ -186,41 +176,6 @@ sub splitfile{ } ######################################################### -#sub fetch_sourcelanguage_dirlist -#{ -# -# my $working_path = getcwd(); -# my %sl_dirlist; -# -# chdir $srcpath; -# my @all_dirs = csh_glob( "*" ); -# -# foreach my $file ( @all_dirs ) -# { -# if( -d $file ) -# { -# my $module = $file; -# $file .= "/prj/l10n"; -# $file =~ s/\//\\/ , if( $WIN ) ; -# -# if( -f $file ) # Test file /prj/l10n -# { -# $sl_dirlist{ $module } = 1; -# if( $bVerbose eq "1" ) { print STDOUT "$module: de and en-US source language detected\n"; } -# } -# } -# } -# -# chdir $working_path; -# -# return %sl_dirlist; -#} - -#sub has_two_sourcelanguages -#{ -# my $module = shift; -# return defined $sl_modules{ $module } ; -#} sub writesdf{ my $lastFile = shift; @@ -229,8 +184,7 @@ sub writesdf{ my %index=(); if( $localizeFile =~ /\.$file_types[\s]*$/ ){ - if( $WIN ) { $localizeFile =~ s/\\[^\\]*\.$file_types[\s]*$/\\localize.sdf/; } - else { $localizeFile =~ s/\/[^\/]*\.$file_types[\s]*$/\/localize.sdf/; } + $localizeFile =~ s/\/[^\/]*\.$file_types[\s]*$/\/localize.sdf/; }else { print STDERR "Strange filetype found '$localizeFile'\n"; return; @@ -481,10 +435,6 @@ sub collectfiles{ } #foreach } # if } # if -# if ( !$bVerbose ){ -# if ( $WIN eq "TRUE" ) { $args .= " > $my_localize_log"; } -# else { $args .= " >& $my_localize_log"; } -# } if ( $bVerbose ) { print STDOUT $command.$args."\n"; } my $rc = system( $command.$args ); From ec0f00417aaabc0676757e310b99d3202667a37c Mon Sep 17 00:00:00 2001 From: sb Date: Wed, 13 Jan 2010 16:04:40 +0100 Subject: [PATCH 05/23] sb118: fixed aqua_clipboard mutex lock scope --- vcl/aqua/source/dtrans/aqua_clipboard.cxx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/vcl/aqua/source/dtrans/aqua_clipboard.cxx b/vcl/aqua/source/dtrans/aqua_clipboard.cxx index 27bf308dce9b..386be4b508b4 100644 --- a/vcl/aqua/source/dtrans/aqua_clipboard.cxx +++ b/vcl/aqua/source/dtrans/aqua_clipboard.cxx @@ -192,6 +192,10 @@ void SAL_CALL AquaClipboard::setContents(const Reference& xTransf const Reference& xClipboardOwner) throw( RuntimeException ) { + NSArray* types = xTransferable.is() ? + mpDataFlavorMapper->flavorSequenceToTypesArray(xTransferable->getTransferDataFlavors()) : + [NSArray array]; + ClearableMutexGuard aGuard(m_aMutex); Reference oldOwner(mXClipboardOwner); @@ -200,11 +204,10 @@ void SAL_CALL AquaClipboard::setContents(const Reference& xTransf Reference oldContent(mXClipboardContent); mXClipboardContent = xTransferable; - NSArray* types = mXClipboardContent.is() ? - mpDataFlavorMapper->flavorSequenceToTypesArray(mXClipboardContent->getTransferDataFlavors()) : - [NSArray array]; mPasteboardChangeCount = [mPasteboard declareTypes: types owner: mEventListener]; + aGuard.clear(); + // if we are already the owner of the clipboard // then fire lost ownership event if (oldOwner.is()) @@ -256,7 +259,7 @@ void SAL_CALL AquaClipboard::removeClipboardListener(const Reference< XClipboard void AquaClipboard::applicationDidBecomeActive(NSNotification* aNotification) { - MutexGuard aGuard(m_aMutex); + ClearableMutexGuard aGuard(m_aMutex); int currentPboardChgCount = [mPasteboard changeCount]; @@ -273,6 +276,8 @@ void AquaClipboard::applicationDidBecomeActive(NSNotification* aNotification) Reference oldContent(mXClipboardContent); mXClipboardContent = Reference(); + aGuard.clear(); + if (oldOwner.is()) { fireLostClipboardOwnershipEvent(oldOwner, oldContent); From e6fd0d7630e8cb0f834166ee6cc6fbb871482b51 Mon Sep 17 00:00:00 2001 From: sb Date: Wed, 13 Jan 2010 18:56:34 +0100 Subject: [PATCH 06/23] sb118: adapted cppunit.mk to cppunittester and no longer require "dmake test" to run tests; changed places back to include _cppunit.mk where it had been taken out before --- basebmp/test/makefile.mk | 9 +-------- basegfx/test/makefile.mk | 12 +----------- o3tl/qa/makefile.mk | 8 +------- 3 files changed, 3 insertions(+), 26 deletions(-) diff --git a/basebmp/test/makefile.mk b/basebmp/test/makefile.mk index 36b540231188..82eacd4ebbd6 100644 --- a/basebmp/test/makefile.mk +++ b/basebmp/test/makefile.mk @@ -123,12 +123,5 @@ SLOFILES=$(SHL1OBJS) # --- Enable test execution in normal build ------------------------ .IF "$(L10N_framework)"=="" - -unittest : $(SHL1TARGETN) - @echo ---------------------------------------------------------- - @echo - start unit test on library $(SHL1TARGETN) - @echo ---------------------------------------------------------- - $(CPPUNITTESTER) $(SHL1TARGETN) - -ALLTAR : unittest +.INCLUDE : _cppunit.mk .ENDIF diff --git a/basegfx/test/makefile.mk b/basegfx/test/makefile.mk index be6e537ba25a..60a7706450ab 100644 --- a/basegfx/test/makefile.mk +++ b/basegfx/test/makefile.mk @@ -71,14 +71,4 @@ SLOFILES=$(SHL1OBJS) # --- Targets ------------------------------------------------------ .INCLUDE : target.mk - -# --- Enable testshl2 execution in normal build ------------------------ - -$(MISC)$/unittest_succeeded : $(SHL1TARGETN) - @echo ---------------------------------------------------------- - @echo - start unit test on library $(SHL1TARGETN) - @echo ---------------------------------------------------------- - $(CPPUNITTESTER) $(SHL1TARGETN) - $(TOUCH) $@ - -ALLTAR : $(MISC)$/unittest_succeeded +.INCLUDE : _cppunit.mk diff --git a/o3tl/qa/makefile.mk b/o3tl/qa/makefile.mk index 491c50ec2095..df90c0f3fa23 100644 --- a/o3tl/qa/makefile.mk +++ b/o3tl/qa/makefile.mk @@ -72,12 +72,6 @@ SLOFILES=$(SHL1OBJS) # --- Enable test execution in normal build ------------------------ .IF "$(L10N_framework)"=="" -unittest : $(SHL1TARGETN) - @echo ---------------------------------------------------------- - @echo - start unit test on library $(SHL1TARGETN) - @echo ---------------------------------------------------------- - $(CPPUNITTESTER) $(SHL1TARGETN) - -ALLTAR : unittest +.INCLUDE : _cppunit.mk .ENDIF # L10N_framework From c10b53fa4c2346f5e12b5d5917d9e1c81226f5f1 Mon Sep 17 00:00:00 2001 From: sb Date: Tue, 26 Jan 2010 16:53:19 +0100 Subject: [PATCH 07/23] sb118: #i108681# hack by pl to not process events for removed frames --- vcl/unx/headless/svpinst.cxx | 26 +++++++++++++++++++++----- vcl/unx/headless/svpinst.hxx | 3 +++ 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/vcl/unx/headless/svpinst.cxx b/vcl/unx/headless/svpinst.cxx index 7b93e59b6acd..da70a4d2da52 100644 --- a/vcl/unx/headless/svpinst.cxx +++ b/vcl/unx/headless/svpinst.cxx @@ -58,6 +58,19 @@ extern "C" } } +bool SvpSalInstance::isFrameAlive( const SalFrame* pFrame ) const +{ + for( std::list< SalFrame* >::const_iterator it = m_aFrames.begin(); + it != m_aFrames.end(); ++it ) + { + if( *it == pFrame ) + { + return true; + } + } + return false; +} + SvpSalInstance* SvpSalInstance::s_pDefaultInstance = NULL; SvpSalInstance::SvpSalInstance() @@ -349,12 +362,15 @@ void SvpSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents ) { for( std::list::const_iterator it = aEvents.begin(); it != aEvents.end(); ++it ) { - it->m_pFrame->CallCallback( it->m_nEvent, it->m_pData ); - if( it->m_nEvent == SALEVENT_RESIZE ) + if ( isFrameAlive( it->m_pFrame ) ) { - // this would be a good time to post a paint - const SvpSalFrame* pSvpFrame = static_cast(it->m_pFrame); - pSvpFrame->PostPaint(); + it->m_pFrame->CallCallback( it->m_nEvent, it->m_pData ); + if( it->m_nEvent == SALEVENT_RESIZE ) + { + // this would be a good time to post a paint + const SvpSalFrame* pSvpFrame = static_cast(it->m_pFrame); + pSvpFrame->PostPaint(); + } } } } diff --git a/vcl/unx/headless/svpinst.hxx b/vcl/unx/headless/svpinst.hxx index e77debb53f1d..83d5a591ea22 100644 --- a/vcl/unx/headless/svpinst.hxx +++ b/vcl/unx/headless/svpinst.hxx @@ -111,6 +111,9 @@ class SvpSalInstance : public SalInstance std::list< SalUserEvent > m_aUserEvents; std::list< SalFrame* > m_aFrames; + + bool isFrameAlive( const SalFrame* pFrame ) const; + public: static SvpSalInstance* s_pDefaultInstance; From c5bed97b38a8e4d527f0ad9091a409ab7babd03d Mon Sep 17 00:00:00 2001 From: sb Date: Wed, 27 Jan 2010 16:23:59 +0100 Subject: [PATCH 08/23] sb118: changed tools/debug to never fall back from writing to shell to writing to file, and read DBGSV_INIT from rtl::Bootstrap; the latter causes problems if tools/debug is called from static code executing before SAL_MAIN has called osl_setCommandArgs -> removed statics from code and added assertions to osl/process; various improvements to smoketests.cxx (incl. passing an appropriate dbgsv.ini for non-pro builds) --- tools/bootstrp/command.cxx | 8 +-- tools/bootstrp/rscdep.cxx | 8 +-- tools/inc/bootstrp/command.hxx | 4 +- tools/inc/tools/debug.hxx | 31 +++++----- tools/source/debug/debug.cxx | 68 +++++++++------------- vcl/inc/vcl/ppdparser.hxx | 30 +++++----- vcl/source/app/dbggui.cxx | 25 -------- vcl/unx/source/printer/ppdparser.cxx | 87 ++++++++++++++-------------- 8 files changed, 104 insertions(+), 157 deletions(-) diff --git a/tools/bootstrp/command.cxx b/tools/bootstrp/command.cxx index 05e981b64a0e..bc30dee4f148 100644 --- a/tools/bootstrp/command.cxx +++ b/tools/bootstrp/command.cxx @@ -358,7 +358,7 @@ CCommand::CCommand( ByteString &rString ) { rString.SearchAndReplace( '\t', ' ' ); aCommand = rString.GetToken( 0, ' ' ); - aCommandLine = Search(); + aCommandLine = Search( "PATH" ); #ifndef UNX aCommandLine += " /c "; #else @@ -368,7 +368,7 @@ CCommand::CCommand( ByteString &rString ) ByteString sCmd( rString.GetToken( 0, ' ' )); ByteString sParam( rString.Copy( sCmd.Len())); - aCommandLine += Search( thePath, sCmd ); + aCommandLine += Search( "PATH", sCmd ); aCommandLine += sParam; ImplInit(); @@ -382,7 +382,7 @@ CCommand::CCommand( const char *pChar ) aString.SearchAndReplace( '\t', ' ' ); aCommand = aString.GetToken( 0, ' ' ); - aCommandLine = Search(); + aCommandLine = Search( "PATH" ); #ifndef UNX aCommandLine += " /c "; #else @@ -393,7 +393,7 @@ CCommand::CCommand( const char *pChar ) ByteString sCmd( rString.GetToken( 0, ' ' )); ByteString sParam( rString.Copy( sCmd.Len())); - aCommandLine += Search( thePath, sCmd ); + aCommandLine += Search( "PATH", sCmd ); aCommandLine += sParam; ImplInit(); diff --git a/tools/bootstrp/rscdep.cxx b/tools/bootstrp/rscdep.cxx index d4411058a6fb..a95b94fe057c 100644 --- a/tools/bootstrp/rscdep.cxx +++ b/tools/bootstrp/rscdep.cxx @@ -39,6 +39,7 @@ #include #include "bootstrp/prj.hxx" +#include "sal/main.h" #include #include @@ -81,12 +82,7 @@ static int optopt = 0; static int opterr = 0; #endif - -int -#ifdef WNT -_cdecl -#endif -main( int argc, char **argv ) +SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv ) { int c; char aBuf[255]; diff --git a/tools/inc/bootstrp/command.hxx b/tools/inc/bootstrp/command.hxx index 3b481371908b..30b60ae2c069 100644 --- a/tools/inc/bootstrp/command.hxx +++ b/tools/inc/bootstrp/command.hxx @@ -95,8 +95,6 @@ public: void Print(); }; -static ByteString thePath( "PATH" ); - /** Declares and spawns a child process. The spawned programm could be a native executable or a schell script. */ @@ -130,7 +128,7 @@ public: @param sItem specifies the system shell @return the Location (when programm was found) */ - static ByteString Search( ByteString sEnv = thePath, + static ByteString Search( ByteString sEnv, ByteString sItem = COMMAND_SHELL ); /** Spawns the Process diff --git a/tools/inc/tools/debug.hxx b/tools/inc/tools/debug.hxx index 843f620649a2..5ecb71b9d9a9 100644 --- a/tools/inc/tools/debug.hxx +++ b/tools/inc/tools/debug.hxx @@ -128,19 +128,18 @@ struct DbgDataType #define DBG_FUNC_SAVEDATA 5 #define DBG_FUNC_SETPRINTMSGBOX 6 #define DBG_FUNC_SETPRINTWINDOW 7 -#define DBG_FUNC_SETPRINTSHELL 8 -#define DBG_FUNC_SETPRINTTESTTOOL 9 -#define DBG_FUNC_MEMTEST 10 -#define DBG_FUNC_XTORINFO 11 -#define DBG_FUNC_MEMINFO 12 -#define DBG_FUNC_COREDUMP 13 -#define DBG_FUNC_ALLERROROUT 14 -#define DBG_FUNC_SETTESTSOLARMUTEX 15 -#define DBG_FUNC_TESTSOLARMUTEX 16 -#define DBG_FUNC_PRINTFILE 17 -#define DBG_FUNC_GETPRINTMSGBOX 18 -#define DBG_FUNC_FILTERMESSAGE 19 // new for #i38967 -#define DBG_FUNC_UPDATEOSLHOOK 20 +#define DBG_FUNC_SETPRINTTESTTOOL 8 +#define DBG_FUNC_MEMTEST 9 +#define DBG_FUNC_XTORINFO 10 +#define DBG_FUNC_MEMINFO 11 +#define DBG_FUNC_COREDUMP 12 +#define DBG_FUNC_ALLERROROUT 13 +#define DBG_FUNC_SETTESTSOLARMUTEX 14 +#define DBG_FUNC_TESTSOLARMUTEX 15 +#define DBG_FUNC_PRINTFILE 16 +#define DBG_FUNC_GETPRINTMSGBOX 17 +#define DBG_FUNC_FILTERMESSAGE 18 // new for #i38967 +#define DBG_FUNC_UPDATEOSLHOOK 19 TOOLS_DLLPUBLIC void* DbgFunc( USHORT nAction, void* pData = NULL ); @@ -179,11 +178,6 @@ inline void DbgSetPrintWindow( DbgPrintLine pProc ) DbgFunc( DBG_FUNC_SETPRINTWINDOW, (void*)(long)pProc ); } -inline void DbgSetPrintShell( DbgPrintLine pProc ) -{ - DbgFunc( DBG_FUNC_SETPRINTSHELL, (void*)(long)pProc ); -} - inline void DbgSetPrintTestTool( DbgPrintLine pProc ) { DbgFunc( DBG_FUNC_SETPRINTTESTTOOL, (void*)(long)pProc ); @@ -347,6 +341,7 @@ void DbgPrintStackTree( void* p ); TOOLS_DLLPUBLIC void DbgOut( const sal_Char* pMsg, USHORT nOutType = DBG_OUT_TRACE, const sal_Char* pFile = NULL, USHORT nLine = 0 ); +TOOLS_DLLPUBLIC void DbgPrintShell(char const * message); TOOLS_DLLPUBLIC void DbgOutTypef( USHORT nOutType, const sal_Char* pFStr, ... ); TOOLS_DLLPUBLIC void DbgOutf( const sal_Char* pFStr, ... ); TOOLS_DLLPUBLIC void ImpDbgOutfBuf( sal_Char* pBuf, const sal_Char* pFStr, ... ); diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx index 119defa91ad0..3bf25b43a82d 100644 --- a/tools/source/debug/debug.cxx +++ b/tools/source/debug/debug.cxx @@ -64,6 +64,8 @@ #endif #include +#include +#include #include #include @@ -154,7 +156,6 @@ struct DebugData USHORT bInit; DbgPrintLine pDbgPrintMsgBox; DbgPrintLine pDbgPrintWindow; - DbgPrintLine pDbgPrintShell; DbgPrintLine pDbgPrintTestTool; ::std::vector< DbgPrintLine > aDbgPrintUserChannels; @@ -169,7 +170,6 @@ struct DebugData :bInit( FALSE ) ,pDbgPrintMsgBox( FALSE ) ,pDbgPrintWindow( NULL ) - ,pDbgPrintShell( NULL ) ,pDbgPrintTestTool( NULL ) ,pProfList( NULL ) ,pXtorList( NULL ) @@ -666,26 +666,13 @@ BOOL PointerList::IsIn( const void* p ) const // ======================================================================= -static void DbgGetDbgFileName( sal_Char* pStr, sal_Int32 nMaxLen ) +static rtl::OString DbgGetDbgFileName() { -#if defined( UNX ) - const sal_Char* pName = getenv("DBGSV_INIT"); - if ( !pName ) - pName = ".dbgsv.init"; - strncpy( pStr, pName, nMaxLen ); -#elif defined( WNT ) - const sal_Char* pName = getenv("DBGSV_INIT"); - if ( pName ) - strncpy( pStr, pName, nMaxLen ); - else - GetProfileStringA( "sv", "dbgsv", "dbgsv.ini", pStr, nMaxLen ); -#elif defined( OS2 ) - PrfQueryProfileString( HINI_PROFILE, (PSZ)"SV", (PSZ)"DBGSV", - "dbgsv.ini", (PSZ)pStr, nMaxLen ); -#else - strncpy( pStr, "dbgsv.ini", nMaxLen ); -#endif - pStr[ nMaxLen - 1 ] = 0; + rtl::OUString s; + rtl::Bootstrap::get( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DBGSV_INIT")), s, + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("dbgsv.ini"))); + return rtl::OUStringToOString(s, osl_getThreadTextEncoding()); } // ----------------------------------------------------------------------- @@ -734,14 +721,13 @@ static DebugData* GetDebugData() DbgGetLogFileName( aDebugData.aDbgData.aDebugName ); // DEBUG.INI-File - sal_Char aBuf[ 4096 ]; - DbgGetDbgFileName( aBuf, sizeof( aBuf ) ); - FILETYPE pIniFile = FileOpen( aBuf, "r" ); + FILETYPE pIniFile = FileOpen( DbgGetDbgFileName().getStr(), "r" ); if ( pIniFile != NULL ) { ConfigSection eCurrentSection = eUnknown; // no sophisticated algorithm here, assume that the whole file fits into aBuf ... + sal_Char aBuf[ 4096 ]; ULONG nReallyRead = FileRead( aBuf, 1, sizeof( aBuf ) / sizeof( sal_Char ) - 1, pIniFile ); aBuf[ nReallyRead ] = 0; const sal_Char* pLine = aBuf; @@ -1040,9 +1026,7 @@ static void DebugDeInit() pData->aDbgData.nTestFlags &= (DBG_TEST_MEM | DBG_TEST_PROFILING); pData->aDbgPrintUserChannels.clear(); pData->pDbgPrintTestTool = NULL; - pData->pDbgPrintShell = NULL; pData->pDbgPrintWindow = NULL; - pData->pDbgPrintShell = NULL; pData->pOldDebugMessageFunc = NULL; ImplDbgDeInitLock(); } @@ -1202,10 +1186,6 @@ void* DbgFunc( USHORT nAction, void* pParam ) pDebugData->pDbgPrintWindow = (DbgPrintLine)(long)pParam; break; - case DBG_FUNC_SETPRINTSHELL: - pDebugData->pDbgPrintShell = (DbgPrintLine)(long)pParam; - break; - case DBG_FUNC_SETPRINTTESTTOOL: pDebugData->pDbgPrintTestTool = (DbgPrintLine)(long)pParam; break; @@ -1214,9 +1194,7 @@ void* DbgFunc( USHORT nAction, void* pParam ) { const DbgData* pData = static_cast< const DbgData* >( pParam ); - sal_Char aBuf[ 4096 ]; - DbgGetDbgFileName( aBuf, sizeof( aBuf ) ); - FILETYPE pIniFile = FileOpen( aBuf, "w" ); + FILETYPE pIniFile = FileOpen( DbgGetDbgFileName().getStr(), "w" ); if ( pIniFile == NULL ) break; @@ -1741,14 +1719,6 @@ void DbgOut( const sal_Char* pMsg, USHORT nDbgOut, const sal_Char* pFile, USHORT { if ( pData->pDbgPrintMsgBox ) pData->pDbgPrintMsgBox( aBufOut ); - else - nOut = DBG_OUT_SHELL; - } - - if ( nOut == DBG_OUT_SHELL ) - { - if ( pData->pDbgPrintShell ) - pData->pDbgPrintShell( aBufOut ); else nOut = DBG_OUT_WINDOW; } @@ -1761,14 +1731,28 @@ void DbgOut( const sal_Char* pMsg, USHORT nDbgOut, const sal_Char* pFile, USHORT nOut = DBG_OUT_FILE; } - if ( nOut == DBG_OUT_FILE ) + switch ( nOut ) + { + case DBG_OUT_SHELL: + DbgPrintShell( aBufOut ); + break; + case DBG_OUT_FILE: ImplDbgPrintFile( aBufOut ); + break; + } ImplDbgUnlock(); bIn = FALSE; } +void DbgPrintShell(char const * message) { + fprintf(stderr, "%s\n", message); +#if defined WNT + OutputDebugStringA(message); +#endif +} + // ----------------------------------------------------------------------- void DbgOutTypef( USHORT nDbgOut, const sal_Char* pFStr, ... ) diff --git a/vcl/inc/vcl/ppdparser.hxx b/vcl/inc/vcl/ppdparser.hxx index ed9f91b97d99..bec74ec688b3 100644 --- a/vcl/inc/vcl/ppdparser.hxx +++ b/vcl/inc/vcl/ppdparser.hxx @@ -222,7 +222,7 @@ public: bool isType42Capable() const { return m_bType42Capable; } ULONG getLanguageLevel() const { return m_nLanguageLevel; } - const String& getDefaultPaperDimension() const; + String getDefaultPaperDimension() const; void getDefaultPaperDimension( int& rWidth, int& rHeight ) const { getPaperDimension( getDefaultPaperDimension(), rWidth, rHeight ); } bool getPaperDimension( const String& rPaperName, @@ -231,12 +231,12 @@ public: // returns false if paper not found int getPaperDimensions() const { return m_pPaperDimensions ? m_pPaperDimensions->countValues() : 0; } - const String& getPaperDimension( int ) const; - const String& getPaperDimensionCommand( int ) const; - const String& getPaperDimensionCommand( const String & ) const; + String getPaperDimension( int ) const; + String getPaperDimensionCommand( int ) const; + String getPaperDimensionCommand( const String & ) const; // match the best paper for width and height - const String& matchPaper( int nWidth, int nHeight ) const; + String matchPaper( int nWidth, int nHeight ) const; bool getMargins( const String& rPaperName, int &rLeft, int& rRight, @@ -246,27 +246,27 @@ public: // values int pt - const String& getDefaultInputSlot() const; + String getDefaultInputSlot() const; int getInputSlots() const { return m_pInputSlots ? m_pInputSlots->countValues() : 0; } - const String& getSlot( int ) const; - const String& getSlotCommand( int ) const; - const String& getSlotCommand( const String& ) const; + String getSlot( int ) const; + String getSlotCommand( int ) const; + String getSlotCommand( const String& ) const; void getDefaultResolution( int& rXRes, int& rYRes ) const; int getResolutions() const; void getResolution( int, int& rXRes, int& rYRes ) const; - const String& getResolutionCommand( int nXRes, int nYRes ) const; + String getResolutionCommand( int nXRes, int nYRes ) const; // values in dpi void getResolutionFromString( const String&, int&, int& ) const; // helper function - const String& getDefaultDuplexType() const; + String getDefaultDuplexType() const; int getDuplexTypes() const { return m_pDuplexTypes ? m_pDuplexTypes->countValues() : 0; } - const String& getDuplex( int ) const; - const String& getDuplexCommand( int ) const; - const String& getDuplexCommand( const String& ) const; + String getDuplex( int ) const; + String getDuplexCommand( int ) const; + String getDuplexCommand( const String& ) const; int getFonts() const { return m_pFontList ? m_pFontList->countValues() : 0; } @@ -276,7 +276,7 @@ public: void getFontAttributes( const String&, String& rEncoding, String& rCharset ) const; - const String& getFont( int ) const; + String getFont( int ) const; }; // ---------------------------------------------------------------------- diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx index 36d0991c7640..a2f98d1f8796 100644 --- a/vcl/source/app/dbggui.cxx +++ b/vcl/source/app/dbggui.cxx @@ -1786,8 +1786,6 @@ void DbgDialogTest( Window* pWindow ) } // ======================================================================= -void DbgPrintShell( const char* pLine ); - #ifndef WNT #define USE_VCL_MSGBOX #define COPY_BUTTON_ID 25 @@ -1966,27 +1964,6 @@ void DbgPrintWindow( const char* pLine ) bIn = FALSE; } -// ----------------------------------------------------------------------- - -void DbgPrintShell( const char* pLine ) -{ -#if defined( WNT ) - // TODO: Shouldn't this be a IsDebuggerPresent()? - if ( GetSystemMetrics( SM_DEBUG ) ) - { - strcpy( aDbgOutBuf, pLine ); - strcat( aDbgOutBuf, "\r\n" ); - OutputDebugString( aDbgOutBuf ); - return; - } - - DbgPrintWindow( pLine ); -#endif -#ifdef UNX - fprintf( stderr, "%s\n", pLine ); -#endif -} - // ======================================================================= #ifdef WNT @@ -1999,7 +1976,6 @@ void DbgGUIInit() { DbgSetPrintMsgBox( DbgPrintMsgBox ); DbgSetPrintWindow( DbgPrintWindow ); - DbgSetPrintShell( DbgPrintShell ); #ifdef WNT DbgSetTestSolarMutex( ImplDbgTestSolarMutex ); #endif @@ -2011,7 +1987,6 @@ void DbgGUIDeInit() { DbgSetPrintMsgBox( NULL ); DbgSetPrintWindow( NULL ); - DbgSetPrintShell( NULL ); #ifdef WNT DbgSetTestSolarMutex( NULL ); #endif diff --git a/vcl/unx/source/printer/ppdparser.cxx b/vcl/unx/source/printer/ppdparser.cxx index 95bc7bca41ca..b815ce001d7e 100644 --- a/vcl/unx/source/printer/ppdparser.cxx +++ b/vcl/unx/source/printer/ppdparser.cxx @@ -64,7 +64,6 @@ using namespace rtl; std::list< PPDParser* > PPDParser::aAllParsers; std::hash_map< OUString, OUString, OUStringHash >* PPDParser::pAllPPDFiles = NULL; -static String aEmptyString; class PPDDecompressStream { @@ -1031,12 +1030,12 @@ void PPDParser::parseConstraint( const ByteString& rLine ) m_aConstraints.push_back( aConstraint ); } -const String& PPDParser::getDefaultPaperDimension() const +String PPDParser::getDefaultPaperDimension() const { if( m_pDefaultPaperDimension ) return m_pDefaultPaperDimension->m_aOption; - return aEmptyString; + return String(); } bool PPDParser::getMargins( @@ -1103,10 +1102,10 @@ bool PPDParser::getPaperDimension( return true; } -const String& PPDParser::matchPaper( int nWidth, int nHeight ) const +String PPDParser::matchPaper( int nWidth, int nHeight ) const { if( ! m_pPaperDimensions ) - return aEmptyString; + return String(); int nPDim = -1; double PDWidth, PDHeight; @@ -1140,51 +1139,51 @@ const String& PPDParser::matchPaper( int nWidth, int nHeight ) const { // swap portrait/landscape and try again bDontSwap = true; - const String& rRet = matchPaper( nHeight, nWidth ); + String rRet = matchPaper( nHeight, nWidth ); bDontSwap = false; return rRet; } - return nPDim != -1 ? m_pPaperDimensions->getValue( nPDim )->m_aOption : aEmptyString; + return nPDim != -1 ? m_pPaperDimensions->getValue( nPDim )->m_aOption : String(); } -const String& PPDParser::getDefaultInputSlot() const +String PPDParser::getDefaultInputSlot() const { if( m_pDefaultInputSlot ) return m_pDefaultInputSlot->m_aValue; - return aEmptyString; + return String(); } -const String& PPDParser::getSlot( int nSlot ) const +String PPDParser::getSlot( int nSlot ) const { if( ! m_pInputSlots ) - return aEmptyString; + return String(); if( nSlot > 0 && nSlot < m_pInputSlots->countValues() ) return m_pInputSlots->getValue( nSlot )->m_aOption; else if( m_pInputSlots->countValues() > 0 ) return m_pInputSlots->getValue( (ULONG)0 )->m_aOption; - return aEmptyString; + return String(); } -const String& PPDParser::getSlotCommand( int nSlot ) const +String PPDParser::getSlotCommand( int nSlot ) const { if( ! m_pInputSlots ) - return aEmptyString; + return String(); if( nSlot > 0 && nSlot < m_pInputSlots->countValues() ) return m_pInputSlots->getValue( nSlot )->m_aValue; else if( m_pInputSlots->countValues() > 0 ) return m_pInputSlots->getValue( (ULONG)0 )->m_aValue; - return aEmptyString; + return String(); } -const String& PPDParser::getSlotCommand( const String& rSlot ) const +String PPDParser::getSlotCommand( const String& rSlot ) const { if( ! m_pInputSlots ) - return aEmptyString; + return String(); for( int i=0; i < m_pInputSlots->countValues(); i++ ) { @@ -1192,39 +1191,39 @@ const String& PPDParser::getSlotCommand( const String& rSlot ) const if( pValue->m_aOption == rSlot ) return pValue->m_aValue; } - return aEmptyString; + return String(); } -const String& PPDParser::getPaperDimension( int nPaperDimension ) const +String PPDParser::getPaperDimension( int nPaperDimension ) const { if( ! m_pPaperDimensions ) - return aEmptyString; + return String(); if( nPaperDimension > 0 && nPaperDimension < m_pPaperDimensions->countValues() ) return m_pPaperDimensions->getValue( nPaperDimension )->m_aOption; else if( m_pPaperDimensions->countValues() > 0 ) return m_pPaperDimensions->getValue( (ULONG)0 )->m_aOption; - return aEmptyString; + return String(); } -const String& PPDParser::getPaperDimensionCommand( int nPaperDimension ) const +String PPDParser::getPaperDimensionCommand( int nPaperDimension ) const { if( ! m_pPaperDimensions ) - return aEmptyString; + return String(); if( nPaperDimension > 0 && nPaperDimension < m_pPaperDimensions->countValues() ) return m_pPaperDimensions->getValue( nPaperDimension )->m_aValue; else if( m_pPaperDimensions->countValues() > 0 ) return m_pPaperDimensions->getValue( (ULONG)0 )->m_aValue; - return aEmptyString; + return String(); } -const String& PPDParser::getPaperDimensionCommand( const String& rPaperDimension ) const +String PPDParser::getPaperDimensionCommand( const String& rPaperDimension ) const { if( ! m_pPaperDimensions ) - return aEmptyString; + return String(); for( int i=0; i < m_pPaperDimensions->countValues(); i++ ) { @@ -1232,7 +1231,7 @@ const String& PPDParser::getPaperDimensionCommand( const String& rPaperDimension if( pValue->m_aOption == rPaperDimension ) return pValue->m_aValue; } - return aEmptyString; + return String(); } void PPDParser::getResolutionFromString( @@ -1290,13 +1289,13 @@ void PPDParser::getResolution( int nNr, int& rXRes, int& rYRes ) const rXRes, rYRes ); } -const String& PPDParser::getResolutionCommand( int nXRes, int nYRes ) const +String PPDParser::getResolutionCommand( int nXRes, int nYRes ) const { if( ( ! m_pResolutions || m_pResolutions->countValues() == 0 ) && m_pDefaultResolution ) return m_pDefaultResolution->m_aValue; if( ! m_pResolutions ) - return aEmptyString; + return String(); int nX, nY; for( int i = 0; i < m_pResolutions->countValues(); i++ ) @@ -1306,46 +1305,46 @@ const String& PPDParser::getResolutionCommand( int nXRes, int nYRes ) const if( nX == nXRes && nY == nYRes ) return m_pResolutions->getValue( i )->m_aValue; } - return aEmptyString; + return String(); } -const String& PPDParser::getDefaultDuplexType() const +String PPDParser::getDefaultDuplexType() const { if( m_pDefaultDuplexType ) return m_pDefaultDuplexType->m_aValue; - return aEmptyString; + return String(); } -const String& PPDParser::getDuplex( int nDuplex ) const +String PPDParser::getDuplex( int nDuplex ) const { if( ! m_pDuplexTypes ) - return aEmptyString; + return String(); if( nDuplex > 0 && nDuplex < m_pDuplexTypes->countValues() ) return m_pDuplexTypes->getValue( nDuplex )->m_aOption; else if( m_pDuplexTypes->countValues() > 0 ) return m_pDuplexTypes->getValue( (ULONG)0 )->m_aOption; - return aEmptyString; + return String(); } -const String& PPDParser::getDuplexCommand( int nDuplex ) const +String PPDParser::getDuplexCommand( int nDuplex ) const { if( ! m_pDuplexTypes ) - return aEmptyString; + return String(); if( nDuplex > 0 && nDuplex < m_pDuplexTypes->countValues() ) return m_pDuplexTypes->getValue( nDuplex )->m_aValue; else if( m_pDuplexTypes->countValues() > 0 ) return m_pDuplexTypes->getValue( (ULONG)0 )->m_aValue; - return aEmptyString; + return String(); } -const String& PPDParser::getDuplexCommand( const String& rDuplex ) const +String PPDParser::getDuplexCommand( const String& rDuplex ) const { if( ! m_pDuplexTypes ) - return aEmptyString; + return String(); for( int i=0; i < m_pDuplexTypes->countValues(); i++ ) { @@ -1353,7 +1352,7 @@ const String& PPDParser::getDuplexCommand( const String& rDuplex ) const if( pValue->m_aOption == rDuplex ) return pValue->m_aValue; } - return aEmptyString; + return String(); } void PPDParser::getFontAttributes( @@ -1383,14 +1382,14 @@ void PPDParser::getFontAttributes( } } -const String& PPDParser::getFont( int nFont ) const +String PPDParser::getFont( int nFont ) const { if( ! m_pFontList ) - return aEmptyString; + return String(); if( nFont >=0 && nFont < m_pFontList->countValues() ) return m_pFontList->getValue( nFont )->m_aOption; - return aEmptyString; + return String(); } /* From a0b4cdb08bec2ad107634bfdcbe6bb0b0f050881 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 29 Jan 2010 15:39:36 +0100 Subject: [PATCH 09/23] sb118: additional main -> SAL_MAIN adaption (to ensure osl_setCommandArgs is called) --- rsc/source/prj/start.cxx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/rsc/source/prj/start.cxx b/rsc/source/prj/start.cxx index df4ce12200c5..9756bce9351c 100644 --- a/rsc/source/prj/start.cxx +++ b/rsc/source/prj/start.cxx @@ -57,6 +57,7 @@ #endif // UNX #include #include +#include #include /*************** C O D E ************************************************/ @@ -325,14 +326,8 @@ static BOOL CallRsc2( ByteString aRsc2Name, |* Letzte Aenderung MM 05.09.91 |* *************************************************************************/ -#if defined UNX || (defined OS2 && (defined CSET || defined GCC )) || defined WTC || defined MTW || defined ICC || defined(__MINGW32__) -int main ( int argc, char ** argv) +SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) { -#else -int cdecl main ( int argc, char ** argv) -{ -#endif - BOOL bPrePro = TRUE; BOOL bResFile = TRUE; BOOL bHelp = FALSE; From eeca9dafb71c0ff288cd9a0683fd1dcb0626baca Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 29 Jan 2010 17:01:54 +0100 Subject: [PATCH 10/23] sb118: #i108776# changed addsym.awk to also export STLport num_put symbols, and simplified it by requiring that first section is labeled UDK_3_0_0; adapted map files accordingly, replacing many individual ones with solenv/src templates --- basebmp/test/export.map | 2 +- basegfx/test/export.map | 2 +- canvas/source/cairo/exports.map | 8 -------- canvas/source/cairo/makefile.mk | 2 +- canvas/source/factory/canvasfactory.map | 8 -------- canvas/source/factory/makefile.mk | 2 +- canvas/source/null/exports.map | 8 -------- canvas/source/null/makefile.mk | 2 +- canvas/source/simplecanvas/exports.map | 8 -------- canvas/source/simplecanvas/makefile.mk | 2 +- canvas/source/vcl/exports.map | 8 -------- canvas/source/vcl/makefile.mk | 2 +- dtrans/source/generic/exports.map | 9 --------- dtrans/source/generic/makefile.mk | 2 +- dtrans/util/exports.map | 10 ---------- dtrans/util/makefile.mk | 2 +- goodies/source/filter.vcl/egif/exports.map | 2 +- goodies/source/filter.vcl/eos2met/exports.map | 2 +- goodies/source/filter.vcl/epbm/exports.map | 2 +- goodies/source/filter.vcl/epgm/exports.map | 2 +- goodies/source/filter.vcl/epict/exports.map | 2 +- goodies/source/filter.vcl/eppm/exports.map | 2 +- goodies/source/filter.vcl/eps/exports.map | 2 +- goodies/source/filter.vcl/eras/exports.map | 2 +- goodies/source/filter.vcl/etiff/exports.map | 2 +- goodies/source/filter.vcl/expm/exports.map | 2 +- goodies/source/filter.vcl/icgm/exports.map | 2 +- goodies/source/filter.vcl/idxf/exports.map | 2 +- goodies/source/filter.vcl/ieps/exports.map | 2 +- goodies/source/filter.vcl/ios2met/exports.map | 2 +- goodies/source/filter.vcl/ipbm/exports.map | 2 +- goodies/source/filter.vcl/ipcd/exports.map | 2 +- goodies/source/filter.vcl/ipcx/exports.map | 2 +- goodies/source/filter.vcl/ipict/exports.map | 2 +- goodies/source/filter.vcl/ipsd/exports.map | 2 +- goodies/source/filter.vcl/iras/exports.map | 2 +- goodies/source/filter.vcl/itga/exports.map | 2 +- goodies/source/filter.vcl/itiff/exports.map | 2 +- i18npool/source/breakiterator/data/dict.map | 2 +- i18npool/source/collator/data/collator_data.map | 2 +- i18npool/source/indexentry/data/index_data.map | 2 +- i18npool/source/localedata/data/localedata_en.map | 2 +- i18npool/source/localedata/data/localedata_es.map | 2 +- i18npool/source/localedata/data/localedata_euro.map | 2 +- i18npool/source/localedata/data/localedata_others.map | 2 +- i18npool/source/search/i18nsearch.map | 10 ---------- i18npool/source/search/makefile.mk | 2 +- i18npool/source/textconversion/data/textconv_dict.map | 2 +- i18npool/util/i18npool.map | 10 ---------- i18npool/util/makefile.mk | 2 +- o3tl/qa/export.map | 2 +- svl/qa/complex/ConfigItems/helper/exports.map | 10 ---------- svl/qa/complex/ConfigItems/helper/makefile.mk | 2 +- svl/source/fsstor/exports.map | 8 -------- svl/source/fsstor/makefile.mk | 2 +- svl/source/passwordcontainer/exports.map | 8 -------- svl/source/passwordcontainer/makefile.mk | 2 +- svtools/source/hatchwindow/exports.map | 8 -------- svtools/source/hatchwindow/makefile.mk | 2 +- svtools/source/productregistration/exports.map | 8 -------- svtools/source/productregistration/makefile.mk | 2 +- svtools/workben/unodialog/makefile.mk | 2 +- svtools/workben/unodialog/udlg.map | 8 -------- tools/test/export.map | 2 +- ucbhelper/workben/myucp/exports.map | 8 -------- ucbhelper/workben/myucp/makefile.mk | 2 +- 66 files changed, 50 insertions(+), 187 deletions(-) delete mode 100644 canvas/source/cairo/exports.map delete mode 100644 canvas/source/factory/canvasfactory.map delete mode 100644 canvas/source/null/exports.map delete mode 100644 canvas/source/simplecanvas/exports.map delete mode 100644 canvas/source/vcl/exports.map delete mode 100644 dtrans/source/generic/exports.map delete mode 100644 dtrans/util/exports.map delete mode 100644 i18npool/source/search/i18nsearch.map delete mode 100644 i18npool/util/i18npool.map delete mode 100644 svl/qa/complex/ConfigItems/helper/exports.map delete mode 100644 svl/source/fsstor/exports.map delete mode 100644 svl/source/passwordcontainer/exports.map delete mode 100644 svtools/source/hatchwindow/exports.map delete mode 100644 svtools/source/productregistration/exports.map delete mode 100644 svtools/workben/unodialog/udlg.map delete mode 100644 ucbhelper/workben/myucp/exports.map diff --git a/basebmp/test/export.map b/basebmp/test/export.map index ac406a4096dd..9122b9e99025 100644 --- a/basebmp/test/export.map +++ b/basebmp/test/export.map @@ -29,7 +29,7 @@ # #************************************************************************* -UDK_3.1 { +UDK_3_0_0 { global: cppunitTestPlugIn; diff --git a/basegfx/test/export.map b/basegfx/test/export.map index eef13a7090fb..e5e669b3c436 100644 --- a/basegfx/test/export.map +++ b/basegfx/test/export.map @@ -29,7 +29,7 @@ # #************************************************************************* -UDK_3.1 { +UDK_3_0_0 { global: cppunitTestPlugIn; diff --git a/canvas/source/cairo/exports.map b/canvas/source/cairo/exports.map deleted file mode 100644 index 4101b0d761a9..000000000000 --- a/canvas/source/cairo/exports.map +++ /dev/null @@ -1,8 +0,0 @@ -CAN_1_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/canvas/source/cairo/makefile.mk b/canvas/source/cairo/makefile.mk index 27a1aeb6dcd7..1c88f6e501d3 100644 --- a/canvas/source/cairo/makefile.mk +++ b/canvas/source/cairo/makefile.mk @@ -125,7 +125,7 @@ SHL1IMPLIB=i$(TARGET) SHL1LIBS=$(SLB)$/$(TARGET).lib SHL1DEF=$(MISC)$/$(SHL1TARGET).def -SHL1VERSIONMAP=exports.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map DEF1NAME=$(SHL1TARGET) DEF1EXPORTFILE=exports.dxp diff --git a/canvas/source/factory/canvasfactory.map b/canvas/source/factory/canvasfactory.map deleted file mode 100644 index 44fb01f37126..000000000000 --- a/canvas/source/factory/canvasfactory.map +++ /dev/null @@ -1,8 +0,0 @@ -CAN_1_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/canvas/source/factory/makefile.mk b/canvas/source/factory/makefile.mk index 1051b953ae81..af43916b0b8b 100644 --- a/canvas/source/factory/makefile.mk +++ b/canvas/source/factory/makefile.mk @@ -47,7 +47,7 @@ SHL1STDLIBS = \ $(CPPULIB) \ $(CPPUHELPERLIB) \ $(SALLIB) -SHL1VERSIONMAP = canvasfactory.map +SHL1VERSIONMAP = $(SOLARENV)/src/component.map SHL1DEPN = SHL1IMPLIB = i$(TARGET) diff --git a/canvas/source/null/exports.map b/canvas/source/null/exports.map deleted file mode 100644 index 4101b0d761a9..000000000000 --- a/canvas/source/null/exports.map +++ /dev/null @@ -1,8 +0,0 @@ -CAN_1_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/canvas/source/null/makefile.mk b/canvas/source/null/makefile.mk index 99a6bbab93a4..834b75e5a23b 100644 --- a/canvas/source/null/makefile.mk +++ b/canvas/source/null/makefile.mk @@ -64,7 +64,7 @@ SHL1IMPLIB=i$(TARGET) SHL1LIBS=$(SLB)$/$(TARGET).lib SHL1DEF=$(MISC)$/$(SHL1TARGET).def -SHL1VERSIONMAP=exports.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map DEF1NAME=$(SHL1TARGET) DEF1EXPORTFILE=exports.dxp diff --git a/canvas/source/simplecanvas/exports.map b/canvas/source/simplecanvas/exports.map deleted file mode 100644 index 4101b0d761a9..000000000000 --- a/canvas/source/simplecanvas/exports.map +++ /dev/null @@ -1,8 +0,0 @@ -CAN_1_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/canvas/source/simplecanvas/makefile.mk b/canvas/source/simplecanvas/makefile.mk index c0a60250ab85..3f045775efc7 100644 --- a/canvas/source/simplecanvas/makefile.mk +++ b/canvas/source/simplecanvas/makefile.mk @@ -56,7 +56,7 @@ SHL1IMPLIB=i$(TARGET) SHL1LIBS=$(SLB)$/$(TARGET).lib SHL1DEF=$(MISC)$/$(SHL1TARGET).def -SHL1VERSIONMAP=exports.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map DEF1NAME=$(SHL1TARGET) DEF1EXPORTFILE=exports.dxp diff --git a/canvas/source/vcl/exports.map b/canvas/source/vcl/exports.map deleted file mode 100644 index 4101b0d761a9..000000000000 --- a/canvas/source/vcl/exports.map +++ /dev/null @@ -1,8 +0,0 @@ -CAN_1_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/canvas/source/vcl/makefile.mk b/canvas/source/vcl/makefile.mk index fdfdd62d16b8..96a2688e134f 100644 --- a/canvas/source/vcl/makefile.mk +++ b/canvas/source/vcl/makefile.mk @@ -79,7 +79,7 @@ SHL1IMPLIB=i$(TARGET) SHL1LIBS=$(SLB)$/$(TARGET).lib SHL1DEF=$(MISC)$/$(SHL1TARGET).def -SHL1VERSIONMAP=exports.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map DEF1NAME=$(SHL1TARGET) DEF1EXPORTFILE=exports.dxp diff --git a/dtrans/source/generic/exports.map b/dtrans/source/generic/exports.map deleted file mode 100644 index 28449cc0f4a8..000000000000 --- a/dtrans/source/generic/exports.map +++ /dev/null @@ -1,9 +0,0 @@ -DTRANS_1_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; - diff --git a/dtrans/source/generic/makefile.mk b/dtrans/source/generic/makefile.mk index aa856865a3a8..32386db10734 100644 --- a/dtrans/source/generic/makefile.mk +++ b/dtrans/source/generic/makefile.mk @@ -50,7 +50,7 @@ SLOFILES= \ SHL1TARGET= dtrans -SHL1VERSIONMAP= exports.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1STDLIBS= \ $(SALLIB) \ diff --git a/dtrans/util/exports.map b/dtrans/util/exports.map deleted file mode 100644 index 7c56baa9bd73..000000000000 --- a/dtrans/util/exports.map +++ /dev/null @@ -1,10 +0,0 @@ -UDK_3_0_0 { - global: - GetVersionInfo; - component_getImplementationEnvironment; - component_getFactory; - component_writeInfo; - - local: - *; -}; diff --git a/dtrans/util/makefile.mk b/dtrans/util/makefile.mk index 2e9666137619..255f772113c8 100644 --- a/dtrans/util/makefile.mk +++ b/dtrans/util/makefile.mk @@ -68,7 +68,7 @@ SHL1IMPLIB=i$(SHL1TARGET) SHL1DEF= $(MISC)$/$(SHL1TARGET).def DEF1NAME= $(SHL1TARGET) DEF1EXPORTFILE= exports.dxp -SHL1VERSIONMAP=exports.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map .IF "$(GUI)"=="WNT" diff --git a/goodies/source/filter.vcl/egif/exports.map b/goodies/source/filter.vcl/egif/exports.map index 10820132c0ce..61e4682c6551 100644 --- a/goodies/source/filter.vcl/egif/exports.map +++ b/goodies/source/filter.vcl/egif/exports.map @@ -1,4 +1,4 @@ -GIFEXPORTER_1_0 { +UDK_3_0_0 { global: GraphicExport; DoExportDialog; diff --git a/goodies/source/filter.vcl/eos2met/exports.map b/goodies/source/filter.vcl/eos2met/exports.map index ce76d3850094..61e4682c6551 100644 --- a/goodies/source/filter.vcl/eos2met/exports.map +++ b/goodies/source/filter.vcl/eos2met/exports.map @@ -1,4 +1,4 @@ -METEXPORTER_1_0 { +UDK_3_0_0 { global: GraphicExport; DoExportDialog; diff --git a/goodies/source/filter.vcl/epbm/exports.map b/goodies/source/filter.vcl/epbm/exports.map index 2d09b0bdb752..61e4682c6551 100644 --- a/goodies/source/filter.vcl/epbm/exports.map +++ b/goodies/source/filter.vcl/epbm/exports.map @@ -1,4 +1,4 @@ -PBMEXPORTER_1_0 { +UDK_3_0_0 { global: GraphicExport; DoExportDialog; diff --git a/goodies/source/filter.vcl/epgm/exports.map b/goodies/source/filter.vcl/epgm/exports.map index 3967c4684f05..61e4682c6551 100644 --- a/goodies/source/filter.vcl/epgm/exports.map +++ b/goodies/source/filter.vcl/epgm/exports.map @@ -1,4 +1,4 @@ -PGMEXPORTER_1_0 { +UDK_3_0_0 { global: GraphicExport; DoExportDialog; diff --git a/goodies/source/filter.vcl/epict/exports.map b/goodies/source/filter.vcl/epict/exports.map index 2f21c5c04b53..61e4682c6551 100644 --- a/goodies/source/filter.vcl/epict/exports.map +++ b/goodies/source/filter.vcl/epict/exports.map @@ -1,4 +1,4 @@ -PICTEXPORTER_1_0 { +UDK_3_0_0 { global: GraphicExport; DoExportDialog; diff --git a/goodies/source/filter.vcl/eppm/exports.map b/goodies/source/filter.vcl/eppm/exports.map index 0462b75b7b43..61e4682c6551 100644 --- a/goodies/source/filter.vcl/eppm/exports.map +++ b/goodies/source/filter.vcl/eppm/exports.map @@ -1,4 +1,4 @@ -PPMEXPORTER_1_0 { +UDK_3_0_0 { global: GraphicExport; DoExportDialog; diff --git a/goodies/source/filter.vcl/eps/exports.map b/goodies/source/filter.vcl/eps/exports.map index 1b61354c2869..61e4682c6551 100644 --- a/goodies/source/filter.vcl/eps/exports.map +++ b/goodies/source/filter.vcl/eps/exports.map @@ -1,4 +1,4 @@ -EPSEXPORTER_1_0 { +UDK_3_0_0 { global: GraphicExport; DoExportDialog; diff --git a/goodies/source/filter.vcl/eras/exports.map b/goodies/source/filter.vcl/eras/exports.map index 4a78a96ee951..d4e28c44700c 100644 --- a/goodies/source/filter.vcl/eras/exports.map +++ b/goodies/source/filter.vcl/eras/exports.map @@ -1,4 +1,4 @@ -RASEXPORTER_1_0 { +UDK_3_0_0 { global: GraphicExport; diff --git a/goodies/source/filter.vcl/etiff/exports.map b/goodies/source/filter.vcl/etiff/exports.map index 094e72c0f5fb..d4e28c44700c 100644 --- a/goodies/source/filter.vcl/etiff/exports.map +++ b/goodies/source/filter.vcl/etiff/exports.map @@ -1,4 +1,4 @@ -TIFEXPORTER_1_0 { +UDK_3_0_0 { global: GraphicExport; diff --git a/goodies/source/filter.vcl/expm/exports.map b/goodies/source/filter.vcl/expm/exports.map index f1f42312c802..d4e28c44700c 100644 --- a/goodies/source/filter.vcl/expm/exports.map +++ b/goodies/source/filter.vcl/expm/exports.map @@ -1,4 +1,4 @@ -XPMEXPORTER_1_0 { +UDK_3_0_0 { global: GraphicExport; diff --git a/goodies/source/filter.vcl/icgm/exports.map b/goodies/source/filter.vcl/icgm/exports.map index eaa1db885d5e..cc7f07dd1112 100644 --- a/goodies/source/filter.vcl/icgm/exports.map +++ b/goodies/source/filter.vcl/icgm/exports.map @@ -1,4 +1,4 @@ -CGMIMPORTER_1_0 { +UDK_3_0_0 { global: ImportCGM; diff --git a/goodies/source/filter.vcl/idxf/exports.map b/goodies/source/filter.vcl/idxf/exports.map index d107435568e5..941e4ab9bde8 100644 --- a/goodies/source/filter.vcl/idxf/exports.map +++ b/goodies/source/filter.vcl/idxf/exports.map @@ -1,4 +1,4 @@ -DXFIMPORTER_1_0 { +UDK_3_0_0 { global: GraphicImport; diff --git a/goodies/source/filter.vcl/ieps/exports.map b/goodies/source/filter.vcl/ieps/exports.map index 59406d7255ef..941e4ab9bde8 100644 --- a/goodies/source/filter.vcl/ieps/exports.map +++ b/goodies/source/filter.vcl/ieps/exports.map @@ -1,4 +1,4 @@ -EPSIMPORTER_1_0 { +UDK_3_0_0 { global: GraphicImport; diff --git a/goodies/source/filter.vcl/ios2met/exports.map b/goodies/source/filter.vcl/ios2met/exports.map index 440afa9245d8..941e4ab9bde8 100644 --- a/goodies/source/filter.vcl/ios2met/exports.map +++ b/goodies/source/filter.vcl/ios2met/exports.map @@ -1,4 +1,4 @@ -METIMPORTER_1_0 { +UDK_3_0_0 { global: GraphicImport; diff --git a/goodies/source/filter.vcl/ipbm/exports.map b/goodies/source/filter.vcl/ipbm/exports.map index 0e2a1bcdec9d..941e4ab9bde8 100644 --- a/goodies/source/filter.vcl/ipbm/exports.map +++ b/goodies/source/filter.vcl/ipbm/exports.map @@ -1,4 +1,4 @@ -PBMIMPORTER_1_0 { +UDK_3_0_0 { global: GraphicImport; diff --git a/goodies/source/filter.vcl/ipcd/exports.map b/goodies/source/filter.vcl/ipcd/exports.map index a0719af28be2..941e4ab9bde8 100644 --- a/goodies/source/filter.vcl/ipcd/exports.map +++ b/goodies/source/filter.vcl/ipcd/exports.map @@ -1,4 +1,4 @@ -PCDIMPORTER_1_0 { +UDK_3_0_0 { global: GraphicImport; diff --git a/goodies/source/filter.vcl/ipcx/exports.map b/goodies/source/filter.vcl/ipcx/exports.map index d44f79111a96..941e4ab9bde8 100644 --- a/goodies/source/filter.vcl/ipcx/exports.map +++ b/goodies/source/filter.vcl/ipcx/exports.map @@ -1,4 +1,4 @@ -PCXIMPORTER_1_0 { +UDK_3_0_0 { global: GraphicImport; diff --git a/goodies/source/filter.vcl/ipict/exports.map b/goodies/source/filter.vcl/ipict/exports.map index 2576cecdca91..941e4ab9bde8 100644 --- a/goodies/source/filter.vcl/ipict/exports.map +++ b/goodies/source/filter.vcl/ipict/exports.map @@ -1,4 +1,4 @@ -PICTIMPORTER_1_0 { +UDK_3_0_0 { global: GraphicImport; diff --git a/goodies/source/filter.vcl/ipsd/exports.map b/goodies/source/filter.vcl/ipsd/exports.map index b2cda91bec78..941e4ab9bde8 100644 --- a/goodies/source/filter.vcl/ipsd/exports.map +++ b/goodies/source/filter.vcl/ipsd/exports.map @@ -1,4 +1,4 @@ -PSDIMPORTER_1_0 { +UDK_3_0_0 { global: GraphicImport; diff --git a/goodies/source/filter.vcl/iras/exports.map b/goodies/source/filter.vcl/iras/exports.map index ebd8464837fa..941e4ab9bde8 100644 --- a/goodies/source/filter.vcl/iras/exports.map +++ b/goodies/source/filter.vcl/iras/exports.map @@ -1,4 +1,4 @@ -RASIMPORTER_1_0 { +UDK_3_0_0 { global: GraphicImport; diff --git a/goodies/source/filter.vcl/itga/exports.map b/goodies/source/filter.vcl/itga/exports.map index cb127f330e5d..941e4ab9bde8 100644 --- a/goodies/source/filter.vcl/itga/exports.map +++ b/goodies/source/filter.vcl/itga/exports.map @@ -1,4 +1,4 @@ -TGAIMPORTER_1_0 { +UDK_3_0_0 { global: GraphicImport; diff --git a/goodies/source/filter.vcl/itiff/exports.map b/goodies/source/filter.vcl/itiff/exports.map index 983df223406e..941e4ab9bde8 100644 --- a/goodies/source/filter.vcl/itiff/exports.map +++ b/goodies/source/filter.vcl/itiff/exports.map @@ -1,4 +1,4 @@ -TIFIMPORTER_1_0 { +UDK_3_0_0 { global: GraphicImport; diff --git a/i18npool/source/breakiterator/data/dict.map b/i18npool/source/breakiterator/data/dict.map index 271ba8b2b83c..ebd4f9185d1f 100644 --- a/i18npool/source/breakiterator/data/dict.map +++ b/i18npool/source/breakiterator/data/dict.map @@ -1,4 +1,4 @@ -OOO_1.1 { +UDK_3_0_0 { global: GetVersionInfo; getDataArea; diff --git a/i18npool/source/collator/data/collator_data.map b/i18npool/source/collator/data/collator_data.map index 09f298912ee9..412635f19eed 100644 --- a/i18npool/source/collator/data/collator_data.map +++ b/i18npool/source/collator/data/collator_data.map @@ -1,4 +1,4 @@ -OOO_1.1 { +UDK_3_0_0 { global: GetVersionInfo; get_zh_charset; diff --git a/i18npool/source/indexentry/data/index_data.map b/i18npool/source/indexentry/data/index_data.map index b9add8b3a6f8..30d03853d6ad 100644 --- a/i18npool/source/indexentry/data/index_data.map +++ b/i18npool/source/indexentry/data/index_data.map @@ -1,4 +1,4 @@ -OOO_1.1 { +UDK_3_0_0 { global: GetVersionInfo; get_indexdata_ko_dict; diff --git a/i18npool/source/localedata/data/localedata_en.map b/i18npool/source/localedata/data/localedata_en.map index 10e5a998c932..ab13f033745c 100644 --- a/i18npool/source/localedata/data/localedata_en.map +++ b/i18npool/source/localedata/data/localedata_en.map @@ -1,4 +1,4 @@ -OOO_1.1 { +UDK_3_0_0 { global: GetVersionInfo; getAllCalendars_en_AU; diff --git a/i18npool/source/localedata/data/localedata_es.map b/i18npool/source/localedata/data/localedata_es.map index edcdd4e153e3..7743539232a6 100644 --- a/i18npool/source/localedata/data/localedata_es.map +++ b/i18npool/source/localedata/data/localedata_es.map @@ -1,4 +1,4 @@ -OOO_1.1 { +UDK_3_0_0 { global: GetVersionInfo; getAllCalendars_es_AR; diff --git a/i18npool/source/localedata/data/localedata_euro.map b/i18npool/source/localedata/data/localedata_euro.map index 1a28eb537bd5..e64bf08261b8 100644 --- a/i18npool/source/localedata/data/localedata_euro.map +++ b/i18npool/source/localedata/data/localedata_euro.map @@ -1,4 +1,4 @@ -OOO_1.1 { +UDK_3_0_0 { global: GetVersionInfo; getAllCalendars_ast_ES; diff --git a/i18npool/source/localedata/data/localedata_others.map b/i18npool/source/localedata/data/localedata_others.map index a8212624e8e8..7a4fa6cd072c 100644 --- a/i18npool/source/localedata/data/localedata_others.map +++ b/i18npool/source/localedata/data/localedata_others.map @@ -1,4 +1,4 @@ -OOO_1.1 { +UDK_3_0_0 { global: getAllCalendars_af_NA; getAllCalendars_af_ZA; diff --git a/i18npool/source/search/i18nsearch.map b/i18npool/source/search/i18nsearch.map deleted file mode 100644 index 02fe32ac5839..000000000000 --- a/i18npool/source/search/i18nsearch.map +++ /dev/null @@ -1,10 +0,0 @@ -UDK_3_0_0 { -global: - GetVersionInfo; - component_getImplementationEnvironment; - component_getFactory; - component_writeInfo; - -local: - *; -}; diff --git a/i18npool/source/search/makefile.mk b/i18npool/source/search/makefile.mk index 2e81ec3f1d53..ad10347bffcc 100644 --- a/i18npool/source/search/makefile.mk +++ b/i18npool/source/search/makefile.mk @@ -72,7 +72,7 @@ SHL1STDLIBS= \ $(I18NREGEXPLIB) SHL1DEPN= makefile.mk -SHL1VERSIONMAP= i18nsearch.map +SHL1VERSIONMAP= $(SOLARENV)/src/component.map SHL1DEF= $(MISC)$/$(SHL1TARGET).def DEF1NAME= $(SHL1TARGET) diff --git a/i18npool/source/textconversion/data/textconv_dict.map b/i18npool/source/textconversion/data/textconv_dict.map index 03f9073c5d86..afd873b6f38e 100644 --- a/i18npool/source/textconversion/data/textconv_dict.map +++ b/i18npool/source/textconversion/data/textconv_dict.map @@ -1,4 +1,4 @@ -OOO_1.1 { +UDK_3_0_0 { global: GetVersionInfo; getHangul2HanjaData; diff --git a/i18npool/util/i18npool.map b/i18npool/util/i18npool.map deleted file mode 100644 index 02fe32ac5839..000000000000 --- a/i18npool/util/i18npool.map +++ /dev/null @@ -1,10 +0,0 @@ -UDK_3_0_0 { -global: - GetVersionInfo; - component_getImplementationEnvironment; - component_getFactory; - component_writeInfo; - -local: - *; -}; diff --git a/i18npool/util/makefile.mk b/i18npool/util/makefile.mk index 582089a309e8..6ea6ab1fd2ef 100644 --- a/i18npool/util/makefile.mk +++ b/i18npool/util/makefile.mk @@ -64,7 +64,7 @@ SHL1IMPLIB= i$(SHL1TARGET) SHL1DEPN= makefile.mk \ $(SLB)/i18nisolang$(ISOLANG_MAJOR)$(COMID).lib -SHL1VERSIONMAP=$(PRJNAME).map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1DEF=$(MISC)$/$(SHL1TARGET).def DEF1NAME=$(SHL1TARGET) diff --git a/o3tl/qa/export.map b/o3tl/qa/export.map index ac406a4096dd..9122b9e99025 100644 --- a/o3tl/qa/export.map +++ b/o3tl/qa/export.map @@ -29,7 +29,7 @@ # #************************************************************************* -UDK_3.1 { +UDK_3_0_0 { global: cppunitTestPlugIn; diff --git a/svl/qa/complex/ConfigItems/helper/exports.map b/svl/qa/complex/ConfigItems/helper/exports.map deleted file mode 100644 index 85610ad80888..000000000000 --- a/svl/qa/complex/ConfigItems/helper/exports.map +++ /dev/null @@ -1,10 +0,0 @@ -UDK_3_0_0 { - global: - GetVersionInfo; - component_getImplementationEnvironment; - component_getFactory; - component_writeInfo; - - local: - *; -}; diff --git a/svl/qa/complex/ConfigItems/helper/makefile.mk b/svl/qa/complex/ConfigItems/helper/makefile.mk index d41fe6c129c6..c0557afac25d 100644 --- a/svl/qa/complex/ConfigItems/helper/makefile.mk +++ b/svl/qa/complex/ConfigItems/helper/makefile.mk @@ -73,7 +73,7 @@ SHL1DEF= $(MISC)$/$(SHL1TARGET).def DEF1NAME= $(SHL1TARGET) -SHL1VERSIONMAP= exports.map +SHL1VERSIONMAP= $(SOLARENV)/src/component.map # --- Targets ------------------------------------------------------ diff --git a/svl/source/fsstor/exports.map b/svl/source/fsstor/exports.map deleted file mode 100644 index f4ed78b9e970..000000000000 --- a/svl/source/fsstor/exports.map +++ /dev/null @@ -1,8 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/svl/source/fsstor/makefile.mk b/svl/source/fsstor/makefile.mk index 7f46009750fd..a4b5e5d7fc50 100644 --- a/svl/source/fsstor/makefile.mk +++ b/svl/source/fsstor/makefile.mk @@ -60,7 +60,7 @@ SHL1STDLIBS=\ $(CPPULIB) \ $(SALLIB) -SHL1VERSIONMAP=exports.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1DEF= $(MISC)$/$(SHL1TARGET).def DEF1NAME= $(SHL1TARGET) diff --git a/svl/source/passwordcontainer/exports.map b/svl/source/passwordcontainer/exports.map deleted file mode 100644 index f4ed78b9e970..000000000000 --- a/svl/source/passwordcontainer/exports.map +++ /dev/null @@ -1,8 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/svl/source/passwordcontainer/makefile.mk b/svl/source/passwordcontainer/makefile.mk index 3c74246ee3ed..e9dd4b68e2aa 100644 --- a/svl/source/passwordcontainer/makefile.mk +++ b/svl/source/passwordcontainer/makefile.mk @@ -56,7 +56,7 @@ SHL1STDLIBS=\ $(CPPULIB) \ $(SALLIB) -SHL1VERSIONMAP=exports.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1DEF= $(MISC)$/$(SHL1TARGET).def DEF1NAME= $(SHL1TARGET) diff --git a/svtools/source/hatchwindow/exports.map b/svtools/source/hatchwindow/exports.map deleted file mode 100644 index f4ed78b9e970..000000000000 --- a/svtools/source/hatchwindow/exports.map +++ /dev/null @@ -1,8 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/svtools/source/hatchwindow/makefile.mk b/svtools/source/hatchwindow/makefile.mk index 8366763a81f9..6b99aa8484a6 100644 --- a/svtools/source/hatchwindow/makefile.mk +++ b/svtools/source/hatchwindow/makefile.mk @@ -59,7 +59,7 @@ SHL1STDLIBS=\ $(CPPULIB) \ $(SALLIB) -SHL1VERSIONMAP=exports.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1DEF= $(MISC)$/$(SHL1TARGET).def DEF1NAME= $(SHL1TARGET) diff --git a/svtools/source/productregistration/exports.map b/svtools/source/productregistration/exports.map deleted file mode 100644 index f4ed78b9e970..000000000000 --- a/svtools/source/productregistration/exports.map +++ /dev/null @@ -1,8 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/svtools/source/productregistration/makefile.mk b/svtools/source/productregistration/makefile.mk index 1892f1600dd8..86bfd4308e08 100644 --- a/svtools/source/productregistration/makefile.mk +++ b/svtools/source/productregistration/makefile.mk @@ -63,7 +63,7 @@ SHL1STDLIBS=\ $(CPPULIB) \ $(SALLIB) -SHL1VERSIONMAP=exports.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1DEF= $(MISC)$/$(SHL1TARGET).def DEF1NAME= $(SHL1TARGET) diff --git a/svtools/workben/unodialog/makefile.mk b/svtools/workben/unodialog/makefile.mk index c6cd6e5d8491..9ad708884b2d 100644 --- a/svtools/workben/unodialog/makefile.mk +++ b/svtools/workben/unodialog/makefile.mk @@ -60,7 +60,7 @@ SLOFILES= $(SLO)$/unodialogsample.obj \ # --- library ----------------------------------- SHL1TARGET=$(TARGET)$(DLLPOSTFIX) -SHL1VERSIONMAP=$(TARGET).map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1STDLIBS= \ $(CPPULIB) \ diff --git a/svtools/workben/unodialog/udlg.map b/svtools/workben/unodialog/udlg.map deleted file mode 100644 index 276f9673d067..000000000000 --- a/svtools/workben/unodialog/udlg.map +++ /dev/null @@ -1,8 +0,0 @@ -UDLG_1_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/tools/test/export.map b/tools/test/export.map index 1953f105dc08..df94ae98ee5c 100644 --- a/tools/test/export.map +++ b/tools/test/export.map @@ -29,7 +29,7 @@ # #************************************************************************* -UDK_3.1 { +UDK_3_0_0 { global: registerAllTestFunction; diff --git a/ucbhelper/workben/myucp/exports.map b/ucbhelper/workben/myucp/exports.map deleted file mode 100644 index f4ed78b9e970..000000000000 --- a/ucbhelper/workben/myucp/exports.map +++ /dev/null @@ -1,8 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/ucbhelper/workben/myucp/makefile.mk b/ucbhelper/workben/myucp/makefile.mk index ca6b3f941b0e..256bd6946dd2 100644 --- a/ucbhelper/workben/myucp/makefile.mk +++ b/ucbhelper/workben/myucp/makefile.mk @@ -72,7 +72,7 @@ LIB1OBJFILES=$(SLOFILES) SHL1TARGET=$(TARGET) SHL1IMPLIB=i$(TARGET) -SHL1VERSIONMAP=exports.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map # @@@ Add additional libs here. SHL1STDLIBS=\ From 6a6313957dc8b98a66cbe1a74a6952e4efb324dd Mon Sep 17 00:00:00 2001 From: sb Date: Wed, 3 Feb 2010 13:43:59 +0100 Subject: [PATCH 11/23] sb118: additional main -> SAL_MAIN adaptions (to ensure osl_setCommandArgs is called) --- rsc/source/prj/gui.cxx | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/rsc/source/prj/gui.cxx b/rsc/source/prj/gui.cxx index 6bf466348d1b..9b0bb2d3fa78 100644 --- a/rsc/source/prj/gui.cxx +++ b/rsc/source/prj/gui.cxx @@ -33,6 +33,7 @@ #include #include +#include #include #include @@ -71,15 +72,7 @@ RscVerbosity lcl_determineVerbosity( int argc, char ** argv ) return RscVerbosityNormal; } -#if defined( UNX ) || ( defined( OS2 ) && ( defined( CSET ) || defined ( GCC ))) || defined (WTC) || defined(ICC) || defined(__MINGW32__) -int main ( int argc, char ** argv) { -#else -#if defined( MTW ) -int main ( int argc, char const ** argv) { -#else -int cdecl main ( int argc, char ** argv) { -#endif -#endif +SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) { #ifndef UNX #ifdef CSET atexit( ExitProgram ); From 4e0a003d8289b16c012fc936cc9f1fa2130b2bd9 Mon Sep 17 00:00:00 2001 From: sb Date: Wed, 3 Feb 2010 13:49:27 +0100 Subject: [PATCH 12/23] sb118: reverted parts of HG -c 160b248247a0 again: the "static code executing before SAL_MAIN" problem was too severe; instead, globally set DBGSV_INIT build env var to new solenv/bin/dbgsv.ini --- tools/source/debug/debug.cxx | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx index 3bf25b43a82d..e298d6e9659f 100644 --- a/tools/source/debug/debug.cxx +++ b/tools/source/debug/debug.cxx @@ -64,8 +64,6 @@ #endif #include -#include -#include #include #include @@ -666,13 +664,26 @@ BOOL PointerList::IsIn( const void* p ) const // ======================================================================= -static rtl::OString DbgGetDbgFileName() +static void DbgGetDbgFileName( sal_Char* pStr, sal_Int32 nMaxLen ) { - rtl::OUString s; - rtl::Bootstrap::get( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DBGSV_INIT")), s, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("dbgsv.ini"))); - return rtl::OUStringToOString(s, osl_getThreadTextEncoding()); +#if defined( UNX ) + const sal_Char* pName = getenv("DBGSV_INIT"); + if ( !pName ) + pName = ".dbgsv.init"; + strncpy( pStr, pName, nMaxLen ); +#elif defined( WNT ) + const sal_Char* pName = getenv("DBGSV_INIT"); + if ( pName ) + strncpy( pStr, pName, nMaxLen ); + else + GetProfileStringA( "sv", "dbgsv", "dbgsv.ini", pStr, nMaxLen ); +#elif defined( OS2 ) + PrfQueryProfileString( HINI_PROFILE, (PSZ)"SV", (PSZ)"DBGSV", + "dbgsv.ini", (PSZ)pStr, nMaxLen ); +#else + strncpy( pStr, "dbgsv.ini", nMaxLen ); +#endif + pStr[ nMaxLen - 1 ] = 0; } // ----------------------------------------------------------------------- @@ -721,13 +732,14 @@ static DebugData* GetDebugData() DbgGetLogFileName( aDebugData.aDbgData.aDebugName ); // DEBUG.INI-File - FILETYPE pIniFile = FileOpen( DbgGetDbgFileName().getStr(), "r" ); + sal_Char aBuf[ 4096 ]; + DbgGetDbgFileName( aBuf, sizeof( aBuf ) ); + FILETYPE pIniFile = FileOpen( aBuf, "r" ); if ( pIniFile != NULL ) { ConfigSection eCurrentSection = eUnknown; // no sophisticated algorithm here, assume that the whole file fits into aBuf ... - sal_Char aBuf[ 4096 ]; ULONG nReallyRead = FileRead( aBuf, 1, sizeof( aBuf ) / sizeof( sal_Char ) - 1, pIniFile ); aBuf[ nReallyRead ] = 0; const sal_Char* pLine = aBuf; @@ -1194,7 +1206,9 @@ void* DbgFunc( USHORT nAction, void* pParam ) { const DbgData* pData = static_cast< const DbgData* >( pParam ); - FILETYPE pIniFile = FileOpen( DbgGetDbgFileName().getStr(), "w" ); + sal_Char aBuf[ 4096 ]; + DbgGetDbgFileName( aBuf, sizeof( aBuf ) ); + FILETYPE pIniFile = FileOpen( aBuf, "w" ); if ( pIniFile == NULL ) break; From 57aa95f8ec0c9615619d55c5323c0c0ac0a04d18 Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 11 Feb 2010 11:07:17 +0100 Subject: [PATCH 13/23] sb118: #i109112# re-purpose EXTRAJARFILES --- l10ntools/source/help/makefile.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l10ntools/source/help/makefile.mk b/l10ntools/source/help/makefile.mk index 57164004af8b..32a03e6611cc 100644 --- a/l10ntools/source/help/makefile.mk +++ b/l10ntools/source/help/makefile.mk @@ -105,7 +105,7 @@ JAVACLASSFILES = \ $(CLASSDIR)$/$(PACKAGE)$/HelpFileDocument.class .IF "$(SYSTEM_LUCENE)" == "YES" -CLASSPATH!:=$(CLASSPATH)$(PATH_SEPERATOR)$(LUCENE_CORE_JAR)$(PATH_SEPERATOR)$(LUCENE_ANALYZERS_JAR) +EXTRAJARFILES += $(LUCENE_CORE_JAR) $(LUCENE_ANALYZERS_JAR) .ELSE JARFILES += lucene-core-2.3.jar lucene-analyzers-2.3.jar .ENDIF From 34cee89411da550fe89908e5a0aaa52a7f32ea2b Mon Sep 17 00:00:00 2001 From: sb Date: Tue, 16 Feb 2010 11:53:58 +0100 Subject: [PATCH 14/23] sb118: adapted remaining */qa/unoapi tests to new framework --- svtools/prj/build.lst | 1 + svtools/qa/unoapi/Test.java | 51 +++++++++++++++++++++++++++++++++++ svtools/qa/unoapi/makefile.mk | 36 ++++++++++++++----------- toolkit/prj/build.lst | 1 + toolkit/qa/unoapi/Test.java | 51 +++++++++++++++++++++++++++++++++++ toolkit/qa/unoapi/makefile.mk | 39 ++++++++++++++------------- 6 files changed, 144 insertions(+), 35 deletions(-) create mode 100644 svtools/qa/unoapi/Test.java create mode 100644 toolkit/qa/unoapi/Test.java diff --git a/svtools/prj/build.lst b/svtools/prj/build.lst index 5a67b9414181..de86d1824821 100644 --- a/svtools/prj/build.lst +++ b/svtools/prj/build.lst @@ -26,3 +26,4 @@ st svtools\util nmake - all st_util st__brw st__ctr st svtools\source\hatchwindow nmake - all st_hatchwin st_inc NULL st svtools\source\productregistration nmake - all st_prodreg st_util st_inc NULL st svtools\workben\unodialog nmake - all st_workben_udlg st_util NULL +st svtools\qa\unoapi nmake - all st_qa_unoapi NULL diff --git a/svtools/qa/unoapi/Test.java b/svtools/qa/unoapi/Test.java new file mode 100644 index 000000000000..8ae4af55ed61 --- /dev/null +++ b/svtools/qa/unoapi/Test.java @@ -0,0 +1,51 @@ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +************************************************************************/ + +package org.openoffice.svtools.qa.unoapi; + +import org.openoffice.Runner; +import org.openoffice.test.OfficeConnection; +import static org.junit.Assert.*; + +public final class Test { + @org.junit.Before public void setUp() throws Exception { + connection.setUp(); + } + + @org.junit.After public void tearDown() + throws InterruptedException, com.sun.star.uno.Exception + { + connection.tearDown(); + } + + @org.junit.Test public void test() { + assertTrue( + Runner.run( + "-sce", "svtools.sce", "-xcl", "knownissues.xcl", "-cs", + connection.getDescription())); + } + + private final OfficeConnection connection = new OfficeConnection(); +} diff --git a/svtools/qa/unoapi/makefile.mk b/svtools/qa/unoapi/makefile.mk index de69c4acec1e..e3afb77e637a 100644 --- a/svtools/qa/unoapi/makefile.mk +++ b/svtools/qa/unoapi/makefile.mk @@ -1,15 +1,10 @@ #************************************************************************* -# # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.6 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,19 +21,28 @@ # version 3 along with OpenOffice.org. If not, see # # for a copy of the LGPLv3 License. -# -#************************************************************************* +#***********************************************************************/ -PRJ=..$/.. +.IF "$(OOO_SUBSEQUENT_TESTS)" == "" +nothing .PHONY: +.ELSE -PRJNAME=svtools -TARGET=qa_unoapi +PRJ = ../.. +PRJNAME = svtools +TARGET = qa_unoapi + +.IF "$(OOO_JUNIT_JAR)" != "" +PACKAGE = org/openoffice/svtools/qa/unoapi +JAVATESTFILES = Test.java +JAVAFILES = $(JAVATESTFILES) +JARFILES = OOoRunner.jar ridl.jar test.jar +EXTRAJARFILES = $(OOO_JUNIT_JAR) +.END .INCLUDE: settings.mk - .INCLUDE: target.mk +.INCLUDE: installationtest.mk -ALLTAR : UNOAPI_TEST +ALLTAR : javatest -UNOAPI_TEST: - +$(SOLARENV)$/bin$/checkapi -sce svtools.sce -xcl knownissues.xcl -tdoc $(PWD)$/testdocuments +.END diff --git a/toolkit/prj/build.lst b/toolkit/prj/build.lst index 304d0e7c978f..126eea24c66c 100644 --- a/toolkit/prj/build.lst +++ b/toolkit/prj/build.lst @@ -11,3 +11,4 @@ ti toolkit\source\controls\grid nmake - all ti_grid NULL ti toolkit\source\layout\core nmake - all ti_layout_core NULL ti toolkit\source\layout\vcl nmake - all ti_layout_vcl NULL ti toolkit\util nmake - all ti_util ti_awt ti_controls ti_layout_core ti_helper ti_tree ti_grid ti_layout_vcl NULL +ti toolkit\qa\unoapi nmake - all ti_qa_unoapi NULL diff --git a/toolkit/qa/unoapi/Test.java b/toolkit/qa/unoapi/Test.java new file mode 100644 index 000000000000..f27d882314d2 --- /dev/null +++ b/toolkit/qa/unoapi/Test.java @@ -0,0 +1,51 @@ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +************************************************************************/ + +package org.openoffice.toolkit.qa.unoapi; + +import org.openoffice.Runner; +import org.openoffice.test.OfficeConnection; +import static org.junit.Assert.*; + +public final class Test { + @org.junit.Before public void setUp() throws Exception { + connection.setUp(); + } + + @org.junit.After public void tearDown() + throws InterruptedException, com.sun.star.uno.Exception + { + connection.tearDown(); + } + + @org.junit.Test public void test() { + assertTrue( + Runner.run( + "-sce", "toolkit.sce", "-xcl", "knownissues.xcl", "-tdoc", + "testdocuments", "-cs", connection.getDescription())); + } + + private final OfficeConnection connection = new OfficeConnection(); +} diff --git a/toolkit/qa/unoapi/makefile.mk b/toolkit/qa/unoapi/makefile.mk index 2002e0d02978..9517601c3917 100644 --- a/toolkit/qa/unoapi/makefile.mk +++ b/toolkit/qa/unoapi/makefile.mk @@ -1,15 +1,10 @@ #************************************************************************* -# # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.6 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,22 +21,28 @@ # version 3 along with OpenOffice.org. If not, see # # for a copy of the LGPLv3 License. -# -#************************************************************************* +#***********************************************************************/ -PRJ=..$/.. +.IF "$(OOO_SUBSEQUENT_TESTS)" == "" +nothing .PHONY: +.ELSE -PRJNAME=toolkit -TARGET=qa_unoapi +PRJ = ../.. +PRJNAME = toolkit +TARGET = qa_unoapi + +.IF "$(OOO_JUNIT_JAR)" != "" +PACKAGE = org/openoffice/toolkit/qa/unoapi +JAVATESTFILES = Test.java +JAVAFILES = $(JAVATESTFILES) +JARFILES = OOoRunner.jar ridl.jar test.jar +EXTRAJARFILES = $(OOO_JUNIT_JAR) +.END .INCLUDE: settings.mk - .INCLUDE: target.mk +.INCLUDE: installationtest.mk -ALLTAR : UNOAPI_TEST +ALLTAR : javatest -UNOAPI_TEST: - +$(SOLARENV)$/bin$/checkapi -sce toolkit.sce -xcl knownissues.xcl -tdoc $(PWD)$/testdocuments - @echo ======================================================================= - @echo In case you noticed a failures of toolkit.AccessibleToolBoxItem make sure that the object bar is configured as text and not as icons - @echo ======================================================================= +.END From 3ce790b86ebe030d549eb5e4543307f2d5416679 Mon Sep 17 00:00:00 2001 From: sb Date: Wed, 24 Feb 2010 15:32:39 +0100 Subject: [PATCH 15/23] sb118: #i80788# second part of fix for Toolkit test --- toolkit/qa/unoapi/knownissues.xcl | 5 ----- toolkit/qa/unoapi/toolkit.sce | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/toolkit/qa/unoapi/knownissues.xcl b/toolkit/qa/unoapi/knownissues.xcl index ef954f00eeeb..70513019e9d3 100644 --- a/toolkit/qa/unoapi/knownissues.xcl +++ b/toolkit/qa/unoapi/knownissues.xcl @@ -90,11 +90,6 @@ toolkit.AccessibleRadioButton toolkit.AccessibleToolBox # -> disabled in toolkit.sce -### i80788 ### -toolkit.Toolkit -toolkit.UnoControlDialog -# -> disabled in toolkit.sce - ### i86011 ### toolkit.UnoControlFileControl # -> disabled in toolkit.sce diff --git a/toolkit/qa/unoapi/toolkit.sce b/toolkit/qa/unoapi/toolkit.sce index dad24165e2d2..9c6948255559 100644 --- a/toolkit/qa/unoapi/toolkit.sce +++ b/toolkit/qa/unoapi/toolkit.sce @@ -26,7 +26,7 @@ -o toolkit.MutableTreeNode -o toolkit.TabController -o toolkit.TabControllerModel -#i80788 -o toolkit.Toolkit +-o toolkit.Toolkit -o toolkit.UnoControlButton -o toolkit.UnoControlButtonModel -o toolkit.UnoControlCheckBox @@ -39,7 +39,7 @@ -o toolkit.UnoControlCurrencyFieldModel -o toolkit.UnoControlDateField -o toolkit.UnoControlDateFieldModel -#i80788 -o toolkit.UnoControlDialog +#allegedly was i80788, but still broken: -o toolkit.UnoControlDialog -o toolkit.UnoControlDialogModel -o toolkit.UnoControlEdit -o toolkit.UnoControlEditModel From d6e31ec5296abe96bdb64b53184db98098f82ceb Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 25 Feb 2010 16:10:53 +0100 Subject: [PATCH 16/23] sb118: #i109607# do not call back listeners from DesktopTerminationObserver::revokeTerminationListener --- unotools/source/misc/desktopterminationobserver.cxx | 6 ------ 1 file changed, 6 deletions(-) diff --git a/unotools/source/misc/desktopterminationobserver.cxx b/unotools/source/misc/desktopterminationobserver.cxx index 23d5089f545e..3900449f03c9 100644 --- a/unotools/source/misc/desktopterminationobserver.cxx +++ b/unotools/source/misc/desktopterminationobserver.cxx @@ -211,12 +211,6 @@ namespace utl void DesktopTerminationObserver::revokeTerminationListener( ITerminationListener* _pListener ) { ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if ( getListenerAdminData().bAlreadyTerminated ) - { - _pListener->notifyTermination(); - return; - } - Listeners& rListeners = getListenerAdminData().aListeners; for ( Listeners::iterator lookup = rListeners.begin(); lookup != rListeners.end(); From e6694e6614a9360c98df4ee611be09b8385b48a4 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 26 Feb 2010 17:02:40 +0100 Subject: [PATCH 17/23] sb118: #i109643# disable tests that fail when run in parallel with other applications --- toolkit/qa/unoapi/knownissues.xcl | 6 +++++- toolkit/qa/unoapi/toolkit.sce | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/toolkit/qa/unoapi/knownissues.xcl b/toolkit/qa/unoapi/knownissues.xcl index 70513019e9d3..eed2d3208e09 100644 --- a/toolkit/qa/unoapi/knownissues.xcl +++ b/toolkit/qa/unoapi/knownissues.xcl @@ -234,4 +234,8 @@ toolkit.AccessibleScrollBar::com::sun::star::accessibility::XAccessibleComponent toolkit.UnoScrollBarControl::com::sun::star::awt::XScrollBar ### i94344 ### -toolkit.AccessibleTabPage::com::sun::star::accessibility::XAccessibleText \ No newline at end of file +toolkit.AccessibleTabPage::com::sun::star::accessibility::XAccessibleText + +### i109643 ### +toolkit.AccessibleMenu::com::sun::star::accessibility::XAccessibleValue +toolkit.AccessibleMenuBar::com::sun::star::accessibility::XAccessibleSelection diff --git a/toolkit/qa/unoapi/toolkit.sce b/toolkit/qa/unoapi/toolkit.sce index 9c6948255559..1c8ad0c95181 100644 --- a/toolkit/qa/unoapi/toolkit.sce +++ b/toolkit/qa/unoapi/toolkit.sce @@ -17,8 +17,8 @@ -o toolkit.AccessibleScrollBar -o toolkit.AccessibleStatusBar -o toolkit.AccessibleStatusBarItem --o toolkit.AccessibleTabControl --o toolkit.AccessibleTabPage +#i109643 -o toolkit.AccessibleTabControl +#i109643 -o toolkit.AccessibleTabPage #i86287 -o toolkit.AccessibleToolBox #i88605 -o toolkit.AccessibleToolBoxItem -o toolkit.AccessibleWindow From 2c72edc36403323b2978124e82bdd0069504be45 Mon Sep 17 00:00:00 2001 From: sb Date: Mon, 1 Mar 2010 11:46:25 +0100 Subject: [PATCH 18/23] sb118: release DisplayConnection::m_aMutex before calling event handlers --- vcl/source/helper/xconnection.cxx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/vcl/source/helper/xconnection.cxx b/vcl/source/helper/xconnection.cxx index 19ac9103bf96..caf7ee237d67 100644 --- a/vcl/source/helper/xconnection.cxx +++ b/vcl/source/helper/xconnection.cxx @@ -141,12 +141,16 @@ bool DisplayConnection::dispatchEvent( void* pThis, void* pData, int nBytes ) SolarMutexReleaser aRel; DisplayConnection* This = (DisplayConnection*)pThis; - MutexGuard aGuard( This->m_aMutex ); Sequence< sal_Int8 > aSeq( (sal_Int8*)pData, nBytes ); Any aEvent; aEvent <<= aSeq; - for( ::std::list< Reference< XEventHandler > >::const_iterator it = This->m_aHandlers.begin(); it != This->m_aHandlers.end(); ++it ) + ::std::list< Reference< XEventHandler > > handlers; + { + MutexGuard aGuard( This->m_aMutex ); + handlers = This->m_aHandlers; + } + for( ::std::list< Reference< XEventHandler > >::const_iterator it = handlers.begin(); it != handlers.end(); ++it ) if( (*it)->handleEvent( aEvent ) ) return true; return false; @@ -157,12 +161,16 @@ bool DisplayConnection::dispatchErrorEvent( void* pThis, void* pData, int nBytes SolarMutexReleaser aRel; DisplayConnection* This = (DisplayConnection*)pThis; - MutexGuard aGuard( This->m_aMutex ); Sequence< sal_Int8 > aSeq( (sal_Int8*)pData, nBytes ); Any aEvent; aEvent <<= aSeq; - for( ::std::list< Reference< XEventHandler > >::const_iterator it = This->m_aErrorHandlers.begin(); it != This->m_aErrorHandlers.end(); ++it ) + ::std::list< Reference< XEventHandler > > handlers; + { + MutexGuard aGuard( This->m_aMutex ); + handlers = This->m_aErrorHandlers; + } + for( ::std::list< Reference< XEventHandler > >::const_iterator it = handlers.begin(); it != handlers.end(); ++it ) if( (*it)->handleEvent( aEvent ) ) return true; From e1e8b8334a9f1c028d2191534941d5b3e550dd41 Mon Sep 17 00:00:00 2001 From: sb Date: Wed, 3 Mar 2010 15:44:53 +0100 Subject: [PATCH 19/23] sb118: #i109643# further test disabled --- toolkit/qa/unoapi/knownissues.xcl | 1 + 1 file changed, 1 insertion(+) diff --git a/toolkit/qa/unoapi/knownissues.xcl b/toolkit/qa/unoapi/knownissues.xcl index eed2d3208e09..6f57f37536a2 100644 --- a/toolkit/qa/unoapi/knownissues.xcl +++ b/toolkit/qa/unoapi/knownissues.xcl @@ -238,4 +238,5 @@ toolkit.AccessibleTabPage::com::sun::star::accessibility::XAccessibleText ### i109643 ### toolkit.AccessibleMenu::com::sun::star::accessibility::XAccessibleValue +toolkit.AccessibleMenuBar::com::sun::star::accessibility::XAccessibleEventBroadcaster toolkit.AccessibleMenuBar::com::sun::star::accessibility::XAccessibleSelection From 9dbddaf44155708bee14f898dbfea5de06fdbdae Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Wed, 3 Mar 2010 21:01:44 +0100 Subject: [PATCH 20/23] sb118: add --with-system-cppunit --- basegfx/prj/build.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basegfx/prj/build.lst b/basegfx/prj/build.lst index e4122616e769..fe3354b3f256 100644 --- a/basegfx/prj/build.lst +++ b/basegfx/prj/build.lst @@ -1,4 +1,4 @@ -fx basegfx : o3tl sal offuh cppuhelper cppu cppunit NULL +fx basegfx : o3tl sal offuh cppuhelper cppu CPPUNIT:cppunit NULL fx basegfx usr1 - all fx_mkout NULL fx basegfx\inc nmake - all fx_inc NULL fx basegfx\prj get - all fx_prj NULL From 17feb1f6049deb8a388f0bf6fa625c95231dccae Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Wed, 3 Mar 2010 21:04:06 +0100 Subject: [PATCH 21/23] sb118: add forgotten CPPUNIT: in o3tl --- o3tl/prj/build.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/o3tl/prj/build.lst b/o3tl/prj/build.lst index fe6b53d1c732..2606d1df8586 100644 --- a/o3tl/prj/build.lst +++ b/o3tl/prj/build.lst @@ -1,4 +1,4 @@ -ot o3tl : sal cppunit BOOST:boost NULL +ot o3tl : sal CPPUNIT:cppunit BOOST:boost NULL ot o3tl usr1 - all ot_mkout NULL ot o3tl\inc get - all ot_inc NULL ot o3tl\prj get - all ot_prj NULL From 7c85f9d5fe0c0d387115d8ad863b39496349bb1b Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Thu, 4 Mar 2010 00:11:19 +0100 Subject: [PATCH 22/23] sb118: add missing CFLAGS+= $(CPPUNIT_CFLAGS) to loads of other makefiles, too --- basebmp/test/makefile.mk | 4 ++++ basegfx/test/makefile.mk | 4 ++++ comphelper/qa/makefile.mk | 4 ++++ o3tl/qa/makefile.mk | 5 +++++ svl/qa/makefile.mk | 4 ++++ tools/qa/makefile.mk | 4 ++++ tools/test/makefile.mk | 4 ++++ 7 files changed, 29 insertions(+) diff --git a/basebmp/test/makefile.mk b/basebmp/test/makefile.mk index 610468b313fe..7dd374898641 100644 --- a/basebmp/test/makefile.mk +++ b/basebmp/test/makefile.mk @@ -60,6 +60,10 @@ CDEFS+=-xalias_level=compatible .ENDIF .ENDIF +.IF "$(SYSTEM_CPPUNIT)"=="YES" +CFLAGS += $(CPPUNIT_CFLAGS) +.ENDIF + # --- Common ---------------------------------------------------------- .IF "$(L10N_framework)"=="" diff --git a/basegfx/test/makefile.mk b/basegfx/test/makefile.mk index 73a157e7dc3a..e29f69bd3516 100644 --- a/basegfx/test/makefile.mk +++ b/basegfx/test/makefile.mk @@ -36,6 +36,10 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk +.IF "$(SYSTEM_CPPUNIT)"=="YES" +CFLAGS += $(CPPUNIT_CFLAGS) +.ENDIF + # --- Common ---------------------------------------------------------- SHL1OBJS= \ diff --git a/comphelper/qa/makefile.mk b/comphelper/qa/makefile.mk index 6e715675bb03..7c91456ac084 100644 --- a/comphelper/qa/makefile.mk +++ b/comphelper/qa/makefile.mk @@ -33,6 +33,10 @@ ENABLE_EXCEPTIONS := TRUE .INCLUDE: settings.mk +.IF "$(SYSTEM_CPPUNIT)"=="YES" +CFLAGS+= $(CPPUNIT_CFLAGS) +.ENDIF + DLLPRE = # no leading "lib" on .so files INCPRE += $(MISC)$/$(TARGET)$/inc diff --git a/o3tl/qa/makefile.mk b/o3tl/qa/makefile.mk index c75c3e972eea..c126c90b0771 100644 --- a/o3tl/qa/makefile.mk +++ b/o3tl/qa/makefile.mk @@ -35,6 +35,11 @@ ENABLE_EXCEPTIONS=TRUE # --- Settings ----------------------------------------------------- .INCLUDE : settings.mk + +.IF "$(SYSTEM_CPPUNIT)"=="YES" +CFLAGS+= $(CPPUNIT_CFLAGS) +.ENDIF + .IF "$(L10N_framework)"=="" # --- Common ---------------------------------------------------------- diff --git a/svl/qa/makefile.mk b/svl/qa/makefile.mk index 4e107e31f924..072dfe7093bc 100644 --- a/svl/qa/makefile.mk +++ b/svl/qa/makefile.mk @@ -35,6 +35,10 @@ ENABLE_EXCEPTIONS = true .INCLUDE : settings.mk +.IF "$(SYSTEM_CPPUNIT)"=="YES" +CFLAGS+= $(CPPUNIT_CFLAGS) +.ENDIF + # BEGIN ---------------------------------------------------------------- # auto generated Target:job by codegen.pl SHL1OBJS= \ diff --git a/tools/qa/makefile.mk b/tools/qa/makefile.mk index 66ed19e20737..4c633aad1946 100644 --- a/tools/qa/makefile.mk +++ b/tools/qa/makefile.mk @@ -32,6 +32,10 @@ ENABLE_EXCEPTIONS = TRUE .INCLUDE: settings.mk +.IF "$(SYSTEM_CPPUNIT)"=="YES" +CFLAGS+= $(CPPUNIT_CFLAGS) +.ENDIF + DLLPRE = # no leading "lib" on .so files SHL1TARGET = test_pathutils diff --git a/tools/test/makefile.mk b/tools/test/makefile.mk index 5dea8ce6f960..7f00fe2748b3 100644 --- a/tools/test/makefile.mk +++ b/tools/test/makefile.mk @@ -36,6 +36,10 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk +.IF "$(SYSTEM_CPPUNIT)"=="YES" +CFLAGS+= $(CPPUNIT_CFLAGS) +.ENDIF + # --- Common ---------------------------------------------------------- SHL1OBJS= \ From 1f8c841f58229855518cf09a3058288b0a65e403 Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 4 Mar 2010 22:13:08 +0100 Subject: [PATCH 23/23] sb118: #i109791# improved CPPUNIT_CFLAGS handling --- basebmp/test/makefile.mk | 4 +--- basegfx/test/makefile.mk | 4 +--- comphelper/qa/makefile.mk | 4 +--- o3tl/qa/makefile.mk | 4 +--- svl/qa/makefile.mk | 4 +--- tools/qa/makefile.mk | 5 +---- tools/test/makefile.mk | 4 +--- 7 files changed, 7 insertions(+), 22 deletions(-) diff --git a/basebmp/test/makefile.mk b/basebmp/test/makefile.mk index 7dd374898641..ca77721716f7 100644 --- a/basebmp/test/makefile.mk +++ b/basebmp/test/makefile.mk @@ -60,9 +60,7 @@ CDEFS+=-xalias_level=compatible .ENDIF .ENDIF -.IF "$(SYSTEM_CPPUNIT)"=="YES" -CFLAGS += $(CPPUNIT_CFLAGS) -.ENDIF +CFLAGSCXX += $(CPPUNIT_CFLAGS) # --- Common ---------------------------------------------------------- .IF "$(L10N_framework)"=="" diff --git a/basegfx/test/makefile.mk b/basegfx/test/makefile.mk index e29f69bd3516..79e65f1af5fa 100644 --- a/basegfx/test/makefile.mk +++ b/basegfx/test/makefile.mk @@ -36,9 +36,7 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk -.IF "$(SYSTEM_CPPUNIT)"=="YES" -CFLAGS += $(CPPUNIT_CFLAGS) -.ENDIF +CFLAGSCXX += $(CPPUNIT_CFLAGS) # --- Common ---------------------------------------------------------- diff --git a/comphelper/qa/makefile.mk b/comphelper/qa/makefile.mk index 7c91456ac084..0360d308529e 100644 --- a/comphelper/qa/makefile.mk +++ b/comphelper/qa/makefile.mk @@ -33,9 +33,7 @@ ENABLE_EXCEPTIONS := TRUE .INCLUDE: settings.mk -.IF "$(SYSTEM_CPPUNIT)"=="YES" -CFLAGS+= $(CPPUNIT_CFLAGS) -.ENDIF +CFLAGSCXX += $(CPPUNIT_CFLAGS) DLLPRE = # no leading "lib" on .so files diff --git a/o3tl/qa/makefile.mk b/o3tl/qa/makefile.mk index c126c90b0771..c6fbc52ce2b1 100644 --- a/o3tl/qa/makefile.mk +++ b/o3tl/qa/makefile.mk @@ -36,9 +36,7 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk -.IF "$(SYSTEM_CPPUNIT)"=="YES" -CFLAGS+= $(CPPUNIT_CFLAGS) -.ENDIF +CFLAGSCXX += $(CPPUNIT_CFLAGS) .IF "$(L10N_framework)"=="" # --- Common ---------------------------------------------------------- diff --git a/svl/qa/makefile.mk b/svl/qa/makefile.mk index 072dfe7093bc..7e8c7ee795cc 100644 --- a/svl/qa/makefile.mk +++ b/svl/qa/makefile.mk @@ -35,9 +35,7 @@ ENABLE_EXCEPTIONS = true .INCLUDE : settings.mk -.IF "$(SYSTEM_CPPUNIT)"=="YES" -CFLAGS+= $(CPPUNIT_CFLAGS) -.ENDIF +CFLAGSCXX += $(CPPUNIT_CFLAGS) # BEGIN ---------------------------------------------------------------- # auto generated Target:job by codegen.pl diff --git a/tools/qa/makefile.mk b/tools/qa/makefile.mk index 4c633aad1946..abaea848c1db 100644 --- a/tools/qa/makefile.mk +++ b/tools/qa/makefile.mk @@ -32,10 +32,7 @@ ENABLE_EXCEPTIONS = TRUE .INCLUDE: settings.mk -.IF "$(SYSTEM_CPPUNIT)"=="YES" -CFLAGS+= $(CPPUNIT_CFLAGS) -.ENDIF - +CFLAGSCXX += $(CPPUNIT_CFLAGS) DLLPRE = # no leading "lib" on .so files SHL1TARGET = test_pathutils diff --git a/tools/test/makefile.mk b/tools/test/makefile.mk index 7f00fe2748b3..ab2cfd8e6676 100644 --- a/tools/test/makefile.mk +++ b/tools/test/makefile.mk @@ -36,9 +36,7 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk -.IF "$(SYSTEM_CPPUNIT)"=="YES" -CFLAGS+= $(CPPUNIT_CFLAGS) -.ENDIF +CFLAGSCXX += $(CPPUNIT_CFLAGS) # --- Common ----------------------------------------------------------