summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Glazunov <vg@openoffice.org>2010-10-01 16:02:03 +0200
committerVladimir Glazunov <vg@openoffice.org>2010-10-01 16:02:03 +0200
commit066c61778f9e1f858e901dad9118cddde1e323ec (patch)
tree3e369eb8be6045342c393ef1ba54e9beb8c6e51b
parent09cfcedc6eae7af61e047a956d672702f1313c6d (diff)
parent09eb4408844f244eb190d9e4db2a82eceb31b4ae (diff)
-rw-r--r--UnoControls/prj/d.lst1
-rw-r--r--UnoControls/source/base/registercontrols.cxx100
-rw-r--r--UnoControls/util/ctl.component43
-rw-r--r--UnoControls/util/makefile.mk8
-rwxr-xr-xaccessibility/bridge/org/openoffice/accessibility/AccessBridge.java5
-rw-r--r--accessibility/bridge/org/openoffice/accessibility/java_uno_accessbridge.component34
-rwxr-xr-xaccessibility/bridge/org/openoffice/accessibility/makefile.mk7
-rw-r--r--accessibility/prj/d.lst2
-rw-r--r--basctl/prj/d.lst1
-rw-r--r--basctl/source/basicide/register.cxx22
-rw-r--r--basctl/util/basctl.component34
-rwxr-xr-xbasctl/util/basctl.map1
-rw-r--r--basctl/util/makefile.mk8
-rwxr-xr-xcrashrep/source/unx/main.cxx4
-rwxr-xr-xcui/source/dialogs/SpellDialog.cxx103
-rwxr-xr-xcui/source/dialogs/thesdlg.cxx37
-rwxr-xr-x[-rw-r--r--]cui/source/options/webconninfo.cxx6
-rwxr-xr-xembedserv/prj/d.lst1
-rwxr-xr-xembedserv/source/embed/register.cxx30
-rw-r--r--embedserv/util/emser.component34
-rwxr-xr-xembedserv/util/exports.dxp1
-rwxr-xr-xembedserv/util/makefile.mk8
-rw-r--r--extensions/prj/d.lst17
-rw-r--r--extensions/source/abpilot/abp.component34
-rw-r--r--extensions/source/abpilot/abpservices.cxx21
-rw-r--r--extensions/source/abpilot/exports.dxp1
-rw-r--r--extensions/source/abpilot/makefile.mk8
-rw-r--r--extensions/source/bibliography/bib.component35
-rw-r--r--extensions/source/bibliography/bibload.cxx30
-rw-r--r--extensions/source/bibliography/makefile.mk8
-rw-r--r--extensions/source/config/ldap/componentdef.cxx7
-rw-r--r--extensions/source/config/ldap/exports.dxp1
-rw-r--r--extensions/source/config/ldap/ldapbe2.component34
-rw-r--r--extensions/source/config/ldap/makefile.mk8
-rw-r--r--extensions/source/dbpilots/dbp.component40
-rw-r--r--extensions/source/dbpilots/dbpservices.cxx21
-rw-r--r--extensions/source/dbpilots/makefile.mk8
-rw-r--r--extensions/source/inc/componentmodule.cxx48
-rw-r--r--extensions/source/inc/componentmodule.hxx15
-rw-r--r--extensions/source/logging/log.component47
-rw-r--r--extensions/source/logging/makefile.mk8
-rw-r--r--extensions/source/ole/makefile.mk7
-rw-r--r--extensions/source/ole/oleautobridge.component46
-rw-r--r--extensions/source/ole/oleautobridge.uno.dxp1
-rw-r--r--extensions/source/ole/servreg.cxx41
-rw-r--r--extensions/source/oooimprovecore/makefile.mk8
-rw-r--r--extensions/source/oooimprovecore/oooimprovecore.component34
-rw-r--r--extensions/source/oooimprovement/invite_job.cxx2
-rw-r--r--extensions/source/oooimprovement/makefile.mk8
-rw-r--r--extensions/source/oooimprovement/onlogrotate_job.cxx2
-rw-r--r--extensions/source/oooimprovement/oooimprovement.component38
-rw-r--r--extensions/source/oooimprovement/oooimprovement_exports.cxx22
-rw-r--r--extensions/source/plugin/base/service.cxx27
-rw-r--r--extensions/source/plugin/util/makefile.mk8
-rw-r--r--extensions/source/plugin/util/pl.component37
-rw-r--r--extensions/source/preload/makefile.mk8
-rw-r--r--extensions/source/preload/preload.component34
-rw-r--r--extensions/source/preload/services.cxx21
-rw-r--r--extensions/source/propctrlr/makefile.mk8
-rw-r--r--extensions/source/propctrlr/pcr.component91
-rw-r--r--extensions/source/propctrlr/pcrservices.cxx21
-rw-r--r--extensions/source/resource/exports.dxp1
-rw-r--r--extensions/source/resource/makefile.mk8
-rw-r--r--extensions/source/resource/res.component38
-rw-r--r--extensions/source/resource/res_services.cxx42
-rw-r--r--extensions/source/scanner/exports.dxp1
-rw-r--r--extensions/source/scanner/makefile.mk8
-rw-r--r--extensions/source/scanner/scn.component34
-rw-r--r--extensions/source/scanner/scnserv.cxx31
-rw-r--r--extensions/source/svg/svguno.cxx30
-rw-r--r--extensions/source/update/check/makefile.mk8
-rwxr-xr-xextensions/source/update/check/updatecheckjob.cxx12
-rw-r--r--extensions/source/update/check/updchk.uno.component37
-rw-r--r--extensions/source/update/feed/makefile.mk8
-rw-r--r--extensions/source/update/feed/updatefeed.component34
-rw-r--r--extensions/source/update/feed/updatefeed.cxx12
-rw-r--r--extensions/source/update/ui/makefile.mk8
-rw-r--r--extensions/source/update/ui/updatecheckui.cxx12
-rw-r--r--extensions/source/update/ui/updchk.component34
-rw-r--r--extensions/source/xmlextract/makefile.mk8
-rw-r--r--extensions/source/xmlextract/xmx.component34
-rw-r--r--extensions/source/xmlextract/xmxuno.cxx21
-rw-r--r--forms/prj/d.lst1
-rw-r--r--forms/source/inc/forms_module.hxx15
-rw-r--r--forms/source/inc/forms_module_impl.hxx48
-rw-r--r--forms/source/misc/services.cxx67
-rw-r--r--forms/util/frm.component255
-rw-r--r--forms/util/frm.dxp1
-rw-r--r--forms/util/makefile.mk8
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java9
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java265
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java38
-rw-r--r--lingucomponent/prj/d.lst5
-rw-r--r--lingucomponent/source/hyphenator/altlinuxhyph/hyphen/exports.dxp1
-rw-r--r--lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hreg.cxx9
-rw-r--r--lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphen.component34
-rwxr-xr-xlingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx868
-rwxr-xr-x[-rw-r--r--]lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx94
-rw-r--r--lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk8
-rw-r--r--lingucomponent/source/languageguessing/guesslang.component34
-rw-r--r--lingucomponent/source/languageguessing/guesslang.cxx7
-rw-r--r--lingucomponent/source/languageguessing/makefile.mk8
-rwxr-xr-x[-rw-r--r--]lingucomponent/source/lingutil/lingutil.cxx21
-rw-r--r--lingucomponent/source/lingutil/lingutil.hxx8
-rw-r--r--lingucomponent/source/spellcheck/macosxspell/MacOSXSpell.component34
-rw-r--r--lingucomponent/source/spellcheck/macosxspell/macreg.cxx9
-rw-r--r--lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx26
-rwxr-xr-x[-rw-r--r--]lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx93
-rw-r--r--lingucomponent/source/spellcheck/macosxspell/makefile.mk8
-rw-r--r--lingucomponent/source/spellcheck/spell/exports.dxp1
-rw-r--r--lingucomponent/source/spellcheck/spell/makefile.mk8
-rw-r--r--lingucomponent/source/spellcheck/spell/spell.component34
-rw-r--r--lingucomponent/source/spellcheck/spell/sreg.cxx9
-rwxr-xr-x[-rw-r--r--]lingucomponent/source/spellcheck/spell/sspellimp.cxx320
-rwxr-xr-x[-rw-r--r--]lingucomponent/source/spellcheck/spell/sspellimp.hxx90
-rw-r--r--lingucomponent/source/thesaurus/libnth/exports.dxp1
-rw-r--r--lingucomponent/source/thesaurus/libnth/lnth.component34
-rw-r--r--lingucomponent/source/thesaurus/libnth/makefile.mk8
-rwxr-xr-x[-rw-r--r--]lingucomponent/source/thesaurus/libnth/nthesdta.hxx22
-rwxr-xr-x[-rw-r--r--]lingucomponent/source/thesaurus/libnth/nthesimp.cxx483
-rwxr-xr-x[-rw-r--r--]lingucomponent/source/thesaurus/libnth/nthesimp.hxx53
-rw-r--r--lingucomponent/source/thesaurus/libnth/ntreg.cxx9
-rw-r--r--package/prj/d.lst2
-rw-r--r--package/source/manifest/UnoRegister.cxx63
-rw-r--r--package/source/xstor/makefile.mk8
-rw-r--r--package/source/xstor/register.cxx28
-rw-r--r--package/source/xstor/xstor.component35
-rw-r--r--package/source/xstor/xstor.dxp1
-rw-r--r--package/util/exports.dxp1
-rw-r--r--package/util/makefile.mk8
-rw-r--r--package/util/package2.component44
-rw-r--r--setup_native/scripts/admin.pl1
-rw-r--r--wizards/com/sun/star/wizards/agenda/CallWizard.java18
-rw-r--r--wizards/com/sun/star/wizards/agenda/agenda.component35
-rw-r--r--wizards/com/sun/star/wizards/agenda/makefile.mk8
-rw-r--r--wizards/com/sun/star/wizards/fax/CallWizard.java19
-rw-r--r--wizards/com/sun/star/wizards/fax/fax.component35
-rw-r--r--wizards/com/sun/star/wizards/fax/makefile.mk8
-rw-r--r--wizards/com/sun/star/wizards/form/CallFormWizard.java17
-rw-r--r--wizards/com/sun/star/wizards/form/form.component35
-rw-r--r--wizards/com/sun/star/wizards/form/makefile.mk8
-rw-r--r--wizards/com/sun/star/wizards/letter/CallWizard.java19
-rw-r--r--wizards/com/sun/star/wizards/letter/letter.component35
-rw-r--r--wizards/com/sun/star/wizards/letter/makefile.mk8
-rw-r--r--wizards/com/sun/star/wizards/query/CallQueryWizard.java17
-rw-r--r--wizards/com/sun/star/wizards/query/makefile.mk8
-rw-r--r--wizards/com/sun/star/wizards/query/query.component35
-rw-r--r--wizards/com/sun/star/wizards/report/CallReportWizard.java20
-rw-r--r--wizards/com/sun/star/wizards/report/makefile.mk8
-rw-r--r--wizards/com/sun/star/wizards/report/report.component35
-rw-r--r--wizards/com/sun/star/wizards/table/CallTableWizard.java17
-rw-r--r--wizards/com/sun/star/wizards/table/makefile.mk8
-rw-r--r--wizards/com/sun/star/wizards/table/table.component35
-rw-r--r--wizards/com/sun/star/wizards/web/CallWizard.java19
-rw-r--r--wizards/com/sun/star/wizards/web/makefile.mk8
-rw-r--r--wizards/com/sun/star/wizards/web/web.component35
-rw-r--r--wizards/prj/d.lst8
-rw-r--r--xmlsecurity/prj/d.lst3
-rw-r--r--xmlsecurity/source/component/registerservices.cxx42
-rw-r--r--xmlsecurity/source/framework/xsec_framework.cxx77
-rw-r--r--xmlsecurity/source/xmlsec/xsec_xmlsec.cxx71
-rw-r--r--xmlsecurity/util/exports_xsmscrypt.dxp1
-rw-r--r--xmlsecurity/util/exports_xsnss.dxp1
-rw-r--r--xmlsecurity/util/makefile.mk27
-rw-r--r--xmlsecurity/util/xmlsecurity.component37
-rw-r--r--xmlsecurity/util/xsec_fw.component56
-rw-r--r--xmlsecurity/util/xsec_fw.dxp1
-rw-r--r--xmlsecurity/util/xsec_xmlsec.component55
-rw-r--r--xmlsecurity/util/xsec_xmlsec.windows.component55
169 files changed, 3311 insertions, 2616 deletions
diff --git a/UnoControls/prj/d.lst b/UnoControls/prj/d.lst
index 5f65d3c80..370fc0c9f 100644
--- a/UnoControls/prj/d.lst
+++ b/UnoControls/prj/d.lst
@@ -3,3 +3,4 @@
..\%__SRC%\lib\*.sl %_DEST%\lib%_EXT%\*.sl
..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res
..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib
+..\%__SRC%\misc\ctl.component %_DEST%\xml%_EXT%\ctl.component
diff --git a/UnoControls/source/base/registercontrols.cxx b/UnoControls/source/base/registercontrols.cxx
index 50ce3eb87..3eaf3a7d9 100644
--- a/UnoControls/source/base/registercontrols.cxx
+++ b/UnoControls/source/base/registercontrols.cxx
@@ -93,59 +93,6 @@ using namespace ::com::sun::star::registry ;
}
//******************************************************************************************************************************
-#define COMPONENT_INFO(CLASS) \
- \
- AS_DBG_OUT ( "\tCOMPONENT_INFO():\t[start]\n" ) \
- try \
- { \
- /* Set default result of follow operations !!! */ \
- bReturn = sal_False ; \
- \
- /* Do the follow only, if given key is valid ! */ \
- if ( xKey.is () ) \
- { \
- AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\txkey is valid ...\n" ) \
- /* Build new keyname */ \
- sKeyName = OUString::createFromAscii( "/" ) ; \
- sKeyName += CLASS::impl_getStaticImplementationName() ; \
- sKeyName += OUString::createFromAscii( "/UNO/SERVICES" ); \
- \
- /* Create new key with new name. */ \
- xNewKey = xKey->createKey( sKeyName ); \
- \
- /* If this new key valid ... */ \
- if ( xNewKey.is () ) \
- { \
- AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\txNewkey is valid ...\n" ) \
- /* Get information about supported services. */ \
- seqServiceNames = CLASS::impl_getStaticSupportedServiceNames() ; \
- pArray = seqServiceNames.getArray() ; \
- nLength = seqServiceNames.getLength() ; \
- nCounter = 0 ; \
- \
- AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\tloop ..." ) \
- /* Then set this information on this key. */ \
- for ( nCounter = 0; nCounter < nLength; ++nCounter ) \
- { \
- xNewKey->createKey( pArray [nCounter] ); \
- } \
- AS_DBG_OUT ( " OK\n" ) \
- \
- /* Result of this operations = OK. */ \
- bReturn = sal_True ; \
- } \
- AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\t... leave xNewKey\n" ) \
- } \
- AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\t... leave xKey\n" ) \
- } \
- catch( InvalidRegistryException& ) \
- { \
- AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\tInvalidRegistryException detected!!!\n" ) \
- bReturn = sal_False ; \
- } \
- AS_DBG_OUT ( "\tCOMPONENT_INFO():\t[end]\n" )
-
-//******************************************************************************************************************************
#define CREATEFACTORY_ONEINSTANCE(CLASS) \
\
AS_DBG_OUT ( "\tCREATEFACTORY_ONEINSTANCE():\t[start]\n" ) \
@@ -218,53 +165,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char*
}
//______________________________________________________________________________________________________________
-// write component info to registry
-//______________________________________________________________________________________________________________
-
-extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/ ,
- void* pRegistryKey )
-{
- AS_DBG_OUT ( "component_writeInfo():\t[start]\n" )
-
- // Set default return value for this operation - if it failed.
- sal_Bool bReturn = sal_False ;
-
- if ( pRegistryKey != NULL )
- {
- AS_DBG_OUT ( "component_writeInfo():\t\tpRegistryKey is valid ... enter scope\n" )
-
- // Define variables for following macros!
- // bReturn is set automaticly.
- Reference< XRegistryKey > xKey( reinterpret_cast< XRegistryKey* >( pRegistryKey ) ) ;
- Reference< XRegistryKey > xNewKey ;
- Sequence< OUString > seqServiceNames ;
- const OUString* pArray ;
- sal_Int32 nLength ;
- sal_Int32 nCounter ;
- OUString sKeyName ;
-
- //=============================================================================
- // Add new macro line to register new services.
- //
- // !!! ATTENTION !!!
- // Write no ";" at end of line! (see macro)
- //=============================================================================
- COMPONENT_INFO ( FrameControl )
- COMPONENT_INFO ( ProgressBar )
- COMPONENT_INFO ( ProgressMonitor )
- COMPONENT_INFO ( StatusIndicator )
- //=============================================================================
-
- AS_DBG_OUT ( "component_writeInfo():\t\t... leave pRegistryKey scope\n" )
- }
-
- AS_DBG_OUT ( "component_writeInfo():\t[end]\n" )
-
- // Return with result of this operation.
- return bReturn ;
-}
-
-//______________________________________________________________________________________________________________
// create right component factory
//______________________________________________________________________________________________________________
diff --git a/UnoControls/util/ctl.component b/UnoControls/util/ctl.component
new file mode 100644
index 000000000..32901f529
--- /dev/null
+++ b/UnoControls/util/ctl.component
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="stardiv.UnoControls.FrameControl">
+ <service name="com.sun.star.frame.FrameControl"/>
+ </implementation>
+ <implementation name="stardiv.UnoControls.ProgressBar">
+ <service name="com.sun.star.awt.XProgressBar"/>
+ </implementation>
+ <implementation name="stardiv.UnoControls.ProgressMonitor">
+ <service name="com.sun.star.awt.XProgressMonitor"/>
+ </implementation>
+ <implementation name="stardiv.UnoControls.StatusIndicator">
+ <service name="com.sun.star.task.XStatusIndicator"/>
+ </implementation>
+</component>
diff --git a/UnoControls/util/makefile.mk b/UnoControls/util/makefile.mk
index aacddb23c..73617d244 100644
--- a/UnoControls/util/makefile.mk
+++ b/UnoControls/util/makefile.mk
@@ -59,3 +59,11 @@ SHL1LIBS= $(LIB1TARGET)
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/ctl.component
+
+$(MISC)/ctl.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ ctl.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt ctl.component
diff --git a/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java b/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java
index a5b230cd7..e881dffce 100755
--- a/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java
+++ b/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java
@@ -142,11 +142,6 @@ public class AccessBridge {
return xSingleServiceFactory;
}
- public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
- return FactoryHelper.writeRegistryServiceInfo(AccessBridge.class.getName(),
- _AccessBridge._serviceName, regKey);
- }
-
static public class _AccessBridge implements XTopWindowListener,
XInitialization, XComponent {
static final String _serviceName = "com.sun.star.accessibility.AccessBridge";
diff --git a/accessibility/bridge/org/openoffice/accessibility/java_uno_accessbridge.component b/accessibility/bridge/org/openoffice/accessibility/java_uno_accessbridge.component
new file mode 100644
index 000000000..5fc897f2d
--- /dev/null
+++ b/accessibility/bridge/org/openoffice/accessibility/java_uno_accessbridge.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.Java2"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="org.openoffice.accessibility.AccessBridge">
+ <service name="com.sun.star.accessibility.AccessBridge"/>
+ </implementation>
+</component>
diff --git a/accessibility/bridge/org/openoffice/accessibility/makefile.mk b/accessibility/bridge/org/openoffice/accessibility/makefile.mk
index 9510a3156..1fa29f5bf 100755
--- a/accessibility/bridge/org/openoffice/accessibility/makefile.mk
+++ b/accessibility/bridge/org/openoffice/accessibility/makefile.mk
@@ -53,3 +53,10 @@ CUSTOMMANIFESTFILE = manifest
.INCLUDE : target.mk
+ALLTAR : $(MISC)/java_uno_accessbridge.component
+
+$(MISC)/java_uno_accessbridge.component .ERRREMOVE : \
+ $(SOLARENV)/bin/createcomponent.xslt java_uno_accessbridge.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt java_uno_accessbridge.component
diff --git a/accessibility/prj/d.lst b/accessibility/prj/d.lst
index f61319551..662373c7c 100644
--- a/accessibility/prj/d.lst
+++ b/accessibility/prj/d.lst
@@ -5,4 +5,4 @@
..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res
..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%
..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib
-
+..\%__SRC%\misc\java_uno_accessbridge.component %_DEST%\xml\java_uno_accessbridge.component
diff --git a/basctl/prj/d.lst b/basctl/prj/d.lst
index d05ff35bd..b3ded50b6 100644
--- a/basctl/prj/d.lst
+++ b/basctl/prj/d.lst
@@ -21,3 +21,4 @@ mkdir: %_DEST%\inc%_EXT%\basctl
..\uiconfig\basicide\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\BasicIDE\menubar\*.xml
..\uiconfig\basicide\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\BasicIDE\toolbar\*.xml
..\uiconfig\basicide\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\BasicIDE\statusbar\*.xml
+..\%__SRC%\misc\basctl.component %_DEST%\xml%_EXT%\basctl.component
diff --git a/basctl/source/basicide/register.cxx b/basctl/source/basicide/register.cxx
index 6b46ae398..dd885a15c 100644
--- a/basctl/source/basicide/register.cxx
+++ b/basctl/source/basicide/register.cxx
@@ -53,28 +53,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
}
SAL_DLLPUBLIC_EXPORT
-sal_Bool SAL_CALL component_writeInfo( void* pServiceManager ,
- void* pRegistryKey )
-{
- (void)pServiceManager;
-
- Reference< ::registry::XRegistryKey >
- xKey( reinterpret_cast< ::registry::XRegistryKey* >( pRegistryKey ) ) ;
-
- OUString aDelimiter( RTL_CONSTASCII_USTRINGPARAM("/") );
- OUString aUnoServices( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") );
-
- sal_Int32 i;
- Reference< ::registry::XRegistryKey > xNewKey;
- xNewKey = xKey->createKey( aDelimiter + SIDEModel::getImplementationName_Static() + aUnoServices );
- Sequence< OUString > aServices = SIDEModel::getSupportedServiceNames_Static();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- return sal_True;
-}
-
-SAL_DLLPUBLIC_EXPORT
void* SAL_CALL component_getFactory( const sal_Char* pImplementationName,
void* pServiceManager,
void* pRegistryKey )
diff --git a/basctl/util/basctl.component b/basctl/util/basctl.component
new file mode 100644
index 000000000..f101deaf2
--- /dev/null
+++ b/basctl/util/basctl.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.basic.BasicIDE">
+ <service name="com.sun.star.script.BasicIDE"/>
+ </implementation>
+</component>
diff --git a/basctl/util/basctl.map b/basctl/util/basctl.map
index 80359606c..83193fe17 100755
--- a/basctl/util/basctl.map
+++ b/basctl/util/basctl.map
@@ -4,7 +4,6 @@ UDK_3_0_0 {
basicide_macro_organizer;
basicide_handle_basic_error;
component_getImplementationEnvironment;
- component_writeInfo;
component_getFactory;
local:
*;
diff --git a/basctl/util/makefile.mk b/basctl/util/makefile.mk
index 47de65cc5..b33fa3f1d 100644
--- a/basctl/util/makefile.mk
+++ b/basctl/util/makefile.mk
@@ -103,3 +103,11 @@ RESLIB1SRSFILES= $(SRSFILELIST)
.ENDIF # "$(header)" == ""
+
+ALLTAR : $(MISC)/basctl.component
+
+$(MISC)/basctl.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ basctl.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt basctl.component
diff --git a/crashrep/source/unx/main.cxx b/crashrep/source/unx/main.cxx
index 2467735c4..7c6faf4f3 100755
--- a/crashrep/source/unx/main.cxx
+++ b/crashrep/source/unx/main.cxx
@@ -129,12 +129,12 @@ static string trim_string( const string& rString )
{
string temp = rString;
- while ( temp.length() && temp[0] == ' ' || temp[0] == '\t' )
+ while ( temp.length() && (temp[0] == ' ' || temp[0] == '\t') )
temp.erase( 0, 1 );
string::size_type len = temp.length();
- while ( len && temp[len-1] == ' ' || temp[len-1] == '\t' )
+ while ( len && (temp[len-1] == ' ' || temp[len-1] == '\t') )
{
temp.erase( len - 1, 1 );
len = temp.length();
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 22ea4611a..a6c628885 100755
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -76,6 +76,8 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::linguistic2;
+using ::rtl::OUString;
+
#define C2U(cChar) ::rtl::OUString::createFromAscii(cChar)
// struct SpellDialog_Impl ---------------------------------------------
@@ -930,7 +932,7 @@ void SpellDialog::SetTitle_Impl(LanguageType nLang)
-----------------------------------------------------------------------*/
void SpellDialog::InitUserDicts()
{
- sal_uInt16 nLang = aLanguageLB.GetSelectLanguage();
+ const LanguageType nLang = aLanguageLB.GetSelectLanguage();
const Reference< XDictionary > *pDic = 0;
@@ -948,51 +950,50 @@ void SpellDialog::InitUserDicts()
pImpl->aDics = xDicList->getDictionaries();
}
- // Benutzerbuecher anzeigen
+ SvtLinguConfig aCfg;
+ const bool bHC = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
+
+ // list suitable dictionaries
+ bool bEnable = false;
const sal_Int32 nSize = pImpl->aDics.getLength();
pDic = pImpl->aDics.getConstArray();
- sal_Int32 i;
delete aAddToDictMB.GetPopupMenu();
PopupMenu* pMenu = new PopupMenu;
- for (i = 0; i < nSize; ++i )
+ pMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS);
+ USHORT nItemId = 1; // menu items should be enumerated from 1 and not 0
+ for (sal_Int32 i = 0; i < nSize; ++i)
{
- Reference< XDictionary > xDic( pDic[i], UNO_QUERY );
- if (!xDic.is() || SvxGetIgnoreAllList() == xDic)
+ uno::Reference< linguistic2::XDictionary > xDicTmp( pDic[i], uno::UNO_QUERY );
+ if (!xDicTmp.is() || SvxGetIgnoreAllList() == xDicTmp)
continue;
- // add only active and not read-only dictionaries to list
- // from which to choose from
- Reference< frame::XStorable > xStor( xDic, UNO_QUERY );
- if ( xDic->isActive() && (!xStor.is() || !xStor->isReadonly()) )
+ uno::Reference< frame::XStorable > xStor( xDicTmp, uno::UNO_QUERY );
+ LanguageType nActLanguage = SvxLocaleToLanguage( xDicTmp->getLocale() );
+ if( xDicTmp->isActive()
+ && xDicTmp->getDictionaryType() != linguistic2::DictionaryType_NEGATIVE
+ && (nLang == nActLanguage || LANGUAGE_NONE == nActLanguage )
+ && (!xStor.is() || !xStor->isReadonly()) )
{
- sal_Bool bNegativ = xDic->getDictionaryType() == DictionaryType_NEGATIVE;
- pMenu->InsertItem( (USHORT)i + 1, ::GetDicInfoStr( xDic->getName(),
- SvxLocaleToLanguage( xDic->getLocale() ), bNegativ ) );
- }
- }
- aAddToDictMB.SetPopupMenu(pMenu);
-
- aAddToDictMB.Disable();
+ pMenu->InsertItem( nItemId, xDicTmp->getName() );
+ bEnable = sal_True;
- sal_uInt16 k;
- for ( k = 0; k < pMenu->GetItemCount(); ++k )
- {
- sal_uInt16 nId = pMenu->GetItemId(k) - 1;
- sal_Bool bFound = sal_False;
-
- const sal_uInt16 nDicLang = SvxLocaleToLanguage( pDic[nId]->getLocale() );
- const sal_Bool bDicNegativ =
- pDic[nId]->getDictionaryType() == DictionaryType_NEGATIVE;
- // Stimmt die Sprache "uberein, dann enable
- if ((nDicLang == nLang || nDicLang == LANGUAGE_NONE) && !bDicNegativ)
- bFound = sal_True;
+ uno::Reference< lang::XServiceInfo > xSvcInfo( xDicTmp, uno::UNO_QUERY );
+ if (xSvcInfo.is())
+ {
+ OUString aDictionaryImageUrl( aCfg.GetSpellAndGrammarContextDictionaryImage(
+ xSvcInfo->getImplementationName(), bHC) );
+ if (aDictionaryImageUrl.getLength() > 0)
+ {
+ Image aImage( lcl_GetImageFromPngUrl( aDictionaryImageUrl ) );
+ pMenu->SetItemImage( nItemId, aImage );
+ }
+ }
- if (bFound)
- {
- aAddToDictMB.Enable();
- break;
+ ++nItemId;
}
}
+ aAddToDictMB.SetPopupMenu(pMenu);
+ aAddToDictMB.Enable( bEnable );
}
/*-- 20.10.2003 15:31:06---------------------------------------------------
@@ -1000,31 +1001,39 @@ void SpellDialog::InitUserDicts()
IMPL_LINK(SpellDialog, AddToDictionaryHdl, MenuButton*, pButton )
{
aSentenceED.UndoActionStart( SPELLUNDO_CHANGE_GROUP );
- USHORT nItem = pButton->GetCurItemId();
//GetErrorText() returns the current error even if the text is already
//manually changed
- String sNewWord= aSentenceED.GetErrorText();
+ const String aNewWord= aSentenceED.GetErrorText();
+
+ USHORT nItemId = pButton->GetCurItemId();
+ PopupMenu *pMenu = pButton->GetPopupMenu();
+ String aDicName ( pMenu->GetItemText( nItemId ) );
+
+ uno::Reference< linguistic2::XDictionary > xDic;
+ uno::Reference< linguistic2::XDictionaryList > xDicList( SvxGetDictionaryList() );
+ if (xDicList.is())
+ xDic = xDicList->getDictionaryByName( aDicName );
- Reference< XDictionary > xDic( pImpl->aDics.getConstArray()[ nItem - 1 ], UNO_QUERY );
sal_Int16 nAddRes = DIC_ERR_UNKNOWN;
if (xDic.is())
{
- String sTmpTxt( sNewWord );
- sal_Bool bNegEntry = xDic->getDictionaryType() == DictionaryType_NEGATIVE;
- nAddRes = linguistic::AddEntryToDic( xDic, sTmpTxt, bNegEntry,
- ::rtl::OUString(), LANGUAGE_NONE );
+ nAddRes = linguistic::AddEntryToDic( xDic, aNewWord, FALSE, OUString(), LANGUAGE_NONE );
+ // save modified user-dictionary if it is persistent
+ uno::Reference< frame::XStorable > xSavDic( xDic, uno::UNO_QUERY );
+ if (xSavDic.is())
+ xSavDic->store();
- if(nAddRes == DIC_ERR_NONE)
+ if (nAddRes == DIC_ERR_NONE)
{
SpellUndoAction_Impl* pAction = new SpellUndoAction_Impl(
SPELLUNDO_CHANGE_ADD_TO_DICTIONARY, aDialogUndoLink);
- pAction->SetDictionary(xDic);
- pAction->SetAddedWord(sTmpTxt);
- aSentenceED.AddUndoAction(pAction);
+ pAction->SetDictionary( xDic );
+ pAction->SetAddedWord( aNewWord );
+ aSentenceED.AddUndoAction( pAction );
}
// failed because there is already an entry?
- if (DIC_ERR_NONE != nAddRes && xDic->getEntry( sTmpTxt ).is())
+ if (DIC_ERR_NONE != nAddRes && xDic->getEntry( aNewWord ).is())
nAddRes = DIC_ERR_NONE;
}
if (DIC_ERR_NONE != nAddRes)
@@ -1032,8 +1041,6 @@ IMPL_LINK(SpellDialog, AddToDictionaryHdl, MenuButton*, pButton )
SvxDicError( this, nAddRes );
return 0; // Nicht weitermachen
}
- // nach dem Aufnehmen ggf. '='-Zeichen entfernen
- sNewWord.EraseAllChars( sal_Unicode( '=' ) );
// go on
SpellContinue_Impl();
diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx
index c069e973d..c9a6738e7 100755
--- a/cui/source/dialogs/thesdlg.cxx
+++ b/cui/source/dialogs/thesdlg.cxx
@@ -57,6 +57,7 @@
#include <i18npool/mslangid.hxx>
#include <comphelper/processfactory.hxx>
#include <osl/file.hxx>
+#include <svl/lngmisc.hxx>
#include <stack>
@@ -73,36 +74,6 @@ using ::rtl::OUString;
#define A2S(x) String::CreateFromAscii( x )
-
-// GetReplaceEditString -------------------------------
-
-static void GetReplaceEditString( String &rText )
-{
- // The strings returned by the thesaurus saometimes have some
- // explanation text put in between '(' and ')' or a trailing '*'.
- // These parts should not be put in the ReplaceEdit Text that may get
- // inserted into the document. Thus we strip them from the text.
-
- xub_StrLen nPos = rText.Search( sal_Unicode('(') );
- while (STRING_NOTFOUND != nPos)
- {
- xub_StrLen nEnd = rText.Search( sal_Unicode(')'), nPos );
- if (STRING_NOTFOUND != nEnd)
- rText.Erase( nPos, nEnd-nPos+1 );
- else
- break;
- nPos = rText.Search( sal_Unicode('(') );
- }
-
- nPos = rText.Search( sal_Unicode('*') );
- if (STRING_NOTFOUND != nPos)
- rText.Erase( nPos );
-
- // remove any possible remaining ' ' that may confuse the thesaurus
- // when it gets called with the text
- rText.EraseLeadingAndTrailingChars( sal_Unicode(' ') );
-}
-
// class LookUpComboBox_Impl --------------------------------------------------
LookUpComboBox_Impl::LookUpComboBox_Impl(
@@ -488,7 +459,7 @@ IMPL_LINK( SvxThesaurusDialog_Impl, WordSelectHdl_Impl, ComboBox *, pBox )
{
USHORT nPos = pBox->GetSelectEntryPos();
String aStr( pBox->GetEntry( nPos ) );
- GetReplaceEditString( aStr );
+ aStr = linguistic::GetThesaurusReplaceText( aStr );
aWordCB.SetText( aStr );
LookUp_Impl();
}
@@ -507,7 +478,7 @@ IMPL_LINK( SvxThesaurusDialog_Impl, AlternativesSelectHdl_Impl, SvxCheckListBox
if (pData && !pData->IsHeader())
{
aStr = pData->GetText();
- GetReplaceEditString( aStr );
+ aStr = linguistic::GetThesaurusReplaceText( aStr );
}
aReplaceEdit.SetText( aStr );
}
@@ -525,7 +496,7 @@ IMPL_LINK( SvxThesaurusDialog_Impl, AlternativesDoubleClickHdl_Impl, SvxCheckLis
if (pData && !pData->IsHeader())
{
aStr = pData->GetText();
- GetReplaceEditString( aStr );
+ aStr = linguistic::GetThesaurusReplaceText( aStr );
}
aWordCB.SetText( aStr );
diff --git a/cui/source/options/webconninfo.cxx b/cui/source/options/webconninfo.cxx
index 2eeec105f..8f55c6f51 100644..100755
--- a/cui/source/options/webconninfo.cxx
+++ b/cui/source/options/webconninfo.cxx
@@ -311,10 +311,8 @@ IMPL_LINK( WebConnectionInfoDialog, ChangePasswordHdl, PushButton*, EMPTYARG )
::rtl::OUString aURL = m_aPasswordsLB.GetEntryText( pEntry, 0 );
::rtl::OUString aUserName = m_aPasswordsLB.GetEntryText( pEntry, 1 );
- ::comphelper::DocPasswordRequest* pPasswordRequest
- = new ::comphelper::DocPasswordRequest(
- ::comphelper::DocPasswordRequestType_STANDARD,
- task::PasswordRequestMode_PASSWORD_CREATE, aURL );
+ ::comphelper::SimplePasswordRequest* pPasswordRequest
+ = new ::comphelper::SimplePasswordRequest( task::PasswordRequestMode_PASSWORD_CREATE );
uno::Reference< task::XInteractionRequest > rRequest( pPasswordRequest );
uno::Reference< task::XInteractionHandler > xInteractionHandler(
diff --git a/embedserv/prj/d.lst b/embedserv/prj/d.lst
index 3765f7d97..e01fbabf8 100755
--- a/embedserv/prj/d.lst
+++ b/embedserv/prj/d.lst
@@ -1 +1,2 @@
..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll
+..\%__SRC%\misc\emser.component %_DEST%\xml%_EXT%\emser.component
diff --git a/embedserv/source/embed/register.cxx b/embedserv/source/embed/register.cxx
index d0cacf2e9..6045c40fa 100755
--- a/embedserv/source/embed/register.cxx
+++ b/embedserv/source/embed/register.cxx
@@ -95,34 +95,6 @@ void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServic
return pRet;
}
-sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegistryKey )
-{
- if (pRegistryKey)
- {
- try
- {
- uno::Reference< registry::XRegistryKey > xKey( reinterpret_cast< registry::XRegistryKey* >( pRegistryKey ) );
-
- uno::Reference< registry::XRegistryKey > xNewKey;
-
- xNewKey = xKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) +
- EmbedServer_getImplementationName() +
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) );
-
- uno::Sequence< ::rtl::OUString > rServices = EmbedServer_getSupportedServiceNames();
- for( sal_Int32 ind = 0; ind < rServices.getLength(); ind++ )
- xNewKey->createKey( rServices.getConstArray()[ind] );
-
- return sal_True;
- }
- catch (registry::InvalidRegistryException &)
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
- }
- }
- return sal_False;
-}
-
} // extern "C"
// Fix strange warnings about some
@@ -130,4 +102,4 @@ sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegis
// warning C4505: 'xxx' : unreferenced local function has been removed
#if defined(_MSC_VER)
#pragma warning(disable: 4505)
-#endif \ No newline at end of file
+#endif
diff --git a/embedserv/util/emser.component b/embedserv/util/emser.component
new file mode 100644
index 000000000..682ad1c31
--- /dev/null
+++ b/embedserv/util/emser.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.ole.EmbedServer">
+ <service name="com.sun.star.document.OleEmbeddedServerRegistration"/>
+ </implementation>
+</component>
diff --git a/embedserv/util/exports.dxp b/embedserv/util/exports.dxp
index 9630d7e06..f0e1c6993 100755
--- a/embedserv/util/exports.dxp
+++ b/embedserv/util/exports.dxp
@@ -1,3 +1,2 @@
component_getImplementationEnvironment
-component_writeInfo
component_getFactory
diff --git a/embedserv/util/makefile.mk b/embedserv/util/makefile.mk
index 45e3e4698..5af210d96 100755
--- a/embedserv/util/makefile.mk
+++ b/embedserv/util/makefile.mk
@@ -94,3 +94,11 @@ DEF1EXPORTFILE= exports.dxp
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/emser.component
+
+$(MISC)/emser.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ emser.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt emser.component
diff --git a/extensions/prj/d.lst b/extensions/prj/d.lst
index ecfe0ef9a..5b974816c 100644
--- a/extensions/prj/d.lst
+++ b/extensions/prj/d.lst
@@ -22,6 +22,7 @@ mkdir: %_DEST%\bin%_EXT%\so
..\%__SRC%\bin\npsoplugin_so.dll %_DEST%\bin%_EXT%\so\npsoplugin.dll
..\%__SRC%\bin\x64\so_activex.dll %_DEST%\bin%_EXT%\so_activex_x64.dll
..\%__SRC%\bin\mdibundle.zip %_DEST%\bin%_EXT%\mdibundle.zip
+..\%__SRC%\misc\oleautobridge.component %_DEST%\xml%_EXT%\oleautobridge.component
..\source\bibliography\uiconfig\sbibliography\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sbibliography\menubar\*.xml
@@ -39,3 +40,19 @@ mkdir: %_DEST%\xml%_EXT%\registry\spool\org\openoffice\Office\Logging
..\%__SRC%\misc\registry\spool\org\openoffice\Office\Logging\*.xcu %_DEST%\xml%_EXT%\registry\spool\org\openoffice\Office\Logging
..\%__SRC%\bin\*.oxt %_DEST%\pck%_EXT%\*
+..\%__SRC%\misc\abp.component %_DEST%\xml%_EXT%\abp.component
+..\%__SRC%\misc\bib.component %_DEST%\xml%_EXT%\bib.component
+..\%__SRC%\misc\dbp.component %_DEST%\xml%_EXT%\dbp.component
+..\%__SRC%\misc\ldapbe2.component %_DEST%\xml%_EXT%\ldapbe2.component
+..\%__SRC%\misc\log.component %_DEST%\xml%_EXT%\log.component
+..\%__SRC%\misc\oooimprovecore.component %_DEST%\xml%_EXT%\oooimprovecore.component
+..\%__SRC%\misc\oooimprovement.component %_DEST%\xml%_EXT%\oooimprovement.component
+..\%__SRC%\misc\pcr.component %_DEST%\xml%_EXT%\pcr.component
+..\%__SRC%\misc\pl.component %_DEST%\xml%_EXT%\pl.component
+..\%__SRC%\misc\preload.component %_DEST%\xml%_EXT%\preload.component
+..\%__SRC%\misc\res.component %_DEST%\xml%_EXT%\res.component
+..\%__SRC%\misc\scn.component %_DEST%\xml%_EXT%\scn.component
+..\%__SRC%\misc\updatefeed.component %_DEST%\xml%_EXT%\updatefeed.component
+..\%__SRC%\misc\updchk.component %_DEST%\xml%_EXT%\updchk.component
+..\%__SRC%\misc\updchk.uno.component %_DEST%\xml%_EXT%\updchk.uno.component
+..\%__SRC%\misc\xmx.component %_DEST%\xml%_EXT%\xmx.component
diff --git a/extensions/source/abpilot/abp.component b/extensions/source/abpilot/abp.component
new file mode 100644
index 000000000..a07cef986
--- /dev/null
+++ b/extensions/source/abpilot/abp.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="org.openoffice.comp.abp.OAddressBookSourcePilot">
+ <service name="com.sun.star.ui.dialogs.AddressBookSourcePilot"/>
+ </implementation>
+</component>
diff --git a/extensions/source/abpilot/abpservices.cxx b/extensions/source/abpilot/abpservices.cxx
index f4131c8ba..f589ac0db 100644
--- a/extensions/source/abpilot/abpservices.cxx
+++ b/extensions/source/abpilot/abpservices.cxx
@@ -66,27 +66,6 @@ component_getImplementationEnvironment(
}
//---------------------------------------------------------------------------------------
-extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
- void* pServiceManager,
- void* pRegistryKey
- )
-{
- if (pRegistryKey)
- try
- {
- return ::abp::OModule::writeComponentInfos(
- static_cast<XMultiServiceFactory*>(pServiceManager),
- static_cast<XRegistryKey*>(pRegistryKey));
- }
- catch (InvalidRegistryException& )
- {
- OSL_ASSERT("abp::component_writeInfo: could not create a registry key (InvalidRegistryException) !");
- }
-
- return sal_False;
-}
-
-//---------------------------------------------------------------------------------------
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
const sal_Char* pImplementationName,
void* pServiceManager,
diff --git a/extensions/source/abpilot/exports.dxp b/extensions/source/abpilot/exports.dxp
index 9630d7e06..f0e1c6993 100644
--- a/extensions/source/abpilot/exports.dxp
+++ b/extensions/source/abpilot/exports.dxp
@@ -1,3 +1,2 @@
component_getImplementationEnvironment
-component_writeInfo
component_getFactory
diff --git a/extensions/source/abpilot/makefile.mk b/extensions/source/abpilot/makefile.mk
index 19477e1b6..86bc5c68a 100644
--- a/extensions/source/abpilot/makefile.mk
+++ b/extensions/source/abpilot/makefile.mk
@@ -104,3 +104,11 @@ DEF1EXPORTFILE= exports.dxp
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/abp.component
+
+$(MISC)/abp.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ abp.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt abp.component
diff --git a/extensions/source/bibliography/bib.component b/extensions/source/bibliography/bib.component
new file mode 100644
index 000000000..98627854d
--- /dev/null
+++ b/extensions/source/bibliography/bib.component
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.extensions.Bibliography">
+ <service name="com.sun.star.frame.Bibliography"/>
+ <service name="com.sun.star.frame.FrameLoader"/>
+ </implementation>
+</component>
diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx
index 0b57c4bd4..9d361aff8 100644
--- a/extensions/source/bibliography/bibload.cxx
+++ b/extensions/source/bibliography/bibload.cxx
@@ -225,36 +225,6 @@ extern "C"
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
- sal_Bool SAL_CALL component_writeInfo( void * //pServiceManager
- , registry::XRegistryKey * pRegistryKey )
- {
- try
- {
- rtl::OUString sKey = rtl::OUString::createFromAscii("/");
- sKey += BibliographyLoader::getImplementationName_Static();
- //creates the impl key: /com.sun.star.extensions.Bibliography
- Reference< registry::XRegistryKey > xImplKey = pRegistryKey->createKey(sKey);
-
-
- //sKey += rtl::OUString::createFromAscii("/UNO/SERVICES");
- Reference< registry::XRegistryKey > xNewKey = xImplKey->createKey( C2U("/UNO/SERVICES") );
- Sequence< rtl::OUString > aServices = BibliographyLoader::getSupportedServiceNames_Static();
- for( INT32 i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i]);
- xNewKey = xImplKey->createKey( C2U("/UNO/Loader"));
-
- Reference< registry::XRegistryKey > xPatternKey = xImplKey->createKey( C2U("/Loader/Pattern" ));
- xPatternKey->setAsciiValue( C2U( ".component:Bibliography/*" ) );
-
- return sal_True;
- }
- catch (Exception &)
- {
- return sal_False;
- }
- }
-
-
void * SAL_CALL component_getFactory(
const sal_Char * pImplName, XMultiServiceFactory * pServiceManager, void * /*pRegistryKey*/ )
{
diff --git a/extensions/source/bibliography/makefile.mk b/extensions/source/bibliography/makefile.mk
index f25dce110..e24c32237 100644
--- a/extensions/source/bibliography/makefile.mk
+++ b/extensions/source/bibliography/makefile.mk
@@ -89,3 +89,11 @@ DEF1NAME= $(SHL1TARGET)
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/bib.component
+
+$(MISC)/bib.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ bib.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt bib.component
diff --git a/extensions/source/config/ldap/componentdef.cxx b/extensions/source/config/ldap/componentdef.cxx
index abeb75bb0..bf946c112 100644
--- a/extensions/source/config/ldap/componentdef.cxx
+++ b/extensions/source/config/ldap/componentdef.cxx
@@ -62,13 +62,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment(
}
//------------------------------------------------------------------------------
-extern "C" sal_Bool SAL_CALL component_writeInfo(void *aServiceManager,
- void *aRegistryKey) {
- return cppu::component_writeInfoHelper(
- aServiceManager, aRegistryKey, kImplementations_entries);
-}
-//------------------------------------------------------------------------------
-
extern "C" void *component_getFactory(const sal_Char *aImplementationName,
void *aServiceManager,
void *aRegistryKey) {
diff --git a/extensions/source/config/ldap/exports.dxp b/extensions/source/config/ldap/exports.dxp
index 9630d7e06..f0e1c6993 100644
--- a/extensions/source/config/ldap/exports.dxp
+++ b/extensions/source/config/ldap/exports.dxp
@@ -1,3 +1,2 @@
component_getImplementationEnvironment
-component_writeInfo
component_getFactory
diff --git a/extensions/source/config/ldap/ldapbe2.component b/extensions/source/config/ldap/ldapbe2.component
new file mode 100644
index 000000000..071064d1c
--- /dev/null
+++ b/extensions/source/config/ldap/ldapbe2.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.configuration.backend.LdapUserProfileBe">
+ <service name="com.sun.star.configuration.backend.LdapUserProfileBe"/>
+ </implementation>
+</component>
diff --git a/extensions/source/config/ldap/makefile.mk b/extensions/source/config/ldap/makefile.mk
index a27cb39b6..d35e2428c 100644
--- a/extensions/source/config/ldap/makefile.mk
+++ b/extensions/source/config/ldap/makefile.mk
@@ -95,3 +95,11 @@ DEF1DES=Configuration: LDAP User Profile Backend
.INCLUDE : target.mk
.INCLUDE : $(PRJ)$/util$/target.pmk
+
+ALLTAR : $(MISC)/ldapbe2.component
+
+$(MISC)/ldapbe2.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ ldapbe2.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt ldapbe2.component
diff --git a/extensions/source/dbpilots/dbp.component b/extensions/source/dbpilots/dbp.component
new file mode 100644
index 000000000..84ec98713
--- /dev/null
+++ b/extensions/source/dbpilots/dbp.component
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="org.openoffice.comp.dbp.OGridWizard">
+ <service name="com.sun.star.sdb.GridControlAutoPilot"/>
+ </implementation>
+ <implementation name="org.openoffice.comp.dbp.OGroupBoxWizard">
+ <service name="com.sun.star.sdb.GroupBoxAutoPilot"/>
+ </implementation>
+ <implementation name="org.openoffice.comp.dbp.OListComboWizard">
+ <service name="com.sun.star.sdb.ListComboBoxAutoPilot"/>
+ </implementation>
+</component>
diff --git a/extensions/source/dbpilots/dbpservices.cxx b/extensions/source/dbpilots/dbpservices.cxx
index b7e63c663..726049977 100644
--- a/extensions/source/dbpilots/dbpservices.cxx
+++ b/extensions/source/dbpilots/dbpservices.cxx
@@ -70,27 +70,6 @@ component_getImplementationEnvironment(
}
//---------------------------------------------------------------------------------------
-extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
- void* pServiceManager,
- void* pRegistryKey
- )
-{
- if (pRegistryKey)
- try
- {
- return ::dbp::OModule::writeComponentInfos(
- static_cast<XMultiServiceFactory*>(pServiceManager),
- static_cast<XRegistryKey*>(pRegistryKey));
- }
- catch (InvalidRegistryException& )
- {
- OSL_ASSERT("dbp::component_writeInfo: could not create a registry key (InvalidRegistryException) !");
- }
-
- return sal_False;
-}
-
-//---------------------------------------------------------------------------------------
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
const sal_Char* pImplementationName,
void* pServiceManager,
diff --git a/extensions/source/dbpilots/makefile.mk b/extensions/source/dbpilots/makefile.mk
index b5831e5fd..e37ab0a54 100644
--- a/extensions/source/dbpilots/makefile.mk
+++ b/extensions/source/dbpilots/makefile.mk
@@ -101,3 +101,11 @@ DEF1NAME= $(SHL1TARGET)
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/dbp.component
+
+$(MISC)/dbp.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ dbp.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt dbp.component
diff --git a/extensions/source/inc/componentmodule.cxx b/extensions/source/inc/componentmodule.cxx
index cbcb0cec1..0a9f4bb76 100644
--- a/extensions/source/inc/componentmodule.cxx
+++ b/extensions/source/inc/componentmodule.cxx
@@ -238,54 +238,6 @@ namespace COMPMOD_NAMESPACE
}
//--------------------------------------------------------------------------
- sal_Bool OModule::writeComponentInfos(
- const Reference< XMultiServiceFactory >& /*_rxServiceManager*/,
- const Reference< XRegistryKey >& _rxRootKey)
- {
- OSL_ENSURE(_rxRootKey.is(), "OModule::writeComponentInfos : invalid argument !");
-
- if (!s_pImplementationNames)
- {
- OSL_ASSERT("OModule::writeComponentInfos : have no class infos ! Are you sure called this method at the right time ?");
- return sal_True;
- }
- OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers,
- "OModule::writeComponentInfos : inconsistent state (the pointers) !");
- OSL_ENSURE( (s_pImplementationNames->getLength() == s_pSupportedServices->getLength())
- && (s_pImplementationNames->getLength() == s_pCreationFunctionPointers->getLength())
- && (s_pImplementationNames->getLength() == s_pFactoryFunctionPointers->getLength()),
- "OModule::writeComponentInfos : inconsistent state !");
-
- sal_Int32 nLen = s_pImplementationNames->getLength();
- const ::rtl::OUString* pImplName = s_pImplementationNames->getConstArray();
- const Sequence< ::rtl::OUString >* pServices = s_pSupportedServices->getConstArray();
-
- ::rtl::OUString sRootKey("/", 1, RTL_TEXTENCODING_ASCII_US);
- for (sal_Int32 i=0; i<nLen; ++i, ++pImplName, ++pServices)
- {
- ::rtl::OUString aMainKeyName(sRootKey);
- aMainKeyName += *pImplName;
- aMainKeyName += ::rtl::OUString::createFromAscii("/UNO/SERVICES");
-
- try
- {
- Reference< XRegistryKey > xNewKey( _rxRootKey->createKey(aMainKeyName) );
-
- const ::rtl::OUString* pService = pServices->getConstArray();
- for (sal_Int32 j=0; j<pServices->getLength(); ++j, ++pService)
- xNewKey->createKey(*pService);
- }
- catch(Exception&)
- {
- OSL_ASSERT("OModule::writeComponentInfos : something went wrong while creating the keys !");
- return sal_False;
- }
- }
-
- return sal_True;
- }
-
- //--------------------------------------------------------------------------
Reference< XInterface > OModule::getComponentFactory(
const ::rtl::OUString& _rImplementationName,
const Reference< XMultiServiceFactory >& _rxServiceManager)
diff --git a/extensions/source/inc/componentmodule.hxx b/extensions/source/inc/componentmodule.hxx
index 741903e50..268aa9ce0 100644
--- a/extensions/source/inc/componentmodule.hxx
+++ b/extensions/source/inc/componentmodule.hxx
@@ -121,21 +121,6 @@ typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleService
static void revokeComponent(
const ::rtl::OUString& _rImplementationName);
- /** write the registration information of all known components
- <p>writes the registration information of all components which are currently registered into the
- specified registry.<p/>
- <p>Usually used from within component_writeInfo.<p/>
- @param _rxServiceManager
- the service manager
- @param _rRootKey
- the registry key under which the information will be stored
- @return
- sal_True if the registration of all implementations was successfull, sal_False otherwise
- */
- static sal_Bool writeComponentInfos(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxServiceManager,
- const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey >& _rRootKey);
-
/** creates a Factory for the component with the given implementation name.
<p>Usually used from within component_getFactory.<p/>
@param _rxServiceManager
diff --git a/extensions/source/logging/log.component b/extensions/source/logging/log.component
new file mode 100644
index 000000000..4dd2db56c
--- /dev/null
+++ b/extensions/source/logging/log.component
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.extensions.ConsoleHandler">
+ <service name="com.sun.star.logging.ConsoleHandler"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.extensions.CsvFormatter">
+ <service name="com.sun.star.logging.CsvFormatter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.extensions.FileHandler">
+ <service name="com.sun.star.logging.FileHandler"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.extensions.LoggerPool">
+ <service name="com.sun.star.logging.LoggerPool"/>
+ <singleton name="com.sun.star.logging.LoggerPool"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.extensions.PlainTextFormatter">
+ <service name="com.sun.star.logging.PlainTextFormatter"/>
+ </implementation>
+</component>
diff --git a/extensions/source/logging/makefile.mk b/extensions/source/logging/makefile.mk
index 4a1fa9813..1436576e8 100644
--- a/extensions/source/logging/makefile.mk
+++ b/extensions/source/logging/makefile.mk
@@ -74,3 +74,11 @@ SHL1VERSIONMAP=$(SOLARENV)/src/component.map
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/log.component
+
+$(MISC)/log.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ log.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt log.component
diff --git a/extensions/source/ole/makefile.mk b/extensions/source/ole/makefile.mk
index ad4ecee72..806cd027e 100644
--- a/extensions/source/ole/makefile.mk
+++ b/extensions/source/ole/makefile.mk
@@ -129,3 +129,10 @@ DEF2EXPORTFILE=$(TARGET).dxp
.INCLUDE : target.mk
+ALLTAR : $(MISC)/oleautobridge.component
+
+$(MISC)/oleautobridge.component .ERRREMOVE : \
+ $(SOLARENV)/bin/createcomponent.xslt oleautobridge.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt oleautobridge.component
diff --git a/extensions/source/ole/oleautobridge.component b/extensions/source/ole/oleautobridge.component
new file mode 100644
index 000000000..6f5309e42
--- /dev/null
+++ b/extensions/source/ole/oleautobridge.component
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.ole.OleClient">
+ <service name="com.sun.star.bridge.OleObjectFactory"/>
+ <service name="com.sun.star.bridge.oleautomation.Factory"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.ole.OleConverter2">
+ <service name="com.sun.star.bridge.OleBridgeSupplier2"/>
+ <service name="com.sun.star.bridge.oleautomation.BridgeSupplier"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.ole.OleConverterVar1">
+ <service name="com.sun.star.bridge.OleBridgeSupplierVar1"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.ole.OleServer">
+ <service name="com.sun.star.bridge.OleApplicationRegistration"/>
+ <service name="com.sun.star.bridge.oleautomation.ApplicationRegistration"/>
+ </implementation>
+</component>
diff --git a/extensions/source/ole/oleautobridge.uno.dxp b/extensions/source/ole/oleautobridge.uno.dxp
index e7947188a..1f26fd019 100644
--- a/extensions/source/ole/oleautobridge.uno.dxp
+++ b/extensions/source/ole/oleautobridge.uno.dxp
@@ -1,4 +1,3 @@
-component_writeInfo @100
component_getFactory @101
component_getImplementationEnvironment @102
component_canUnload @103
diff --git a/extensions/source/ole/servreg.cxx b/extensions/source/ole/servreg.cxx
index a0bd98e33..f43b4f6bf 100644
--- a/extensions/source/ole/servreg.cxx
+++ b/extensions/source/ole/servreg.cxx
@@ -119,47 +119,6 @@ extern "C" void * SAL_CALL component_getFactory(
}
-extern "C" sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegistryKey )
-{
- if (pRegistryKey)
- {
- try
- {
- //deprecated
- Reference<XRegistryKey> xNewKey =
- reinterpret_cast<XRegistryKey*>( pRegistryKey)->createKey(reinterpret_cast<const sal_Unicode*>(L"/com.sun.star.comp.ole.OleConverter2/UNO/SERVICES"));
- xNewKey->createKey(reinterpret_cast<const sal_Unicode*>(L"com.sun.star.bridge.OleBridgeSupplier2"));
-
- xNewKey->createKey(reinterpret_cast<const sal_Unicode*>(L"com.sun.star.bridge.oleautomation.BridgeSupplier"));
-
- //deprecated
- xNewKey =
- reinterpret_cast<XRegistryKey*>( pRegistryKey)->createKey(reinterpret_cast<const sal_Unicode*>(L"/com.sun.star.comp.ole.OleConverterVar1/UNO/SERVICES"));
- xNewKey->createKey(reinterpret_cast<const sal_Unicode*>(L"com.sun.star.bridge.OleBridgeSupplierVar1"));
-
- //deprecated
- xNewKey =
- reinterpret_cast<XRegistryKey*>( pRegistryKey)->createKey(reinterpret_cast<const sal_Unicode*>(L"/com.sun.star.comp.ole.OleClient/UNO/SERVICES"));
- xNewKey->createKey(reinterpret_cast<const sal_Unicode*>(L"com.sun.star.bridge.OleObjectFactory"));
-
- xNewKey->createKey(reinterpret_cast<const sal_Unicode*>(L"com.sun.star.bridge.oleautomation.Factory"));
- //deprecated
- xNewKey =
- reinterpret_cast<XRegistryKey*>( pRegistryKey)->createKey(reinterpret_cast<const sal_Unicode*>(L"/com.sun.star.comp.ole.OleServer/UNO/SERVICES"));
- xNewKey->createKey(reinterpret_cast<const sal_Unicode*>(L"com.sun.star.bridge.OleApplicationRegistration"));
-
- xNewKey->createKey(reinterpret_cast<const sal_Unicode*>(L"com.sun.star.bridge.oleautomation.ApplicationRegistration"));
-
- return sal_True;
- }
- catch (InvalidRegistryException &)
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
- }
- }
- return sal_False;
-}
-
extern "C" void SAL_CALL component_getImplementationEnvironment(
const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
{
diff --git a/extensions/source/oooimprovecore/makefile.mk b/extensions/source/oooimprovecore/makefile.mk
index 97e130c3a..f92804dbf 100644
--- a/extensions/source/oooimprovecore/makefile.mk
+++ b/extensions/source/oooimprovecore/makefile.mk
@@ -75,3 +75,11 @@ SHL1VERSIONMAP=$(SOLARENV)/src/component.map
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/oooimprovecore.component
+
+$(MISC)/oooimprovecore.component .ERRREMOVE : \
+ $(SOLARENV)/bin/createcomponent.xslt oooimprovecore.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt oooimprovecore.component
diff --git a/extensions/source/oooimprovecore/oooimprovecore.component b/extensions/source/oooimprovecore/oooimprovecore.component
new file mode 100644
index 000000000..58bdaf37c
--- /dev/null
+++ b/extensions/source/oooimprovecore/oooimprovecore.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.extensions.oooimprovecore.Core">
+ <service name="com.sun.star.oooimprovement.Core"/>
+ </implementation>
+</component>
diff --git a/extensions/source/oooimprovement/invite_job.cxx b/extensions/source/oooimprovement/invite_job.cxx
index 77cef48ce..74204cdb2 100644
--- a/extensions/source/oooimprovement/invite_job.cxx
+++ b/extensions/source/oooimprovement/invite_job.cxx
@@ -121,7 +121,7 @@ namespace oooimprovement
Sequence<OUString> SAL_CALL InviteJob::getSupportedServiceNames_static()
{
Sequence<OUString> aServiceNames(1);
- aServiceNames[0] = OUString::createFromAscii("com.sun.star.task.XAsyncJob");
+ aServiceNames[0] = OUString::createFromAscii("com.sun.star.task.AsyncJob");
return aServiceNames;
}
diff --git a/extensions/source/oooimprovement/makefile.mk b/extensions/source/oooimprovement/makefile.mk
index 6e5d7ab0d..16e3f12f1 100644
--- a/extensions/source/oooimprovement/makefile.mk
+++ b/extensions/source/oooimprovement/makefile.mk
@@ -102,3 +102,11 @@ $(SPOOLDIR)$/$(PACKAGEDIR)$/Jobs$/Jobs-oooimprovement.xcu : $(XCU_SOURCEDIR)$/Jo
$(SPOOLDIR)$/$(PACKAGEDIR)$/Logging$/Logging-oooimprovement.xcu : $(XCU_SOURCEDIR)$/Logging.xcu
@-$(MKDIRHIER) $(@:d)
@$(COPY) $< $@
+
+ALLTAR : $(MISC)/oooimprovement.component
+
+$(MISC)/oooimprovement.component .ERRREMOVE : \
+ $(SOLARENV)/bin/createcomponent.xslt oooimprovement.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt oooimprovement.component
diff --git a/extensions/source/oooimprovement/onlogrotate_job.cxx b/extensions/source/oooimprovement/onlogrotate_job.cxx
index fa497f62f..42dc001ed 100644
--- a/extensions/source/oooimprovement/onlogrotate_job.cxx
+++ b/extensions/source/oooimprovement/onlogrotate_job.cxx
@@ -223,7 +223,7 @@ namespace oooimprovement
Sequence<OUString> SAL_CALL OnLogRotateJob::getSupportedServiceNames_static()
{
Sequence<OUString> aServiceNames(1);
- aServiceNames[0] = OUString::createFromAscii("com.sun.star.task.XAsyncJob");
+ aServiceNames[0] = OUString::createFromAscii("com.sun.star.task.AsyncJob");
return aServiceNames;
}
diff --git a/extensions/source/oooimprovement/oooimprovement.component b/extensions/source/oooimprovement/oooimprovement.component
new file mode 100644
index 000000000..e133f932c
--- /dev/null
+++ b/extensions/source/oooimprovement/oooimprovement.component
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation
+ name="com.sun.star.comp.extensions.oooimprovement.CoreController">
+ <service name="com.sun.star.oooimprovement.CoreController"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.extensions.oooimprovement.InviteJob"/>
+ <implementation
+ name="com.sun.star.comp.extensions.oooimprovement.OnLogRotateJob"/>
+</component>
diff --git a/extensions/source/oooimprovement/oooimprovement_exports.cxx b/extensions/source/oooimprovement/oooimprovement_exports.cxx
index e073088a5..13eb763e1 100644
--- a/extensions/source/oooimprovement/oooimprovement_exports.cxx
+++ b/extensions/source/oooimprovement/oooimprovement_exports.cxx
@@ -65,28 +65,6 @@ extern "C"
void SAL_CALL component_getImplementationEnvironment(const sal_Char** env_type_name, uno_Environment**)
{ *env_type_name = CPPU_CURRENT_LANGUAGE_BINDING_NAME; }
- sal_Bool SAL_CALL component_writeInfo(void*, void* p_reg_key)
- {
- if (!p_reg_key) return sal_False;
- try
- {
- Reference<XRegistryKey> reg_key(reinterpret_cast<XRegistryKey*>(p_reg_key), UNO_QUERY);
- writeInfo(reg_key,
- CoreController::getImplementationName_static(),
- CoreController::getSupportedServiceNames_static()[0]);
- writeInfo(reg_key,
- OnLogRotateJob::getImplementationName_static(),
- OnLogRotateJob::getSupportedServiceNames_static()[0]);
- writeInfo(reg_key,
- InviteJob::getImplementationName_static(),
- InviteJob::getSupportedServiceNames_static()[0]);
- return sal_True;
- }
- catch(const InvalidRegistryException&)
- { OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); }
- return sal_False;
- }
-
void* SAL_CALL component_getFactory(const sal_Char* pImplName, void* pServiceManager, void*)
{
if ( !pServiceManager || !pImplName ) return 0;
diff --git a/extensions/source/plugin/base/service.cxx b/extensions/source/plugin/base/service.cxx
index 3a4b8b78e..eabefd4c4 100644
--- a/extensions/source/plugin/base/service.cxx
+++ b/extensions/source/plugin/base/service.cxx
@@ -54,33 +54,6 @@ extern "C" {
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
- sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pXUnoKey )
- {
- if( pXUnoKey )
- {
- try
- {
- Reference< ::com::sun::star::registry::XRegistryKey > xKey( reinterpret_cast< ::com::sun::star::registry::XRegistryKey* >( pXUnoKey ) );
-
- ::rtl::OUString aImplName = ::rtl::OUString::createFromAscii( "/" );
- aImplName += XPluginManager_Impl::getImplementationName_Static();
- aImplName += ::rtl::OUString::createFromAscii( "/UNO/SERVICES/com.sun.star.plugin.PluginManager" );
- xKey->createKey( aImplName );
-
- aImplName = ::rtl::OUString::createFromAscii( "/" );
- aImplName += PluginModel::getImplementationName_Static();
- aImplName += ::rtl::OUString::createFromAscii( "/UNO/SERVICES/com.sun.star.plugin.PluginModel" );
- xKey->createKey( aImplName );
-
- return sal_True;
- }
- catch( ::com::sun::star::registry::InvalidRegistryException& )
- {
- }
- }
- return sal_False;
- }
-
void* SAL_CALL component_getFactory(
const sal_Char* pImplementationName,
void* pXUnoSMgr,
diff --git a/extensions/source/plugin/util/makefile.mk b/extensions/source/plugin/util/makefile.mk
index 7a8c46c01..765941689 100644
--- a/extensions/source/plugin/util/makefile.mk
+++ b/extensions/source/plugin/util/makefile.mk
@@ -107,3 +107,11 @@ SHL1STDLIBS+=$(SHL1OWNLIBS)
+
+ALLTAR : $(MISC)/pl.component
+
+$(MISC)/pl.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ pl.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt pl.component
diff --git a/extensions/source/plugin/util/pl.component b/extensions/source/plugin/util/pl.component
new file mode 100644
index 000000000..4a9d98f7d
--- /dev/null
+++ b/extensions/source/plugin/util/pl.component
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.extensions.PluginManager">
+ <service name="com.sun.star.plugin.PluginManager"/>
+ </implementation>
+ <implementation name="com.sun.star.extensions.PluginModel">
+ <service name="com.sun.star.plugin.PluginModel"/>
+ </implementation>
+</component>
diff --git a/extensions/source/preload/makefile.mk b/extensions/source/preload/makefile.mk
index fb11a2bfd..8bd622661 100644
--- a/extensions/source/preload/makefile.mk
+++ b/extensions/source/preload/makefile.mk
@@ -83,3 +83,11 @@ DEF1NAME= $(SHL1TARGET)
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/preload.component
+
+$(MISC)/preload.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ preload.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt preload.component
diff --git a/extensions/source/preload/preload.component b/extensions/source/preload/preload.component
new file mode 100644
index 000000000..56a8a0d7a
--- /dev/null
+++ b/extensions/source/preload/preload.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="org.openoffice.comp.preload.OEMPreloadWizard">
+ <service name="org.openoffice.comp.preload.OEMPreloadWizard"/>
+ </implementation>
+</component>
diff --git a/extensions/source/preload/services.cxx b/extensions/source/preload/services.cxx
index b5ef9ceeb..d35c3d1ed 100644
--- a/extensions/source/preload/services.cxx
+++ b/extensions/source/preload/services.cxx
@@ -66,27 +66,6 @@ component_getImplementationEnvironment(
}
//---------------------------------------------------------------------------------------
-extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
- void* pServiceManager,
- void* pRegistryKey
- )
-{
- if (pRegistryKey)
- try
- {
- return ::preload::OModule::writeComponentInfos(
- static_cast<XMultiServiceFactory*>(pServiceManager),
- static_cast<XRegistryKey*>(pRegistryKey));
- }
- catch (InvalidRegistryException& )
- {
- OSL_ASSERT("preload::component_writeInfo: could not create a registry key (InvalidRegistryException) !");
- }
-
- return sal_False;
-}
-
-//---------------------------------------------------------------------------------------
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
const sal_Char* pImplementationName,
void* pServiceManager,
diff --git a/extensions/source/propctrlr/makefile.mk b/extensions/source/propctrlr/makefile.mk
index c69f47bce..ebb629ae3 100644
--- a/extensions/source/propctrlr/makefile.mk
+++ b/extensions/source/propctrlr/makefile.mk
@@ -144,3 +144,11 @@ DEF1NAME= $(SHL1TARGET)
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/pcr.component
+
+$(MISC)/pcr.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ pcr.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt pcr.component
diff --git a/extensions/source/propctrlr/pcr.component b/extensions/source/propctrlr/pcr.component
new file mode 100644
index 000000000..2b606cc01
--- /dev/null
+++ b/extensions/source/propctrlr/pcr.component
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="StringRepresentation">
+ <service name="com.sun.star.inspection.StringRepresentation"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.extensions.ButtonNavigationHandler">
+ <service name="com.sun.star.form.inspection.ButtonNavigationHandler"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.extensions.CellBindingPropertyHandler">
+ <service name="com.sun.star.form.inspection.CellBindingPropertyHandler"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.extensions.EFormsPropertyHandler">
+ <service name="com.sun.star.form.inspection.XMLFormsPropertyHandler"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.extensions.EditPropertyHandler">
+ <service name="com.sun.star.form.inspection.EditPropertyHandler"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.extensions.EventHandler">
+ <service name="com.sun.star.form.inspection.EventHandler"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.extensions.FormComponentPropertyHandler">
+ <service name="com.sun.star.form.inspection.FormComponentPropertyHandler"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.extensions.FormGeometryHandler">
+ <service name="com.sun.star.form.inspection.FormGeometryHandler"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.extensions.GenericPropertyHandler">
+ <service name="com.sun.star.inspection.GenericPropertyHandler"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.extensions.SubmissionPropertyHandler">
+ <service name="com.sun.star.form.inspection.SubmissionPropertyHandler"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.extensions.XSDValidationPropertyHandler">
+ <service name="com.sun.star.form.inspection.XSDValidationPropertyHandler"/>
+ </implementation>
+ <implementation name="org.openoffice.comp.extensions.DefaultFormComponentInspectorModel">
+ <service name="com.sun.star.form.inspection.DefaultFormComponentInspectorModel"/>
+ </implementation>
+ <implementation name="org.openoffice.comp.extensions.DefaultHelpProvider">
+ <service name="com.sun.star.inspection.DefaultHelpProvider"/>
+ </implementation>
+ <implementation name="org.openoffice.comp.extensions.DialogController">
+ <service name="com.sun.star.awt.PropertyBrowserController"/>
+ </implementation>
+ <implementation name="org.openoffice.comp.extensions.FormController">
+ <service name="com.sun.star.form.PropertyBrowserController"/>
+ </implementation>
+ <implementation name="org.openoffice.comp.extensions.ObjectInspector">
+ <service name="com.sun.star.inspection.ObjectInspector"/>
+ </implementation>
+ <implementation name="org.openoffice.comp.extensions.ObjectInspectorModel">
+ <service name="com.sun.star.inspection.ObjectInspectorModel"/>
+ </implementation>
+ <implementation name="org.openoffice.comp.form.ui.MasterDetailLinkDialog">
+ <service name="com.sun.star.form.MasterDetailLinkDialog"/>
+ </implementation>
+ <implementation name="org.openoffice.comp.form.ui.OControlFontDialog">
+ <service name="com.sun.star.form.ControlFontDialog"/>
+ </implementation>
+ <implementation name="org.openoffice.comp.form.ui.OTabOrderDialog">
+ <service name="com.sun.star.form.ui.TabOrderDialog"/>
+ </implementation>
+</component>
diff --git a/extensions/source/propctrlr/pcrservices.cxx b/extensions/source/propctrlr/pcrservices.cxx
index 51d6cc9b8..6a34e9567 100644
--- a/extensions/source/propctrlr/pcrservices.cxx
+++ b/extensions/source/propctrlr/pcrservices.cxx
@@ -104,27 +104,6 @@ component_getImplementationEnvironment(
}
//---------------------------------------------------------------------------------------
-extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
- void* pServiceManager,
- void* pRegistryKey
- )
-{
- if (pRegistryKey)
- try
- {
- return ::pcr::PcrModule::getInstance().writeComponentInfos(
- static_cast<XMultiServiceFactory*>(pServiceManager),
- static_cast<XRegistryKey*>(pRegistryKey));
- }
- catch (InvalidRegistryException& )
- {
- OSL_ASSERT("pcr::component_writeInfo: could not create a registry key (InvalidRegistryException) !");
- }
-
- return sal_False;
-}
-
-//---------------------------------------------------------------------------------------
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
const sal_Char* pImplementationName,
void* pServiceManager,
diff --git a/extensions/source/resource/exports.dxp b/extensions/source/resource/exports.dxp
index 9e59e9403..f0e1c6993 100644
--- a/extensions/source/resource/exports.dxp
+++ b/extensions/source/resource/exports.dxp
@@ -1,3 +1,2 @@
-component_writeInfo
component_getImplementationEnvironment
component_getFactory
diff --git a/extensions/source/resource/makefile.mk b/extensions/source/resource/makefile.mk
index a89d690b7..adeec5fd0 100644
--- a/extensions/source/resource/makefile.mk
+++ b/extensions/source/resource/makefile.mk
@@ -74,3 +74,11 @@ DEF1EXPORTFILE= exports.dxp
.INCLUDE : target.mk
.INCLUDE : $(PRJ)$/util$/target.pmk
+
+ALLTAR : $(MISC)/res.component
+
+$(MISC)/res.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ res.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt res.component
diff --git a/extensions/source/resource/res.component b/extensions/source/resource/res.component
new file mode 100644
index 000000000..57f96609d
--- /dev/null
+++ b/extensions/source/resource/res.component
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.extensions.ResourceService">
+ <service name="com.sun.star.resource.VclStringResourceLoader"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.resource.OpenOfficeResourceLoader">
+ <service name="com.sun.star.resource.OfficeResourceLoader"/>
+ <singleton name="com.sun.star.resource.OfficeResourceLoader"/>
+ </implementation>
+</component>
diff --git a/extensions/source/resource/res_services.cxx b/extensions/source/resource/res_services.cxx
index 73a979c22..dea7cf675 100644
--- a/extensions/source/resource/res_services.cxx
+++ b/extensions/source/resource/res_services.cxx
@@ -29,12 +29,7 @@
#include "precompiled_extensions.hxx"
#include "res_services.hxx"
-/** === begin UNO includes === **/
-#include <com/sun/star/registry/XRegistryKey.hpp>
-/** === end UNO includes === **/
-
/** === begin UNO using === **/
-using ::com::sun::star::registry::XRegistryKey;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Exception;
@@ -64,43 +59,6 @@ void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, XRegistryKey * pRegistryKey )
-{
- try
- {
- ::std::vector< ::res::ComponentInfo > aComponentInfos( ::res::getComponentInfos() );
- for ( ::std::vector< ::res::ComponentInfo >::const_iterator loop = aComponentInfos.begin();
- loop != aComponentInfos.end();
- ++loop
- )
- {
- Reference< XRegistryKey > xNewKey =
- pRegistryKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") )
- + loop->sImplementationName + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" ) ) );
-
- for( sal_Int32 i = 0; i < loop->aSupportedServices.getLength(); ++i )
- xNewKey->createKey( loop->aSupportedServices.getConstArray()[i]);
-
- if ( loop->sSingletonName.getLength() )
- {
- OSL_ENSURE( loop->aSupportedServices.getLength() == 1, "singletons must support exactly one service!" );
- xNewKey = pRegistryKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") )
- + loop->sImplementationName + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SINGLETONS/" ) )
- + loop->sSingletonName );
- xNewKey->setStringValue( loop->aSupportedServices[ 0 ] );
- }
- }
-
- return sal_True;
- }
- catch (Exception &)
- {
- // not allowed to throw an exception over the c function.
- //OSL_ENSURE( sal_False, "Exception cannot register component!" );
- return sal_False;
- }
-}
-
void * SAL_CALL component_getFactory(
const sal_Char * pImplName, XMultiServiceFactory * /*pServiceManager*/, void * /*pRegistryKey*/ )
{
diff --git a/extensions/source/scanner/exports.dxp b/extensions/source/scanner/exports.dxp
index 9630d7e06..f0e1c6993 100644
--- a/extensions/source/scanner/exports.dxp
+++ b/extensions/source/scanner/exports.dxp
@@ -1,3 +1,2 @@
component_getImplementationEnvironment
-component_writeInfo
component_getFactory
diff --git a/extensions/source/scanner/makefile.mk b/extensions/source/scanner/makefile.mk
index ff42864e0..519be1ff8 100644
--- a/extensions/source/scanner/makefile.mk
+++ b/extensions/source/scanner/makefile.mk
@@ -98,3 +98,11 @@ DEF1EXPORTFILE=exports.dxp
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/scn.component
+
+$(MISC)/scn.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ scn.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt scn.component
diff --git a/extensions/source/scanner/scn.component b/extensions/source/scanner/scn.component
new file mode 100644
index 000000000..d7daf3ae3
--- /dev/null
+++ b/extensions/source/scanner/scn.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.scanner.ScannerManager">
+ <service name="com.sun.star.scanner.ScannerManager"/>
+ </implementation>
+</component>
diff --git a/extensions/source/scanner/scnserv.cxx b/extensions/source/scanner/scnserv.cxx
index 1ac61483d..93fe9dbdc 100644
--- a/extensions/source/scanner/scnserv.cxx
+++ b/extensions/source/scanner/scnserv.cxx
@@ -45,37 +45,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char*
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-// -----------------------
-// - component_writeInfo -
-// -----------------------
-
-extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey )
-{
- sal_Bool bRet = sal_False;
-
- if( pRegistryKey )
- {
- try
- {
- ::rtl::OUString aImplName( '/' );
-
- aImplName += ScannerManager::getImplementationName_Static();
- aImplName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES/" ) );
- aImplName += ScannerManager::getImplementationName_Static();
-
- REF( XRegistryKey ) xNewKey1( static_cast< XRegistryKey* >( pRegistryKey )->createKey( aImplName ) );
-
- bRet = sal_True;
- }
- catch( InvalidRegistryException& )
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
- }
- }
-
- return bRet;
-}
-
// ------------------------
// - component_getFactory -
// ------------------------
diff --git a/extensions/source/svg/svguno.cxx b/extensions/source/svg/svguno.cxx
index ba1a5824d..38cf50eab 100644
--- a/extensions/source/svg/svguno.cxx
+++ b/extensions/source/svg/svguno.cxx
@@ -60,36 +60,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-// -----------------------
-// - component_writeInfo -
-// -----------------------
-
-extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey )
-{
- sal_Bool bRet = sal_False;
-
- if( pRegistryKey )
- {
- try
- {
- REF( NMSP_REGISTRY::XRegistryKey ) xNewKey1(
- static_cast< NMSP_REGISTRY::XRegistryKey* >( pRegistryKey )->createKey(
- B2UCONST( "/com.sun.star.comp.extensions.SVGWriter/UNO/SERVICES/com.sun.star.svg.SVGWriter" ) ) );
- REF( NMSP_REGISTRY::XRegistryKey ) xNewKey2(
- static_cast< NMSP_REGISTRY::XRegistryKey* >( pRegistryKey )->createKey(
- B2UCONST( "/com.sun.star.comp.extensions.SVGPrinter/UNO/SERVICES/com.sun.star.svg.SVGPrinter" ) ) );
-
- bRet = sal_True;
- }
- catch( NMSP_REGISTRY::InvalidRegistryException& )
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
- }
- }
-
- return bRet;
-}
-
// ------------------------
// - component_getFactory -
// ------------------------
diff --git a/extensions/source/update/check/makefile.mk b/extensions/source/update/check/makefile.mk
index 9f5f54410..47da869ea 100644
--- a/extensions/source/update/check/makefile.mk
+++ b/extensions/source/update/check/makefile.mk
@@ -132,3 +132,11 @@ $(SPOOLDIR)$/$(PACKAGEDIR)$/Jobs$/Jobs-onlineupdate.xcu : $(XCU_SOURCEDIR)$/Jobs
@$(COPY) $< $@
# @$(PERL) transform.pl < $< > $@
+
+ALLTAR : $(MISC)/updchk.uno.component
+
+$(MISC)/updchk.uno.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ updchk.uno.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt updchk.uno.component
diff --git a/extensions/source/update/check/updatecheckjob.cxx b/extensions/source/update/check/updatecheckjob.cxx
index c75530388..d8d95540a 100755
--- a/extensions/source/update/check/updatecheckjob.cxx
+++ b/extensions/source/update/check/updatecheckjob.cxx
@@ -388,18 +388,6 @@ component_getImplementationEnvironment( const sal_Char **aEnvTypeName, uno_Envir
//------------------------------------------------------------------------------
-extern "C" sal_Bool SAL_CALL
-component_writeInfo(void *pServiceManager, void *pRegistryKey)
-{
- return cppu::component_writeInfoHelper(
- pServiceManager,
- pRegistryKey,
- kImplementations_entries
- );
-}
-
-//------------------------------------------------------------------------------
-
extern "C" void *
component_getFactory(const sal_Char *pszImplementationName, void *pServiceManager, void *pRegistryKey)
{
diff --git a/extensions/source/update/check/updchk.uno.component b/extensions/source/update/check/updchk.uno.component
new file mode 100644
index 000000000..b1eb32917
--- /dev/null
+++ b/extensions/source/update/check/updchk.uno.component
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="vnd.sun.UpdateCheck">
+ <service name="com.sun.star.setup.UpdateCheck"/>
+ </implementation>
+ <implementation name="vnd.sun.UpdateCheckConfig">
+ <service name="com.sun.star.setup.UpdateCheckConfig"/>
+ </implementation>
+</component>
diff --git a/extensions/source/update/feed/makefile.mk b/extensions/source/update/feed/makefile.mk
index 7e12970dd..6361f20bd 100644
--- a/extensions/source/update/feed/makefile.mk
+++ b/extensions/source/update/feed/makefile.mk
@@ -62,3 +62,11 @@ DEF1NAME=$(SHL1TARGET)
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/updatefeed.component
+
+$(MISC)/updatefeed.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ updatefeed.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt updatefeed.component
diff --git a/extensions/source/update/feed/updatefeed.component b/extensions/source/update/feed/updatefeed.component
new file mode 100644
index 000000000..2d53ff5f9
--- /dev/null
+++ b/extensions/source/update/feed/updatefeed.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="vnd.sun.UpdateInformationProvider">
+ <service name="com.sun.star.deployment.UpdateInformationProvider"/>
+ </implementation>
+</component>
diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx
index 9053c4456..b0db10d1c 100644
--- a/extensions/source/update/feed/updatefeed.cxx
+++ b/extensions/source/update/feed/updatefeed.cxx
@@ -851,18 +851,6 @@ component_getImplementationEnvironment( const sal_Char **aEnvTypeName, uno_Envir
//------------------------------------------------------------------------------
-extern "C" sal_Bool SAL_CALL
-component_writeInfo(void *pServiceManager, void *pRegistryKey)
-{
- return cppu::component_writeInfoHelper(
- pServiceManager,
- pRegistryKey,
- kImplementations_entries
- );
-}
-
-//------------------------------------------------------------------------------
-
extern "C" void *
component_getFactory(const sal_Char *pszImplementationName, void *pServiceManager, void *pRegistryKey)
{
diff --git a/extensions/source/update/ui/makefile.mk b/extensions/source/update/ui/makefile.mk
index c4826efba..5ea6994d3 100644
--- a/extensions/source/update/ui/makefile.mk
+++ b/extensions/source/update/ui/makefile.mk
@@ -72,3 +72,11 @@ DEF1NAME=$(SHL1TARGET)
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/updchk.component
+
+$(MISC)/updchk.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ updchk.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt updchk.component
diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx
index 2fd478af3..df2632ba9 100644
--- a/extensions/source/update/ui/updatecheckui.cxx
+++ b/extensions/source/update/ui/updatecheckui.cxx
@@ -1059,18 +1059,6 @@ component_getImplementationEnvironment( const sal_Char **aEnvTypeName, uno_Envir
//------------------------------------------------------------------------------
-extern "C" sal_Bool SAL_CALL
-component_writeInfo(void *pServiceManager, void *pRegistryKey)
-{
- return cppu::component_writeInfoHelper(
- pServiceManager,
- pRegistryKey,
- kImplementations_entries
- );
-}
-
-//------------------------------------------------------------------------------
-
extern "C" void *
component_getFactory(const sal_Char *pszImplementationName, void *pServiceManager, void *pRegistryKey)
{
diff --git a/extensions/source/update/ui/updchk.component b/extensions/source/update/ui/updchk.component
new file mode 100644
index 000000000..bd533e30d
--- /dev/null
+++ b/extensions/source/update/ui/updchk.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="vnd.sun.UpdateCheckUI">
+ <service name="com.sun.star.setup.UpdateCheckUI"/>
+ </implementation>
+</component>
diff --git a/extensions/source/xmlextract/makefile.mk b/extensions/source/xmlextract/makefile.mk
index 0a021027f..fa54df738 100644
--- a/extensions/source/xmlextract/makefile.mk
+++ b/extensions/source/xmlextract/makefile.mk
@@ -63,3 +63,11 @@ SHL1LIBS= $(SLB)$/$(TARGET).lib
# --- Targets ----------------------------------
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/xmx.component
+
+$(MISC)/xmx.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ xmx.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt xmx.component
diff --git a/extensions/source/xmlextract/xmx.component b/extensions/source/xmlextract/xmx.component
new file mode 100644
index 000000000..456ff33b6
--- /dev/null
+++ b/extensions/source/xmlextract/xmx.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.io.XMLExtractor">
+ <service name="com.sun.star.io.XMLExtractor"/>
+ </implementation>
+</component>
diff --git a/extensions/source/xmlextract/xmxuno.cxx b/extensions/source/xmlextract/xmxuno.cxx
index 2d4dfd7f8..5af30267e 100644
--- a/extensions/source/xmlextract/xmxuno.cxx
+++ b/extensions/source/xmlextract/xmxuno.cxx
@@ -52,27 +52,6 @@ void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
//==================================================================================================
-sal_Bool SAL_CALL component_writeInfo(
- void * /*pServiceManager*/, void * pRegistryKey )
-{
- if (pRegistryKey)
- {
- try
- {
- REF( NMSP_REGISTRY::XRegistryKey ) xNewKey(
- reinterpret_cast< NMSP_REGISTRY::XRegistryKey * >( pRegistryKey )->createKey(
- NMSP_RTL::OUString( RTL_CONSTASCII_USTRINGPARAM("/com.sun.star.comp.io.XMLExtractor/UNO/SERVICES/com.sun.star.io.XMLExtractor") ) ) );
-
- return sal_True;
- }
- catch (NMSP_REGISTRY::InvalidRegistryException &)
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
- }
- }
- return sal_False;
-}
-//==================================================================================================
void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
diff --git a/forms/prj/d.lst b/forms/prj/d.lst
index de1655d7d..a708dd3e3 100644
--- a/forms/prj/d.lst
+++ b/forms/prj/d.lst
@@ -5,3 +5,4 @@
..\%__SRC%\bin\*.bin %_DEST%\bin%_EXT%\*.bin
..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res
..\util\*.xml %_DEST%\xml%_EXT%\*.xml
+..\%__SRC%\misc\frm.component %_DEST%\xml%_EXT%\frm.component
diff --git a/forms/source/inc/forms_module.hxx b/forms/source/inc/forms_module.hxx
index 4dac07f1b..0bf225c54 100644
--- a/forms/source/inc/forms_module.hxx
+++ b/forms/source/inc/forms_module.hxx
@@ -101,21 +101,6 @@ namespace FORMS_MODULE_NAMESPACE
static void revokeComponent(
const ::rtl::OUString& _rImplementationName);
- /** write the registration information of all known components
- <p>writes the registration information of all components which are currently registered into the
- specified registry.<p/>
- <p>Usually used from within component_writeInfo.<p/>
- @param _rxServiceManager
- the service manager
- @param _rRootKey
- the registry key under which the information will be stored
- @return
- sal_True if the registration of all implementations was successfull, sal_False otherwise
- */
- static sal_Bool writeComponentInfos(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxServiceManager,
- const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey >& _rRootKey);
-
/** creates a Factory for the component with the given implementation name.
<p>Usually used from within component_getFactory.<p/>
@param _rxServiceManager
diff --git a/forms/source/inc/forms_module_impl.hxx b/forms/source/inc/forms_module_impl.hxx
index a360384c2..5e481c4b5 100644
--- a/forms/source/inc/forms_module_impl.hxx
+++ b/forms/source/inc/forms_module_impl.hxx
@@ -107,54 +107,6 @@ namespace FORMS_MODULE_NAMESPACE
}
//--------------------------------------------------------------------------
- sal_Bool OFormsModule::writeComponentInfos(
- const Reference< XMultiServiceFactory >& /*_rxServiceManager*/,
- const Reference< XRegistryKey >& _rxRootKey)
- {
- OSL_ENSURE(_rxRootKey.is(), "OFormsModule::writeComponentInfos : invalid argument !");
-
- if (!s_pImplementationNames)
- {
- OSL_ASSERT("OFormsModule::writeComponentInfos : have no class infos ! Are you sure called this method at the right time ?");
- return sal_True;
- }
- OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers,
- "OFormsModule::writeComponentInfos : inconsistent state (the pointers) !");
- OSL_ENSURE( (s_pImplementationNames->getLength() == s_pSupportedServices->getLength())
- && (s_pImplementationNames->getLength() == s_pCreationFunctionPointers->getLength())
- && (s_pImplementationNames->getLength() == s_pFactoryFunctionPointers->getLength()),
- "OFormsModule::writeComponentInfos : inconsistent state !");
-
- sal_Int32 nLen = s_pImplementationNames->getLength();
- const ::rtl::OUString* pImplName = s_pImplementationNames->getConstArray();
- const Sequence< ::rtl::OUString >* pServices = s_pSupportedServices->getConstArray();
-
- ::rtl::OUString sRootKey("/", 1, RTL_TEXTENCODING_ASCII_US);
- for (sal_Int32 i=0; i<nLen; ++i, ++pImplName, ++pServices)
- {
- ::rtl::OUString aMainKeyName(sRootKey);
- aMainKeyName += *pImplName;
- aMainKeyName += ::rtl::OUString::createFromAscii("/UNO/SERVICES");
-
- try
- {
- Reference< XRegistryKey > xNewKey( _rxRootKey->createKey(aMainKeyName) );
-
- const ::rtl::OUString* pService = pServices->getConstArray();
- for (sal_Int32 j=0; j<pServices->getLength(); ++j, ++pService)
- xNewKey->createKey(*pService);
- }
- catch(Exception&)
- {
- OSL_ASSERT("OFormsModule::writeComponentInfos : something went wrong while creating the keys !");
- return sal_False;
- }
- }
-
- return sal_True;
- }
-
- //--------------------------------------------------------------------------
Reference< XInterface > OFormsModule::getComponentFactory(
const ::rtl::OUString& _rImplementationName,
const Reference< XMultiServiceFactory >& _rxServiceManager)
diff --git a/forms/source/misc/services.cxx b/forms/source/misc/services.cxx
index 3cfa7efce..423276dc3 100644
--- a/forms/source/misc/services.cxx
+++ b/forms/source/misc/services.cxx
@@ -283,22 +283,6 @@ void ensureClassInfos()
}
-//---------------------------------------------------------------------------------------
-void registerServiceProvider(const ::rtl::OUString& _rServiceImplName, const Sequence< ::rtl::OUString >& _rServices, XRegistryKey* _pKey)
-{
- ::rtl::OUString sMainKeyName = ::rtl::OUString::createFromAscii("/");
- sMainKeyName += _rServiceImplName;
- sMainKeyName += ::rtl::OUString::createFromAscii("/UNO/SERVICES");
- Reference< XRegistryKey > xNewKey = _pKey->createKey(sMainKeyName);
- OSL_ENSURE(xNewKey.is(), "forms::registerProvider : could not create a registry key !");
- if (!xNewKey.is())
- return;
-
- const ::rtl::OUString* pSupportedServices = _rServices.getConstArray();
- for (sal_Int32 i=0; i<_rServices.getLength(); ++i, ++pSupportedServices)
- xNewKey->createKey(*pSupportedServices);
-}
-
//=======================================================================================
extern "C"
{
@@ -342,57 +326,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(const
}
//---------------------------------------------------------------------------------------
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(void* _pServiceManager, XRegistryKey* _pRegistryKey)
-{
- if (_pRegistryKey)
- {
- try
- {
- // ========================================================================
- // the real way - use the OModule
- createRegistryInfo_FORMS();
- if ( !::frm::OFormsModule::writeComponentInfos(
- static_cast<XMultiServiceFactory*>( _pServiceManager ),
- static_cast<XRegistryKey*>( _pRegistryKey ) )
- )
- return sal_False;
-
- // ========================================================================
- // a lot of stuff which is implemented "manually" here in this file
-
- // collect the class infos
- ensureClassInfos();
-
- // both our static sequences should have the same length ...
- sal_Int32 nClasses = s_aClassImplementationNames.getLength();
- OSL_ENSURE(s_aClassServiceNames.getLength() == nClasses,
- "forms::component_writeInfo : invalid class infos !");
-
- // loop through the sequences and register the service providers
- const ::rtl::OUString* pClasses = s_aClassImplementationNames.getConstArray();
- const Sequence< ::rtl::OUString >* pServices = s_aClassServiceNames.getConstArray();
-
- for (sal_Int32 i=0; i<nClasses; ++i, ++pClasses, ++pServices)
- registerServiceProvider(*pClasses, *pServices, _pRegistryKey);
-
- s_aClassImplementationNames.realloc(0);
- s_aClassServiceNames.realloc(0);
- s_aFactories.realloc(0);
-
- return sal_True;
- }
- catch ( InvalidRegistryException& )
- {
- OSL_ENSURE(sal_False, "forms::component_writeInfo : InvalidRegistryException !");
- }
- }
- s_aClassImplementationNames.realloc(0);
- s_aClassServiceNames.realloc(0);
- s_aFactories.realloc(0);
- return sal_False;
-}
-
-//---------------------------------------------------------------------------------------
SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(const sal_Char* _pImplName, XMultiServiceFactory* _pServiceManager, void* /*_pRegistryKey*/)
{
if (!_pServiceManager || !_pImplName)
diff --git a/forms/util/frm.component b/forms/util/frm.component
new file mode 100644
index 000000000..c727e8059
--- /dev/null
+++ b/forms/util/frm.component
@@ -0,0 +1,255 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.form.ONavigationBarControl">
+ <service name="com.sun.star.form.control.NavigationToolBar"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.form.ONavigationBarModel">
+ <service name="com.sun.star.form.FormComponent"/>
+ <service name="com.sun.star.form.FormControlModel"/>
+ <service name="com.sun.star.form.component.NavigationToolBar"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.form.ORichTextControl">
+ <service name="com.sun.star.form.control.RichTextControl"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.forms.FormOperations">
+ <service name="com.sun.star.form.runtime.FormOperations"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.forms.ODatabaseForm">
+ <service name="com.sun.star.form.FormComponent"/>
+ <service name="com.sun.star.form.FormComponents"/>
+ <service name="com.sun.star.form.component.DataForm"/>
+ <service name="com.sun.star.form.component.Form"/>
+ <service name="com.sun.star.form.component.HTMLForm"/>
+ <service name="stardiv.one.form.component.Form"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.forms.OFilterControl">
+ <service name="com.sun.star.awt.UnoControl"/>
+ <service name="com.sun.star.form.control.FilterControl"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.forms.OFormattedFieldWrapper_ForcedFormatted">
+ <service name="com.sun.star.form.binding.BindableDatabaseFormattedField"/>
+ <service name="com.sun.star.form.component.DatabaseFormattedField"/>
+ <service name="com.sun.star.form.component.FormattedField"/>
+ <service name="stardiv.one.form.component.FormattedField"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.forms.ORichTextModel">
+ <service name="com.sun.star.form.FormComponent"/>
+ <service name="com.sun.star.form.FormControlModel"/>
+ <service name="com.sun.star.form.component.RichTextControl"/>
+ <service name="com.sun.star.style.CharacterProperties"/>
+ <service name="com.sun.star.style.CharacterPropertiesAsian"/>
+ <service name="com.sun.star.style.CharacterPropertiesComplex"/>
+ <service name="com.sun.star.style.ParagraphProperties"/>
+ <service name="com.sun.star.style.ParagraphPropertiesComplex"/>
+ <service name="com.sun.star.text.TextRange"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.forms.OScrollBarModel">
+ <service name="com.sun.star.form.FormComponent"/>
+ <service name="com.sun.star.form.FormControlModel"/>
+ <service name="com.sun.star.form.binding.BindableIntegerValueRange"/>
+ <service name="com.sun.star.form.component.ScrollBar"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.forms.OSpinButtonModel">
+ <service name="com.sun.star.form.FormComponent"/>
+ <service name="com.sun.star.form.FormControlModel"/>
+ <service name="com.sun.star.form.binding.BindableIntegerValueRange"/>
+ <service name="com.sun.star.form.component.SpinButton"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.xml.xpath.XFormsExtension">
+ <service name="com.sun.star.xml.xpath.XPathExtension"/>
+ </implementation>
+ <implementation name="com.sun.star.form.ImageProducer">
+ <service name="com.sun.star.awt.ImageProducer"/>
+ </implementation>
+ <implementation name="com.sun.star.form.Model">
+ <service name="com.sun.star.xforms.Model"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OButtonControl">
+ <service name="com.sun.star.form.control.CommandButton"/>
+ <service name="stardiv.one.form.control.CommandButton"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OButtonModel">
+ <service name="com.sun.star.form.component.CommandButton"/>
+ <service name="stardiv.one.form.component.CommandButton"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OCheckBoxControl">
+ <service name="com.sun.star.form.control.CheckBox"/>
+ <service name="stardiv.one.form.control.CheckBox"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OCheckBoxModel">
+ <service name="com.sun.star.form.binding.BindableDatabaseCheckBox"/>
+ <service name="com.sun.star.form.component.CheckBox"/>
+ <service name="com.sun.star.form.component.DatabaseCheckBox"/>
+ <service name="stardiv.one.form.component.CheckBox"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OComboBoxControl">
+ <service name="com.sun.star.form.control.ComboBox"/>
+ <service name="stardiv.one.form.control.ComboBox"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OComboBoxModel">
+ <service name="com.sun.star.form.binding.BindableDatabaseComboBox"/>
+ <service name="com.sun.star.form.component.ComboBox"/>
+ <service name="com.sun.star.form.component.DatabaseComboBox"/>
+ <service name="stardiv.one.form.component.ComboBox"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OCurrencyControl">
+ <service name="com.sun.star.form.control.CurrencyField"/>
+ <service name="stardiv.one.form.control.CurrencyField"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OCurrencyModel">
+ <service name="com.sun.star.form.component.CurrencyField"/>
+ <service name="com.sun.star.form.component.DatabaseCurrencyField"/>
+ <service name="stardiv.one.form.component.CurrencyField"/>
+ </implementation>
+ <implementation name="com.sun.star.form.ODateControl">
+ <service name="com.sun.star.form.control.DateField"/>
+ <service name="stardiv.one.form.control.DateField"/>
+ </implementation>
+ <implementation name="com.sun.star.form.ODateModel">
+ <service name="com.sun.star.form.component.DatabaseDateField"/>
+ <service name="com.sun.star.form.component.DateField"/>
+ <service name="stardiv.one.form.component.DateField"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OEditControl">
+ <service name="com.sun.star.form.control.TextField"/>
+ <service name="stardiv.one.form.control.Edit"/>
+ <service name="stardiv.one.form.control.TextField"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OEditModel">
+ <service name="com.sun.star.form.binding.BindableDatabaseTextField"/>
+ <service name="com.sun.star.form.component.DatabaseTextField"/>
+ <service name="com.sun.star.form.component.TextField"/>
+ <service name="stardiv.one.form.component.TextField"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OFileControlModel">
+ <service name="com.sun.star.form.component.FileControl"/>
+ <service name="stardiv.one.form.component.FileControl"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OFixedTextModel">
+ <service name="com.sun.star.form.component.FixedText"/>
+ <service name="stardiv.one.form.component.FixedText"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OFormattedControl">
+ <service name="com.sun.star.form.control.FormattedField"/>
+ <service name="stardiv.one.form.control.FormattedField"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OFormattedFieldWrapper">
+ <service name="stardiv.one.form.component.Edit"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OFormsCollection">
+ <service name="com.sun.star.form.Forms"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OGridControlModel">
+ <service name="com.sun.star.form.component.GridControl"/>
+ <service name="stardiv.one.form.component.Grid"/>
+ <service name="stardiv.one.form.component.GridControl"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OGroupBoxControl">
+ <service name="com.sun.star.form.control.GroupBox"/>
+ <service name="stardiv.one.form.control.GroupBox"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OGroupBoxModel">
+ <service name="com.sun.star.form.component.GroupBox"/>
+ <service name="stardiv.one.form.component.GroupBox"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OHiddenModel">
+ <service name="com.sun.star.form.component.HiddenControl"/>
+ <service name="stardiv.one.form.component.Hidden"/>
+ <service name="stardiv.one.form.component.HiddenControl"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OImageButtonControl">
+ <service name="com.sun.star.form.control.ImageButton"/>
+ <service name="stardiv.one.form.control.ImageButton"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OImageButtonModel">
+ <service name="com.sun.star.form.component.ImageButton"/>
+ <service name="stardiv.one.form.component.ImageButton"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OImageControlControl">
+ <service name="com.sun.star.form.control.ImageControl"/>
+ <service name="stardiv.one.form.control.ImageControl"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OImageControlModel">
+ <service name="com.sun.star.form.component.DatabaseImageControl"/>
+ <service name="stardiv.one.form.component.ImageControl"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OListBoxControl">
+ <service name="com.sun.star.form.control.ListBox"/>
+ <service name="stardiv.one.form.control.ListBox"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OListBoxModel">
+ <service name="com.sun.star.form.binding.BindableDatabaseListBox"/>
+ <service name="com.sun.star.form.component.DatabaseListBox"/>
+ <service name="com.sun.star.form.component.ListBox"/>
+ <service name="stardiv.one.form.component.ListBox"/>
+ </implementation>
+ <implementation name="com.sun.star.form.ONumericControl">
+ <service name="com.sun.star.form.control.NumericField"/>
+ <service name="stardiv.one.form.control.NumericField"/>
+ </implementation>
+ <implementation name="com.sun.star.form.ONumericModel">
+ <service name="com.sun.star.form.binding.BindableDatabaseNumericField"/>
+ <service name="com.sun.star.form.component.DatabaseNumericField"/>
+ <service name="com.sun.star.form.component.NumericField"/>
+ <service name="stardiv.one.form.component.NumericField"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OPatternControl">
+ <service name="com.sun.star.form.control.PatternField"/>
+ <service name="stardiv.one.form.control.PatternField"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OPatternModel">
+ <service name="com.sun.star.form.component.DatabasePatternField"/>
+ <service name="com.sun.star.form.component.PatternField"/>
+ <service name="stardiv.one.form.component.PatternField"/>
+ </implementation>
+ <implementation name="com.sun.star.form.ORadioButtonControl">
+ <service name="com.sun.star.form.control.RadioButton"/>
+ <service name="stardiv.one.form.control.RadioButton"/>
+ </implementation>
+ <implementation name="com.sun.star.form.ORadioButtonModel">
+ <service name="com.sun.star.form.binding.BindableDatabaseRadioButton"/>
+ <service name="com.sun.star.form.component.DatabaseRadioButton"/>
+ <service name="com.sun.star.form.component.RadioButton"/>
+ <service name="stardiv.one.form.component.RadioButton"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OTimeControl">
+ <service name="com.sun.star.form.control.TimeField"/>
+ <service name="stardiv.one.form.control.TimeField"/>
+ </implementation>
+ <implementation name="com.sun.star.form.OTimeModel">
+ <service name="com.sun.star.form.component.DatabaseTimeField"/>
+ <service name="com.sun.star.form.component.TimeField"/>
+ <service name="stardiv.one.form.component.TimeField"/>
+ </implementation>
+ <implementation name="com.sun.star.form.XForms">
+ <service name="com.sun.star.xforms.XForms"/>
+ </implementation>
+</component>
diff --git a/forms/util/frm.dxp b/forms/util/frm.dxp
index 9e59e9403..f0e1c6993 100644
--- a/forms/util/frm.dxp
+++ b/forms/util/frm.dxp
@@ -1,3 +1,2 @@
-component_writeInfo
component_getImplementationEnvironment
component_getFactory
diff --git a/forms/util/makefile.mk b/forms/util/makefile.mk
index 00d7a81d5..5ce7dd256 100644
--- a/forms/util/makefile.mk
+++ b/forms/util/makefile.mk
@@ -112,3 +112,11 @@ $(MISC)$/$(SHL1TARGET).flt: makefile.mk
@echo NavigationToolBar >>$@
@echo ONavigationBar >>$@
+
+ALLTAR : $(MISC)/frm.component
+
+$(MISC)/frm.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ frm.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt frm.component
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java
index d3ba4abc5..30a222d3b 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java
@@ -76,6 +76,7 @@ public class InstallData
static private boolean useRtl = false;
static private boolean installedProductMinorSet = false;
static private boolean isDebianSystem = false;
+ static private boolean useForceDebian = false; /* --force-debian */
static private boolean debianInvestigated = false;
static private String installType; /* custom or typical installation */
static private String osType; /* Linux, SunOS, ... */
@@ -667,6 +668,14 @@ public class InstallData
isDebianSystem = value;
}
+ public boolean useForceDebian() {
+ return useForceDebian;
+ }
+
+ public void setUseForceDebian(boolean value) {
+ useForceDebian = value;
+ }
+
public boolean databaseQueried() {
return databaseQueried;
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java
index c66c84a56..204c9e18e 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java
@@ -202,12 +202,13 @@ public class LinuxInstaller extends Installer {
}
if ( data.isDebianSystem() ) {
- forceDebianString = "--force-debian";
nodepsString = "--nodeps";
+
+ if ( data.useForceDebian() ) {
+ forceDebianString = "--force-debian";
+ }
}
- String rpmCommand = "";
- String[] rpmCommandArray;
String databasePath = null;
String databaseString = "";
boolean useLocalDatabase = false;
@@ -225,130 +226,57 @@ public class LinuxInstaller extends Installer {
useLocalDatabase = true;
}
- if (useForce) {
- if (useLocalDatabase) {
- if ( relocations != null ) {
- rpmCommand = "rpm --upgrade --ignoresize --force " + forceDebianString + " " + nodepsString + " -vh " +
- "--relocate " + relocations + " " + databaseString +
- " " + databasePath + " " + packageName;
- rpmCommandArray = new String[12];
- rpmCommandArray[0] = "rpm";
- rpmCommandArray[1] = "--upgrade";
- rpmCommandArray[2] = "--ignoresize";
- rpmCommandArray[3] = "--force";
- rpmCommandArray[4] = forceDebianString;
- rpmCommandArray[5] = nodepsString;
- rpmCommandArray[6] = "-vh";
- rpmCommandArray[7] = "--relocate";
- rpmCommandArray[8] = relocations;
- rpmCommandArray[9] = databaseString;
- rpmCommandArray[10] = databasePath;
- rpmCommandArray[11] = packageName;
- } else {
- rpmCommand = "rpm --upgrade --ignoresize --force " + forceDebianString + " " + nodepsString + " -vh " +
- databaseString + " " + databasePath + " " + packageName;
- rpmCommandArray = new String[10];
- rpmCommandArray[0] = "rpm";
- rpmCommandArray[1] = "--upgrade";
- rpmCommandArray[2] = "--ignoresize";
- rpmCommandArray[3] = "--force";
- rpmCommandArray[4] = forceDebianString;
- rpmCommandArray[5] = nodepsString;
- rpmCommandArray[6] = "-vh";
- rpmCommandArray[7] = databaseString;
- rpmCommandArray[8] = databasePath;
- rpmCommandArray[9] = packageName;
- }
- } else {
- if ( relocations != null )
- {
- rpmCommand = "rpm --upgrade --ignoresize --force " + forceDebianString + " " + nodepsString + " -vh " +
- "--relocate " + relocations + " " + packageName;
- rpmCommandArray = new String[10];
- rpmCommandArray[0] = "rpm";
- rpmCommandArray[1] = "--upgrade";
- rpmCommandArray[2] = "--ignoresize";
- rpmCommandArray[3] = "--force";
- rpmCommandArray[4] = forceDebianString;
- rpmCommandArray[5] = nodepsString;
- rpmCommandArray[6] = "-vh";
- rpmCommandArray[7] = "--relocate";
- rpmCommandArray[8] = relocations;
- rpmCommandArray[9] = packageName;
- } else {
- rpmCommand = "rpm --upgrade --ignoresize --force " + forceDebianString + " " + nodepsString + " -vh " + packageName;
- rpmCommandArray = new String[8];
- rpmCommandArray[0] = "rpm";
- rpmCommandArray[1] = "--upgrade";
- rpmCommandArray[2] = "--ignoresize";
- rpmCommandArray[3] = "--force";
- rpmCommandArray[4] = forceDebianString;
- rpmCommandArray[5] = nodepsString;
- rpmCommandArray[6] = "-vh";
- rpmCommandArray[7] = packageName;
- }
- }
- } else {
- if (useLocalDatabase) {
- if ( relocations != null ) {
- rpmCommand = "rpm --upgrade --ignoresize " + forceDebianString + " " + nodepsString + " -vh " +
- "--relocate " + relocations + " " + databaseString +
- " " + databasePath + " " + packageName;
- rpmCommandArray = new String[11];
- rpmCommandArray[0] = "rpm";
- rpmCommandArray[1] = "--upgrade";
- rpmCommandArray[2] = "--ignoresize";
- rpmCommandArray[3] = forceDebianString;
- rpmCommandArray[4] = nodepsString;
- rpmCommandArray[5] = "-vh";
- rpmCommandArray[6] = "--relocate";
- rpmCommandArray[7] = relocations;
- rpmCommandArray[8] = databaseString;
- rpmCommandArray[9] = databasePath;
- rpmCommandArray[10] = packageName;
- } else {
- rpmCommand = "rpm --upgrade --ignoresize " + forceDebianString + " " + nodepsString + " -vh " +
- databaseString + " " + databasePath + " " + packageName;
- rpmCommandArray = new String[9];
- rpmCommandArray[0] = "rpm";
- rpmCommandArray[1] = "--upgrade";
- rpmCommandArray[2] = "--ignoresize";
- rpmCommandArray[3] = forceDebianString;
- rpmCommandArray[4] = nodepsString;
- rpmCommandArray[5] = "-vh";
- rpmCommandArray[6] = databaseString;
- rpmCommandArray[7] = databasePath;
- rpmCommandArray[8] = packageName;
- }
- } else {
- if ( relocations != null )
- {
- rpmCommand = "rpm --upgrade --ignoresize " + forceDebianString + " " + nodepsString + " -vh " +
- "--relocate " + relocations + " " + packageName;
- rpmCommandArray = new String[9];
- rpmCommandArray[0] = "rpm";
- rpmCommandArray[1] = "--upgrade";
- rpmCommandArray[2] = "--ignoresize";
- rpmCommandArray[3] = forceDebianString;
- rpmCommandArray[4] = nodepsString;
- rpmCommandArray[5] = "-vh";
- rpmCommandArray[6] = "--relocate";
- rpmCommandArray[7] = relocations;
- rpmCommandArray[8] = packageName;
- } else {
- rpmCommand = "rpm --upgrade --ignoresize " + forceDebianString + " " + nodepsString + " -vh " + packageName;
- rpmCommandArray = new String[7];
- rpmCommandArray[0] = "rpm";
- rpmCommandArray[1] = "--upgrade";
- rpmCommandArray[2] = "--ignoresize";
- rpmCommandArray[3] = forceDebianString;
- rpmCommandArray[4] = nodepsString;
- rpmCommandArray[5] = "-vh";
- rpmCommandArray[6] = packageName;
- }
- }
+ // Defining a Vector that contains the full rpm command. Then the string array can be
+ // created dynamically. Otherwise there would be too many different scenarios.
+
+ Vector rpmVector = new Vector();
+
+ rpmVector.add("rpm");
+ rpmVector.add("--upgrade");
+ rpmVector.add("--ignoresize");
+
+ if ( useForce ) {
+ rpmVector.add("--force");
}
-
+
+ if ( ! forceDebianString.equals("") ) {
+ rpmVector.add(forceDebianString);
+ }
+
+ if ( ! nodepsString.equals("") ) {
+ rpmVector.add(nodepsString);
+ }
+
+ rpmVector.add("-vh");
+
+ if ( relocations != null ) {
+ rpmVector.add("--relocate");
+ rpmVector.add(relocations);
+ }
+
+ if ( useLocalDatabase ) {
+ rpmVector.add(databaseString);
+ rpmVector.add(databasePath);
+ }
+
+ rpmVector.add(packageName);
+
+ // Creating String and StringArray for rpm command
+
+ int capacity = rpmVector.size();
+
+ String rpmCommand = "";
+ String[] rpmCommandArray = new String[capacity];
+
+ for (int i = 0; i < rpmVector.size(); i++) {
+ rpmCommandArray[i] = (String)rpmVector.get(i);
+ rpmCommand = rpmCommand + " " + (String)rpmVector.get(i);
+ }
+
+ rpmCommand = rpmCommand.trim();
+
+ // Staring rpm process
+
Vector returnVector = new Vector();
Vector returnErrorVector = new Vector();
// int returnValue = SystemManager.executeProcessReturnVector(rpmCommand, returnVector, returnErrorVector);
@@ -407,8 +335,6 @@ public class LinuxInstaller extends Installer {
String databasePath = data.getDatabasePath();
String databaseString = "";
boolean useLocalDatabase = false;
- String rpmCommand;
- String[] rpmCommandArray;
if (( databasePath != null ) && (! databasePath.equalsIgnoreCase("null"))) {
databaseString = "--dbpath";
@@ -427,51 +353,52 @@ public class LinuxInstaller extends Installer {
}
if ( data.isDebianSystem() ) {
- forceDebianString = "--force-debian";
nodepsString = "--nodeps";
+
+ if ( data.useForceDebian() ) {
+ forceDebianString = "--force-debian";
+ }
}
-
- // Code duplication for isDebianSystem is necessary, because there is no valid position
- // for forceDebianString, if it is empty. This is no problem in installPackage.
- if ( data.isDebianSystem() ) {
-
- if (useLocalDatabase) {
- rpmCommand = "rpm " + forceDebianString + " " + nodepsString + " -ev" + " " + databaseString + " " + databasePath + " " + packageName;
- rpmCommandArray = new String[7];
- rpmCommandArray[0] = "rpm";
- rpmCommandArray[1] = forceDebianString;
- rpmCommandArray[2] = nodepsString;
- rpmCommandArray[3] = "-ev";
- rpmCommandArray[4] = databaseString;
- rpmCommandArray[5] = databasePath;
- rpmCommandArray[6] = packageName;
- } else {
- rpmCommand = "rpm " + forceDebianString + " " + nodepsString + " -ev" + " " + packageName;
- rpmCommandArray = new String[5];
- rpmCommandArray[0] = "rpm";
- rpmCommandArray[1] = forceDebianString;
- rpmCommandArray[2] = nodepsString;
- rpmCommandArray[3] = "-ev";
- rpmCommandArray[4] = packageName;
- }
- } else {
- if (useLocalDatabase) {
- rpmCommand = "rpm -ev" + " " + databaseString + " " + databasePath + " " + packageName;
- rpmCommandArray = new String[5];
- rpmCommandArray[0] = "rpm";
- rpmCommandArray[1] = "-ev";
- rpmCommandArray[2] = databaseString;
- rpmCommandArray[3] = databasePath;
- rpmCommandArray[4] = packageName;
- } else {
- rpmCommand = "rpm -ev" + " " + packageName;
- rpmCommandArray = new String[3];
- rpmCommandArray[0] = "rpm";
- rpmCommandArray[1] = "-ev";
- rpmCommandArray[2] = packageName;
- }
+ // Defining a Vector that contains the full rpm command. Then the string array can be
+ // created dynamically. Otherwise there would be too many different scenarios.
+
+ Vector rpmVector = new Vector();
+
+ rpmVector.add("rpm");
+
+ if ( ! forceDebianString.equals("") ) {
+ rpmVector.add(forceDebianString);
}
+
+ if ( ! nodepsString.equals("") ) {
+ rpmVector.add(nodepsString);
+ }
+
+ rpmVector.add("-ev");
+
+ if ( useLocalDatabase ) {
+ rpmVector.add(databaseString);
+ rpmVector.add(databasePath);
+ }
+
+ rpmVector.add(packageName);
+
+ // Creating String and StringArray for rpm command
+
+ int capacity = rpmVector.size();
+
+ String rpmCommand = "";
+ String[] rpmCommandArray = new String[capacity];
+
+ for (int i = 0; i < rpmVector.size(); i++) {
+ rpmCommandArray[i] = (String)rpmVector.get(i);
+ rpmCommand = rpmCommand + " " + (String)rpmVector.get(i);
+ }
+
+ rpmCommand = rpmCommand.trim();
+
+ // Starting rpm process
Vector returnVector = new Vector();
Vector returnErrorVector = new Vector();
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java
index 9ce41daf2..fb8bfa96a 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java
@@ -383,21 +383,33 @@ import java.util.Vector;public class LinuxHelper {
public void investigateDebian(InstallData data) {
- // String rpmQuery = "rpm --help;
- String[] rpmQueryArray = new String[2];
- rpmQueryArray[0] = "rpm";
- rpmQueryArray[1] = "--help";
-
- Vector returnVector = new Vector();
- Vector returnErrorVector = new Vector();
- int returnValue = ExecuteProcess.executeProcessReturnVector(rpmQueryArray, returnVector, returnErrorVector);
+ // First check: Is this a Debian system?
- // Checking if the return vector contains the string "force-debian"
+ String dpkgFile = "/usr/bin/dpkg";
+
+ if ( new File(dpkgFile).exists() ) {
+
+ data.setIsDebianSystem(true);
+
+ // Second check: If this is a Debian system, is "--force-debian" required? Older
+ // versions do not support "--force-debian".
+
+ // String rpmQuery = "rpm --help;
+ String[] rpmQueryArray = new String[2];
+ rpmQueryArray[0] = "rpm";
+ rpmQueryArray[1] = "--help";
+
+ Vector returnVector = new Vector();
+ Vector returnErrorVector = new Vector();
+ int returnValue = ExecuteProcess.executeProcessReturnVector(rpmQueryArray, returnVector, returnErrorVector);
+
+ // Checking if the return vector contains the string "force-debian"
- for (int i = 0; i < returnVector.size(); i++) {
- String line = (String) returnVector.get(i);
- if ( line.indexOf("force-debian") > -1 ) {
- data.setIsDebianSystem(true);
+ for (int i = 0; i < returnVector.size(); i++) {
+ String line = (String) returnVector.get(i);
+ if ( line.indexOf("force-debian") > -1 ) {
+ data.setUseForceDebian(true);
+ }
}
}
}
diff --git a/lingucomponent/prj/d.lst b/lingucomponent/prj/d.lst
index 666ee38d5..4760a299c 100644
--- a/lingucomponent/prj/d.lst
+++ b/lingucomponent/prj/d.lst
@@ -46,3 +46,8 @@ mkdir: %_DEST%\xml%_EXT%\registry\data\org\openoffice
mkdir: %_DEST%\xml%_EXT%\registry\data\org\openoffice\Office
..\config\*.xcu %_DEST%\xml%_EXT%\registry\data\org\openoffice\Office\*.xcu
+..\%__SRC%\misc\MacOSXSpell.component %_DEST%\xml%_EXT%\MacOSXSpell.component
+..\%__SRC%\misc\guesslang.component %_DEST%\xml%_EXT%\guesslang.component
+..\%__SRC%\misc\hyphen.component %_DEST%\xml%_EXT%\hyphen.component
+..\%__SRC%\misc\lnth.component %_DEST%\xml%_EXT%\lnth.component
+..\%__SRC%\misc\spell.component %_DEST%\xml%_EXT%\spell.component
diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/exports.dxp b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/exports.dxp
index b0f85bf7b..a9861e3ff 100644
--- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/exports.dxp
+++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/exports.dxp
@@ -1,3 +1,2 @@
component_getFactory
component_getImplementationEnvironment
-component_writeInfo
diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hreg.cxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hreg.cxx
index defbec837..8ccf152d7 100644
--- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hreg.cxx
+++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hreg.cxx
@@ -42,9 +42,6 @@ using namespace com::sun::star::registry;
// declaration of external RegEntry-functions defined by the service objects
//
-extern sal_Bool SAL_CALL Hyphenator_writeInfo(
- void * /*pServiceManager*/, XRegistryKey * pRegistryKey );
-
extern void * SAL_CALL Hyphenator_getFactory(
const sal_Char * pImplName,
XMultiServiceFactory * pServiceManager,
@@ -57,12 +54,6 @@ extern void * SAL_CALL Hyphenator_getFactory(
extern "C"
{
-sal_Bool SAL_CALL component_writeInfo(
- void * pServiceManager, XRegistryKey * pRegistryKey )
-{
- return Hyphenator_writeInfo( pServiceManager, pRegistryKey );
-}
-
void SAL_CALL component_getImplementationEnvironment(
const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
{
diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphen.component b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphen.component
new file mode 100644
index 000000000..aeae4c577
--- /dev/null
+++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphen.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="org.openoffice.lingu.LibHnjHyphenator">
+ <service name="com.sun.star.linguistic2.Hyphenator"/>
+ </implementation>
+</component>
diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
index 2cdd99740..7f79def24 100755
--- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
+++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
@@ -32,7 +32,6 @@
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/linguistic2/XSearchableDictionaryList.hpp>
-//#include <com/sun/star/linguistic2/SpellFailure.hpp>
#include <cppuhelper/factory.hxx> // helper for factories
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <i18npool/mslangid.hxx>
@@ -43,15 +42,12 @@
#include <osl/mutex.hxx>
#include <hyphen.h>
-
-#ifndef _HYPHENIMP_HXX
#include <hyphenimp.hxx>
-#endif
#include <linguistic/hyphdta.hxx>
#include <rtl/ustring.hxx>
-
#include <rtl/ustrbuf.hxx>
+#include <rtl/textenc.h>
#include <linguistic/lngprops.hxx>
#include <unotools/pathoptions.hxx>
@@ -97,9 +93,8 @@ Hyphenator::Hyphenator() :
{
bDisposing = FALSE;
pPropHelper = NULL;
- aDicts = NULL;
- numdict = 0;
-
+ aDicts = NULL;
+ numdict = 0;
}
@@ -108,21 +103,22 @@ Hyphenator::~Hyphenator()
if (pPropHelper)
pPropHelper->RemoveAsPropListener();
- if ((numdict) && (aDicts)) {
- for (int i=0; i < numdict; i++) {
+ if ((numdict) && (aDicts))
+ {
+ for (int i=0; i < numdict; i++)
+ {
if (aDicts[i].apCC) delete aDicts[i].apCC;
aDicts[i].apCC = NULL;
- }
+ }
}
- if (aDicts) delete[] aDicts;
+ if (aDicts) delete[] aDicts;
aDicts = NULL;
- numdict = 0;
+ numdict = 0;
}
PropertyHelper_Hyphen & Hyphenator::GetPropHelper_Impl()
{
-
if (!pPropHelper)
{
Reference< XPropertySet > xPropSet( GetLinguProperties(), UNO_QUERY );
@@ -212,12 +208,7 @@ Sequence< Locale > SAL_CALL Hyphenator::getLocales()
// add dictionary information
aDicts = new HDInfo[numdict];
-/*
- aTEncs = new rtl_TextEncoding [numdict];
- aTLocs = new Locale [numdict];
- aTNames = new OUString [numdict];
- aCharSetInfo = new CharClass* [numdict];
-*/
+
k = 0;
for (aDictIt = aDics.begin(); aDictIt != aDics.end(); ++aDictIt)
{
@@ -233,7 +224,7 @@ Sequence< Locale > SAL_CALL Hyphenator::getLocales()
for (sal_Int32 i = 0; i < nLocales; ++i)
{
aDicts[k].aPtr = NULL;
- aDicts[k].aEnc = 0;
+ aDicts[k].eEnc = RTL_TEXTENCODING_DONTKNOW;
aDicts[k].aLoc = MsLangId::convertLanguageToLocale(
MsLangId::convertIsoStringToLanguage( aDictIt->aLocaleNames[i] ));
aDicts[k].apCC = new CharClass( aDicts[k].aLoc );
@@ -288,240 +279,268 @@ sal_Bool SAL_CALL Hyphenator::hasLocale(const Locale& rLocale)
}
-Reference< XHyphenatedWord > SAL_CALL
-Hyphenator::hyphenate( const ::rtl::OUString& aWord,
- const ::com::sun::star::lang::Locale& aLocale,
- sal_Int16 nMaxLeading,
- const ::com::sun::star::beans::PropertyValues& aProperties )
- throw (com::sun::star::uno::RuntimeException,
- com::sun::star::lang::IllegalArgumentException)
+Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const ::rtl::OUString& aWord,
+ const ::com::sun::star::lang::Locale& aLocale,
+ sal_Int16 nMaxLeading,
+ const ::com::sun::star::beans::PropertyValues& aProperties )
+ throw (com::sun::star::uno::RuntimeException, com::sun::star::lang::IllegalArgumentException)
{
int nHyphenationPos = -1;
- int nHyphenationPosAlt = -1;
- int nHyphenationPosAltHyph = -1;
+ int nHyphenationPosAlt = -1;
+ int nHyphenationPosAltHyph = -1;
int wordlen;
char *hyphens;
- char *lcword;
- int k = 0;
+ char *lcword;
+ int k = 0;
- PropertyHelper_Hyphen & rHelper = GetPropHelper();
- rHelper.SetTmpPropVals(aProperties);
+ PropertyHelper_Hyphen & rHelper = GetPropHelper();
+ rHelper.SetTmpPropVals(aProperties);
sal_Int16 minTrail = rHelper.GetMinTrailing();
sal_Int16 minLead = rHelper.GetMinLeading();
sal_Int16 minLen = rHelper.GetMinWordLength();
HyphenDict *dict = NULL;
- rtl_TextEncoding aEnc = 0;
- CharClass * pCC = NULL;
+ rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW;
+ CharClass * pCC = NULL;
Reference< XHyphenatedWord > xRes;
- k = -1;
- for (int j = 0; j < numdict; j++)
- if (aLocale == aDicts[j].aLoc) k = j;
-
-
- // if we have a hyphenation dictionary matching this locale
- if (k != -1) {
+ k = -1;
+ for (int j = 0; j < numdict; j++)
+ {
+ if (aLocale == aDicts[j].aLoc)
+ k = j;
+ }
+ // if we have a hyphenation dictionary matching this locale
+ if (k != -1)
+ {
// if this dictinary has not been loaded yet do that
- if (!aDicts[k].aPtr) {
-
- OUString DictFN = aDicts[k].aName + A2OU(".dic");
- OUString dictpath;
+ if (!aDicts[k].aPtr)
+ {
+ OUString DictFN = aDicts[k].aName + A2OU(".dic");
+ OUString dictpath;
- osl::FileBase::getSystemPathFromFileURL( DictFN, dictpath );
- OString sTmp( OU2ENC( dictpath, osl_getThreadTextEncoding() ) );
+ osl::FileBase::getSystemPathFromFileURL( DictFN, dictpath );
+ OString sTmp( OU2ENC( dictpath, osl_getThreadTextEncoding() ) );
#if defined(WNT)
- // workaround for Windows specifc problem that the
- // path length in calls to 'fopen' is limted to somewhat
- // about 120+ characters which will usually be exceed when
- // using dictionaries as extensions.
- sTmp = Win_GetShortPathName( dictpath );
+ // workaround for Windows specifc problem that the
+ // path length in calls to 'fopen' is limted to somewhat
+ // about 120+ characters which will usually be exceed when
+ // using dictionaries as extensions.
+ sTmp = Win_GetShortPathName( dictpath );
#endif
- if ( ( dict = hnj_hyphen_load ( sTmp.getStr()) ) == NULL )
- {
- fprintf(stderr, "Couldn't find file %s\n", OU2ENC(dictpath, osl_getThreadTextEncoding()) );
- return NULL;
- }
- aDicts[k].aPtr = dict;
- aDicts[k].aEnc = rtl_getTextEncodingFromUnixCharset(dict->cset);
- if (aDicts[k].aEnc == RTL_TEXTENCODING_DONTKNOW) {
- if (strcmp("ISCII-DEVANAGARI", dict->cset) == 0) {
- aDicts[k].aEnc = RTL_TEXTENCODING_ISCII_DEVANAGARI;
- } else if (strcmp("UTF-8", dict->cset) == 0) {
- aDicts[k].aEnc = RTL_TEXTENCODING_UTF8;
- }
- }
+ if ( ( dict = hnj_hyphen_load ( sTmp.getStr()) ) == NULL )
+ {
+ fprintf(stderr, "Couldn't find file %s\n", OU2ENC(dictpath, osl_getThreadTextEncoding()) );
+ return NULL;
+ }
+ aDicts[k].aPtr = dict;
+ aDicts[k].eEnc = getTextEncodingFromCharset(dict->cset);
}
- // other wise hyphenate the word with that dictionary
- dict = aDicts[k].aPtr;
- aEnc = aDicts[k].aEnc;
- pCC = aDicts[k].apCC;
+ // other wise hyphenate the word with that dictionary
+ dict = aDicts[k].aPtr;
+ eEnc = aDicts[k].eEnc;
+ pCC = aDicts[k].apCC;
- sal_uInt16 ct = CAPTYPE_UNKNOWN;
- ct = capitalType(aWord, pCC);
+ // we don't want to work with a default text encoding since following incorrect
+ // results may occur only for specific text and thus may be hard to notice.
+ // Thus better always make a clean exit here if the text encoding is in question.
+ // Hopefully something not working at all will raise proper attention quickly. ;-)
+ DBG_ASSERT( eEnc != RTL_TEXTENCODING_DONTKNOW, "failed to get text encoding! (maybe incorrect encoding string in file)" );
+ if (eEnc == RTL_TEXTENCODING_DONTKNOW)
+ return NULL;
- // first convert any smart quotes or apostrophes to normal ones
+ sal_uInt16 ct = CAPTYPE_UNKNOWN;
+ ct = capitalType(aWord, pCC);
+
+ // first convert any smart quotes or apostrophes to normal ones
OUStringBuffer rBuf(aWord);
- sal_Int32 nc = rBuf.getLength();
- sal_Unicode ch;
- for (sal_Int32 ix=0; ix < nc; ix++) {
+ sal_Int32 nc = rBuf.getLength();
+ sal_Unicode ch;
+ for (sal_Int32 ix=0; ix < nc; ix++)
+ {
ch = rBuf.charAt(ix);
- if ((ch == 0x201C) || (ch == 0x201D)) rBuf.setCharAt(ix,(sal_Unicode)0x0022);
- if ((ch == 0x2018) || (ch == 0x2019)) rBuf.setCharAt(ix,(sal_Unicode)0x0027);
- }
- OUString nWord(rBuf.makeStringAndClear());
+ if ((ch == 0x201C) || (ch == 0x201D))
+ rBuf.setCharAt(ix,(sal_Unicode)0x0022);
+ if ((ch == 0x2018) || (ch == 0x2019))
+ rBuf.setCharAt(ix,(sal_Unicode)0x0027);
+ }
+ OUString nWord(rBuf.makeStringAndClear());
- // now convert word to all lowercase for pattern recognition
- OUString nTerm(makeLowerCase(nWord, pCC));
+ // now convert word to all lowercase for pattern recognition
+ OUString nTerm(makeLowerCase(nWord, pCC));
- // now convert word to needed encoding
- OString encWord(OU2ENC(nTerm,aEnc));
+ // now convert word to needed encoding
+ OString encWord(OU2ENC(nTerm,eEnc));
wordlen = encWord.getLength();
- lcword = new char[wordlen + 1];
+ lcword = new char[wordlen + 1];
hyphens = new char[wordlen + 5];
- char ** rep = NULL; // replacements of discretionary hyphenation
- int * pos = NULL; // array of [hyphenation point] minus [deletion position]
- int * cut = NULL; // length of deletions in original word
-
- // copy converted word into simple char buffer
- strcpy(lcword,encWord.getStr());
-
- // now strip off any ending periods
- int n = wordlen-1;
- while((n >=0) && (lcword[n] == '.')) n--;
- n++;
- if (n > 0) {
- if (hnj_hyphen_hyphenate3(dict, lcword, n, hyphens, NULL, &rep, &pos, &cut,
- minLead, minTrail, Max(dict->clhmin, Max(dict->clhmin, 2) + Max(0, minLead - Max(dict->lhmin, 2))),
- Max(dict->crhmin, Max(dict->crhmin, 2) + Max(0, minTrail - Max(dict->rhmin, 2)))))
- {
- //whoops something did not work
- delete[] hyphens;
- delete[] lcword;
- if (rep) {
- for(int j = 0; j < n; j++) {
+ char ** rep = NULL; // replacements of discretionary hyphenation
+ int * pos = NULL; // array of [hyphenation point] minus [deletion position]
+ int * cut = NULL; // length of deletions in original word
+
+ // copy converted word into simple char buffer
+ strcpy(lcword,encWord.getStr());
+
+ // now strip off any ending periods
+ int n = wordlen-1;
+ while((n >=0) && (lcword[n] == '.'))
+ n--;
+ n++;
+ if (n > 0)
+ {
+ const bool bFailed = 0 != hnj_hyphen_hyphenate3( dict, lcword, n, hyphens, NULL,
+ &rep, &pos, &cut, minLead, minTrail,
+ Max(dict->clhmin, Max(dict->clhmin, 2) + Max(0, minLead - Max(dict->lhmin, 2))),
+ Max(dict->crhmin, Max(dict->crhmin, 2) + Max(0, minTrail - Max(dict->rhmin, 2))) );
+ if (bFailed)
+ {
+ //whoops something did not work
+ delete[] hyphens;
+ delete[] lcword;
+ if (rep)
+ {
+ for(int j = 0; j < n; j++)
+ {
if (rep[j]) free(rep[j]);
}
free(rep);
- }
- if (pos) free(pos);
- if (cut) free(cut);
- return NULL;
- }
+ }
+ if (pos) free(pos);
+ if (cut) free(cut);
+ return NULL;
}
+ }
- // now backfill hyphens[] for any removed trailing periods
- for (int c = n; c < wordlen; c++) hyphens[c] = '0';
- hyphens[wordlen] = '\0';
+ // now backfill hyphens[] for any removed trailing periods
+ for (int c = n; c < wordlen; c++) hyphens[c] = '0';
+ hyphens[wordlen] = '\0';
INT32 Leading = GetPosInWordToCheck( aWord, nMaxLeading );
for (INT32 i = 0; i < n; i++)
{
- int leftrep = 0;
- BOOL hit = (n >= minLen);
- if (!rep || !rep[i] || (i >= n)) {
- hit = hit && (hyphens[i]&1) && (i < Leading);
- hit = hit && (i >= (minLead-1) );
- hit = hit && ((n - i - 1) >= minTrail);
- } else {
- // calculate change character length before hyphenation point signed with '='
- for (char * c = rep[i]; *c && (*c != '='); c++) {
- if (aEnc == RTL_TEXTENCODING_UTF8) {
- if (((unsigned char) *c) >> 6 != 2) leftrep++;
- } else leftrep++;
- }
- hit = hit && (hyphens[i]&1) && ((i + leftrep - pos[i]) < Leading);
- hit = hit && ((i + leftrep - pos[i]) >= (minLead-1) );
- hit = hit && ((n - i - 1 + sal::static_int_cast< sal_sSize >(strlen(rep[i])) - leftrep - 1) >= minTrail);
+ int leftrep = 0;
+ BOOL hit = (n >= minLen);
+ if (!rep || !rep[i] || (i >= n))
+ {
+ hit = hit && (hyphens[i]&1) && (i < Leading);
+ hit = hit && (i >= (minLead-1) );
+ hit = hit && ((n - i - 1) >= minTrail);
+ }
+ else
+ {
+ // calculate change character length before hyphenation point signed with '='
+ for (char * c = rep[i]; *c && (*c != '='); c++)
+ {
+ if (eEnc == RTL_TEXTENCODING_UTF8)
+ {
+ if (((unsigned char) *c) >> 6 != 2)
+ leftrep++;
+ }
+ else
+ leftrep++;
}
- if (hit) {
- nHyphenationPos = i;
- if (rep && (i < n) && rep[i]) {
- nHyphenationPosAlt = i - pos[i];
- nHyphenationPosAltHyph = i + leftrep - pos[i];
- }
+ hit = hit && (hyphens[i]&1) && ((i + leftrep - pos[i]) < Leading);
+ hit = hit && ((i + leftrep - pos[i]) >= (minLead-1) );
+ hit = hit && ((n - i - 1 + sal::static_int_cast< sal_sSize >(strlen(rep[i])) - leftrep - 1) >= minTrail);
+ }
+ if (hit)
+ {
+ nHyphenationPos = i;
+ if (rep && (i < n) && rep[i])
+ {
+ nHyphenationPosAlt = i - pos[i];
+ nHyphenationPosAltHyph = i + leftrep - pos[i];
}
- }
-
- if (nHyphenationPos == -1) {
- xRes = NULL;
- } else {
- if (rep && rep[nHyphenationPos]) {
- // remove equal sign
- char * s = rep[nHyphenationPos];
- int eq = 0;
- for (; *s; s++) {
- if (*s == '=') eq = 1;
- if (eq) *s = *(s + 1);
- }
- OUString repHyphlow(rep[nHyphenationPos], strlen(rep[nHyphenationPos]), aEnc);
- OUString repHyph;
- switch (ct) {
- case CAPTYPE_ALLCAP:
- {
- repHyph = makeUpperCase(repHyphlow, pCC);
- break;
- }
- case CAPTYPE_INITCAP:
- {
- if (nHyphenationPosAlt == 0) {
- repHyph = makeInitCap(repHyphlow, pCC);
- } else {
- repHyph = repHyphlow;
- }
- break;
- }
- default:
- {
- repHyph = repHyphlow;
- break;
- }
}
+ }
- // handle shortening
- INT16 nPos = (INT16) ((nHyphenationPosAltHyph < nHyphenationPos) ?
- nHyphenationPosAltHyph : nHyphenationPos);
- // dicretionary hyphenation
+ if (nHyphenationPos == -1)
+ {
+ xRes = NULL;
+ }
+ else
+ {
+ if (rep && rep[nHyphenationPos])
+ {
+ // remove equal sign
+ char * s = rep[nHyphenationPos];
+ int eq = 0;
+ for (; *s; s++)
+ {
+ if (*s == '=') eq = 1;
+ if (eq) *s = *(s + 1);
+ }
+ OUString repHyphlow(rep[nHyphenationPos], strlen(rep[nHyphenationPos]), eEnc);
+ OUString repHyph;
+ switch (ct)
+ {
+ case CAPTYPE_ALLCAP:
+ {
+ repHyph = makeUpperCase(repHyphlow, pCC);
+ break;
+ }
+ case CAPTYPE_INITCAP:
+ {
+ if (nHyphenationPosAlt == 0)
+ repHyph = makeInitCap(repHyphlow, pCC);
+ else
+ repHyph = repHyphlow;
+ break;
+ }
+ default:
+ {
+ repHyph = repHyphlow;
+ break;
+ }
+ }
+
+ // handle shortening
+ INT16 nPos = (INT16) ((nHyphenationPosAltHyph < nHyphenationPos) ?
+ nHyphenationPosAltHyph : nHyphenationPos);
+ // dicretionary hyphenation
xRes = new HyphenatedWord( aWord, LocaleToLanguage( aLocale ), nPos,
- aWord.replaceAt(nHyphenationPosAlt + 1, cut[nHyphenationPos], repHyph),
- (INT16) nHyphenationPosAltHyph);
- } else {
+ aWord.replaceAt(nHyphenationPosAlt + 1, cut[nHyphenationPos], repHyph),
+ (INT16) nHyphenationPosAltHyph);
+ }
+ else
+ {
xRes = new HyphenatedWord( aWord, LocaleToLanguage( aLocale ),
- (INT16)nHyphenationPos, aWord, (INT16) nHyphenationPos);
- }
+ (INT16)nHyphenationPos, aWord, (INT16) nHyphenationPos);
+ }
}
- delete[] lcword;
+ delete[] lcword;
delete[] hyphens;
- if (rep) {
- for(int j = 0; j < n; j++) {
- if (rep[j]) free(rep[j]);
- }
- free(rep);
+ if (rep)
+ {
+ for(int j = 0; j < n; j++)
+ {
+ if (rep[j]) free(rep[j]);
}
- if (pos) free(pos);
- if (cut) free(cut);
+ free(rep);
+ }
+ if (pos) free(pos);
+ if (cut) free(cut);
return xRes;
}
- return NULL;
+ return NULL;
}
-Reference < XHyphenatedWord > SAL_CALL
- Hyphenator::queryAlternativeSpelling( const ::rtl::OUString& /*aWord*/,
- const ::com::sun::star::lang::Locale& /*aLocale*/,
- sal_Int16 /*nIndex*/,
- const ::com::sun::star::beans::PropertyValues& /*aProperties*/ )
- throw(::com::sun::star::lang::IllegalArgumentException,
- ::com::sun::star::uno::RuntimeException)
+Reference < XHyphenatedWord > SAL_CALL Hyphenator::queryAlternativeSpelling(
+ const ::rtl::OUString& /*aWord*/,
+ const ::com::sun::star::lang::Locale& /*aLocale*/,
+ sal_Int16 /*nIndex*/,
+ const ::com::sun::star::beans::PropertyValues& /*aProperties*/ )
+ throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
/* alternative spelling isn't supported by tex dictionaries */
/* XXX: OOo's extended libhjn algorithm can support alternative spellings with extended TeX dic. */
@@ -529,251 +548,262 @@ Reference < XHyphenatedWord > SAL_CALL
return NULL;
}
-Reference< XPossibleHyphens > SAL_CALL
- Hyphenator::createPossibleHyphens( const ::rtl::OUString& aWord,
- const ::com::sun::star::lang::Locale& aLocale,
- const ::com::sun::star::beans::PropertyValues& aProperties )
- throw(::com::sun::star::lang::IllegalArgumentException,
- ::com::sun::star::uno::RuntimeException)
-
+Reference< XPossibleHyphens > SAL_CALL Hyphenator::createPossibleHyphens( const ::rtl::OUString& aWord,
+ const ::com::sun::star::lang::Locale& aLocale,
+ const ::com::sun::star::beans::PropertyValues& aProperties )
+ throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
- int wordlen;
- char *hyphens;
- char *lcword;
- int k;
+ int wordlen;
+ char *hyphens;
+ char *lcword;
+ int k;
- PropertyHelper_Hyphen & rHelper = GetPropHelper();
- rHelper.SetTmpPropVals(aProperties);
- sal_Int16 minTrail = rHelper.GetMinTrailing();
- sal_Int16 minLead = rHelper.GetMinLeading();
+ PropertyHelper_Hyphen & rHelper = GetPropHelper();
+ rHelper.SetTmpPropVals(aProperties);
+ sal_Int16 minTrail = rHelper.GetMinTrailing();
+ sal_Int16 minLead = rHelper.GetMinLeading();
- HyphenDict *dict = NULL;
- rtl_TextEncoding aEnc = 0;
- CharClass* pCC = NULL;
+ HyphenDict *dict = NULL;
+ rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW;
+ CharClass* pCC = NULL;
- Reference< XPossibleHyphens > xRes;
+ Reference< XPossibleHyphens > xRes;
- k = -1;
- for (int j = 0; j < numdict; j++)
- if (aLocale == aDicts[j].aLoc) k = j;
+ k = -1;
+ for (int j = 0; j < numdict; j++)
+ {
+ if (aLocale == aDicts[j].aLoc) k = j;
+ }
+ // if we have a hyphenation dictionary matching this locale
+ if (k != -1)
+ {
+ // if this dictioanry has not been loaded yet do that
+ if (!aDicts[k].aPtr)
+ {
+ OUString DictFN = aDicts[k].aName + A2OU(".dic");
+ OUString dictpath;
- // if we have a hyphenation dictionary matching this locale
- if (k != -1) {
+ osl::FileBase::getSystemPathFromFileURL( DictFN, dictpath );
+ OString sTmp( OU2ENC( dictpath, osl_getThreadTextEncoding() ) );
- // if this dictioanry has not been loaded yet do that
- if (!aDicts[k].aPtr) {
+#if defined(WNT)
+ // workaround for Windows specifc problem that the
+ // path length in calls to 'fopen' is limted to somewhat
+ // about 120+ characters which will usually be exceed when
+ // using dictionaries as extensions.
+ sTmp = Win_GetShortPathName( dictpath );
+#endif
- OUString DictFN = aDicts[k].aName + A2OU(".dic");
- OUString dictpath;
+ if ( ( dict = hnj_hyphen_load ( sTmp.getStr()) ) == NULL )
+ {
+ fprintf(stderr, "Couldn't find file %s and %s\n", sTmp.getStr(), OU2ENC(dictpath, osl_getThreadTextEncoding()) );
+ return NULL;
+ }
+ aDicts[k].aPtr = dict;
+ aDicts[k].eEnc = getTextEncodingFromCharset(dict->cset);
+ }
- osl::FileBase::getSystemPathFromFileURL( DictFN, dictpath );
- OString sTmp( OU2ENC( dictpath, osl_getThreadTextEncoding() ) );
+ // other wise hyphenate the word with that dictionary
+ dict = aDicts[k].aPtr;
+ eEnc = aDicts[k].eEnc;
+ pCC = aDicts[k].apCC;
-#if defined(WNT)
- // workaround for Windows specifc problem that the
- // path length in calls to 'fopen' is limted to somewhat
- // about 120+ characters which will usually be exceed when
- // using dictionaries as extensions.
- sTmp = Win_GetShortPathName( dictpath );
-#endif
+ // we don't want to work with a default text encoding since following incorrect
+ // results may occur only for specific text and thus may be hard to notice.
+ // Thus better always make a clean exit here if the text encoding is in question.
+ // Hopefully something not working at all will raise proper attention quickly. ;-)
+ DBG_ASSERT( eEnc != RTL_TEXTENCODING_DONTKNOW, "failed to get text encoding! (maybe incorrect encoding string in file)" );
+ if (eEnc == RTL_TEXTENCODING_DONTKNOW)
+ return NULL;
- if ( ( dict = hnj_hyphen_load ( sTmp.getStr()) ) == NULL )
+ // first handle smart quotes both single and double
+ OUStringBuffer rBuf(aWord);
+ sal_Int32 nc = rBuf.getLength();
+ sal_Unicode ch;
+ for (sal_Int32 ix=0; ix < nc; ix++)
{
- fprintf(stderr, "Couldn't find file %s and %s\n", sTmp.getStr(), OU2ENC(dictpath, osl_getThreadTextEncoding()) );
- return NULL;
+ ch = rBuf.charAt(ix);
+ if ((ch == 0x201C) || (ch == 0x201D))
+ rBuf.setCharAt(ix,(sal_Unicode)0x0022);
+ if ((ch == 0x2018) || (ch == 0x2019))
+ rBuf.setCharAt(ix,(sal_Unicode)0x0027);
}
- aDicts[k].aPtr = dict;
- aDicts[k].aEnc = rtl_getTextEncodingFromUnixCharset(dict->cset);
- if (aDicts[k].aEnc == RTL_TEXTENCODING_DONTKNOW) {
- if (strcmp("ISCII-DEVANAGARI", dict->cset) == 0) {
- aDicts[k].aEnc = RTL_TEXTENCODING_ISCII_DEVANAGARI;
- } else if (strcmp("UTF-8", dict->cset) == 0) {
- aDicts[k].aEnc = RTL_TEXTENCODING_UTF8;
+ OUString nWord(rBuf.makeStringAndClear());
+
+ // now convert word to all lowercase for pattern recognition
+ OUString nTerm(makeLowerCase(nWord, pCC));
+
+ // now convert word to needed encoding
+ OString encWord(OU2ENC(nTerm,eEnc));
+
+ wordlen = encWord.getLength();
+ lcword = new char[wordlen+1];
+ hyphens = new char[wordlen+5];
+ char ** rep = NULL; // replacements of discretionary hyphenation
+ int * pos = NULL; // array of [hyphenation point] minus [deletion position]
+ int * cut = NULL; // length of deletions in original word
+
+ // copy converted word into simple char buffer
+ strcpy(lcword,encWord.getStr());
+
+ // first remove any trailing periods
+ int n = wordlen-1;
+ while((n >=0) && (lcword[n] == '.'))
+ n--;
+ n++;
+ // fprintf(stderr,"hyphenate... %s\n",lcword); fflush(stderr);
+ if (n > 0)
+ {
+ const bool bFailed = 0 != hnj_hyphen_hyphenate3(dict, lcword, n, hyphens, NULL,
+ &rep, &pos, &cut, minLead, minTrail,
+ Max(dict->clhmin, Max(dict->clhmin, 2) + Max(0, minLead - Max(dict->lhmin, 2))),
+ Max(dict->crhmin, Max(dict->crhmin, 2) + Max(0, minTrail - Max(dict->rhmin, 2))) );
+ if (bFailed)
+ {
+ delete[] hyphens;
+ delete[] lcword;
+
+ if (rep)
+ {
+ for(int j = 0; j < n; j++)
+ {
+ if (rep[j]) free(rep[j]);
+ }
+ free(rep);
+ }
+ if (pos) free(pos);
+ if (cut) free(cut);
+
+ return NULL;
}
- }
- }
-
- // other wise hyphenate the word with that dictionary
- dict = aDicts[k].aPtr;
- aEnc = aDicts[k].aEnc;
- pCC = aDicts[k].apCC;
-
- // first handle smart quotes both single and double
- OUStringBuffer rBuf(aWord);
- sal_Int32 nc = rBuf.getLength();
- sal_Unicode ch;
- for (sal_Int32 ix=0; ix < nc; ix++) {
- ch = rBuf.charAt(ix);
- if ((ch == 0x201C) || (ch == 0x201D)) rBuf.setCharAt(ix,(sal_Unicode)0x0022);
- if ((ch == 0x2018) || (ch == 0x2019)) rBuf.setCharAt(ix,(sal_Unicode)0x0027);
- }
- OUString nWord(rBuf.makeStringAndClear());
-
- // now convert word to all lowercase for pattern recognition
- OUString nTerm(makeLowerCase(nWord, pCC));
-
- // now convert word to needed encoding
- OString encWord(OU2ENC(nTerm,aEnc));
-
- wordlen = encWord.getLength();
- lcword = new char[wordlen+1];
- hyphens = new char[wordlen+5];
- char ** rep = NULL; // replacements of discretionary hyphenation
- int * pos = NULL; // array of [hyphenation point] minus [deletion position]
- int * cut = NULL; // length of deletions in original word
-
- // copy converted word into simple char buffer
- strcpy(lcword,encWord.getStr());
-
- // first remove any trailing periods
- int n = wordlen-1;
- while((n >=0) && (lcword[n] == '.')) n--;
- n++;
- // fprintf(stderr,"hyphenate... %s\n",lcword); fflush(stderr);
- if (n > 0) {
- if (hnj_hyphen_hyphenate3(dict, lcword, n, hyphens, NULL, &rep, &pos, &cut,
- minLead, minTrail, Max(dict->clhmin, Max(dict->clhmin, 2) + Max(0, minLead - Max(dict->lhmin, 2))),
- Max(dict->crhmin, Max(dict->crhmin, 2) + Max(0, minTrail - Max(dict->rhmin, 2)))))
- {
- delete[] hyphens;
- delete[] lcword;
-
- if (rep) {
- for(int j = 0; j < n; j++) {
- if (rep[j]) free(rep[j]);
- }
- free(rep);
- }
- if (pos) free(pos);
- if (cut) free(cut);
-
- return NULL;
- }
- }
- // now backfill hyphens[] for any removed periods
- for (int c = n; c < wordlen; c++) hyphens[c] = '0';
- hyphens[wordlen] = '\0';
- // fprintf(stderr,"... %s\n",hyphens); fflush(stderr);
-
- INT16 nHyphCount = 0;
- INT16 i;
-
- for ( i = 0; i < encWord.getLength(); i++)
- if (hyphens[i]&1 && (!rep || !rep[i]))
- nHyphCount++;
-
- Sequence< INT16 > aHyphPos(nHyphCount);
- INT16 *pPos = aHyphPos.getArray();
- OUStringBuffer hyphenatedWordBuffer;
- OUString hyphenatedWord;
- nHyphCount = 0;
-
- for (i = 0; i < nWord.getLength(); i++) {
- hyphenatedWordBuffer.append(aWord[i]);
- // hyphenation position (not alternative)
- if (hyphens[i]&1 && (!rep || !rep[i])) {
- pPos[nHyphCount] = i;
- hyphenatedWordBuffer.append(sal_Unicode('='));
- nHyphCount++;
- }
- }
-
- hyphenatedWord = hyphenatedWordBuffer.makeStringAndClear();
- //fprintf(stderr,"result is %s\n",OU2A(hyphenatedWord));
- //fflush(stderr);
-
- xRes = new PossibleHyphens( aWord, LocaleToLanguage( aLocale ),
- hyphenatedWord, aHyphPos );
-
- delete[] hyphens;
- delete[] lcword;
-
- if (rep) {
- for(int j = 0; j < n; j++) {
- if (rep[j]) free(rep[j]);
- }
- free(rep);
- }
- if (pos) free(pos);
- if (cut) free(cut);
-
- return xRes;
- }
+ }
+ // now backfill hyphens[] for any removed periods
+ for (int c = n; c < wordlen; c++)
+ hyphens[c] = '0';
+ hyphens[wordlen] = '\0';
+ // fprintf(stderr,"... %s\n",hyphens); fflush(stderr);
- return NULL;
+ INT16 nHyphCount = 0;
+ INT16 i;
+
+ for ( i = 0; i < encWord.getLength(); i++)
+ {
+ if (hyphens[i]&1 && (!rep || !rep[i]))
+ nHyphCount++;
+ }
+
+ Sequence< INT16 > aHyphPos(nHyphCount);
+ INT16 *pPos = aHyphPos.getArray();
+ OUStringBuffer hyphenatedWordBuffer;
+ OUString hyphenatedWord;
+ nHyphCount = 0;
+
+ for (i = 0; i < nWord.getLength(); i++)
+ {
+ hyphenatedWordBuffer.append(aWord[i]);
+ // hyphenation position (not alternative)
+ if (hyphens[i]&1 && (!rep || !rep[i]))
+ {
+ pPos[nHyphCount] = i;
+ hyphenatedWordBuffer.append(sal_Unicode('='));
+ nHyphCount++;
+ }
+ }
+
+ hyphenatedWord = hyphenatedWordBuffer.makeStringAndClear();
+ //fprintf(stderr,"result is %s\n",OU2A(hyphenatedWord));
+ //fflush(stderr);
+
+ xRes = new PossibleHyphens( aWord, LocaleToLanguage( aLocale ),
+ hyphenatedWord, aHyphPos );
+
+ delete[] hyphens;
+ delete[] lcword;
+
+ if (rep)
+ {
+ for(int j = 0; j < n; j++)
+ {
+ if (rep[j]) free(rep[j]);
+ }
+ free(rep);
+ }
+ if (pos) free(pos);
+ if (cut) free(cut);
+ return xRes;
+ }
+
+ return NULL;
}
sal_uInt16 SAL_CALL Hyphenator::capitalType(const OUString& aTerm, CharClass * pCC)
{
- sal_Int32 tlen = aTerm.getLength();
- if ((pCC) && (tlen)) {
- String aStr(aTerm);
- sal_Int32 nc = 0;
- for (xub_StrLen tindex = 0; tindex < tlen; tindex++) {
- if (pCC->getCharacterType(aStr,tindex) &
- ::com::sun::star::i18n::KCharacterType::UPPER) nc++;
- }
-
- if (nc == 0) return (sal_uInt16) CAPTYPE_NOCAP;
-
- if (nc == tlen) return (sal_uInt16) CAPTYPE_ALLCAP;
+ sal_Int32 tlen = aTerm.getLength();
+ if ((pCC) && (tlen))
+ {
+ String aStr(aTerm);
+ sal_Int32 nc = 0;
+ for (xub_StrLen tindex = 0; tindex < tlen; tindex++)
+ {
+ if (pCC->getCharacterType(aStr,tindex) & ::com::sun::star::i18n::KCharacterType::UPPER)
+ nc++;
+ }
- if ((nc == 1) && (pCC->getCharacterType(aStr,0) &
- ::com::sun::star::i18n::KCharacterType::UPPER))
- return (sal_uInt16) CAPTYPE_INITCAP;
+ if (nc == 0)
+ return (sal_uInt16) CAPTYPE_NOCAP;
+ if (nc == tlen)
+ return (sal_uInt16) CAPTYPE_ALLCAP;
+ if ((nc == 1) && (pCC->getCharacterType(aStr,0) & ::com::sun::star::i18n::KCharacterType::UPPER))
+ return (sal_uInt16) CAPTYPE_INITCAP;
- return (sal_uInt16) CAPTYPE_MIXED;
+ return (sal_uInt16) CAPTYPE_MIXED;
}
- return (sal_uInt16) CAPTYPE_UNKNOWN;
+ return (sal_uInt16) CAPTYPE_UNKNOWN;
}
OUString SAL_CALL Hyphenator::makeLowerCase(const OUString& aTerm, CharClass * pCC)
{
- if (pCC)
- return pCC->toLower_rtl(aTerm, 0, aTerm.getLength());
- return aTerm;
+ if (pCC)
+ return pCC->toLower_rtl(aTerm, 0, aTerm.getLength());
+ return aTerm;
}
OUString SAL_CALL Hyphenator::makeUpperCase(const OUString& aTerm, CharClass * pCC)
{
- if (pCC)
- return pCC->toUpper_rtl(aTerm, 0, aTerm.getLength());
- return aTerm;
+ if (pCC)
+ return pCC->toUpper_rtl(aTerm, 0, aTerm.getLength());
+ return aTerm;
}
OUString SAL_CALL Hyphenator::makeInitCap(const OUString& aTerm, CharClass * pCC)
{
- sal_Int32 tlen = aTerm.getLength();
- if ((pCC) && (tlen)) {
- OUString bTemp = aTerm.copy(0,1);
- if (tlen > 1)
- return ( pCC->toUpper_rtl(bTemp, 0, 1)
- + pCC->toLower_rtl(aTerm,1,(tlen-1)) );
-
- return pCC->toUpper_rtl(bTemp, 0, 1);
+ sal_Int32 tlen = aTerm.getLength();
+ if ((pCC) && (tlen))
+ {
+ OUString bTemp = aTerm.copy(0,1);
+ if (tlen > 1)
+ return ( pCC->toUpper_rtl(bTemp, 0, 1) + pCC->toLower_rtl(aTerm,1,(tlen-1)) );
+
+ return pCC->toUpper_rtl(bTemp, 0, 1);
}
- return aTerm;
+ return aTerm;
}
-
-
Reference< XInterface > SAL_CALL Hyphenator_CreateInstance(
- const Reference< XMultiServiceFactory > & /*rSMgr*/ )
+ const Reference< XMultiServiceFactory > & /*rSMgr*/ )
throw(Exception)
{
-
Reference< XInterface > xService = (cppu::OWeakObject*) new Hyphenator;
return xService;
}
-sal_Bool SAL_CALL
- Hyphenator::addLinguServiceEventListener(
- const Reference< XLinguServiceEventListener >& rxLstnr )
+sal_Bool SAL_CALL Hyphenator::addLinguServiceEventListener(
+ const Reference< XLinguServiceEventListener >& rxLstnr )
throw(RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -787,9 +817,8 @@ sal_Bool SAL_CALL
}
-sal_Bool SAL_CALL
- Hyphenator::removeLinguServiceEventListener(
- const Reference< XLinguServiceEventListener >& rxLstnr )
+sal_Bool SAL_CALL Hyphenator::removeLinguServiceEventListener(
+ const Reference< XLinguServiceEventListener >& rxLstnr )
throw(RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -804,8 +833,7 @@ sal_Bool SAL_CALL
}
-OUString SAL_CALL
- Hyphenator::getServiceDisplayName( const Locale& /*rLocale*/ )
+OUString SAL_CALL Hyphenator::getServiceDisplayName( const Locale& /*rLocale*/ )
throw(RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -813,8 +841,7 @@ OUString SAL_CALL
}
-void SAL_CALL
- Hyphenator::initialize( const Sequence< Any >& rArguments )
+void SAL_CALL Hyphenator::initialize( const Sequence< Any >& rArguments )
throw(Exception, RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -836,16 +863,15 @@ void SAL_CALL
xPropHelper = pPropHelper;
pPropHelper->AddAsPropListener(); //! after a reference is established
}
- else {
+ else
+ {
DBG_ERROR( "wrong number of arguments in sequence" );
}
-
}
}
-void SAL_CALL
- Hyphenator::dispose()
+void SAL_CALL Hyphenator::dispose()
throw(RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -859,8 +885,7 @@ void SAL_CALL
}
-void SAL_CALL
- Hyphenator::addEventListener( const Reference< XEventListener >& rxListener )
+void SAL_CALL Hyphenator::addEventListener( const Reference< XEventListener >& rxListener )
throw(RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -870,8 +895,7 @@ void SAL_CALL
}
-void SAL_CALL
- Hyphenator::removeEventListener( const Reference< XEventListener >& rxListener )
+void SAL_CALL Hyphenator::removeEventListener( const Reference< XEventListener >& rxListener )
throw(RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -927,32 +951,6 @@ Sequence< OUString > Hyphenator::getSupportedServiceNames_Static()
return aSNS;
}
-
-sal_Bool SAL_CALL Hyphenator_writeInfo(
- void * /*pServiceManager*/, registry::XRegistryKey * pRegistryKey )
-{
-
- try
- {
- String aImpl( '/' );
- aImpl += Hyphenator::getImplementationName_Static().getStr();
- aImpl.AppendAscii( "/UNO/SERVICES" );
- Reference< registry::XRegistryKey > xNewKey =
- pRegistryKey->createKey( aImpl );
- Sequence< OUString > aServices =
- Hyphenator::getSupportedServiceNames_Static();
- for( INT32 i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- return sal_True;
- }
- catch(Exception &)
- {
- return sal_False;
- }
-}
-
-
void * SAL_CALL Hyphenator_getFactory( const sal_Char * pImplName,
XMultiServiceFactory * pServiceManager, void * )
{
diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx
index 00977732f..86508918e 100644..100755
--- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx
+++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx
@@ -65,7 +65,7 @@ struct HDInfo {
HyphenDict * aPtr;
OUString aName;
Locale aLoc;
- rtl_TextEncoding aEnc;
+ rtl_TextEncoding eEnc;
CharClass * apCC;
};
@@ -83,12 +83,12 @@ class Hyphenator :
>
{
Sequence< Locale > aSuppLocales;
- HDInfo * aDicts;
- sal_Int32 numdict;
+ HDInfo * aDicts;
+ sal_Int32 numdict;
::cppu::OInterfaceContainerHelper aEvtListeners;
Reference< XPropertyChangeListener > xPropHelper;
- Reference< XMultiServiceFactory > rSMgr;
+ Reference< XMultiServiceFactory > rSMgr;
linguistic::PropertyHelper_Hyphen * pPropHelper;
BOOL bDisposing;
@@ -108,88 +108,38 @@ public:
virtual ~Hyphenator();
// XSupportedLocales (for XHyphenator)
- virtual Sequence< Locale > SAL_CALL getLocales()
- throw(RuntimeException);
- virtual sal_Bool SAL_CALL hasLocale( const Locale& rLocale )
- throw(RuntimeException);
+ virtual Sequence< Locale > SAL_CALL getLocales() throw(RuntimeException);
+ virtual sal_Bool SAL_CALL hasLocale( const Locale& rLocale ) throw(RuntimeException);
// XHyphenator
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenatedWord > SAL_CALL
- hyphenate( const ::rtl::OUString& aWord,
- const ::com::sun::star::lang::Locale& aLocale,
- sal_Int16 nMaxLeading,
- const ::com::sun::star::beans::PropertyValues& aProperties )
- throw(::com::sun::star::lang::IllegalArgumentException,
- ::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenatedWord > SAL_CALL
- queryAlternativeSpelling( const ::rtl::OUString& aWord,
- const ::com::sun::star::lang::Locale& aLocale,
- sal_Int16 nIndex,
- const ::com::sun::star::beans::PropertyValues& aProperties )
- throw(::com::sun::star::lang::IllegalArgumentException,
- ::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XPossibleHyphens > SAL_CALL
- createPossibleHyphens( const ::rtl::OUString& aWord,
- const ::com::sun::star::lang::Locale& aLocale,
- const ::com::sun::star::beans::PropertyValues& aProperties )
- throw(::com::sun::star::lang::IllegalArgumentException,
- ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenatedWord > SAL_CALL hyphenate( const ::rtl::OUString& aWord, const ::com::sun::star::lang::Locale& aLocale, sal_Int16 nMaxLeading, const ::com::sun::star::beans::PropertyValues& aProperties ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenatedWord > SAL_CALL queryAlternativeSpelling( const ::rtl::OUString& aWord, const ::com::sun::star::lang::Locale& aLocale, sal_Int16 nIndex, const ::com::sun::star::beans::PropertyValues& aProperties ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XPossibleHyphens > SAL_CALL createPossibleHyphens( const ::rtl::OUString& aWord, const ::com::sun::star::lang::Locale& aLocale, const ::com::sun::star::beans::PropertyValues& aProperties ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
// XLinguServiceEventBroadcaster
- virtual sal_Bool SAL_CALL
- addLinguServiceEventListener(
- const Reference< XLinguServiceEventListener >& rxLstnr )
- throw(RuntimeException);
- virtual sal_Bool SAL_CALL
- removeLinguServiceEventListener(
- const Reference< XLinguServiceEventListener >& rxLstnr )
- throw(RuntimeException);
+ virtual sal_Bool SAL_CALL addLinguServiceEventListener( const Reference< XLinguServiceEventListener >& rxLstnr ) throw(RuntimeException);
+ virtual sal_Bool SAL_CALL removeLinguServiceEventListener( const Reference< XLinguServiceEventListener >& rxLstnr ) throw(RuntimeException);
// XServiceDisplayName
- virtual OUString SAL_CALL
- getServiceDisplayName( const Locale& rLocale )
- throw(RuntimeException);
+ virtual OUString SAL_CALL getServiceDisplayName( const Locale& rLocale ) throw(RuntimeException);
// XInitialization
- virtual void SAL_CALL
- initialize( const Sequence< Any >& rArguments )
- throw(Exception, RuntimeException);
+ virtual void SAL_CALL initialize( const Sequence< Any >& rArguments ) throw(Exception, RuntimeException);
// XComponent
- virtual void SAL_CALL
- dispose()
- throw(RuntimeException);
- virtual void SAL_CALL
- addEventListener( const Reference< XEventListener >& rxListener )
- throw(RuntimeException);
- virtual void SAL_CALL
- removeEventListener( const Reference< XEventListener >& rxListener )
- throw(RuntimeException);
-
- ////////////////////////////////////////////////////////////
- // Service specific part
- //
+ virtual void SAL_CALL dispose() throw(RuntimeException);
+ virtual void SAL_CALL addEventListener( const Reference< XEventListener >& rxListener ) throw(RuntimeException);
+ virtual void SAL_CALL removeEventListener( const Reference< XEventListener >& rxListener ) throw(RuntimeException);
// XServiceInfo
- virtual OUString SAL_CALL
- getImplementationName()
- throw(RuntimeException);
- virtual sal_Bool SAL_CALL
- supportsService( const OUString& rServiceName )
- throw(RuntimeException);
- virtual Sequence< OUString > SAL_CALL
- getSupportedServiceNames()
- throw(RuntimeException);
-
-
- static inline OUString
- getImplementationName_Static() throw();
- static Sequence< OUString >
- getSupportedServiceNames_Static() throw();
+ virtual OUString SAL_CALL getImplementationName() throw(RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw(RuntimeException);
+ virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(RuntimeException);
+ static inline OUString getImplementationName_Static() throw();
+ static Sequence< OUString > getSupportedServiceNames_Static() throw();
+
private:
sal_uInt16 SAL_CALL capitalType(const OUString&, CharClass *);
diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk
index f3626c703..6f767d8bf 100644
--- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk
+++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk
@@ -91,3 +91,11 @@ DEF1EXPORTFILE= exports.dxp
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/hyphen.component
+
+$(MISC)/hyphen.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ hyphen.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt hyphen.component
diff --git a/lingucomponent/source/languageguessing/guesslang.component b/lingucomponent/source/languageguessing/guesslang.component
new file mode 100644
index 000000000..633a489c3
--- /dev/null
+++ b/lingucomponent/source/languageguessing/guesslang.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.lingu2.LanguageGuessing">
+ <service name="com.sun.star.linguistic2.LanguageGuessing"/>
+ </implementation>
+</component>
diff --git a/lingucomponent/source/languageguessing/guesslang.cxx b/lingucomponent/source/languageguessing/guesslang.cxx
index 8b864b3c0..0314f1757 100644
--- a/lingucomponent/source/languageguessing/guesslang.cxx
+++ b/lingucomponent/source/languageguessing/guesslang.cxx
@@ -465,13 +465,6 @@ void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-sal_Bool SAL_CALL component_writeInfo(
- XMultiServiceFactory * xMgr, registry::XRegistryKey * xRegistry )
-{
- return ::cppu::component_writeInfoHelper(
- xMgr, xRegistry, s_component_entries );
-}
-
void * SAL_CALL component_getFactory(
sal_Char const * implName, lang::XMultiServiceFactory * xMgr,
registry::XRegistryKey * xRegistry )
diff --git a/lingucomponent/source/languageguessing/makefile.mk b/lingucomponent/source/languageguessing/makefile.mk
index ebad4076b..624ccba3c 100644
--- a/lingucomponent/source/languageguessing/makefile.mk
+++ b/lingucomponent/source/languageguessing/makefile.mk
@@ -78,3 +78,11 @@ DEF1NAME =$(SHL1TARGET)
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/guesslang.component
+
+$(MISC)/guesslang.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ guesslang.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt guesslang.component
diff --git a/lingucomponent/source/lingutil/lingutil.cxx b/lingucomponent/source/lingutil/lingutil.cxx
index 142fc4f7b..15c019a14 100644..100755
--- a/lingucomponent/source/lingutil/lingutil.cxx
+++ b/lingucomponent/source/lingutil/lingutil.cxx
@@ -50,6 +50,7 @@
#include <unotools/pathoptions.hxx>
#include <rtl/ustring.hxx>
#include <rtl/string.hxx>
+#include <rtl/tencinfo.h>
#include <linguistic/misc.hxx>
#include <set>
@@ -268,5 +269,25 @@ void MergeNewStyleDicsAndOldStyleDics(
}
}
+
+rtl_TextEncoding getTextEncodingFromCharset(const sal_Char* pCharset)
+{
+ // default result: used to indicate that we failed to get the proper encoding
+ rtl_TextEncoding eRet = RTL_TEXTENCODING_DONTKNOW;
+
+ if (pCharset)
+ {
+ eRet = rtl_getTextEncodingFromMimeCharset(pCharset);
+ if (eRet == RTL_TEXTENCODING_DONTKNOW)
+ eRet = rtl_getTextEncodingFromUnixCharset(pCharset);
+ if (eRet == RTL_TEXTENCODING_DONTKNOW)
+ {
+ if (strcmp("ISCII-DEVANAGARI", pCharset) == 0)
+ eRet = RTL_TEXTENCODING_ISCII_DEVANAGARI;
+ }
+ }
+ return eRet;
+}
+
//////////////////////////////////////////////////////////////////////
diff --git a/lingucomponent/source/lingutil/lingutil.hxx b/lingucomponent/source/lingutil/lingutil.hxx
index 4edc469cf..18be81561 100644
--- a/lingucomponent/source/lingutil/lingutil.hxx
+++ b/lingucomponent/source/lingutil/lingutil.hxx
@@ -101,5 +101,13 @@ void MergeNewStyleDicsAndOldStyleDics( std::list< SvtLinguConfigDictionaryEntry
///////////////////////////////////////////////////////////////////////////
+
+//Find an encoding from a charset string, using
+//rtl_getTextEncodingFromMimeCharset and falling back to
+//rtl_getTextEncodingFromUnixCharset with the addition of
+//ISCII-DEVANAGARI. On failure will return final fallback of
+//RTL_TEXTENCODING_ISO_8859_1
+rtl_TextEncoding getTextEncodingFromCharset(const sal_Char* pCharset);
+
#endif
diff --git a/lingucomponent/source/spellcheck/macosxspell/MacOSXSpell.component b/lingucomponent/source/spellcheck/macosxspell/MacOSXSpell.component
new file mode 100644
index 000000000..2f2f9e102
--- /dev/null
+++ b/lingucomponent/source/spellcheck/macosxspell/MacOSXSpell.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="org.openoffice.lingu.MacOSXSpellChecker">
+ <service name="com.sun.star.linguistic2.SpellChecker"/>
+ </implementation>
+</component>
diff --git a/lingucomponent/source/spellcheck/macosxspell/macreg.cxx b/lingucomponent/source/spellcheck/macosxspell/macreg.cxx
index bf84b274c..8c431d4be 100644
--- a/lingucomponent/source/spellcheck/macosxspell/macreg.cxx
+++ b/lingucomponent/source/spellcheck/macosxspell/macreg.cxx
@@ -42,9 +42,6 @@ using namespace com::sun::star::registry;
// declaration of external RegEntry-functions defined by the service objects
//
-extern sal_Bool SAL_CALL MacSpellChecker_writeInfo(
- void * /*pServiceManager*/, XRegistryKey * pRegistryKey );
-
extern void * SAL_CALL MacSpellChecker_getFactory(
const sal_Char * pImplName,
XMultiServiceFactory * pServiceManager,
@@ -57,12 +54,6 @@ extern void * SAL_CALL MacSpellChecker_getFactory(
extern "C"
{
-sal_Bool SAL_CALL component_writeInfo(
- void * pServiceManager, XRegistryKey * pRegistryKey )
-{
- return MacSpellChecker_writeInfo( pServiceManager, pRegistryKey );
-}
-
void SAL_CALL component_getImplementationEnvironment(
const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
{
diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx b/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx
index f19802066..61e2e77c6 100644
--- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx
+++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx
@@ -644,32 +644,6 @@ Sequence< OUString > MacSpellChecker::getSupportedServiceNames_Static()
return aSNS;
}
-
-sal_Bool SAL_CALL MacSpellChecker_writeInfo(
- void * /*pServiceManager*/, registry::XRegistryKey * pRegistryKey )
-{
-
- try
- {
- String aImpl( '/' );
- aImpl += MacSpellChecker::getImplementationName_Static().getStr();
- aImpl.AppendAscii( "/UNO/SERVICES" );
- Reference< registry::XRegistryKey > xNewKey =
- pRegistryKey->createKey( aImpl );
- Sequence< OUString > aServices =
- MacSpellChecker::getSupportedServiceNames_Static();
- for( INT32 i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- return sal_True;
- }
- catch(Exception &)
- {
- return sal_False;
- }
-}
-
-
void * SAL_CALL MacSpellChecker_getFactory( const sal_Char * pImplName,
XMultiServiceFactory * pServiceManager, void * )
{
diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx b/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx
index e681f9a3b..5fb9fbdd3 100644..100755
--- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx
+++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx
@@ -75,14 +75,14 @@ class MacSpellChecker :
XServiceDisplayName
>
{
- Sequence< Locale > aSuppLocales;
+ Sequence< Locale > aSuppLocales;
// Hunspell ** aDicts;
- rtl_TextEncoding * aDEncs;
- Locale * aDLocs;
- OUString * aDNames;
- sal_Int32 numdict;
- NSSpellChecker * macSpell;
- int macTag; //unique tag for this doc
+ rtl_TextEncoding * aDEncs;
+ Locale * aDLocs;
+ OUString * aDNames;
+ sal_Int32 numdict;
+ NSSpellChecker * macSpell;
+ int macTag; //unique tag for this doc
::cppu::OInterfaceContainerHelper aEvtListeners;
Reference< XPropertyChangeListener > xPropHelper;
@@ -100,84 +100,43 @@ class MacSpellChecker :
}
INT16 GetSpellFailure( const OUString &rWord, const Locale &rLocale );
- Reference< XSpellAlternatives >
- GetProposals( const OUString &rWord, const Locale &rLocale );
+ Reference< XSpellAlternatives > GetProposals( const OUString &rWord, const Locale &rLocale );
public:
MacSpellChecker();
virtual ~MacSpellChecker();
// XSupportedLocales (for XSpellChecker)
- virtual Sequence< Locale > SAL_CALL
- getLocales()
- throw(RuntimeException);
- virtual sal_Bool SAL_CALL
- hasLocale( const Locale& rLocale )
- throw(RuntimeException);
+ virtual Sequence< Locale > SAL_CALL getLocales() throw(RuntimeException);
+ virtual sal_Bool SAL_CALL hasLocale( const Locale& rLocale ) throw(RuntimeException);
// XSpellChecker
- virtual sal_Bool SAL_CALL
- isValid( const OUString& rWord, const Locale& rLocale,
- const PropertyValues& rProperties )
- throw(IllegalArgumentException,
- RuntimeException);
- virtual Reference< XSpellAlternatives > SAL_CALL
- spell( const OUString& rWord, const Locale& rLocale,
- const PropertyValues& rProperties )
- throw(IllegalArgumentException,
- RuntimeException);
+ virtual sal_Bool SAL_CALL isValid( const OUString& rWord, const Locale& rLocale, const PropertyValues& rProperties ) throw(IllegalArgumentException, RuntimeException);
+ virtual Reference< XSpellAlternatives > SAL_CALL spell( const OUString& rWord, const Locale& rLocale, const PropertyValues& rProperties ) throw(IllegalArgumentException, RuntimeException);
// XLinguServiceEventBroadcaster
- virtual sal_Bool SAL_CALL
- addLinguServiceEventListener(
- const Reference< XLinguServiceEventListener >& rxLstnr )
- throw(RuntimeException);
- virtual sal_Bool SAL_CALL
- removeLinguServiceEventListener(
- const Reference< XLinguServiceEventListener >& rxLstnr )
- throw(RuntimeException);
+ virtual sal_Bool SAL_CALL addLinguServiceEventListener( const Reference< XLinguServiceEventListener >& rxLstnr ) throw(RuntimeException);
+ virtual sal_Bool SAL_CALL removeLinguServiceEventListener( const Reference< XLinguServiceEventListener >& rxLstnr ) throw(RuntimeException);
// XServiceDisplayName
- virtual OUString SAL_CALL
- getServiceDisplayName( const Locale& rLocale )
- throw(RuntimeException);
+ virtual OUString SAL_CALL getServiceDisplayName( const Locale& rLocale ) throw(RuntimeException);
// XInitialization
- virtual void SAL_CALL
- initialize( const Sequence< Any >& rArguments )
- throw(Exception, RuntimeException);
+ virtual void SAL_CALL initialize( const Sequence< Any >& rArguments ) throw(Exception, RuntimeException);
// XComponent
- virtual void SAL_CALL
- dispose()
- throw(RuntimeException);
- virtual void SAL_CALL
- addEventListener( const Reference< XEventListener >& rxListener )
- throw(RuntimeException);
- virtual void SAL_CALL
- removeEventListener( const Reference< XEventListener >& rxListener )
- throw(RuntimeException);
-
- ////////////////////////////////////////////////////////////
- // Service specific part
- //
+ virtual void SAL_CALL dispose() throw(RuntimeException);
+ virtual void SAL_CALL addEventListener( const Reference< XEventListener >& rxListener ) throw(RuntimeException);
+ virtual void SAL_CALL removeEventListener( const Reference< XEventListener >& rxListener ) throw(RuntimeException);
// XServiceInfo
- virtual OUString SAL_CALL
- getImplementationName()
- throw(RuntimeException);
- virtual sal_Bool SAL_CALL
- supportsService( const OUString& rServiceName )
- throw(RuntimeException);
- virtual Sequence< OUString > SAL_CALL
- getSupportedServiceNames()
- throw(RuntimeException);
-
-
- static inline OUString
- getImplementationName_Static() throw();
- static Sequence< OUString >
- getSupportedServiceNames_Static() throw();
+ virtual OUString SAL_CALL getImplementationName() throw(RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw(RuntimeException);
+ virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(RuntimeException);
+
+
+ static inline OUString getImplementationName_Static() throw();
+ static Sequence< OUString > getSupportedServiceNames_Static() throw();
};
inline OUString MacSpellChecker::getImplementationName_Static() throw()
diff --git a/lingucomponent/source/spellcheck/macosxspell/makefile.mk b/lingucomponent/source/spellcheck/macosxspell/makefile.mk
index 6414560e0..4e88b808d 100644
--- a/lingucomponent/source/spellcheck/macosxspell/makefile.mk
+++ b/lingucomponent/source/spellcheck/macosxspell/makefile.mk
@@ -91,3 +91,11 @@ SHL1VERSIONMAP=$(SOLARENV)/src/component.map
dummy:
@echo " Nothing to build for GUIBASE=$(GUIBASE)"
.ENDIF
+
+ALLTAR : $(MISC)/MacOSXSpell.component
+
+$(MISC)/MacOSXSpell.component .ERRREMOVE : \
+ $(SOLARENV)/bin/createcomponent.xslt MacOSXSpell.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt MacOSXSpell.component
diff --git a/lingucomponent/source/spellcheck/spell/exports.dxp b/lingucomponent/source/spellcheck/spell/exports.dxp
index b0f85bf7b..a9861e3ff 100644
--- a/lingucomponent/source/spellcheck/spell/exports.dxp
+++ b/lingucomponent/source/spellcheck/spell/exports.dxp
@@ -1,3 +1,2 @@
component_getFactory
component_getImplementationEnvironment
-component_writeInfo
diff --git a/lingucomponent/source/spellcheck/spell/makefile.mk b/lingucomponent/source/spellcheck/spell/makefile.mk
index 4173d4dba..56dd79939 100644
--- a/lingucomponent/source/spellcheck/spell/makefile.mk
+++ b/lingucomponent/source/spellcheck/spell/makefile.mk
@@ -85,3 +85,11 @@ DEF1EXPORTFILE= exports.dxp
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/spell.component
+
+$(MISC)/spell.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ spell.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt spell.component
diff --git a/lingucomponent/source/spellcheck/spell/spell.component b/lingucomponent/source/spellcheck/spell/spell.component
new file mode 100644
index 000000000..9f951a8a8
--- /dev/null
+++ b/lingucomponent/source/spellcheck/spell/spell.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="org.openoffice.lingu.MySpellSpellChecker">
+ <service name="com.sun.star.linguistic2.SpellChecker"/>
+ </implementation>
+</component>
diff --git a/lingucomponent/source/spellcheck/spell/sreg.cxx b/lingucomponent/source/spellcheck/spell/sreg.cxx
index 84373bd2c..fa2c67840 100644
--- a/lingucomponent/source/spellcheck/spell/sreg.cxx
+++ b/lingucomponent/source/spellcheck/spell/sreg.cxx
@@ -42,9 +42,6 @@ using namespace com::sun::star::registry;
// declaration of external RegEntry-functions defined by the service objects
//
-extern sal_Bool SAL_CALL SpellChecker_writeInfo(
- void * /*pServiceManager*/, XRegistryKey * pRegistryKey );
-
extern void * SAL_CALL SpellChecker_getFactory(
const sal_Char * pImplName,
XMultiServiceFactory * pServiceManager,
@@ -56,12 +53,6 @@ extern void * SAL_CALL SpellChecker_getFactory(
extern "C"
{
-sal_Bool SAL_CALL component_writeInfo(
- void * pServiceManager, XRegistryKey * pRegistryKey )
-{
- return SpellChecker_writeInfo( pServiceManager, pRegistryKey );
-}
-
void SAL_CALL component_getImplementationEnvironment(
const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
{
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
index 894f9fd33..8042d82ef 100644..100755
--- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx
+++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
@@ -27,6 +27,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_lingucomponent.hxx"
+
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/linguistic2/XSearchableDictionaryList.hpp>
@@ -37,12 +38,10 @@
#include <unotools/processfactory.hxx>
#include <osl/mutex.hxx>
+#include <lingutil.hxx>
#include <hunspell.hxx>
#include <dictmgr.hxx>
-
-#ifndef _SPELLIMP_HXX
#include <sspellimp.hxx>
-#endif
#include <linguistic/lngprops.hxx>
#include <linguistic/spelldta.hxx>
@@ -52,8 +51,7 @@
#include <unotools/useroptions.hxx>
#include <osl/file.hxx>
#include <rtl/ustrbuf.hxx>
-
-#include <lingutil.hxx>
+#include <rtl/textenc.h>
#include <list>
#include <set>
@@ -77,35 +75,37 @@ using namespace linguistic;
SpellChecker::SpellChecker() :
aEvtListeners ( GetLinguMutex() )
{
- aDicts = NULL;
+ aDicts = NULL;
aDEncs = NULL;
aDLocs = NULL;
aDNames = NULL;
bDisposing = FALSE;
pPropHelper = NULL;
- numdict = 0;
+ numdict = 0;
}
SpellChecker::~SpellChecker()
{
- if (aDicts) {
- for (int i = 0; i < numdict; i++) {
+ if (aDicts)
+ {
+ for (int i = 0; i < numdict; i++)
+ {
if (aDicts[i]) delete aDicts[i];
aDicts[i] = NULL;
- }
- delete[] aDicts;
- }
- aDicts = NULL;
- numdict = 0;
- if (aDEncs) delete[] aDEncs;
- aDEncs = NULL;
- if (aDLocs) delete[] aDLocs;
- aDLocs = NULL;
- if (aDNames) delete[] aDNames;
- aDNames = NULL;
- if (pPropHelper)
- pPropHelper->RemoveAsPropListener();
+ }
+ delete[] aDicts;
+ }
+ aDicts = NULL;
+ numdict = 0;
+ if (aDEncs) delete[] aDEncs;
+ aDEncs = NULL;
+ if (aDLocs) delete[] aDLocs;
+ aDLocs = NULL;
+ if (aDNames) delete[] aDNames;
+ aDNames = NULL;
+ if (pPropHelper)
+ pPropHelper->RemoveAsPropListener();
}
@@ -217,7 +217,7 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
for (sal_Int32 i = 0; i < nLocales; ++i)
{
aDicts[k] = NULL;
- aDEncs[k] = 0;
+ aDEncs[k] = RTL_TEXTENCODING_DONTKNOW;
aDLocs[k] = MsLangId::convertLanguageToLocale(
MsLangId::convertIsoStringToLanguage( aLocaleNames[i] ));
// also both files have to be in the same directory and the
@@ -272,84 +272,86 @@ sal_Bool SAL_CALL SpellChecker::hasLocale(const Locale& rLocale)
return bRes;
}
+
INT16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rLocale )
{
- Hunspell * pMS;
- rtl_TextEncoding aEnc;
+ Hunspell * pMS = NULL;
+ rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW;
// initialize a myspell object for each dictionary once
- // (note: mutex is held higher up in isValid)
-
+ // (note: mutex is held higher up in isValid)
INT16 nRes = -1;
- // first handle smart quotes both single and double
+ // first handle smart quotes both single and double
OUStringBuffer rBuf(rWord);
- sal_Int32 n = rBuf.getLength();
- sal_Unicode c;
- for (sal_Int32 ix=0; ix < n; ix++) {
+ sal_Int32 n = rBuf.getLength();
+ sal_Unicode c;
+ for (sal_Int32 ix=0; ix < n; ix++)
+ {
c = rBuf.charAt(ix);
- if ((c == 0x201C) || (c == 0x201D)) rBuf.setCharAt(ix,(sal_Unicode)0x0022);
- if ((c == 0x2018) || (c == 0x2019)) rBuf.setCharAt(ix,(sal_Unicode)0x0027);
- }
- OUString nWord(rBuf.makeStringAndClear());
+ if ((c == 0x201C) || (c == 0x201D))
+ rBuf.setCharAt(ix,(sal_Unicode)0x0022);
+ if ((c == 0x2018) || (c == 0x2019))
+ rBuf.setCharAt(ix,(sal_Unicode)0x0027);
+ }
+ OUString nWord(rBuf.makeStringAndClear());
if (n)
{
- for (sal_Int32 i = 0; i < numdict; ++i) {
+ for (sal_Int32 i = 0; i < numdict; ++i)
+ {
pMS = NULL;
- aEnc = 0;
+ eEnc = RTL_TEXTENCODING_DONTKNOW;
if (rLocale == aDLocs[i])
{
- if (!aDicts[i])
- {
- OUString dicpath = aDNames[i] + A2OU(".dic");
- OUString affpath = aDNames[i] + A2OU(".aff");
- OUString dict;
- OUString aff;
- osl::FileBase::getSystemPathFromFileURL(dicpath,dict);
- osl::FileBase::getSystemPathFromFileURL(affpath,aff);
- OString aTmpaff(OU2ENC(aff,osl_getThreadTextEncoding()));
- OString aTmpdict(OU2ENC(dict,osl_getThreadTextEncoding()));
+ if (!aDicts[i])
+ {
+ OUString dicpath = aDNames[i] + A2OU(".dic");
+ OUString affpath = aDNames[i] + A2OU(".aff");
+ OUString dict;
+ OUString aff;
+ osl::FileBase::getSystemPathFromFileURL(dicpath,dict);
+ osl::FileBase::getSystemPathFromFileURL(affpath,aff);
+ OString aTmpaff(OU2ENC(aff,osl_getThreadTextEncoding()));
+ OString aTmpdict(OU2ENC(dict,osl_getThreadTextEncoding()));
#if defined(WNT)
- // workaround for Windows specifc problem that the
- // path length in calls to 'fopen' is limted to somewhat
- // about 120+ characters which will usually be exceed when
- // using dictionaries as extensions.
- aTmpaff = Win_GetShortPathName( aff );
- aTmpdict = Win_GetShortPathName( dict );
+ // workaround for Windows specifc problem that the
+ // path length in calls to 'fopen' is limted to somewhat
+ // about 120+ characters which will usually be exceed when
+ // using dictionaries as extensions.
+ aTmpaff = Win_GetShortPathName( aff );
+ aTmpdict = Win_GetShortPathName( dict );
#endif
- aDicts[i] = new Hunspell(aTmpaff.getStr(),aTmpdict.getStr());
- aDEncs[i] = 0;
- if (aDicts[i]) {
- char * dic_encoding = aDicts[i]->get_dic_encoding();
- aDEncs[i] = rtl_getTextEncodingFromUnixCharset(aDicts[i]->get_dic_encoding());
- if (aDEncs[i] == RTL_TEXTENCODING_DONTKNOW) {
- if (strcmp("ISCII-DEVANAGARI", dic_encoding) == 0) {
- aDEncs[i] = RTL_TEXTENCODING_ISCII_DEVANAGARI;
- } else if (strcmp("UTF-8", dic_encoding) == 0) {
- aDEncs[i] = RTL_TEXTENCODING_UTF8;
- }
- }
- }
- }
- pMS = aDicts[i];
- aEnc = aDEncs[i];
- }
+ aDicts[i] = new Hunspell(aTmpaff.getStr(),aTmpdict.getStr());
+ aDEncs[i] = RTL_TEXTENCODING_DONTKNOW;
+ if (aDicts[i])
+ aDEncs[i] = getTextEncodingFromCharset(aDicts[i]->get_dic_encoding());
+ }
+ pMS = aDicts[i];
+ eEnc = aDEncs[i];
+ }
+
if (pMS)
- {
- OString aWrd(OU2ENC(nWord,aEnc));
+ {
+ // we don't want to work with a default text encoding since following incorrect
+ // results may occur only for specific text and thus may be hard to notice.
+ // Thus better always make a clean exit here if the text encoding is in question.
+ // Hopefully something not working at all will raise proper attention quickly. ;-)
+ DBG_ASSERT( eEnc != RTL_TEXTENCODING_DONTKNOW, "failed to get text encoding! (maybe incorrect encoding string in file)" );
+ if (eEnc == RTL_TEXTENCODING_DONTKNOW)
+ return -1;
+
+ OString aWrd(OU2ENC(nWord,eEnc));
int rVal = pMS->spell((char*)aWrd.getStr());
- if (rVal != 1)
- {
- nRes = SpellFailure::SPELLING_ERROR;
- } else {
- return -1;
- }
- pMS = NULL;
+ if (rVal != 1)
+ nRes = SpellFailure::SPELLING_ERROR;
+ else
+ return -1;
+ pMS = NULL;
}
}
}
@@ -358,8 +360,7 @@ INT16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rLocal
}
-sal_Bool SAL_CALL
- SpellChecker::isValid( const OUString& rWord, const Locale& rLocale,
+sal_Bool SAL_CALL SpellChecker::isValid( const OUString& rWord, const Locale& rLocale,
const PropertyValues& rProperties )
throw(IllegalArgumentException, RuntimeException)
{
@@ -390,11 +391,11 @@ sal_Bool SAL_CALL
{
INT16 nLang = LocaleToLanguage( rLocale );
// postprocess result for errors that should be ignored
- if ( (!rHelper.IsSpellUpperCase() && IsUpper( rWord, nLang ))
- || (!rHelper.IsSpellWithDigits() && HasDigits( rWord ))
- || (!rHelper.IsSpellCapitalization()
- && nFailure == SpellFailure::CAPTION_ERROR)
- )
+ const bool bIgnoreError =
+ (!rHelper.IsSpellUpperCase() && IsUpper( rWord, nLang )) ||
+ (!rHelper.IsSpellWithDigits() && HasDigits( rWord )) ||
+ (!rHelper.IsSpellCapitalization() && nFailure == SpellFailure::CAPTION_ERROR);
+ if (bIgnoreError)
nFailure = -1;
}
@@ -410,23 +411,26 @@ Reference< XSpellAlternatives >
// Especially it may give a list of suggested (correct) words:
Reference< XSpellAlternatives > xRes;
- // note: mutex is held by higher up by spell which covers both
+ // note: mutex is held by higher up by spell which covers both
- Hunspell* pMS;
- rtl_TextEncoding aEnc;
- int count;
- int numsug = 0;
+ Hunspell* pMS = NULL;
+ rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW;
+ int count = 0;
+ int numsug = 0;
- // first handle smart quotes (single and double)
+ // first handle smart quotes (single and double)
OUStringBuffer rBuf(rWord);
- sal_Int32 n = rBuf.getLength();
- sal_Unicode c;
- for (sal_Int32 ix=0; ix < n; ix++) {
- c = rBuf.charAt(ix);
- if ((c == 0x201C) || (c == 0x201D)) rBuf.setCharAt(ix,(sal_Unicode)0x0022);
- if ((c == 0x2018) || (c == 0x2019)) rBuf.setCharAt(ix,(sal_Unicode)0x0027);
- }
- OUString nWord(rBuf.makeStringAndClear());
+ sal_Int32 n = rBuf.getLength();
+ sal_Unicode c;
+ for (sal_Int32 ix=0; ix < n; ix++)
+ {
+ c = rBuf.charAt(ix);
+ if ((c == 0x201C) || (c == 0x201D))
+ rBuf.setCharAt(ix,(sal_Unicode)0x0022);
+ if ((c == 0x2018) || (c == 0x2019))
+ rBuf.setCharAt(ix,(sal_Unicode)0x0027);
+ }
+ OUString nWord(rBuf.makeStringAndClear());
if (n)
{
@@ -434,56 +438,55 @@ Reference< XSpellAlternatives >
Sequence< OUString > aStr( 0 );
- for (int i =0; i < numdict; i++) {
+ for (int i =0; i < numdict; i++)
+ {
pMS = NULL;
- aEnc = 0;
- count = 0;
+ eEnc = RTL_TEXTENCODING_DONTKNOW;
+ count = 0;
if (rLocale == aDLocs[i])
{
- pMS = aDicts[i];
- aEnc = aDEncs[i];
- }
+ pMS = aDicts[i];
+ eEnc = aDEncs[i];
+ }
if (pMS)
{
char ** suglst = NULL;
- OString aWrd(OU2ENC(nWord,aEnc));
- count = pMS->suggest(&suglst, (const char *) aWrd.getStr());
-
- if (count) {
- aStr.realloc( numsug + count );
- OUString *pStr = aStr.getArray();
- for (int ii=0; ii < count; ++ii)
- {
- OUString cvtwrd(suglst[ii],strlen(suglst[ii]),aEnc);
- pStr[numsug + ii] = cvtwrd;
- }
- pMS->free_list(&suglst, count);
- numsug += count;
+ OString aWrd(OU2ENC(nWord,eEnc));
+ count = pMS->suggest(&suglst, (const char *) aWrd.getStr());
+
+ if (count)
+ {
+ aStr.realloc( numsug + count );
+ OUString *pStr = aStr.getArray();
+ for (int ii=0; ii < count; ++ii)
+ {
+ OUString cvtwrd(suglst[ii],strlen(suglst[ii]),eEnc);
+ pStr[numsug + ii] = cvtwrd;
}
- }
+ pMS->free_list(&suglst, count);
+ numsug += count;
+ }
+ }
}
- // now return an empty alternative for no suggestions or the list of alternatives if some found
+ // now return an empty alternative for no suggestions or the list of alternatives if some found
SpellAlternatives *pAlt = new SpellAlternatives;
- String aTmp(rWord);
+ String aTmp(rWord);
pAlt->SetWordLanguage( aTmp, nLang );
pAlt->SetFailureType( SpellFailure::SPELLING_ERROR );
pAlt->SetAlternatives( aStr );
xRes = pAlt;
- return xRes;
-
- }
return xRes;
+ }
+ return xRes;
}
-
-
-Reference< XSpellAlternatives > SAL_CALL
- SpellChecker::spell( const OUString& rWord, const Locale& rLocale,
- const PropertyValues& rProperties )
+Reference< XSpellAlternatives > SAL_CALL SpellChecker::spell(
+ const OUString& rWord, const Locale& rLocale,
+ const PropertyValues& rProperties )
throw(IllegalArgumentException, RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -508,7 +511,7 @@ Reference< XSpellAlternatives > SAL_CALL
Reference< XInterface > SAL_CALL SpellChecker_CreateInstance(
- const Reference< XMultiServiceFactory > & /*rSMgr*/ )
+ const Reference< XMultiServiceFactory > & /*rSMgr*/ )
throw(Exception)
{
@@ -517,9 +520,8 @@ Reference< XInterface > SAL_CALL SpellChecker_CreateInstance(
}
-sal_Bool SAL_CALL
- SpellChecker::addLinguServiceEventListener(
- const Reference< XLinguServiceEventListener >& rxLstnr )
+sal_Bool SAL_CALL SpellChecker::addLinguServiceEventListener(
+ const Reference< XLinguServiceEventListener >& rxLstnr )
throw(RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -533,9 +535,8 @@ sal_Bool SAL_CALL
}
-sal_Bool SAL_CALL
- SpellChecker::removeLinguServiceEventListener(
- const Reference< XLinguServiceEventListener >& rxLstnr )
+sal_Bool SAL_CALL SpellChecker::removeLinguServiceEventListener(
+ const Reference< XLinguServiceEventListener >& rxLstnr )
throw(RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -550,8 +551,7 @@ sal_Bool SAL_CALL
}
-OUString SAL_CALL
- SpellChecker::getServiceDisplayName( const Locale& /*rLocale*/ )
+OUString SAL_CALL SpellChecker::getServiceDisplayName( const Locale& /*rLocale*/ )
throw(RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -559,8 +559,7 @@ OUString SAL_CALL
}
-void SAL_CALL
- SpellChecker::initialize( const Sequence< Any >& rArguments )
+void SAL_CALL SpellChecker::initialize( const Sequence< Any >& rArguments )
throw(Exception, RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -582,16 +581,15 @@ void SAL_CALL
xPropHelper = pPropHelper;
pPropHelper->AddAsPropListener(); //! after a reference is established
}
- else {
+ else
+ {
DBG_ERROR( "wrong number of arguments in sequence" );
}
-
}
}
-void SAL_CALL
- SpellChecker::dispose()
+void SAL_CALL SpellChecker::dispose()
throw(RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -605,8 +603,7 @@ void SAL_CALL
}
-void SAL_CALL
- SpellChecker::addEventListener( const Reference< XEventListener >& rxListener )
+void SAL_CALL SpellChecker::addEventListener( const Reference< XEventListener >& rxListener )
throw(RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -616,8 +613,7 @@ void SAL_CALL
}
-void SAL_CALL
- SpellChecker::removeEventListener( const Reference< XEventListener >& rxListener )
+void SAL_CALL SpellChecker::removeEventListener( const Reference< XEventListener >& rxListener )
throw(RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -673,32 +669,6 @@ Sequence< OUString > SpellChecker::getSupportedServiceNames_Static()
return aSNS;
}
-
-sal_Bool SAL_CALL SpellChecker_writeInfo(
- void * /*pServiceManager*/, registry::XRegistryKey * pRegistryKey )
-{
-
- try
- {
- String aImpl( '/' );
- aImpl += SpellChecker::getImplementationName_Static().getStr();
- aImpl.AppendAscii( "/UNO/SERVICES" );
- Reference< registry::XRegistryKey > xNewKey =
- pRegistryKey->createKey( aImpl );
- Sequence< OUString > aServices =
- SpellChecker::getSupportedServiceNames_Static();
- for( INT32 i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- return sal_True;
- }
- catch(Exception &)
- {
- return sal_False;
- }
-}
-
-
void * SAL_CALL SpellChecker_getFactory( const sal_Char * pImplName,
XMultiServiceFactory * pServiceManager, void * )
{
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.hxx b/lingucomponent/source/spellcheck/spell/sspellimp.hxx
index b87416a3d..adc8ca953 100644..100755
--- a/lingucomponent/source/spellcheck/spell/sspellimp.hxx
+++ b/lingucomponent/source/spellcheck/spell/sspellimp.hxx
@@ -69,11 +69,11 @@ class SpellChecker :
>
{
Sequence< Locale > aSuppLocales;
- Hunspell ** aDicts;
- rtl_TextEncoding * aDEncs;
- Locale * aDLocs;
- OUString * aDNames;
- sal_Int32 numdict;
+ Hunspell ** aDicts;
+ rtl_TextEncoding * aDEncs;
+ Locale * aDLocs;
+ OUString * aDNames;
+ sal_Int32 numdict;
::cppu::OInterfaceContainerHelper aEvtListeners;
Reference< XPropertyChangeListener > xPropHelper;
@@ -91,84 +91,43 @@ class SpellChecker :
}
INT16 GetSpellFailure( const OUString &rWord, const Locale &rLocale );
- Reference< XSpellAlternatives >
- GetProposals( const OUString &rWord, const Locale &rLocale );
+ Reference< XSpellAlternatives > GetProposals( const OUString &rWord, const Locale &rLocale );
public:
SpellChecker();
virtual ~SpellChecker();
// XSupportedLocales (for XSpellChecker)
- virtual Sequence< Locale > SAL_CALL
- getLocales()
- throw(RuntimeException);
- virtual sal_Bool SAL_CALL
- hasLocale( const Locale& rLocale )
- throw(RuntimeException);
+ virtual Sequence< Locale > SAL_CALL getLocales() throw(RuntimeException);
+ virtual sal_Bool SAL_CALL hasLocale( const Locale& rLocale ) throw(RuntimeException);
// XSpellChecker
- virtual sal_Bool SAL_CALL
- isValid( const OUString& rWord, const Locale& rLocale,
- const PropertyValues& rProperties )
- throw(IllegalArgumentException,
- RuntimeException);
- virtual Reference< XSpellAlternatives > SAL_CALL
- spell( const OUString& rWord, const Locale& rLocale,
- const PropertyValues& rProperties )
- throw(IllegalArgumentException,
- RuntimeException);
+ virtual sal_Bool SAL_CALL isValid( const OUString& rWord, const Locale& rLocale, const PropertyValues& rProperties ) throw(IllegalArgumentException, RuntimeException);
+ virtual Reference< XSpellAlternatives > SAL_CALL spell( const OUString& rWord, const Locale& rLocale, const PropertyValues& rProperties ) throw(IllegalArgumentException, RuntimeException);
// XLinguServiceEventBroadcaster
- virtual sal_Bool SAL_CALL
- addLinguServiceEventListener(
- const Reference< XLinguServiceEventListener >& rxLstnr )
- throw(RuntimeException);
- virtual sal_Bool SAL_CALL
- removeLinguServiceEventListener(
- const Reference< XLinguServiceEventListener >& rxLstnr )
- throw(RuntimeException);
+ virtual sal_Bool SAL_CALL addLinguServiceEventListener( const Reference< XLinguServiceEventListener >& rxLstnr ) throw(RuntimeException);
+ virtual sal_Bool SAL_CALL removeLinguServiceEventListener( const Reference< XLinguServiceEventListener >& rxLstnr ) throw(RuntimeException);
// XServiceDisplayName
- virtual OUString SAL_CALL
- getServiceDisplayName( const Locale& rLocale )
- throw(RuntimeException);
+ virtual OUString SAL_CALL getServiceDisplayName( const Locale& rLocale ) throw(RuntimeException);
// XInitialization
- virtual void SAL_CALL
- initialize( const Sequence< Any >& rArguments )
- throw(Exception, RuntimeException);
+ virtual void SAL_CALL initialize( const Sequence< Any >& rArguments ) throw(Exception, RuntimeException);
// XComponent
- virtual void SAL_CALL
- dispose()
- throw(RuntimeException);
- virtual void SAL_CALL
- addEventListener( const Reference< XEventListener >& rxListener )
- throw(RuntimeException);
- virtual void SAL_CALL
- removeEventListener( const Reference< XEventListener >& rxListener )
- throw(RuntimeException);
-
- ////////////////////////////////////////////////////////////
- // Service specific part
- //
+ virtual void SAL_CALL dispose() throw(RuntimeException);
+ virtual void SAL_CALL addEventListener( const Reference< XEventListener >& rxListener ) throw(RuntimeException);
+ virtual void SAL_CALL removeEventListener( const Reference< XEventListener >& rxListener ) throw(RuntimeException);
// XServiceInfo
- virtual OUString SAL_CALL
- getImplementationName()
- throw(RuntimeException);
- virtual sal_Bool SAL_CALL
- supportsService( const OUString& rServiceName )
- throw(RuntimeException);
- virtual Sequence< OUString > SAL_CALL
- getSupportedServiceNames()
- throw(RuntimeException);
-
-
- static inline OUString
- getImplementationName_Static() throw();
- static Sequence< OUString >
- getSupportedServiceNames_Static() throw();
+ virtual OUString SAL_CALL getImplementationName() throw(RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw(RuntimeException);
+ virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(RuntimeException);
+
+
+ static inline OUString getImplementationName_Static() throw();
+ static Sequence< OUString > getSupportedServiceNames_Static() throw();
};
inline OUString SpellChecker::getImplementationName_Static() throw()
@@ -177,7 +136,6 @@ inline OUString SpellChecker::getImplementationName_Static() throw()
}
-
///////////////////////////////////////////////////////////////////////////
#endif
diff --git a/lingucomponent/source/thesaurus/libnth/exports.dxp b/lingucomponent/source/thesaurus/libnth/exports.dxp
index b0f85bf7b..a9861e3ff 100644
--- a/lingucomponent/source/thesaurus/libnth/exports.dxp
+++ b/lingucomponent/source/thesaurus/libnth/exports.dxp
@@ -1,3 +1,2 @@
component_getFactory
component_getImplementationEnvironment
-component_writeInfo
diff --git a/lingucomponent/source/thesaurus/libnth/lnth.component b/lingucomponent/source/thesaurus/libnth/lnth.component
new file mode 100644
index 000000000..bea91b94c
--- /dev/null
+++ b/lingucomponent/source/thesaurus/libnth/lnth.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="org.openoffice.lingu.new.Thesaurus">
+ <service name="com.sun.star.linguistic2.Thesaurus"/>
+ </implementation>
+</component>
diff --git a/lingucomponent/source/thesaurus/libnth/makefile.mk b/lingucomponent/source/thesaurus/libnth/makefile.mk
index 58e4d97e5..91d39d2d3 100644
--- a/lingucomponent/source/thesaurus/libnth/makefile.mk
+++ b/lingucomponent/source/thesaurus/libnth/makefile.mk
@@ -105,3 +105,11 @@ DEF1EXPORTFILE= exports.dxp
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/lnth.component
+
+$(MISC)/lnth.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ lnth.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt lnth.component
diff --git a/lingucomponent/source/thesaurus/libnth/nthesdta.hxx b/lingucomponent/source/thesaurus/libnth/nthesdta.hxx
index c8bfd3c5e..12253528f 100644..100755
--- a/lingucomponent/source/thesaurus/libnth/nthesdta.hxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesdta.hxx
@@ -48,11 +48,11 @@ class Meaning :
{
::com::sun::star::uno::Sequence< ::rtl::OUString > aSyn; // list of synonyms, may be empty.
::rtl::OUString aTerm;
- INT16 nLanguage;
+ INT16 nLanguage;
#if 0
// this is for future use by a German thesaurus
- BOOL bIsGermanPreReform;
+ BOOL bIsGermanPreReform;
#endif
// disallow copy-constructor and assignment-operator for now
@@ -68,22 +68,12 @@ public:
virtual ~Meaning();
// XMeaning
- virtual ::rtl::OUString SAL_CALL
- getMeaning()
- throw(::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
- querySynonyms()
- throw(::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getMeaning() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL querySynonyms() throw(::com::sun::star::uno::RuntimeException);
// non-interface specific functions
- void SetSynonyms(
- const ::com::sun::star::uno::Sequence< ::rtl::OUString >
- &rSyn );
-
- void SetMeaning(const ::rtl::OUString &rTerm );
-
-
+ void SetSynonyms( const ::com::sun::star::uno::Sequence< ::rtl::OUString > &rSyn );
+ void SetMeaning( const ::rtl::OUString &rTerm );
};
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
index dd1685056..275049ee1 100644..100755
--- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
@@ -28,9 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_lingucomponent.hxx"
-// include <stdio.h>
#include <com/sun/star/uno/Reference.h>
-
#include <cppuhelper/factory.hxx> // helper for factories
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -43,6 +41,8 @@
#include <rtl/string.hxx>
#include <rtl/ustrbuf.hxx>
+#include <rtl/textenc.h>
+
#include "nthesimp.hxx"
#include <linguistic/misc.hxx>
#include <linguistic/lngprops.hxx>
@@ -100,23 +100,27 @@ Thesaurus::Thesaurus() :
aTEncs = NULL;
aTLocs = NULL;
aTNames = NULL;
- numthes = 0;
+ numthes = 0;
}
Thesaurus::~Thesaurus()
{
- if (aThes) {
- for (int i = 0; i < numthes; i++) {
+ if (aThes)
+ {
+ for (int i = 0; i < numthes; i++)
+ {
if (aThes[i]) delete aThes[i];
aThes[i] = NULL;
}
delete[] aThes;
}
aThes = NULL;
- if (aCharSetInfo) {
- for (int i = 0; i < numthes; i++) {
+ if (aCharSetInfo)
+ {
+ for (int i = 0; i < numthes; i++)
+ {
if (aCharSetInfo[i]) delete aCharSetInfo[i];
aCharSetInfo[i] = NULL;
}
@@ -244,7 +248,7 @@ Sequence< Locale > SAL_CALL Thesaurus::getLocales()
for (sal_Int32 i = 0; i < nLocales; ++i)
{
aThes[k] = NULL;
- aTEncs[k] = 0;
+ aTEncs[k] = RTL_TEXTENCODING_DONTKNOW;
aTLocs[k] = MsLangId::convertLanguageToLocale(
MsLangId::convertIsoStringToLanguage( aDictIt->aLocaleNames[i] ));
aCharSetInfo[k] = new CharClass( aTLocs[k] );
@@ -302,28 +306,28 @@ sal_Bool SAL_CALL Thesaurus::hasLocale(const Locale& rLocale)
}
-Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL
- Thesaurus::queryMeanings( const OUString& qTerm, const Locale& rLocale,
- const PropertyValues& rProperties)
- throw(IllegalArgumentException, RuntimeException)
+Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryMeanings(
+ const OUString& qTerm, const Locale& rLocale,
+ const PropertyValues& rProperties)
+ throw(IllegalArgumentException, RuntimeException)
{
- MutexGuard aGuard( GetLinguMutex() );
+ MutexGuard aGuard( GetLinguMutex() );
- uno::Sequence< Reference< XMeaning > > aMeanings( 1 );
- uno::Sequence< Reference< XMeaning > > noMeanings( 0 );
- uno::Reference< XLinguServiceManager > xLngSvcMgr( GetLngSvcMgr_Impl() );
- uno::Reference< XSpellChecker1 > xSpell;
+ uno::Sequence< Reference< XMeaning > > aMeanings( 1 );
+ uno::Sequence< Reference< XMeaning > > noMeanings( 0 );
+ uno::Reference< XLinguServiceManager > xLngSvcMgr( GetLngSvcMgr_Impl() );
+ uno::Reference< XSpellChecker1 > xSpell;
- OUString rTerm(qTerm);
- OUString pTerm(qTerm);
- sal_uInt16 ct = CAPTYPE_UNKNOWN;
- sal_Int32 stem = 0;
- sal_Int32 stem2 = 0;
+ OUString rTerm(qTerm);
+ OUString pTerm(qTerm);
+ sal_uInt16 ct = CAPTYPE_UNKNOWN;
+ sal_Int32 stem = 0;
+ sal_Int32 stem2 = 0;
- INT16 nLanguage = LocaleToLanguage( rLocale );
+ INT16 nLanguage = LocaleToLanguage( rLocale );
- if (nLanguage == LANGUAGE_NONE || !rTerm.getLength())
- return noMeanings;
+ if (nLanguage == LANGUAGE_NONE || !rTerm.getLength())
+ return noMeanings;
if (!hasLocale( rLocale ))
#ifdef LINGU_EXCEPTIONS
@@ -332,195 +336,202 @@ Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL
return noMeanings;
#endif
- if (prevTerm == qTerm && prevLocale == nLanguage) return prevMeanings;
+ if (prevTerm == qTerm && prevLocale == nLanguage)
+ return prevMeanings;
- mentry * pmean = NULL;
+ mentry * pmean = NULL;
sal_Int32 nmean = 0;
- PropertyHelper_Thes &rHelper = GetPropHelper();
- rHelper.SetTmpPropVals( rProperties );
+ PropertyHelper_Thes &rHelper = GetPropHelper();
+ rHelper.SetTmpPropVals( rProperties );
- MyThes * pTH = NULL;
- rtl_TextEncoding aEnc = 0;
- CharClass * pCC = NULL;
+ MyThes * pTH = NULL;
+ rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW;
+ CharClass * pCC = NULL;
- // find the first thesaurus that matches the locale
- for (int i =0; i < numthes; i++) {
- if (rLocale == aTLocs[i])
+ // find the first thesaurus that matches the locale
+ for (int i =0; i < numthes; i++)
+ {
+ if (rLocale == aTLocs[i])
+ {
+ // open up and intialize this thesaurus if need be
+ if (!aThes[i])
{
- // open up and intialize this thesaurus if need be
- if (!aThes[i])
- {
- OUString datpath = aTNames[i] + A2OU(".dat");
- OUString idxpath = aTNames[i] + A2OU(".idx");
- OUString ndat;
- OUString nidx;
- osl::FileBase::getSystemPathFromFileURL(datpath,ndat);
- osl::FileBase::getSystemPathFromFileURL(idxpath,nidx);
- OString aTmpidx(OU2ENC(nidx,osl_getThreadTextEncoding()));
- OString aTmpdat(OU2ENC(ndat,osl_getThreadTextEncoding()));
+ OUString datpath = aTNames[i] + A2OU(".dat");
+ OUString idxpath = aTNames[i] + A2OU(".idx");
+ OUString ndat;
+ OUString nidx;
+ osl::FileBase::getSystemPathFromFileURL(datpath,ndat);
+ osl::FileBase::getSystemPathFromFileURL(idxpath,nidx);
+ OString aTmpidx(OU2ENC(nidx,osl_getThreadTextEncoding()));
+ OString aTmpdat(OU2ENC(ndat,osl_getThreadTextEncoding()));
#if defined(WNT)
- // workaround for Windows specifc problem that the
- // path length in calls to 'fopen' is limted to somewhat
- // about 120+ characters which will usually be exceed when
- // using dictionaries as extensions.
- aTmpidx = Win_GetShortPathName( nidx );
- aTmpdat = Win_GetShortPathName( ndat );
+ // workaround for Windows specifc problem that the
+ // path length in calls to 'fopen' is limted to somewhat
+ // about 120+ characters which will usually be exceed when
+ // using dictionaries as extensions.
+ aTmpidx = Win_GetShortPathName( nidx );
+ aTmpdat = Win_GetShortPathName( ndat );
#endif
- aThes[i] = new MyThes(aTmpidx.getStr(),aTmpdat.getStr());
- if (aThes[i]) {
- const char * enc_string = aThes[i]->get_th_encoding();
- if (!enc_string) {
- aTEncs[i] = rtl_getTextEncodingFromUnixCharset("ISO8859-1");
- } else {
- aTEncs[i] = rtl_getTextEncodingFromUnixCharset(enc_string);
- if (aTEncs[i] == RTL_TEXTENCODING_DONTKNOW) {
- if (strcmp("ISCII-DEVANAGARI", enc_string) == 0) {
- aTEncs[i] = RTL_TEXTENCODING_ISCII_DEVANAGARI;
- } else if (strcmp("UTF-8", enc_string) == 0) {
- aTEncs[i] = RTL_TEXTENCODING_UTF8;
- }
- }
- }
- }
- }
- pTH = aThes[i];
- aEnc = aTEncs[i];
- pCC = aCharSetInfo[i];
-
- if (pTH)
- break;
+ aThes[i] = new MyThes(aTmpidx.getStr(),aTmpdat.getStr());
+ if (aThes[i])
+ aTEncs[i] = getTextEncodingFromCharset(aThes[i]->get_th_encoding());
+ }
+ pTH = aThes[i];
+ eEnc = aTEncs[i];
+ pCC = aCharSetInfo[i];
+
+ if (pTH)
+ break;
}
}
- while (pTH) {
- // convert word to all lower case for searching
- if (!stem) ct = capitalType(rTerm, pCC);
- OUString nTerm(makeLowerCase(rTerm, pCC));
- OString aTmp( OU2ENC(nTerm, aEnc) );
- nmean = pTH->Lookup(aTmp.getStr(),aTmp.getLength(),&pmean);
+ // we don't want to work with a default text encoding since following incorrect
+ // results may occur only for specific text and thus may be hard to notice.
+ // Thus better always make a clean exit here if the text encoding is in question.
+ // Hopefully something not working at all will raise proper attention quickly. ;-)
+ DBG_ASSERT( eEnc != RTL_TEXTENCODING_DONTKNOW, "failed to get text encoding! (maybe incorrect encoding string in file)" );
+ if (eEnc == RTL_TEXTENCODING_DONTKNOW)
+ return noMeanings;
+
+ while (pTH)
+ {
+ // convert word to all lower case for searching
+ if (!stem)
+ ct = capitalType(rTerm, pCC);
+ OUString nTerm(makeLowerCase(rTerm, pCC));
+ OString aTmp( OU2ENC(nTerm, eEnc) );
+ nmean = pTH->Lookup(aTmp.getStr(),aTmp.getLength(),&pmean);
- if (nmean) aMeanings.realloc( nmean );
+ if (nmean)
+ aMeanings.realloc( nmean );
- mentry * pe = pmean;
- OUString codeTerm = qTerm;
- Reference< XSpellAlternatives > xTmpRes2;
+ mentry * pe = pmean;
+ OUString codeTerm = qTerm;
+ Reference< XSpellAlternatives > xTmpRes2;
- if (stem) {
- xTmpRes2 = xSpell->spell( A2OU("<?xml?><query type='analyze'><word>") +
+ if (stem)
+ {
+ xTmpRes2 = xSpell->spell( A2OU("<?xml?><query type='analyze'><word>") +
pTerm + A2OU("</word></query>"), nLanguage, rProperties );
- if (xTmpRes2.is()) {
- Sequence<OUString>seq = xTmpRes2->getAlternatives();
- if (seq.getLength() > 0) {
+ if (xTmpRes2.is())
+ {
+ Sequence<OUString>seq = xTmpRes2->getAlternatives();
+ if (seq.getLength() > 0)
+ {
codeTerm = seq[0];
stem2 = 1;
- }
+ }
#if 0
- OString o = OUStringToOString(codeTerm, rtl_getTextEncodingFromUnixCharset("UTF-8"));
- fprintf(stderr, "CODETERM: %s\n", o.pData->buffer);
+ OString o = OUStringToOString(codeTerm, RTL_TEXTENCODING_UTF8);
+ fprintf(stderr, "CODETERM: %s\n", o.pData->buffer);
#endif
- }
- }
-
- for (int j = 0; j < nmean; j++) {
- int count = pe->count;
- if (count) {
- Sequence< OUString > aStr( count );
- OUString *pStr = aStr.getArray();
-
- for (int i=0; i < count; i++) {
- OUString sTerm(pe->psyns[i],strlen(pe->psyns[i]),aEnc );
- sal_Int32 catpos = sTerm.indexOf('(');
- sal_Int32 catpos2 = 0;
- OUString catst;
- OUString catst2;
- if (catpos > 2) {
- // remove category name for affixation and casing
- catst = A2OU(" ") + sTerm.copy(catpos);
- sTerm = sTerm.copy(0, catpos);
- sTerm = sTerm.trim();
- }
- // generate synonyms with affixes
- if (stem && stem2) {
- Reference< XSpellAlternatives > xTmpRes;
- xTmpRes = xSpell->spell( A2OU("<?xml?><query type='generate'><word>") +
- sTerm + A2OU("</word>") + codeTerm + A2OU("</query>"), nLanguage, rProperties );
- if (xTmpRes.is()) {
- Sequence<OUString>seq = xTmpRes->getAlternatives();
- for (int k = 0; k < seq.getLength(); k++) {
- OString o = OUStringToOString(seq[k], rtl_getTextEncodingFromUnixCharset("UTF-8"));
- }
- if (seq.getLength() > 0) sTerm = seq[0];
- }
- }
- if (catpos2) sTerm = catst2 + sTerm;
-
- sal_uInt16 ct1 = capitalType(sTerm, pCC);
- if (CAPTYPE_MIXED == ct1)
- ct = ct1;
- OUString cTerm;
- switch (ct) {
- case CAPTYPE_ALLCAP:
- {
- cTerm = makeUpperCase(sTerm, pCC);
- break;
- }
- case CAPTYPE_INITCAP:
- {
- cTerm = makeInitCap(sTerm, pCC);
- break;
- }
- default:
- {
- cTerm = sTerm;
- break;
- }
- }
- OUString aAlt( cTerm + catst);
- pStr[i] = aAlt;
- }
+ }
+ }
+
+ for (int j = 0; j < nmean; j++)
+ {
+ int count = pe->count;
+ if (count)
+ {
+ Sequence< OUString > aStr( count );
+ OUString *pStr = aStr.getArray();
+
+ for (int i=0; i < count; i++)
+ {
+ OUString sTerm(pe->psyns[i],strlen(pe->psyns[i]),eEnc );
+ sal_Int32 catpos = sTerm.indexOf('(');
+ sal_Int32 catpos2 = 0;
+ OUString catst;
+ OUString catst2;
+ if (catpos > 2)
+ {
+ // remove category name for affixation and casing
+ catst = A2OU(" ") + sTerm.copy(catpos);
+ sTerm = sTerm.copy(0, catpos);
+ sTerm = sTerm.trim();
+ }
+ // generate synonyms with affixes
+ if (stem && stem2)
+ {
+ Reference< XSpellAlternatives > xTmpRes;
+ xTmpRes = xSpell->spell( A2OU("<?xml?><query type='generate'><word>") +
+ sTerm + A2OU("</word>") + codeTerm + A2OU("</query>"), nLanguage, rProperties );
+ if (xTmpRes.is())
+ {
+ Sequence<OUString>seq = xTmpRes->getAlternatives();
+ if (seq.getLength() > 0)
+ sTerm = seq[0];
+ }
+ }
+ if (catpos2)
+ sTerm = catst2 + sTerm;
+
+ sal_uInt16 ct1 = capitalType(sTerm, pCC);
+ if (CAPTYPE_MIXED == ct1)
+ ct = ct1;
+ OUString cTerm;
+ switch (ct)
+ {
+ case CAPTYPE_ALLCAP:
+ cTerm = makeUpperCase(sTerm, pCC);
+ break;
+ case CAPTYPE_INITCAP:
+ cTerm = makeInitCap(sTerm, pCC);
+ break;
+ default:
+ cTerm = sTerm;
+ break;
+ }
+ OUString aAlt( cTerm + catst);
+ pStr[i] = aAlt;
+ }
#if 0
- Meaning * pMn = new Meaning(rTerm,nLanguage,rHelper);
+ Meaning * pMn = new Meaning(rTerm,nLanguage,rHelper);
#endif
- Meaning * pMn = new Meaning(rTerm,nLanguage);
- OUString dTerm(pe->defn,strlen(pe->defn),aEnc );
- pMn->SetMeaning(dTerm);
- pMn->SetSynonyms(aStr);
- Reference<XMeaning>* pMeaning = aMeanings.getArray();
- pMeaning[j] = pMn;
- }
- pe++;
- }
- pTH->CleanUpAfterLookup(&pmean,nmean);
-
- if (nmean) {
+ Meaning * pMn = new Meaning(rTerm,nLanguage);
+ OUString dTerm(pe->defn,strlen(pe->defn),eEnc );
+ pMn->SetMeaning(dTerm);
+ pMn->SetSynonyms(aStr);
+ Reference<XMeaning>* pMeaning = aMeanings.getArray();
+ pMeaning[j] = pMn;
+ }
+ pe++;
+ }
+ pTH->CleanUpAfterLookup(&pmean,nmean);
+
+ if (nmean)
+ {
prevTerm = qTerm;
prevMeanings = aMeanings;
prevLocale = nLanguage;
return aMeanings;
- }
+ }
- if (stem || !xLngSvcMgr.is()) return noMeanings;
+ if (stem || !xLngSvcMgr.is())
+ return noMeanings;
stem = 1;
xSpell = uno::Reference< XSpellChecker1 >( xLngSvcMgr->getSpellChecker(), UNO_QUERY );
- if (!xSpell.is() || !xSpell->isValid( A2OU(SPELLML_SUPPORT), nLanguage, rProperties )) {
+ if (!xSpell.is() || !xSpell->isValid( A2OU(SPELLML_SUPPORT), nLanguage, rProperties ))
return noMeanings;
- }
Reference< XSpellAlternatives > xTmpRes;
xTmpRes = xSpell->spell( A2OU("<?xml?><query type='stem'><word>") +
rTerm + A2OU("</word></query>"), nLanguage, rProperties );
- if (xTmpRes.is()) {
+ if (xTmpRes.is())
+ {
Sequence<OUString>seq = xTmpRes->getAlternatives();
#if 0
- for (int i = 0; i < seq.getLength(); i++) {
- OString o = OUStringToOString(seq[i], rtl_getTextEncodingFromUnixCharset("UTF-8"));
+ for (int i = 0; i < seq.getLength(); i++)
+ {
+ OString o = OUStringToOString(seq[i], RTL_TEXTENCODING_UTF8);
fprintf(stderr, "%d: %s\n", i + 1, o.pData->buffer);
}
#endif
- if (seq.getLength() > 0) {
+ if (seq.getLength() > 0)
+ {
rTerm = seq[0]; // XXX Use only the first stem
continue;
}
@@ -529,17 +540,21 @@ Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL
// stem the last word of the synonym (for categories after affixation)
rTerm = rTerm.trim();
sal_Int32 pos = rTerm.lastIndexOf(' ');
- if (!pos) return noMeanings;
+ if (!pos)
+ return noMeanings;
xTmpRes = xSpell->spell( A2OU("<?xml?><query type='stem'><word>") +
rTerm.copy(pos + 1) + A2OU("</word></query>"), nLanguage, rProperties );
- if (xTmpRes.is()) {
+ if (xTmpRes.is())
+ {
Sequence<OUString>seq = xTmpRes->getAlternatives();
- if (seq.getLength() > 0) {
+ if (seq.getLength() > 0)
+ {
pTerm = rTerm.copy(pos + 1);
rTerm = rTerm.copy(0, pos + 1) + seq[0];
-#if 0
- for (int i = 0; i < seq.getLength(); i++) {
- OString o = OUStringToOString(seq[i], rtl_getTextEncodingFromUnixCharset("UTF-8"));
+#if 0
+ for (int i = 0; i < seq.getLength(); i++)
+ {
+ OString o = OUStringToOString(seq[i], RTL_TEXTENCODING_UTF8);
fprintf(stderr, "%d: %s\n", i + 1, o.pData->buffer);
}
#endif
@@ -547,12 +562,11 @@ Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL
}
}
break;
- }
+ }
return noMeanings;
}
-
Reference< XInterface > SAL_CALL Thesaurus_CreateInstance(
const Reference< XMultiServiceFactory > & /*rSMgr*/ )
throw(Exception)
@@ -562,8 +576,7 @@ Reference< XInterface > SAL_CALL Thesaurus_CreateInstance(
}
-OUString SAL_CALL
- Thesaurus::getServiceDisplayName( const Locale& /*rLocale*/ )
+OUString SAL_CALL Thesaurus::getServiceDisplayName( const Locale& /*rLocale*/ )
throw(RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -571,8 +584,7 @@ OUString SAL_CALL
}
-void SAL_CALL
- Thesaurus::initialize( const Sequence< Any >& rArguments )
+void SAL_CALL Thesaurus::initialize( const Sequence< Any >& rArguments )
throw(Exception, RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -603,24 +615,26 @@ void SAL_CALL
sal_uInt16 SAL_CALL Thesaurus::capitalType(const OUString& aTerm, CharClass * pCC)
{
sal_Int32 tlen = aTerm.getLength();
- if ((pCC) && (tlen)) {
- String aStr(aTerm);
- sal_Int32 nc = 0;
- for (USHORT tindex = 0; tindex < tlen; tindex++) {
- if (pCC->getCharacterType(aStr,tindex) &
- ::com::sun::star::i18n::KCharacterType::UPPER) nc++;
- }
-
- if (nc == 0) return (sal_uInt16) CAPTYPE_NOCAP;
-
- if (nc == tlen) return (sal_uInt16) CAPTYPE_ALLCAP;
+ if ((pCC) && (tlen))
+ {
+ String aStr(aTerm);
+ sal_Int32 nc = 0;
+ for (USHORT tindex = 0; tindex < tlen; tindex++)
+ {
+ if (pCC->getCharacterType(aStr,tindex) &
+ ::com::sun::star::i18n::KCharacterType::UPPER) nc++;
+ }
- if ((nc == 1) && (pCC->getCharacterType(aStr,0) &
- ::com::sun::star::i18n::KCharacterType::UPPER))
- return (sal_uInt16) CAPTYPE_INITCAP;
+ if (nc == 0)
+ return (sal_uInt16) CAPTYPE_NOCAP;
+ if (nc == tlen)
+ return (sal_uInt16) CAPTYPE_ALLCAP;
+ if ((nc == 1) && (pCC->getCharacterType(aStr,0) &
+ ::com::sun::star::i18n::KCharacterType::UPPER))
+ return (sal_uInt16) CAPTYPE_INITCAP;
- return (sal_uInt16) CAPTYPE_MIXED;
- }
+ return (sal_uInt16) CAPTYPE_MIXED;
+ }
return (sal_uInt16) CAPTYPE_UNKNOWN;
}
@@ -628,38 +642,40 @@ sal_uInt16 SAL_CALL Thesaurus::capitalType(const OUString& aTerm, CharClass * pC
OUString SAL_CALL Thesaurus::makeLowerCase(const OUString& aTerm, CharClass * pCC)
{
- if (pCC)
- return pCC->toLower_rtl(aTerm, 0, aTerm.getLength());
- return aTerm;
+ if (pCC)
+ return pCC->toLower_rtl(aTerm, 0, aTerm.getLength());
+ return aTerm;
}
OUString SAL_CALL Thesaurus::makeUpperCase(const OUString& aTerm, CharClass * pCC)
{
- if (pCC)
- return pCC->toUpper_rtl(aTerm, 0, aTerm.getLength());
- return aTerm;
+ if (pCC)
+ return pCC->toUpper_rtl(aTerm, 0, aTerm.getLength());
+ return aTerm;
}
OUString SAL_CALL Thesaurus::makeInitCap(const OUString& aTerm, CharClass * pCC)
{
- sal_Int32 tlen = aTerm.getLength();
- if ((pCC) && (tlen)) {
- OUString bTemp = aTerm.copy(0,1);
- if (tlen > 1)
- return ( pCC->toUpper_rtl(bTemp, 0, 1)
- + pCC->toLower_rtl(aTerm,1,(tlen-1)) );
+ sal_Int32 tlen = aTerm.getLength();
+ if ((pCC) && (tlen))
+ {
+ OUString bTemp = aTerm.copy(0,1);
+ if (tlen > 1)
+ {
+ return ( pCC->toUpper_rtl(bTemp, 0, 1)
+ + pCC->toLower_rtl(aTerm,1,(tlen-1)) );
+ }
- return pCC->toUpper_rtl(bTemp, 0, 1);
+ return pCC->toUpper_rtl(bTemp, 0, 1);
}
- return aTerm;
+ return aTerm;
}
-void SAL_CALL
- Thesaurus::dispose()
+void SAL_CALL Thesaurus::dispose()
throw(RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -673,8 +689,7 @@ void SAL_CALL
}
-void SAL_CALL
- Thesaurus::addEventListener( const Reference< XEventListener >& rxListener )
+void SAL_CALL Thesaurus::addEventListener( const Reference< XEventListener >& rxListener )
throw(RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -684,8 +699,7 @@ void SAL_CALL
}
-void SAL_CALL
- Thesaurus::removeEventListener( const Reference< XEventListener >& rxListener )
+void SAL_CALL Thesaurus::removeEventListener( const Reference< XEventListener >& rxListener )
throw(RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -739,31 +753,6 @@ Sequence< OUString > Thesaurus::getSupportedServiceNames_Static()
return aSNS;
}
-
-sal_Bool SAL_CALL Thesaurus_writeInfo(
- void * /*pServiceManager*/, registry::XRegistryKey * pRegistryKey )
-{
- try
- {
- String aImpl( '/' );
- aImpl += Thesaurus::getImplementationName_Static().getStr();
- aImpl.AppendAscii( "/UNO/SERVICES" );
- Reference< registry::XRegistryKey > xNewKey =
- pRegistryKey->createKey( aImpl );
- Sequence< OUString > aServices =
- Thesaurus::getSupportedServiceNames_Static();
- for( INT32 i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- return sal_True;
- }
- catch(Exception &)
- {
- return sal_False;
- }
-}
-
-
void * SAL_CALL Thesaurus_getFactory( const sal_Char * pImplName,
XMultiServiceFactory * pServiceManager, void * )
{
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.hxx b/lingucomponent/source/thesaurus/libnth/nthesimp.hxx
index f0dde77ba..c717587bb 100644..100755
--- a/lingucomponent/source/thesaurus/libnth/nthesimp.hxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesimp.hxx
@@ -116,55 +116,27 @@ public:
virtual ~Thesaurus();
// XSupportedLocales (for XThesaurus)
- virtual Sequence< Locale > SAL_CALL
- getLocales()
- throw(RuntimeException);
- virtual sal_Bool SAL_CALL
- hasLocale( const Locale& rLocale )
- throw(RuntimeException);
+ virtual Sequence< Locale > SAL_CALL getLocales() throw(RuntimeException);
+ virtual sal_Bool SAL_CALL hasLocale( const Locale& rLocale ) throw(RuntimeException);
// XThesaurus
- virtual Sequence< Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL
- queryMeanings( const OUString& rTerm, const Locale& rLocale,
- const PropertyValues& rProperties )
- throw(IllegalArgumentException,
- RuntimeException);
+ virtual Sequence< Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL queryMeanings( const OUString& rTerm, const Locale& rLocale, const PropertyValues& rProperties ) throw(IllegalArgumentException, RuntimeException);
// XServiceDisplayName
- virtual OUString SAL_CALL
- getServiceDisplayName( const Locale& rLocale )
- throw(RuntimeException);
+ virtual OUString SAL_CALL getServiceDisplayName( const Locale& rLocale ) throw(RuntimeException);
// XInitialization
- virtual void SAL_CALL
- initialize( const Sequence< Any >& rArguments )
- throw(Exception, RuntimeException);
+ virtual void SAL_CALL initialize( const Sequence< Any >& rArguments ) throw(Exception, RuntimeException);
// XComponent
- virtual void SAL_CALL
- dispose()
- throw(RuntimeException);
- virtual void SAL_CALL
- addEventListener( const Reference< XEventListener >& rxListener )
- throw(RuntimeException);
- virtual void SAL_CALL
- removeEventListener( const Reference< XEventListener >& rxListener )
- throw(RuntimeException);
-
- ////////////////////////////////////////////////////////////
- // Service specific part
- //
+ virtual void SAL_CALL dispose() throw(RuntimeException);
+ virtual void SAL_CALL addEventListener( const Reference< XEventListener >& rxListener ) throw(RuntimeException);
+ virtual void SAL_CALL removeEventListener( const Reference< XEventListener >& rxListener ) throw(RuntimeException);
// XServiceInfo
- virtual OUString SAL_CALL
- getImplementationName()
- throw(RuntimeException);
- virtual sal_Bool SAL_CALL
- supportsService( const OUString& rServiceName )
- throw(RuntimeException);
- virtual Sequence< OUString > SAL_CALL
- getSupportedServiceNames()
- throw(RuntimeException);
+ virtual OUString SAL_CALL getImplementationName() throw(RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw(RuntimeException);
+ virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(RuntimeException);
static inline OUString
@@ -183,8 +155,7 @@ private:
static ::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XSpellChecker1 > xSpell;
*/
- static ::com::sun::star::uno::Reference<
- ::com::sun::star::linguistic2::XLinguServiceManager > GetLngSvcMgr();
+ static ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XLinguServiceManager > GetLngSvcMgr();
};
diff --git a/lingucomponent/source/thesaurus/libnth/ntreg.cxx b/lingucomponent/source/thesaurus/libnth/ntreg.cxx
index ffdca7377..71dbe7d08 100644
--- a/lingucomponent/source/thesaurus/libnth/ntreg.cxx
+++ b/lingucomponent/source/thesaurus/libnth/ntreg.cxx
@@ -41,9 +41,6 @@ using namespace com::sun::star::registry;
// declaration of external RegEntry-functions defined by the service objects
//
-extern sal_Bool SAL_CALL Thesaurus_writeInfo(
- void * /*pServiceManager*/, XRegistryKey * pRegistryKey );
-
extern void * SAL_CALL Thesaurus_getFactory(
const sal_Char * pImplName,
XMultiServiceFactory * pServiceManager,
@@ -56,12 +53,6 @@ extern void * SAL_CALL Thesaurus_getFactory(
extern "C"
{
-sal_Bool SAL_CALL component_writeInfo(
- void * pServiceManager, XRegistryKey * pRegistryKey )
-{
- return Thesaurus_writeInfo( pServiceManager, pRegistryKey );
-}
-
void SAL_CALL component_getImplementationEnvironment(
const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
{
diff --git a/package/prj/d.lst b/package/prj/d.lst
index 23966d0cf..919a1719a 100644
--- a/package/prj/d.lst
+++ b/package/prj/d.lst
@@ -3,3 +3,5 @@
..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%\lib*.so
..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib
..\dtd\*.dtd %_DEST%\bin%_EXT%\*.*
+..\%__SRC%\misc\package2.component %_DEST%\xml%_EXT%\package2.component
+..\%__SRC%\misc\xstor.component %_DEST%\xml%_EXT%\xstor.component
diff --git a/package/source/manifest/UnoRegister.cxx b/package/source/manifest/UnoRegister.cxx
index 5c393ec08..eeedeb7e5 100644
--- a/package/source/manifest/UnoRegister.cxx
+++ b/package/source/manifest/UnoRegister.cxx
@@ -46,43 +46,6 @@ using namespace ::com::sun::star::registry;
using namespace ::com::sun::star::packages;
using namespace ::com::sun::star::packages::manifest;
-static sal_Bool writeInfo( void * pRegistryKey,
- const OUString & rImplementationName,
- Sequence< OUString > const & rServiceNames )
-{
- OUString aKeyName( OUString::createFromAscii( "/" ) );
- aKeyName += rImplementationName;
- aKeyName += OUString::createFromAscii( "/UNO/SERVICES" );
-
- Reference< XRegistryKey > xKey;
- try
- {
- xKey = static_cast< XRegistryKey * >(
- pRegistryKey )->createKey( aKeyName );
- }
- catch ( InvalidRegistryException const & )
- {
- }
-
- if ( !xKey.is() )
- return sal_False;
-
- sal_Bool bSuccess = sal_True;
-
- for ( sal_Int32 n = 0; n < rServiceNames.getLength(); ++n )
- {
- try
- {
- xKey->createKey( rServiceNames[ n ] );
- }
- catch ( InvalidRegistryException const & )
- {
- bSuccess = sal_False;
- break;
- }
- }
- return bSuccess;
-}
// C functions to implement this as a component
extern "C" void SAL_CALL component_getImplementationEnvironment(
@@ -90,32 +53,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment(
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-
-/**
- * This function creates an implementation section in the registry and another subkey
- * for each supported service.
- * @param pServiceManager generic uno interface providing a service manager
- * @param pRegistryKey generic uno interface providing registry key to write
- */
-extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey )
-{
- return pRegistryKey &&
- writeInfo (pRegistryKey,
- ManifestReader::static_getImplementationName(),
- ManifestReader::static_getSupportedServiceNames() ) &&
- writeInfo (pRegistryKey,
- ManifestWriter::static_getImplementationName(),
- ManifestWriter::static_getSupportedServiceNames() ) &&
- writeInfo (pRegistryKey,
- ZipPackage::static_getImplementationName(),
- ZipPackage::static_getSupportedServiceNames() ) &&
-
- writeInfo (pRegistryKey,
- OZipFileAccess::impl_staticGetImplementationName(),
- OZipFileAccess::impl_staticGetSupportedServiceNames() );
-
-}
-
/**
* This function is called to get service factories for an implementation.
diff --git a/package/source/xstor/makefile.mk b/package/source/xstor/makefile.mk
index 76494cb7d..5c381ba4c 100644
--- a/package/source/xstor/makefile.mk
+++ b/package/source/xstor/makefile.mk
@@ -73,3 +73,11 @@ DEF1EXPORTFILE=$(SHL1TARGET).dxp
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/xstor.component
+
+$(MISC)/xstor.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ xstor.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt xstor.component
diff --git a/package/source/xstor/register.cxx b/package/source/xstor/register.cxx
index b0235f063..8eb4d7816 100644
--- a/package/source/xstor/register.cxx
+++ b/package/source/xstor/register.cxx
@@ -69,33 +69,5 @@ void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServic
return pRet;
}
-sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegistryKey )
-{
- if (pRegistryKey)
- {
- try
- {
- uno::Reference< registry::XRegistryKey > xKey( reinterpret_cast< registry::XRegistryKey* >( pRegistryKey ) );
-
- uno::Reference< registry::XRegistryKey > xNewKey;
-
- xNewKey = xKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) +
- OStorageFactory::impl_staticGetImplementationName() +
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) );
-
- const uno::Sequence< ::rtl::OUString > aServices = OStorageFactory::impl_staticGetSupportedServiceNames();
- for( sal_Int32 ind = 0; ind < aServices.getLength(); ind++ )
- xNewKey->createKey( aServices.getConstArray()[ind] );
-
- return sal_True;
- }
- catch (registry::InvalidRegistryException &)
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
- }
- }
- return sal_False;
-}
-
} // extern "C"
diff --git a/package/source/xstor/xstor.component b/package/source/xstor/xstor.component
new file mode 100644
index 000000000..f338d6a54
--- /dev/null
+++ b/package/source/xstor/xstor.component
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.embed.StorageFactory">
+ <service name="com.sun.star.comp.embed.StorageFactory"/>
+ <service name="com.sun.star.embed.StorageFactory"/>
+ </implementation>
+</component>
diff --git a/package/source/xstor/xstor.dxp b/package/source/xstor/xstor.dxp
index 9630d7e06..f0e1c6993 100644
--- a/package/source/xstor/xstor.dxp
+++ b/package/source/xstor/xstor.dxp
@@ -1,3 +1,2 @@
component_getImplementationEnvironment
-component_writeInfo
component_getFactory
diff --git a/package/util/exports.dxp b/package/util/exports.dxp
index 9630d7e06..f0e1c6993 100644
--- a/package/util/exports.dxp
+++ b/package/util/exports.dxp
@@ -1,3 +1,2 @@
component_getImplementationEnvironment
-component_writeInfo
component_getFactory
diff --git a/package/util/makefile.mk b/package/util/makefile.mk
index 20732c102..344b2cf13 100644
--- a/package/util/makefile.mk
+++ b/package/util/makefile.mk
@@ -75,3 +75,11 @@ DEF1NAME=$(SHL1TARGET)
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/package2.component
+
+$(MISC)/package2.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ package2.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt package2.component
diff --git a/package/util/package2.component b/package/util/package2.component
new file mode 100644
index 000000000..cdfa842d0
--- /dev/null
+++ b/package/util/package2.component
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.package.zip.ZipFileAccess">
+ <service name="com.sun.star.comp.packages.zip.ZipFileAccess"/>
+ <service name="com.sun.star.packages.zip.ZipFileAccess"/>
+ </implementation>
+ <implementation name="com.sun.star.packages.comp.ZipPackage">
+ <service name="com.sun.star.packages.Package"/>
+ </implementation>
+ <implementation name="com.sun.star.packages.manifest.comp.ManifestReader">
+ <service name="com.sun.star.packages.manifest.ManifestReader"/>
+ </implementation>
+ <implementation name="com.sun.star.packages.manifest.comp.ManifestWriter">
+ <service name="com.sun.star.packages.manifest.ManifestWriter"/>
+ </implementation>
+</component>
diff --git a/setup_native/scripts/admin.pl b/setup_native/scripts/admin.pl
index 466182b24..d90c76650 100644
--- a/setup_native/scripts/admin.pl
+++ b/setup_native/scripts/admin.pl
@@ -66,7 +66,6 @@ sub usage
{
print <<Ende;
----------------------------------------------------------------------
-$prog V1.0 (c) Sun Microsystems 2009
This program installs a Windows Installer installation set
without using msiexec.exe. The installation is comparable
with an administrative installation using the Windows Installer
diff --git a/wizards/com/sun/star/wizards/agenda/CallWizard.java b/wizards/com/sun/star/wizards/agenda/CallWizard.java
index de5a16106..bcaf82726 100644
--- a/wizards/com/sun/star/wizards/agenda/CallWizard.java
+++ b/wizards/com/sun/star/wizards/agenda/CallWizard.java
@@ -40,8 +40,7 @@ import com.sun.star.uno.Type;
/**
* This class capsulates the class, that implements the minimal component, a factory for
- * creating the service (<CODE>__getServiceFactory</CODE>) and a method, that writes the
- * information into the given registry key (<CODE>__writeRegistryServiceInfo</CODE>).
+ * creating the service (<CODE>__getServiceFactory</CODE>).
*
* @author $author$
* @version $Revision: 1.5.52.1 $
@@ -74,21 +73,6 @@ public class CallWizard {
}
/**
- * Writes the service information into the given registry key. This method is called
- * by the <code>JavaLoader</code>.
- *
- * @param xregistrykey Makes structural information (except regarding tree
- * structures) of a single registry key accessible.
- *
- * @return returns true if the operation succeeded
- *
- * @see com.sun.star.comp.loader.JavaLoader#
- */
- public static boolean __writeRegistryServiceInfo(XRegistryKey xregistrykey) {
- return FactoryHelper.writeRegistryServiceInfo(WizardImplementation.class.getName(), WizardImplementation.__serviceName, xregistrykey);
- }
-
- /**
* This class implements the component. At least the interfaces XServiceInfo,
* XTypeProvider, and XInitialization should be provided by the service.
*/
diff --git a/wizards/com/sun/star/wizards/agenda/agenda.component b/wizards/com/sun/star/wizards/agenda/agenda.component
new file mode 100644
index 000000000..e35087d94
--- /dev/null
+++ b/wizards/com/sun/star/wizards/agenda/agenda.component
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.Java2"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation
+ name="com.sun.star.wizards.agenda.CallWizard$WizardImplementation">
+ <service name="com.sun.star.wizards.agenda.CallWizard"/>
+ </implementation>
+</component>
diff --git a/wizards/com/sun/star/wizards/agenda/makefile.mk b/wizards/com/sun/star/wizards/agenda/makefile.mk
index 314dcf3b7..1f07e9adf 100644
--- a/wizards/com/sun/star/wizards/agenda/makefile.mk
+++ b/wizards/com/sun/star/wizards/agenda/makefile.mk
@@ -69,3 +69,11 @@ JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/agenda.component
+
+$(MISC)/agenda.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ agenda.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt agenda.component
diff --git a/wizards/com/sun/star/wizards/fax/CallWizard.java b/wizards/com/sun/star/wizards/fax/CallWizard.java
index 0d04b0b94..d177a2100 100644
--- a/wizards/com/sun/star/wizards/fax/CallWizard.java
+++ b/wizards/com/sun/star/wizards/fax/CallWizard.java
@@ -41,8 +41,7 @@ import com.sun.star.uno.Type;
/**
* This class capsulates the class, that implements the minimal component, a factory for
- * creating the service (<CODE>__getServiceFactory</CODE>) and a method, that writes the
- * information into the given registry key (<CODE>__writeRegistryServiceInfo</CODE>).
+ * creating the service (<CODE>__getServiceFactory</CODE>).
*
* @author $author$
* @version $Revision: 1.3.192.1 $
@@ -78,22 +77,6 @@ public class CallWizard
}
/**
- * Writes the service information into the given registry key. This method is called
- * by the <code>JavaLoader</code>.
- *
- * @param xregistrykey Makes structural information (except regarding tree
- * structures) of a single registry key accessible.
- *
- * @return returns true if the operation succeeded
- *
- * @see com.sun.star.comp.loader.JavaLoader#
- */
- public static boolean __writeRegistryServiceInfo(XRegistryKey xregistrykey)
- {
- return FactoryHelper.writeRegistryServiceInfo(WizardImplementation.class.getName(), WizardImplementation.__serviceName, xregistrykey);
- }
-
- /**
* This class implements the component. At least the interfaces XServiceInfo,
* XTypeProvider, and XInitialization should be provided by the service.
*/
diff --git a/wizards/com/sun/star/wizards/fax/fax.component b/wizards/com/sun/star/wizards/fax/fax.component
new file mode 100644
index 000000000..462fe2901
--- /dev/null
+++ b/wizards/com/sun/star/wizards/fax/fax.component
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.Java2"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation
+ name="com.sun.star.wizards.fax.CallWizard$WizardImplementation">
+ <service name="com.sun.star.wizards.fax.CallWizard"/>
+ </implementation>
+</component>
diff --git a/wizards/com/sun/star/wizards/fax/makefile.mk b/wizards/com/sun/star/wizards/fax/makefile.mk
index 247aaf063..5cf089392 100644
--- a/wizards/com/sun/star/wizards/fax/makefile.mk
+++ b/wizards/com/sun/star/wizards/fax/makefile.mk
@@ -60,3 +60,11 @@ JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/fax.component
+
+$(MISC)/fax.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ fax.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt fax.component
diff --git a/wizards/com/sun/star/wizards/form/CallFormWizard.java b/wizards/com/sun/star/wizards/form/CallFormWizard.java
index 4d730225d..d0994cf11 100644
--- a/wizards/com/sun/star/wizards/form/CallFormWizard.java
+++ b/wizards/com/sun/star/wizards/form/CallFormWizard.java
@@ -31,9 +31,7 @@ import com.sun.star.uno.Type;
import com.sun.star.wizards.common.Properties;
/** This class capsulates the class, that implements the minimal component, a
- * factory for creating the service (<CODE>__getServiceFactory</CODE>) and a
- * method, that writes the information into the given registry key
- * (<CODE>__writeRegistryServiceInfo</CODE>).
+ * factory for creating the service (<CODE>__getServiceFactory</CODE>).
* @author Bertram Nolte
*/
public class CallFormWizard
@@ -62,19 +60,6 @@ public class CallFormWizard
return xsingleservicefactory;
}
- /** Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>.
- * @return returns true if the operation succeeded
- * @see com.sun.star.comp.loader.JavaLoader#
- * @param xregistrykey Makes structural information (except regarding tree
- * structures) of a single
- * registry key accessible.
- */
- public static boolean __writeRegistryServiceInfo(com.sun.star.registry.XRegistryKey xregistrykey)
- {
- return com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(FormWizardImplementation.class.getName(), FormWizardImplementation.__serviceName, xregistrykey);
- }
-
/** This class implements the component. At least the interfaces XServiceInfo,
* XTypeProvider, and XInitialization should be provided by the service.
*/
diff --git a/wizards/com/sun/star/wizards/form/form.component b/wizards/com/sun/star/wizards/form/form.component
new file mode 100644
index 000000000..3f010d8bc
--- /dev/null
+++ b/wizards/com/sun/star/wizards/form/form.component
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.Java2"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation
+ name="com.sun.star.wizards.form.CallFormWizard$FormWizardImplementation">
+ <service name="com.sun.star.wizards.form.CallFormWizard"/>
+ </implementation>
+</component>
diff --git a/wizards/com/sun/star/wizards/form/makefile.mk b/wizards/com/sun/star/wizards/form/makefile.mk
index 092135289..b63666073 100644
--- a/wizards/com/sun/star/wizards/form/makefile.mk
+++ b/wizards/com/sun/star/wizards/form/makefile.mk
@@ -65,3 +65,11 @@ JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/form.component
+
+$(MISC)/form.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ form.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt form.component
diff --git a/wizards/com/sun/star/wizards/letter/CallWizard.java b/wizards/com/sun/star/wizards/letter/CallWizard.java
index d203856d6..5488ffcc4 100644
--- a/wizards/com/sun/star/wizards/letter/CallWizard.java
+++ b/wizards/com/sun/star/wizards/letter/CallWizard.java
@@ -41,8 +41,7 @@ import com.sun.star.uno.Type;
/**
* This class capsulates the class, that implements the minimal component, a factory for
- * creating the service (<CODE>__getServiceFactory</CODE>) and a method, that writes the
- * information into the given registry key (<CODE>__writeRegistryServiceInfo</CODE>).
+ * creating the service (<CODE>__getServiceFactory</CODE>).
*
* @author $author$
* @version $Revision: 1.3.192.1 $
@@ -78,22 +77,6 @@ public class CallWizard
}
/**
- * Writes the service information into the given registry key. This method is called
- * by the <code>JavaLoader</code>.
- *
- * @param xregistrykey Makes structural information (except regarding tree
- * structures) of a single registry key accessible.
- *
- * @return returns true if the operation succeeded
- *
- * @see com.sun.star.comp.loader.JavaLoader#
- */
- public static boolean __writeRegistryServiceInfo(XRegistryKey xregistrykey)
- {
- return FactoryHelper.writeRegistryServiceInfo(WizardImplementation.class.getName(), WizardImplementation.__serviceName, xregistrykey);
- }
-
- /**
* This class implements the component. At least the interfaces XServiceInfo,
* XTypeProvider, and XInitialization should be provided by the service.
*/
diff --git a/wizards/com/sun/star/wizards/letter/letter.component b/wizards/com/sun/star/wizards/letter/letter.component
new file mode 100644
index 000000000..277aae81e
--- /dev/null
+++ b/wizards/com/sun/star/wizards/letter/letter.component
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.Java2"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation
+ name="com.sun.star.wizards.letter.CallWizard$WizardImplementation">
+ <service name="com.sun.star.wizards.letter.CallWizard"/>
+ </implementation>
+</component>
diff --git a/wizards/com/sun/star/wizards/letter/makefile.mk b/wizards/com/sun/star/wizards/letter/makefile.mk
index 700d0b72d..ca6c750ba 100644
--- a/wizards/com/sun/star/wizards/letter/makefile.mk
+++ b/wizards/com/sun/star/wizards/letter/makefile.mk
@@ -63,3 +63,11 @@ JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/letter.component
+
+$(MISC)/letter.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ letter.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt letter.component
diff --git a/wizards/com/sun/star/wizards/query/CallQueryWizard.java b/wizards/com/sun/star/wizards/query/CallQueryWizard.java
index f108bc365..99952e19c 100644
--- a/wizards/com/sun/star/wizards/query/CallQueryWizard.java
+++ b/wizards/com/sun/star/wizards/query/CallQueryWizard.java
@@ -34,9 +34,7 @@ import com.sun.star.uno.Type;
import com.sun.star.wizards.common.Properties;
/** This class capsulates the class, that implements the minimal component, a
- * factory for creating the service (<CODE>__getServiceFactory</CODE>) and a
- * method, that writes the information into the given registry key
- * (<CODE>__writeRegistryServiceInfo</CODE>).
+ * factory for creating the service (<CODE>__getServiceFactory</CODE>).
* @author Bertram Nolte
*/
public class CallQueryWizard
@@ -65,19 +63,6 @@ public class CallQueryWizard
return xsingleservicefactory;
}
- /** Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>.
- * @return returns true if the operation succeeded
- * @see com.sun.star.comp.loader.JavaLoader#
- * @param xregistrykey Makes structural information (except regarding tree
- * structures) of a single
- * registry key accessible.
- */
- public static boolean __writeRegistryServiceInfo(com.sun.star.registry.XRegistryKey xregistrykey)
- {
- return com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(QueryWizardImplementation.class.getName(), QueryWizardImplementation.__serviceName, xregistrykey);
- }
-
/** This class implements the component. At least the interfaces XServiceInfo,
* XTypeProvider, and XInitialization should be provided by the service.
*/
diff --git a/wizards/com/sun/star/wizards/query/makefile.mk b/wizards/com/sun/star/wizards/query/makefile.mk
index af5056ba5..080076668 100644
--- a/wizards/com/sun/star/wizards/query/makefile.mk
+++ b/wizards/com/sun/star/wizards/query/makefile.mk
@@ -59,3 +59,11 @@ JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/query.component
+
+$(MISC)/query.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ query.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt query.component
diff --git a/wizards/com/sun/star/wizards/query/query.component b/wizards/com/sun/star/wizards/query/query.component
new file mode 100644
index 000000000..d1d708c6b
--- /dev/null
+++ b/wizards/com/sun/star/wizards/query/query.component
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.Java2"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name=
+ "com.sun.star.wizards.query.CallQueryWizard$QueryWizardImplementation">
+ <service name="com.sun.star.wizards.query.CallQueryWizard"/>
+ </implementation>
+</component>
diff --git a/wizards/com/sun/star/wizards/report/CallReportWizard.java b/wizards/com/sun/star/wizards/report/CallReportWizard.java
index 78b67263e..47d846183 100644
--- a/wizards/com/sun/star/wizards/report/CallReportWizard.java
+++ b/wizards/com/sun/star/wizards/report/CallReportWizard.java
@@ -35,9 +35,7 @@ import com.sun.star.sdb.application.XDatabaseDocumentUI;
import com.sun.star.wizards.common.NamedValueCollection;
/** This class capsulates the class, that implements the minimal component, a
- * factory for creating the service (<CODE>__getServiceFactory</CODE>) and a
- * method, that writes the information into the given registry key
- * (<CODE>__writeRegistryServiceInfo</CODE>).
+ * factory for creating the service (<CODE>__getServiceFactory</CODE>).
* @author Bertram Nolte
*/
public class CallReportWizard
@@ -94,22 +92,6 @@ public class CallReportWizard
return xsingleservicefactory;
}
- /** Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>.
- * @return returns true if the operation succeeded
- * @see com.sun.star.comp.loader.JavaLoader#
- * @param xregistrykey Makes structural information (except regarding tree
- * structures) of a single
- * registry key accessible.
- */
- public static boolean __writeRegistryServiceInfo(com.sun.star.registry.XRegistryKey xregistrykey)
- {
- return com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(
- ReportWizardImplementation.class.getName(),
- ReportWizardImplementation.__serviceName,
- xregistrykey);
- }
-
/** This class implements the component. At least the interfaces XServiceInfo,
* XTypeProvider, and XInitialization should be provided by the service.
*/
diff --git a/wizards/com/sun/star/wizards/report/makefile.mk b/wizards/com/sun/star/wizards/report/makefile.mk
index b31639d21..62b948674 100644
--- a/wizards/com/sun/star/wizards/report/makefile.mk
+++ b/wizards/com/sun/star/wizards/report/makefile.mk
@@ -66,3 +66,11 @@ JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/report.component
+
+$(MISC)/report.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ report.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt report.component
diff --git a/wizards/com/sun/star/wizards/report/report.component b/wizards/com/sun/star/wizards/report/report.component
new file mode 100644
index 000000000..67efca927
--- /dev/null
+++ b/wizards/com/sun/star/wizards/report/report.component
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.Java2"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name=
+ "com.sun.star.wizards.report.CallReportWizard$ReportWizardImplementation">
+ <service name="com.sun.star.wizards.report.CallReportWizard"/>
+ </implementation>
+</component>
diff --git a/wizards/com/sun/star/wizards/table/CallTableWizard.java b/wizards/com/sun/star/wizards/table/CallTableWizard.java
index 4b992a5ea..cac3a18a0 100644
--- a/wizards/com/sun/star/wizards/table/CallTableWizard.java
+++ b/wizards/com/sun/star/wizards/table/CallTableWizard.java
@@ -32,9 +32,7 @@ import com.sun.star.uno.Type;
import com.sun.star.wizards.common.Properties;
/** This class capsulates the class, that implements the minimal component, a
- * factory for creating the service (<CODE>__getServiceFactory</CODE>) and a
- * method, that writes the information into the given registry key
- * (<CODE>__writeRegistryServiceInfo</CODE>).
+ * factory for creating the service (<CODE>__getServiceFactory</CODE>).
* @author Bertram Nolte
*/
public class CallTableWizard
@@ -63,19 +61,6 @@ public class CallTableWizard
return xsingleservicefactory;
}
- /** Writes the service information into the given registry key.
- * This method is called by the <code>JavaLoader</code>.
- * @return returns true if the operation succeeded
- * @see com.sun.star.comp.loader.JavaLoader#
- * @param xregistrykey Makes structural information (except regarding tree
- * structures) of a single
- * registry key accessible.
- */
- public static boolean __writeRegistryServiceInfo(com.sun.star.registry.XRegistryKey xregistrykey)
- {
- return com.sun.star.comp.loader.FactoryHelper.writeRegistryServiceInfo(TableWizardImplementation.class.getName(), TableWizardImplementation.__serviceName, xregistrykey);
- }
-
/** This class implements the component. At least the interfaces XServiceInfo,
* XTypeProvider, and XInitialization should be provided by the service.
*/
diff --git a/wizards/com/sun/star/wizards/table/makefile.mk b/wizards/com/sun/star/wizards/table/makefile.mk
index c0d62baa7..4343af99d 100644
--- a/wizards/com/sun/star/wizards/table/makefile.mk
+++ b/wizards/com/sun/star/wizards/table/makefile.mk
@@ -63,3 +63,11 @@ JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/table.component
+
+$(MISC)/table.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ table.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt table.component
diff --git a/wizards/com/sun/star/wizards/table/table.component b/wizards/com/sun/star/wizards/table/table.component
new file mode 100644
index 000000000..24cacd225
--- /dev/null
+++ b/wizards/com/sun/star/wizards/table/table.component
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.Java2"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name=
+ "com.sun.star.wizards.table.CallTableWizard$TableWizardImplementation">
+ <service name="com.sun.star.wizards.table.CallTableWizard"/>
+ </implementation>
+</component>
diff --git a/wizards/com/sun/star/wizards/web/CallWizard.java b/wizards/com/sun/star/wizards/web/CallWizard.java
index 4b9d7a368..1d18149e9 100644
--- a/wizards/com/sun/star/wizards/web/CallWizard.java
+++ b/wizards/com/sun/star/wizards/web/CallWizard.java
@@ -42,8 +42,7 @@ import com.sun.star.wizards.common.Resource;
/**
* This class capsulates the class, that implements the minimal component, a factory for
- * creating the service (<CODE>__getServiceFactory</CODE>) and a method, that writes the
- * information into the given registry key (<CODE>__writeRegistryServiceInfo</CODE>).
+ * creating the service (<CODE>__getServiceFactory</CODE>).
*
* @author rpiterman
* @version $Revision: 1.10.52.1 $
@@ -79,22 +78,6 @@ public class CallWizard
}
/**
- * Writes the service information into the given registry key. This method is called
- * by the <code>JavaLoader</code>.
- *
- * @param xregistrykey Makes structural information (except regarding tree
- * structures) of a single registry key accessible.
- *
- * @return returns true if the operation succeeded
- *
- * @see com.sun.star.comp.loader.JavaLoader#
- */
- public static boolean __writeRegistryServiceInfo(XRegistryKey xregistrykey)
- {
- return FactoryHelper.writeRegistryServiceInfo(WizardImplementation.class.getName(), WizardImplementation.__serviceName, xregistrykey);
- }
-
- /**
* This class implements the component. At least the interfaces XServiceInfo,
* XTypeProvider, and XInitialization should be provided by the service.
*/
diff --git a/wizards/com/sun/star/wizards/web/makefile.mk b/wizards/com/sun/star/wizards/web/makefile.mk
index 9cc97e1b8..2e0394d29 100644
--- a/wizards/com/sun/star/wizards/web/makefile.mk
+++ b/wizards/com/sun/star/wizards/web/makefile.mk
@@ -83,3 +83,11 @@ JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/web.component
+
+$(MISC)/web.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ web.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt web.component
diff --git a/wizards/com/sun/star/wizards/web/web.component b/wizards/com/sun/star/wizards/web/web.component
new file mode 100644
index 000000000..763438f96
--- /dev/null
+++ b/wizards/com/sun/star/wizards/web/web.component
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.Java2"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation
+ name="com.sun.star.wizards.web.CallWizard$WizardImplementation">
+ <service name="com.sun.star.wizards.web.CallWizard"/>
+ </implementation>
+</component>
diff --git a/wizards/prj/d.lst b/wizards/prj/d.lst
index 4d1ad83d1..f8ab876ba 100644
--- a/wizards/prj/d.lst
+++ b/wizards/prj/d.lst
@@ -13,3 +13,11 @@ mkdir: %_DEST%\pck%_EXT%
REM ..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res
..\%__SRC%\class\*.jar %_DEST%\bin%_EXT%\*.jar
+..\%__SRC%\misc\agenda.component %_DEST%\xml%_EXT%\agenda.component
+..\%__SRC%\misc\fax.component %_DEST%\xml%_EXT%\fax.component
+..\%__SRC%\misc\form.component %_DEST%\xml%_EXT%\form.component
+..\%__SRC%\misc\letter.component %_DEST%\xml%_EXT%\letter.component
+..\%__SRC%\misc\query.component %_DEST%\xml%_EXT%\query.component
+..\%__SRC%\misc\report.component %_DEST%\xml%_EXT%\report.component
+..\%__SRC%\misc\table.component %_DEST%\xml%_EXT%\table.component
+..\%__SRC%\misc\web.component %_DEST%\xml%_EXT%\web.component
diff --git a/xmlsecurity/prj/d.lst b/xmlsecurity/prj/d.lst
index 270415164..94967c20a 100644
--- a/xmlsecurity/prj/d.lst
+++ b/xmlsecurity/prj/d.lst
@@ -8,3 +8,6 @@ mkdir: %COMMON_DEST%\bin%_EXT%\hid
..\%__SRC%\lib\libxmlsecurity.so %_DEST%\lib%_EXT%\libxmlsecurity.so
..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*
..\%__SRC%\bin\xmlsec*.res %_DEST%\bin%_EXT%\xmlsec*.res
+..\%__SRC%\misc\xmlsecurity.component %_DEST%\xml%_EXT%\xmlsecurity.component
+..\%__SRC%\misc\xsec_fw.component %_DEST%\xml%_EXT%\xsec_fw.component
+..\%__SRC%\misc\xsec_xmlsec.component %_DEST%\xml%_EXT%\xsec_xmlsec.component
diff --git a/xmlsecurity/source/component/registerservices.cxx b/xmlsecurity/source/component/registerservices.cxx
index 080d95a1e..3ea6eee3d 100644
--- a/xmlsecurity/source/component/registerservices.cxx
+++ b/xmlsecurity/source/component/registerservices.cxx
@@ -46,48 +46,6 @@ void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTyp
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey )
-{
- if (pRegistryKey)
- {
- try
- {
- sal_Int32 nPos = 0;
- // SERVICE DocumentDigitalSignatures
- nPos = 0;
- uno::Reference< registry::XRegistryKey > xNewKey(
- reinterpret_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( DocumentDigitalSignatures::GetImplementationName() ) );
-
- xNewKey = xNewKey->createKey( rtl::OUString::createFromAscii( "/UNO/SERVICES" ) );
-
- const uno::Sequence< rtl::OUString >& rSNL = DocumentDigitalSignatures::GetSupportedServiceNames();
- const rtl::OUString* pArray = rSNL.getConstArray();
- for ( nPos = rSNL.getLength(); nPos--; )
- xNewKey->createKey( pArray[nPos] );
-
- // SERVICE CertificateContainer
- nPos = 0;
- uno::Reference< registry::XRegistryKey > xNewKeyCertificateContainer(
- reinterpret_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( CertificateContainer::impl_getStaticImplementationName() ) );
- xNewKeyCertificateContainer = xNewKeyCertificateContainer->createKey( rtl::OUString::createFromAscii( "/UNO/SERVICES" ) );
-
- const uno::Sequence< rtl::OUString >& rSNLCertificateContainer = CertificateContainer::impl_getStaticSupportedServiceNames();
- const rtl::OUString* pArrayCertificateContainer = rSNLCertificateContainer.getConstArray();
- for ( nPos = rSNLCertificateContainer.getLength(); nPos--; )
- xNewKeyCertificateContainer->createKey( pArrayCertificateContainer[nPos] );
-
- //-----------------------------
-
- return sal_True;
- }
- catch (registry::InvalidRegistryException &)
- {
- DBG_ERROR( "InvalidRegistryException!" );
- }
- }
- return sal_False;
-}
-
void* SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
void* pRet = 0;
diff --git a/xmlsecurity/source/framework/xsec_framework.cxx b/xmlsecurity/source/framework/xsec_framework.cxx
index 01829ebf2..d4a96e047 100644
--- a/xmlsecurity/source/framework/xsec_framework.cxx
+++ b/xmlsecurity/source/framework/xsec_framework.cxx
@@ -59,83 +59,6 @@ void SAL_CALL component_getImplementationEnvironment(
}
//==================================================================================================
-sal_Bool SAL_CALL component_writeInfo(
- void * /*pServiceManager*/, void * pRegistryKey )
-{
- if (pRegistryKey)
- {
- try
- {
- //Decryptor
- sal_Int32 nPos = 0;
- Reference< XRegistryKey > xNewKey(
- reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( DecryptorImpl_getImplementationName() ) );
- xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
-
- const Sequence< OUString > & rSNL = DecryptorImpl_getSupportedServiceNames();
- const OUString * pArray = rSNL.getConstArray();
- for ( nPos = rSNL.getLength(); nPos--; )
- xNewKey->createKey( pArray[nPos] );
-
- //Encryptor
- xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( EncryptorImpl_getImplementationName() );
- xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
- const Sequence< OUString > & rSNL2 = EncryptorImpl_getSupportedServiceNames();
- pArray = rSNL2.getConstArray();
- for ( nPos = rSNL2.getLength(); nPos--; )
- xNewKey->createKey( pArray[nPos] );
-
- //SignatureCreator
- xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( SignatureCreatorImpl_getImplementationName() );
- xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
- const Sequence< OUString > & rSNL3 = SignatureCreatorImpl_getSupportedServiceNames();
- pArray = rSNL3.getConstArray();
- for ( nPos = rSNL3.getLength(); nPos--; )
- xNewKey->createKey( pArray[nPos] );
-
- //SignatureVerifier
- xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( SignatureVerifierImpl_getImplementationName() );
- xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
- const Sequence< OUString > & rSNL4 = SignatureVerifierImpl_getSupportedServiceNames();
- pArray = rSNL4.getConstArray();
- for ( nPos = rSNL4.getLength(); nPos--; )
- xNewKey->createKey( pArray[nPos] );
-
- //SAXEventKeeper
- xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( SAXEventKeeperImpl_getImplementationName() );
- xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
- const Sequence< OUString > & rSNL5 = SAXEventKeeperImpl_getSupportedServiceNames();
- pArray = rSNL5.getConstArray();
- for ( nPos = rSNL5.getLength(); nPos--; )
- xNewKey->createKey( pArray[nPos] );
-
- //XMLSignatureTemplateImpl
- xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( XMLSignatureTemplateImpl::impl_getImplementationName() );
- xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
- const Sequence< OUString > & rSNL6 = XMLSignatureTemplateImpl::impl_getSupportedServiceNames();
- pArray = rSNL6.getConstArray();
- for ( nPos = rSNL6.getLength(); nPos--; )
- xNewKey->createKey( pArray[nPos] );
-
- // XMLEncryptionTemplateImpl
- xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( XMLEncryptionTemplateImpl::impl_getImplementationName() );
- xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
- const Sequence< OUString > & rSNL7 = XMLEncryptionTemplateImpl::impl_getSupportedServiceNames();
- pArray = rSNL7.getConstArray();
- for ( nPos = rSNL7.getLength(); nPos--; )
- xNewKey->createKey( pArray[nPos] );
-
- return sal_True;
- }
- catch (InvalidRegistryException &)
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
- }
- }
- return sal_False;
-}
-
-//==================================================================================================
void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
diff --git a/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx b/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx
index 410c1a644..765c45f28 100644
--- a/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx
+++ b/xmlsecurity/source/xmlsec/xsec_xmlsec.cxx
@@ -94,12 +94,10 @@ extern "C"
{
#if defined( XMLSEC_CRYPTO_NSS )
-extern sal_Bool nss_component_writeInfo( void*, void* );
extern void* nss_component_getFactory( const sal_Char*, void*, void* );
#endif
#if defined( XMLSEC_CRYPTO_MSCRYPTO )
-extern sal_Bool mscrypt_component_writeInfo( void*, void* );
extern void* mscrypt_component_getFactory( const sal_Char*, void*, void* );
#endif
@@ -109,75 +107,6 @@ void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-
-sal_Bool SAL_CALL component_writeInfo( void* pServiceManager , void* pRegistryKey )
-{
- sal_Bool result = sal_False;
- sal_Int32 i ;
- OUString sKeyName ;
- Reference< XRegistryKey > xNewKey ;
- Sequence< OUString > seqServices ;
- Reference< XRegistryKey > xKey( reinterpret_cast< XRegistryKey* >( pRegistryKey ) ) ;
-
- if( xKey.is() ) {
- // try {
- // XMLElementWrapper_XmlSecImpl
- sKeyName = OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) ) ;
- sKeyName += XMLElementWrapper_XmlSecImpl_getImplementationName() ;
- sKeyName += OUString::createFromAscii( "/UNO/SERVICES" ) ;
-
- xNewKey = xKey->createKey( sKeyName ) ;
- if( xNewKey.is() ) {
- seqServices = XMLElementWrapper_XmlSecImpl_getSupportedServiceNames() ;
- for( i = seqServices.getLength() ; i -- ; )
- xNewKey->createKey( seqServices.getConstArray()[i] ) ;
- }
-
- // XMLDocumentWrapper_XmlSecImpl
- sKeyName = OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) ) ;
- sKeyName += XMLDocumentWrapper_XmlSecImpl_getImplementationName() ;
- sKeyName += OUString::createFromAscii( "/UNO/SERVICES" ) ;
-
- xNewKey = xKey->createKey( sKeyName ) ;
- if( xNewKey.is() ) {
- seqServices = XMLDocumentWrapper_XmlSecImpl_getSupportedServiceNames() ;
- for( i = seqServices.getLength() ; i -- ; )
- xNewKey->createKey( seqServices.getConstArray()[i] ) ;
- }
-
- // SerialNumberAdapterImpl
- sKeyName = OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) ) ;
- sKeyName += SerialNumberAdapterImpl_getImplementationName() ;
- sKeyName += OUString::createFromAscii( "/UNO/SERVICES" ) ;
-
- xNewKey = xKey->createKey( sKeyName ) ;
- if( xNewKey.is() ) {
- seqServices = SerialNumberAdapterImpl_getSupportedServiceNames() ;
- for( i = seqServices.getLength() ; i -- ; )
- xNewKey->createKey( seqServices.getConstArray()[i] ) ;
- }
-
-#if defined( XMLSEC_CRYPTO_NSS )
- result = nss_component_writeInfo( pServiceManager, pRegistryKey ) ;
- if( !result )
- return sal_False ;
-#endif
-
-#if defined( XMLSEC_CRYPTO_MSCRYPTO )
- result = mscrypt_component_writeInfo( pServiceManager, pRegistryKey ) ;
- if( !result )
- return sal_False ;
-#endif
-
- //} catch( InvalidRegistryException & ) {
- // //we should not ignore exceptions
- // return sal_False ;
- //}
- }
-
- return result;
-}
-
void* SAL_CALL component_getFactory( const sal_Char* pImplName , void* pServiceManager , void* pRegistryKey )
{
void* pRet = 0;
diff --git a/xmlsecurity/util/exports_xsmscrypt.dxp b/xmlsecurity/util/exports_xsmscrypt.dxp
index 9630d7e06..f0e1c6993 100644
--- a/xmlsecurity/util/exports_xsmscrypt.dxp
+++ b/xmlsecurity/util/exports_xsmscrypt.dxp
@@ -1,3 +1,2 @@
component_getImplementationEnvironment
-component_writeInfo
component_getFactory
diff --git a/xmlsecurity/util/exports_xsnss.dxp b/xmlsecurity/util/exports_xsnss.dxp
index 9630d7e06..f0e1c6993 100644
--- a/xmlsecurity/util/exports_xsnss.dxp
+++ b/xmlsecurity/util/exports_xsnss.dxp
@@ -1,3 +1,2 @@
component_getImplementationEnvironment
-component_writeInfo
component_getFactory
diff --git a/xmlsecurity/util/makefile.mk b/xmlsecurity/util/makefile.mk
index 6ef221c7e..75ef30c7c 100644
--- a/xmlsecurity/util/makefile.mk
+++ b/xmlsecurity/util/makefile.mk
@@ -172,3 +172,30 @@ DEF4NAME=$(SHL4TARGET)
$(MISC)$/$(SHL3TARGET).flt: makefile.mk
$(TYPE) $(SHL3TARGET).flt > $@
+
+ALLTAR : \
+ $(MISC)/xmlsecurity.component \
+ $(MISC)/xsec_fw.component \
+ $(MISC)/xsec_xmlsec.component
+
+.IF "$(OS)" == "WNT"
+my_platform = .windows
+.END
+
+$(MISC)/xmlsecurity.component .ERRREMOVE : \
+ $(SOLARENV)/bin/createcomponent.xslt xmlsecurity.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL4TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt xmlsecurity.component
+
+$(MISC)/xsec_fw.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ xsec_fw.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt xsec_fw.component
+
+$(MISC)/xsec_xmlsec.component .ERRREMOVE : \
+ $(SOLARENV)/bin/createcomponent.xslt xsec_xmlsec.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL2TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt xsec_xmlsec$(my_platform).component
diff --git a/xmlsecurity/util/xmlsecurity.component b/xmlsecurity/util/xmlsecurity.component
new file mode 100644
index 000000000..b0759e937
--- /dev/null
+++ b/xmlsecurity/util/xmlsecurity.component
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.security.CertificateContainer">
+ <service name="com.sun.star.security.CertificateContainer"/>
+ </implementation>
+ <implementation name="com.sun.star.security.DocumentDigitalSignatures">
+ <service name="com.sun.star.security.DocumentDigitalSignatures"/>
+ </implementation>
+</component>
diff --git a/xmlsecurity/util/xsec_fw.component b/xmlsecurity/util/xsec_fw.component
new file mode 100644
index 000000000..eb9e3962a
--- /dev/null
+++ b/xmlsecurity/util/xsec_fw.component
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.xml.security.framework.DecryptorImpl">
+ <service name="com.sun.star.xml.crypto.sax.Decryptor"/>
+ </implementation>
+ <implementation name="com.sun.star.xml.security.framework.EncryptorImpl">
+ <service name="com.sun.star.xml.crypto.sax.Encryptor"/>
+ </implementation>
+ <implementation name="com.sun.star.xml.security.framework.SAXEventKeeperImpl">
+ <service name="com.sun.star.xml.crypto.sax.SAXEventKeeper"/>
+ </implementation>
+ <implementation
+ name="com.sun.star.xml.security.framework.SignatureCreatorImpl">
+ <service name="com.sun.star.xml.crypto.sax.SignatureCreator"/>
+ </implementation>
+ <implementation
+ name="com.sun.star.xml.security.framework.SignatureVerifierImpl">
+ <service name="com.sun.star.xml.crypto.sax.SignatureVerifier"/>
+ </implementation>
+ <implementation
+ name="com.sun.star.xml.security.framework.XMLEncryptionTemplateImpl">
+ <service name="com.sun.star.xml.crypto.XMLEncryptionTemplate"/>
+ </implementation>
+ <implementation
+ name="com.sun.star.xml.security.framework.XMLSignatureTemplateImpl">
+ <service name="com.sun.star.xml.crypto.XMLSignatureTemplate"/>
+ </implementation>
+</component>
diff --git a/xmlsecurity/util/xsec_fw.dxp b/xmlsecurity/util/xsec_fw.dxp
index 9630d7e06..f0e1c6993 100644
--- a/xmlsecurity/util/xsec_fw.dxp
+++ b/xmlsecurity/util/xsec_fw.dxp
@@ -1,3 +1,2 @@
component_getImplementationEnvironment
-component_writeInfo
component_getFactory
diff --git a/xmlsecurity/util/xsec_xmlsec.component b/xmlsecurity/util/xsec_xmlsec.component
new file mode 100644
index 000000000..de991899f
--- /dev/null
+++ b/xmlsecurity/util/xsec_xmlsec.component
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.security.SerialNumberAdapter">
+ <service name="com.sun.star.security.SerialNumberAdapter"/>
+ </implementation>
+ <implementation name="com.sun.star.xml.security.bridge.xmlsec.SEInitializer_NssImpl">
+ <service name="com.sun.star.xml.crypto.SEInitializer"/>
+ </implementation>
+ <implementation name="com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl">
+ <service name="com.sun.star.xml.crypto.SecurityEnvironment"/>
+ </implementation>
+ <implementation name="com.sun.star.xml.security.bridge.xmlsec.XMLDocumentWrapper_XmlSecImpl">
+ <service name="com.sun.star.xml.wrapper.XMLDocumentWrapper"/>
+ </implementation>
+ <implementation name="com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl">
+ <service name="com.sun.star.xml.wrapper.XMLElementWrapper"/>
+ </implementation>
+ <implementation name="com.sun.star.xml.security.bridge.xmlsec.XMLEncryption_NssImpl">
+ <service name="com.sun.star.xml.crypto.XMLEncryption"/>
+ </implementation>
+ <implementation name="com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_NssImpl">
+ <service name="com.sun.star.xml.crypto.XMLSecurityContext"/>
+ </implementation>
+ <implementation name="com.sun.star.xml.security.bridge.xmlsec.XMLSignature_NssImpl">
+ <service name="com.sun.star.xml.crypto.XMLSignature"/>
+ </implementation>
+</component>
diff --git a/xmlsecurity/util/xsec_xmlsec.windows.component b/xmlsecurity/util/xsec_xmlsec.windows.component
new file mode 100644
index 000000000..fb11cc6e9
--- /dev/null
+++ b/xmlsecurity/util/xsec_xmlsec.windows.component
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.security.SerialNumberAdapter">
+ <service name="com.sun.star.security.SerialNumberAdapter"/>
+ </implementation>
+ <implementation name="com.sun.star.xml.security.bridge.xmlsec.SEInitializer_MSCryptImpl">
+ <service name="com.sun.star.xml.crypto.SEInitializer"/>
+ </implementation>
+ <implementation name="com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_MSCryptImpl">
+ <service name="com.sun.star.xml.crypto.SecurityEnvironment"/>
+ </implementation>
+ <implementation name="com.sun.star.xml.security.bridge.xmlsec.XMLDocumentWrapper_XmlSecImpl">
+ <service name="com.sun.star.xml.wrapper.XMLDocumentWrapper"/>
+ </implementation>
+ <implementation name="com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl">
+ <service name="com.sun.star.xml.wrapper.XMLElementWrapper"/>
+ </implementation>
+ <implementation name="com.sun.star.xml.security.bridge.xmlsec.XMLEncryption_MSCryptImpl">
+ <service name="com.sun.star.xml.crypto.XMLEncryption"/>
+ </implementation>
+ <implementation name="com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_MSCryptImpl">
+ <service name="com.sun.star.xml.crypto.XMLSecurityContext"/>
+ </implementation>
+ <implementation name="com.sun.star.xml.security.bridge.xmlsec.XMLSignature_MSCryptImpl">
+ <service name="com.sun.star.xml.crypto.XMLSignature"/>
+ </implementation>
+</component>