[Libreoffice-commits] .: 26 commits - autodoc/source odk/examples odk/settings odk/util unodevtools/source
Jan Holesovsky
kendy at kemper.freedesktop.org
Wed Mar 23 09:27:02 PDT 2011
autodoc/source/parser_i/idoc/docu_pe2.cxx | 128 ++++++++--
autodoc/source/parser_i/inc/s2_dsapi/docu_pe2.hxx | 11
odk/examples/CLI/CSharp/Spreadsheet/Makefile | 15 -
odk/examples/CLI/VB.NET/WriterDemo/Makefile | 7
odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.components | 10
odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java | 32 +-
odk/examples/DevelopersGuide/Charts/Makefile | 36 +-
odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.components | 8
odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java | 36 ++
odk/examples/DevelopersGuide/Components/Addons/JobsAddon/Makefile | 39 +--
odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Makefile | 41 ++-
odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx | 56 ++--
odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/Makefile | 41 +--
odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java | 18 -
odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon_java.components | 8
odk/examples/DevelopersGuide/Components/CppComponent/Makefile | 44 ++-
odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx | 21 +
odk/examples/DevelopersGuide/Components/JavaComponent/JavaComponent.components | 11
odk/examples/DevelopersGuide/Components/JavaComponent/Makefile | 57 ++--
odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java | 22 +
odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.components | 8
odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java | 14 -
odk/examples/DevelopersGuide/Components/SimpleLicense/Makefile | 10
odk/examples/DevelopersGuide/Components/Thumbs/Makefile | 2
odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.components | 8
odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.java | 17 -
odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Makefile | 23 -
odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/Makefile | 4
odk/examples/DevelopersGuide/Components/Thumbs/thumbs.mk | 21 -
odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.components | 8
odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java | 14 -
odk/examples/DevelopersGuide/Components/dialogcomponent/Makefile | 10
odk/examples/DevelopersGuide/Database/DriverSkeleton/Makefile | 47 ++-
odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx | 33 --
odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/Makefile | 2
odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/Makefile | 2
odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java | 18 -
odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/Makefile | 8
odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/SampleFilter.components | 10
odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/Makefile | 38 ++
odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx | 30 --
odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx | 28 --
odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/Makefile | 46 ++-
odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java | 14 -
odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXmlFilter_java.components | 8
odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/Makefile | 44 +--
odk/examples/DevelopersGuide/OfficeDev/Linguistic/Makefile | 115 ++++----
odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.components | 8
odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.java | 32 +-
odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.components | 8
odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.java | 32 +-
odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.components | 8
odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.java | 32 +-
odk/examples/DevelopersGuide/ProfUNO/CppBinding/Makefile | 38 --
odk/examples/DevelopersGuide/ProfUNO/CppBinding/office_connect.ini | 2
odk/examples/DevelopersGuide/ProfUNO/CppBinding/office_connectrc | 2
odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.components | 9
odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java | 24 +
odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.components | 8
odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java | 63 ++--
odk/examples/DevelopersGuide/Spreadsheet/Makefile | 20 -
odk/examples/cpp/DocumentLoader/DocumentLoader.cxx | 47 +--
odk/examples/cpp/DocumentLoader/Makefile | 37 --
odk/examples/cpp/complextoolbarcontrols/Makefile | 55 ++--
odk/examples/cpp/complextoolbarcontrols/exports.cxx | 42 ---
odk/examples/cpp/counter/Makefile | 42 ++-
odk/examples/cpp/counter/counter.cxx | 54 ++--
odk/examples/cpp/counter/countermain.cxx | 71 +----
odk/examples/cpp/remoteclient/Makefile | 65 ++---
odk/examples/cpp/remoteclient/remoteclient.cxx | 31 --
odk/examples/java/EmbedDocument/EmbeddedObject/Makefile | 12
odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.components | 8
odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObjectFactory.java | 14 -
odk/examples/java/MinimalComponent/Makefile | 18 -
odk/examples/java/MinimalComponent/MinimalComponent.components | 8
odk/examples/java/MinimalComponent/MinimalComponent.java | 14 -
odk/examples/java/PropertySet/Makefile | 10
odk/examples/java/PropertySet/PropTest.components | 8
odk/examples/java/PropertySet/PropTest.java | 14 -
odk/examples/java/Spreadsheet/CalcAddins.components | 9
odk/examples/java/Spreadsheet/CalcAddins.java | 16 -
odk/examples/java/Spreadsheet/Makefile | 58 ++--
odk/examples/java/ToDo/Makefile | 10
odk/examples/java/ToDo/ToDo.components | 8
odk/examples/java/ToDo/ToDo.java | 12
odk/settings/component.uno.def | 1
odk/settings/settings.mk | 65 +++--
odk/util/check.pl | 2
odk/util/makefile.pmk | 2
unodevtools/source/skeletonmaker/skeletonmaker.cxx | 3
90 files changed, 1291 insertions(+), 954 deletions(-)
New commits:
commit e04680dd0e41342e7bf613b1d50559825f1dd014
Merge: d9bfe2b... ca94c1b...
Author: Jan Holesovsky <kendy at suse.cz>
Date: Wed Mar 23 17:13:49 2011 +0100
Merge branch 'master' of git://anongit.freedesktop.org/libreoffice/sdk
commit d9bfe2b1782c2d0139553b592464061ae05af35d
Merge: 8cbadd8... e4d3fd6...
Author: Jan Holesovsky <kendy at suse.cz>
Date: Wed Mar 23 16:59:36 2011 +0100
Merge commit 'ooo/DEV300_m103'
Conflicts:
odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx
odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx
odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx
odk/examples/cpp/complextoolbarcontrols/exports.cxx
odk/examples/cpp/counter/countermain.cxx
odk/examples/cpp/remoteclient/remoteclient.cxx
odk/settings/settings.mk
diff --cc odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Makefile
index af679d8,98bbab1..a6bc683
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Makefile
+++ b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Makefile
@@@ -83,13 -84,14 +84,14 @@@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $
-$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN))
$(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
/MAP:$(OUT_COMP_GEN)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) msvcprt.lib msvcrt.lib kernel32.lib
$(LINK_MANIFEST)
else
- $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
+ #$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
+ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
-$(MKDIR) $(subst /,$(PS),$(@D))
$(LINK) $(COMP_LINK_FLAGS) $(LINK_LIBS) -o $@ $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
ifeq "$(OS)" "MACOSX"
$(INSTALL_NAME_URELIBS) $@
endif
diff --cc odk/examples/DevelopersGuide/Components/CppComponent/Makefile
index 96dd4e5,b89d58b..84195a8
--- a/odk/examples/DevelopersGuide/Components/CppComponent/Makefile
+++ b/odk/examples/DevelopersGuide/Components/CppComponent/Makefile
@@@ -116,13 -117,14 +117,14 @@@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $
-$(MKDIR) $(subst /,$(PS),$(SAMPLE_GEN_OUT))
$(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
/MAP:$(SAMPLE_GEN_OUT)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) msvcprt.lib msvcrt.lib kernel32.lib
$(LINK_MANIFEST)
else
- $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
+ #$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
+ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
-$(MKDIR) $(subst /,$(PS),$(@D)) && $(DEL) $(subst \\,\,$(subst /,$(PS),$@))
$(LINK) $(COMP_LINK_FLAGS) $(LINK_LIBS) -o $@ $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
ifeq "$(OS)" "MACOSX"
$(INSTALL_NAME_URELIBS) $@
endif
diff --cc odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java
index 1653a76,a9ada93..5f78eb4
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java
+++ b/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java
@@@ -57,15 -57,19 +57,19 @@@ public class TestServiceProvide
return xSingleServiceFactory;
}
- public static boolean __writeRegistryServiceInfo(XRegistryKey regKey){
- boolean bregA= FactoryHelper.writeRegistryServiceInfo(
- TestComponentA.class.getName(),
- TestComponentA.__serviceName, regKey);
- boolean bregB= FactoryHelper.writeRegistryServiceInfo(
- TestComponentB.class.getName(),
- TestComponentB.__serviceName, regKey);
- return bregA && bregB;
- }
+ // This method not longer necessary since OOo 3.4 where the component registration
+ // was changed to passive component registration. For more details see
+ // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
+
+ // public static boolean __writeRegistryServiceInfo(XRegistryKey regKey){
+ // boolean bregA= FactoryHelper.writeRegistryServiceInfo(
+ // TestComponentA.class.getName(),
+ // TestComponentA.__serviceName, regKey);
+ // boolean bregB= FactoryHelper.writeRegistryServiceInfo(
+ // TestComponentB.class.getName(),
+ // TestComponentB.__serviceName, regKey);
+ // return bregA && bregB;
-// }
++// }
}
diff --cc odk/examples/DevelopersGuide/Database/DriverSkeleton/Makefile
index ccfe4b6,f1451d3..7f77f1f
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/Makefile
+++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/Makefile
@@@ -91,13 -92,13 +92,13 @@@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $
-$(MKDIR) $(subst /,$(PS),$(OUT_COMP_MISC))
$(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
/MAP:$(OUT_COMP_MISC)/$(COMP_NAME).map $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) msvcprt.lib msvcrt.lib kernel32.lib
$(LINK_MANIFEST)
else
- $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
+ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
-$(MKDIR) $(subst /,$(PS),$(@D))
$(LINK) $(COMP_LINK_FLAGS) $(LINK_LIBS) -o $@ $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
ifeq "$(OS)" "MACOSX"
$(INSTALL_NAME_URELIBS) $@
endif
diff --cc odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx
index 1a90ff6,8893869..919b852
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx
+++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx
@@@ -126,33 -127,36 +127,9 @@@ extern "C" SAL_DLLPUBLIC_EXPORT void SA
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
- //---------------------------------------------------------------------------------------
- extern "C" sal_Bool SAL_CALL component_writeInfo(
- void* pServiceManager,
- void* pRegistryKey
- )
- {
- if (pRegistryKey)
- try
- {
- Reference< ::com::sun::star::registry::XRegistryKey > xKey(reinterpret_cast< ::com::sun::star::registry::XRegistryKey*>(pRegistryKey));
-
- REGISTER_PROVIDER(
- SkeletonDriver::getImplementationName_Static(),
- SkeletonDriver::getSupportedServiceNames_Static(), xKey);
-
- return sal_True;
- }
- catch (::com::sun::star::registry::InvalidRegistryException& )
- {
- OSL_FAIL("SKELETON::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !");
- }
-
- return sal_False;
- }
-// This method not longer necessary since OOo 3.4 where the component registration was
-// was changed to passive component registration. For more details see
-// http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
-//---------------------------------------------------------------------------------------
-// extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
-// void* pServiceManager,
-// void* pRegistryKey
-// )
-// {
-// if (pRegistryKey)
-// try
-// {
-// Reference< ::com::sun::star::registry::XRegistryKey > xKey(reinterpret_cast< ::com::sun::star::registry::XRegistryKey*>(pRegistryKey));
-
-// REGISTER_PROVIDER(
-// SkeletonDriver::getImplementationName_Static(),
-// SkeletonDriver::getSupportedServiceNames_Static(), xKey);
-
-// return sal_True;
-// }
-// catch (::com::sun::star::registry::InvalidRegistryException& )
-// {
-// OSL_ENSURE(sal_False, "SKELETON::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !");
-// }
-
-// return sal_False;
-// }
//---------------------------------------------------------------------------------------
- extern "C" void* SAL_CALL component_getFactory(
+ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
const sal_Char* pImplementationName,
void* pServiceManager,
void* pRegistryKey)
diff --cc odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/Makefile
index c3d4898,8a458d9..d9f70b2
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/Makefile
+++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/Makefile
@@@ -85,13 -86,13 +86,13 @@@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $
-$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN))
$(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
/MAP:$(OUT_COMP_GEN)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) msvcprt.lib msvcrt.lib kernel32.lib
$(LINK_MANIFEST)
else
- $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
+ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
-$(MKDIR) $(subst /,$(PS),$(@D))
$(LINK) $(COMP_LINK_FLAGS) $(LINK_LIBS) -o $@ $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
ifeq "$(OS)" "MACOSX"
$(INSTALL_NAME_URELIBS) $@
endif
diff --cc odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx
index 57a7607,3d279d6..3925eef
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx
+++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx
@@@ -57,35 -56,38 +57,9 @@@ SAL_DLLPUBLIC_EXPORT void SAL_CALL comp
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
- //==================================================================================================
- sal_Bool SAL_CALL component_writeInfo(
- void * pServiceManager, void * pRegistryKey )
- {
- if (pRegistryKey)
- {
- try
- {
- Reference< XRegistryKey > xNewKey(
- reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( FilterDetect_getImplementationName() ) );
- xNewKey = xNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")) );
-
- const Sequence< OUString > & rSNL = FilterDetect_getSupportedServiceNames();
- const OUString * pArray = rSNL.getConstArray();
- for ( sal_Int32 nPos = rSNL.getLength(); nPos--; )
- xNewKey->createKey( pArray[nPos] );
-
- return sal_True;
- }
- catch (InvalidRegistryException &)
- {
- OSL_FAIL( "### InvalidRegistryException!" );
- }
- }
- return sal_False;
- }
-// This method not longer necessary since OOo 3.4 where the component registration was
-// was changed to passive component registration. For more details see
-// http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
-//==================================================================================================
-// SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
-// void * pServiceManager, void * pRegistryKey )
-// {
-// if (pRegistryKey)
-// {
-// try
-// {
-// Reference< XRegistryKey > xNewKey(
-// reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( FilterDetect_getImplementationName() ) );
-// xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
-
-// const Sequence< OUString > & rSNL = FilterDetect_getSupportedServiceNames();
-// const OUString * pArray = rSNL.getConstArray();
-// for ( sal_Int32 nPos = rSNL.getLength(); nPos--; )
-// xNewKey->createKey( pArray[nPos] );
-
-// return sal_True;
-// }
-// catch (InvalidRegistryException &)
-// {
-// OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
-// }
-// }
-// return sal_False;
-// }
//==================================================================================================
- void * SAL_CALL component_getFactory(
+ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
void * pRet = 0;
diff --cc odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx
index 7ca8938,b57f4c7..112a181
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx
+++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx
@@@ -325,32 -324,36 +325,8 @@@ SAL_DLLPUBLIC_EXPORT void SAL_CALL comp
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
- sal_Bool SAL_CALL component_writeInfo(void * pServiceManager, void * pRegistryKey )
- {
- if (pRegistryKey)
- {
- try
- {
- Reference< XRegistryKey > xNewKey(
- reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
- OUString(RTL_CONSTASCII_USTRINGPARAM( "/" IMPLEMENTATION_NAME "/UNO/SERVICES" )) ) );
-
- const Sequence< OUString > & rSNL = getSupportedServiceNames();
- const OUString * pArray = rSNL.getConstArray();
- for ( sal_Int32 nPos = rSNL.getLength(); nPos--; )
- xNewKey->createKey( pArray[nPos] );
-
- return sal_True;
- }
- catch (InvalidRegistryException &)
- {
- OSL_FAIL( "### InvalidRegistryException!" );
- }
- }
- return sal_False;
- }
-// This method not longer necessary since OOo 3.4 where the component registration was
-// was changed to passive component registration. For more details see
-// http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
-//
-// SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(void * pServiceManager, void * pRegistryKey )
-// {
-// if (pRegistryKey)
-// {
-// try
-// {
-// Reference< XRegistryKey > xNewKey(
-// reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
-// OUString::createFromAscii( "/" IMPLEMENTATION_NAME "/UNO/SERVICES" ) ) );
-
-// const Sequence< OUString > & rSNL = getSupportedServiceNames();
-// const OUString * pArray = rSNL.getConstArray();
-// for ( sal_Int32 nPos = rSNL.getLength(); nPos--; )
-// xNewKey->createKey( pArray[nPos] );
-
-// return sal_True;
-// }
-// catch (InvalidRegistryException &)
-// {
-// OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
-// }
-// }
-// return sal_False;
-// }
- void * SAL_CALL component_getFactory(
+ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
void * pRet = 0;
diff --cc odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/Makefile
index a666549,a9e9877..1a96808
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/Makefile
+++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/Makefile
@@@ -82,13 -83,13 +83,13 @@@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $
-$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN))
$(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
/MAP:$(OUT_COMP_GEN)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) msvcprt.lib msvcrt.lib kernel32.lib
$(LINK_MANIFEST)
else
- $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
+ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
-$(MKDIR) $(subst /,$(PS),$(@D))
$(LINK) $(COMP_LINK_FLAGS) $(LINK_LIBS) -o $@ $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
ifeq "$(OS)" "MACOSX"
$(INSTALL_NAME_URELIBS) $@
endif
diff --cc odk/examples/cpp/DocumentLoader/DocumentLoader.cxx
index 37ba2f7,0ef6c11..6401f73
--- a/odk/examples/cpp/DocumentLoader/DocumentLoader.cxx
+++ b/odk/examples/cpp/DocumentLoader/DocumentLoader.cxx
@@@ -132,10 -118,10 +119,10 @@@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv
OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US).getStr());
exit(1);
}
-
+
// gets the server component context as property of the office component factory
Reference< XPropertySet > xPropSet( xInterface, UNO_QUERY );
- xPropSet->getPropertyValue( OUString::createFromAscii("DefaultContext") ) >>= xComponentContext;
+ xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xComponentContext;
// gets the service manager from the office
Reference< XMultiComponentFactory > xMultiComponentFactoryServer(
diff --cc odk/examples/cpp/complextoolbarcontrols/Makefile
index bda6750,8e62233..06af1af
--- a/odk/examples/cpp/complextoolbarcontrols/Makefile
+++ b/odk/examples/cpp/complextoolbarcontrols/Makefile
@@@ -92,13 -92,14 +92,14 @@@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $
-$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN))
$(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
/MAP:$(OUT_COMP_GEN)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) msvcprt.lib msvcrt.lib kernel32.lib
$(LINK_MANIFEST)
else
- $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
+ #$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
+ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
-$(MKDIR) $(subst /,$(PS),$(@D))
$(LINK) $(COMP_LINK_FLAGS) $(LINK_LIBS) -o $@ $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
ifeq "$(OS)" "MACOSX"
$(INSTALL_NAME_URELIBS) $@
endif
diff --cc odk/examples/cpp/complextoolbarcontrols/exports.cxx
index 6978c5d,c75471a..769ce98
--- a/odk/examples/cpp/complextoolbarcontrols/exports.cxx
+++ b/odk/examples/cpp/complextoolbarcontrols/exports.cxx
@@@ -63,27 -62,30 +63,7 @@@ SAL_DLLPUBLIC_EXPORT void SAL_CALL comp
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
- //==================================================================================================
- SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(void* pServiceManager,
- void* pRegistryKey )
- {
- if (!pRegistryKey)
- return sal_False;
-
- try
- {
- css::uno::Reference< css::registry::XRegistryKey > xKey(reinterpret_cast< css::registry::XRegistryKey* >(pRegistryKey), css::uno::UNO_QUERY);
-
- writeInfo( xKey, MYLISTENER_IMPLEMENTATIONNAME , MYLISTENER_SERVICENAME );
- writeInfo( xKey, MYPROTOCOLHANDLER_IMPLEMENTATIONNAME, MYPROTOCOLHANDLER_SERVICENAME );
-// This method not longer necessary since OOo 3.4 where the component registration was
-// was changed to passive component registration. For more details see
-// http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
-//==================================================================================================
-// SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(void* pServiceManager,
-// void* pRegistryKey )
-// {
-// if (!pRegistryKey)
-// return sal_False;
-
-// try
-// {
-// css::uno::Reference< css::registry::XRegistryKey > xKey(reinterpret_cast< css::registry::XRegistryKey* >(pRegistryKey), css::uno::UNO_QUERY);
-
-// writeInfo( xKey, MYLISTENER_IMPLEMENTATIONNAME , MYLISTENER_SERVICENAME );
-// writeInfo( xKey, MYPROTOCOLHANDLER_IMPLEMENTATIONNAME, MYPROTOCOLHANDLER_SERVICENAME );
- return sal_True;
- }
- catch(const css::registry::InvalidRegistryException&)
- { OSL_FAIL( "### InvalidRegistryException!" ); }
-
- return sal_False;
- }
-// return sal_True;
-// }
-// catch(const css::registry::InvalidRegistryException&)
-// { OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); }
-
-// return sal_False;
-// }
//==================================================================================================
SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(const sal_Char* pImplName ,
diff --cc odk/examples/cpp/counter/Makefile
index 2ede77d,161145f..e74b472
--- a/odk/examples/cpp/counter/Makefile
+++ b/odk/examples/cpp/counter/Makefile
@@@ -115,13 -111,13 +111,13 @@@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $
-$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN))
$(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
/MAP:$(OUT_COMP_GEN)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) msvcprt.lib msvcrt.lib kernel32.lib
$(LINK_MANIFEST)
else
- $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
+ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
-$(MKDIR) $(subst /,$(PS),$(@D))
$(LINK) $(COMP_LINK_FLAGS) $(LINK_LIBS) -o $@ $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
ifeq "$(OS)" "MACOSX"
$(INSTALL_NAME_URELIBS) $@
endif
@@@ -135,11 -131,22 +131,22 @@@ ifeq "$(OS)" "WIN
else
-$(MKDIR) $(subst /,$(PS),$(@D))
$(LINK) $(EXE_LINK_FLAGS) $(LINK_LIBS) -o $@ $< \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB) $(STLPORTLIB) $(STDC++LIB)
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB) $(STDC++LIB)
endif
+ $(COMP_SERVICES) :
+ -$(MKDIR) $(subst /,$(PS),$(@D))
+ @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
+ @echo $(OSEP)components xmlns="$(QM)http://openoffice.org/2010/uno-components$(QM)"$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)component loader="$(QM)com.sun.star.loader.SharedLibrary$(QM)" uri="$(QM)$(COMP_IMPL_NAME)$(QM)"$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)implementation name="$(QM)com.sun.star.comp.example.cpp.Counter$(QM)"$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)service name="$(QM)foo.Counter$(QM)"/$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)/implementation$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)/component$(CSEP) >> $@
+ @echo $(OSEP)/components$(CSEP) >> $@
+
- CppCounterExample : $(OUT_BIN)/countermain$(EXE_EXT) $(COMP_IMPL)
+ CppCounterExample : $(OUT_BIN)/countermain$(EXE_EXT) $(COMP_IMPL) $(COMP_SERVICES)
@echo --------------------------------------------------------------------------------
@echo Please use the following command to execute the example!
@echo -
diff --cc odk/examples/cpp/counter/countermain.cxx
index cce41e8,fce1715..8eb9f94
--- a/odk/examples/cpp/counter/countermain.cxx
+++ b/odk/examples/cpp/counter/countermain.cxx
@@@ -111,15 -86,19 +87,18 @@@ SAL_IMPLEMENT_MAIN(
if (xCount.is())
{
- xCount->setCount( 42 );
- fprintf( stdout , "%d," , xCount->getCount() );
- fprintf( stdout , "%d," , xCount->increment() );
- fprintf( stdout , "%d\n" , xCount->decrement() );
+ xCount->setCount( 42 );
+ fprintf( stdout , "%d," , (int)xCount->getCount() );
+ fprintf( stdout , "%d," , (int)xCount->increment() );
+ fprintf( stdout , "%d\n" , (int)xCount->decrement() );
}
- }
- Reference< XComponent >::query( xContext )->dispose();
- return 0;
- }
+ Reference< XComponent >::query( xContext )->dispose();
+
+ } catch( Exception& e) {
+ printf("Error: caught exception:\n %s\n",
+ OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US).getStr());
+ exit(1);
+ }
- return 0;
-}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --cc odk/examples/cpp/remoteclient/Makefile
index 8d6b2bc,96b2ef9..97b0c3f
--- a/odk/examples/cpp/remoteclient/Makefile
+++ b/odk/examples/cpp/remoteclient/Makefile
@@@ -90,13 -84,13 +84,13 @@@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $
-$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN))
$(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
/MAP:$(OUT_COMP_GEN)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) msvcprt.lib msvcrt.lib kernel32.lib
$(LINK_MANIFEST)
else
- $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
+ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
-$(MKDIR) $(subst /,$(PS),$(@D))
$(LINK) $(COMP_LINK_FLAGS) $(LINK_LIBS) -o $@ $(SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
+ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
ifeq "$(OS)" "MACOSX"
$(INSTALL_NAME_URELIBS) $@
endif
diff --cc odk/examples/cpp/remoteclient/remoteclient.cxx
index eb89be7,867c109..2db24c7
--- a/odk/examples/cpp/remoteclient/remoteclient.cxx
+++ b/odk/examples/cpp/remoteclient/remoteclient.cxx
@@@ -233,34 -232,36 +233,9 @@@ SAL_DLLPUBLIC_EXPORT void SAL_CALL comp
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
+
//==================================================================================================
- sal_Bool SAL_CALL component_writeInfo(
- void * pServiceManager, void * pRegistryKey )
- {
- if (pRegistryKey)
- {
- try
- {
- Reference< XRegistryKey > xNewKey(
- reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
- OUString(RTL_CONSTASCII_USTRINGPARAM( "/" IMPLEMENTATION_NAME "/UNO/SERVICES" )) ) );
-
- const Sequence< OUString > & rSNL = getSupportedServiceNames();
- const OUString * pArray = rSNL.getConstArray();
- for ( sal_Int32 nPos = rSNL.getLength(); nPos--; )
- xNewKey->createKey( pArray[nPos] );
-
- return sal_True;
- }
- catch (InvalidRegistryException &)
- {
- OSL_FAIL( "### InvalidRegistryException!" );
- }
- }
- return sal_False;
- }
- //==================================================================================================
- void * SAL_CALL component_getFactory(
-// SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
-// void * pServiceManager, void * pRegistryKey )
-// {
-// if (pRegistryKey)
-// {
-// try
-// {
-// Reference< XRegistryKey > xNewKey(
-// reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
-// OUString::createFromAscii( "/" IMPLEMENTATION_NAME "/UNO/SERVICES" ) ) );
-
-// const Sequence< OUString > & rSNL = getSupportedServiceNames();
-// const OUString * pArray = rSNL.getConstArray();
-// for ( sal_Int32 nPos = rSNL.getLength(); nPos--; )
-// xNewKey->createKey( pArray[nPos] );
-
-// return sal_True;
-// }
-// catch (InvalidRegistryException &)
-// {
-// OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
-// }
-// }
-// return sal_False;
-// }
-
-//==================================================================================================
+ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
void * pRet = 0;
diff --cc odk/settings/settings.mk
index 15b8af9,748800b..6dad32e
--- a/odk/settings/settings.mk
+++ b/odk/settings/settings.mk
@@@ -78,10 -79,13 +78,11 @@@ EMPTYSTRING
PATH_SEPARATOR=;
# use this for release version
+ CC_FLAGS_JNI=-c -MT -Zm500 -Zc:forScope,wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -Zc:forScope -GR -EHa
CC_FLAGS=-c -MT -Zm500 -Zc:forScope,wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -Zc:forScope -GR -EHa
ifeq "$(CPP_MANIFEST)" "true"
-#CC_FLAGS+=-EHa -Zc:wchar_t-
LINK_MANIFEST=mt -manifest $@.manifest "-outputresource:$@;2"
else
-#CC_FLAGS+=
LINK_MANIFEST=
endif
ifeq "$(DEBUG)" "yes"
@@@ -324,7 -358,9 +335,8 @@@ endi
SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/linux"
CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
- CC_DEFINES=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH)
-STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl"
+ CC_DEFINES_JNI=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH)
+ CC_DEFINES=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) -DHAVE_GCC_VISIBILITY_FEATURE
# define for used compiler necessary for UNO
#-DCPPU_ENV=gcc2 -- gcc 2.91/2.95
@@@ -337,8 -373,10 +349,9 @@@ LIBRARY_LINK_FLAGS=-shared '-Wl,-rpath,
ifeq "$(PROCTYPE)" "ppc"
LIBRARY_LINK_FLAGS+=-fPIC
endif
- COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,--version-script,$(PRJ)/settings/component.uno.map
+ #COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,--version-script,$(PRJ)/settings/component.uno.map
+ COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
-#EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined -Wl,-export-dynamic -Wl,-z,defs -Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive
EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined -Wl,-export-dynamic -Wl,-z,defs -Wl,--no-whole-archive
LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_URE_LIB_DIR)"
LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)"
@@@ -441,7 -489,9 +464,8 @@@ endi
SDK_JAVA_INCLUDES = -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -I/System/Library/Frameworks/JavaVM.framework/Headers
CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
- CC_DEFINES=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH)
-STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl"
+ CC_DEFINES_JNI=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH)
+ CC_DEFINES=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) -DHAVE_GCC_VISIBILITY_FEATURE
CC_OUTPUT_SWITCH=-o
@@@ -556,14 -616,18 +585,16 @@@ endi
SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/freebsd"
CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
- CC_DEFINES=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH)
-STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl"
+ CC_DEFINES_JNI=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH)
+ CC_DEFINES=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) -DHAVE_GCC_VISIBILITY_FEATURE
CC_OUTPUT_SWITCH=-o
LIBRARY_LINK_FLAGS=-shared '-Wl,-rpath,$$ORIGIN'
- COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,--version-script,$(PRJ)/settings/component.uno.map
+ #COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,--version-script,$(PRJ)/settings/component.uno.map
+ COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined
-#EXE_LINK_FLAGS+=-Wl,-export-dynamic -Wl,-z,defs
LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_URE_LIB_DIR)" $(PTHREAD_LIBS)
LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)"
commit e4d3fd6faea32f954923690a111c2466bea1d0c9
Merge: af67f29... 127c6e0...
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date: Mon Mar 7 16:31:11 2011 +0100
CWS-TOOLING: integrate CWS jsc340
diff --cc odk/examples/java/EmbedDocument/EmbeddedObject/Makefile
index 6b75f4e,62fb17e..62fb17e
mode 100644,100644..100755
--- a/odk/examples/java/EmbedDocument/EmbeddedObject/Makefile
+++ b/odk/examples/java/EmbedDocument/EmbeddedObject/Makefile
commit 127c6e0da8657f19392081d7c4da2754c2b9bd09
Author: Juergen Schmidt <jsc at openoffice.org>
Date: Thu Mar 3 14:28:00 2011 +0100
jsc340: i114609: no visibility compiler flag for jni lib
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/Makefile b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/Makefile
index d6778b5..4eb8d30 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/Makefile
+++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/Makefile
@@ -60,7 +60,7 @@ include $(SETTINGS)/stdtarget.mk
$(OUT_SHL_SLO)/%.$(OBJ_EXT) : %.c
-$(MKDIR) $(subst /,$(PS),$(@D))
- $(CC) $(CC_FLAGS) $(CC_INCLUDES) $(SDK_JAVA_INCLUDES) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
+ $(CC) $(CC_FLAGS_JNI) $(CC_INCLUDES) $(SDK_JAVA_INCLUDES) $(CC_DEFINES_JNI) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
$(SHAREDLIB_OUT)/$(SHAREDLIB_PRE)$(SHL_NAME).$(SHAREDLIB_EXT) : $(SLOFILES)
-$(MKDIR) $(subst /,$(PS),$(@D))
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/Makefile b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/Makefile
index 71c50df..7052c2f 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/Makefile
+++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/Makefile
@@ -61,7 +61,7 @@ include $(SETTINGS)/stdtarget.mk
$(OUT_SHL_SLO)/%.$(OBJ_EXT) : %.c
-$(MKDIR) $(subst /,$(PS),$(@D))
- $(CC) $(CC_FLAGS) $(CC_INCLUDES) $(SDK_JAVA_INCLUDES) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
+ $(CC) $(CC_FLAGS_JNI) $(CC_INCLUDES) $(SDK_JAVA_INCLUDES) $(CC_DEFINES_JNI) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
$(SHAREDLIB_OUT)/$(SHAREDLIB_PRE)$(SHL_NAME).$(SHAREDLIB_EXT) : $(SLOFILES) $(SHL_NAME).def
-$(MKDIR) $(subst /,$(PS),$(@D))
diff --git a/odk/settings/settings.mk b/odk/settings/settings.mk
index 0857882..748800b 100644
--- a/odk/settings/settings.mk
+++ b/odk/settings/settings.mk
@@ -79,6 +79,7 @@ EMPTYSTRING=
PATH_SEPARATOR=;
# use this for release version
+CC_FLAGS_JNI=-c -MT -Zm500 -Zc:forScope,wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -Zc:forScope -GR -EHa
CC_FLAGS=-c -MT -Zm500 -Zc:forScope,wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -Zc:forScope -GR -EHa
ifeq "$(CPP_MANIFEST)" "true"
#CC_FLAGS+=-EHa -Zc:wchar_t-
@@ -88,6 +89,7 @@ else
LINK_MANIFEST=
endif
ifeq "$(DEBUG)" "yes"
+CC_FLAGS_JNI+=-Zi
CC_FLAGS+=-Zi
endif
@@ -98,6 +100,7 @@ SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/inclu
# define for used compiler necessary for UNO
# -DCPPU_ENV=msci -- windows msvc 4.x - 7.x
+CC_DEFINES_JNI=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci
CC_DEFINES=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci
CC_OUTPUT_SWITCH=-Fo
@@ -196,8 +199,10 @@ endif
EMPTYSTRING=
PATH_SEPARATOR=:
+CC_FLAGS_JNI=-c -KPIC
CC_FLAGS=-c -KPIC -xldscope=hidden
ifeq "$(DEBUG)" "yes"
+CC_FLAGS_JNI+=-g
CC_FLAGS+=-g
endif
CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
@@ -207,6 +212,7 @@ SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/inclu
# define for used compiler necessary for UNO
# -DCPPU_ENV=sunpro5 -- sunpro cc 5.x solaris sparc/intel
+CC_DEFINES_JNI=-DUNX -DSOLARIS -DCPPU_ENV=sunpro5
CC_DEFINES=-DUNX -DSOLARIS -DSPARC -DCPPU_ENV=sunpro5 -DHAVE_GCC_VISIBILITY_FEATURE
CC_OUTPUT_SWITCH=-o
@@ -335,11 +341,14 @@ endif
EMPTYSTRING=
PATH_SEPARATOR=:
+CC_FLAGS_JNI=-c -fpic
CC_FLAGS=-c -fpic -fvisibility=hidden
# -O is necessary for inlining (see gcc documentation)
ifeq "$(DEBUG)" "yes"
+CC_FLAGS_JNI+=-g
CC_FLAGS+=-g
else
+CC_FLAGS_JNI+=-O
CC_FLAGS+=-O
endif
@@ -350,6 +359,7 @@ endif
SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/linux"
CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl"
+CC_DEFINES_JNI=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH)
CC_DEFINES=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) -DHAVE_GCC_VISIBILITY_FEATURE
# define for used compiler necessary for UNO
@@ -466,17 +476,21 @@ INSTALL_NAME_URELIBS_BIN=install_name_tool -change @____________________________
EMPTYSTRING=
PATH_SEPARATOR=:
+CC_FLAGS_JNI=-malign-natural -c -fPIC -fno-common $(GCC_ARCH_OPTION)
CC_FLAGS=-malign-natural -c -fPIC -fno-common $(GCC_ARCH_OPTION) -fvisibility=hidden
# -O is necessary for inlining (see gcc documentation)
ifeq "$(DEBUG)" "yes"
+CC_FLAGS_JNI+=-g
CC_FLAGS+=-g
else
+CC_FLAGS_JNI+=-O
CC_FLAGS+=-O
endif
SDK_JAVA_INCLUDES = -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -I/System/Library/Frameworks/JavaVM.framework/Headers
CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl"
+CC_DEFINES_JNI=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH)
CC_DEFINES=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) -DHAVE_GCC_VISIBILITY_FEATURE
CC_OUTPUT_SWITCH=-o
@@ -589,17 +603,21 @@ endif
EMPTYSTRING=
PATH_SEPARATOR=:
+CC_FLAGS_JNI=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS)
CC_FLAGS=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) -fvisibility=hidden
# -O is necessary for inlining (see gcc documentation)
ifeq "$(DEBUG)" "yes"
+CC_FLAGS_JNI+=-g
CC_FLAGS+=-g
else
+CC_FLAGS_JNI+=-O
CC_FLAGS+=-O
endif
SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/freebsd"
CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl"
+CC_DEFINES_JNI=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH)
CC_DEFINES=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) -DHAVE_GCC_VISIBILITY_FEATURE
CC_OUTPUT_SWITCH=-o
commit 8c38ea8da58e7e9a3f689d73d96760bdfbf9a6c4
Author: Juergen Schmidt <jsc at openoffice.org>
Date: Tue Mar 1 14:45:39 2011 +0100
jsc340: i114609: move generated component services rdb
diff --git a/odk/examples/cpp/counter/Makefile b/odk/examples/cpp/counter/Makefile
index e809c24..161145f 100644
--- a/odk/examples/cpp/counter/Makefile
+++ b/odk/examples/cpp/counter/Makefile
@@ -51,7 +51,7 @@ OUT_COMP_INC = $(OUT_INC)/$(COMP_NAME)
OUT_COMP_GEN = $(OUT_MISC)/$(COMP_NAME)
OUT_COMP_OBJ = $(OUT_OBJ)/$(COMP_NAME)
OUT_COMP_SLO = $(OUT_SLO)/$(COMP_NAME)
-COMP_SERVICES=$(OUT_BIN)/counterservices.rdb
+COMP_SERVICES=$(SHAREDLIB_OUT)/counterservices.rdb
ENV_EXAMPLE_TYPES=-env:URE_MORE_TYPES=$(URLPREFIX)$(COMP_RDB)
ENV_COMP_SERVICES=-env:URE_MORE_SERVICES=$(URLPREFIX)$(COMP_SERVICES)
commit 81a548678a121041a5f8b4ffa3666fd7dae643cb
Author: Juergen Schmidt <jsc at openoffice.org>
Date: Tue Mar 1 09:48:57 2011 +0100
jsc340: i114609: adapt examples to work with the URE and use the passive registration
diff --git a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/Makefile b/odk/examples/DevelopersGuide/ProfUNO/CppBinding/Makefile
index 1ab9cfb..09d8246 100644
--- a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/Makefile
+++ b/odk/examples/DevelopersGuide/ProfUNO/CppBinding/Makefile
@@ -53,7 +53,7 @@ APP1_BINARY=$(OUT_BIN)/$(APP1_NAME)$(EXE_EXT)
APP2_NAME=string_samples
APP2_BINARY=$(OUT_BIN)/$(APP2_NAME)$(EXE_EXT)
-ENV_OFFICE_TYPES=-env:URE_MORE_TYPES=file://$(OFFICE_TYPES)
+ENV_OFFICE_TYPES=-env:URE_MORE_TYPES=$(URLPREFIX)$(OFFICE_TYPES)
CXXFILES = \
office_connect.cxx \
diff --git a/odk/examples/cpp/DocumentLoader/Makefile b/odk/examples/cpp/DocumentLoader/Makefile
index 3e7b904..6cbd8bd 100644
--- a/odk/examples/cpp/DocumentLoader/Makefile
+++ b/odk/examples/cpp/DocumentLoader/Makefile
@@ -52,7 +52,7 @@ CXXFILES = DocumentLoader.cxx
OBJFILES = $(patsubst %.cxx,$(OUT_SLO_COMP)/%.$(OBJ_EXT),$(CXXFILES))
-ENV_OFFICE_TYPES=-env:URE_MORE_TYPES=file://$(OFFICE_TYPES)
+ENV_OFFICE_TYPES=-env:URE_MORE_TYPES=$(URLPREFIX)$(OFFICE_TYPES)
# Targets
.PHONY: ALL
diff --git a/odk/examples/cpp/counter/Makefile b/odk/examples/cpp/counter/Makefile
index 84062dc..e809c24 100644
--- a/odk/examples/cpp/counter/Makefile
+++ b/odk/examples/cpp/counter/Makefile
@@ -47,15 +47,14 @@ COMP_IMPL_NAME=$(COMP_NAME).uno.$(SHAREDLIB_EXT)
COMP_IMPL=$(SHAREDLIB_OUT)/$(COMP_IMPL_NAME)
COMP_RDB_NAME = $(COMP_NAME).uno.rdb
COMP_RDB = $(OUT_BIN)/$(COMP_RDB_NAME)
-COMP_MAPFILE = $(OUT_COMP_GEN)/$(COMP_NAME).uno.map
OUT_COMP_INC = $(OUT_INC)/$(COMP_NAME)
OUT_COMP_GEN = $(OUT_MISC)/$(COMP_NAME)
OUT_COMP_OBJ = $(OUT_OBJ)/$(COMP_NAME)
OUT_COMP_SLO = $(OUT_SLO)/$(COMP_NAME)
COMP_SERVICES=$(OUT_BIN)/counterservices.rdb
-ENV_EXAMPLE_TYPES=-env:URE_MORE_TYPES=file://$(COMP_RDB)
-ENV_COMP_SERVICES=-env:URE_MORE_SERVICES=file://$(COMP_SERVICES)
+ENV_EXAMPLE_TYPES=-env:URE_MORE_TYPES=$(URLPREFIX)$(COMP_RDB)
+ENV_COMP_SERVICES=-env:URE_MORE_SERVICES=$(URLPREFIX)$(COMP_SERVICES)
COMP_TYPEFLAG = $(OUT_MISC)/cpp_$(COMP_NAME)_types.flag
@@ -106,15 +105,8 @@ $(OUT_COMP_SLO)/%.$(OBJ_EXT) : %.cxx $(COMP_TYPEFLAG)
-$(MKDIR) $(subst /,$(PS),$(@D))
$(CC) $(CC_FLAGS) $(CC_INCLUDES) -I$(OUT_COMP_INC) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
-$(COMP_MAPFILE) : $(SLOFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- cat $(PRJ)/settings/component.uno.map > $(COMP_MAPFILE)
-ifeq "$(OS)" "MACOSX"
- nm -gx $(SLOFILES) | $(ADDSYMBOLS) >> $(COMP_MAPFILE)
-endif
-
ifeq "$(OS)" "WIN"
-$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
+$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
-$(MKDIR) $(subst /,$(PS),$(@D))
-$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN))
$(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
@@ -122,7 +114,6 @@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
$(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib
$(LINK_MANIFEST)
else
-#$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
-$(MKDIR) $(subst /,$(PS),$(@D))
$(LINK) $(COMP_LINK_FLAGS) $(LINK_LIBS) -o $@ $(SLOFILES) \
diff --git a/odk/examples/cpp/remoteclient/Makefile b/odk/examples/cpp/remoteclient/Makefile
index 50e3545..96b2ef9 100644
--- a/odk/examples/cpp/remoteclient/Makefile
+++ b/odk/examples/cpp/remoteclient/Makefile
@@ -47,10 +47,9 @@ COMP_IMPL_NAME=$(COMP_NAME).uno.$(SHAREDLIB_EXT)
COMP_IMPL=$(SHAREDLIB_OUT)/$(COMP_IMPL_NAME)
COMP_RDB_NAME = $(COMP_NAME).uno.rdb
COMP_RDB = $(OUT_BIN)/$(COMP_RDB_NAME)
-COMP_MAPFILE = $(OUT_COMP_GEN)/$(COMP_NAME).uno.map
COMP_SERVICES=$(SHAREDLIB_OUT)/remoteclientsample.rdb
-ENV_COMP_SERVICES=-env:URE_MORE_SERVICES=file://$(COMP_SERVICES)
+ENV_COMP_SERVICES=-env:URE_MORE_SERVICES=$(URLPREFIX)$(COMP_SERVICES)
OUT_COMP_INC=$(OUT_INC)/$(COMP_NAME)
OUT_COMP_GEN=$(OUT_MISC)/$(COMP_NAME)
@@ -79,15 +78,8 @@ $(OUT_COMP_SLO)/%.$(OBJ_EXT) : %.cxx $(SDKTYPEFLAG)
-$(MKDIR) $(subst /,$(PS),$(@D))
$(CC) $(CC_FLAGS) $(CC_INCLUDES) -I$(OUT_COMP_INC) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
-$(COMP_MAPFILE) : $(SLOFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- cat $(PRJ)/settings/component.uno.map > $(COMP_MAPFILE)
-ifeq "$(OS)" "MACOSX"
- nm -gx $(SLOFILES) | $(ADDSYMBOLS) >> $(COMP_MAPFILE)
-endif
-
ifeq "$(OS)" "WIN"
-$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
+$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
-$(MKDIR) $(subst /,$(PS),$(@D))
-$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN))
$(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
diff --git a/odk/settings/component.uno.def b/odk/settings/component.uno.def
index 72a4eb2..d0c2def 100644
--- a/odk/settings/component.uno.def
+++ b/odk/settings/component.uno.def
@@ -1,4 +1,3 @@
EXPORTS
component_getImplementationEnvironment
-component_writeInfo
component_getFactory
commit e23c9629e5ff9db165748891cfe7034b4381fd28
Author: Juergen Schmidt <jsc at openoffice.org>
Date: Tue Mar 1 07:41:02 2011 +0100
jsc340: i114609: adapt examples to work with the URE and use the passive registration
diff --git a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/Makefile b/odk/examples/DevelopersGuide/ProfUNO/CppBinding/Makefile
index fb235c7..1ab9cfb 100644
--- a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/Makefile
+++ b/odk/examples/DevelopersGuide/ProfUNO/CppBinding/Makefile
@@ -91,7 +91,9 @@ $(OUT_BIN)/string_samples$(EXE_EXT) : $(SAMPLE_OBJ_OUT)/string_samples.$(OBJ_EXT
ProUNOCppBindingExample : $(APP1_BINARY) $(APP2_BINARY)
@echo --------------------------------------------------------------------------------
@echo Note: For the "$(QM)$(APP1_NAME)$(QM)" example you need a running office listening
- @echo $(SQM) $(SQM)on port 2083. Before you run the example you have to start your office with
+ @echo $(SQM) $(SQM)on port 2083. The example use the defaultBootstrap_InitialComponentContext method and provides
+ @echo $(SQM) $(SQM)the additional office types via the UNO environment variable -env:URE_MORE_TYPES=...
+ @echo $(SQM) $(SQM)Before you can run this example you have to start your office in listening mode.
@echo -
@echo $(SQM) $(SQM)soffice "$(QM)-accept=socket,host=localhost,port=2083;urp;StarOffice.ServiceManager$(QM)"
@echo -----
diff --git a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/office_connect.ini b/odk/examples/DevelopersGuide/ProfUNO/CppBinding/office_connect.ini
deleted file mode 100644
index c10b97b..0000000
--- a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/office_connect.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-UNO_TYPES=$SYSBINDIR/office_connect.rdb
-UNO_SERVICES=$SYSBINDIR/office_connect.rdb
\ No newline at end of file
diff --git a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/office_connectrc b/odk/examples/DevelopersGuide/ProfUNO/CppBinding/office_connectrc
deleted file mode 100644
index ab2c6f1..0000000
--- a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/office_connectrc
+++ /dev/null
@@ -1,2 +0,0 @@
-UNO_TYPES=$SYSBINDIR/office_connect.rdb
-UNO_SERVICES=$SYSBINDIR/office_connect.rdb
diff --git a/odk/util/check.pl b/odk/util/check.pl
index 77ab1a6..162d531 100644
--- a/odk/util/check.pl
+++ b/odk/util/check.pl
@@ -347,7 +347,9 @@ if (-d "$StartDir") {
"animations",
"auth",
"awt",
+ "awt/tab",
"awt/tree",
+ "awt/grid",
"beans",
"bridge",
"bridge/oleautomation",
commit a8f4bb16d11f4fb3833c188d694ef7ad14f9f874
Author: Juergen Schmidt <jsc at openoffice.org>
Date: Mon Feb 28 14:10:02 2011 +0100
jsc340: i114609: adapt examples to work with the URE and use the passive registration
diff --git a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/Makefile b/odk/examples/DevelopersGuide/ProfUNO/CppBinding/Makefile
index 05880e3..fb235c7 100644
--- a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/Makefile
+++ b/odk/examples/DevelopersGuide/ProfUNO/CppBinding/Makefile
@@ -49,17 +49,11 @@ SAMPLE_OBJ_OUT=$(OUT_OBJ)/$(SAMPLE_NAME)
APP1_NAME=office_connect
APP1_BINARY=$(OUT_BIN)/$(APP1_NAME)$(EXE_EXT)
-APP1_RDB=$(OUT_BIN)/office_connect.rdb
-APP1_ENV_FLAG = $(SAMPLE_GEN_OUT)/cpp_$(SAMPLE_NAME)_prepare_env.flag
APP2_NAME=string_samples
APP2_BINARY=$(OUT_BIN)/$(APP2_NAME)$(EXE_EXT)
-ifeq "$(OS)" "WIN"
-INI_EXTENSION=.ini
-else
-INI_EXTENSION=rc
-endif
+ENV_OFFICE_TYPES=-env:URE_MORE_TYPES=file://$(OFFICE_TYPES)
CXXFILES = \
office_connect.cxx \
@@ -72,14 +66,6 @@ ALL : \
include $(SETTINGS)/stdtarget.mk
-$(OUT_BIN)/%$(INI_EXTENSION) : %$(INI_EXTENSION)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(COPY) $< $(subst /,$(PS),$@)
-
-$(OUT_BIN)/%.rdb :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(REGMERGE) $@ / $(URE_TYPES) $(OFFICE_TYPES)
-
$(SAMPLE_OBJ_OUT)/%.$(OBJ_EXT) : %.cxx $(SDKTYPEFLAG)
-$(MKDIR) $(subst /,$(PS),$(@D))
$(CC) $(CC_FLAGS) $(CC_INCLUDES) -I$(SAMPLE_INC_OUT) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
@@ -98,23 +84,10 @@ ifeq "$(OS)" "MACOSX"
endif
endif
-$(OUT_BIN)/office_connect$(EXE_EXT) : $(APP1_ENV_FLAG) $(OUT_BIN)/office_connect$(INI_EXTENSION) $(SAMPLE_OBJ_OUT)/office_connect.$(OBJ_EXT)
+$(OUT_BIN)/office_connect$(EXE_EXT) : $(SAMPLE_OBJ_OUT)/office_connect.$(OBJ_EXT)
$(OUT_BIN)/string_samples$(EXE_EXT) : $(SAMPLE_OBJ_OUT)/string_samples.$(OBJ_EXT)
-$(APP1_ENV_FLAG) : $(APP1_RDB)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- @echo --------------------------------------------------------------------------------
- @echo Register necessary runtime components in $(APP1_RDB)
- @echo --------------------------------------------------------------------------------
- $(REGCOMP) -register -r $(APP1_RDB) -c connector.uno.$(SHAREDLIB_EXT)
- $(REGCOMP) -register -r $(APP1_RDB) -c remotebridge.uno.$(SHAREDLIB_EXT)
- $(REGCOMP) -register -r $(APP1_RDB) -c bridgefac.uno.$(SHAREDLIB_EXT)
- $(REGCOMP) -register -r $(APP1_RDB) -c uuresolver.uno.$(SHAREDLIB_EXT)
- @echo bla > $@
-
-
ProUNOCppBindingExample : $(APP1_BINARY) $(APP2_BINARY)
@echo --------------------------------------------------------------------------------
@echo Note: For the "$(QM)$(APP1_NAME)$(QM)" example you need a running office listening
@@ -131,6 +104,9 @@ ProUNOCppBindingExample : $(APP1_BINARY) $(APP2_BINARY)
%.run: $(OUT_BIN)/%$(EXE_EXT)
cd $(subst /,$(PS),$(OUT_BIN)) && $(basename $@)
+$(API1_NAME).run: $(API1_BINARY)
+ cd $(subst /,$(PS),$(OUT_BIN)) && $(basename $@) $(ENV_OFFICE_TYPES)
+
.PHONY: clean
clean :
-$(DELRECURSIVE) $(subst /,$(PS),$(SAMPLE_INC_OUT))
diff --git a/odk/examples/cpp/DocumentLoader/DocumentLoader.cxx b/odk/examples/cpp/DocumentLoader/DocumentLoader.cxx
index 211f202..0ef6c11 100644
--- a/odk/examples/cpp/DocumentLoader/DocumentLoader.cxx
+++ b/odk/examples/cpp/DocumentLoader/DocumentLoader.cxx
@@ -48,6 +48,7 @@
#include <osl/file.hxx>
#include <osl/process.h>
+#include <rtl/process.h>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/bridge/XUnoUrlResolver.hpp>
@@ -71,36 +72,22 @@ using namespace com::sun::star::registry;
SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
{
OUString sConnectionString(RTL_CONSTASCII_USTRINGPARAM("uno:socket,host=localhost,port=2083;urp;StarOffice.ServiceManager"));
- if (argc < 2)
+
+ sal_Int32 nCount = (sal_Int32)rtl_getAppCommandArgCount();
+
+ if (nCount < 1)
{
- printf("using: DocumentLoader <file_url> [<uno_connection_url>]\n\n"
- "example: DocumentLoader \"file:///e:/temp/test.odt\" \"uno:socket,host=localhost,port=2083;urp;StarOffice.ServiceManager\"\n");
+ printf("using: DocumentLoader -env:URE_MORE_TYPES=<office_types_rdb_url> <file_url> [<uno_connection_url>]\n\n"
+ "example: DocumentLoader -env:URE_MORE_TYPES=\"file:///.../basis-link/program/offapi.rdb\" \"file:///e:/temp/test.odt\" \"uno:socket,host=localhost,port=2083;urp;StarOffice.ServiceManager\"\n");
exit(1);
}
- if (argc == 3)
+ if (nCount == 2)
{
- sConnectionString = OUString::createFromAscii(argv[2]);
+ rtl_getAppCommandArg(1, &sConnectionString.pData);
}
-
- // Creates a simple registry service instance.
- Reference< XSimpleRegistry > xSimpleRegistry(
- ::cppu::createSimpleRegistry() );
-
- // Connects the registry to a persistent data source represented by an URL.
- xSimpleRegistry->open( OUString( RTL_CONSTASCII_USTRINGPARAM(
- "DocumentLoader.rdb") ), sal_True, sal_False );
-
- /* Bootstraps an initial component context with service manager upon a given
- registry. This includes insertion of initial services:
- - (registry) service manager, shared lib loader,
- - simple registry, nested registry,
- - implementation registration
- - registry typedescription provider, typedescription manager (also
- installs it into cppu core)
- */
- Reference< XComponentContext > xComponentContext(
- ::cppu::bootstrap_InitialComponentContext( xSimpleRegistry ) );
-
+
+ Reference< XComponentContext > xComponentContext(::cppu::defaultBootstrap_InitialComponentContext());
+
/* Gets the service manager instance to be used (or null). This method has
been added for convenience, because the service manager is a often used
object.
@@ -131,7 +118,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US).getStr());
exit(1);
}
-
+
// gets the server component context as property of the office component factory
Reference< XPropertySet > xPropSet( xInterface, UNO_QUERY );
xPropSet->getPropertyValue( OUString::createFromAscii("DefaultContext") ) >>= xComponentContext;
@@ -139,7 +126,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
// gets the service manager from the office
Reference< XMultiComponentFactory > xMultiComponentFactoryServer(
xComponentContext->getServiceManager() );
-
+
/* Creates an instance of a component which supports the services specified
by the factory. Important: using the office component context.
*/
@@ -151,9 +138,11 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
/* Loads a component specified by an URL into the specified new or existing
frame.
*/
- OUString sAbsoluteDocUrl, sWorkingDir, sDocPathUrl;
+ OUString sAbsoluteDocUrl, sWorkingDir, sDocPathUrl, sArgDocUrl;
+ rtl_getAppCommandArg(0, &sArgDocUrl.pData);
+
osl_getProcessWorkingDir(&sWorkingDir.pData);
- osl::FileBase::getFileURLFromSystemPath( OUString::createFromAscii(argv[1]), sDocPathUrl);
+ osl::FileBase::getFileURLFromSystemPath( sArgDocUrl, sDocPathUrl);
osl::FileBase::getAbsoluteFileURL( sWorkingDir, sDocPathUrl, sAbsoluteDocUrl);
Reference< XComponent > xComponent = xComponentLoader->loadComponentFromURL(
diff --git a/odk/examples/cpp/DocumentLoader/Makefile b/odk/examples/cpp/DocumentLoader/Makefile
index 91e6f49..3e7b904 100644
--- a/odk/examples/cpp/DocumentLoader/Makefile
+++ b/odk/examples/cpp/DocumentLoader/Makefile
@@ -43,19 +43,17 @@ include $(SETTINGS)/dk.mk
# Define non-platform/compiler specific settings
COMPONENT_NAME=DocumentLoader
-COMPONENT_RDB_NAME = $(COMPONENT_NAME).rdb
-COMPONENT_RDB = $(OUT_BIN)/$(COMPONENT_RDB_NAME)
OUT_COMP_INC = $(OUT_INC)/$(COMPONENT_NAME)
OUT_COMP_GEN = $(OUT_MISC)/$(COMPONENT_NAME)
OUT_COMP_OBJ=$(OUT_OBJ)/$(COMPONENT_NAME)
-COMPOENNT_ENV_FLAG = $(OUT_MISC)/cpp_$(COMPONENT_NAME)_prepare_env.flag
-
CXXFILES = DocumentLoader.cxx
OBJFILES = $(patsubst %.cxx,$(OUT_SLO_COMP)/%.$(OBJ_EXT),$(CXXFILES))
+ENV_OFFICE_TYPES=-env:URE_MORE_TYPES=file://$(OFFICE_TYPES)
+
# Targets
.PHONY: ALL
ALL : \
@@ -63,12 +61,6 @@ ALL : \
include $(SETTINGS)/stdtarget.mk
-# This example type library will be extended by the URE and office types
-$(OUT_BIN)/%.rdb :
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- $(REGMERGE) $@ / $(URE_TYPES) $(OFFICE_TYPES)
-
$(OUT_COMP_OBJ)/%.$(OBJ_EXT) : %.cxx $(SDKTYPEFLAG)
-$(MKDIR) $(subst /,$(PS),$(@D))
$(CC) $(CC_FLAGS) $(CC_INCLUDES) -I$(OUT_COMP_INC) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
@@ -87,41 +79,30 @@ ifeq "$(OS)" "MACOSX"
endif
endif
-$(COMPOENNT_ENV_FLAG) : $(COMPONENT_RDB)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- @echo --------------------------------------------------------------------------------
- @echo Register necessary runtime components in the DocumentLoader.rdb
- @echo --------------------------------------------------------------------------------
- $(REGCOMP) -register -r $(COMPONENT_RDB) -c connector.uno.$(SHAREDLIB_EXT)
- $(REGCOMP) -register -r $(COMPONENT_RDB) -c remotebridge.uno.$(SHAREDLIB_EXT)
- $(REGCOMP) -register -r $(COMPONENT_RDB) -c bridgefac.uno.$(SHAREDLIB_EXT)
- $(REGCOMP) -register -r $(COMPONENT_RDB) -c uuresolver.uno.$(SHAREDLIB_EXT)
- @echo bla > $@
-
-CppDocumentLoaderExample : $(OUT_BIN)/DocumentLoader$(EXE_EXT) $(COMPOENNT_ENV_FLAG)
+CppDocumentLoaderExample : $(OUT_BIN)/DocumentLoader$(EXE_EXT)
@echo --------------------------------------------------------------------------------
@echo The example loads the "$(QM)test.odt$(QM)" document in the DocumentLoader example directory.
- @echo I you want to load your own document, please use: DocumentLoader "$(QM)filename$(QM)" [connection_url]
+ @echo If you want to load your own document, please use:
+ @echo $(SQM) $(SQM)DocumentLoader -env:URE_MORE_TYPES="$(QM)<fileurl_office_types_rdb>$(QM)" "$(QM)filename$(QM)" [connection_url]
@echo -
@echo Use the following command to execute the example!
@echo -
@echo $(MAKE) DocumentLoader.run
@echo -
@echo NOTE: This example does not use the new UNO bootstrap mechanism, it uses still a socket
- @echo $(SQM) $(SQM)connection. Before you can run this example you have to start your office in listening mode.
+ @echo $(SQM) $(SQM)connection. The example use the defaultBootstrap_InitialComponentContext method and provides
+ @echo $(SQM) $(SQM)the additional office types via the UNO environment variable -env:URE_MORE_TYPES=...
+ @echo $(SQM) $(SQM)Before you can run this example you have to start your office in listening mode.
@echo -
@echo $(SQM) $(SQM)soffice "$(QM)-accept=socket,host=localhost,port=2083;urp;StarOffice.ServiceManager$(QM)"
@echo --------------------------------------------------------------------------------
%.run: $(OUT_BIN)/DocumentLoader$(EXE_EXT)
- cd $(subst /,$(PS),$(OUT_BIN)) && $(basename $@) $(subst \\,/,$(subst /,$(PS),"$(OO_SDK_HOME)/examples/cpp/DocumentLoader/test.odt"))
+ cd $(subst /,$(PS),$(OUT_BIN)) && $(basename $@) $(ENV_OFFICE_TYPES) $(subst \\,/,$(subst /,$(PS),"$(OO_SDK_HOME)/examples/cpp/DocumentLoader/test.odt"))
.PHONY: clean
clean :
-$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_INC))
-$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_GEN))
-$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_OBJ))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMPOENNT_ENV_FLAG)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMPONENT_RDB)))
-$(DEL) $(subst \\,\,$(subst /,$(PS),$(OUT_BIN)/DocumentLoader*))
diff --git a/odk/examples/cpp/counter/Makefile b/odk/examples/cpp/counter/Makefile
index 5e7f620..84062dc 100644
--- a/odk/examples/cpp/counter/Makefile
+++ b/odk/examples/cpp/counter/Makefile
@@ -43,7 +43,7 @@ include $(SETTINGS)/dk.mk
# Define non-platform/compiler specific settings
COMP_NAME=counter
-COMP_IMPL_NAME=$(COMP_NAME).uno.$(SHAREDLIB_EXT)
+COMP_IMPL_NAME=$(COMP_NAME).uno.$(SHAREDLIB_EXT)
COMP_IMPL=$(SHAREDLIB_OUT)/$(COMP_IMPL_NAME)
COMP_RDB_NAME = $(COMP_NAME).uno.rdb
COMP_RDB = $(OUT_BIN)/$(COMP_RDB_NAME)
@@ -52,6 +52,10 @@ OUT_COMP_INC = $(OUT_INC)/$(COMP_NAME)
OUT_COMP_GEN = $(OUT_MISC)/$(COMP_NAME)
OUT_COMP_OBJ = $(OUT_OBJ)/$(COMP_NAME)
OUT_COMP_SLO = $(OUT_SLO)/$(COMP_NAME)
+COMP_SERVICES=$(OUT_BIN)/counterservices.rdb
+
+ENV_EXAMPLE_TYPES=-env:URE_MORE_TYPES=file://$(COMP_RDB)
+ENV_COMP_SERVICES=-env:URE_MORE_SERVICES=file://$(COMP_SERVICES)
COMP_TYPEFLAG = $(OUT_MISC)/cpp_$(COMP_NAME)_types.flag
@@ -84,12 +88,12 @@ $(OUT_BIN)/%.rdb : $(GENURDFILES)
-$(MKDIR) $(subst /,$(PS),$(@D))
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
$(REGMERGE) $@ /UCR $(GENURDFILES)
- $(REGMERGE) $@ / $(URE_TYPES)
+# $(REGMERGE) $@ / $(URE_TYPES)
$(COMP_TYPEFLAG) : $(COMP_RDB) $(SDKTYPEFLAG)
-$(MKDIR) $(subst /,$(PS),$(@D))
-$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_TYPEFLAG)))
- $(CPPUMAKER) -Gc -BUCR -O$(OUT_COMP_INC) $(TYPESLIST) $(COMP_RDB)
+ $(CPPUMAKER) -Gc -BUCR -O$(OUT_COMP_INC) $(TYPESLIST) $(COMP_RDB) -X $(URE_TYPES)
echo flagged > $@
$(OUT_COMP_OBJ)/%.$(OBJ_EXT) : %.cxx $(COMP_TYPEFLAG)
@@ -110,7 +114,7 @@ ifeq "$(OS)" "MACOSX"
endif
ifeq "$(OS)" "WIN"
-$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
+$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
-$(MKDIR) $(subst /,$(PS),$(@D))
-$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN))
$(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
@@ -118,7 +122,8 @@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
$(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib
$(LINK_MANIFEST)
else
-$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
+#$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
+$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
-$(MKDIR) $(subst /,$(PS),$(@D))
$(LINK) $(COMP_LINK_FLAGS) $(LINK_LIBS) -o $@ $(SLOFILES) \
$(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
@@ -138,16 +143,33 @@ else
$(CPPUHELPERLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB) $(STLPORTLIB) $(STDC++LIB)
endif
+$(COMP_SERVICES) :
+ -$(MKDIR) $(subst /,$(PS),$(@D))
+ @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
+ @echo $(OSEP)components xmlns="$(QM)http://openoffice.org/2010/uno-components$(QM)"$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)component loader="$(QM)com.sun.star.loader.SharedLibrary$(QM)" uri="$(QM)$(COMP_IMPL_NAME)$(QM)"$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)implementation name="$(QM)com.sun.star.comp.example.cpp.Counter$(QM)"$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)service name="$(QM)foo.Counter$(QM)"/$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)/implementation$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)/component$(CSEP) >> $@
+ @echo $(OSEP)/components$(CSEP) >> $@
+
-CppCounterExample : $(OUT_BIN)/countermain$(EXE_EXT) $(COMP_IMPL)
+CppCounterExample : $(OUT_BIN)/countermain$(EXE_EXT) $(COMP_IMPL) $(COMP_SERVICES)
@echo --------------------------------------------------------------------------------
@echo Please use the following command to execute the example!
@echo -
@echo $(MAKE) countermain.run
+ @echo -
+ @echo NOTE: The example makes use of the URE and use the defaultBootstrap_InitialComponentContext method.
+ @echo $(SQM) $(SQM)The additional example IDL types are provided via the UNO environment variable -env:URE_MORE_TYPES=...
+ @echo $(SQM) $(SQM)and the example component is made available via -env:URE_MORE_SERVICES=...
+ @echo $(SQM) $(SQM)Please check the generated $(QM)$(COMP_SERVICES)$(QM) to see how you can specify your own components in such an environment
+ @echo $(SQM) $(SQM)and how to use the passive UNO registration.
@echo --------------------------------------------------------------------------------
%.run: $(OUT_BIN)/countermain$(EXE_EXT) $(COMP_IMPL)
- cd $(subst /,$(PS),$(OUT_BIN)) && $(basename $@)
+ cd $(subst /,$(PS),$(OUT_BIN)) && $(basename $@) $(ENV_EXAMPLE_TYPES) $(ENV_COMP_SERVICES)
.PHONY: clean
clean :
@@ -159,3 +181,4 @@ clean :
-$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_RDB)))
-$(DEL) $(subst \\,\,$(subst /,$(PS),$(SHAREDLIB_OUT)/$(COMP_NAME).*))
-$(DEL) $(subst \\,\,$(subst /,$(PS),$(OUT_BIN)/countermain*))
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_SERVICES)))
diff --git a/odk/examples/cpp/counter/counter.cxx b/odk/examples/cpp/counter/counter.cxx
index db903cf..f13ee41 100644
--- a/odk/examples/cpp/counter/counter.cxx
+++ b/odk/examples/cpp/counter/counter.cxx
@@ -167,7 +167,7 @@ Reference< XInterface > SAL_CALL MyCounterImpl_create(
/**
* Gives the environment this component belongs to.
*/
-extern "C" void SAL_CALL component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv)
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv)
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
@@ -179,33 +179,33 @@ extern "C" void SAL_CALL component_getImplementationEnvironment(const sal_Char *
* @param pServiceManager the service manager
* @param pRegistryKey the registry key
*/
-extern "C" sal_Bool SAL_CALL component_writeInfo(void * pServiceManager, void * pRegistryKey)
-{
- sal_Bool result = sal_False;
-
- if (pRegistryKey)
- {
- try
- {
- Reference< XRegistryKey > xNewKey(
- reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
- OUString( RTL_CONSTASCII_USTRINGPARAM("/" IMPLNAME "/UNO/SERVICES") ) ) );
+// extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(void * pServiceManager, void * pRegistryKey)
+// {
+// sal_Bool result = sal_False;
+
+// if (pRegistryKey)
+// {
+// try
+// {
+// Reference< XRegistryKey > xNewKey(
+// reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
+// OUString( RTL_CONSTASCII_USTRINGPARAM("/" IMPLNAME "/UNO/SERVICES") ) ) );
- const Sequence< OUString > & rSNL =
- MyCounterImpl::getSupportedServiceNames_Static();
- const OUString * pArray = rSNL.getConstArray();
- for ( sal_Int32 nPos = rSNL.getLength(); nPos--; )
- xNewKey->createKey( pArray[nPos] );
+// const Sequence< OUString > & rSNL =
+// MyCounterImpl::getSupportedServiceNames_Static();
+// const OUString * pArray = rSNL.getConstArray();
+// for ( sal_Int32 nPos = rSNL.getLength(); nPos--; )
+// xNewKey->createKey( pArray[nPos] );
- return sal_True;
- }
- catch (InvalidRegistryException &)
- {
- // we should not ignore exceptions
- }
- }
- return result;
-}
+// return sal_True;
+// }
+// catch (InvalidRegistryException &)
+// {
+// // we should not ignore exceptions
+// }
+// }
+// return result;
+// }
/**
* This function is called to get service factories for an implementation.
@@ -215,7 +215,7 @@ extern "C" sal_Bool SAL_CALL component_writeInfo(void * pServiceManager, void *
* @param pRegistryKey the registry key for this component, need for persistent data
* @return a component factory
*/
-extern "C" void * SAL_CALL component_getFactory(const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey)
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey)
{
void * pRet = 0;
diff --git a/odk/examples/cpp/counter/countermain.cxx b/odk/examples/cpp/counter/countermain.cxx
index 08a68b1..fce1715 100644
--- a/odk/examples/cpp/counter/countermain.cxx
+++ b/odk/examples/cpp/counter/countermain.cxx
@@ -68,55 +68,37 @@ using namespace ::rtl;
//=======================================================================
SAL_IMPLEMENT_MAIN()
{
- Reference< XSimpleRegistry > xReg = createSimpleRegistry();
- OSL_ENSURE( xReg.is(), "### cannot get service instance of \"com.sun.star.regiystry.SimpleRegistry\"!" );
-
- xReg->open(OUString::createFromAscii("counter.uno.rdb"), sal_False, sal_False);
- OSL_ENSURE( xReg->isValid(), "### cannot open test registry \"counter.uno.rdb\"!" );
-
- Reference< XComponentContext > xContext = bootstrap_InitialComponentContext(xReg);
- OSL_ENSURE( xContext.is(), "### cannot creage intial component context!" );
-
- Reference< XMultiComponentFactory > xMgr = xContext->getServiceManager();
- OSL_ENSURE( xMgr.is(), "### cannot get initial service manager!" );
-
- // register my counter component
- Reference< XImplementationRegistration > xImplReg(
- xMgr->createInstanceWithContext(OUString::createFromAscii("com.sun.star.registry.ImplementationRegistration"), xContext), UNO_QUERY);
- OSL_ENSURE( xImplReg.is(), "### cannot get service instance of \"com.sun.star.registry.ImplementationRegistration\"!" );
-
- if (xImplReg.is())
- {
- xImplReg->registerImplementation(
- OUString::createFromAscii("com.sun.star.loader.SharedLibrary"), // loader for component
-#ifdef UNX
-#ifdef MACOSX
- OUString::createFromAscii("counter.uno.dylib"), // component location
-#else
- OUString::createFromAscii("counter.uno.so"), // component location
-#endif
-#else
- OUString::createFromAscii("counter.uno.dll"), // component location
-#endif
- Reference< XSimpleRegistry >() // registry omitted,
- // defaulting to service manager registry used
- );
-
- // get a counter instance
- Reference< XInterface > xx ;
- xx = xMgr->createInstanceWithContext(OUString::createFromAscii("foo.Counter"), xContext);
+ try {
+
+ Reference< XComponentContext > xContext(::cppu::defaultBootstrap_InitialComponentContext());
+ OSL_ENSURE( xContext.is(), "### bootstrap failed!\n" );
+
+ Reference< XMultiComponentFactory > xMgr = xContext->getServiceManager();
+ OSL_ENSURE( xMgr.is(), "### cannot get initial service manager!" );
+
+ Reference< XInterface > xx = xMgr->createInstanceWithContext(
+ OUString::createFromAscii("foo.Counter"), xContext);
+
+ OSL_ENSURE( xx.is(), "### cannot get service instance of \"foo.Counter\"!" );
+
Reference< XCountable > xCount( xx, UNO_QUERY );
- OSL_ENSURE( xCount.is(), "### cannot get service instance of \"foo.Counter\"!" );
+ OSL_ENSURE( xCount.is(), "### cannot query XCountable interface of service instance \"foo.Counter\"!" );
if (xCount.is())
{
- xCount->setCount( 42 );
- fprintf( stdout , "%d," , xCount->getCount() );
- fprintf( stdout , "%d," , xCount->increment() );
- fprintf( stdout , "%d\n" , xCount->decrement() );
+ xCount->setCount( 42 );
+ fprintf( stdout , "%d," , (int)xCount->getCount() );
+ fprintf( stdout , "%d," , (int)xCount->increment() );
+ fprintf( stdout , "%d\n" , (int)xCount->decrement() );
}
+
+ Reference< XComponent >::query( xContext )->dispose();
+
+ } catch( Exception& e) {
+ printf("Error: caught exception:\n %s\n",
+ OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US).getStr());
+ exit(1);
}
- Reference< XComponent >::query( xContext )->dispose();
return 0;
}
diff --git a/odk/examples/cpp/remoteclient/Makefile b/odk/examples/cpp/remoteclient/Makefile
index 40d51de..50e3545 100644
--- a/odk/examples/cpp/remoteclient/Makefile
+++ b/odk/examples/cpp/remoteclient/Makefile
@@ -43,17 +43,19 @@ include $(SETTINGS)/dk.mk
# Define non-platform/compiler specific settings
COMP_NAME=remoteclientsample
-COMP_IMPL_NAME=$(COMP_NAME).uno.$(SHAREDLIB_EXT)
+COMP_IMPL_NAME=$(COMP_NAME).uno.$(SHAREDLIB_EXT)
COMP_IMPL=$(SHAREDLIB_OUT)/$(COMP_IMPL_NAME)
COMP_RDB_NAME = $(COMP_NAME).uno.rdb
COMP_RDB = $(OUT_BIN)/$(COMP_RDB_NAME)
COMP_MAPFILE = $(OUT_COMP_GEN)/$(COMP_NAME).uno.map
+COMP_SERVICES=$(SHAREDLIB_OUT)/remoteclientsample.rdb
+
+ENV_COMP_SERVICES=-env:URE_MORE_SERVICES=file://$(COMP_SERVICES)
OUT_COMP_INC=$(OUT_INC)/$(COMP_NAME)
OUT_COMP_GEN=$(OUT_MISC)/$(COMP_NAME)
OUT_COMP_SLO=$(OUT_SLO)/$(COMP_NAME)
-COMP_ENV_FLAG = $(OUT_MISC)/cpp_$(COMP_NAME)_prepare_env.flag
COMP_TYPEFLAG = $(OUT_MISC)/cpp_$(COMP_NAME)_types.flag
CXXFILES = remoteclient.cxx
@@ -85,7 +87,7 @@ ifeq "$(OS)" "MACOSX"
endif
ifeq "$(OS)" "WIN"
-$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
+$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
-$(MKDIR) $(subst /,$(PS),$(@D))
-$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN))
$(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \
@@ -93,7 +95,7 @@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
$(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib
$(LINK_MANIFEST)
else
-$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE)
+$(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES)
-$(MKDIR) $(subst /,$(PS),$(@D))
$(LINK) $(COMP_LINK_FLAGS) $(LINK_LIBS) -o $@ $(SLOFILES) \
$(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
@@ -102,40 +104,41 @@ ifeq "$(OS)" "MACOSX"
endif
endif
-$(COMP_ENV_FLAG) : $(COMP_RDB) $(OUT_BIN)/remoteserver.rdb
+$(COMP_SERVICES) :
-$(MKDIR) $(subst /,$(PS),$(@D))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- @echo --------------------------------------------------------------------------------
- @echo Register necessary runtime components in remoteserver/remoteclientsample rdb
- @echo --------------------------------------------------------------------------------
- $(REGCOMP) -register -r $(OUT_BIN)/remoteserver.rdb -c connector.uno.$(SHAREDLIB_EXT)
- $(REGCOMP) -register -r $(OUT_BIN)/remoteserver.rdb -c remotebridge.uno.$(SHAREDLIB_EXT)
- $(REGCOMP) -register -r $(OUT_BIN)/remoteserver.rdb -c bridgefac.uno.$(SHAREDLIB_EXT)
- $(REGCOMP) -register -r $(OUT_BIN)/remoteserver.rdb -c uuresolver.uno.$(SHAREDLIB_EXT)
- $(REGCOMP) -register -r $(OUT_BIN)/remoteserver.rdb -c streams.uno.$(SHAREDLIB_EXT)
- $(REGCOMP) -register -r $(COMP_RDB) -c connector.uno.$(SHAREDLIB_EXT)
- $(REGCOMP) -register -r $(COMP_RDB) -c remotebridge.uno.$(SHAREDLIB_EXT)
- $(REGCOMP) -register -r $(COMP_RDB) -c bridgefac.uno.$(SHAREDLIB_EXT)
- $(REGCOMP) -register -r $(COMP_RDB) -c uuresolver.uno.$(SHAREDLIB_EXT)
- @echo bla > $@
-
-CppClientExample : $(COMP_IMPL) $(COMP_ENV_FLAG)
+ @echo $(OSEP)?xml version="$(QM)1.0$(QM)" encoding="$(QM)UTF-8$(QM)"?$(CSEP) > $@
+ @echo $(OSEP)components xmlns="$(QM)http://openoffice.org/2010/uno-components$(QM)"$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)component loader="$(QM)com.sun.star.loader.SharedLibrary$(QM)" uri="$(QM)$(COMP_IMPL_NAME)$(QM)"$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)implementation name="$(QM)com.sun.star.comp.product.example.RemoteClientSample$(QM)"$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)service name="$(QM)com.sun.star.bridge.example.RemoteClientSample$(QM)"/$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)/implementation$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)/component$(CSEP) >> $@
+ @echo $(OSEP)/components$(CSEP) >> $@
+
+
+#CppClientExample : $(COMP_IMPL) $(COMP_ENV_FLAG)
+CppClientExample : $(COMP_IMPL) $(COMP_SERVICES)
@echo --------------------------------------------------------------------------------
@echo The remoteclient C++ component can be used by using the uno binary. Use the
@echo the follwong command to start the example. The run target starts a remote
@echo server and connect with the client to this server.
@echo -
@echo $(MAKE) remoteclient.run
+ @echo -
+ @echo NOTE: The example uses the $(QM)uno$(QM) tool to prepare a working UNO environment.
+ @echo $(SQM) $(SQM)The example component is made available via -env:URE_MORE_SERVICES=...
+ @echo $(SQM) $(SQM)Please check the generated $(QM)$(COMP_SERVICES)$(QM) to see how you can specify your own components in such an environment
+ @echo $(SQM) $(SQM)and how to use the passive UNO registration.
@echo --------------------------------------------------------------------------------
-%.run: $(COMP_IMPL) $(COMP_ENV_FLAG)
+%.run: $(COMP_IMPL)
@echo Start the remote server process ...
@echo -
ifeq "$(OS)" "WIN"
- start uno -rw $(OUT_BIN)/remoteserver.rdb --singleaccept -s com.sun.star.io.Pipe \
+ start uno $(ENV_COMP_SERVICES) --singleaccept -s com.sun.star.io.Pipe \
-u "uno:socket,host=localhost,port=2083;urp;MyPipe"
else
- uno -rw $(OUT_BIN)/remoteserver.rdb --singleaccept -s com.sun.star.io.Pipe \
+ uno $(ENV_COMP_SERVICES) --singleaccept -s com.sun.star.io.Pipe \
-u "uno:socket,host=localhost,port=2083;urp;MyPipe" &
@echo waiting on the server process ...
sleep 5
@@ -145,8 +148,8 @@ endif
@echo -
@echo Start remote client process ...
@echo -
- uno -l $(COMP_IMPL) -c com.sun.star.comp.product.example.RemoteClientSample \
- -rw $(COMP_RDB) -- "uno:socket,host=localhost,port=2083;urp;MyPipe"
+ uno $(ENV_COMP_SERVICES) -s com.sun.star.bridge.example.RemoteClientSample \
+ -- "uno:socket,host=localhost,port=2083;urp;MyPipe"
@echo -
.PHONY: clean
@@ -154,7 +157,7 @@ clean :
-$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_INC))
-$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_GEN))
-$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_SLO))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_ENV_FLAG)))
-$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_TYPEFLAG)))
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_SERVICES)))
-$(DEL) $(subst \\,\,$(subst /,$(PS),$(SHAREDLIB_OUT)/$(COMP_NAME).*))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(OUT_BIN)/remoteserver.rdb))
+# -$(DEL) $(subst \\,\,$(subst /,$(PS),$(OUT_BIN)/remoteserver.rdb))
diff --git a/odk/examples/cpp/remoteclient/remoteclient.cxx b/odk/examples/cpp/remoteclient/remoteclient.cxx
index be2dd90..867c109 100644
--- a/odk/examples/cpp/remoteclient/remoteclient.cxx
+++ b/odk/examples/cpp/remoteclient/remoteclient.cxx
@@ -227,39 +227,41 @@ using namespace remotebridges_officeclient;
extern "C"
{
//==================================================================================================
-void SAL_CALL component_getImplementationEnvironment(
+SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
+
//==================================================================================================
-sal_Bool SAL_CALL component_writeInfo(
- void * pServiceManager, void * pRegistryKey )
-{
- if (pRegistryKey)
- {
- try
- {
- Reference< XRegistryKey > xNewKey(
- reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
- OUString::createFromAscii( "/" IMPLEMENTATION_NAME "/UNO/SERVICES" ) ) );
+// SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
+// void * pServiceManager, void * pRegistryKey )
+// {
+// if (pRegistryKey)
+// {
+// try
+// {
+// Reference< XRegistryKey > xNewKey(
+// reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
+// OUString::createFromAscii( "/" IMPLEMENTATION_NAME "/UNO/SERVICES" ) ) );
- const Sequence< OUString > & rSNL = getSupportedServiceNames();
- const OUString * pArray = rSNL.getConstArray();
- for ( sal_Int32 nPos = rSNL.getLength(); nPos--; )
- xNewKey->createKey( pArray[nPos] );
+// const Sequence< OUString > & rSNL = getSupportedServiceNames();
+// const OUString * pArray = rSNL.getConstArray();
+// for ( sal_Int32 nPos = rSNL.getLength(); nPos--; )
+// xNewKey->createKey( pArray[nPos] );
- return sal_True;
- }
- catch (InvalidRegistryException &)
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
- }
- }
- return sal_False;
-}
+// return sal_True;
+// }
+// catch (InvalidRegistryException &)
+// {
+// OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
+// }
+// }
+// return sal_False;
+// }
+
//==================================================================================================
-void * SAL_CALL component_getFactory(
+SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
void * pRet = 0;
commit 8a3de9d1aa80f80c514554b8b3c8cf19995ee850
Merge: 5c0f626... af67f29...
Author: Juergen Schmidt <jsc at openoffice.org>
Date: Thu Feb 24 13:34:07 2011 +0100
jsc340: merge to dev300m101
commit 5c0f626aba141f7dcd6f7ef568182753c27f686f
Author: Juergen Schmidt <jsc at openoffice.org>
Date: Wed Feb 23 14:27:55 2011 +0100
jsc340: fix problem with showing Java awt UI from the AppKit thread
diff --git a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java b/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java
index 4a4733c..790a52d 100644
--- a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java
+++ b/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.java
@@ -312,7 +312,22 @@ public class AsyncJob extends WeakBase implements XServiceInfo, XAsyncJob
// Because we need a parent anytime.
// And showing e.g. a java dialog can make some trouble
// inside office ... but we have no chance here.
- javax.swing.JOptionPane.showMessageDialog(null, sMessage, sTitle, javax.swing.JOptionPane.INFORMATION_MESSAGE);
+ final java.lang.String sFinalTitle = sTitle;
+ final java.lang.String sFinalMessage = sMessage;
+
+ // On Mac OS X, AWT/Swing must not be accessed from the AppKit thread, so call
+ // SwingUtilities.invokeLater always on a fresh thread to avoid that problem
+ // (also, the current thread must not wait for that fresh thread to terminate,
+ // as that would cause a deadlock if this thread is the AppKit thread):
+ final Runnable doRun = new Runnable() {
+ public void run() {
+ javax.swing.JOptionPane.showMessageDialog(null, sFinalMessage, sFinalTitle, javax.swing.JOptionPane.INFORMATION_MESSAGE);
+ }
+ };
+
+ new Thread( doRun ) {
+ public void run() { javax.swing.SwingUtilities.invokeLater(doRun); }
+ }.start();
}
//___________________________________________
commit 56a841d19275c156599ae1d1e4ebd55bf68c8bfa
Author: Juergen Schmidt <jsc at openoffice.org>
Date: Wed Feb 23 13:37:36 2011 +0100
jsc340: i114609: support passive component registration
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/Makefile b/odk/examples/DevelopersGuide/Components/Thumbs/Makefile
index 6dffc4c..7070493 100644
--- a/odk/examples/DevelopersGuide/Components/Thumbs/Makefile
+++ b/odk/examples/DevelopersGuide/Components/Thumbs/Makefile
@@ -59,7 +59,7 @@ $(SUBDIRS) :
org/openoffice/comp/test : org/openoffice/test
-ComponentsThumbsExample : $(COMPONENT_PACKAGE)
+ComponentsThumbsExample : $(COMP_PACKAGE)
@echo --------------------------------------------------------------------------------
@echo Please use one of the following command to execute the example!
@echo -
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.components b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.components
new file mode 100644
index 0000000..11d958f
--- /dev/null
+++ b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.components
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://openoffice.org/2010/uno-components">
+ <component loader="com.sun.star.loader.Java2" uri="ImageShrink.uno.jar">
+ <implementation name="org.openoffice.comp.test.ImageShrink">
+ <service name="org.openoffice.test.ImageShrink"/>
+ </implementation>
+ </component>
+</components>
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.java b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.java
index 8a5f13a..06ebde7 100644
--- a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.java
+++ b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.java
@@ -93,12 +93,17 @@ public class ImageShrink extends WeakBase
return xSingleServiceFactory;
}
- public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
- //System.out.println(ImageShrink.class.getName());
- return FactoryHelper.writeRegistryServiceInfo( ImageShrink.class.getName(),
- __serviceName,
- regKey);
- }
+
+ // This method not longer necessary since OOo 3.4 where the component registration
+ // was changed to passive component registration. For more details see
+ // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
+
+// public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
+// //System.out.println(ImageShrink.class.getName());
+// return FactoryHelper.writeRegistryServiceInfo( ImageShrink.class.getName(),
+// __serviceName,
+// regKey);
+// }
// XFilter implementation (a sub-interface of XImageShrinkFilter)
public void cancel() {
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Makefile b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Makefile
index 2b990e2..6894e1d 100644
--- a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Makefile
+++ b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Makefile
@@ -74,7 +74,7 @@ $(OUT_COMP_CLASS)/%.mf :
@echo Application-Class: $(subst /,.,$(PACKAGE)).$*>> $@
# rule for component jar file
-$(COMPONENT_JAR) : $(COMPONENT_MANIFESTFILE) $(OUT_COMP_CLASS)/$(PACKAGE)/$(COMPONENT_NAME).class
+$(COMP_JAR) : $(COMP_MANIFESTFILE) $(OUT_COMP_CLASS)/$(PACKAGE)/$(COMP_NAME).class
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
$(SDK_JAR) cvfm $@ $< -C $(OUT_COMP_CLASS) $(PACKAGE)/$(basename $(basename $(@F))).class $(patsubst %.class,-C $(OUT_COMP_CLASS) %.class,$(GENCLASSNAMES))
@@ -87,18 +87,19 @@ $(OUT_COMP_CLASS)/%/manifest.xml :
@echo $(OSEP)manifest:manifest xmlns:manifest="$(QM)http://openoffice.org/2001/manifest$(QM)"$(CSEP) >> $@
@echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-typelibrary;type=RDB$(QM)" >> $@
@echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(OUT_COMP_CLASS)/,,$(@D))).uno.rdb$(QM)"/$(CSEP) >> $@
- @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-component;type=Java$(QM)" >> $@
- @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(subst /META-INF,,$(subst $(OUT_COMP_CLASS)/,,$(@D))).uno.jar$(QM)"/$(CSEP) >> $@
+ @echo $(SQM) $(SQM)$(OSEP)manifest:file-entry manifest:media-type="$(QM)application/vnd.sun.star.uno-components$(QM)">> $@
+ @echo $(SQM) $(SQM)manifest:full-path="$(QM)$(COMP_COMPONENTS)$(QM)"/$(CSEP)>> $@
@echo $(OSEP)/manifest:manifest$(CSEP) >> $@
# rule for component package file
-$(COMPONENT_PACKAGE) : $(COMPONENT_RDB) $(COMPONENT_JAR) $(COMPONENT_UNOPKG_MANIFEST)
+$(COMP_PACKAGE) : $(COMP_RDB) $(COMP_JAR) $(COMP_UNOPKG_MANIFEST) $(COMP_COMPONENTS)
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
- $(COPY) $(subst /,$(PS),$(COMPONENT_RDB)) $(subst /,$(PS),$(OUT_COMP_CLASS))
- cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_ZIP) ../../bin/$(@F) $(COMPONENT_RDB_NAME) $(COMPONENT_JAR_NAME)
+ $(COPY) $(subst /,$(PS),$(COMP_RDB)) $(subst /,$(PS),$(OUT_COMP_CLASS))
+ $(SDK_ZIP) $@ $(COMP_COMPONENTS)
+ cd $(subst /,$(PS),$(OUT_COMP_CLASS)) && $(SDK_ZIP) -u ../../bin/$(@F) $(COMP_RDB_NAME) $(COMP_JAR_NAME)
cd $(subst /,$(PS),$(OUT_COMP_CLASS)/$(subst .$(UNOOXT_EXT),,$(@F))) && $(SDK_ZIP) -u ../../../bin/$(@F) META-INF/manifest.xml
- $(DEL) $(subst \\,\,$(subst /,$(PS),$(OUT_CLASS)/$(COMPONENT_RDB_NAME)))
+ $(DEL) $(subst \\,\,$(subst /,$(PS),$(OUT_CLASS)/$(COMP_RDB_NAME)))
$(APP1_JAR) : $(OUT_COMP_CLASS)/$(APP1_NAME).mf $(OUT_COMP_CLASS)/$(PACKAGE)/$(APP1_NAME).class
-$(MKDIR) $(subst /,$(PS),$(@D)) && $(DEL) $(subst \\,\,$(subst /,$(PS),$@))
@@ -106,11 +107,11 @@ $(APP1_JAR) : $(OUT_COMP_CLASS)/$(APP1_NAME).mf $(OUT_COMP_CLASS)/$(PACKAGE)/$(A
+$(SDK_JAR) uvf $@ $(SDK_JAVA_UNO_BOOTSTRAP_FILES)
-$(REGISTERFLAG) : $(COMPONENT_PACKAGE)
+$(REGISTERFLAG) : $(COMP_PACKAGE)
ifeq "$(SDK_AUTO_DEPLOYMENT)" "YES"
-$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
-$(MKDIR) $(subst /,$(PS),$(@D))
- $(DEPLOYTOOL) $(COMPONENT_PACKAGE_URL)
+ $(DEPLOYTOOL) $(COMP_PACKAGE_URL)
@echo flagged > $(subst /,$(PS),$@)
else
@echo --------------------------------------------------------------------------------
@@ -122,7 +123,7 @@ endif
.PHONY: clean
clean :
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMPONENT_PACKAGE_URL)))
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMPONENT_JAR)))
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_PACKAGE_URL)))
+ -$(DEL) $(subst \\,\,$(subst /,$(PS),$(COMP_JAR)))
-$(DEL) $(subst \\,\,$(subst /,$(PS),$(REGISTERFLAG)))
-$(DEL) $(subst \\,\,$(subst /,$(PS),$(APP1_JAR)))
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/Makefile b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/Makefile
index 6986700..fc453a1 100644
--- a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/Makefile
+++ b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/Makefile
@@ -64,9 +64,9 @@ $(OUT_COMP_GEN)/%.rdb : $(GENURDFILES)
-$(MKDIR) $(subst /,$(PS),$(@D))
$(REGMERGE) $@ /UCR $(GENURDFILES)
-$(OUT_COMP_CLASS)/%.class : $(COMPONENT_RDB)
+$(OUT_COMP_CLASS)/%.class : $(COMP_RDB)
-$(MKDIR) $(subst /,$(PS),$(@D))
- $(JAVAMAKER) -BUCR -nD $(GENTYPELIST) -O$(OUT_COMP_CLASS) $(COMPONENT_RDB) -X$(URE_TYPES) -X$(OFFICE_TYPES)
+ $(JAVAMAKER) -BUCR -nD $(GENTYPELIST) -O$(OUT_COMP_CLASS) $(COMP_RDB) -X$(URE_TYPES) -X$(OFFICE_TYPES)
.PHONY: clean
clean :
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/thumbs.mk b/odk/examples/DevelopersGuide/Components/Thumbs/thumbs.mk
index ae6a5c9..cec8a3f 100644
--- a/odk/examples/DevelopersGuide/Components/Thumbs/thumbs.mk
+++ b/odk/examples/DevelopersGuide/Components/Thumbs/thumbs.mk
@@ -1,16 +1,17 @@
OUT_COMP_CLASS = $(OUT_CLASS)/ComponentThumbsExample
OUT_COMP_GEN = $(OUT_MISC)/ComponentThumbsExample
-COMPONENT_NAME=ImageShrink
-COMPONENT_RDB_NAME = $(COMPONENT_NAME).uno.rdb
-COMPONENT_RDB = $(OUT_COMP_GEN)/$(COMPONENT_RDB_NAME)
-COMPONENT_PACKAGE = $(OUT_BIN)/$(COMPONENT_NAME).$(UNOOXT_EXT)
-COMPONENT_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMPONENT_NAME).$(UNOOXT_EXT)")
-COMPONENT_JAR_NAME = $(COMPONENT_NAME).uno.jar
-COMPONENT_JAR = $(OUT_COMP_CLASS)/$(COMPONENT_JAR_NAME)
-COMPONENT_MANIFESTFILE = $(OUT_COMP_CLASS)/$(COMPONENT_NAME).uno.Manifest
-COMPONENT_UNOPKG_MANIFEST = $(OUT_COMP_CLASS)/$(COMPONENT_NAME)/META-INF/manifest.xml
-REGISTERFLAG = $(OUT_MISC)$(PS)devguide_$(COMPONENT_NAME)_register_component.flag
+COMP_NAME=ImageShrink
+COMP_RDB_NAME = $(COMP_NAME).uno.rdb
+COMP_RDB = $(OUT_COMP_GEN)/$(COMP_RDB_NAME)
+COMP_PACKAGE = $(OUT_BIN)/$(COMP_NAME).$(UNOOXT_EXT)
+COMP_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE_DIR)$(PS)$(COMP_NAME).$(UNOOXT_EXT)")
+COMP_JAR_NAME = $(COMP_NAME).uno.jar
+COMP_JAR = $(OUT_COMP_CLASS)/$(COMP_JAR_NAME)
+COMP_MANIFESTFILE = $(OUT_COMP_CLASS)/$(COMP_NAME).uno.Manifest
+COMP_UNOPKG_MANIFEST = $(OUT_COMP_CLASS)/$(COMP_NAME)/META-INF/manifest.xml
+REGISTERFLAG = $(OUT_MISC)$(PS)devguide_$(COMP_NAME)_register_component.flag
+COMP_COMPONENTS=$(COMP_NAME).components
IDL_PACKAGE=org/openoffice/test
commit f3ee841d8ddcd3a2d33aed3c3645800e6ff11ade
Author: Juergen Schmidt <jsc at openoffice.org>
Date: Tue Feb 22 16:34:11 2011 +0100
jsc340: i114609: support passive component registration
diff --git a/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.components b/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.components
new file mode 100644
index 0000000..e9a7baa
--- /dev/null
+++ b/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.components
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://openoffice.org/2010/uno-components">
+ <component loader="com.sun.star.loader.Java2" uri="JavaSampleChartAddIn.uno.jar">
+ <implementation name="JavaSampleChartAddIn">
+ <service name="com.sun.star.comp.Chart.JavaSampleChartAddIn"/>
+ <service name="com.sun.star.chart.Diagram"/>
+ <service name="com.sun.star.chart.ChartAxisYSupplier"/>
+ </implementation>
+ </component>
+</components>
diff --git a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.components b/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.components
new file mode 100644
index 0000000..c47f26b
--- /dev/null
+++ b/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/AsyncJob.components
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://openoffice.org/2010/uno-components">
+ <component loader="com.sun.star.loader.Java2" uri="AsyncJob.uno.jar">
+ <implementation name="com.sun.star.comp.framework.java.services.AsyncJob">
+ <service name="com.sun.star.task.AsyncJob"/>
+ </implementation>
+ </component>
+</components>
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon_java.components b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon_java.components
new file mode 100644
index 0000000..13665eb
--- /dev/null
+++ b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon_java.components
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://openoffice.org/2010/uno-components">
+ <component loader="com.sun.star.loader.Java2" uri="ProtocolHandlerAddon_java.uno.jar">
+ <implementation name="ProtocolHandlerAddon$ProtocolHandlerAddonImpl">
+ <service name="com.sun.star.frame.ProtocolHandler"/>
+ </implementation>
+ </component>
+</components>
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.components b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.components
new file mode 100644
index 0000000..bf083b3
--- /dev/null
+++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleHyphenator.components
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://openoffice.org/2010/uno-components">
+ <component loader="com.sun.star.loader.Java2" uri="SampleHyphenator.uno.jar">
+ <implementation name="SampleHyphenator">
+ <service name="com.sun.star.linguistic2.Hyphenator"/>
+ </implementation>
+ </component>
+</components>
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.components b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.components
new file mode 100644
index 0000000..bb48991
--- /dev/null
+++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleSpellChecker.components
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://openoffice.org/2010/uno-components">
+ <component loader="com.sun.star.loader.Java2" uri="SampleSpellChecker.uno.jar">
+ <implementation name="SampleSpellChecker">
+ <service name="com.sun.star.linguistic2.SpellChecker"/>
+ </implementation>
+ </component>
+</components>
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.components b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.components
new file mode 100644
index 0000000..025f424
--- /dev/null
+++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/SampleThesaurus.components
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://openoffice.org/2010/uno-components">
+ <component loader="com.sun.star.loader.Java2" uri="SampleThesaurus.uno.jar">
+ <implementation name="SampleThesaurus">
+ <service name="com.sun.star.linguistic2.Thesaurus"/>
+ </implementation>
+ </component>
+</components>
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.components b/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.components
new file mode 100644
index 0000000..6212c72
--- /dev/null
+++ b/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.components
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://openoffice.org/2010/uno-components">
+ <component loader="com.sun.star.loader.Java2" uri="ExampleAddIn.uno.jar">
+ <implementation name="ExampleAddIn$_ExampleAddIn">
+ <service name="com.sun.star.sheet.AddIn"/>
+ <service name="org.openoffice.sheet.addin.ExampleAddIn"/>
+ </implementation>
+ </component>
+</components>
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.components b/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.components
new file mode 100644
index 0000000..f0881c1
--- /dev/null
+++ b/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.components
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://openoffice.org/2010/uno-components">
+ <component loader="com.sun.star.loader.Java2" uri="ExampleDataPilotSource.uno.jar">
+ <implementation name="ExampleDataPilotSource$_ExampleDataPilotSource">
+ <service name="com.sun.star.sheet.DataPilotSource"/>
+ </implementation>
+ </component>
+</components>
commit f7cdcbc817d1f34a0b6b04ee536be03818ad8c6c
Author: Juergen Schmidt <jsc at openoffice.org>
Date: Tue Feb 22 16:13:49 2011 +0100
jsc340: i114609: support passive component registration
diff --git a/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java b/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java
index 9bb24a8..fe599c1 100644
--- a/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java
+++ b/odk/examples/DevelopersGuide/Charts/JavaSampleChartAddIn.java
@@ -459,18 +459,22 @@ public class JavaSampleChartAddIn extends WeakBase implements
* @param regKey the registryKey
* @see com.sun.star.comp.loader.JavaLoader
*/
- public static boolean __writeRegistryServiceInfo( com.sun.star.registry.XRegistryKey regKey )
- {
- boolean bResult = true;
-
- String[] aServices = getSupportedServiceNames_Static();
- int i, nLength = aServices.length;
-
- for( i = 0; i < nLength; ++i )
- {
- bResult = bResult && com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
- JavaSampleChartAddIn.class.getName(), aServices[ i ], regKey );
- }
- return bResult;
- }
+ // This method not longer necessary since OOo 3.4 where the component registration
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list