diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-10-01 09:04:58 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-10-01 09:04:58 +0000 |
commit | bbc5db1ac660640e72a7effbf70bace623c8d6c4 (patch) | |
tree | 78ae568591950878f2ca6d4b91000d48a05712dc /configmgr | |
parent | ddcd4779159e43a0f6ef7867c2b19e101dc8146a (diff) |
CWS-TOOLING: integrate CWS sb93
Diffstat (limited to 'configmgr')
-rw-r--r-- | configmgr/prj/build.lst | 3 | ||||
-rw-r--r-- | configmgr/prj/d.lst | 3 | ||||
-rw-r--r-- | configmgr/qa/unit/configmgrrc | 2 | ||||
-rw-r--r-- | configmgr/source/api2/apinotifierimpl.cxx | 30 | ||||
-rw-r--r-- | configmgr/source/api2/elementimpl.cxx | 9 | ||||
-rw-r--r-- | configmgr/source/api2/propsetaccessimpl.cxx | 50 | ||||
-rw-r--r-- | configmgr/source/api2/updateimpl.cxx | 44 | ||||
-rw-r--r-- | configmgr/source/cmdtools/makefile.mk | 63 | ||||
-rw-r--r-- | configmgr/source/cmdtools/setofficelang.cxx | 355 | ||||
-rw-r--r-- | configmgr/source/cmdtools/setofficelang.sh | 102 | ||||
-rw-r--r-- | configmgr/source/cmdtools/unomain.cxx | 145 | ||||
-rw-r--r-- | configmgr/source/cmdtools/unomain.hxx | 63 | ||||
-rw-r--r-- | configmgr/source/inc/configexcept.hxx | 21 | ||||
-rw-r--r-- | configmgr/source/treemgr/configexcept.cxx | 41 | ||||
-rw-r--r-- | configmgr/source/treemgr/configgroup.cxx | 4 |
15 files changed, 9 insertions, 926 deletions
diff --git a/configmgr/prj/build.lst b/configmgr/prj/build.lst index 620d0e7f0cba..1ef391627a63 100644 --- a/configmgr/prj/build.lst +++ b/configmgr/prj/build.lst @@ -1,7 +1,6 @@ cg configmgr : offapi comphelper cppuhelper tools vos NULL cg configmgr usr1 - all cg_mkout NULL cg configmgr\inc nmake - all cg_inc NULL -cg configmgr\source\cmdtools nmake - all cg_cmdtools cg_inc NULL cg configmgr\source\misc nmake - all cg_misc cg_inc NULL cg configmgr\source\data nmake - all cg_data cg_inc NULL cg configmgr\source\tree nmake - all cg_tree cg_inc NULL @@ -14,6 +13,6 @@ cg configmgr\source\api2 nmake - all cg_api2 cg_inc NULL cg configmgr\source\treemgr nmake - all cg_treemgr cg_inc NULL cg configmgr\source\registry nmake - all cg_reg cg_inc NULL cg configmgr\source\platformbe nmake - all cg_platformbe cg_inc NULL -cg configmgr\util nmake - all cg_util cg_platformbe cg_api cg_api2 cg_cmdtools cg_misc cg_reg cg_trcache cg_data cg_tree cg_treemgr cg_xml cg_backend cg_localbe NULL +cg configmgr\util nmake - all cg_util cg_platformbe cg_api cg_api2 cg_misc cg_reg cg_trcache cg_data cg_tree cg_treemgr cg_xml cg_backend cg_localbe NULL cg configmgr\source\localbe nmake - all cg_localbe cg_inc NULL diff --git a/configmgr/prj/d.lst b/configmgr/prj/d.lst index 2a85e1a9f13e..3f4a1d35a121 100644 --- a/configmgr/prj/d.lst +++ b/configmgr/prj/d.lst @@ -6,8 +6,5 @@ mkdir: %_DEST%\inc%_EXT%\configmgr ..\%__SRC%\bin\behelper*.dll %_DEST%\bin%_EXT%\behelper*.dll ..\%__SRC%\bin\configmg*.dll %_DEST%\bin%_EXT%\configmg*.dll ..\%__SRC%\bin\sysmgr*.dll %_DEST%\bin%_EXT%\sysmgr*.dll -..\%__SRC%\bin\setofficelang.exe %_DEST%\bin%_EXT%\setofficelang.exe -..\%__SRC%\bin\setofficelang %_DEST%\bin%_EXT%\setofficelang.bin -..\%__SRC%\misc\setofficelang.sh %_DEST%\bin%_EXT%\setofficelang ..\%__SRC%\misc\configmgr2.uno.xml %_DEST%\xml%_EXT%\configmgr2.uno.xml diff --git a/configmgr/qa/unit/configmgrrc b/configmgr/qa/unit/configmgrrc index 66c561726e9b..b162e77c2e00 100644 --- a/configmgr/qa/unit/configmgrrc +++ b/configmgr/qa/unit/configmgrrc @@ -18,5 +18,5 @@ CFG_BackendService=com.sun.star.comp.configuration.backend.MultiStratumBackend CFG_SchemaSupplier=com.sun.star.comp.configuration.backend.LocalSchemaSupplier CFG_LocalDataSvc=com.sun.star.comp.configuration.backend.LocalStratum CFG_LocalModuleDataSvc=com.sun.star.comp.configuration.backend.LocalMultiStratum -# CFG_Strata=${CFG_LocalDataSvc}:$CFG_DefaultLayerUrl;?com.sun.star.comp.configuration.backend.SystemIntegration:;?com.sun.star.comp.configuration.backend.PolicyLayerBackend:;${CFG_LocalDataSvc}:$CFG_UserLayerUrl +# CFG_Strata=${CFG_LocalDataSvc}:$CFG_DefaultLayerUrl;?com.sun.star.comp.configuration.backend.SystemIntegration:;${CFG_LocalDataSvc}:$CFG_UserLayerUrl CFG_Strata=${CFG_LocalDataSvc}:$CFG_DefaultLayerUrl;${CFG_LocalDataSvc}:$CFG_UserLayerUrl diff --git a/configmgr/source/api2/apinotifierimpl.cxx b/configmgr/source/api2/apinotifierimpl.cxx index 9edf8f22c557..3e7fe8585a4b 100644 --- a/configmgr/source/api2/apinotifierimpl.cxx +++ b/configmgr/source/api2/apinotifierimpl.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: apinotifierimpl.cxx,v $ - * $Revision: 1.8 $ + * $Revision: 1.8.14.1 $ * * This file is part of OpenOffice.org. * @@ -243,13 +243,6 @@ void implAddListener( NodeGroupInfoAccess& rNode, const uno::Reference< beans::X OUString(RTL_CONSTASCII_USTRINGPARAM("Configuration: cannot add listener - node not found:")) += ex.message(), rNode.getUnoInstance() ); } - catch (configuration::WrappedUnoException& ex) - { - throw css::lang::WrappedTargetException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Configuration: adding a listener failed: ")) += ex.message(), - rNode.getUnoInstance(), - ex.getAnyUnoException()); - } catch (configuration::Exception& ex) { ExceptionMapper e(ex); @@ -280,13 +273,6 @@ void implRemoveListener( NodeGroupInfoAccess& rNode, const uno::Reference< beans OUString(RTL_CONSTASCII_USTRINGPARAM("Configuration: cannot remove listener - node not found:")) += ex.message(), rNode.getUnoInstance() ); } - catch (configuration::WrappedUnoException& ex) - { - throw css::lang::WrappedTargetException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Configuration: removing a listener failed: ")) += ex.message(), - rNode.getUnoInstance(), - ex.getAnyUnoException()); - } catch (configuration::Exception& ex) { ExceptionMapper e(ex); @@ -318,13 +304,6 @@ void implAddListener( NodeGroupInfoAccess& rNode, const uno::Reference< beans::X OUString(RTL_CONSTASCII_USTRINGPARAM("Configuration: cannot add listener - node not found:")) += ex.message(), rNode.getUnoInstance() ); } - catch (configuration::WrappedUnoException& ex) - { - throw css::lang::WrappedTargetException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Configuration: adding a listener failed: ")) += ex.message(), - rNode.getUnoInstance(), - ex.getAnyUnoException()); - } catch (configuration::Exception& ex) { ExceptionMapper e(ex); @@ -353,13 +332,6 @@ void implRemoveListener( NodeGroupInfoAccess& rNode, const uno::Reference< beans OUString(RTL_CONSTASCII_USTRINGPARAM("Configuration: cannot remove listener - node not found:")) += ex.message(), rNode.getUnoInstance() ); } - catch (configuration::WrappedUnoException& ex) - { - throw css::lang::WrappedTargetException( - OUString(RTL_CONSTASCII_USTRINGPARAM("Configuration: removing a listener failed: ")) += ex.message(), - rNode.getUnoInstance(), - ex.getAnyUnoException()); - } catch (configuration::Exception& ex) { ExceptionMapper e(ex); diff --git a/configmgr/source/api2/elementimpl.cxx b/configmgr/source/api2/elementimpl.cxx index 61f17d6adde4..eefd476a3294 100644 --- a/configmgr/source/api2/elementimpl.cxx +++ b/configmgr/source/api2/elementimpl.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: elementimpl.cxx,v $ - * $Revision: 1.17 $ + * $Revision: 1.17.14.1 $ * * This file is part of OpenOffice.org. * @@ -473,13 +473,6 @@ void implCommitChanges( UpdateRootElement& rElement ) throw(css::lang::WrappedTa rElement.getCommitter().commit(); } - // map configuration::Exceptions - catch (configuration::WrappedUnoException& ex) - { - Reference<uno::XInterface> xContext( rElement.getUnoInstance() ); - OUString sMessage( RTL_CONSTASCII_USTRINGPARAM("Configuration: can't commit Changes: ") ); - throw WrappedTargetException( sMessage += ex.extractMessage(), xContext, ex.getAnyUnoException() ); - } catch (configuration::Exception& ex) { ExceptionMapper e(ex); diff --git a/configmgr/source/api2/propsetaccessimpl.cxx b/configmgr/source/api2/propsetaccessimpl.cxx index 58337f6fa772..fa5d195d45d9 100644 --- a/configmgr/source/api2/propsetaccessimpl.cxx +++ b/configmgr/source/api2/propsetaccessimpl.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: propsetaccessimpl.cxx,v $ - * $Revision: 1.24 $ + * $Revision: 1.24.4.1 $ * * This file is part of OpenOffice.org. * @@ -377,12 +377,6 @@ void implSetPropertyValue( NodeGroupAccess& rNode, const OUString& sPropertyName Reference<uno::XInterface> xContext( rNode.getUnoInstance() ); throw PropertyVetoException( sMessage += e.message(), xContext ); } - catch (configuration::WrappedUnoException& ex) - { - Reference<uno::XInterface> xContext( rNode.getUnoInstance() ); - OUString sMessage( RTL_CONSTASCII_USTRINGPARAM("Configuration - Cannot set Property Value: ") ); - throw WrappedTargetException( sMessage += ex.extractMessage(), xContext, ex.getAnyUnoException() ); - } catch (configuration::Exception& ex) { ExceptionMapper e(ex); @@ -462,12 +456,6 @@ void implSetPropertyValues( NodeGroupAccess& rNode, const Sequence< OUString >& Reference<uno::XInterface> xContext( rNode.getUnoInstance() ); throw PropertyVetoException( sMessage += e.message(), xContext ); } - catch (configuration::WrappedUnoException& ex) - { - Reference<uno::XInterface> xContext( rNode.getUnoInstance() ); - OUString sMessage( RTL_CONSTASCII_USTRINGPARAM("Configuration - Cannot set Property Value: ") ); - throw WrappedTargetException( sMessage += ex.extractMessage(), xContext, ex.getAnyUnoException() ); - } catch (configuration::Exception& ex) { ExceptionMapper e(ex); @@ -550,12 +538,6 @@ void implSetHierarchicalPropertyValue( NodeGroupAccess& rNode, const OUString& a Reference<uno::XInterface> xContext( rNode.getUnoInstance() ); throw PropertyVetoException( sMessage += e.message(), xContext ); } - catch (configuration::WrappedUnoException& ex) - { - Reference<uno::XInterface> xContext( rNode.getUnoInstance() ); - OUString sMessage( RTL_CONSTASCII_USTRINGPARAM("Configuration - Cannot set Property Value: ") ); - throw WrappedTargetException( sMessage += ex.extractMessage(), xContext, ex.getAnyUnoException() ); - } catch (configuration::Exception& ex) { ExceptionMapper e(ex); @@ -642,12 +624,6 @@ void implSetHierarchicalPropertyValues( NodeGroupAccess& rNode, const Sequence< Reference<uno::XInterface> xContext( rNode.getUnoInstance() ); throw PropertyVetoException( sMessage += e.message(), xContext ); } - catch (configuration::WrappedUnoException& ex) - { - Reference<uno::XInterface> xContext( rNode.getUnoInstance() ); - OUString sMessage( RTL_CONSTASCII_USTRINGPARAM("Configuration - Cannot set Property Value: ") ); - throw WrappedTargetException( sMessage += ex.extractMessage(), xContext, ex.getAnyUnoException() ); - } catch (configuration::Exception& ex) { ExceptionMapper e(ex); @@ -697,12 +673,6 @@ Any implGetPropertyValue( NodeGroupInfoAccess& rNode,const OUString& aPropertyNa Reference<uno::XInterface> xContext( rNode.getUnoInstance() ); throw UnknownPropertyException( e.message(), xContext ); } - catch (configuration::WrappedUnoException& ex) - { - Reference<uno::XInterface> xContext( rNode.getUnoInstance() ); - OUString sMessage( RTL_CONSTASCII_USTRINGPARAM("Configuration - Cannot get Property Value: ") ); - throw WrappedTargetException( sMessage += ex.extractMessage(), xContext, ex.getAnyUnoException() ); - } catch (configuration::Exception& ex) { ExceptionMapper e(ex); @@ -958,12 +928,6 @@ beans::PropertyState implGetPropertyState( NodeAccess& rNode, const OUString& sP Reference<uno::XInterface> xContext( rNode.getUnoInstance() ); throw UnknownPropertyException( e.message(), xContext ); } - catch (configuration::WrappedUnoException& ex) - { - Reference<uno::XInterface> xContext( rNode.getUnoInstance() ); - OUString sMessage( RTL_CONSTASCII_USTRINGPARAM("Configuration - Cannot get PropertyState: ") ); - throw WrappedTargetException( sMessage += ex.extractMessage(), xContext, ex.getAnyUnoException() ); - } catch (configuration::Exception& ex) { ExceptionMapper e(ex); @@ -1289,12 +1253,6 @@ Any implGetPropertyDefault( NodeGroupInfoAccess& rNode, const OUString& sPropert Reference<uno::XInterface> xContext( rNode.getUnoInstance() ); throw UnknownPropertyException( sMessage += e.message(), xContext ); } - catch (configuration::WrappedUnoException& ex) - { - Reference<uno::XInterface> xContext( rNode.getUnoInstance() ); - OUString sMessage( RTL_CONSTASCII_USTRINGPARAM("Configuration - Cannot get Default: ") ); - throw WrappedTargetException( sMessage += ex.extractMessage(), xContext, ex.getAnyUnoException() ); - } catch (configuration::Exception& ex) { ExceptionMapper e(ex); @@ -1357,12 +1315,6 @@ Sequence< Any > implGetPropertyDefaults( NodeGroupInfoAccess& rNode, const Seque Reference<uno::XInterface> xContext( rNode.getUnoInstance() ); throw UnknownPropertyException( sMessage += e.message(), xContext ); } - catch (configuration::WrappedUnoException& ex) - { - Reference<uno::XInterface> xContext( rNode.getUnoInstance() ); - OUString sMessage( RTL_CONSTASCII_USTRINGPARAM("Configuration - Cannot get Default: ") ); - throw WrappedTargetException( sMessage += ex.extractMessage(), xContext, ex.getAnyUnoException() ); - } catch (configuration::Exception& ex) { ExceptionMapper e(ex); diff --git a/configmgr/source/api2/updateimpl.cxx b/configmgr/source/api2/updateimpl.cxx index 9a0ccf843e6f..c8a509da9fbb 100644 --- a/configmgr/source/api2/updateimpl.cxx +++ b/configmgr/source/api2/updateimpl.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: updateimpl.cxx,v $ - * $Revision: 1.15 $ + * $Revision: 1.15.14.1 $ * * This file is part of OpenOffice.org. * @@ -159,12 +159,6 @@ void implReplaceByName(NodeGroupAccess& rNode, const OUString& sName, const Any& e.setContext( rNode.getUnoInstance() ); e.illegalArgument(2); } - catch (configuration::WrappedUnoException& ex) - { - Reference<uno::XInterface> xContext( rNode.getUnoInstance() ); - OUString sMessage( RTL_CONSTASCII_USTRINGPARAM("Configuration - Cannot set Value: ") ); - throw WrappedTargetException( sMessage += ex.extractMessage(), xContext, ex.getAnyUnoException() ); - } catch (configuration::Exception& ex) { ExceptionMapper e(ex); @@ -244,12 +238,6 @@ void implReplaceByName(NodeTreeSetAccess& rNode, const OUString& sName, const An e.setContext( rNode.getUnoInstance() ); e.illegalArgument(2); } - catch (configuration::WrappedUnoException& ex) - { - Reference<uno::XInterface> xContext( rNode.getUnoInstance() ); - OUString sMessage( RTL_CONSTASCII_USTRINGPARAM("Configuration - Cannot replace Set Element: ") ); - throw WrappedTargetException( sMessage += ex.extractMessage(), xContext, ex.getAnyUnoException() ); - } catch (configuration::Exception& ex) { ExceptionMapper e(ex); @@ -319,12 +307,6 @@ void implReplaceByName(NodeValueSetAccess& rNode, const OUString& sName, const A e.setContext( rNode.getUnoInstance() ); e.illegalArgument(2); } - catch (configuration::WrappedUnoException& ex) - { - Reference<uno::XInterface> xContext( rNode.getUnoInstance() ); - OUString sMessage( RTL_CONSTASCII_USTRINGPARAM("Configuration - Cannot replace Set Element: ") ); - throw WrappedTargetException( sMessage += ex.extractMessage(), xContext, ex.getAnyUnoException() ); - } catch (configuration::Exception& ex) { ExceptionMapper e(ex); @@ -396,12 +378,6 @@ void implInsertByName(NodeTreeSetAccess& rNode, const OUString& sName, const Any e.setContext( rNode.getUnoInstance() ); e.illegalArgument(2); } - catch (configuration::WrappedUnoException& ex) - { - Reference<uno::XInterface> xContext( rNode.getUnoInstance() ); - OUString sMessage( RTL_CONSTASCII_USTRINGPARAM("Configuration - Cannot insert into Set: ") ); - throw WrappedTargetException( sMessage += ex.extractMessage(), xContext, ex.getAnyUnoException() ); - } catch (configuration::Exception& ex) { ExceptionMapper e(ex); @@ -469,12 +445,6 @@ void implInsertByName(NodeValueSetAccess& rNode, const OUString& sName, const An e.setContext( rNode.getUnoInstance() ); e.illegalArgument(2); } - catch (configuration::WrappedUnoException& ex) - { - Reference<uno::XInterface> xContext( rNode.getUnoInstance() ); - OUString sMessage( RTL_CONSTASCII_USTRINGPARAM("Configuration - Cannot insert into Set: ") ); - throw WrappedTargetException( sMessage += ex.extractMessage(), xContext, ex.getAnyUnoException() ); - } catch (configuration::Exception& ex) { ExceptionMapper e(ex); @@ -534,12 +504,6 @@ void implRemoveByName(NodeTreeSetAccess& rNode, const OUString& sName ) Reference<uno::XInterface> xContext( rNode.getUnoInstance() ); throw NoSuchElementException( sMessage += e.message(), xContext ); } - catch (configuration::WrappedUnoException& ex) - { - Reference<uno::XInterface> xContext( rNode.getUnoInstance() ); - OUString sMessage( RTL_CONSTASCII_USTRINGPARAM("Configuration - Cannot remove Set Element: ") ); - throw WrappedTargetException( sMessage += ex.extractMessage(), xContext, ex.getAnyUnoException() ); - } catch (configuration::Exception& ex) { ExceptionMapper e(ex); @@ -596,12 +560,6 @@ void implRemoveByName(NodeValueSetAccess& rNode, const OUString& sName ) Reference<uno::XInterface> xContext( rNode.getUnoInstance() ); throw NoSuchElementException( sMessage += e.message(), xContext ); } - catch (configuration::WrappedUnoException& ex) - { - Reference<uno::XInterface> xContext( rNode.getUnoInstance() ); - OUString sMessage( RTL_CONSTASCII_USTRINGPARAM("Configuration - Cannot remove Set Element: ") ); - throw WrappedTargetException( sMessage += ex.extractMessage(), xContext, ex.getAnyUnoException() ); - } catch (configuration::Exception& ex) { ExceptionMapper e(ex); diff --git a/configmgr/source/cmdtools/makefile.mk b/configmgr/source/cmdtools/makefile.mk index 3ecec92fcf73..e69de29bb2d1 100644 --- a/configmgr/source/cmdtools/makefile.mk +++ b/configmgr/source/cmdtools/makefile.mk @@ -1,63 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.13 $ -# -# 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. -# -#************************************************************************* - -PRJ = ..$/.. -PRJNAME = configmgr -PRJINC = $(PRJ)$/source -TARGET = cmdtools -LIBTARGET = NO -ENABLE_EXCEPTIONS = TRUE - -# Targettype should be CUI, but we need to be able to run the tools on Windows -# without a shell: -.IF "$(GUI)" == "WNT" -TARGETTYPE = GUI -APP1NOSAL = TRUE -.ELSE -TARGETTYPE = CUI -.ENDIF - -.INCLUDE: settings.mk - -APP1TARGET = setofficelang -APP1OBJS = \ - $(OBJ)$/setofficelang.obj \ - $(OBJ)$/unomain.obj -APP1STDLIBS = \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(SALLIB) - -OBJFILES = $(APP1OBJS) - -UNIXTEXT = $(MISC)/setofficelang.sh - -.INCLUDE: target.mk diff --git a/configmgr/source/cmdtools/setofficelang.cxx b/configmgr/source/cmdtools/setofficelang.cxx index 3fcff6363a21..e69de29bb2d1 100644 --- a/configmgr/source/cmdtools/setofficelang.cxx +++ b/configmgr/source/cmdtools/setofficelang.cxx @@ -1,355 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: setofficelang.cxx,v $ - * $Revision: 1.6 $ - * - * 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. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_configmgr.hxx" - -#include <stdio.h> - -#include "unomain.hxx" - -#include <osl/thread.h> -#include <rtl/ustring.hxx> - -//============================================================================= -const int OPERATION_SUCCEEDED = 0; -const int ERROR_LANGUAGE_NOT_SUPPORTED = 1; -const int ERROR_INVALID_ARGS = 2; -const int ERROR_RUNTIME_FAILURE = 3; -//============================================================================= - -rtl::OUString const k_BaseSettingsPath( RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Setup")); -rtl::OUString const k_AppSettingsPath( RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.Linguistic/General")); -rtl::OUString const k_LocaleListSetting( RTL_CONSTASCII_USTRINGPARAM("Office/InstalledLocales") ); -rtl::OUString const k_LocaleSetting( RTL_CONSTASCII_USTRINGPARAM("L10N/ooLocale") ); -rtl::OUString const k_UILocaleSetting( RTL_CONSTASCII_USTRINGPARAM("UILocale") ); - -//============================================================================= -static inline rtl::OString narrow(rtl::OUString const & aString) -{ - return rtl::OUStringToOString( aString, osl_getThreadTextEncoding() ); -} -//============================================================================= -static void usage() -{ - rtl::OString sApp = narrow( unoapp::getAppCommandPath() ); - - fprintf(stderr, "%s - set the user interface language " - "of a OpenOffice.org/StarOffice/StarSuite " - "installation\n", sApp.getStr()); - fprintf(stderr, "\nusage : %s [-afcpl] <language> ..\n", sApp.getStr()); - fprintf(stderr, "\n Options:" - "\n -a Change the default language of the installation. " - "\n This may require administrative rights. " - "\n -f Force selection of language. " - "\n Skips the check if this language is installed. " - "\n -c Display current active language. " - "\n -p Display current preferred language. " - "\n -l List all installed languages. "); - fprintf(stderr, "\n <language> - A language specified by its ISO code (e.g. 'en-US','de') or '-' for default. " - "\n This language must be supported by the office installation\n" - "\n If multiple languages are listed, the first one that is installed is used.\n"); - fprintf(stderr, "\nResult codes: 0 - Setting language successfull" - "\n 1 - The language is not supported by this office installation" - "\n 2 - Invalid arguments" - "\n 3 - An internal error occurred\n"); - fflush(stdout); -} - -//--------------------------------------------------------------------------- - -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/util/XChangesBatch.hpp> -#include <com/sun/star/container/XNameReplace.hpp> -#include <com/sun/star/container/XHierarchicalNameAccess.hpp> -#include <com/sun/star/beans/XPropertyState.hpp> -#include <com/sun/star/uno/Sequence.hxx> -namespace uno = ::com::sun::star::uno; -namespace lang = ::com::sun::star::lang; -namespace util = ::com::sun::star::util; -namespace beans = ::com::sun::star::beans; -namespace container = ::com::sun::star::container; -using rtl::OUString; -//--------------------------------------------------------------------------- - -static uno::Reference< lang::XMultiServiceFactory > createProvider(uno::Reference< uno::XComponentContext > const & xContext, bool bAdmin=false); -static uno::Reference< uno::XInterface > createView(uno::Reference< lang::XMultiServiceFactory > const & xProvider, OUString const & aNodepath, bool bUpdate = false); -static uno::Reference< util::XChangesBatch > createUpdateView(uno::Reference< lang::XMultiServiceFactory > const & xProvider, OUString const & aNodepath); -static void disposeComponent(uno::BaseReference const & xComp); -// -------------------------------------------------------------------------- - -int SAL_CALL unoapp::uno_main(uno::Reference< uno::XComponentContext > const & xContext) - SAL_THROW( (uno::Exception) ) -{ - // get args - uno::Sequence< OUString > const aArgs( getAppCommandArgs() ); - - sal_Int32 const nArgC = aArgs.getLength(); - - sal_Int32 ix = 0; - - // get options - bool bAdminMode = false; - bool bForce = false; - bool bShowCurrentLang = false; - bool bShowSelectedLang = false; - bool bListInstalledLangs = false; - - bool bInfoRequest = false; - - while (ix < nArgC && aArgs[ix].matchAsciiL("-",1)) - { - sal_Int32 const nOptCount = aArgs[ix].getLength() -1; - if (nOptCount <= 0) - { - // a lone "-" means set-to-default-locale - break; - } - - sal_Unicode const * const pOpts = aArgs[ix].getStr() + 1; - for (sal_Int32 opt = 0; opt < nOptCount; ++opt) - { - switch (pOpts[opt]) - { - case 'a': bAdminMode = true; break; - case 'f': bForce = true; break; - case 'c': bShowCurrentLang = true; bInfoRequest = true; break; - case 'p': bShowSelectedLang = true; bInfoRequest = true; break; - case 'l': bListInstalledLangs = true; bInfoRequest = true; break; - default: - usage(); - return ERROR_INVALID_ARGS; - } - } - - ++ix; - } - - if ((nArgC <= ix) && !bInfoRequest) - { - // no more remaining args and no info request - usage(); - return ERROR_INVALID_ARGS; - } - - try - { - uno::Reference< lang::XMultiServiceFactory > xProvider = createProvider(xContext); - uno::Reference< lang::XMultiServiceFactory > xAppProvider = createProvider(xContext,bAdminMode); - OSL_ASSERT( xProvider.is()); - OSL_ASSERT( xAppProvider.is()); - uno::Reference< container::XHierarchicalNameAccess > xBaseSettings( - createView(xProvider,k_BaseSettingsPath), uno::UNO_QUERY_THROW ); - - if (bShowCurrentLang) - { - rtl::OUString aCurrentLocaleU; - if (!(xBaseSettings->getByHierarchicalName(k_LocaleSetting) >>= aCurrentLocaleU) ) - return ERROR_RUNTIME_FAILURE; - - rtl::OString aCurrentLocale = ::rtl::OUStringToOString(aCurrentLocaleU, RTL_TEXTENCODING_ASCII_US); - printf("%s\n", aCurrentLocale.getStr()); - } - if (bShowSelectedLang) - { - uno::Reference< container::XNameAccess > xAppSettings( createView(xAppProvider,k_AppSettingsPath), uno::UNO_QUERY_THROW ); - rtl::OUString aSelectedLocaleU; - if (!(xAppSettings->getByName(k_UILocaleSetting) >>= aSelectedLocaleU) ) - return ERROR_RUNTIME_FAILURE; - - rtl::OString aSelectedLocale = ::rtl::OUStringToOString(aSelectedLocaleU, RTL_TEXTENCODING_ASCII_US); - if (aSelectedLocale.getLength() == 0) aSelectedLocale="-"; - printf("%s\n", aSelectedLocale.getStr()); - - disposeComponent(xAppSettings); - } - - uno::Reference< container::XNameAccess > xSupportedLocales; - xBaseSettings->getByHierarchicalName(k_LocaleListSetting) >>= xSupportedLocales; - - if (bListInstalledLangs) - { - if (!xSupportedLocales.is()) - return ERROR_RUNTIME_FAILURE; - - uno::Sequence< OUString > aSupportedLocales = xSupportedLocales->getElementNames(); - for (sal_Int32 i=0; i<aSupportedLocales.getLength(); ++i) - { - rtl::OString aLocale = ::rtl::OUStringToOString(aSupportedLocales[i], RTL_TEXTENCODING_ASCII_US); - printf("%s\n", aLocale.getStr()); - } - } - if (nArgC > ix) - { - bool bLocaleFound = false; - - uno::Reference< util::XChangesBatch > xAppView = createUpdateView(xAppProvider,k_AppSettingsPath); - uno::Reference< container::XNameReplace > xSettings(xAppView, uno::UNO_QUERY_THROW); - - if (!xSupportedLocales.is()) - return ERROR_RUNTIME_FAILURE; - - for ( ; ix < nArgC; ++ix) - { - OUString const aTargetLocale = aArgs[ix]; - if (aTargetLocale.equalsAscii("-")) - { - uno::Reference< beans::XPropertyState > xSettingsState(xSettings, uno::UNO_QUERY); - // if we can't reset, we treat this as unsupported language - if (!xSettingsState.is()) - continue; - - bLocaleFound = true; - xSettingsState->setPropertyToDefault(k_UILocaleSetting); - xAppView->commitChanges(); - break; - } - else if (bForce || xSupportedLocales->hasByName(aTargetLocale)) - { - bLocaleFound = true; - xSettings->replaceByName(k_UILocaleSetting, uno::makeAny(aTargetLocale)); - xAppView->commitChanges(); - break; - } - } - - disposeComponent(xAppView); - - if (!bLocaleFound) - return ERROR_LANGUAGE_NOT_SUPPORTED; - } - disposeComponent(xBaseSettings); - if (xAppProvider != xProvider) - disposeComponent(xAppProvider); - disposeComponent(xProvider); - } - catch (uno::Exception & e) - { - fprintf(stderr, "\nERROR: - An exception occurred: '%s'\n", narrow(e.Message).getStr()); - return ERROR_RUNTIME_FAILURE; - } - return OPERATION_SUCCEEDED; -} -// -------------------------------------------------------------------------- - -#include <com/sun/star/lang/XComponent.hpp> -#include <com/sun/star/lang/ServiceNotRegisteredException.hpp> -#include <com/sun/star/beans/NamedValue.hpp> -#include <rtl/ustrbuf.hxx> -namespace lang = com::sun::star::lang; -namespace beans = com::sun::star::beans; - -// -------------------------------------------------------------------------- -static uno::Reference< uno::XInterface > createService(uno::Reference< uno::XComponentContext > const & xContext, OUString aService) -{ - - uno::Reference< lang::XMultiComponentFactory > xFactory = xContext->getServiceManager(); - if (!xFactory.is()) - { - rtl::OUStringBuffer sMsg; - sMsg.appendAscii("Missing object ! "); - sMsg.appendAscii("UNO context has no service manager."); - - throw uno::RuntimeException(sMsg.makeStringAndClear(),NULL); - } - - uno::Reference< uno::XInterface > xInstance = xFactory->createInstanceWithContext(aService,xContext); - if (!xInstance.is()) - { - rtl::OUStringBuffer sMsg; - sMsg.appendAscii("Missing service ! "); - sMsg.appendAscii("Service manager can't instantiate service "); - sMsg.append(aService).appendAscii(". "); - - throw lang::ServiceNotRegisteredException(sMsg.makeStringAndClear(),NULL); - } - - return xInstance; -} - -// -------------------------------------------------------------------------- -static uno::Reference< lang::XMultiServiceFactory > createProvider(uno::Reference< uno::XComponentContext > const & xContext, bool bAdmin) -{ - static const rtl::OUString kProvider( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider")) ; - static const rtl::OUString kAdminProvider( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.AdministrationProvider")) ; - - const rtl::OUString & selectedProvider = bAdmin ? kAdminProvider : kProvider; - - uno::Reference< lang::XMultiServiceFactory > xRet( createService(xContext,selectedProvider), uno::UNO_QUERY_THROW ); - - return xRet; -} -// -------------------------------------------------------------------------- -static uno::Reference< uno::XInterface > createView(uno::Reference< lang::XMultiServiceFactory > const & xProvider, OUString const & aNodepath, bool bUpdate) -{ - static const OUString kInfoViewService( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess")) ; - static const OUString kUpdateViewService( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationUpdateAccess")) ; - static const OUString kNodepath(RTL_CONSTASCII_USTRINGPARAM("nodepath")) ; - static const OUString kAsync(RTL_CONSTASCII_USTRINGPARAM("EnableAsync")) ; - - const OUString & kViewService = bUpdate ? kUpdateViewService : kInfoViewService; - uno::Sequence< uno::Any > aViewArgs(2); - aViewArgs[0] <<= beans::NamedValue( kNodepath, uno::makeAny(aNodepath) ); - aViewArgs[1] <<= beans::NamedValue( kAsync, uno::makeAny(sal_False) ); - - uno::Reference< uno::XInterface > xView( xProvider->createInstanceWithArguments(kViewService,aViewArgs) ); - return xView; -} -// -------------------------------------------------------------------------- -//#if OSL_DEBUG_LEVEL > 0 -#if 0 // currently not used in debug builds! -static uno::Reference< container::XHierarchicalNameAccess > createInfoView(uno::Reference< lang::XMultiServiceFactory > const & xProvider, OUString const & aNodepath) -{ - uno::Reference< container::XHierarchicalNameAccess > xView( createView(xProvider,aNodepath, false), uno::UNO_QUERY_THROW ); - return xView; -} -#endif -// -------------------------------------------------------------------------- -static uno::Reference< util::XChangesBatch > createUpdateView(uno::Reference< lang::XMultiServiceFactory > const & xProvider, OUString const & aNodepath) -{ - uno::Reference< util::XChangesBatch > xView( createView(xProvider,aNodepath,true), uno::UNO_QUERY_THROW ); - return xView; -} - -// -------------------------------------------------------------------------- -static void disposeComponent(uno::BaseReference const & xComp) -{ - uno::Reference< lang::XComponent > xComponent(xComp,uno::UNO_QUERY); - if (xComponent.is()) - xComponent->dispose(); -} - -// -------------------------------------------------------------------------- - - diff --git a/configmgr/source/cmdtools/setofficelang.sh b/configmgr/source/cmdtools/setofficelang.sh index 98664e4d84d4..e69de29bb2d1 100644 --- a/configmgr/source/cmdtools/setofficelang.sh +++ b/configmgr/source/cmdtools/setofficelang.sh @@ -1,102 +0,0 @@ -#!/bin/sh -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# $RCSfile: setofficelang.sh,v $ -# -# $Revision: 1.2 $ -# -# 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. -# -#************************************************************************* - -# enable file locking -SAL_ENABLE_FILE_LOCKING=1 -export SAL_ENABLE_FILE_LOCKING - -# resolve installation directory -sd_cwd="`pwd`" -if [ -h "$0" ] ; then - sd_basename=`basename "$0"` - sd_script=`ls -l "$0" | sed "s/.*${sd_basename} -> //g"` - cd "`dirname "$0"`" - cd "`dirname "$sd_script"`" -else - cd "`dirname "$0"`" -fi - -sd_prog="`pwd`" - -cd .. -sd_binary=`basename "$0"`".bin" -sd_inst="`pwd`" - -# change back directory -cd "$sd_cwd" - -# check if all required patches are installed -if [ -x "$sd_prog/sopatchlevel.sh" ]; then - "$sd_prog/sopatchlevel.sh" - if [ $? -eq 1 ]; then - exit 0 - fi -fi - -# set search path for shared libraries -sd_platform=`uname -s` -case $sd_platform in - AIX) - LIBPATH=${sd_prog}${LIBPATH+:${LIBPATH}} - export LIBPATH - ;; - - Darwin) - DYLD_LIBRARY_PATH=${sd_prog}${DYLD_LIBRARY_PATH+:${DYLD_LIBRARY_PATH}} - export DYLD_LIBRARY_PATH - ;; - - HP-UX) - SHLIB_PATH=${sd_prog}:/usr/openwin/lib${SHLIB_PATH+:${SHLIB_PATH}} - export SHLIB_PATH - ;; - - IRIX*) - LD_LIBRARYN32_PATH=${sd_prog}${LD_LIBRARYN32_PATH+:${LD_LIBRARYN32_PATH}} - export LD_LIBRARYN32_PATH - ;; - - *) - LD_LIBRARY_PATH=${sd_prog}${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}} - export LD_LIBRARY_PATH - ;; -esac - -# misc. environment variables -unset XENVIRONMENT - -# set path so that other apps can be started just by name -PATH="$sd_prog":$PATH -export PATH - -# execute binary -exec "$sd_prog/$sd_binary" "$@" diff --git a/configmgr/source/cmdtools/unomain.cxx b/configmgr/source/cmdtools/unomain.cxx index 4d8647ed003e..e69de29bb2d1 100644 --- a/configmgr/source/cmdtools/unomain.cxx +++ b/configmgr/source/cmdtools/unomain.cxx @@ -1,145 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: unomain.cxx,v $ - * $Revision: 1.7 $ - * - * 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. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_configmgr.hxx" - -#include <stdio.h> - -#include "unomain.hxx" - -#include <sal/main.h> - -#include <com/sun/star/lang/XComponent.hpp> -#include <cppuhelper/bootstrap.hxx> - -#include <rtl/string.hxx> - -#include <rtl/process.h> -#include <osl/thread.h> -#include <osl/file.h> - -namespace uno = ::com::sun::star::uno; - -namespace -{ - struct AutoDispose - { - typedef uno::Reference< ::com::sun::star::lang::XComponent > Component; - AutoDispose() - : component() - {} - - ~AutoDispose() - { - if (component.is()) - component->dispose(); - } - - void set( Component const & xComp ) - { - component = xComp; - } - void set( uno::BaseReference const & xComp ) - { - component.set(xComp,uno::UNO_QUERY); - } - - Component component; - }; -} - -::rtl::OUString SAL_CALL unoapp::getAppCommandURL() -{ - rtl::OUString aURL; - OSL_VERIFY( osl_Process_E_None == osl_getExecutableFile(&aURL.pData) ); - return aURL; -} - -::rtl::OUString SAL_CALL unoapp::getAppCommandPath() -{ - rtl::OUString const aURL = getAppCommandURL(); - - rtl::OUString aPath; - OSL_VERIFY( osl_File_E_None == osl_getSystemPathFromFileURL(aURL.pData,&aPath.pData) ); - - return aPath; -} - -::rtl::OUString SAL_CALL unoapp::getAppCommandName() -{ - rtl::OUString aURL = getAppCommandURL(); - - sal_Int32 const nNameIndex = aURL.lastIndexOf( sal_Unicode('/') ); - - return aURL.copy(nNameIndex+1); -} - -uno::Sequence< ::rtl::OUString > SAL_CALL unoapp::getAppCommandArgs() -{ - sal_uInt32 const count = rtl_getAppCommandArgCount(); - - uno::Sequence< ::rtl::OUString > aResult( count ); - ::rtl::OUString * pResult = aResult.getArray(); - - for (sal_uInt32 i = 0; i < count; ++i) - { - rtl_getAppCommandArg( i, & pResult[i].pData); - } - - return aResult; -} - -bool unoapp::g_bQuiet = false; - -SAL_IMPLEMENT_MAIN() -{ - AutoDispose aDisposer; - try - { - uno::Reference< uno::XComponentContext > xUnoContext = cppu::defaultBootstrap_InitialComponentContext(); - - aDisposer.component.set( xUnoContext, uno::UNO_QUERY ); - - return unoapp::uno_main(xUnoContext); - } - catch (uno::Exception & e) - { - using namespace rtl; - OString sApp = OUStringToOString( unoapp::getAppCommandName(), osl_getThreadTextEncoding() ); - OString sMessage = OUStringToOString( e.Message, osl_getThreadTextEncoding() ); - - if (!unoapp::g_bQuiet) - fprintf( stderr, "%s - Unhandled exception caught in main: \"%s\"\n", sApp.getStr(), sMessage.getStr() ); - - return 42; - } -} - diff --git a/configmgr/source/cmdtools/unomain.hxx b/configmgr/source/cmdtools/unomain.hxx index 5714e3d964bd..e69de29bb2d1 100644 --- a/configmgr/source/cmdtools/unomain.hxx +++ b/configmgr/source/cmdtools/unomain.hxx @@ -1,63 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: unomain.hxx,v $ - * $Revision: 1.4 $ - * - * 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. - * - ************************************************************************/ - -#ifndef INCLUDED_UNOMAIN_HXX -#define INCLUDED_UNOMAIN_HXX - -#include <rtl/ustring.hxx> -#include <com/sun/star/uno/Sequence.hxx> -#include <com/sun/star/uno/Reference.hxx> -#include <com/sun/star/uno/XComponentContext.hpp> - -namespace unoapp -{ -//----------------------------------------------------------------------------- - namespace uno = ::com::sun::star::uno; - - /// helper: retrieves the full file URL of the application - extern ::rtl::OUString SAL_CALL getAppCommandURL(); - /// helper: retrieves the full system path of the application - extern ::rtl::OUString SAL_CALL getAppCommandPath(); - /// helper: retrieves the name of the application - extern ::rtl::OUString SAL_CALL getAppCommandName(); - /// helper: retrieves all the commandline arguments of the application (skipping -env: arguments) - extern uno::Sequence< ::rtl::OUString > SAL_CALL getAppCommandArgs(); - - /// global variable that allows to suppress all error output from the unoapp launcher, if set to <TRUE/> - extern bool g_bQuiet; - - /// entrypoint that must be implemented by the application - extern int SAL_CALL uno_main( uno::Reference< uno::XComponentContext > const & xContext) - SAL_THROW( (uno::Exception) ); -//----------------------------------------------------------------------------- -} - - -#endif // INCLUDED_UNOMAIN_HXX diff --git a/configmgr/source/inc/configexcept.hxx b/configmgr/source/inc/configexcept.hxx index b982de7a1491..fd39c68709b2 100644 --- a/configmgr/source/inc/configexcept.hxx +++ b/configmgr/source/inc/configexcept.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: configexcept.hxx,v $ - * $Revision: 1.6 $ + * $Revision: 1.6.4.1 $ * * This file is part of OpenOffice.org. * @@ -89,25 +89,6 @@ namespace configmgr virtual OUString message() const; }; //------------------------------------------------------------------------- - - class WrappedUnoException : public Exception - { - uno::Any m_aUnoException; - public: - WrappedUnoException(uno::Any const& aUnoException); - - OUString extractMessage() const; - uno::Exception extractUnoException() const; - uno::Any const& getAnyUnoException() const; - - virtual OUString message() const; - }; - template <class Except> - WrappedUnoException rethrowWrapped(Except const& anException) - { - throw WrappedUnoException( uno::makeAny(anException) ); - } - //------------------------------------------------------------------------- } //----------------------------------------------------------------------------- diff --git a/configmgr/source/treemgr/configexcept.cxx b/configmgr/source/treemgr/configexcept.cxx index b86734703d24..4cd32a423f1b 100644 --- a/configmgr/source/treemgr/configexcept.cxx +++ b/configmgr/source/treemgr/configexcept.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: configexcept.cxx,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.4.1 $ * * This file is part of OpenOffice.org. * @@ -133,45 +133,6 @@ namespace configmgr return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(c_sTypeMismatch)).concat( m_sTypes ); } //----------------------------------------------------------------------------- - - WrappedUnoException::WrappedUnoException(uno::Any const& aUnoException) - : Exception("UNO Service failed") - , m_aUnoException(aUnoException) - { - OSL_ENSURE( m_aUnoException.getValueTypeClass() == uno::TypeClass_EXCEPTION, - "ERROR: Wrapping a non-exception into a WrappedUnoException !"); - - } - //--------------------------------------------------------------------- - - OUString WrappedUnoException::extractMessage() const - { - return extractUnoException().Message; - } - //--------------------------------------------------------------------- - - uno::Exception WrappedUnoException::extractUnoException() const - { - uno::Exception e; - OSL_VERIFY( m_aUnoException >>= e ); - return e; - } - //--------------------------------------------------------------------- - - uno::Any const& WrappedUnoException::getAnyUnoException() const - { - return m_aUnoException; - } - //--------------------------------------------------------------------- - - OUString WrappedUnoException::message() const - { - return OUString(RTL_CONSTASCII_USTRINGPARAM("CONFIGMGR: Used Service failed with a")) - += m_aUnoException.getValueType().getTypeName() - += OUString(RTL_CONSTASCII_USTRINGPARAM(": ")) - += extractMessage(); - } -//----------------------------------------------------------------------------- } namespace configapi diff --git a/configmgr/source/treemgr/configgroup.cxx b/configmgr/source/treemgr/configgroup.cxx index 8ed0ab510ef7..a62516a1051f 100644 --- a/configmgr/source/treemgr/configgroup.cxx +++ b/configmgr/source/treemgr/configgroup.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: configgroup.cxx,v $ - * $Revision: 1.14 $ + * $Revision: 1.14.14.1 $ * * This file is part of OpenOffice.org. * @@ -197,8 +197,6 @@ bool convertCompatibleValue(UnoTypeConverter const& xTypeConverter, uno::Any& rC catch(css::script::CannotConvertException&) { // try to do more conversion here ?! - - // throw a WrappedUnoException here ?! return false; } catch(uno::Exception&) |