From 1221920d8979270644cf55c02e9202c534adb20f Mon Sep 17 00:00:00 2001 From: sb Date: Wed, 6 Oct 2010 17:43:02 +0200 Subject: [PATCH 1/5] sb131: #i114962# first step of passive extension component registration (no live deployment yet) --- stoc/source/simpleregistry/textualservices.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/stoc/source/simpleregistry/textualservices.cxx b/stoc/source/simpleregistry/textualservices.cxx index 932c639124d0..5a50a5aa62c6 100755 --- a/stoc/source/simpleregistry/textualservices.cxx +++ b/stoc/source/simpleregistry/textualservices.cxx @@ -41,8 +41,10 @@ #include "com/sun/star/uno/XInterface.hpp" #include "cppuhelper/implbase1.hxx" #include "osl/diagnose.h" +#include "rtl/malformeduriexception.hxx" #include "rtl/ref.hxx" #include "rtl/string.h" +#include "rtl/uri.hxx" #include "rtl/ustrbuf.hxx" #include "rtl/ustring.h" #include "rtl/ustring.hxx" @@ -306,6 +308,16 @@ void Parser::handleComponent() { ": is missing \"loader\" attribute"))), css::uno::Reference< css::uno::XInterface >()); } + try { + attrUri_ = rtl::Uri::convertRelToAbs(reader_.getUrl(), attrUri_); + } catch (rtl::MalformedUriException & e) { + throw css::registry::InvalidRegistryException( + (reader_.getUrl() + + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM(": bad \"uri\" attribute: ")) + + e.getMessage()), + css::uno::Reference< css::uno::XInterface >()); + } } void Parser::handleImplementation() { From 823c4f2b4b1c118a8944992365a0bb7a7cc8f861 Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 21 Oct 2010 11:35:24 +0200 Subject: [PATCH 2/5] sb131: #i114962# allow for explicit implementation name in css.lib.uno.helper.Factory --- .../com/sun/star/lib/uno/helper/Factory.java | 34 ++++++++++++++++--- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/javaunohelper/com/sun/star/lib/uno/helper/Factory.java b/javaunohelper/com/sun/star/lib/uno/helper/Factory.java index 33d107279633..0780f26486f2 100644 --- a/javaunohelper/com/sun/star/lib/uno/helper/Factory.java +++ b/javaunohelper/com/sun/star/lib/uno/helper/Factory.java @@ -51,6 +51,30 @@ public class Factory com.sun.star.lang.XSingleComponentFactory and com.sun.star.lang.XServiceInfo + @param impl_class + implementation class + @param impl_name + implementation name + @param supported_services + services implemented + @return + object factory + + @since UDK 3.2.13 + */ + public static XSingleComponentFactory createComponentFactory( + Class impl_class, String impl_name, String supported_services [] ) + throws com.sun.star.uno.RuntimeException + { + return new Factory( impl_class, impl_name, supported_services ); + } + + /** Creates an object factory supporting interfaces + com.sun.star.lang.XSingleComponentFactory and + com.sun.star.lang.XServiceInfo + + The implementation name is the name of the implementation class. + @param impl_class implementation class @param supported_services @@ -62,7 +86,8 @@ public class Factory Class impl_class, String supported_services [] ) throws com.sun.star.uno.RuntimeException { - return new Factory( impl_class, supported_services ); + return createComponentFactory( + impl_class, impl_class.getName(), supported_services ); } /** Writes component's implementation info to given registry key. @@ -106,11 +131,10 @@ public class Factory private java.lang.reflect.Method m_method; private java.lang.reflect.Constructor m_ctor; - // ctor - private Factory( Class impl_class, String supported_services [] ) - throws com.sun.star.uno.RuntimeException + private Factory( + Class impl_class, String impl_name, String supported_services [] ) { - m_impl_name = impl_class.getName(); + m_impl_name = impl_name; m_supported_services = supported_services; m_impl_class = impl_class; m_method = null; From e3d08367e9c907b94f3576f266dc8a2154414d2c Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 21 Oct 2010 15:41:41 +0200 Subject: [PATCH 3/5] sb131: #i114962# singleton implementations need not have a .../UNO/SERVICES rdb key --- .../implementationregistration/implreg.cxx | 96 ++++++++----------- 1 file changed, 42 insertions(+), 54 deletions(-) diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx index 2faf13fd159c..cbb49c162fe1 100644 --- a/stoc/source/implementationregistration/implreg.cxx +++ b/stoc/source/implementationregistration/implreg.cxx @@ -1153,36 +1153,24 @@ static void prepareRegistry( { // update entries in SERVICES section Sequence< Reference < XRegistryKey > > serviceKeys = xKey->openKeys(); - OUString implName; + const Reference < XRegistryKey > * pServiceKeys = serviceKeys.getConstArray(); - if (serviceKeys.getLength()) + OUString implName = OUString(xImplKey->getKeyName().getStr() + 1); + sal_Int32 firstDot = implName.indexOf('/'); + + if (firstDot >= 0) + implName = implName.copy(firstDot + 1); + + sal_Int32 offset = xKey->getKeyName().getLength() + 1; + + for (sal_Int32 j = 0; j < serviceKeys.getLength(); j++) { - const Reference < XRegistryKey > * pServiceKeys = serviceKeys.getConstArray(); + OUString serviceName = pServiceKeys[j]->getKeyName().copy(offset); - implName = OUString(xImplKey->getKeyName().getStr() + 1); - sal_Int32 firstDot = implName.indexOf('/'); - - if (firstDot >= 0) - implName = implName.copy(firstDot + 1); - - sal_Int32 offset = xKey->getKeyName().getLength() + 1; - - for (sal_Int32 j = 0; j < serviceKeys.getLength(); j++) - { - OUString serviceName = pServiceKeys[j]->getKeyName().copy(offset); - - createUniqueSubEntry( - xDest->getRootKey()->createKey( - pool.slash_SERVICES + serviceName ), - implName); - } - - } - else - { - throw InvalidRegistryException( - OUString( RTL_CONSTASCII_USTRINGPARAM( "prepareRegistry(): no service names given by component" ) ), - Reference< XInterface > () ); + createUniqueSubEntry( + xDest->getRootKey()->createKey( + pool.slash_SERVICES + serviceName ), + implName); } xKey = xImplKey->openKey( pool.slash_UNO ); @@ -1205,38 +1193,38 @@ static void prepareRegistry( } } } + } - // update LOCATION entry - xKey = xImplKey->createKey( pool.slash_UNO_slash_LOCATION ); + // update LOCATION entry + xKey = xImplKey->createKey( pool.slash_UNO_slash_LOCATION ); - if (xKey.is()) + if (xKey.is()) + { + xKey->setAsciiValue(locationUrl); + } + + // update ACTIVATOR entry + xKey = xImplKey->createKey( pool.slash_UNO_slash_ACTIVATOR ); + + if (xKey.is()) + { + xKey->setAsciiValue(implementationLoaderUrl); + } + + xKey = xImplKey->openKey( pool.slash_UNO_slash_SERVICES ); + + if (xKey.is() && (xKey->getValueType() == RegistryValueType_ASCIILIST)) + { + // update link entries in REGISTRY_LINKS section + Sequence linkNames = xKey->getAsciiListValue(); + + if (linkNames.getLength()) { - xKey->setAsciiValue(locationUrl); - } + const OUString* pLinkNames = linkNames.getConstArray(); - // update ACTIVATOR entry - xKey = xImplKey->createKey( pool.slash_UNO_slash_ACTIVATOR ); - - if (xKey.is()) - { - xKey->setAsciiValue(implementationLoaderUrl); - } - - xKey = xImplKey->openKey( pool.slash_UNO_slash_SERVICES ); - - if (xKey.is() && (xKey->getValueType() == RegistryValueType_ASCIILIST)) - { - // update link entries in REGISTRY_LINKS section - Sequence linkNames = xKey->getAsciiListValue(); - - if (linkNames.getLength()) + for (sal_Int32 j = 0; j < linkNames.getLength(); j++) { - const OUString* pLinkNames = linkNames.getConstArray(); - - for (sal_Int32 j = 0; j < linkNames.getLength(); j++) - { - prepareLink(xDest, xImplKey, pLinkNames[j]); - } + prepareLink(xDest, xImplKey, pLinkNames[j]); } } } From 7f942e9705c5f99b91ec5c5f45643fdf4bc7a7a1 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 22 Oct 2010 10:37:46 +0200 Subject: [PATCH 4/5] sb131: #i115124# $(XSLTPROC) implies LIBXSLT:libxslt --- cppuhelper/prj/build.lst | 2 +- io/prj/build.lst | 2 +- javaunohelper/prj/build.lst | 2 +- pyuno/prj/build.lst | 2 +- remotebridges/prj/build.lst | 2 +- ure/prj/build.lst | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cppuhelper/prj/build.lst b/cppuhelper/prj/build.lst index de66b2d61a4b..ff837f90dd1a 100644 --- a/cppuhelper/prj/build.lst +++ b/cppuhelper/prj/build.lst @@ -1,4 +1,4 @@ -ch cppuhelper : BOOST:boost codemaker cppu offuh NULL +ch cppuhelper : BOOST:boost LIBXSLT:libxslt codemaker cppu offuh NULL ch cppuhelper usr1 - all ch_mkout NULL ch cppuhelper\inc nmake - all ch_include NULL ch cppuhelper\source nmake - all ch_source ch_unotypes ch_include NULL diff --git a/io/prj/build.lst b/io/prj/build.lst index 2fa4900f52e6..f2be62d2aa1e 100644 --- a/io/prj/build.lst +++ b/io/prj/build.lst @@ -1,4 +1,4 @@ -io io : rdbmaker NULL +io io : LIBXSLT:libxslt rdbmaker NULL io io usr1 - all io_mkout NULL io io\inc nmake - all io_inc NULL io io\source\acceptor nmake - all io_acceptor io_connector io_inc NULL diff --git a/javaunohelper/prj/build.lst b/javaunohelper/prj/build.lst index c18dd3eb94dc..d97a6450d06a 100644 --- a/javaunohelper/prj/build.lst +++ b/javaunohelper/prj/build.lst @@ -1,4 +1,4 @@ -jh javaunohelper : bridges cppuhelper jurt ridljar unoil NULL +jh javaunohelper : LIBXSLT:libxslt bridges cppuhelper jurt ridljar unoil NULL jh javaunohelper usr1 - all jh_mkout NULL jh javaunohelper\inc nmake - all jh_inc NULL jh javaunohelper\com\sun\star\comp\helper nmake - all jh_helper jh_inc NULL diff --git a/pyuno/prj/build.lst b/pyuno/prj/build.lst index 92449162071d..5a3b2c179e7d 100644 --- a/pyuno/prj/build.lst +++ b/pyuno/prj/build.lst @@ -1,4 +1,4 @@ -bgpu pyuno : stoc cpputools cppuhelper bridges tools PYTHON:python NULL +bgpu pyuno : stoc cpputools cppuhelper bridges tools PYTHON:python LIBXSLT:libxslt NULL pu pyuno usr1 - all br_mkout NULL pu pyuno\zipcore nmake - all pu_zipcore NULL pu pyuno\source\module nmake - all pu_module NULL diff --git a/remotebridges/prj/build.lst b/remotebridges/prj/build.lst index 30a376462d7c..a1f16dbd60d2 100644 --- a/remotebridges/prj/build.lst +++ b/remotebridges/prj/build.lst @@ -1,4 +1,4 @@ -rb remotebridges : bridges rdbmaker NULL +rb remotebridges : LIBXSLT:libxslt bridges rdbmaker NULL rb remotebridges usr1 - all rb_mkout NULL rb remotebridges\source\bridge nmake - all rb_iiop NULL rb remotebridges\source\factory nmake - all rb_factory NULL diff --git a/ure/prj/build.lst b/ure/prj/build.lst index 7d3e23edc058..1f9b694ed554 100644 --- a/ure/prj/build.lst +++ b/ure/prj/build.lst @@ -1,2 +1,2 @@ -ur ure : cli_ure io javaunohelper remotebridges solenv stoc NULL +ur ure : LIBXSLT:libxslt cli_ure io javaunohelper remotebridges solenv stoc NULL ur ure\source nmake - all ur_source NULL From 739343f846f6feb5c586c5ddbf59a7493a93b494 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 22 Oct 2010 16:19:33 +0200 Subject: [PATCH 5/5] sb131: #i115203# note that xmlreader is semi-private and unversioned for now --- xmlreader/inc/xmlreader/README | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 xmlreader/inc/xmlreader/README diff --git a/xmlreader/inc/xmlreader/README b/xmlreader/inc/xmlreader/README new file mode 100644 index 000000000000..cf238a695c61 --- /dev/null +++ b/xmlreader/inc/xmlreader/README @@ -0,0 +1,34 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#***********************************************************************/ + +: "Issue 113189 +extracted xmlreader from configmgr, to make the former available within URE. +The xmlreader library is for now considered a private part of URE (cf. +ure/source/README), for simplicity uses OOO_DLLPUBLIC_XMLREADER-based symbol +visibility (and thus no symbol versioning), but is of course used from outside +URE in configmgr. This works as long as its ABI does not change. If it ever +changes, symbol versioning will have to be added (in some form or other)."