[Libreoffice-commits] core.git: Branch 'distro/collabora/viewer' - 7 commits - basic/Library_sb.mk basic/source basic/util solenv/bin sw/Library_swd.mk sw/source sw/util
Jan Holesovsky
kendy at collabora.com
Thu Feb 26 11:41:08 PST 2015
basic/Library_sb.mk | 2
basic/source/inc/dlgcont.hxx | 6
basic/source/inc/scriptcont.hxx | 8 -
basic/source/uno/dlgcont.cxx | 36 +---
basic/source/uno/sbmodule.cxx | 52 ------
basic/source/uno/sbmodule.hxx | 86 -----------
basic/source/uno/sbservices.cxx | 50 ------
basic/source/uno/sbservices.hxx | 35 ----
basic/source/uno/scriptcont.cxx | 35 +---
basic/util/sb.component | 8 -
solenv/bin/native-code.py | 12 +
sw/Library_swd.mk | 1
sw/source/core/inc/unofreg.hxx | 59 -------
sw/source/filter/xml/xmlexp.cxx | 304 ++++++++++-----------------------------
sw/source/filter/xml/xmlimp.cxx | 158 +++++---------------
sw/source/ui/uno/detreg.cxx | 66 --------
sw/source/ui/uno/swdetect.cxx | 23 --
sw/source/ui/uno/swdetect.hxx | 11 -
sw/source/uibase/uno/unodoc.cxx | 54 +-----
sw/source/uibase/uno/unofreg.cxx | 138 -----------------
sw/util/sw.component | 51 ++++--
sw/util/swd.component | 5
22 files changed, 220 insertions(+), 980 deletions(-)
New commits:
commit 47929167708455b11958f00a33a96695f88f5c37
Author: Jan Holesovsky <kendy at collabora.com>
Date: Thu Feb 26 20:39:42 2015 +0100
native-code.py: Some services were converted to using constructors.
Change-Id: I957bf1d5bd88b15539e95dfa4aa87a8e63a96439
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index 0e90672..c787a23 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -219,14 +219,22 @@ draw_constructor_list = [
]
writer_factory_list = [
- ("libsblo.a", "sb_component_getFactory", "#if HAVE_FEATURE_SCRIPTING"),
- ("libswdlo.a", "swd_component_getFactory"),
("libswlo.a", "sw_component_getFactory"),
]
writer_constructor_list = [
+# basic/util/sb.component
+ "com_sun_star_comp_sfx2_ScriptLibraryContainer_get_implementation",
# filter/source/textfilterdetect/textfd.component
"com_sun_star_comp_filters_PlainTextFilterDetect_get_implementation",
+# sw/util/sw.component
+ "com_sun_star_comp_Writer_XMLOasisContentImporter_get_implementation",
+ "com_sun_star_comp_Writer_XMLOasisImporter_get_implementation",
+ "com_sun_star_comp_Writer_XMLOasisMetaImporter_get_implementation",
+ "com_sun_star_comp_Writer_XMLOasisSettingsImporter_get_implementation",
+ "com_sun_star_comp_Writer_XMLOasisStylesImporter_get_implementation",
+# sw/util/swd.component
+ "com_sun_star_comp_writer_FormatDetector_get_implementation",
# writerfilter/util/writerfilter.component
"com_sun_star_comp_Writer_RtfFilter_get_implementation",
"com_sun_star_comp_Writer_WriterFilter_get_implementation",
commit cc8523592062d9493dfb31ca0c6306d8e63816ea
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Feb 26 15:34:57 2015 +0100
Clean up previous commit
Change-Id: Iddade9d297be8f4a4e69b3bec5ab7588bf68c112
diff --git a/basic/Library_sb.mk b/basic/Library_sb.mk
index 36c1be9..b364190 100644
--- a/basic/Library_sb.mk
+++ b/basic/Library_sb.mk
@@ -92,7 +92,6 @@ $(eval $(call gb_Library_add_exception_objects,sb,\
basic/source/uno/dlgcont \
basic/source/uno/modsizeexceeded \
basic/source/uno/namecont \
- basic/source/uno/sbmodule \
basic/source/uno/scriptcont \
basic/source/runtime/comenumwrapper \
basic/source/runtime/ddectrl \
diff --git a/basic/source/inc/dlgcont.hxx b/basic/source/inc/dlgcont.hxx
index 33155af..baf3da8 100644
--- a/basic/source/inc/dlgcont.hxx
+++ b/basic/source/inc/dlgcont.hxx
@@ -91,9 +91,6 @@ public:
// XLibraryQueryExecutable
virtual sal_Bool SAL_CALL HasExecutableCode(const OUString&)
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- // Service
- static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_static();
- static OUString getImplementationName_static();
};
diff --git a/basic/source/inc/scriptcont.hxx b/basic/source/inc/scriptcont.hxx
index 2f21441..75f65e3 100644
--- a/basic/source/inc/scriptcont.hxx
+++ b/basic/source/inc/scriptcont.hxx
@@ -121,10 +121,6 @@ public:
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( )
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-
- // Service
- static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_static();
- static OUString getImplementationName_static();
};
diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx
index 6f22b95..39dde70 100644
--- a/basic/source/uno/dlgcont.cxx
+++ b/basic/source/uno/dlgcont.cxx
@@ -32,7 +32,6 @@
#include <com/sun/star/resource/StringResourceWithLocation.hpp>
#include <com/sun/star/document/GraphicObjectResolver.hpp>
#include "dlgcont.hxx"
-#include "sbmodule.hxx"
#include <comphelper/processfactory.hxx>
#include <unotools/streamwrap.hxx>
#include <osl/mutex.hxx>
@@ -451,16 +450,11 @@ SfxDialogLibraryContainer:: HasExecutableCode( const OUString& /*Library*/ ) thr
OUString SAL_CALL SfxDialogLibraryContainer::getImplementationName( ) throw (RuntimeException, std::exception)
{
- return getImplementationName_static();
+ return OUString("com.sun.star.comp.sfx2.DialogLibraryContainer");
}
Sequence< OUString > SAL_CALL SfxDialogLibraryContainer::getSupportedServiceNames( ) throw (RuntimeException, std::exception)
{
- return getSupportedServiceNames_static();
-}
-
-Sequence< OUString > SfxDialogLibraryContainer::getSupportedServiceNames_static()
-{
Sequence< OUString > aServiceNames( 2 );
aServiceNames[0] = "com.sun.star.script.DocumentDialogLibraryContainer";
// plus, for compatibility:
@@ -468,12 +462,6 @@ Sequence< OUString > SfxDialogLibraryContainer::getSupportedServiceNames_static(
return aServiceNames;
}
-OUString SfxDialogLibraryContainer::getImplementationName_static()
-{
- return OUString("com.sun.star.comp.sfx2.DialogLibraryContainer");
-}
-
-
// Implementation class SfxDialogLibrary
// Ctor
diff --git a/basic/source/uno/sbmodule.cxx b/basic/source/uno/sbmodule.cxx
deleted file mode 100644
index cbe3742..0000000
--- a/basic/source/uno/sbmodule.cxx
+++ /dev/null
@@ -1,52 +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 "sbmodule.hxx"
-#include <rtl/instance.hxx>
-
-
-namespace basic
-{
-
-
- struct BasicModuleCreator
- {
- BasicModule m_aBasicModule;
- };
- namespace
- {
- class theBasicModuleInstance : public rtl::Static<BasicModuleCreator, theBasicModuleInstance> {};
- }
-
- BasicModule::BasicModule()
- :BaseClass()
- {
- }
-
- BasicModule& BasicModule::getInstance()
- {
- return theBasicModuleInstance::get().m_aBasicModule;
- }
-
-
-} // namespace basic
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/uno/sbmodule.hxx b/basic/source/uno/sbmodule.hxx
deleted file mode 100644
index f7eb2e5..0000000
--- a/basic/source/uno/sbmodule.hxx
+++ /dev/null
@@ -1,86 +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_BASIC_SOURCE_UNO_SBMODULE_HXX
-#define INCLUDED_BASIC_SOURCE_UNO_SBMODULE_HXX
-
-#include <comphelper/componentmodule.hxx>
-
-
-namespace basic
-{
-
-
- class BasicModule : public ::comphelper::OModule
- {
- friend struct BasicModuleCreator;
- typedef ::comphelper::OModule BaseClass;
-
- public:
- static BasicModule& getInstance();
-
- private:
- BasicModule();
- };
-
- /* -------------------------------------------------------------------- */
- class BasicModuleClient : public ::comphelper::OModuleClient
- {
- private:
- typedef ::comphelper::OModuleClient BaseClass;
-
- public:
- BasicModuleClient() : BaseClass( BasicModule::getInstance() )
- {
- }
- };
-
- /* -------------------------------------------------------------------- */
- template < class TYPE >
- class OAutoRegistration : public ::comphelper::OAutoRegistration< TYPE >
- {
- private:
- typedef ::comphelper::OAutoRegistration< TYPE > BaseClass;
-
- public:
- OAutoRegistration() : BaseClass( BasicModule::getInstance() )
- {
- }
- };
-
- /* -------------------------------------------------------------------- */
- template < class TYPE >
- class OSingletonRegistration : public ::comphelper::OSingletonRegistration< TYPE >
- {
- private:
- typedef ::comphelper::OSingletonRegistration< TYPE > BaseClass;
-
- public:
- OSingletonRegistration() : BaseClass( BasicModule::getInstance() )
- {
- }
- };
-
-
-} // namespace basic
-
-
-#endif // INCLUDED_BASIC_SOURCE_UNO_SBMODULE_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index 73bcbec..eeb68f0 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -18,7 +18,6 @@
*/
#include "scriptcont.hxx"
-#include "sbmodule.hxx"
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/xml/sax/Parser.hpp>
#include <com/sun/star/xml/sax/InputSource.hpp>
@@ -1193,17 +1192,12 @@ sal_Bool SAL_CALL SfxScriptLibraryContainer:: HasExecutableCode( const OUString&
OUString SAL_CALL SfxScriptLibraryContainer::getImplementationName( )
throw (RuntimeException, std::exception)
{
- return getImplementationName_static();
+ return OUString("com.sun.star.comp.sfx2.ScriptLibraryContainer" );
}
Sequence< OUString > SAL_CALL SfxScriptLibraryContainer::getSupportedServiceNames( )
throw (RuntimeException, std::exception)
{
- return getSupportedServiceNames_static();
-}
-
-Sequence< OUString > SfxScriptLibraryContainer::getSupportedServiceNames_static()
-{
Sequence< OUString > aServiceNames( 2 );
aServiceNames[0] = "com.sun.star.script.DocumentScriptLibraryContainer";
// plus, for compatibility:
@@ -1211,11 +1205,6 @@ Sequence< OUString > SfxScriptLibraryContainer::getSupportedServiceNames_static(
return aServiceNames;
}
-OUString SfxScriptLibraryContainer::getImplementationName_static()
-{
- return OUString("com.sun.star.comp.sfx2.ScriptLibraryContainer" );
-}
-
// Implementation class SfxScriptLibrary
// Ctor
diff --git a/basic/util/sb.component b/basic/util/sb.component
index 710c37f..9271a84 100644
--- a/basic/util/sb.component
+++ b/basic/util/sb.component
@@ -18,9 +18,9 @@
-->
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
- prefix="sb" xmlns="http://openoffice.org/2010/uno-components">
+ xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.sfx2.DialogLibraryContainer"
- constructor="com_sun_star_comp_sfx2_DialogLibraryContainer_get_implementation">
+ constructor="com_sun_star_comp_sfx2_DialogLibraryContainer_get_implementation">
<service name="com.sun.star.script.DialogLibraryContainer"/>
<service name="com.sun.star.script.DocumentDialogLibraryContainer"/>
</implementation>
commit 4b86277a81ebfc6fa50af026b91c4c85f6810680
Author: Chris Sherlock <chris.sherlock at collabora.com>
Date: Tue Feb 24 14:31:11 2015 +1100
basic: convert sb.component to constructor usage
Change-Id: I45ddf460fa7d673c5210f9415b2a8015988a643e
Signed-off-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/basic/Library_sb.mk b/basic/Library_sb.mk
index eefe8e0..36c1be9 100644
--- a/basic/Library_sb.mk
+++ b/basic/Library_sb.mk
@@ -93,7 +93,6 @@ $(eval $(call gb_Library_add_exception_objects,sb,\
basic/source/uno/modsizeexceeded \
basic/source/uno/namecont \
basic/source/uno/sbmodule \
- basic/source/uno/sbservices \
basic/source/uno/scriptcont \
basic/source/runtime/comenumwrapper \
basic/source/runtime/ddectrl \
diff --git a/basic/source/inc/dlgcont.hxx b/basic/source/inc/dlgcont.hxx
index 4259674..33155af 100644
--- a/basic/source/inc/dlgcont.hxx
+++ b/basic/source/inc/dlgcont.hxx
@@ -94,9 +94,6 @@ public:
// Service
static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_static();
static OUString getImplementationName_static();
- static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Create
- ( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xServiceManager )
- throw( ::com::sun::star::uno::Exception );
};
diff --git a/basic/source/inc/scriptcont.hxx b/basic/source/inc/scriptcont.hxx
index 116e05c..2f21441 100644
--- a/basic/source/inc/scriptcont.hxx
+++ b/basic/source/inc/scriptcont.hxx
@@ -125,10 +125,6 @@ public:
// Service
static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_static();
static OUString getImplementationName_static();
- static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Create
- ( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xServiceManager )
- throw( ::com::sun::star::uno::Exception );
-
};
diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx
index b9d128b..6f22b95 100644
--- a/basic/source/uno/dlgcont.cxx
+++ b/basic/source/uno/dlgcont.cxx
@@ -33,7 +33,6 @@
#include <com/sun/star/document/GraphicObjectResolver.hpp>
#include "dlgcont.hxx"
#include "sbmodule.hxx"
-#include "sbservices.hxx"
#include <comphelper/processfactory.hxx>
#include <unotools/streamwrap.hxx>
#include <osl/mutex.hxx>
@@ -450,11 +449,6 @@ SfxDialogLibraryContainer:: HasExecutableCode( const OUString& /*Library*/ ) thr
// Service
-void createRegistryInfo_SfxDialogLibraryContainer()
-{
- static OAutoRegistration< SfxDialogLibraryContainer > aAutoRegistration;
-}
-
OUString SAL_CALL SfxDialogLibraryContainer::getImplementationName( ) throw (RuntimeException, std::exception)
{
return getImplementationName_static();
@@ -479,14 +473,6 @@ OUString SfxDialogLibraryContainer::getImplementationName_static()
return OUString("com.sun.star.comp.sfx2.DialogLibraryContainer");
}
-Reference< XInterface > SAL_CALL SfxDialogLibraryContainer::Create( const Reference< XComponentContext >& ) throw( Exception )
-{
- Reference< XInterface > xRet =
- static_cast< XInterface* >( static_cast< OWeakObject* >(new SfxDialogLibraryContainer()) );
- return xRet;
-}
-
-
// Implementation class SfxDialogLibrary
@@ -608,4 +594,12 @@ bool SAL_CALL SfxDialogLibrary::isLibraryElementValid( ::com::sun::star::uno::An
}
+extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
+com_sun_star_comp_sfx2_DialogLibraryContainer_get_implementation(::com::sun::star::uno::XComponentContext*,
+ ::com::sun::star::uno::Sequence<css::uno::Any> const &)
+{
+ return cppu::acquire(new basic::SfxDialogLibraryContainer());
+}
+
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/uno/sbservices.cxx b/basic/source/uno/sbservices.cxx
deleted file mode 100644
index e3eafb9..0000000
--- a/basic/source/uno/sbservices.cxx
+++ /dev/null
@@ -1,50 +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 "sbmodule.hxx"
-#include "sbservices.hxx"
-
-namespace basic
-{
- static void initializeModule()
- {
- static bool bInitialized( false );
- if ( !bInitialized )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !bInitialized )
- {
- createRegistryInfo_SfxDialogLibraryContainer();
- createRegistryInfo_SfxScriptLibraryContainer();
- }
- }
- }
-
-
-} // namespace basic
-
-
-extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL sb_component_getFactory(
- const sal_Char* pImplementationName, void*, void* )
-{
- ::basic::initializeModule();
- return ::basic::BasicModule::getInstance().getComponentFactory( pImplementationName );
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/uno/sbservices.hxx b/basic/source/uno/sbservices.hxx
deleted file mode 100644
index a344b27..0000000
--- a/basic/source/uno/sbservices.hxx
+++ /dev/null
@@ -1,35 +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_BASIC_SOURCE_UNO_SBSERVICES_HXX
-#define INCLUDED_BASIC_SOURCE_UNO_SBSERVICES_HXX
-
-#include <sal/config.h>
-
-namespace basic {
-
-void createRegistryInfo_SfxDialogLibraryContainer();
-
-void createRegistryInfo_SfxScriptLibraryContainer();
-
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index 43da15a..73bcbec 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -19,7 +19,6 @@
#include "scriptcont.hxx"
#include "sbmodule.hxx"
-#include "sbservices.hxx"
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/xml/sax/Parser.hpp>
#include <com/sun/star/xml/sax/InputSource.hpp>
@@ -1191,11 +1190,6 @@ sal_Bool SAL_CALL SfxScriptLibraryContainer:: HasExecutableCode( const OUString&
// Service
-void createRegistryInfo_SfxScriptLibraryContainer()
-{
- static OAutoRegistration< SfxScriptLibraryContainer > aAutoRegistration;
-}
-
OUString SAL_CALL SfxScriptLibraryContainer::getImplementationName( )
throw (RuntimeException, std::exception)
{
@@ -1222,14 +1216,6 @@ OUString SfxScriptLibraryContainer::getImplementationName_static()
return OUString("com.sun.star.comp.sfx2.ScriptLibraryContainer" );
}
-Reference< XInterface > SAL_CALL SfxScriptLibraryContainer::Create( const Reference< XComponentContext >& )
- throw( Exception )
-{
- Reference< XInterface > xRet = static_cast< XInterface* >( static_cast< OWeakObject* >(new SfxScriptLibraryContainer()) );
- return xRet;
-}
-
-
// Implementation class SfxScriptLibrary
// Ctor
@@ -1352,9 +1338,15 @@ void SAL_CALL SfxScriptLibrary::removeModuleInfo( const OUString& ModuleName )
mModuleInfos.erase( mModuleInfos.find( ModuleName ) );
}
+} // namespace basic
+extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
+com_sun_star_comp_sfx2_ScriptLibraryContainer_get_implementation(::com::sun::star::uno::XComponentContext*,
+ ::com::sun::star::uno::Sequence<css::uno::Any> const &)
+{
+ return cppu::acquire(new basic::SfxScriptLibraryContainer());
+}
-} // namespace basic
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/util/sb.component b/basic/util/sb.component
index 15e9998..710c37f 100644
--- a/basic/util/sb.component
+++ b/basic/util/sb.component
@@ -19,11 +19,13 @@
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
prefix="sb" xmlns="http://openoffice.org/2010/uno-components">
- <implementation name="com.sun.star.comp.sfx2.DialogLibraryContainer">
+ <implementation name="com.sun.star.comp.sfx2.DialogLibraryContainer"
+ constructor="com_sun_star_comp_sfx2_DialogLibraryContainer_get_implementation">
<service name="com.sun.star.script.DialogLibraryContainer"/>
<service name="com.sun.star.script.DocumentDialogLibraryContainer"/>
</implementation>
- <implementation name="com.sun.star.comp.sfx2.ScriptLibraryContainer">
+ <implementation name="com.sun.star.comp.sfx2.ScriptLibraryContainer"
+ constructor="com_sun_star_comp_sfx2_ScriptLibraryContainer_get_implementation">
<service name="com.sun.star.script.DocumentScriptLibraryContainer"/>
<service name="com.sun.star.script.ScriptLibraryContainer"/>
</implementation>
commit 02858e300c3999d176957b1f89228c2009ed2144
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Feb 26 14:46:03 2015 +0100
Clean up previous commit
Change-Id: I754ac95c851892bdf7630d6f6241ed86f3750cf1
diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx
index ed91a6d..af951ce 100644
--- a/sw/source/ui/uno/swdetect.cxx
+++ b/sw/source/ui/uno/swdetect.cxx
@@ -113,7 +113,7 @@ OUString SAL_CALL SwFilterDetect::detect( Sequence< PropertyValue >& lDescriptor
/* XServiceInfo */
OUString SAL_CALL SwFilterDetect::getImplementationName() throw( RuntimeException, std::exception )
{
- return impl_getStaticImplementationName();
+ return OUString("com.sun.star.comp.writer.FormatDetector" );
}
/* XServiceInfo */
@@ -125,12 +125,6 @@ sal_Bool SAL_CALL SwFilterDetect::supportsService( const OUString& sServiceName
/* XServiceInfo */
Sequence< OUString > SAL_CALL SwFilterDetect::getSupportedServiceNames() throw( RuntimeException, std::exception )
{
- return impl_getStaticSupportedServiceNames();
-}
-
-/* Helper for XServiceInfo */
-Sequence< OUString > SwFilterDetect::impl_getStaticSupportedServiceNames()
-{
Sequence< OUString > seqServiceNames( 3 );
seqServiceNames.getArray() [0] = "com.sun.star.frame.ExtendedTypeDetection";
seqServiceNames.getArray() [1] = "com.sun.star.text.FormatDetector";
@@ -138,14 +132,8 @@ Sequence< OUString > SwFilterDetect::impl_getStaticSupportedServiceNames()
return seqServiceNames ;
}
-/* Helper for XServiceInfo */
-OUString SwFilterDetect::impl_getStaticImplementationName()
-{
- return OUString("com.sun.star.comp.writer.FormatDetector" );
-}
-
extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
-com_sun_star_comp_writer_FormatDetector_get_implementation(::com::sun::star::uno::XComponentContext* component,
+com_sun_star_comp_writer_FormatDetector_get_implementation(::com::sun::star::uno::XComponentContext*,
::com::sun::star::uno::Sequence<css::uno::Any> const &)
{
return cppu::acquire(new SwFilterDetect());
diff --git a/sw/source/ui/uno/swdetect.hxx b/sw/source/ui/uno/swdetect.hxx
index eba0753..d213862 100644
--- a/sw/source/ui/uno/swdetect.hxx
+++ b/sw/source/ui/uno/swdetect.hxx
@@ -39,10 +39,6 @@ namespace com
{
namespace star
{
- namespace lang
- {
- class XMultiServiceFactory;
- }
namespace beans
{
struct PropertyValue;
@@ -66,10 +62,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& sServiceName ) throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
- /* Helper for XServiceInfo */
- static css::uno::Sequence< OUString > impl_getStaticSupportedServiceNames();
- static OUString impl_getStaticImplementationName();
-
// XExtendedFilterDetect
virtual OUString SAL_CALL detect( css::uno::Sequence< css::beans::PropertyValue >& lDescriptor ) throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
};
diff --git a/sw/util/swd.component b/sw/util/swd.component
index e09b385..be51018 100644
--- a/sw/util/swd.component
+++ b/sw/util/swd.component
@@ -18,9 +18,9 @@
-->
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
- prefix="swd" xmlns="http://openoffice.org/2010/uno-components">
- <implementation name="com.sun.star.comp.writer.FormatDetector"
- constructor="com_sun_star_comp_writer_FormatDetector_get_implementation">
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.writer.FormatDetector"
+ constructor="com_sun_star_comp_writer_FormatDetector_get_implementation">
<service name="com.sun.star.frame.ExtendedTypeDetection"/>
<service name="com.sun.star.text.FormatDetector"/>
<service name="com.sun.star.text.W4WFormatDetector"/>
commit 680b510c9772643a7df61816f398bf6b7c689062
Author: Chris Sherlock <chris.sherlock at collabora.com>
Date: Tue Feb 24 14:06:26 2015 +1100
sw: convert swd.component to constructor usage
Whilst we are about it, need to expand the macro
SFX_DECL_XSERVICEINFO_NOFACTORY and remove the impl_createInstance
function. Also removed factory parameter from constructor as not
needed.
Change-Id: I400274fa9aaaa95be1c9929bce9dd6f25c780196
Signed-off-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/sw/Library_swd.mk b/sw/Library_swd.mk
index 8657cf1..6396a28 100644
--- a/sw/Library_swd.mk
+++ b/sw/Library_swd.mk
@@ -42,7 +42,6 @@ $(eval $(call gb_Library_use_libraries,swd,\
))
$(eval $(call gb_Library_add_exception_objects,swd,\
- sw/source/ui/uno/detreg \
sw/source/ui/uno/swdetect \
))
diff --git a/sw/source/ui/uno/detreg.cxx b/sw/source/ui/uno/detreg.cxx
deleted file mode 100644
index d6d6208..0000000
--- a/sw/source/ui/uno/detreg.cxx
+++ /dev/null
@@ -1,66 +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 "swdetect.hxx"
-
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-
-extern "C" {
-
-SAL_DLLPUBLIC_EXPORT void* SAL_CALL swd_component_getFactory(
- const sal_Char* pImplementationName,
- void* pServiceManager,
- void* /*pRegistryKey*/ )
-{
- // Set default return value for this operation - if it failed.
- void* pReturn = NULL ;
-
- if (
- ( pImplementationName != NULL ) &&
- ( pServiceManager != NULL )
- )
- {
- // Define variables which are used in following macros.
- Reference< XSingleServiceFactory > xFactory ;
- Reference< XMultiServiceFactory > xServiceManager( reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
-
- if( SwFilterDetect::impl_getStaticImplementationName().equalsAscii( pImplementationName ) )
- {
- xFactory = ::cppu::createSingleFactory( xServiceManager,
- SwFilterDetect::impl_getStaticImplementationName(),
- SwFilterDetect::impl_createInstance,
- SwFilterDetect::impl_getStaticSupportedServiceNames() );
- }
-
- // Factory is valid - service was found.
- if ( xFactory.is() )
- {
- xFactory->acquire();
- pReturn = xFactory.get();
- }
- }
-
- // Return with result of this operation.
- return pReturn ;
-}
-} // extern "C"
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx
index eff1d64..ed91a6d 100644
--- a/sw/source/ui/uno/swdetect.cxx
+++ b/sw/source/ui/uno/swdetect.cxx
@@ -34,7 +34,7 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::lang;
using utl::MediaDescriptor;
-SwFilterDetect::SwFilterDetect( const Reference < XMultiServiceFactory >& /*xFactory*/ )
+SwFilterDetect::SwFilterDetect()
{
}
@@ -144,10 +144,11 @@ OUString SwFilterDetect::impl_getStaticImplementationName()
return OUString("com.sun.star.comp.writer.FormatDetector" );
}
-/* Helper for registry */
-Reference< XInterface > SAL_CALL SwFilterDetect::impl_createInstance( const Reference< XMultiServiceFactory >& xServiceManager ) throw( Exception )
+extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
+com_sun_star_comp_writer_FormatDetector_get_implementation(::com::sun::star::uno::XComponentContext* component,
+ ::com::sun::star::uno::Sequence<css::uno::Any> const &)
{
- return Reference< XInterface >( *new SwFilterDetect( xServiceManager ) );
+ return cppu::acquire(new SwFilterDetect());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uno/swdetect.hxx b/sw/source/ui/uno/swdetect.hxx
index ea28ccf..eba0753 100644
--- a/sw/source/ui/uno/swdetect.hxx
+++ b/sw/source/ui/uno/swdetect.hxx
@@ -58,10 +58,17 @@ class SfxFilter;
class SwFilterDetect : public ::cppu::WeakImplHelper2< css::document::XExtendedFilterDetection, css::lang::XServiceInfo >
{
public:
- SwFilterDetect( const css::uno::Reference < css::lang::XMultiServiceFactory >& xFactory );
+ SwFilterDetect();
virtual ~SwFilterDetect();
- SFX_DECL_XSERVICEINFO_NOFACTORY
+ /* XServiceInfo */
+ virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
+ virtual sal_Bool SAL_CALL supportsService( const OUString& sServiceName ) throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
+
+ /* Helper for XServiceInfo */
+ static css::uno::Sequence< OUString > impl_getStaticSupportedServiceNames();
+ static OUString impl_getStaticImplementationName();
// XExtendedFilterDetect
virtual OUString SAL_CALL detect( css::uno::Sequence< css::beans::PropertyValue >& lDescriptor ) throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
diff --git a/sw/util/swd.component b/sw/util/swd.component
index a342f05..e09b385 100644
--- a/sw/util/swd.component
+++ b/sw/util/swd.component
@@ -19,7 +19,8 @@
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
prefix="swd" xmlns="http://openoffice.org/2010/uno-components">
- <implementation name="com.sun.star.comp.writer.FormatDetector">
+ <implementation name="com.sun.star.comp.writer.FormatDetector"
+ constructor="com_sun_star_comp_writer_FormatDetector_get_implementation">
<service name="com.sun.star.frame.ExtendedTypeDetection"/>
<service name="com.sun.star.text.FormatDetector"/>
<service name="com.sun.star.text.W4WFormatDetector"/>
commit 866e7c38112a695baa1ae20090c28a02a1d0b0f3
Author: Chris Sherlock <chris.sherlock at collabora.com>
Date: Tue Feb 24 02:07:17 2015 +1100
sw: convert SwWebDocument & SwGlobalDocument components to use constructor
Change-Id: Ib59fa91eb9d32ea437c182d3c0f3b9348816bf7b
Signed-off-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/sw/source/core/inc/unofreg.hxx b/sw/source/core/inc/unofreg.hxx
index 3e6a1f3..0b49ffd 100644
--- a/sw/source/core/inc/unofreg.hxx
+++ b/sw/source/core/inc/unofreg.hxx
@@ -38,12 +38,6 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL SwUnoModule_createInstance(
css::uno::Sequence< OUString > SAL_CALL SwTextDocument_getSupportedServiceNames() throw();
OUString SAL_CALL SwTextDocument_getImplementationName() throw();
css::uno::Reference< css::uno::XInterface > SAL_CALL SwTextDocument_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory > &rSMgr, const sal_uInt64 _nCreationFlags ) throw( css::uno::Exception );
-css::uno::Sequence< OUString > SAL_CALL SwWebDocument_getSupportedServiceNames() throw();
-OUString SAL_CALL SwWebDocument_getImplementationName() throw();
-css::uno::Reference< css::uno::XInterface > SAL_CALL SwWebDocument_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory > &rSMgr ) throw( css::uno::Exception );
-css::uno::Sequence< OUString > SAL_CALL SwGlobalDocument_getSupportedServiceNames() throw();
-OUString SAL_CALL SwGlobalDocument_getImplementationName() throw();
-css::uno::Reference< css::uno::XInterface > SAL_CALL SwGlobalDocument_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory > &rSMgr ) throw( css::uno::Exception );
//API objects
css::uno::Sequence< OUString > SAL_CALL SwXAutoTextContainer_getSupportedServiceNames() throw();
diff --git a/sw/source/uibase/uno/unodoc.cxx b/sw/source/uibase/uno/unodoc.cxx
index 41189d2..2f4291b 100644
--- a/sw/source/uibase/uno/unodoc.cxx
+++ b/sw/source/uibase/uno/unodoc.cxx
@@ -26,6 +26,7 @@
#include "wdocsh.hxx"
#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
+#include <cppuhelper/weak.hxx>
using namespace ::com::sun::star;
@@ -57,58 +58,29 @@ uno::Reference< uno::XInterface > SAL_CALL SwTextDocument_createInstance(
return uno::Reference< uno::XInterface >( pShell->GetModel() );
}
-// com.sun.star.comp.Writer.WebDocument
-
-uno::Sequence< OUString > SAL_CALL SwWebDocument_getSupportedServiceNames() throw()
-{
- // return only top level services here! All others must be
- // resolved by rtti!
- uno::Sequence< OUString > aRet ( 1 );
- OUString* pArray = aRet.getArray();
- pArray[0] = "com.sun.star.text.WebDocument";
-
- return aRet;
-}
-
-OUString SAL_CALL SwWebDocument_getImplementationName() throw()
-{
- return OUString( "com.sun.star.comp.Writer.WebDocument" );
-}
-
-uno::Reference< uno::XInterface > SAL_CALL SwWebDocument_createInstance(
- const uno::Reference< lang::XMultiServiceFactory > & )
- throw( uno::Exception )
+extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
+com_sun_star_comp_Writer_WebDocument_get_implementation(::com::sun::star::uno::XComponentContext*,
+ ::com::sun::star::uno::Sequence<css::uno::Any> const &)
{
SolarMutexGuard aGuard;
SwGlobals::ensure();
SfxObjectShell* pShell = new SwWebDocShell( SFX_CREATE_MODE_STANDARD );
- return uno::Reference< uno::XInterface >( pShell->GetModel() );
-}
-
-// com.sun.star.comp.Writer.GlobalDocument
-
-uno::Sequence< OUString > SAL_CALL SwGlobalDocument_getSupportedServiceNames() throw()
-{
- uno::Sequence< OUString > aRet ( 1 );
- OUString* pArray = aRet.getArray();
- pArray[0] = "com.sun.star.text.GlobalDocument";
-
- return aRet;
+ uno::Reference< uno::XInterface > model( pShell->GetModel() );
+ model->acquire();
+ return model.get();
}
-OUString SAL_CALL SwGlobalDocument_getImplementationName() throw()
-{
- return OUString( "com.sun.star.comp.Writer.GlobalDocument" );
-}
-uno::Reference< uno::XInterface > SAL_CALL SwGlobalDocument_createInstance(
- const uno::Reference< lang::XMultiServiceFactory > &)
- throw( uno::Exception )
+extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
+com_sun_star_comp_Writer_GlobalDocument_get_implementation(::com::sun::star::uno::XComponentContext*,
+ ::com::sun::star::uno::Sequence<css::uno::Any> const &)
{
SolarMutexGuard aGuard;
SwGlobals::ensure();
SfxObjectShell* pShell = new SwGlobalDocShell( SFX_CREATE_MODE_STANDARD );
- return uno::Reference< uno::XInterface >( pShell->GetModel() );
+ uno::Reference< uno::XInterface > model( pShell->GetModel() );
+ model->acquire();
+ return model.get();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/uno/unofreg.cxx b/sw/source/uibase/uno/unofreg.cxx
index 84105c1..c5b2138 100644
--- a/sw/source/uibase/uno/unofreg.cxx
+++ b/sw/source/uibase/uno/unofreg.cxx
@@ -102,22 +102,6 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL sw_component_getFactory(
SwTextDocument_createInstance,
SwTextDocument_getSupportedServiceNames() );
}
- else if( SwWebDocument_getImplementationName().equalsAsciiL(
- pImplName, nImplNameLen ) )
- {
- xFactory = ::cppu::createSingleFactory( xMSF,
- SwWebDocument_getImplementationName(),
- SwWebDocument_createInstance,
- SwWebDocument_getSupportedServiceNames() );
- }
- else if( SwGlobalDocument_getImplementationName().equalsAsciiL(
- pImplName, nImplNameLen ) )
- {
- xFactory = ::cppu::createSingleFactory( xMSF,
- SwGlobalDocument_getImplementationName(),
- SwGlobalDocument_createInstance,
- SwGlobalDocument_getSupportedServiceNames() );
- }
else if( SwUnoModule_getImplementationName().equalsAsciiL(
pImplName, nImplNameLen ) )
{
diff --git a/sw/util/sw.component b/sw/util/sw.component
index 81baa5f..0b75e67 100644
--- a/sw/util/sw.component
+++ b/sw/util/sw.component
@@ -31,13 +31,15 @@
<implementation name="com.sun.star.comp.Writer.FilterOptionsDialog">
<service name="com.sun.star.ui.dialogs.FilterOptionsDialog"/>
</implementation>
- <implementation name="com.sun.star.comp.Writer.GlobalDocument">
+ <implementation name="com.sun.star.comp.Writer.GlobalDocument"
+ constructor="com_sun_star_comp_Writer_GlobalDocument_get_implementation">
<service name="com.sun.star.text.GlobalDocument"/>
</implementation>
<implementation name="com.sun.star.comp.Writer.TextDocument">
<service name="com.sun.star.text.TextDocument"/>
</implementation>
- <implementation name="com.sun.star.comp.Writer.WebDocument">
+ <implementation name="com.sun.star.comp.Writer.WebDocument"
+ constructor="com_sun_star_comp_Writer_WebDocument_get_implementation">
<service name="com.sun.star.text.WebDocument"/>
</implementation>
<implementation name="com.sun.star.comp.Writer.WriterModule">
commit a22433785ae70ae6a97a6ff15f218138856603dc
Author: Chris Sherlock <chris.sherlock at collabora.com>
Date: Mon Feb 23 11:41:59 2015 +1100
sw: convert import & export components to constructor usage
Change-Id: I15b64f874f72715cea04f656e1b883c6cf45a86c
Signed-off-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/sw/source/core/inc/unofreg.hxx b/sw/source/core/inc/unofreg.hxx
index d404281..3e6a1f3 100644
--- a/sw/source/core/inc/unofreg.hxx
+++ b/sw/source/core/inc/unofreg.hxx
@@ -45,59 +45,6 @@ css::uno::Sequence< OUString > SAL_CALL SwGlobalDocument_getSupportedServiceName
OUString SAL_CALL SwGlobalDocument_getImplementationName() throw();
css::uno::Reference< css::uno::XInterface > SAL_CALL SwGlobalDocument_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory > &rSMgr ) throw( css::uno::Exception );
-// xml import
-css::uno::Sequence< OUString > SAL_CALL SwXMLImport_getSupportedServiceNames() throw();
-OUString SAL_CALL SwXMLImport_getImplementationName() throw();
-css::uno::Reference< css::uno::XInterface > SAL_CALL SwXMLImport_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) throw( css::uno::Exception );
-css::uno::Sequence< OUString > SAL_CALL SwXMLImportStyles_getSupportedServiceNames() throw();
-OUString SAL_CALL SwXMLImportStyles_getImplementationName() throw();
-css::uno::Reference< css::uno::XInterface > SAL_CALL SwXMLImportStyles_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) throw( css::uno::Exception );
-css::uno::Sequence< OUString > SAL_CALL SwXMLImportContent_getSupportedServiceNames() throw();
-OUString SAL_CALL SwXMLImportContent_getImplementationName() throw();
-css::uno::Reference< css::uno::XInterface > SAL_CALL SwXMLImportContent_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) throw( css::uno::Exception );
-
-css::uno::Sequence< OUString > SAL_CALL SwXMLImportMeta_getSupportedServiceNames() throw();
-OUString SAL_CALL SwXMLImportMeta_getImplementationName() throw();
-css::uno::Reference< css::uno::XInterface > SAL_CALL SwXMLImportMeta_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) throw( css::uno::Exception );
-
-css::uno::Sequence< OUString > SAL_CALL SwXMLImportSettings_getSupportedServiceNames() throw();
-OUString SAL_CALL SwXMLImportSettings_getImplementationName() throw();
-css::uno::Reference< css::uno::XInterface > SAL_CALL SwXMLImportSettings_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) throw( css::uno::Exception );
-
-// xml export (OOo)
-css::uno::Sequence< OUString > SAL_CALL SwXMLExportOOO_getSupportedServiceNames() throw();
-OUString SAL_CALL SwXMLExportOOO_getImplementationName() throw();
-css::uno::Reference< css::uno::XInterface > SAL_CALL SwXMLExportOOO_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) throw( css::uno::Exception );
-css::uno::Sequence< OUString > SAL_CALL SwXMLExportContentOOO_getSupportedServiceNames() throw();
-OUString SAL_CALL SwXMLExportContentOOO_getImplementationName() throw();
-css::uno::Reference< css::uno::XInterface > SAL_CALL SwXMLExportContentOOO_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) throw( css::uno::Exception );
-css::uno::Sequence< OUString > SAL_CALL SwXMLExportStylesOOO_getSupportedServiceNames() throw();
-OUString SAL_CALL SwXMLExportStylesOOO_getImplementationName() throw();
-css::uno::Reference< css::uno::XInterface > SAL_CALL SwXMLExportStylesOOO_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) throw( css::uno::Exception );
-css::uno::Sequence< OUString > SAL_CALL SwXMLExportMetaOOO_getSupportedServiceNames() throw();
-OUString SAL_CALL SwXMLExportMetaOOO_getImplementationName() throw();
-css::uno::Reference< css::uno::XInterface > SAL_CALL SwXMLExportMetaOOO_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) throw( css::uno::Exception );
-css::uno::Sequence< OUString > SAL_CALL SwXMLExportSettingsOOO_getSupportedServiceNames() throw();
-OUString SAL_CALL SwXMLExportSettingsOOO_getImplementationName() throw();
-css::uno::Reference< css::uno::XInterface > SAL_CALL SwXMLExportSettingsOOO_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) throw( css::uno::Exception );
-
-// xml export (OASIS)
-css::uno::Sequence< OUString > SAL_CALL SwXMLExport_getSupportedServiceNames() throw();
-OUString SAL_CALL SwXMLExport_getImplementationName() throw();
-css::uno::Reference< css::uno::XInterface > SAL_CALL SwXMLExport_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) throw( css::uno::Exception );
-css::uno::Sequence< OUString > SAL_CALL SwXMLExportContent_getSupportedServiceNames() throw();
-OUString SAL_CALL SwXMLExportContent_getImplementationName() throw();
-css::uno::Reference< css::uno::XInterface > SAL_CALL SwXMLExportContent_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) throw( css::uno::Exception );
-css::uno::Sequence< OUString > SAL_CALL SwXMLExportStyles_getSupportedServiceNames() throw();
-OUString SAL_CALL SwXMLExportStyles_getImplementationName() throw();
-css::uno::Reference< css::uno::XInterface > SAL_CALL SwXMLExportStyles_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) throw( css::uno::Exception );
-css::uno::Sequence< OUString > SAL_CALL SwXMLExportMeta_getSupportedServiceNames() throw();
-OUString SAL_CALL SwXMLExportMeta_getImplementationName() throw();
-css::uno::Reference< css::uno::XInterface > SAL_CALL SwXMLExportMeta_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) throw( css::uno::Exception );
-css::uno::Sequence< OUString > SAL_CALL SwXMLExportSettings_getSupportedServiceNames() throw();
-OUString SAL_CALL SwXMLExportSettings_getImplementationName() throw();
-css::uno::Reference< css::uno::XInterface > SAL_CALL SwXMLExportSettings_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) throw( css::uno::Exception );
-
//API objects
css::uno::Sequence< OUString > SAL_CALL SwXAutoTextContainer_getSupportedServiceNames() throw();
OUString SAL_CALL SwXAutoTextContainer_getImplementationName() throw();
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index 1af695c..ba6c78e 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -500,271 +500,131 @@ void SwXMLExport::_ExportContent()
GetTextParagraphExport()->exportText( xText, bShowProgress );
}
-// uno component registration
-// helper functions for export service(s)
-
-// OOo
-OUString SAL_CALL SwXMLExportOOO_getImplementationName() throw()
-{
- return OUString(
- "com.sun.star.comp.Writer.XMLExporter" );
-}
-
-Sequence< OUString > SAL_CALL SwXMLExportOOO_getSupportedServiceNames()
- throw()
-{
- const OUString aServiceName(SwXMLExportOOO_getImplementationName());
- const Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
-}
-
-Reference< XInterface > SAL_CALL SwXMLExportOOO_createInstance(
- const Reference< XMultiServiceFactory > & rSMgr)
- throw( Exception )
-{
- return (cppu::OWeakObject*)new SwXMLExport( comphelper::getComponentContext(rSMgr), SwXMLExportOOO_getImplementationName(), SvXMLExportFlags::ALL);
-}
-
-OUString SAL_CALL SwXMLExportStylesOOO_getImplementationName() throw()
-{
- return OUString(
- "com.sun.star.comp.Writer.XMLStylesExporter" );
-}
-
-Sequence< OUString > SAL_CALL SwXMLExportStylesOOO_getSupportedServiceNames()
- throw()
-{
- const OUString aServiceName(SwXMLExportStylesOOO_getImplementationName());
- const Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
-}
-
-Reference< XInterface > SAL_CALL SwXMLExportStylesOOO_createInstance(
- const Reference< XMultiServiceFactory > & rSMgr)
- throw( Exception )
-{
- return (cppu::OWeakObject*)new SwXMLExport( comphelper::getComponentContext(rSMgr), SwXMLExportStylesOOO_getImplementationName(),
- SvXMLExportFlags::STYLES | SvXMLExportFlags::MASTERSTYLES | SvXMLExportFlags::AUTOSTYLES |
- SvXMLExportFlags::FONTDECLS );
-}
-
-OUString SAL_CALL SwXMLExportContentOOO_getImplementationName() throw()
-{
- return OUString(
- "com.sun.star.comp.Writer.XMLContentExporter" );
-}
-
-Sequence< OUString > SAL_CALL SwXMLExportContentOOO_getSupportedServiceNames()
- throw()
-{
- const OUString aServiceName(SwXMLExportContentOOO_getImplementationName());
- const Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
-}
-
-Reference< XInterface > SAL_CALL SwXMLExportContentOOO_createInstance(
- const Reference< XMultiServiceFactory > & rSMgr)
- throw( Exception )
-{
- return (cppu::OWeakObject*)new SwXMLExport( comphelper::getComponentContext(rSMgr), SwXMLExportContentOOO_getImplementationName(),
- SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::CONTENT | SvXMLExportFlags::SCRIPTS |
- SvXMLExportFlags::FONTDECLS );
-}
-
-OUString SAL_CALL SwXMLExportMetaOOO_getImplementationName() throw()
-{
- return OUString(
- "com.sun.star.comp.Writer.XMLMetaExporter" );
-}
-
-Sequence< OUString > SAL_CALL SwXMLExportMetaOOO_getSupportedServiceNames()
- throw()
-{
- const OUString aServiceName(SwXMLExportMetaOOO_getImplementationName());
- const Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
-}
-
-Reference< XInterface > SAL_CALL SwXMLExportMetaOOO_createInstance(
- const Reference< XMultiServiceFactory > & rSMgr)
- throw( Exception )
-{
- return (cppu::OWeakObject*)new SwXMLExport( comphelper::getComponentContext(rSMgr), SwXMLExportMetaOOO_getImplementationName(), SvXMLExportFlags::META);
-}
-
-OUString SAL_CALL SwXMLExportSettingsOOO_getImplementationName() throw()
-{
- return OUString(
- "com.sun.star.comp.Writer.XMLSettingsExporter" );
-}
-
-Sequence< OUString > SAL_CALL SwXMLExportSettingsOOO_getSupportedServiceNames()
- throw()
-{
- const OUString aServiceName(SwXMLExportSettingsOOO_getImplementationName());
- const Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
-}
-
-Reference< XInterface > SAL_CALL SwXMLExportSettingsOOO_createInstance(
- const Reference< XMultiServiceFactory > & rSMgr)
- throw( Exception )
-{
- return (cppu::OWeakObject*)new SwXMLExport( comphelper::getComponentContext(rSMgr), SwXMLExportSettingsOOO_getImplementationName(), SvXMLExportFlags::SETTINGS);
-}
-
-// OASIS
-OUString SAL_CALL SwXMLExport_getImplementationName() throw()
-{
- return OUString(
- "com.sun.star.comp.Writer.XMLOasisExporter" );
-}
-
-Sequence< OUString > SAL_CALL SwXMLExport_getSupportedServiceNames()
- throw()
-{
- const OUString aServiceName(SwXMLExport_getImplementationName());
- const Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
-}
-
-Reference< XInterface > SAL_CALL SwXMLExport_createInstance(
- const Reference< XMultiServiceFactory > & rSMgr)
- throw( Exception )
-{
- return (cppu::OWeakObject*)new SwXMLExport( comphelper::getComponentContext(rSMgr), SwXMLExport_getImplementationName(), SvXMLExportFlags::ALL|SvXMLExportFlags::OASIS);
-}
-
-OUString SAL_CALL SwXMLExportStyles_getImplementationName() throw()
-{
- return OUString(
- "com.sun.star.comp.Writer.XMLOasisStylesExporter" );
-}
-
-Sequence< OUString > SAL_CALL SwXMLExportStyles_getSupportedServiceNames()
- throw()
-{
- const OUString aServiceName(SwXMLExportStyles_getImplementationName());
- const Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
-}
-
-Reference< XInterface > SAL_CALL SwXMLExportStyles_createInstance(
- const Reference< XMultiServiceFactory > & rSMgr)
- throw( Exception )
+namespace
{
- return (cppu::OWeakObject*)new SwXMLExport( comphelper::getComponentContext(rSMgr), SwXMLExportStyles_getImplementationName(),
- SvXMLExportFlags::STYLES | SvXMLExportFlags::MASTERSTYLES | SvXMLExportFlags::AUTOSTYLES |
- SvXMLExportFlags::FONTDECLS|SvXMLExportFlags::OASIS );
+ class theSwXMLExportUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSwXMLExportUnoTunnelId > {};
}
-OUString SAL_CALL SwXMLExportContent_getImplementationName() throw()
+const Sequence< sal_Int8 > & SwXMLExport::getUnoTunnelId() throw()
{
- return OUString(
- "com.sun.star.comp.Writer.XMLOasisContentExporter" );
+ return theSwXMLExportUnoTunnelId::get().getSeq();
}
-Sequence< OUString > SAL_CALL SwXMLExportContent_getSupportedServiceNames()
- throw()
+sal_Int64 SAL_CALL SwXMLExport::getSomething( const Sequence< sal_Int8 >& rId )
+ throw(RuntimeException, std::exception)
{
- const OUString aServiceName(SwXMLExportContent_getImplementationName());
- const Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
+ if( rId.getLength() == 16
+ && 0 == memcmp( getUnoTunnelId().getConstArray(),
+ rId.getConstArray(), 16 ) )
+ {
+ return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) );
+ }
+ return SvXMLExport::getSomething( rId );
}
-Reference< XInterface > SAL_CALL SwXMLExportContent_createInstance(
- const Reference< XMultiServiceFactory > & rSMgr)
- throw( Exception )
+SwDoc* SwXMLExport::getDoc()
{
- return (cppu::OWeakObject*)new SwXMLExport(
- comphelper::getComponentContext(rSMgr), SwXMLExportContent_getImplementationName(),
- SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::CONTENT | SvXMLExportFlags::SCRIPTS |
- SvXMLExportFlags::FONTDECLS|SvXMLExportFlags::OASIS );
+ if( doc != NULL )
+ return doc;
+ Reference < XTextDocument > xTextDoc( GetModel(), UNO_QUERY );
+ Reference < XText > xText = xTextDoc->getText();
+ Reference<XUnoTunnel> xTextTunnel( xText, UNO_QUERY);
+ assert( xTextTunnel.is());
+ SwXText *pText = reinterpret_cast< SwXText *>(
+ sal::static_int_cast< sal_IntPtr >( xTextTunnel->getSomething( SwXText::getUnoTunnelId() )));
+ assert( pText != NULL );
+ doc = pText->GetDoc();
+ assert( doc != NULL );
+ return doc;
}
-OUString SAL_CALL SwXMLExportMeta_getImplementationName() throw()
+const SwDoc* SwXMLExport::getDoc() const
{
- return OUString(
- "com.sun.star.comp.Writer.XMLOasisMetaExporter" );
+ return const_cast< SwXMLExport* >( this )->getDoc();
}
-Sequence< OUString > SAL_CALL SwXMLExportMeta_getSupportedServiceNames()
- throw()
+extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
+com_sun_star_comp_Writer_XMLExporter_get_implementation(::com::sun::star::uno::XComponentContext* context,
+ ::com::sun::star::uno::Sequence<css::uno::Any> const &)
{
- const OUString aServiceName(SwXMLExportMeta_getImplementationName());
- const Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
+ return cppu::acquire(new SwXMLExport(context, OUString("com.sun.star.comp.Writer.XMLExporter"),
+ SvXMLExportFlags::ALL));
}
-Reference< XInterface > SAL_CALL SwXMLExportMeta_createInstance(
- const Reference< XMultiServiceFactory > & rSMgr)
- throw( Exception )
+extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
+com_sun_star_comp_Writer_XMLStylesExporter_get_implementation(::com::sun::star::uno::XComponentContext* context,
+ ::com::sun::star::uno::Sequence<css::uno::Any> const &)
{
- return (cppu::OWeakObject*)new SwXMLExport( comphelper::getComponentContext(rSMgr), SwXMLExportMeta_getImplementationName(), SvXMLExportFlags::META|SvXMLExportFlags::OASIS);
+ return cppu::acquire(new SwXMLExport(context, OUString("com.sun.star.comp.Writer.XMLStylesExporter"),
+ SvXMLExportFlags::STYLES | SvXMLExportFlags::MASTERSTYLES | SvXMLExportFlags::AUTOSTYLES |
+ SvXMLExportFlags::FONTDECLS));
}
-OUString SAL_CALL SwXMLExportSettings_getImplementationName() throw()
+extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
+com_sun_star_comp_Writer_XMLContentExporter_get_implementation(::com::sun::star::uno::XComponentContext* context,
+ ::com::sun::star::uno::Sequence<css::uno::Any> const &)
{
- return OUString(
- "com.sun.star.comp.Writer.XMLOasisSettingsExporter" );
+ return cppu::acquire(new SwXMLExport(context, OUString("com.sun.star.comp.Writer.XMLContentExporter"),
+ SvXMLExportFlags::SCRIPTS | SvXMLExportFlags::CONTENT | SvXMLExportFlags::AUTOSTYLES |
+ SvXMLExportFlags::FONTDECLS));
}
-Sequence< OUString > SAL_CALL SwXMLExportSettings_getSupportedServiceNames()
- throw()
+extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
+com_sun_star_comp_Writer_XMLMetaExporter_get_implementation(::com::sun::star::uno::XComponentContext* context,
+ ::com::sun::star::uno::Sequence<css::uno::Any> const &)
{
- const OUString aServiceName(SwXMLExportSettings_getImplementationName());
- const Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
+ return cppu::acquire(new SwXMLExport(context, OUString("com.sun.star.comp.Writer.XMLMetaExporter"),
+ SvXMLExportFlags::META));
}
-Reference< XInterface > SAL_CALL SwXMLExportSettings_createInstance(
- const Reference< XMultiServiceFactory > & rSMgr)
- throw( Exception )
+extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
+com_sun_star_comp_Writer_XMLSettingsExporter_get_implementation(::com::sun::star::uno::XComponentContext* context,
+ ::com::sun::star::uno::Sequence<css::uno::Any> const &)
{
- return (cppu::OWeakObject*)new SwXMLExport( comphelper::getComponentContext(rSMgr), SwXMLExportSettings_getImplementationName(), SvXMLExportFlags::SETTINGS|SvXMLExportFlags::OASIS);
+ return cppu::acquire(new SwXMLExport(context, OUString("com.sun.star.comp.Writer.XMLSettingsExporter"),
+ SvXMLExportFlags::SETTINGS));
}
-namespace
+extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
+com_sun_star_comp_Writer_XMLOasisExporter_get_implementation(::com::sun::star::uno::XComponentContext* context,
+ ::com::sun::star::uno::Sequence<css::uno::Any> const &)
{
- class theSwXMLExportUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSwXMLExportUnoTunnelId > {};
+ return cppu::acquire(new SwXMLExport(context, OUString("com.sun.star.comp.Writer.XMLOasisExporter"),
+ SvXMLExportFlags::ALL | SvXMLExportFlags::OASIS));
}
-const Sequence< sal_Int8 > & SwXMLExport::getUnoTunnelId() throw()
+extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
+com_sun_star_comp_Writer_XMLOasisStylesExporter_get_implementation(::com::sun::star::uno::XComponentContext* context,
+ ::com::sun::star::uno::Sequence<css::uno::Any> const &)
{
- return theSwXMLExportUnoTunnelId::get().getSeq();
+ return cppu::acquire(new SwXMLExport(context, OUString("com.sun.star.comp.Writer.XMLOasisStylesExporter"),
+ SvXMLExportFlags::STYLES | SvXMLExportFlags::MASTERSTYLES | SvXMLExportFlags::AUTOSTYLES |
+ SvXMLExportFlags::FONTDECLS | SvXMLExportFlags::OASIS));
}
-sal_Int64 SAL_CALL SwXMLExport::getSomething( const Sequence< sal_Int8 >& rId )
- throw(RuntimeException, std::exception)
+extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
+com_sun_star_comp_Writer_XMLOasisContentExporter_get_implementation(::com::sun::star::uno::XComponentContext* context,
+ ::com::sun::star::uno::Sequence<css::uno::Any> const &)
{
- if( rId.getLength() == 16
- && 0 == memcmp( getUnoTunnelId().getConstArray(),
- rId.getConstArray(), 16 ) )
- {
- return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) );
- }
- return SvXMLExport::getSomething( rId );
+ return cppu::acquire(new SwXMLExport(context, OUString("com.sun.star.comp.Writer.XMLOasisContentExporter"),
+ SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::CONTENT | SvXMLExportFlags::SCRIPTS |
+ SvXMLExportFlags::FONTDECLS | SvXMLExportFlags::OASIS));
}
-SwDoc* SwXMLExport::getDoc()
+extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
+com_sun_star_comp_Writer_XMLOasisMetaExporter_get_implementation(::com::sun::star::uno::XComponentContext* context,
+ ::com::sun::star::uno::Sequence<css::uno::Any> const &)
{
- if( doc != NULL )
- return doc;
- Reference < XTextDocument > xTextDoc( GetModel(), UNO_QUERY );
- Reference < XText > xText = xTextDoc->getText();
- Reference<XUnoTunnel> xTextTunnel( xText, UNO_QUERY);
- assert( xTextTunnel.is());
- SwXText *pText = reinterpret_cast< SwXText *>(
- sal::static_int_cast< sal_IntPtr >( xTextTunnel->getSomething( SwXText::getUnoTunnelId() )));
- assert( pText != NULL );
- doc = pText->GetDoc();
- assert( doc != NULL );
- return doc;
+ return cppu::acquire(new SwXMLExport(context, OUString("com.sun.star.comp.Writer.XMLOasisMetaExporter"),
+ SvXMLExportFlags::META | SvXMLExportFlags::OASIS));
}
-const SwDoc* SwXMLExport::getDoc() const
+extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
+com_sun_star_comp_Writer_XMLOasisSettingsExporter_get_implementation(::com::sun::star::uno::XComponentContext* context,
+ ::com::sun::star::uno::Sequence<css::uno::Any> const &)
{
- return const_cast< SwXMLExport* >( this )->getDoc();
+ return cppu::acquire(new SwXMLExport(context, OUString("com.sun.star.comp.Writer.XMLOasisSettingsExporter"),
+ SvXMLExportFlags::SETTINGS | SvXMLExportFlags::OASIS));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index dfd3266..ab8c9cc 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -1488,120 +1488,6 @@ void SwXMLImport::initialize(
}
}
-// UNO component registration helper functions
-OUString SAL_CALL SwXMLImport_getImplementationName() throw()
-{
- return OUString(
- "com.sun.star.comp.Writer.XMLOasisImporter" );
-}
-
-uno::Sequence< OUString > SAL_CALL SwXMLImport_getSupportedServiceNames()
- throw()
-{
- const OUString aServiceName( SwXMLImport_getImplementationName() );
- const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
-}
-
-uno::Reference< uno::XInterface > SAL_CALL SwXMLImport_createInstance(
- const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
- throw( uno::Exception )
-{
- return (cppu::OWeakObject*)new SwXMLImport( comphelper::getComponentContext(rSMgr), SwXMLImport_getImplementationName(), SvXMLImportFlags::ALL );
-}
-
-OUString SAL_CALL SwXMLImportStyles_getImplementationName() throw()
-{
- return OUString(
- "com.sun.star.comp.Writer.XMLOasisStylesImporter" );
-}
-
-uno::Sequence< OUString > SAL_CALL SwXMLImportStyles_getSupportedServiceNames()
- throw()
-{
- const OUString aServiceName( SwXMLImportStyles_getImplementationName() );
- const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
-}
-
-uno::Reference< uno::XInterface > SAL_CALL SwXMLImportStyles_createInstance(
- const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
- throw( uno::Exception )
-{
- return (cppu::OWeakObject*)new SwXMLImport(
- comphelper::getComponentContext(rSMgr),
- SwXMLImportStyles_getImplementationName(),
- SvXMLImportFlags::STYLES | SvXMLImportFlags::MASTERSTYLES | SvXMLImportFlags::AUTOSTYLES |
- SvXMLImportFlags::FONTDECLS );
-}
-
-OUString SAL_CALL SwXMLImportContent_getImplementationName() throw()
-{
- return OUString(
- "com.sun.star.comp.Writer.XMLOasisContentImporter" );
-}
-
-uno::Sequence< OUString > SAL_CALL SwXMLImportContent_getSupportedServiceNames()
- throw()
-{
- const OUString aServiceName( SwXMLImportContent_getImplementationName() );
- const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
-}
-
-uno::Reference< uno::XInterface > SAL_CALL SwXMLImportContent_createInstance(
- const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
- throw( uno::Exception )
-{
- return (cppu::OWeakObject*)new SwXMLImport(
- comphelper::getComponentContext(rSMgr),
- SwXMLImportContent_getImplementationName(),
- SvXMLImportFlags::AUTOSTYLES | SvXMLImportFlags::CONTENT | SvXMLImportFlags::SCRIPTS |
- SvXMLImportFlags::FONTDECLS );
-}
-
-OUString SAL_CALL SwXMLImportMeta_getImplementationName() throw()
-{
- return OUString(
- "com.sun.star.comp.Writer.XMLOasisMetaImporter" );
-}
-
-uno::Sequence< OUString > SAL_CALL SwXMLImportMeta_getSupportedServiceNames()
- throw()
-{
- const OUString aServiceName( SwXMLImportMeta_getImplementationName() );
- const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
-}
-
-uno::Reference< uno::XInterface > SAL_CALL SwXMLImportMeta_createInstance(
- const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
- throw( uno::Exception )
-{
- return (cppu::OWeakObject*)new SwXMLImport( comphelper::getComponentContext(rSMgr), SwXMLImportMeta_getImplementationName(), SvXMLImportFlags::META );
-}
-
-OUString SAL_CALL SwXMLImportSettings_getImplementationName() throw()
-{
- return OUString(
- "com.sun.star.comp.Writer.XMLOasisSettingsImporter" );
-}
-
-uno::Sequence< OUString > SAL_CALL SwXMLImportSettings_getSupportedServiceNames()
- throw()
-{
- const OUString aServiceName( SwXMLImportSettings_getImplementationName() );
- const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
-}
-
-uno::Reference< uno::XInterface > SAL_CALL SwXMLImportSettings_createInstance(
- const uno::Reference< lang::XMultiServiceFactory > & rSMgr)
- throw( uno::Exception )
-{
- return (cppu::OWeakObject*)new SwXMLImport( comphelper::getComponentContext(rSMgr), SwXMLImportSettings_getImplementationName(), SvXMLImportFlags::SETTINGS );
-}
-
SwDoc* SwImport::GetDocFromXMLImport( SvXMLImport& rImport )
{
uno::Reference<lang::XUnoTunnel> xModelTunnel( rImport.GetModel(), uno::UNO_QUERY );
@@ -1656,4 +1542,48 @@ const SwDoc* SwXMLImport::getDoc() const
return const_cast< SwXMLImport* >( this )->getDoc();
}
+extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
+com_sun_star_comp_Writer_XMLOasisImporter_get_implementation(::com::sun::star::uno::XComponentContext* context,
+ ::com::sun::star::uno::Sequence<css::uno::Any> const &)
+{
+ return cppu::acquire(new SwXMLImport(context, OUString("com.sun.star.comp.Writer.XMLOasisImporter"),
+ SvXMLImportFlags::ALL));
+}
+
+
+extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
+com_sun_star_comp_Writer_XMLOasisStylesImporter_get_implementation(::com::sun::star::uno::XComponentContext* context,
+ ::com::sun::star::uno::Sequence<css::uno::Any> const &)
+{
+ return cppu::acquire(new SwXMLImport(context, OUString("com.sun.star.comp.Writer.XMLOasisStylesImporter"),
+ SvXMLImportFlags::STYLES | SvXMLImportFlags::MASTERSTYLES | SvXMLImportFlags::AUTOSTYLES |
+ SvXMLImportFlags::FONTDECLS));
+}
+
+
+extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
+com_sun_star_comp_Writer_XMLOasisContentImporter_get_implementation(::com::sun::star::uno::XComponentContext* context,
+ ::com::sun::star::uno::Sequence<css::uno::Any> const &)
+{
+ return cppu::acquire(new SwXMLImport(context, OUString("com.sun.star.comp.Writer.XMLOasisContentImporter"),
+ SvXMLImportFlags::CONTENT | SvXMLImportFlags::SCRIPTS | SvXMLImportFlags::AUTOSTYLES |
+ SvXMLImportFlags::FONTDECLS));
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
+com_sun_star_comp_Writer_XMLOasisMetaImporter_get_implementation(::com::sun::star::uno::XComponentContext* context,
+ ::com::sun::star::uno::Sequence<css::uno::Any> const &)
+{
+ return cppu::acquire(new SwXMLImport(context, OUString("com.sun.star.comp.Writer.XMLOasisMetaImporter"),
+ SvXMLImportFlags::META));
+}
+
+
+extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
+com_sun_star_comp_Writer_XMLOasisSettingsImporter_get_implementation(::com::sun::star::uno::XComponentContext* context,
+ ::com::sun::star::uno::Sequence<css::uno::Any> const &)
+{
+ return cppu::acquire(new SwXMLImport(context, OUString("com.sun.star.comp.Writer.XMLOasisSettingsImporter"),
+ SvXMLImportFlags::SETTINGS));
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/uno/unofreg.cxx b/sw/source/uibase/uno/unofreg.cxx
index 46d8810..84105c1 100644
--- a/sw/source/uibase/uno/unofreg.cxx
+++ b/sw/source/uibase/uno/unofreg.cxx
@@ -60,127 +60,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL sw_component_getFactory(
uno::Reference< XSingleServiceFactory > xFactory;
const sal_Int32 nImplNameLen = strlen( pImplName );
- if( SwXMLImport_getImplementationName().equalsAsciiL( pImplName,
- nImplNameLen ) )
- {
- xFactory = ::cppu::createSingleFactory( xMSF,
- SwXMLImport_getImplementationName(),
- SwXMLImport_createInstance,
- SwXMLImport_getSupportedServiceNames() );
- }
- else if( SwXMLImportStyles_getImplementationName().equalsAsciiL(
- pImplName, nImplNameLen ) )
- {
- xFactory = ::cppu::createSingleFactory( xMSF,
- SwXMLImportStyles_getImplementationName(),
- SwXMLImportStyles_createInstance,
- SwXMLImportStyles_getSupportedServiceNames() );
- }
- else if( SwXMLImportContent_getImplementationName().equalsAsciiL(
- pImplName, nImplNameLen ) )
- {
- xFactory = ::cppu::createSingleFactory( xMSF,
- SwXMLImportContent_getImplementationName(),
- SwXMLImportContent_createInstance,
- SwXMLImportContent_getSupportedServiceNames() );
- }
- else if( SwXMLImportMeta_getImplementationName().equalsAsciiL(
- pImplName, nImplNameLen ) )
- {
- xFactory = ::cppu::createSingleFactory( xMSF,
- SwXMLImportMeta_getImplementationName(),
- SwXMLImportMeta_createInstance,
- SwXMLImportMeta_getSupportedServiceNames() );
- }
- else if( SwXMLImportSettings_getImplementationName().equalsAsciiL(
- pImplName, nImplNameLen ) )
- {
- xFactory = ::cppu::createSingleFactory( xMSF,
- SwXMLImportSettings_getImplementationName(),
- SwXMLImportSettings_createInstance,
- SwXMLImportSettings_getSupportedServiceNames() );
- }
- else if( SwXMLExportOOO_getImplementationName().equalsAsciiL( pImplName,
- nImplNameLen ) )
- {
- xFactory = ::cppu::createSingleFactory( xMSF,
- SwXMLExportOOO_getImplementationName(),
- SwXMLExportOOO_createInstance,
- SwXMLExportOOO_getSupportedServiceNames() );
- }
- else if( SwXMLExportStylesOOO_getImplementationName().equalsAsciiL(
- pImplName, nImplNameLen ) )
- {
- xFactory = ::cppu::createSingleFactory( xMSF,
- SwXMLExportStylesOOO_getImplementationName(),
- SwXMLExportStylesOOO_createInstance,
- SwXMLExportStylesOOO_getSupportedServiceNames() );
- }
- else if( SwXMLExportContentOOO_getImplementationName().equalsAsciiL(
- pImplName, nImplNameLen ) )
- {
- xFactory = ::cppu::createSingleFactory( xMSF,
- SwXMLExportContentOOO_getImplementationName(),
- SwXMLExportContentOOO_createInstance,
- SwXMLExportContentOOO_getSupportedServiceNames() );
- }
- else if( SwXMLExportMetaOOO_getImplementationName().equalsAsciiL(
- pImplName, nImplNameLen ) )
- {
- xFactory = ::cppu::createSingleFactory( xMSF,
- SwXMLExportMetaOOO_getImplementationName(),
- SwXMLExportMetaOOO_createInstance,
- SwXMLExportMetaOOO_getSupportedServiceNames() );
- }
- else if( SwXMLExportSettingsOOO_getImplementationName().equalsAsciiL(
- pImplName, nImplNameLen ) )
- {
- xFactory = ::cppu::createSingleFactory( xMSF,
- SwXMLExportSettingsOOO_getImplementationName(),
- SwXMLExportSettingsOOO_createInstance,
- SwXMLExportSettingsOOO_getSupportedServiceNames() );
- }
- else if( SwXMLExport_getImplementationName().equalsAsciiL( pImplName,
- nImplNameLen ) )
- {
- xFactory = ::cppu::createSingleFactory( xMSF,
- SwXMLExport_getImplementationName(),
- SwXMLExport_createInstance,
- SwXMLExport_getSupportedServiceNames() );
- }
- else if( SwXMLExportStyles_getImplementationName().equalsAsciiL(
- pImplName, nImplNameLen ) )
- {
- xFactory = ::cppu::createSingleFactory( xMSF,
- SwXMLExportStyles_getImplementationName(),
- SwXMLExportStyles_createInstance,
- SwXMLExportStyles_getSupportedServiceNames() );
- }
- else if( SwXMLExportContent_getImplementationName().equalsAsciiL(
- pImplName, nImplNameLen ) )
- {
- xFactory = ::cppu::createSingleFactory( xMSF,
- SwXMLExportContent_getImplementationName(),
- SwXMLExportContent_createInstance,
- SwXMLExportContent_getSupportedServiceNames() );
- }
- else if( SwXMLExportMeta_getImplementationName().equalsAsciiL(
- pImplName, nImplNameLen ) )
- {
- xFactory = ::cppu::createSingleFactory( xMSF,
- SwXMLExportMeta_getImplementationName(),
- SwXMLExportMeta_createInstance,
- SwXMLExportMeta_getSupportedServiceNames() );
- }
- else if( SwXMLExportSettings_getImplementationName().equalsAsciiL(
- pImplName, nImplNameLen ) )
- {
- xFactory = ::cppu::createSingleFactory( xMSF,
- SwXMLExportSettings_getImplementationName(),
- SwXMLExportSettings_createInstance,
- SwXMLExportSettings_getSupportedServiceNames() );
- }
- else if( SwXAutoTextContainer_getImplementationName().equalsAsciiL(
+ if( SwXAutoTextContainer_getImplementationName().equalsAsciiL(
pImplName, nImplNameLen ) )
{
xFactory = ::cppu::createSingleFactory( xMSF,
diff --git a/sw/util/sw.component b/sw/util/sw.component
index 46cdc67..81baa5f 100644
--- a/sw/util/sw.component
+++ b/sw/util/sw.component
@@ -43,49 +43,64 @@
<implementation name="com.sun.star.comp.Writer.WriterModule">
<service name="com.sun.star.text.ModuleDispatcher"/>
</implementation>
- <implementation name="com.sun.star.comp.Writer.XMLContentExporter">
+ <implementation name="com.sun.star.comp.Writer.XMLContentExporter"
+ constructor="com_sun_star_comp_Writer_XMLContentExporter_get_implementation">
<service name="com.sun.star.comp.Writer.XMLContentExporter"/>
</implementation>
- <implementation name="com.sun.star.comp.Writer.XMLExporter">
+ <implementation name="com.sun.star.comp.Writer.XMLExporter"
+ constructor="com_sun_star_comp_Writer_XMLExporter_get_implementation">
<service name="com.sun.star.comp.Writer.XMLExporter"/>
</implementation>
- <implementation name="com.sun.star.comp.Writer.XMLMetaExporter">
+ <implementation name="com.sun.star.comp.Writer.XMLMetaExporter"
+ constructor="com_sun_star_comp_Writer_XMLMetaExporter_get_implementation">
<service name="com.sun.star.comp.Writer.XMLMetaExporter"/>
</implementation>
- <implementation name="com.sun.star.comp.Writer.XMLOasisContentExporter">
+ <implementation name="com.sun.star.comp.Writer.XMLOasisContentExporter"
+ constructor="com_sun_star_comp_Writer_XMLOasisContentExporter_get_implementation">
<service name="com.sun.star.comp.Writer.XMLOasisContentExporter"/>
</implementation>
- <implementation name="com.sun.star.comp.Writer.XMLOasisContentImporter">
+ <implementation name="com.sun.star.comp.Writer.XMLOasisContentImporter"
+ constructor="com_sun_star_comp_Writer_XMLOasisContentImporter_get_implementation">
<service name="com.sun.star.comp.Writer.XMLOasisContentImporter"/>
</implementation>
- <implementation name="com.sun.star.comp.Writer.XMLOasisExporter">
+ <implementation name="com.sun.star.comp.Writer.XMLOasisExporter"
+ constructor="com_sun_star_comp_Writer_XMLOasisExporter_get_implementation">
<service name="com.sun.star.comp.Writer.XMLOasisExporter"/>
</implementation>
- <implementation name="com.sun.star.comp.Writer.XMLOasisImporter">
+ <implementation name="com.sun.star.comp.Writer.XMLOasisImporter"
+ constructor="com_sun_star_comp_Writer_XMLOasisImporter_get_implementation">
<service name="com.sun.star.comp.Writer.XMLOasisImporter"/>
</implementation>
- <implementation name="com.sun.star.comp.Writer.XMLOasisMetaExporter">
+ <implementation name="com.sun.star.comp.Writer.XMLOasisMetaExporter"
+ constructor="com_sun_star_comp_Writer_XMLOasisMetaExporter_get_implementation">
<service name="com.sun.star.comp.Writer.XMLOasisMetaExporter"/>
</implementation>
- <implementation name="com.sun.star.comp.Writer.XMLOasisMetaImporter">
+ <implementation name="com.sun.star.comp.Writer.XMLOasisMetaImporter"
+ constructor="com_sun_star_comp_Writer_XMLOasisMetaImporter_get_implementation">
<service name="com.sun.star.comp.Writer.XMLOasisMetaImporter"/>
</implementation>
- <implementation name="com.sun.star.comp.Writer.XMLOasisSettingsExporter">
+ <implementation name="com.sun.star.comp.Writer.XMLOasisSettingsExporter"
+ constructor="com_sun_star_comp_Writer_XMLOasisSettingsExporter_get_implementation">
<service name="com.sun.star.comp.Writer.XMLOasisSettingsExporter"/>
</implementation>
- <implementation name="com.sun.star.comp.Writer.XMLOasisSettingsImporter">
+ <implementation name="com.sun.star.comp.Writer.XMLOasisSettingsImporter"
+ constructor="com_sun_star_comp_Writer_XMLOasisSettingsImporter_get_implementation">
<service name="com.sun.star.comp.Writer.XMLOasisSettingsImporter"/>
</implementation>
- <implementation name="com.sun.star.comp.Writer.XMLOasisStylesExporter">
+ <implementation name="com.sun.star.comp.Writer.XMLOasisStylesExporter"
+ constructor="com_sun_star_comp_Writer_XMLOasisStylesExporter_get_implementation">
<service name="com.sun.star.comp.Writer.XMLOasisStylesExporter"/>
</implementation>
- <implementation name="com.sun.star.comp.Writer.XMLOasisStylesImporter">
+ <implementation name="com.sun.star.comp.Writer.XMLOasisStylesImporter"
+ constructor="com_sun_star_comp_Writer_XMLOasisStylesImporter_get_implementation">
<service name="com.sun.star.comp.Writer.XMLOasisStylesImporter"/>
</implementation>
- <implementation name="com.sun.star.comp.Writer.XMLSettingsExporter">
+ <implementation name="com.sun.star.comp.Writer.XMLSettingsExporter"
+ constructor="com_sun_star_comp_Writer_XMLSettingsExporter_get_implementation">
<service name="com.sun.star.comp.Writer.XMLSettingsExporter"/>
</implementation>
- <implementation name="com.sun.star.comp.Writer.XMLStylesExporter">
+ <implementation name="com.sun.star.comp.Writer.XMLStylesExporter"
+ constructor="com_sun_star_comp_Writer_XMLStylesExporter_get_implementation">
<service name="com.sun.star.comp.Writer.XMLStylesExporter"/>
</implementation>
<implementation name="com.sun.star.util.comp.FinalThreadManager">
More information about the Libreoffice-commits
mailing list