summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-01-15 18:16:01 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-01-16 11:39:03 +0100
commit9e2972dbf1a9526f30ffd3e001a6eaf473d76ae9 (patch)
tree8996bbe0e444b4ac31bfe825fd9dc785fcbad8a2 /cppuhelper
parentfc9d23ff550194ba50fc6506ec901c22681d1b1c (diff)
API CHANGE: Remove obsolete cppu::bootstrapInitialSF
An aborting stub is left in cppuhelper/source/compat.cxx to avoid having to incompatibly change cppuhelper/source/gcc3.map. Change-Id: I28359397fa9c06ac955ee646b5ad3486e9200a10
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/source/compat.cxx16
-rw-r--r--cppuhelper/source/servicefactory.cxx143
-rw-r--r--cppuhelper/source/servicefactory_detail.hxx14
3 files changed, 16 insertions, 157 deletions
diff --git a/cppuhelper/source/compat.cxx b/cppuhelper/source/compat.cxx
index a90d7e56f638..ab57a2aea882 100644
--- a/cppuhelper/source/compat.cxx
+++ b/cppuhelper/source/compat.cxx
@@ -27,7 +27,10 @@
#include "sal/types.h"
namespace com { namespace sun { namespace star {
- namespace lang { class XMultiServiceFactory; }
+ namespace lang {
+ class XMultiComponentFactory;
+ class XMultiServiceFactory;
+ }
namespace reflection { class XIdlClass; }
namespace registry { class XSimpleRegistry; }
namespace uno { class XComponentContext; }
@@ -36,6 +39,17 @@ namespace rtl { class OUString; }
// Stubs for removed functionality, to be killed when we bump cppuhelper SONAME
+namespace cppu {
+
+SAL_DLLPUBLIC_EXPORT
+css::uno::Reference< css::lang::XMultiComponentFactory > bootstrapInitialSF(
+ rtl::OUString const &) SAL_THROW((com::sun::star::uno::Exception))
+{
+ for (;;) { std::abort(); } // avoid "must return a value" warnings
+}
+
+}
+
SAL_DLLPUBLIC_EXPORT css::uno::Reference< css::uno::XComponentContext > SAL_CALL
bootstrap_InitialComponentContext(
css::uno::Reference< css::registry::XSimpleRegistry > const &,
diff --git a/cppuhelper/source/servicefactory.cxx b/cppuhelper/source/servicefactory.cxx
index ac7e93f75099..268ddaa990b4 100644
--- a/cppuhelper/source/servicefactory.cxx
+++ b/cppuhelper/source/servicefactory.cxx
@@ -20,35 +20,13 @@
#include <vector>
-#include "rtl/string.hxx"
#include "rtl/bootstrap.hxx"
-#include "rtl/strbuf.hxx"
#include "osl/diagnose.h"
-#include "osl/file.h"
-#include "osl/module.h"
#include "osl/process.h"
-#include "cppuhelper/shlib.hxx"
-#include "cppuhelper/factory.hxx"
#include "cppuhelper/component_context.hxx"
-#include "cppuhelper/bootstrap.hxx"
-#include "com/sun/star/uno/DeploymentException.hpp"
-#include "com/sun/star/uno/XComponentContext.hpp"
-#include "com/sun/star/lang/XInitialization.hpp"
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include "com/sun/star/lang/XSingleServiceFactory.hpp"
-#include "com/sun/star/lang/XSingleComponentFactory.hpp"
-#include "com/sun/star/beans/XPropertySet.hpp"
-#include "com/sun/star/container/XSet.hpp"
-#include "com/sun/star/container/XHierarchicalNameAccess.hpp"
-#include "com/sun/star/registry/XSimpleRegistry.hpp"
#include "com/sun/star/uno/SecurityException.hpp"
-#if OSL_DEBUG_LEVEL > 1
-#include <stdio.h>
-#endif
-#include "macro_expander.hxx"
-#include "paths.hxx"
#include "servicefactory_detail.hxx"
#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
@@ -62,30 +40,6 @@ using namespace ::com::sun::star::uno;
namespace cppu
{
-static Reference< XInterface > SAL_CALL createInstance(
- Reference< XInterface > const & xFactory,
- Reference< XComponentContext > const & xContext =
- Reference< XComponentContext >() )
-{
- Reference< lang::XSingleComponentFactory > xFac( xFactory, UNO_QUERY );
- if (xFac.is())
- {
- return xFac->createInstanceWithContext( xContext );
- }
- else
- {
- Reference< lang::XSingleServiceFactory > xFac2( xFactory, UNO_QUERY );
- if (xFac2.is())
- {
- OSL_ENSURE( !xContext.is(), "### ignoring context!" );
- return xFac2->createInstance();
- }
- }
- throw RuntimeException(
- OUSTR("no factory object given!"),
- Reference< XInterface >() );
-}
-
/** bootstrap variables:
UNO_AC=<mode> [mandatory]
@@ -234,103 +188,6 @@ void add_access_control_entries(
context_values.push_back( entry );
}
-namespace {
-void addFactories(
- char const * const * ppNames /* implname, ..., 0 */,
- OUString const & bootstrapPath,
- Reference< lang::XMultiComponentFactory > const & xMgr,
- Reference< registry::XRegistryKey > const & xKey )
- SAL_THROW( (Exception) )
-{
- Reference< container::XSet > xSet( xMgr, UNO_QUERY );
- OSL_ASSERT( xSet.is() );
- Reference< lang::XMultiServiceFactory > xSF( xMgr, UNO_QUERY );
-
- while (*ppNames)
- {
- OUString implName( OUString::createFromAscii( *ppNames++ ) );
-
- Any aFac( makeAny( loadSharedLibComponentFactory(
- OUSTR("bootstrap.uno" SAL_DLLEXTENSION),
- bootstrapPath, implName, xSF, xKey ) ) );
- xSet->insert( aFac );
-#if OSL_DEBUG_LEVEL > 1
- if (xSet->has( aFac ))
- {
- Reference< lang::XServiceInfo > xInfo;
- if (aFac >>= xInfo)
- {
- ::fprintf(
- stderr, "> implementation %s supports: ", ppNames[ -1 ] );
- Sequence< OUString > supported(
- xInfo->getSupportedServiceNames() );
- for ( sal_Int32 nPos = supported.getLength(); nPos--; )
- {
- OString str( OUStringToOString(
- supported[ nPos ], RTL_TEXTENCODING_ASCII_US ) );
- ::fprintf( stderr, nPos ? "%s, " : "%s\n", str.getStr() );
- }
- }
- else
- {
- ::fprintf(
- stderr,
- "> implementation %s provides NO lang::XServiceInfo!!!\n",
- ppNames[ -1 ] );
- }
- }
-#endif
-#if OSL_DEBUG_LEVEL > 0
- if (! xSet->has( aFac ))
- {
- OStringBuffer buf( 64 );
- buf.append( "### failed inserting shared lib \"" );
- buf.append( "bootstrap.uno" SAL_DLLEXTENSION );
- buf.append( "\"!!!" );
- OString str( buf.makeStringAndClear() );
- OSL_FAIL( str.getStr() );
- }
-#endif
- }
-}
-
-} // namespace
-
-Reference< lang::XMultiComponentFactory > bootstrapInitialSF(
- OUString const & rBootstrapPath )
- SAL_THROW( (Exception) )
-{
- OUString const & bootstrap_path =
- rBootstrapPath.isEmpty() ? get_this_libpath() : rBootstrapPath;
-
- Reference< lang::XMultiComponentFactory > xMgr(
- createInstance(
- loadSharedLibComponentFactory(
- OUSTR("bootstrap.uno" SAL_DLLEXTENSION), bootstrap_path,
- OUSTR("com.sun.star.comp.stoc.ORegistryServiceManager"),
- Reference< lang::XMultiServiceFactory >(),
- Reference< registry::XRegistryKey >() ) ),
- UNO_QUERY );
-
- // add initial bootstrap services
- static char const * ar[] = {
- "com.sun.star.comp.stoc.OServiceManagerWrapper",
- "com.sun.star.comp.stoc.DLLComponentLoader",
- "com.sun.star.comp.stoc.SimpleRegistry",
- "com.sun.star.comp.stoc.NestedRegistry",
- "com.sun.star.comp.stoc.TypeDescriptionManager",
- "com.sun.star.comp.stoc.ImplementationRegistration",
- "com.sun.star.security.comp.stoc.AccessController",
- "com.sun.star.security.comp.stoc.FilePolicy",
- 0
- };
- addFactories(
- ar, bootstrap_path,
- xMgr, Reference< registry::XRegistryKey >() );
-
- return xMgr;
-}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cppuhelper/source/servicefactory_detail.hxx b/cppuhelper/source/servicefactory_detail.hxx
index 40fe77f036ed..09c3997a2ed9 100644
--- a/cppuhelper/source/servicefactory_detail.hxx
+++ b/cppuhelper/source/servicefactory_detail.hxx
@@ -25,17 +25,10 @@
#include <vector>
#include "com/sun/star/uno/Exception.hpp"
-#include "com/sun/star/uno/Reference.hxx"
#include "sal/types.h"
-namespace com { namespace sun { namespace star { namespace lang {
- class XMultiComponentFactory;
-} } } }
namespace cppu { struct ContextEntry_Init; }
-namespace rtl {
- class Bootstrap;
- class OUString;
-}
+namespace rtl { class Bootstrap; }
namespace cppu {
@@ -44,11 +37,6 @@ void add_access_control_entries(
rtl::Bootstrap const & bootstrap)
SAL_THROW((com::sun::star::uno::Exception));
-SAL_DLLPUBLIC_EXPORT
-com::sun::star::uno::Reference< com::sun::star::lang::XMultiComponentFactory >
-bootstrapInitialSF(rtl::OUString const & rBootstrapPath)
- SAL_THROW((com::sun::star::uno::Exception));
-
}
#endif