[Libreoffice-commits] .: 6 commits - cppuhelper/inc cppuhelper/Package_inc.mk cppuhelper/source desktop/source dtrans/source filter/source framework/inc hwpfilter/source i18npool/CustomTarget_localedata.mk i18npool/Executable_saxparser.mk i18npool/source javaunohelper/com javaunohelper/Jar_juh.mk javaunohelper/source javaunohelper/test javaunohelper/Zip_juh.mk odk/examples sdext/source solenv/gbuild stoc/Library_bootstrap.mk stoc/prj stoc/source svx/source testtools/CustomTarget_uno_test.mk xmlsecurity/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Dec 21 06:57:08 PST 2012
cppuhelper/Package_inc.mk | 1
cppuhelper/inc/cppuhelper/servicefactory.hxx | 116
cppuhelper/source/compat.cxx | 8
cppuhelper/source/defaultbootstrap.cxx | 10
cppuhelper/source/servicefactory.cxx | 339 --
desktop/source/app/appinit.cxx | 1
dtrans/source/inc/DtObjFactory.hxx | 1
dtrans/source/win32/dtobj/DataFmtTransl.hxx | 1
dtrans/source/win32/dtobj/FetcList.hxx | 1
filter/source/odfflatxml/OdfFlatXml.cxx | 1
filter/source/svg/test/svg2odf.cxx | 1
filter/source/xsltfilter/LibXSLTTransformer.cxx | 1
filter/source/xsltfilter/LibXSLTTransformer.hxx | 1
filter/source/xsltfilter/OleHandler.cxx | 1
filter/source/xsltfilter/OleHandler.hxx | 1
filter/source/xsltfilter/XSLTFilter.cxx | 1
framework/inc/services.h | 18
hwpfilter/source/hwpreader.hxx | 1
i18npool/CustomTarget_localedata.mk | 12
i18npool/Executable_saxparser.mk | 1
i18npool/source/localedata/LocaleNode.hxx | 1
i18npool/source/localedata/saxparser.cxx | 18
javaunohelper/Jar_juh.mk | 1
javaunohelper/Zip_juh.mk | 1
javaunohelper/com/sun/star/comp/helper/RegistryServiceFactory.java | 176 -
javaunohelper/source/javaunohelper.cxx | 91
javaunohelper/test/com/sun/star/comp/helper/RegistryServiceFactory_Test.java | 71
odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx | 1
sdext/source/pdfimport/test/pdf2xml.cxx | 1
solenv/gbuild/TargetLocations.mk | 3
stoc/Library_bootstrap.mk | 2
stoc/prj/build.lst | 2
stoc/source/implementationregistration/implreg.cxx | 1
stoc/source/javaloader/javaloader.cxx | 2
stoc/source/simpleregistry/simpleregistry.cxx | 51
stoc/source/simpleregistry/textualservices.cxx | 1248 ----------
stoc/source/simpleregistry/textualservices.hxx | 61
svx/source/form/fmshimp.cxx | 1
svx/source/form/fmsrcimp.cxx | 1
svx/source/form/fmtools.cxx | 1
svx/source/gengal/gengal.cxx | 1
testtools/CustomTarget_uno_test.mk | 6
xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx | 1
43 files changed, 36 insertions(+), 2223 deletions(-)
New commits:
commit 03739641088846c4cf76a0752619905a8a65f88c
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Dec 21 11:11:47 2012 +0100
Remove support for XML .rdbs froom SimpleRegistry service again
...this was a transitional hack to get XML-format service.rdbs in. Now that
registry-based bootstrap_InitialComponentContext is gone, XML-format .rdbs need
only be handled in cppuhelper/source/defaultbootstrap.cxx (so the
textualservices stuff once duplicated to there now effectively moved there).
Change-Id: Ifb93558768095c1b462fe4057ebf8724968cca77
diff --git a/cppuhelper/source/defaultbootstrap.cxx b/cppuhelper/source/defaultbootstrap.cxx
index 1fe1aa7..128ee64 100644
--- a/cppuhelper/source/defaultbootstrap.cxx
+++ b/cppuhelper/source/defaultbootstrap.cxx
@@ -233,13 +233,9 @@ struct Data: private boost::noncopyable {
ImplementationMap singletons;
};
-// This is largely a copy from stoc/source/simpleregistry/textualservices.cxx
-// (which it obsoletes); cppuhelper's published interface concept makes it
-// difficult to make both places use a shared Parser implementation, so I
-// created a copy for now (until the whole stoc/source/simpleregistry stuff can
-// be removed in an incompatible LibreOffice version). For simplicity, this
-// code keeps throwing css::registry::InvalidRegistryException for invalid XML
-// rdbs (even though that does not fit the exception's name):
+// For simplicity, this code keeps throwing
+// css::registry::InvalidRegistryException for invalid XML rdbs (even though
+// that does not fit the exception's name):
class Parser: private boost::noncopyable {
public:
Parser(
diff --git a/stoc/Library_bootstrap.mk b/stoc/Library_bootstrap.mk
index b9d0f18..e68ddfa 100644
--- a/stoc/Library_bootstrap.mk
+++ b/stoc/Library_bootstrap.mk
@@ -52,7 +52,6 @@ $(eval $(call gb_Library_use_libraries,bootstrap,\
reg \
sal \
salhelper \
- xmlreader \
$(gb_UWINAPI) \
))
@@ -84,7 +83,6 @@ $(eval $(call gb_Library_add_exception_objects,bootstrap,\
stoc/source/security/permissions \
stoc/source/servicemanager/servicemanager \
stoc/source/simpleregistry/simpleregistry \
- stoc/source/simpleregistry/textualservices \
stoc/source/tdmanager/tdmgr \
stoc/source/tdmanager/tdmgr_check \
stoc/source/tdmanager/tdmgr_tdenumeration \
diff --git a/stoc/prj/build.lst b/stoc/prj/build.lst
index 674439e..cd1b843 100644
--- a/stoc/prj/build.lst
+++ b/stoc/prj/build.lst
@@ -1,3 +1,3 @@
-tc stoc : cppuhelper cppu jvmaccess sal salhelper jvmfwk xmlreader LIBXSTL:libxslt registry NULL
+tc stoc : cppuhelper cppu jvmaccess sal salhelper jvmfwk LIBXSTL:libxslt registry NULL
tc stoc usr1 - all tc_mkout NULL
tc stoc\prj nmake - all tc_prj NULL
diff --git a/stoc/source/simpleregistry/simpleregistry.cxx b/stoc/source/simpleregistry/simpleregistry.cxx
index e08aba3..4783625 100644
--- a/stoc/source/simpleregistry/simpleregistry.cxx
+++ b/stoc/source/simpleregistry/simpleregistry.cxx
@@ -20,7 +20,6 @@
#include "sal/config.h"
#include <cstdlib>
-#include <memory>
#include <vector>
#include "com/sun/star/lang/XServiceInfo.hpp"
@@ -53,8 +52,6 @@
#include "bootstrapservices.hxx"
-#include "textualservices.hxx"
-
extern rtl_StandardModuleCount g_moduleCount;
namespace {
@@ -113,7 +110,6 @@ private:
{ return stoc_bootstrap::simreg_getSupportedServiceNames(); }
Registry registry_;
- std::auto_ptr< stoc::simpleregistry::TextualServices > textual_;
};
class Key: public cppu::WeakImplHelper1< css::registry::XRegistryKey > {
@@ -1121,7 +1117,7 @@ rtl::OUString Key::getResolvedName(rtl::OUString const & aKeyName)
rtl::OUString SimpleRegistry::getURL() throw (css::uno::RuntimeException) {
osl::MutexGuard guard(mutex_);
- return textual_.get() == 0 ? registry_.getName() : textual_->getUri();
+ return registry_.getName();
}
void SimpleRegistry::open(
@@ -1129,33 +1125,13 @@ void SimpleRegistry::open(
throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
{
osl::MutexGuard guard(mutex_);
- if (textual_.get() != 0) {
- throw css::registry::InvalidRegistryException(
- (rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry.open(")) +
- rURL +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "): instance already open"))),
- static_cast< OWeakObject * >(this));
- }
RegError err = (rURL.isEmpty() && bCreate)
? REG_REGISTRY_NOT_EXISTS
: registry_.open(rURL, bReadOnly ? REG_READONLY : REG_READWRITE);
if (err == REG_REGISTRY_NOT_EXISTS && bCreate) {
err = registry_.create(rURL);
}
- switch (err) {
- case REG_NO_ERROR:
- break;
- case REG_INVALID_REGISTRY:
- if (bReadOnly && !bCreate) {
- textual_.reset(new stoc::simpleregistry::TextualServices(rURL));
- break;
- }
- // fall through
- default:
+ if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
(rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM(
@@ -1171,17 +1147,13 @@ void SimpleRegistry::open(
sal_Bool SimpleRegistry::isValid() throw (css::uno::RuntimeException) {
osl::MutexGuard guard(mutex_);
- return textual_.get() != 0 || registry_.isValid();
+ return registry_.isValid();
}
void SimpleRegistry::close()
throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
{
osl::MutexGuard guard(mutex_);
- if (textual_.get() != 0) {
- textual_.reset();
- return;
- }
RegError err = registry_.close();
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
@@ -1198,10 +1170,6 @@ void SimpleRegistry::destroy()
throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
{
osl::MutexGuard guard(mutex_);
- if (textual_.get() != 0) {
- textual_.reset();
- return;
- }
RegError err = registry_.destroy(rtl::OUString());
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
@@ -1218,9 +1186,6 @@ css::uno::Reference< css::registry::XRegistryKey > SimpleRegistry::getRootKey()
throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
{
osl::MutexGuard guard(mutex_);
- if (textual_.get() != 0) {
- return textual_->getRootKey();
- }
RegistryKey root;
RegError err = registry_.openRootKey(root);
if (err != REG_NO_ERROR) {
@@ -1239,7 +1204,7 @@ sal_Bool SimpleRegistry::isReadOnly()
throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
{
osl::MutexGuard guard(mutex_);
- return textual_.get() != 0 || registry_.isReadOnly();
+ return registry_.isReadOnly();
}
void SimpleRegistry::mergeKey(
@@ -1249,14 +1214,6 @@ void SimpleRegistry::mergeKey(
css::registry::MergeConflictException, css::uno::RuntimeException)
{
osl::MutexGuard guard(mutex_);
- if (textual_.get() != 0) {
- throw css::uno::RuntimeException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry.mergeKey: not"
- " supported for textual representation")),
- static_cast< cppu::OWeakObject * >(this));
- }
RegistryKey root;
RegError err = registry_.openRootKey(root);
if (err == REG_NO_ERROR) {
diff --git a/stoc/source/simpleregistry/textualservices.cxx b/stoc/source/simpleregistry/textualservices.cxx
deleted file mode 100644
index eae2f42..0000000
--- a/stoc/source/simpleregistry/textualservices.cxx
+++ /dev/null
@@ -1,1248 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "sal/config.h"
-
-#include <cstddef>
-#include <cstdlib>
-#include <map>
-#include <vector>
-
-#include "boost/noncopyable.hpp"
-#include "com/sun/star/container/NoSuchElementException.hpp"
-#include "com/sun/star/registry/InvalidRegistryException.hpp"
-#include "com/sun/star/registry/XRegistryKey.hpp"
-#include "com/sun/star/uno/Reference.hxx"
-#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"
-#include "salhelper/simplereferenceobject.hxx"
-#include "xmlreader/span.hxx"
-#include "xmlreader/xmlreader.hxx"
-
-#include "textualservices.hxx"
-
-namespace stoc { namespace simpleregistry {
-
-namespace {
-
-struct Implementation {
- rtl::OUString uri;
- rtl::OUString loader;
- rtl::OUString prefix;
- std::vector< rtl::OUString > services;
- std::vector< rtl::OUString > singletons;
-};
-
-typedef std::map< rtl::OUString, Implementation > Implementations;
-
-typedef std::map< rtl::OUString, std::vector< rtl::OUString > >
- ImplementationMap;
-
-}
-
-class Data: public salhelper::SimpleReferenceObject, private boost::noncopyable
-{
-public:
- Implementations implementations;
- ImplementationMap services;
- ImplementationMap singletons;
-};
-
-namespace {
-
-class Parser: private boost::noncopyable {
-public:
- Parser(rtl::OUString const & uri, rtl::Reference< Data > const & data);
-
-private:
- void handleComponent();
-
- void handleImplementation();
-
- void handleService();
-
- void handleSingleton();
-
- rtl::OUString getNameAttribute();
-
- xmlreader::XmlReader reader_;
- rtl::Reference< Data > data_;
- rtl::OUString attrUri_;
- rtl::OUString attrLoader_;
- rtl::OUString attrPrefix_;
- rtl::OUString attrImplementation_;
-};
-
-Parser::Parser(rtl::OUString const & uri, rtl::Reference< Data > const & data):
- reader_(uri), data_(data)
-{
- OSL_ASSERT(data.is());
- int ucNsId = reader_.registerNamespaceIri(
- xmlreader::Span(
- RTL_CONSTASCII_STRINGPARAM(
- "http://openoffice.org/2010/uno-components")));
- enum State {
- STATE_BEGIN, STATE_END, STATE_COMPONENTS, STATE_COMPONENT_INITIAL,
- STATE_COMPONENT, STATE_IMPLEMENTATION, STATE_SERVICE, STATE_SINGLETON };
- for (State state = STATE_BEGIN;;) {
- xmlreader::Span name;
- int nsId;
- xmlreader::XmlReader::Result res = reader_.nextItem(
- xmlreader::XmlReader::TEXT_NONE, &name, &nsId);
- switch (state) {
- case STATE_BEGIN:
- if (res == xmlreader::XmlReader::RESULT_BEGIN && nsId == ucNsId &&
- name.equals(RTL_CONSTASCII_STRINGPARAM("components")))
- {
- state = STATE_COMPONENTS;
- break;
- }
- throw css::registry::InvalidRegistryException(
- (reader_.getUrl() +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- ": unexpected item in outer level"))),
- css::uno::Reference< css::uno::XInterface >());
- case STATE_END:
- if (res == xmlreader::XmlReader::RESULT_DONE) {
- return;
- }
- throw css::registry::InvalidRegistryException(
- (reader_.getUrl() +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- ": unexpected item in outer level"))),
- css::uno::Reference< css::uno::XInterface >());
- case STATE_COMPONENTS:
- if (res == xmlreader::XmlReader::RESULT_END) {
- state = STATE_END;
- break;
- }
- if (res == xmlreader::XmlReader::RESULT_BEGIN && nsId == ucNsId &&
- name.equals(RTL_CONSTASCII_STRINGPARAM("component")))
- {
- handleComponent();
- state = STATE_COMPONENT_INITIAL;
- break;
- }
- throw css::registry::InvalidRegistryException(
- (reader_.getUrl() +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- ": unexpected item in <components>"))),
- css::uno::Reference< css::uno::XInterface >());
- case STATE_COMPONENT:
- if (res == xmlreader::XmlReader::RESULT_END) {
- state = STATE_COMPONENTS;
- break;
- }
- // fall through
- case STATE_COMPONENT_INITIAL:
- if (res == xmlreader::XmlReader::RESULT_BEGIN && nsId == ucNsId &&
- name.equals(RTL_CONSTASCII_STRINGPARAM("implementation")))
- {
- handleImplementation();
- state = STATE_IMPLEMENTATION;
- break;
- }
- throw css::registry::InvalidRegistryException(
- (reader_.getUrl() +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- ": unexpected item in <component>"))),
- css::uno::Reference< css::uno::XInterface >());
- case STATE_IMPLEMENTATION:
- if (res == xmlreader::XmlReader::RESULT_END) {
- state = STATE_COMPONENT;
- break;
- }
- if (res == xmlreader::XmlReader::RESULT_BEGIN && nsId == ucNsId &&
- name.equals(RTL_CONSTASCII_STRINGPARAM("service")))
- {
- handleService();
- state = STATE_SERVICE;
- break;
- }
- if (res == xmlreader::XmlReader::RESULT_BEGIN && nsId == ucNsId &&
- name.equals(RTL_CONSTASCII_STRINGPARAM("singleton")))
- {
- handleSingleton();
- state = STATE_SINGLETON;
- break;
- }
- throw css::registry::InvalidRegistryException(
- (reader_.getUrl() +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- ": unexpected item in <implementation>"))),
- css::uno::Reference< css::uno::XInterface >());
- case STATE_SERVICE:
- if (res == xmlreader::XmlReader::RESULT_END) {
- state = STATE_IMPLEMENTATION;
- break;
- }
- throw css::registry::InvalidRegistryException(
- (reader_.getUrl() +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- ": unexpected item in <service>"))),
- css::uno::Reference< css::uno::XInterface >());
- case STATE_SINGLETON:
- if (res == xmlreader::XmlReader::RESULT_END) {
- state = STATE_IMPLEMENTATION;
- break;
- }
- throw css::registry::InvalidRegistryException(
- (reader_.getUrl() +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- ": unexpected item in <service>"))),
- css::uno::Reference< css::uno::XInterface >());
- }
- }
-}
-
-void Parser::handleComponent() {
- attrUri_ = rtl::OUString();
- attrLoader_ = rtl::OUString();
- attrPrefix_ = rtl::OUString();
- xmlreader::Span name;
- int nsId;
- while (reader_.nextAttribute(&nsId, &name)) {
- if (nsId == xmlreader::XmlReader::NAMESPACE_NONE &&
- name.equals(RTL_CONSTASCII_STRINGPARAM("uri")))
- {
- if (!attrUri_.isEmpty()) {
- throw css::registry::InvalidRegistryException(
- (reader_.getUrl() +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- ": <component> has multiple \"uri\" attributes"))),
- css::uno::Reference< css::uno::XInterface >());
- }
- attrUri_ = reader_.getAttributeValue(false).convertFromUtf8();
- if (attrUri_.isEmpty()) {
- throw css::registry::InvalidRegistryException(
- (reader_.getUrl() +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- ": <component> has empty \"uri\" attribute"))),
- css::uno::Reference< css::uno::XInterface >());
- }
- } else if (nsId == xmlreader::XmlReader::NAMESPACE_NONE &&
- name.equals(RTL_CONSTASCII_STRINGPARAM("loader")))
- {
- if (!attrLoader_.isEmpty()) {
- throw css::registry::InvalidRegistryException(
- (reader_.getUrl() +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- ": <component> has multiple \"loader\""
- " attributes"))),
- css::uno::Reference< css::uno::XInterface >());
- }
- attrLoader_ = reader_.getAttributeValue(false).convertFromUtf8();
- if (attrLoader_.isEmpty()) {
- throw css::registry::InvalidRegistryException(
- (reader_.getUrl() +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- ": <component> has empty \"loader\" attribute"))),
- css::uno::Reference< css::uno::XInterface >());
- }
- } else if (nsId == xmlreader::XmlReader::NAMESPACE_NONE &&
- name.equals(RTL_CONSTASCII_STRINGPARAM("prefix")))
- {
- if (!attrPrefix_.isEmpty()) {
- throw css::registry::InvalidRegistryException(
- (reader_.getUrl() +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- ": <component> has multiple \"prefix\""
- " attributes"))),
- css::uno::Reference< css::uno::XInterface >());
- }
- attrPrefix_ = reader_.getAttributeValue(false).convertFromUtf8();
- if (attrPrefix_.isEmpty()) {
- throw css::registry::InvalidRegistryException(
- (reader_.getUrl() +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- ": <component> has empty \"prefix\" attribute"))),
- css::uno::Reference< css::uno::XInterface >());
- }
- } else {
- OSL_FAIL ("unexpected component attribute, expected 'uri' or 'loader' or 'prefix'");
- }
- }
- if (attrUri_.isEmpty()) {
- throw css::registry::InvalidRegistryException(
- (reader_.getUrl() +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- ": <component> is missing \"uri\" attribute"))),
- css::uno::Reference< css::uno::XInterface >());
- }
- if (attrLoader_.isEmpty()) {
- throw css::registry::InvalidRegistryException(
- (reader_.getUrl() +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- ": <component> is missing \"loader\" attribute"))),
- css::uno::Reference< css::uno::XInterface >());
- }
-#ifndef DISABLE_DYNLOADING
- try {
- attrUri_ = rtl::Uri::convertRelToAbs(reader_.getUrl(), attrUri_);
- } catch (const 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 >());
- }
-#endif
-}
-
-void Parser::handleImplementation() {
- attrImplementation_ = getNameAttribute();
- if (data_->implementations.find(attrImplementation_) !=
- data_->implementations.end())
- {
- throw css::registry::InvalidRegistryException(
- (reader_.getUrl() +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- ": duplicate <implementation name=\"")) +
- attrImplementation_ +
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\">"))),
- css::uno::Reference< css::uno::XInterface >());
- }
- data_->implementations[attrImplementation_].uri = attrUri_;
- data_->implementations[attrImplementation_].loader = attrLoader_;
- data_->implementations[attrImplementation_].prefix = attrPrefix_;
-}
-
-void Parser::handleService() {
- rtl::OUString name = getNameAttribute();
- data_->implementations[attrImplementation_].services.push_back(name);
- data_->services[name].push_back(attrImplementation_);
-}
-
-void Parser::handleSingleton() {
- rtl::OUString name = getNameAttribute();
- data_->implementations[attrImplementation_].singletons.push_back(name);
- data_->singletons[name].push_back(attrImplementation_);
-}
-
-rtl::OUString Parser::getNameAttribute() {
- rtl::OUString attrName;
- xmlreader::Span name;
- int nsId;
- while (reader_.nextAttribute(&nsId, &name)) {
- if (nsId == xmlreader::XmlReader::NAMESPACE_NONE &&
- name.equals(RTL_CONSTASCII_STRINGPARAM("name")))
- {
- if (!attrName.isEmpty()) {
- throw css::registry::InvalidRegistryException(
- (reader_.getUrl() +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- ": element has multiple \"name\" attributes"))),
- css::uno::Reference< css::uno::XInterface >());
- }
- attrName = reader_.getAttributeValue(false).convertFromUtf8();
- if (attrName.isEmpty()) {
- throw css::registry::InvalidRegistryException(
- (reader_.getUrl() +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- ": element has empty \"name\" attribute"))),
- css::uno::Reference< css::uno::XInterface >());
- }
- } else {
- throw css::registry::InvalidRegistryException(
- (reader_.getUrl() +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- ": expected element attribute \"name\""))),
- css::uno::Reference< css::uno::XInterface >());
- }
- }
- if (attrName.isEmpty()) {
- throw css::registry::InvalidRegistryException(
- (reader_.getUrl() +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- ": element is missing \"name\" attribute"))),
- css::uno::Reference< css::uno::XInterface >());
- }
- return attrName;
-}
-
-rtl::OUString pathToString(std::vector< rtl::OUString > const & path) {
- rtl::OUStringBuffer buf;
- for (std::vector< rtl::OUString >::const_iterator i(path.begin());
- i != path.end(); ++i)
- {
- buf.append(sal_Unicode('/'));
- buf.append(*i);
- }
- if (buf.getLength() == 0) {
- buf.append(sal_Unicode('/'));
- }
- return buf.makeStringAndClear();
-}
-
-class Key: public cppu::WeakImplHelper1< css::registry::XRegistryKey > {
-public:
- Key(
- rtl::Reference< Data > const & data,
- std::vector< rtl::OUString > const & path):
- data_(data), path_(path) { OSL_ASSERT(data.is());
- }
-
-private:
- /*
- /
- IMPLEMENTATIONS
- <implementation>
- UNO
- LOCATION utf-8
- ACTIVATOR utf-8
- PREFIX utf-8
- SERVICES
- <service>
- ...
- SINGLETONS
- <singleton> utf-16
- ...
- ...
- SERVICES
- <service> utf-8-list
- ...
- SINGLETONS
- <singleton> utf-16
- REGISTERED_BY utf-8-list
- ...
- */
- enum State {
- STATE_ROOT, STATE_IMPLEMENTATIONS, STATE_IMPLEMENTATION, STATE_UNO,
- STATE_LOCATION, STATE_ACTIVATOR, STATE_PREFIX, STATE_IMPLEMENTATION_SERVICES,
- STATE_IMPLEMENTATION_SERVICE, STATE_IMPLEMENTATION_SINGLETONS,
- STATE_IMPLEMENTATION_SINGLETON, STATE_SERVICES, STATE_SERVICE,
- STATE_SINGLETONS, STATE_SINGLETON, STATE_REGISTEREDBY };
-
- virtual rtl::OUString SAL_CALL getKeyName()
- throw (css::uno::RuntimeException);
-
- virtual sal_Bool SAL_CALL isReadOnly() throw (
- css::registry::InvalidRegistryException, css::uno::RuntimeException);
-
- virtual sal_Bool SAL_CALL isValid() throw(css::uno::RuntimeException);
-
- virtual css::registry::RegistryKeyType SAL_CALL getKeyType(
- rtl::OUString const & rKeyName)
- throw (
- css::registry::InvalidRegistryException,
- css::uno::RuntimeException);
-
- virtual css::registry::RegistryValueType SAL_CALL getValueType() throw(
- css::registry::InvalidRegistryException, css::uno::RuntimeException);
-
- virtual sal_Int32 SAL_CALL getLongValue() throw (
- css::registry::InvalidRegistryException,
- css::registry::InvalidValueException, css::uno::RuntimeException);
-
- virtual void SAL_CALL setLongValue(sal_Int32 value) throw (
- css::registry::InvalidRegistryException, css::uno::RuntimeException);
-
- virtual css::uno::Sequence< sal_Int32 > SAL_CALL getLongListValue() throw(
- css::registry::InvalidRegistryException,
- css::registry::InvalidValueException, css::uno::RuntimeException);
-
- virtual void SAL_CALL setLongListValue(
- com::sun::star::uno::Sequence< sal_Int32 > const & seqValue)
- throw (
- css::registry::InvalidRegistryException,
- css::uno::RuntimeException);
-
- virtual rtl::OUString SAL_CALL getAsciiValue() throw (
- css::registry::InvalidRegistryException,
- css::registry::InvalidValueException, css::uno::RuntimeException);
-
- virtual void SAL_CALL setAsciiValue(rtl::OUString const & value) throw (
- css::registry::InvalidRegistryException, css::uno::RuntimeException);
-
- virtual css::uno::Sequence< rtl::OUString > SAL_CALL getAsciiListValue()
- throw (
- css::registry::InvalidRegistryException,
- css::registry::InvalidValueException, css::uno::RuntimeException);
-
- virtual void SAL_CALL setAsciiListValue(
- css::uno::Sequence< rtl::OUString > const & seqValue)
- throw (
- css::registry::InvalidRegistryException,
- css::uno::RuntimeException);
-
- virtual rtl::OUString SAL_CALL getStringValue() throw(
- css::registry::InvalidRegistryException,
- css::registry::InvalidValueException, css::uno::RuntimeException);
-
- virtual void SAL_CALL setStringValue(rtl::OUString const & value) throw (
- css::registry::InvalidRegistryException, css::uno::RuntimeException);
-
- virtual css::uno::Sequence< rtl::OUString > SAL_CALL getStringListValue()
- throw (
- css::registry::InvalidRegistryException,
- css::registry::InvalidValueException, css::uno::RuntimeException);
-
- virtual void SAL_CALL setStringListValue(
- css::uno::Sequence< rtl::OUString > const & seqValue)
- throw (
- css::registry::InvalidRegistryException,
- css::uno::RuntimeException);
-
- virtual css::uno::Sequence< sal_Int8 > SAL_CALL getBinaryValue() throw (
- css::registry::InvalidRegistryException,
- css::registry::InvalidValueException, css::uno::RuntimeException);
-
- virtual void SAL_CALL setBinaryValue(
- css::uno::Sequence< sal_Int8 > const & value)
- throw (
- css::registry::InvalidRegistryException,
- css::uno::RuntimeException);
-
- virtual css::uno::Reference< css::registry::XRegistryKey > SAL_CALL openKey(
- rtl::OUString const & aKeyName)
- throw (
- css::registry::InvalidRegistryException,
- css::uno::RuntimeException);
-
- virtual css::uno::Reference< css::registry::XRegistryKey > SAL_CALL
- createKey(rtl::OUString const & aKeyName) throw (
- css::registry::InvalidRegistryException, css::uno::RuntimeException);
-
- virtual void SAL_CALL closeKey() throw (
- css::registry::InvalidRegistryException, css::uno::RuntimeException);
-
- virtual void SAL_CALL deleteKey(rtl::OUString const & rKeyName) throw (
- css::registry::InvalidRegistryException, css::uno::RuntimeException);
-
- virtual
- css::uno::Sequence< css::uno::Reference< css::registry::XRegistryKey > >
- SAL_CALL openKeys() throw (
- css::registry::InvalidRegistryException, css::uno::RuntimeException);
-
- virtual css::uno::Sequence< rtl::OUString > SAL_CALL getKeyNames() throw (
- css::registry::InvalidRegistryException, css::uno::RuntimeException);
-
- virtual sal_Bool SAL_CALL createLink(
- rtl::OUString const & aLinkName, rtl::OUString const & aLinkTarget)
- throw (
- css::registry::InvalidRegistryException,
- css::uno::RuntimeException);
-
- virtual void SAL_CALL deleteLink(rtl::OUString const & rLinkName) throw (
- css::registry::InvalidRegistryException, css::uno::RuntimeException);
-
- virtual rtl::OUString SAL_CALL getLinkTarget(
- rtl::OUString const & rLinkName)
- throw (
- css::registry::InvalidRegistryException,
- css::uno::RuntimeException);
-
- virtual rtl::OUString SAL_CALL getResolvedName(
- rtl::OUString const & aKeyName)
- throw (
- css::registry::InvalidRegistryException,
- css::uno::RuntimeException);
-
- bool find(
- rtl::OUString const & relative, std::vector< rtl::OUString > * path,
- State * state, css::registry::RegistryValueType * type) const;
-
- css::uno::Sequence< rtl::OUString > getChildren();
-
- rtl::Reference< Data > data_;
- std::vector< rtl::OUString > path_;
-};
-
-rtl::OUString Key::getKeyName() throw (css::uno::RuntimeException) {
- return pathToString(path_);
-}
-
-sal_Bool Key::isReadOnly()
- throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
-{
- return true;
-}
-
-sal_Bool Key::isValid() throw(css::uno::RuntimeException) {
- return true;
-}
-
-css::registry::RegistryKeyType Key::getKeyType(rtl::OUString const & rKeyName)
- throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
-{
- if (!find(rtl::OUString(), 0, 0, 0)) {
- throw css::registry::InvalidRegistryException(
- (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("unknown key ")) +
- rKeyName),
- static_cast< cppu::OWeakObject * >(this));
- }
- return css::registry::RegistryKeyType_KEY;
-}
-
-css::registry::RegistryValueType Key::getValueType()
- throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
-{
- css::registry::RegistryValueType type =
- css::registry::RegistryValueType_NOT_DEFINED;
- OSL_VERIFY(find(rtl::OUString(), 0, 0, &type));
- return type;
-}
-
-sal_Int32 Key::getLongValue() throw (
- css::registry::InvalidRegistryException,
- css::registry::InvalidValueException, css::uno::RuntimeException)
-{
- throw css::registry::InvalidValueException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry textual services key"
- " getLongValue not supported")),
- static_cast< OWeakObject * >(this));
-}
-
-void Key::setLongValue(sal_Int32)
- throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
-{
- throw css::registry::InvalidRegistryException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry textual services key"
- " setLongValue not supported")),
- static_cast< OWeakObject * >(this));
-}
-
-css::uno::Sequence< sal_Int32 > Key::getLongListValue() throw (
- css::registry::InvalidRegistryException,
- css::registry::InvalidValueException, css::uno::RuntimeException)
-{
- throw css::registry::InvalidValueException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry textual services key"
- " getLongListValue not supported")),
- static_cast< OWeakObject * >(this));
-}
-
-void Key::setLongListValue(css::uno::Sequence< sal_Int32 > const &)
- throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
-{
- throw css::registry::InvalidRegistryException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry textual services key"
- " setLongListValue not supported")),
- static_cast< OWeakObject * >(this));
-}
-
-rtl::OUString Key::getAsciiValue() throw (
- css::registry::InvalidRegistryException,
- css::registry::InvalidValueException, css::uno::RuntimeException)
-{
- State state = STATE_ROOT;
- OSL_VERIFY(find(rtl::OUString(), 0, &state, 0));
- switch (state) {
- case STATE_LOCATION:
- return data_->implementations[path_[1]].uri;
- case STATE_ACTIVATOR:
- return data_->implementations[path_[1]].loader;
- case STATE_PREFIX:
- return data_->implementations[path_[1]].prefix;
- default:
- throw css::registry::InvalidValueException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry textual services key"
- " getAsciiValue: wrong type")),
- static_cast< OWeakObject * >(this));
- }
-}
-
-void Key::setAsciiValue(rtl::OUString const &)
- throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
-{
- throw css::registry::InvalidRegistryException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry textual services key"
- " setAsciiValue not supported")),
- static_cast< OWeakObject * >(this));
-}
-
-css::uno::Sequence< rtl::OUString > Key::getAsciiListValue() throw (
- css::registry::InvalidRegistryException,
- css::registry::InvalidValueException, css::uno::RuntimeException)
-{
- State state = STATE_ROOT;
- OSL_VERIFY(find(rtl::OUString(), 0, &state, 0));
- std::vector< rtl::OUString > const * list;
- switch (state) {
- case STATE_SERVICE:
- list = &data_->services[path_[1]];
- break;
- case STATE_REGISTEREDBY:
- list = &data_->singletons[path_[1]];
- break;
- default:
- throw css::registry::InvalidValueException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry textual services key"
- " getAsciiListValue: wrong type")),
- static_cast< OWeakObject * >(this));
- }
- if (list->size() > SAL_MAX_INT32) {
- throw css::registry::InvalidValueException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry textual services key"
- " getAsciiListValue: too large")),
- static_cast< OWeakObject * >(this));
- }
- css::uno::Sequence< rtl::OUString > seq(
- static_cast< sal_Int32 >(list->size()));
- sal_Int32 i = 0;
- for (std::vector< rtl::OUString >::const_iterator j(list->begin());
- j != list->end(); ++j)
- {
- seq[i++] = *j;
- }
- return seq;
-}
-
-void Key::setAsciiListValue(css::uno::Sequence< rtl::OUString > const &)
- throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
-{
- throw css::registry::InvalidRegistryException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry textual services key"
- " setAsciiListValue not supported")),
- static_cast< OWeakObject * >(this));
-}
-
-rtl::OUString Key::getStringValue() throw (
- css::registry::InvalidRegistryException,
- css::registry::InvalidValueException, css::uno::RuntimeException)
-{
- State state = STATE_ROOT;
- OSL_VERIFY(find(rtl::OUString(), 0, &state, 0));
- switch (state) {
- case STATE_IMPLEMENTATION_SINGLETON:
- case STATE_SINGLETON:
- throw css::registry::InvalidRegistryException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry textual services key"
- " getStringValue: does not associate singletons with"
- " services")),
- static_cast< OWeakObject * >(this));
- default:
- break;
- }
- // default case extracted from switch to avoid erroneous compiler warnings
- // on Solaris:
- throw css::registry::InvalidValueException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry textual services key"
- " getStringValue: wrong type")),
- static_cast< OWeakObject * >(this));
-}
-
-void Key::setStringValue(rtl::OUString const &)
- throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
-{
- throw css::registry::InvalidRegistryException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry textual services key"
- " setStringValue not supported")),
- static_cast< OWeakObject * >(this));
-}
-
-css::uno::Sequence< rtl::OUString > Key::getStringListValue() throw (
- css::registry::InvalidRegistryException,
- css::registry::InvalidValueException, css::uno::RuntimeException)
-{
- throw css::registry::InvalidValueException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry textual services key"
- " getStringListValue not supported")),
- static_cast< OWeakObject * >(this));
-}
-
-void Key::setStringListValue(css::uno::Sequence< rtl::OUString > const &)
- throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
-{
- throw css::registry::InvalidRegistryException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry textual services key"
- " setStringListValue not supported")),
- static_cast< OWeakObject * >(this));
-}
-
-css::uno::Sequence< sal_Int8 > Key::getBinaryValue()
- throw (
- css::registry::InvalidRegistryException,
- css::registry::InvalidValueException, css::uno::RuntimeException)
-{
- throw css::registry::InvalidValueException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry textual services key"
- " getBinarValue not supported")),
- static_cast< OWeakObject * >(this));
-}
-
-void Key::setBinaryValue(css::uno::Sequence< sal_Int8 > const &)
- throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
-{
- throw css::registry::InvalidRegistryException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry textual services key"
- " setBinaryValue not supported")),
- static_cast< OWeakObject * >(this));
-}
-
-css::uno::Reference< css::registry::XRegistryKey > Key::openKey(
- rtl::OUString const & aKeyName)
- throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
-{
- std::vector< rtl::OUString > path;
- if (!find(aKeyName, &path, 0, 0)) {
- return css::uno::Reference< css::registry::XRegistryKey >();
- }
- return new Key(data_, path);
-}
-
-css::uno::Reference< css::registry::XRegistryKey > Key::createKey(
- rtl::OUString const &)
- throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
-{
- throw css::registry::InvalidRegistryException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry textual services key"
- " createKey not supported")),
- static_cast< OWeakObject * >(this));
-}
-
-void Key::closeKey()
- throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
-{}
-
-void Key::deleteKey(rtl::OUString const &)
- throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
-{
- throw css::registry::InvalidRegistryException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry textual services key"
- " deleteKey not supported")),
- static_cast< OWeakObject * >(this));
-}
-
-css::uno::Sequence< css::uno::Reference< css::registry::XRegistryKey > >
-Key::openKeys()
- throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
-{
- css::uno::Sequence< rtl::OUString > names(getChildren());
- css::uno::Sequence< css::uno::Reference< css::registry::XRegistryKey > >
- keys(names.getLength());
- for (sal_Int32 i = 0; i < keys.getLength(); ++i) {
- keys[i] = openKey(names[i]);
- OSL_ASSERT(keys[i].is());
- }
- return keys;
-}
-
-css::uno::Sequence< rtl::OUString > Key::getKeyNames()
- throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
-{
- css::uno::Sequence< rtl::OUString > names(getChildren());
- rtl::OUString prefix(pathToString(path_));
- prefix += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
- for (sal_Int32 i = 0; i < names.getLength(); ++i) {
- names[i] = prefix + names[i];
- }
- return names;
-}
-
-sal_Bool Key::createLink(rtl::OUString const &, rtl::OUString const &)
- throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
-{
- throw css::registry::InvalidRegistryException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry textual services key"
- " createLink not supported")),
- static_cast< OWeakObject * >(this));
-}
-
-void Key::deleteLink(rtl::OUString const &)
- throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
-{
- throw css::registry::InvalidRegistryException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry textual services key"
- " deleteLink not supported")),
- static_cast< OWeakObject * >(this));
-}
-
-rtl::OUString Key::getLinkTarget(rtl::OUString const &)
- throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
-{
- throw css::registry::InvalidRegistryException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry textual services key"
- " getLinkTarget not supported")),
- static_cast< OWeakObject * >(this));
-}
-
-rtl::OUString Key::getResolvedName(rtl::OUString const & aKeyName)
- throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
-{
- std::vector< rtl::OUString > path;
- find(aKeyName, &path, 0, 0);
- return pathToString(path);
-}
-
-bool Key::find(
- rtl::OUString const & relative, std::vector< rtl::OUString > * path,
- State * state, css::registry::RegistryValueType * type) const
-{
- std::vector< rtl::OUString > p(path_);
- sal_Int32 i = 0;
- do {
- rtl::OUString seg(relative.getToken(0, '/', i));
- if (!seg.isEmpty()) {
- p.push_back(seg);
- }
- } while (i >= 0);
- if (path != 0) {
- *path = p;
- }
- std::size_t const MAX_TRANSITIONS = 5;
- struct StateInfo {
- css::registry::RegistryValueType type;
- std::size_t count;
- struct { char const * segment; State state; }
- transitions[MAX_TRANSITIONS];
- };
- static StateInfo const info[] = {
- // STATE_ROOT:
- { css::registry::RegistryValueType_NOT_DEFINED, 3,
- { { "IMPLEMENTATIONS", STATE_IMPLEMENTATIONS },
- { "SERVICES", STATE_SERVICES },
- { "SINGLETONS", STATE_SINGLETONS } } },
- // STATE_IMPLEMENTATIONS:
- { css::registry::RegistryValueType_NOT_DEFINED, 1,
- { { 0, STATE_IMPLEMENTATION } } },
- // STATE_IMPLEMENTATION:
- { css::registry::RegistryValueType_NOT_DEFINED, 1,
- { { "UNO", STATE_UNO } } },
- // STATE_UNO:
- { css::registry::RegistryValueType_NOT_DEFINED, 5,
- { { "LOCATION", STATE_LOCATION },
- { "ACTIVATOR", STATE_ACTIVATOR },
- { "PREFIX", STATE_PREFIX },
- { "SERVICES", STATE_IMPLEMENTATION_SERVICES },
- { "SINGLETONS", STATE_IMPLEMENTATION_SINGLETONS } } },
- // STATE_LOCATION:
- { css::registry::RegistryValueType_ASCII, 0, {} },
- // STATE_ACTIVATOR:
- { css::registry::RegistryValueType_ASCII, 0, {} },
- // STATE_PREFIX:
- { css::registry::RegistryValueType_ASCII, 0, {} },
- // STATE_IMPLEMENTATION_SERVICES:
- { css::registry::RegistryValueType_NOT_DEFINED, 1,
- { { 0, STATE_IMPLEMENTATION_SERVICE } } },
- // STATE_IMPLEMENTATION_SERVICE:
- { css::registry::RegistryValueType_NOT_DEFINED, 0, {} },
- // STATE_IMPLEMENTATION_SINGLETONS:
- { css::registry::RegistryValueType_NOT_DEFINED, 1,
- { { 0, STATE_IMPLEMENTATION_SINGLETON } } },
- // STATE_IMPLEMENTATION_SINGLETON:
- { css::registry::RegistryValueType_STRING, 0, {} },
- // STATE_SERVICES:
- { css::registry::RegistryValueType_NOT_DEFINED, 1,
- { { 0, STATE_SERVICE } } },
- // STATE_SERVICE:
- { css::registry::RegistryValueType_ASCIILIST, 0, {} },
- // STATE_SINGLETONS:
- { css::registry::RegistryValueType_NOT_DEFINED, 1,
- { { 0, STATE_SINGLETON } } },
- // STATE_SINGLETON:
- { css::registry::RegistryValueType_STRING, 1,
- { { "REGISTERED_BY", STATE_REGISTEREDBY } } },
- // STATE_REGISTEREDBY:
- { css::registry::RegistryValueType_ASCIILIST, 0, {} } };
- State s = STATE_ROOT;
- for (std::vector< rtl::OUString >::iterator j(p.begin()); j != p.end(); ++j)
- {
- bool found = false;
- for (std::size_t k = 0; k < info[s].count; ++k) {
- if (info[s].transitions[k].segment == 0) {
- switch (info[s].transitions[k].state) {
- case STATE_IMPLEMENTATION:
- found = data_->implementations.find(*j) !=
- data_->implementations.end();
- break;
- case STATE_IMPLEMENTATION_SERVICE:
- case STATE_IMPLEMENTATION_SINGLETON:
- found = true; //TODO
- break;
- case STATE_SERVICE:
- found = data_->services.find(*j) != data_->services.end();
- break;
- case STATE_SINGLETON:
- found = data_->singletons.find(*j) !=
- data_->singletons.end();
- break;
- default:
- std::abort(); // this cannot happen
- }
- } else {
- found = j->equalsAscii(info[s].transitions[k].segment);
- }
- if (found) {
- s = info[s].transitions[k].state;
- break;
- }
- }
- if (!found) {
- return false;
- }
- }
- if (state != 0) {
- *state = s;
- }
- if (type != 0) {
- *type = info[s].type;
- }
- return true;
-}
-
-css::uno::Sequence< rtl::OUString > Key::getChildren() {
- State state = STATE_ROOT;
- OSL_VERIFY(find(rtl::OUString(), 0, &state, 0));
- switch (state) {
- default:
- std::abort(); // this cannot happen
- // pseudo-fall-through to avoid warnings on MSC
- case STATE_ROOT:
- {
- css::uno::Sequence< rtl::OUString > seq(3);
- seq[0] = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("IMPLEMENTATIONS"));
- seq[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SERVICES"));
- seq[2] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SINGLETONS"));
- return seq;
- }
- case STATE_IMPLEMENTATIONS:
- {
- if (data_->implementations.size() > SAL_MAX_INT32) {
- throw css::registry::InvalidValueException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry textual"
- " services key openKeys: too large")),
- static_cast< OWeakObject * >(this));
- }
- css::uno::Sequence< rtl::OUString > seq(
- static_cast< sal_Int32 >(data_->implementations.size()));
- sal_Int32 i = 0;
- for (Implementations::iterator j(data_->implementations.begin());
- j != data_->implementations.end(); ++j)
- {
- seq[i++] = j->first;
- }
- return seq;
- }
- case STATE_UNO:
- {
- css::uno::Sequence< rtl::OUString > seq(5);
- seq[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LOCATION"));
- seq[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ACTIVATOR"));
- seq[2] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PREFIX"));
- seq[3] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SERVICES"));
- seq[4] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SINGLETONS"));
- return seq;
- }
- case STATE_LOCATION:
- case STATE_ACTIVATOR:
- case STATE_PREFIX:
- case STATE_IMPLEMENTATION_SERVICE:
- case STATE_IMPLEMENTATION_SINGLETON:
- case STATE_SERVICE:
- case STATE_REGISTEREDBY:
- return css::uno::Sequence< rtl::OUString >();
- case STATE_IMPLEMENTATION_SERVICES:
- {
- if (data_->implementations[path_[1]].services.size() >
- SAL_MAX_INT32)
- {
- throw css::registry::InvalidValueException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry textual"
- " services key openKeys: too large")),
- static_cast< OWeakObject * >(this));
- }
- css::uno::Sequence< rtl::OUString > seq(
- static_cast< sal_Int32 >(
- data_->implementations[path_[1]].services.size()));
- sal_Int32 i = 0;
- for (std::vector< rtl::OUString >::iterator j(
- data_->implementations[path_[1]].services.begin());
- j != data_->implementations[path_[1]].services.end(); ++j)
- {
- seq[i++] = *j;
- }
- return seq;
- }
- case STATE_IMPLEMENTATION_SINGLETONS:
- {
- if (data_->implementations[path_[1]].singletons.size() >
- SAL_MAX_INT32)
- {
- throw css::registry::InvalidValueException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry textual"
- " services key openKeys: too large")),
- static_cast< OWeakObject * >(this));
- }
- css::uno::Sequence< rtl::OUString > seq(
- static_cast< sal_Int32 >(
- data_->implementations[path_[1]].singletons.size()));
- sal_Int32 i = 0;
- for (std::vector< rtl::OUString >::iterator j(
- data_->implementations[path_[1]].singletons.begin());
- j != data_->implementations[path_[1]].singletons.end(); ++j)
- {
- seq[i++] = *j;
- }
- return seq;
- }
- case STATE_SERVICES:
- {
- if (data_->services.size() > SAL_MAX_INT32) {
- throw css::registry::InvalidValueException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry textual"
- " services key openKeys: too large")),
- static_cast< OWeakObject * >(this));
- }
- css::uno::Sequence< rtl::OUString > seq(
- static_cast< sal_Int32 >(data_->services.size()));
- sal_Int32 i = 0;
- for (ImplementationMap::iterator j(data_->services.begin());
- j != data_->services.end(); ++j)
- {
- seq[i++] = j->first;
- }
- return seq;
- }
- case STATE_SINGLETONS:
- {
- if (data_->singletons.size() > SAL_MAX_INT32) {
- throw css::registry::InvalidValueException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry textual"
- " services key openKeys: too large")),
- static_cast< OWeakObject * >(this));
- }
- css::uno::Sequence< rtl::OUString > seq(
- static_cast< sal_Int32 >(data_->singletons.size()));
- sal_Int32 i = 0;
- for (ImplementationMap::iterator j(data_->singletons.begin());
- j != data_->singletons.end(); ++j)
- {
- seq[i++] = j->first;
- }
- return seq;
- }
- case STATE_SINGLETON:
- {
- css::uno::Sequence< rtl::OUString > seq(1);
- seq[0] = rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("REGISTERED_BY"));
- return seq;
- }
- }
-}
-
-}
-
-TextualServices::TextualServices(rtl::OUString const & uri):
- uri_(uri), data_(new Data)
-{
- try {
- Parser(uri, data_);
- } catch (css::container::NoSuchElementException &) {
- throw css::registry::InvalidRegistryException(
- (uri +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(": no such file"))),
- css::uno::Reference< css::uno::XInterface >());
- }
-}
-
-TextualServices::~TextualServices() {}
-
-css::uno::Reference< css::registry::XRegistryKey > TextualServices::getRootKey()
-{
- return new Key(data_, std::vector< rtl::OUString >());
-}
-
-} }
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/stoc/source/simpleregistry/textualservices.hxx b/stoc/source/simpleregistry/textualservices.hxx
deleted file mode 100644
index 4e41735..0000000
--- a/stoc/source/simpleregistry/textualservices.hxx
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_STOC_SOURCE_SIMPLEREGISTRY_TEXTUALSERVICES_HXX
-#define INCLUDED_STOC_SOURCE_SIMPLEREGISTRY_TEXTUALSERVICES_HXX
-
-#include "sal/config.h"
-
-#include <memory>
-
-#include "boost/noncopyable.hpp"
-#include "com/sun/star/uno/Reference.hxx"
-#include "rtl/ref.hxx"
-#include "rtl/ustring.hxx"
-
-namespace com { namespace sun { namespace star { namespace registry {
- class XRegistryKey;
-} } } }
-
-namespace stoc { namespace simpleregistry {
-
-class Data;
-
-class TextualServices: private boost::noncopyable {
-public:
- explicit TextualServices(rtl::OUString const & uri);
- // throws com::sun::star::registry::InvalidRegistryException
-
- virtual ~TextualServices();
-
- inline rtl::OUString getUri() { return uri_; }
-
- com::sun::star::uno::Reference< com::sun::star::registry::XRegistryKey >
- getRootKey();
-
-private:
- rtl::OUString uri_;
- rtl::Reference< Data > data_;
-};
-
-} }
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit f3051abde54e7a0bc3e2d184e31ac011e96d3e6b
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Dec 21 13:48:07 2012 +0100
API CHANGE: Remove deprecated cppuhelper/servicefactory.hxx and Java equiv.
... com.sun.star.comp.helper.RegistryServiceFactory (juh.jar). Superseded by
default bootstrap mechanisms.
An aborting stub for non-inline cppu::createRegistryServiceFactory is left in
cppuhelper/srouce/compat.cxx to avoid having to incompatibly change
cppuhelper/soruce/gcc3.map.
Change-Id: I590e50b8f57e86d4bb3e00d157c9e5907c02f267
diff --git a/cppuhelper/Package_inc.mk b/cppuhelper/Package_inc.mk
index fb06887..af5a823 100644
--- a/cppuhelper/Package_inc.mk
+++ b/cppuhelper/Package_inc.mk
@@ -74,7 +74,6 @@ $(eval $(call gb_Package_add_file,cppuhelper_inc,inc/cppuhelper/propshlp.hxx,cpp
$(eval $(call gb_Package_add_file,cppuhelper_inc,inc/cppuhelper/proptypehlp.h,cppuhelper/proptypehlp.h))
$(eval $(call gb_Package_add_file,cppuhelper_inc,inc/cppuhelper/proptypehlp.hxx,cppuhelper/proptypehlp.hxx))
$(eval $(call gb_Package_add_file,cppuhelper_inc,inc/cppuhelper/queryinterface.hxx,cppuhelper/queryinterface.hxx))
-$(eval $(call gb_Package_add_file,cppuhelper_inc,inc/cppuhelper/servicefactory.hxx,cppuhelper/servicefactory.hxx))
$(eval $(call gb_Package_add_file,cppuhelper_inc,inc/cppuhelper/shlib.hxx,cppuhelper/shlib.hxx))
$(eval $(call gb_Package_add_file,cppuhelper_inc,inc/cppuhelper/supportsservice.hxx,cppuhelper/supportsservice.hxx))
$(eval $(call gb_Package_add_file,cppuhelper_inc,inc/cppuhelper/typeprovider.hxx,cppuhelper/typeprovider.hxx))
diff --git a/cppuhelper/inc/cppuhelper/servicefactory.hxx b/cppuhelper/inc/cppuhelper/servicefactory.hxx
deleted file mode 100644
index c52c424..0000000
--- a/cppuhelper/inc/cppuhelper/servicefactory.hxx
+++ /dev/null
@@ -1,116 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef _CPPUHELPER_SERVICEFACTORY_HXX_
-#define _CPPUHELPER_SERVICEFACTORY_HXX_
-
-#include <rtl/ustring.hxx>
-
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-#include "cppuhelperdllapi.h"
-
-
-namespace cppu
-{
-
-/** Deprecated. Use cppuhelper/bootstrap.hxx functions instead.
-
- This bootstraps an initial service factory working on a registry. If the first or both
- parameters contain a value then the service factory is initialized with a simple registry
- or a nested registry. Otherwise the service factory must be initialized later with a valid
- registry.
-
- @param rWriteRegistryFile
- file name of the simple registry or the first registry file of
- the nested registry which will be opened with read/write rights. This
- file will be created if necessary.
- @param rReadRegistryFile
- file name of the second registry file of the nested registry
- which will be opened with readonly rights.
- @param bReadOnly
- flag which specify that the first registry file will be opened with
- readonly rights. Default is FALSE. If this flag is used the registry
- will not be created if not exist.
- @param rBootstrapPath
- specifies a path where the bootstrap components could be find. If this
- parameter is an empty string the compoents will be searched in the system
- path.
- @deprecated
-*/
-CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
-SAL_CALL createRegistryServiceFactory(
- const ::rtl::OUString & rWriteRegistryFile,
- const ::rtl::OUString & rReadRegistryFile,
- sal_Bool bReadOnly = sal_False,
- const ::rtl::OUString & rBootstrapPath = ::rtl::OUString() )
- SAL_THROW( (::com::sun::star::uno::Exception) );
-
-
-/** Deprecated. Use cppuhelper/bootstrap.hxx functions instead.
-
- This bootstraps an initial service factory working on a registry file.
-
- @param rRegistryFile
- file name of the registry to use/ create; if this is an empty
- string, the default registry is used instead
- @param bReadOnly
- flag which specify that the registry file will be opened with
- readonly rights. Default is FALSE. If this flag is used the registry
- will not be created if not exist.
- @param rBootstrapPath
- specifies a path where the bootstrap components could be find. If this
- parameter is an empty string the compoents will be searched in the system
- path.
- @deprecated
-*/
-inline ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
-SAL_CALL createRegistryServiceFactory(
- const ::rtl::OUString & rRegistryFile,
- sal_Bool bReadOnly = sal_False,
- const ::rtl::OUString & rBootstrapPath = ::rtl::OUString() )
- SAL_THROW( (::com::sun::star::uno::Exception) )
-{
- return ::cppu::createRegistryServiceFactory(
- rRegistryFile, ::rtl::OUString(), bReadOnly, rBootstrapPath );
-}
-
-/** Deprecated. Use cppuhelper/bootstrap.hxx functions instead.
-
- This bootstraps a service factory without initialize a registry.
-
- @param rBootstrapPath
- specifies a path where the bootstrap components could be find. If this
- parameter is an empty string the compoents will be searched in the system
- path.
- @deprecated
-*/
-inline ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
-SAL_CALL createServiceFactory(
- const ::rtl::OUString & rBootstrapPath = ::rtl::OUString() )
- SAL_THROW( (::com::sun::star::uno::Exception) )
-{
- return ::cppu::createRegistryServiceFactory(
- ::rtl::OUString(), ::rtl::OUString(), sal_False, rBootstrapPath );
-}
-
-} // end namespace cppu
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cppuhelper/source/compat.cxx b/cppuhelper/source/compat.cxx
index 7013954..a90d7e5 100644
--- a/cppuhelper/source/compat.cxx
+++ b/cppuhelper/source/compat.cxx
@@ -49,6 +49,14 @@ SAL_CALL createNestedRegistry(rtl::OUString const &) SAL_THROW(()) {
for (;;) { std::abort(); } // avoid "must return a value" warnings
}
+SAL_DLLPUBLIC_EXPORT css::uno::Reference< css::lang::XMultiServiceFactory >
+SAL_CALL createRegistryServiceFactory(
+ rtl::OUString const &, rtl::OUString const &, sal_Bool,
+ rtl::OUString const &) SAL_THROW((css::uno::Exception))
+{
+ for (;;) { std::abort(); } // avoid "must return a value" warnings
+}
+
SAL_DLLPUBLIC_EXPORT css::uno::Reference< css::registry::XSimpleRegistry >
SAL_CALL createSimpleRegistry(rtl::OUString const &) SAL_THROW(()) {
for (;;) { std::abort(); } // avoid "must return a value" warnings
diff --git a/cppuhelper/source/servicefactory.cxx b/cppuhelper/source/servicefactory.cxx
index d09bc20..ac7e93f 100644
--- a/cppuhelper/source/servicefactory.cxx
+++ b/cppuhelper/source/servicefactory.cxx
@@ -30,7 +30,6 @@
#include "cppuhelper/shlib.hxx"
#include "cppuhelper/factory.hxx"
#include "cppuhelper/component_context.hxx"
-#include "cppuhelper/servicefactory.hxx"
#include "cppuhelper/bootstrap.hxx"
#include "com/sun/star/uno/DeploymentException.hpp"
@@ -87,72 +86,6 @@ static Reference< XInterface > SAL_CALL createInstance(
Reference< XInterface >() );
}
-namespace {
-
-Reference< registry::XSimpleRegistry > createSimpleRegistry(
- OUString const & rBootstrapPath )
- SAL_THROW(())
-{
- try
- {
- return Reference< registry::XSimpleRegistry >(
- createInstance(
- loadSharedLibComponentFactory(
- OUSTR("bootstrap.uno" SAL_DLLEXTENSION),
- rBootstrapPath.isEmpty()
- ? get_this_libpath() : rBootstrapPath,
- OUSTR("com.sun.star.comp.stoc.SimpleRegistry"),
- Reference< lang::XMultiServiceFactory >(),
- Reference< registry::XRegistryKey >() ) ),
- UNO_QUERY );
- }
- catch (Exception & exc)
- {
-#if OSL_DEBUG_LEVEL > 0
- OString cstr_msg(
- OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( !"### exception occurred:", cstr_msg.getStr() );
-#else
- (void) exc; // avoid warning about unused variable
-#endif
- }
-
- return Reference< registry::XSimpleRegistry >();
-}
-
-Reference< registry::XSimpleRegistry > createNestedRegistry(
- OUString const & rBootstrapPath )
- SAL_THROW(())
-{
- try
- {
- return Reference< registry::XSimpleRegistry >(
- createInstance(
- loadSharedLibComponentFactory(
- OUSTR("bootstrap.uno" SAL_DLLEXTENSION),
- rBootstrapPath.isEmpty()
- ? get_this_libpath() : rBootstrapPath,
- OUSTR("com.sun.star.comp.stoc.NestedRegistry"),
- Reference< lang::XMultiServiceFactory >(),
- Reference< registry::XRegistryKey >() ) ),
- UNO_QUERY );
- }
- catch (Exception & exc)
- {
-#if OSL_DEBUG_LEVEL > 0
- OString cstr_msg(
- OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( !"### exception occurred:", cstr_msg.getStr() );
-#else
- (void) exc; // avoid warning about unused variable
-#endif
- }
-
- return Reference< registry::XSimpleRegistry >();
-}
-
-}
-
/** bootstrap variables:
UNO_AC=<mode> [mandatory]
@@ -398,278 +331,6 @@ Reference< lang::XMultiComponentFactory > bootstrapInitialSF(
return xMgr;
}
-// returns context with UNinitialized smgr
-Reference< XComponentContext > bootstrapInitialContext(
- Reference< lang::XMultiComponentFactory > const & xSF,
- Reference< registry::XSimpleRegistry > const & types_xRegistry,
- Reference< registry::XSimpleRegistry > const & services_xRegistry,
- OUString const & rBootstrapPath, Bootstrap const & bootstrap )
- SAL_THROW( (Exception) )
-{
- Reference< lang::XInitialization > xSFInit( xSF, UNO_QUERY );
- if (! xSFInit.is())
- {
- throw RuntimeException(
- OUSTR("servicemanager does not support XInitialization!"),
- Reference< XInterface >() );
- }
-
- // basic context values
- ContextEntry_Init entry;
- ::std::vector< ContextEntry_Init > context_values;
- context_values.reserve( 14 );
-
- // macro expander singleton for loader
- entry.bLateInitService = true;
- entry.name = OUSTR("/singletons/com.sun.star.util.theMacroExpander");
- entry.value
- <<= cppuhelper::detail::create_bootstrap_macro_expander_factory();
- context_values.push_back( entry );
-
- // tdmgr singleton
- entry.bLateInitService = true;
- entry.name =
- OUSTR("/singletons/com.sun.star.reflection.theTypeDescriptionManager");
- entry.value <<= OUSTR("com.sun.star.comp.stoc.TypeDescriptionManager");
- context_values.push_back( entry );
-
- // read out singleton infos from registry
- if (services_xRegistry.is())
- {
- Reference< registry::XRegistryKey > xKey(
- services_xRegistry->getRootKey() );
- if (xKey.is())
- {
- xKey = xKey->openKey( OUSTR("/SINGLETONS") );
- if (xKey.is())
- {
- entry.bLateInitService = true;
-
- Sequence< Reference< registry::XRegistryKey > > keys(
- xKey->openKeys() );
- Reference< registry::XRegistryKey > const * pKeys =
- keys.getConstArray();
- for ( sal_Int32 nPos = keys.getLength(); nPos--; )
- {
- css::uno::Sequence< rtl::OUString > impls(
- css::uno::Reference< css::registry::XRegistryKey >(
- pKeys[nPos]->openKey(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "REGISTERED_BY"))),
- css::uno::UNO_SET_THROW)->getAsciiListValue());
- switch (impls.getLength()) {
- case 0:
- throw css::uno::DeploymentException(
- (pKeys[nPos]->getKeyName() +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "/REGISTERED_BY is empty"))),
- css::uno::Reference< css::uno::XInterface >());
- case 1:
- break;
- default:
- OSL_TRACE(
- ("arbitrarily chosing \"%s\" among multiple"
- " implementations for \"%s\""),
- rtl::OUStringToOString(
- impls[0], RTL_TEXTENCODING_UTF8).getStr(),
- rtl::OUStringToOString(
- pKeys[nPos]->getKeyName(),
- RTL_TEXTENCODING_UTF8).getStr());
- break;
- }
- context_values.push_back(
- ContextEntry_Init(
- (rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("/singletons/")) +
- pKeys[nPos]->getKeyName().copy(
- RTL_CONSTASCII_LENGTH("/SINGLETONS/"))),
- css::uno::makeAny(impls[0]),
- true));
- }
- }
- }
- }
-
- // ac, policy:
- add_access_control_entries( &context_values, bootstrap );
-
- // smgr singleton
- entry.bLateInitService = false;
- entry.name = OUSTR("/singletons/com.sun.star.lang.theServiceManager");
- entry.value <<= xSF;
- context_values.push_back( entry );
-
- Reference< XComponentContext > xContext(
- createComponentContext(
- &context_values[ 0 ], context_values.size(),
- Reference< XComponentContext >() ) );
- // set default context
- Reference< beans::XPropertySet > xProps( xSF, UNO_QUERY );
- OSL_ASSERT( xProps.is() );
- if (xProps.is())
- {
- xProps->setPropertyValue(
- OUSTR("DefaultContext"), makeAny( xContext ) );
- }
-
- Reference< container::XHierarchicalNameAccess > xTDMgr;
-
- // get tdmgr singleton
- if (xContext->getValueByName(
- OUSTR("/singletons/"
- "com.sun.star.reflection.theTypeDescriptionManager") )
- >>= xTDMgr)
- {
- if (types_xRegistry.is()) // insert rdb provider?
- {
- // add registry td provider factory to smgr and instance to tdmgr
- Reference< lang::XSingleComponentFactory > xFac(
- loadSharedLibComponentFactory(
- OUSTR("bootstrap.uno" SAL_DLLEXTENSION),
- rBootstrapPath.isEmpty()
- ? get_this_libpath() : rBootstrapPath,
- OUSTR("com.sun.star.comp.stoc.RegistryTypeDescriptionProvider"),
- Reference< lang::XMultiServiceFactory >( xSF, UNO_QUERY ),
- Reference< registry::XRegistryKey >() ), UNO_QUERY );
- OSL_ASSERT( xFac.is() );
-
- // smgr
- Reference< container::XSet > xSet( xSF, UNO_QUERY );
- xSet->insert( makeAny( xFac ) );
- OSL_ENSURE(
- xSet->has( makeAny( xFac ) ),
- "### failed registering registry td provider at smgr!" );
- // tdmgr
- xSet.set( xTDMgr, UNO_QUERY );
- OSL_ASSERT( xSet.is() );
- Any types_RDB( makeAny( types_xRegistry ) );
- Any rdbtdp( makeAny( xFac->createInstanceWithArgumentsAndContext(
- Sequence< Any >( &types_RDB, 1 ), xContext ) ) );
- xSet->insert( rdbtdp );
- OSL_ENSURE(
- xSet->has( rdbtdp ),
- "### failed inserting registry td provider to tdmgr!" );
- }
- // install callback
- installTypeDescriptionManager( xTDMgr );
- }
-
- return xContext;
-}
-
-static Reference< lang::XMultiComponentFactory > createImplServiceFactory(
- const OUString & rWriteRegistry,
- const OUString & rReadRegistry,
- sal_Bool bReadOnly,
- const OUString & rBootstrapPath )
- SAL_THROW( (Exception) )
-{
- Reference< lang::XMultiComponentFactory > xSF(
- bootstrapInitialSF( rBootstrapPath ) );
-
- Reference< registry::XSimpleRegistry > xRegistry;
-
- // open a registry
- sal_Bool bRegistryShouldBeValid = sal_False;
- if (!rWriteRegistry.isEmpty() && rReadRegistry.isEmpty())
- {
- bRegistryShouldBeValid = sal_True;
- xRegistry.set( createSimpleRegistry( rBootstrapPath ) );
- if (xRegistry.is())
- {
- if (bReadOnly)
- {
- xRegistry->open( rWriteRegistry, sal_True, sal_False );
- }
- else
- {
- xRegistry->open( rWriteRegistry, sal_False, sal_True );
- }
- }
- }
- else if (!rWriteRegistry.isEmpty() && !rReadRegistry.isEmpty())
- {
- // default registry
- bRegistryShouldBeValid = sal_True;
- xRegistry.set( createNestedRegistry( rBootstrapPath ) );
-
- Reference< registry::XSimpleRegistry > xWriteReg(
- createSimpleRegistry( rBootstrapPath ) );
- if (xWriteReg.is())
- {
- if (bReadOnly)
- {
- try
- {
- xWriteReg->open( rWriteRegistry, sal_True, sal_False );
- }
- catch (registry::InvalidRegistryException &)
- {
- }
-
- if (! xWriteReg->isValid())
- {
- throw RuntimeException(
- OUSTR("specified first registry "
- "could not be open readonly!"),
- Reference< XInterface >() );
- }
- }
- else
- {
- xWriteReg->open( rWriteRegistry, sal_False, sal_True );
- }
- }
-
- Reference< registry::XSimpleRegistry > xReadReg(
- createSimpleRegistry( rBootstrapPath ) );
- if (xReadReg.is())
- {
- xReadReg->open( rReadRegistry, sal_True, sal_False );
- }
-
- Reference< lang::XInitialization > xInit( xRegistry, UNO_QUERY );
- Sequence< Any > aInitSeq( 2 );
- aInitSeq[ 0 ] <<= xWriteReg;
- aInitSeq[ 1 ] <<= xReadReg;
- xInit->initialize( aInitSeq );
- }
-
- if (bRegistryShouldBeValid && (!xRegistry.is() || !xRegistry->isValid()))
- {
- throw RuntimeException(
- OUSTR("specified registry could not be initialized"),
- Reference< XInterface >() );
- }
-
- Bootstrap bootstrap;
- Reference< XComponentContext > xContext(
- bootstrapInitialContext(
- xSF, xRegistry, xRegistry, rBootstrapPath, bootstrap ) );
-
- // initialize sf
- Reference< lang::XInitialization > xInit( xSF, UNO_QUERY );
- OSL_ASSERT( xInit.is() );
- Sequence< Any > aSFInit( 1 );
- aSFInit[ 0 ] <<= xRegistry;
- xInit->initialize( aSFInit );
-
- return xSF;
-}
-
-Reference< lang::XMultiServiceFactory > SAL_CALL createRegistryServiceFactory(
- const OUString & rWriteRegistry,
- const OUString & rReadRegistry,
- sal_Bool bReadOnly,
- const OUString & rBootstrapPath )
- SAL_THROW( (Exception) )
-{
- return Reference< lang::XMultiServiceFactory >( createImplServiceFactory(
- rWriteRegistry, rReadRegistry, bReadOnly, rBootstrapPath ), UNO_QUERY );
-}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/javaunohelper/Jar_juh.mk b/javaunohelper/Jar_juh.mk
index d95a8e5..02fb033 100644
--- a/javaunohelper/Jar_juh.mk
+++ b/javaunohelper/Jar_juh.mk
@@ -47,7 +47,6 @@ $(eval $(call gb_Jar_add_sourcefiles,juh,\
javaunohelper/com/sun/star/comp/helper/BootstrapException \
javaunohelper/com/sun/star/comp/helper/ComponentContext \
javaunohelper/com/sun/star/comp/helper/ComponentContextEntry \
- javaunohelper/com/sun/star/comp/helper/RegistryServiceFactory \
javaunohelper/com/sun/star/comp/helper/SharedLibraryLoader \
javaunohelper/com/sun/star/comp/helper/UnoInfo \
javaunohelper/com/sun/star/comp/juhtest/SmoketestCommandEnvironment \
diff --git a/javaunohelper/Zip_juh.mk b/javaunohelper/Zip_juh.mk
index e59c4ce..c4a6139 100644
--- a/javaunohelper/Zip_juh.mk
+++ b/javaunohelper/Zip_juh.mk
@@ -33,7 +33,6 @@ $(eval $(call gb_Zip_add_files,juh_src,\
com/sun/star/comp/helper/BootstrapException.java \
com/sun/star/comp/helper/ComponentContext.java \
com/sun/star/comp/helper/ComponentContextEntry.java \
- com/sun/star/comp/helper/RegistryServiceFactory.java \
com/sun/star/comp/helper/SharedLibraryLoader.java \
com/sun/star/comp/helper/UnoInfo.java \
com/sun/star/comp/juhtest/SmoketestCommandEnvironment.java \
diff --git a/javaunohelper/com/sun/star/comp/helper/RegistryServiceFactory.java b/javaunohelper/com/sun/star/comp/helper/RegistryServiceFactory.java
deleted file mode 100644
index 8f0bc29..0000000
--- a/javaunohelper/com/sun/star/comp/helper/RegistryServiceFactory.java
+++ /dev/null
@@ -1,176 +0,0 @@
-// -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-
-package com.sun.star.comp.helper;
-
-
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.RuntimeException;
-
-/** The class provides a set of methods which create instances of the
- com.sun.star.lang.RegistryServiceManager service.
-
- @deprecated use class Bootstrap instead
-*/
-public class RegistryServiceFactory {
- static {
- if (System.getProperty("java.vendor") == "The Android Project") {
- // See corresponding code in
- // javaunohelper/com/sun/star/comp/helper/Bootstrap.java for more
- // comments.
-
- boolean disable_dynloading = false;
- try {
- System.loadLibrary("lo-bootstrap");
- } catch (UnsatisfiedLinkError e) {
- disable_dynloading = true;
- }
-
- if (!disable_dynloading)
- System.loadLibrary("juh");
- } else
- System.loadLibrary("juh");
- }
-
- private static native Object createRegistryServiceFactory(
- String writeRegistryFile,
- String readRegistryFile,
- boolean readOnly,
- ClassLoader loader);
-
- /**
- * This bootstraps an initial service factory working on a registry. If the first or both
- * parameters contain a value then the service factory is initialized with a simple registry
- * or a nested registry. Otherwise the service factory must be initialized later with a valid
- * registry.
- *<BR>
- * @param writeRegistryFile file name of the simple registry or the first registry file of
- * the nested registry which will be opened with read/write rights. This
- * file will be created if necessary.
- * @param readRegistryFile file name of the second registry file of the nested registry
- * which will be opened with readonly rights.
- * @return a new RegistryServiceFactory.
- */
- public static XMultiServiceFactory create(String writeRegistryFile, String readRegistryFile)
- throws com.sun.star.uno.Exception
- {
- return create(writeRegistryFile, readRegistryFile, false);
- }
-
- /**
- * This bootstraps an initial service factory working on a registry. If the first or both
- * parameters contain a value then the service factory is initialized with a simple registry
- * or a nested registry. Otherwise the service factory must be initialized later with a valid
- * registry.
- *<BR>
- * @param writeRegistryFile file name of the simple registry or the first registry file of
- * the nested registry which will be opened with read/write rights. This
- * file will be created if necessary.
- * @param readRegistryFile file name of the second registry file of the nested registry
- * which will be opened with readonly rights.
- * @param readOnly flag which specify that the first registry file will be opened with
- * readonly rights. Default is FALSE. If this flag is used the registry
- * will not be created if not exist.
- *
- * @return a new RegistryServiceFactory
- */
- public static XMultiServiceFactory create(String writeRegistryFile, String readRegistryFile, boolean readOnly)
- throws com.sun.star.uno.Exception
- {
- // Ensure that we are on a native threads vm
- // (binary UNO does use native threads).
- String vm_info = System.getProperty("java.vm.info");
- if(vm_info != null && vm_info.indexOf("green") != -1)
- throw new RuntimeException(RegistryServiceFactory.class.toString() + ".create - can't use binary UNO with green threads");
-
-
- if (writeRegistryFile == null && readRegistryFile == null)
- throw new com.sun.star.uno.Exception("No registry is specified!");
-
-// if (writeRegistryFile != null) {
-// java.io.File file = new java.io.File(writeRegistryFile);
-
-// if (file.exists()) {
-// if (!file.isFile())
-// throw new com.sun.star.uno.Exception(writeRegistryFile + " is not a file!");
-// } else
-// throw new com.sun.star.uno.Exception(writeRegistryFile + " doese not exist!");
-// }
-
-// if (readRegistryFile != null) {
-// java.io.File file = new java.io.File(readRegistryFile);
-
-// if (file.exists()) {
-// if (!file.isFile())
-// throw new com.sun.star.uno.Exception(readRegistryFile + " is not a file!");
-// } else
-// throw new com.sun.star.uno.Exception(readRegistryFile + " doese not exist!");
-// }
-
- Object obj = createRegistryServiceFactory(
- writeRegistryFile, readRegistryFile, readOnly,
- RegistryServiceFactory.class.getClassLoader() );
- return UnoRuntime.queryInterface(
- XMultiServiceFactory.class, obj );
- }
-
- /**
- * This bootstraps an initial service factory working on a registry file.
- *<BR>
- * @param registryFile file name of the registry to use/ create; if this is an empty
- * string, the default registry is used instead
- *
- * @return a new RegistryServiceFactory.
- */
- public static XMultiServiceFactory create(String registryFile)
- throws com.sun.star.uno.Exception
- {
- return create(registryFile, null, false);
- }
-
- /**
- * This bootstraps an initial service factory working on a registry file.
- *<BR>
- * @param registryFile file name of the registry to use/ create; if this is an empty
- * string, the default registry is used instead
- * @param readOnly flag which specify that the registry file will be opened with
- * readonly rights. Default is FALSE. If this flag is used the registry
- * will not be created if not exist.
- *
- * @return a new RegistryServiceFactory.
- */
- public static XMultiServiceFactory create(String registryFile, boolean readOnly)
- throws com.sun.star.uno.Exception
- {
- return create(registryFile, null, readOnly);
- }
-
- /**
- * This bootstraps a service factory without initialize a registry.
- *<BR>
- * @return a new RegistryServiceFactory.
- */
- public static XMultiServiceFactory create() throws com.sun.star.uno.Exception {
- return create( null, null, false );
- }
-}
-
-// vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/javaunohelper/source/javaunohelper.cxx b/javaunohelper/source/javaunohelper.cxx
index 45c9392..c1afc4a 100644
--- a/javaunohelper/source/javaunohelper.cxx
+++ b/javaunohelper/source/javaunohelper.cxx
@@ -25,8 +25,6 @@
#include <uno/mapping.hxx>
#include <cppuhelper/factory.hxx>
-#include <cppuhelper/servicefactory.hxx>
-#include <cppuhelper/component_context.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -241,93 +239,4 @@ Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory(
return joSLL_cpp;
}
-/*
- * Class: com_sun_star_comp_helper_RegistryServiceFactory
- * Method: createRegistryServiceFactory
- * Signature: (Ljava/lang/String;Ljava/lang/String;Z)Ljava/lang/Object;
- */
-extern "C" SAL_JNI_EXPORT jobject JNICALL
-Java_com_sun_star_comp_helper_RegistryServiceFactory_createRegistryServiceFactory(
- JNIEnv * pJEnv, SAL_UNUSED_PARAMETER jclass, jstring jWriteRegFile,
- jstring jReadRegFile, jboolean jbReadOnly, jobject loader )
-{
- jobject joRegServiceFac = 0;
-
- try
- {
- OUString aWriteRegFile;
- OUString aReadRegFile;
-
- sal_Bool bReadOnly = jbReadOnly == JNI_FALSE ? sal_False : sal_True;
-
- if (jReadRegFile) {
- const jchar* pjReadRegFile = pJEnv->GetStringChars(jReadRegFile, NULL);
- aReadRegFile = OUString(pjReadRegFile);
- pJEnv->ReleaseStringChars(jReadRegFile, pjReadRegFile);
- }
-
- if (jWriteRegFile) {
- const jchar * pjWriteRegFile = pJEnv->GetStringChars(jWriteRegFile, NULL);
- aWriteRegFile = OUString(pjWriteRegFile);
- pJEnv->ReleaseStringChars(jWriteRegFile, pjWriteRegFile);
- }
-
- // bootstrap
- Reference< lang::XMultiServiceFactory > rMSFac;
- if (aReadRegFile.isEmpty())
- rMSFac = ::cppu::createRegistryServiceFactory( aWriteRegFile, bReadOnly);
- else
- rMSFac = ::cppu::createRegistryServiceFactory(aWriteRegFile, aReadRegFile, bReadOnly);
-
- Reference< beans::XPropertySet > xProps(
- rMSFac, UNO_QUERY_THROW );
- Reference< XComponentContext > xContext(
- xProps->getPropertyValue( OUSTR("DefaultContext") ), UNO_QUERY_THROW );
-
- // create vm access
- ::rtl::Reference< ::jvmaccess::UnoVirtualMachine > vm_access(
- ::javaunohelper::create_vm_access( pJEnv, loader ) );
- // wrap vm singleton entry
- xContext = ::javaunohelper::install_vm_singleton( xContext, vm_access );
- rMSFac.set( xContext->getServiceManager(), UNO_QUERY_THROW );
-
- // get uno envs
- OUString aCurrentEnv(RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME));
- OUString java_env_name = OUSTR(UNO_LB_JAVA);
- Environment java_env, curr_env;
- uno_getEnvironment((uno_Environment **)&curr_env, aCurrentEnv.pData, NULL);
- uno_getEnvironment( (uno_Environment **)&java_env, java_env_name.pData, vm_access.get() );
-
- Mapping curr_java(curr_env.get(), java_env.get());
- if (! curr_java.is())
- {
- throw RuntimeException(
- OUSTR("no C++ <-> Java mapping available!"), Reference< XInterface >() );
- }
-
- jobject joGlobalRegServiceFac =
- (jobject)curr_java.mapInterface(
- rMSFac.get(),
- getCppuType((Reference< lang::XMultiServiceFactory > *)0) );
- joRegServiceFac = pJEnv->NewLocalRef( joGlobalRegServiceFac );
- pJEnv->DeleteGlobalRef(joGlobalRegServiceFac);
- }
- catch (Exception & exc)
- {
- jclass c = pJEnv->FindClass( "com/sun/star/uno/RuntimeException" );
- if (0 != c)
- {
- OString cstr( ::rtl::OUStringToOString(
- exc.Message, RTL_TEXTENCODING_JAVA_UTF8 ) );
- OSL_TRACE( __FILE__": forwarding Exception: %s", cstr.getStr() );
- pJEnv->ThrowNew( c, cstr.getStr() );
- }
- return 0;
- }
-
- OSL_TRACE("javaunohelper.cxx: object %i", joRegServiceFac);
-
- return joRegServiceFac;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/javaunohelper/test/com/sun/star/comp/helper/RegistryServiceFactory_Test.java b/javaunohelper/test/com/sun/star/comp/helper/RegistryServiceFactory_Test.java
deleted file mode 100644
index d541fbe..0000000
--- a/javaunohelper/test/com/sun/star/comp/helper/RegistryServiceFactory_Test.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-package com.sun.star.comp.helper;
-
-import com.sun.star.lang.XMultiServiceFactory;
-
-public class RegistryServiceFactory_Test {
-
- static public boolean test(String applicat) throws java.lang.Exception {
- boolean passed = false;
- System.err.println();
- System.out.println("*******************************************************************");
- System.err.println("RegistryServiceFactory - doing tests...");
- System.err.println();
-
- try {
- XMultiServiceFactory msf = RegistryServiceFactory.create( applicat );
- String services[] = msf.getAvailableServiceNames();
- System.out.println("Available services are:");
- System.err.println();
- if (services.length == 0)
- System.out.println("No services avialable!");
-
- else
- for ( int i=0; i<services.length; i++ )
- System.out.println(services[i]);
-
- passed = true;
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- System.err.println();
- System.err.println("RegistryServiceFactory test passed? " + passed);
- System.out.println("*******************************************************************");
- System.err.println();
- return passed;
- }
-
- private static void usage() {
- System.out.println();
- System.out.println("usage:");
- System.out.println("java com.sun.star.comp.helper.RegistryServiceFactory [rdb-file]");
- System.out.println("example:");
- System.out.println("java com.sun.star.comp.helper.RegistryServiceFactory c:\\applicat.rdb");
- System.exit( -1 );
- }
-
- static public void main(String args[]) throws java.lang.Exception {
- if ( args.length != 1 )
- usage();
- System.exit( test(args[0]) == true ? 0: -1 );
- }
-}
-
commit b1959dbfadc7483a8e4601310e327beed3c56dc6
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Dec 21 13:13:02 2012 +0100
Remove unused cppuhelper/servicefactory.hxx includes
Change-Id: I27fd4d1f1dfafccaa7936defb5cd687d6266e0a2
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 7012243..9e6a5c1 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -36,7 +36,6 @@
#include <com/sun/star/ucb/UniversalContentBroker.hpp>
#include <com/sun/star/ucb/XUniversalContentBroker.hpp>
#include <uno/current_context.hxx>
-#include <cppuhelper/servicefactory.hxx>
#include <cppuhelper/bootstrap.hxx>
#include <officecfg/Setup.hxx>
#include <osl/file.hxx>
diff --git a/dtrans/source/inc/DtObjFactory.hxx b/dtrans/source/inc/DtObjFactory.hxx
index 6d5a221..3c5cd2a 100644
--- a/dtrans/source/inc/DtObjFactory.hxx
+++ b/dtrans/source/inc/DtObjFactory.hxx
@@ -22,7 +22,6 @@
#define _DTOBJFACTORY_HXX_
#include <com/sun/star/datatransfer/XTransferable.hpp>
-#include <cppuhelper/servicefactory.hxx>
#include <systools/win32/comtools.hxx>
diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.hxx b/dtrans/source/win32/dtobj/DataFmtTransl.hxx
index 1c7fa27..f99afdf 100644
--- a/dtrans/source/win32/dtobj/DataFmtTransl.hxx
+++ b/dtrans/source/win32/dtobj/DataFmtTransl.hxx
@@ -21,7 +21,6 @@
#ifndef _DATAFMTTRANSL_HXX_
#define _DATAFMTTRANSL_HXX_
-#include <cppuhelper/servicefactory.hxx>
#include <com/sun/star/datatransfer/XDataFormatTranslator.hpp>
#include <com/sun/star/datatransfer/XTransferable.hpp>
#include <sal/types.h>
diff --git a/dtrans/source/win32/dtobj/FetcList.hxx b/dtrans/source/win32/dtobj/FetcList.hxx
index 5a013b5..474c2d0 100644
--- a/dtrans/source/win32/dtobj/FetcList.hxx
+++ b/dtrans/source/win32/dtobj/FetcList.hxx
@@ -22,7 +22,6 @@
#define _FETCLIST_HXX_
#include <sal/types.h>
-#include <cppuhelper/servicefactory.hxx>
#include <com/sun/star/datatransfer/XTransferable.hpp>
#include "Fetc.hxx"
diff --git a/filter/source/odfflatxml/OdfFlatXml.cxx b/filter/source/odfflatxml/OdfFlatXml.cxx
index 5db1e55..f776d3e 100644
--- a/filter/source/odfflatxml/OdfFlatXml.cxx
+++ b/filter/source/odfflatxml/OdfFlatXml.cxx
@@ -30,7 +30,6 @@
#include <comphelper/processfactory.hxx>
#include <cppuhelper/factory.hxx>
-#include <cppuhelper/servicefactory.hxx>
#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/implbase.hxx>
diff --git a/filter/source/svg/test/svg2odf.cxx b/filter/source/svg/test/svg2odf.cxx
index 438143e..5e3946f 100644
--- a/filter/source/svg/test/svg2odf.cxx
+++ b/filter/source/svg/test/svg2odf.cxx
@@ -26,7 +26,6 @@
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/bootstrap.hxx>
-#include <cppuhelper/servicefactory.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/oslfile2streamwrap.hxx>
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx
index b0b5705..85eaf7b 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.cxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx
@@ -47,7 +47,6 @@
#include <libexslt/exslt.h>
#include <cppuhelper/factory.hxx>
-#include <cppuhelper/servicefactory.hxx>
#include <cppuhelper/implbase4.hxx>
#include <cppuhelper/implbase.hxx>
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.hxx b/filter/source/xsltfilter/LibXSLTTransformer.hxx
index 3e7bf28..aa62fda 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.hxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.hxx
@@ -41,7 +41,6 @@
#include <libxml/xpathInternals.h>
#include <cppuhelper/factory.hxx>
-#include <cppuhelper/servicefactory.hxx>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase.hxx>
diff --git a/filter/source/xsltfilter/OleHandler.cxx b/filter/source/xsltfilter/OleHandler.cxx
index e76b57e..395bc81 100644
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list