sb135: merged in CWS sb131

This commit is contained in:
sb 2010-10-29 13:25:57 +02:00
commit f67fcfc279
10 changed files with 123 additions and 65 deletions

View file

@ -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

View file

@ -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

View file

@ -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;

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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<OUString> 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<OUString> 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]);
}
}
}

12
stoc/source/simpleregistry/textualservices.cxx Executable file → Normal file
View file

@ -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() {
": <component> 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() {

View file

@ -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

View file

@ -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
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#***********************************************************************/
<http://qa.openoffice.org/issues/show_bug.cgi?id=115203>: "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)."