[Libreoffice-commits] core.git: 2 commits - forms/Library_frm.mk forms/source unusedcode.easy
Matúš Kukan
matus.kukan at gmail.com
Sat Mar 28 03:55:26 PDT 2015
forms/Library_frm.mk | 1
forms/source/component/DatabaseForm.cxx | 7
forms/source/component/Filter.cxx | 1
forms/source/component/navigationbar.cxx | 1
forms/source/component/scrollbar.cxx | 19 +
forms/source/component/scrollbar.hxx | 4
forms/source/component/spinbutton.cxx | 20 +
forms/source/component/spinbutton.hxx | 4
forms/source/inc/forms_module.hxx | 288 -------------------------
forms/source/inc/forms_module_impl.hxx | 131 -----------
forms/source/inc/frm_module.hxx | 30 --
forms/source/inc/services.hxx | 15 -
forms/source/misc/frm_module.cxx | 27 --
forms/source/richtext/richtextcontrol.cxx | 1
forms/source/richtext/richtextmodel.cxx | 34 +-
forms/source/richtext/richtextmodel.hxx | 4
forms/source/runtime/formoperations.cxx | 1
forms/source/solar/component/navbarcontrol.cxx | 1
forms/source/xforms/xpathlib/extension.cxx | 1
unusedcode.easy | 3
20 files changed, 64 insertions(+), 529 deletions(-)
New commits:
commit 39c4b2787ea05233dbd47ca71007c13487628284
Author: Matúš Kukan <matus.kukan at gmail.com>
Date: Fri Mar 27 23:27:32 2015 +0100
forms: Replace these macros
Change-Id: I656905cf6f0e3647824ff3836fcea93920251264
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 6dea519..28b312a 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -21,7 +21,6 @@
#include "componenttools.hxx"
#include "DatabaseForm.hxx"
#include "EventThread.hxx"
-#include "frm_module.hxx"
#include "frm_resource.hrc"
#include "frm_resource.hxx"
#include "GroupManager.hxx"
diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx
index 016ac70..2cfd52d 100644
--- a/forms/source/component/Filter.cxx
+++ b/forms/source/component/Filter.cxx
@@ -19,7 +19,6 @@
#include "Filter.hxx"
#include "FormComponent.hxx"
-#include "frm_module.hxx"
#include "frm_resource.hrc"
#include "frm_resource.hxx"
#include "property.hrc"
diff --git a/forms/source/component/navigationbar.cxx b/forms/source/component/navigationbar.cxx
index 8f0bfad..c52d1b6 100644
--- a/forms/source/component/navigationbar.cxx
+++ b/forms/source/component/navigationbar.cxx
@@ -18,7 +18,6 @@
*/
#include "navigationbar.hxx"
-#include "frm_module.hxx"
#include <com/sun/star/text/WritingMode2.hpp>
diff --git a/forms/source/component/scrollbar.cxx b/forms/source/component/scrollbar.cxx
index 92f4181..f52aebb 100644
--- a/forms/source/component/scrollbar.cxx
+++ b/forms/source/component/scrollbar.cxx
@@ -106,13 +106,28 @@ namespace frm
{
}
+ OUString SAL_CALL OScrollBarModel::getImplementationName() throw ( RuntimeException, std::exception )
+ {
+ return OUString( "com.sun.star.comp.forms.OScrollBarModel" );
+ }
- IMPLEMENT_SERVICE_REGISTRATION_2( OScrollBarModel, OControlModel, FRM_SUN_COMPONENT_SCROLLBAR, BINDABLE_INTEGER_VALUE_RANGE )
// note that we're passing OControlModel as "base class". This is because
// OBoundControlModel, our real base class, claims to support the DataAwareControlModel
// service, which isn't really true for us. We only derive from this class
// to benefit from the functionality for binding to spreadsheet cells
-
+ Sequence< OUString > SAL_CALL OScrollBarModel::getSupportedServiceNames() throw (RuntimeException, std::exception)
+ {
+ Sequence< OUString > aOwnNames( 2 );
+ aOwnNames[ 0 ] = FRM_SUN_COMPONENT_SCROLLBAR;
+ aOwnNames[ 1 ] = BINDABLE_INTEGER_VALUE_RANGE;
+
+ return ::comphelper::combineSequences(
+ getAggregateServiceNames(),
+ ::comphelper::concatSequences(
+ OControlModel::getSupportedServiceNames_Static(),
+ aOwnNames)
+ );
+ }
IMPLEMENT_DEFAULT_CLONING( OScrollBarModel )
diff --git a/forms/source/component/scrollbar.hxx b/forms/source/component/scrollbar.hxx
index a561c44..a99b391 100644
--- a/forms/source/component/scrollbar.hxx
+++ b/forms/source/component/scrollbar.hxx
@@ -20,7 +20,6 @@
#define INCLUDED_FORMS_SOURCE_COMPONENT_SCROLLBAR_HXX
#include "FormComponent.hxx"
-#include "frm_module.hxx"
namespace frm
{
@@ -37,7 +36,8 @@ namespace frm
protected:
// XServiceInfo
- DECLARE_SERVICE_REGISTRATION( OScrollBarModel )
+ virtual OUString SAL_CALL getImplementationName() throw (::css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+ virtual ::css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (::css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XPersistObject
DECLARE_XPERSISTOBJECT()
diff --git a/forms/source/component/spinbutton.cxx b/forms/source/component/spinbutton.cxx
index 6fc2b3d..77ea312 100644
--- a/forms/source/component/spinbutton.cxx
+++ b/forms/source/component/spinbutton.cxx
@@ -59,13 +59,29 @@ namespace frm
{
}
+ OUString SAL_CALL OSpinButtonModel::getImplementationName() throw ( RuntimeException, std::exception )
+ {
+ return OUString( "com.sun.star.comp.forms.OSpinButtonModel" );
+ }
- IMPLEMENT_SERVICE_REGISTRATION_2( OSpinButtonModel, OControlModel, FRM_SUN_COMPONENT_SPINBUTTON, BINDABLE_INTEGER_VALUE_RANGE )
// note that we're passing OControlModel as "base class". This is because
// OBoundControlModel, our real base class, claims to support the DataAwareControlModel
// service, which isn't really true for us. We only derive from this class
// to benefit from the functionality for binding to spreadsheet cells
-
+ Sequence< OUString > SAL_CALL OSpinButtonModel::getSupportedServiceNames() throw (RuntimeException, std::exception)
+ {
+ Sequence< OUString > aOwnNames( 2 );
+ aOwnNames[ 0 ] = FRM_SUN_COMPONENT_SPINBUTTON;
+ aOwnNames[ 1 ] = BINDABLE_INTEGER_VALUE_RANGE;
+
+ return ::comphelper::combineSequences(
+ getAggregateServiceNames(),
+ ::comphelper::concatSequences(
+ OControlModel::getSupportedServiceNames_Static(),
+ aOwnNames
+ )
+ );
+ }
IMPLEMENT_DEFAULT_CLONING( OSpinButtonModel )
diff --git a/forms/source/component/spinbutton.hxx b/forms/source/component/spinbutton.hxx
index 97af488..e8642ce 100644
--- a/forms/source/component/spinbutton.hxx
+++ b/forms/source/component/spinbutton.hxx
@@ -20,7 +20,6 @@
#define INCLUDED_FORMS_SOURCE_COMPONENT_SPINBUTTON_HXX
#include "FormComponent.hxx"
-#include "frm_module.hxx"
namespace frm
@@ -38,7 +37,8 @@ namespace frm
protected:
// XServiceInfo
- DECLARE_SERVICE_REGISTRATION( OSpinButtonModel )
+ virtual OUString SAL_CALL getImplementationName( ) throw (::css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+ virtual ::css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (::css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XPersistObject
DECLARE_XPERSISTOBJECT()
diff --git a/forms/source/inc/forms_module.hxx b/forms/source/inc/forms_module.hxx
deleted file mode 100644
index 4a5092a..0000000
--- a/forms/source/inc/forms_module.hxx
+++ /dev/null
@@ -1,82 +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 .
- */
-
-
- #define DECLARE_SERVICE_REGISTRATION( classname ) \
- virtual OUString SAL_CALL getImplementationName( ) 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; \
- \
- static OUString SAL_CALL getImplementationName_Static(); \
- static ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames_Static(); \
-
- #define IMPLEMENT_SERVICE_REGISTRATION_BASE( classname, baseclass ) \
- \
- OUString SAL_CALL classname::getImplementationName( ) throw ( RuntimeException, std::exception ) \
- { return getImplementationName_Static(); } \
- \
- Sequence< OUString > SAL_CALL classname::getSupportedServiceNames( ) throw (RuntimeException, std::exception) \
- { \
- return ::comphelper::combineSequences( \
- getAggregateServiceNames(), \
- getSupportedServiceNames_Static() \
- ); \
- } \
- \
- OUString SAL_CALL classname::getImplementationName_Static() \
- { return OUString( "com.sun.star.comp.forms."#classname ); } \
- \
-
- #define IMPLEMENT_SERVICE_REGISTRATION_2( classname, baseclass, service1, service2 ) \
- IMPLEMENT_SERVICE_REGISTRATION_BASE( classname, baseclass ) \
- \
- Sequence< OUString > SAL_CALL classname::getSupportedServiceNames_Static() \
- { \
- Sequence< OUString > aOwnNames( 2 ); \
- aOwnNames[ 0 ] = service1; \
- aOwnNames[ 1 ] = service2; \
- \
- return ::comphelper::concatSequences( \
- baseclass::getSupportedServiceNames_Static(), \
- aOwnNames \
- ); \
- } \
-
- #define IMPLEMENT_SERVICE_REGISTRATION_8( classname, baseclass, service1, service2, service3, service4 , service5, service6, service7, service8 ) \
- IMPLEMENT_SERVICE_REGISTRATION_BASE( classname, baseclass ) \
- \
- Sequence< OUString > SAL_CALL classname::getSupportedServiceNames_Static() \
- { \
- Sequence< OUString > aOwnNames( 8 ); \
- aOwnNames[ 0 ] = service1; \
- aOwnNames[ 1 ] = service2; \
- aOwnNames[ 2 ] = service3; \
- aOwnNames[ 3 ] = service4; \
- aOwnNames[ 4 ] = service5; \
- aOwnNames[ 5 ] = service6; \
- aOwnNames[ 6 ] = service7; \
- aOwnNames[ 7 ] = service8; \
- \
- return ::comphelper::concatSequences( \
- baseclass::getSupportedServiceNames_Static(), \
- aOwnNames \
- ); \
- } \
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/forms/source/inc/frm_module.hxx b/forms/source/inc/frm_module.hxx
deleted file mode 100644
index 6c71454..0000000
--- a/forms/source/inc/frm_module.hxx
+++ /dev/null
@@ -1,27 +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_FORMS_SOURCE_INC_FRM_MODULE_HXX
-#define INCLUDED_FORMS_SOURCE_INC_FRM_MODULE_HXX
-
-#include "forms_module.hxx"
-
-#endif // INCLUDED_FORMS_SOURCE_INC_FRM_MODULE_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx
index 76372c3..39a29a2 100644
--- a/forms/source/richtext/richtextcontrol.cxx
+++ b/forms/source/richtext/richtextcontrol.cxx
@@ -18,7 +18,6 @@
*/
#include "richtextcontrol.hxx"
-#include "frm_module.hxx"
#include "property.hrc"
#include "services.hxx"
diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx
index 3449c36..7db6a9f 100644
--- a/forms/source/richtext/richtextmodel.cxx
+++ b/forms/source/richtext/richtextmodel.cxx
@@ -222,18 +222,30 @@ namespace frm
IMPLEMENT_FORWARD_XTYPEPROVIDER2( ORichTextModel, OControlModel, ORichTextModel_BASE )
+ OUString SAL_CALL ORichTextModel::getImplementationName() throw ( RuntimeException, std::exception )
+ {
+ return OUString( "com.sun.star.comp.forms.ORichTextModel" );
+ }
- IMPLEMENT_SERVICE_REGISTRATION_8( ORichTextModel, OControlModel,
- FRM_SUN_COMPONENT_RICHTEXTCONTROL,
- "com.sun.star.text.TextRange",
- "com.sun.star.style.CharacterProperties",
- "com.sun.star.style.ParagraphProperties",
- "com.sun.star.style.CharacterPropertiesAsian",
- "com.sun.star.style.CharacterPropertiesComplex",
- "com.sun.star.style.ParagraphPropertiesAsian",
- "com.sun.star.style.ParagraphPropertiesComplex"
- )
-
+ Sequence< OUString > SAL_CALL ORichTextModel::getSupportedServiceNames() throw (RuntimeException, std::exception)
+ {
+ Sequence< OUString > aOwnNames( 8 );
+ aOwnNames[ 0 ] = FRM_SUN_COMPONENT_RICHTEXTCONTROL;
+ aOwnNames[ 1 ] = "com.sun.star.text.TextRange";
+ aOwnNames[ 2 ] = "com.sun.star.style.CharacterProperties";
+ aOwnNames[ 3 ] = "com.sun.star.style.ParagraphProperties";
+ aOwnNames[ 4 ] = "com.sun.star.style.CharacterPropertiesAsian";
+ aOwnNames[ 5 ] = "com.sun.star.style.CharacterPropertiesComplex";
+ aOwnNames[ 6 ] = "com.sun.star.style.ParagraphPropertiesAsian";
+ aOwnNames[ 7 ] = "com.sun.star.style.ParagraphPropertiesComplex";
+
+ return ::comphelper::combineSequences(
+ getAggregateServiceNames(),
+ ::comphelper::concatSequences(
+ OControlModel::getSupportedServiceNames_Static(),
+ aOwnNames)
+ );
+ }
IMPLEMENT_DEFAULT_CLONING( ORichTextModel )
diff --git a/forms/source/richtext/richtextmodel.hxx b/forms/source/richtext/richtextmodel.hxx
index 10e7b3e..c39edc9 100644
--- a/forms/source/richtext/richtextmodel.hxx
+++ b/forms/source/richtext/richtextmodel.hxx
@@ -20,7 +20,6 @@
#define INCLUDED_FORMS_SOURCE_RICHTEXT_RICHTEXTMODEL_HXX
#include "FormComponent.hxx"
-#include "frm_module.hxx"
#include "formcontrolfont.hxx"
#include "richtextunowrapper.hxx"
#include <comphelper/propertycontainerhelper.hxx>
@@ -109,7 +108,8 @@ namespace frm
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XServiceInfo
- DECLARE_SERVICE_REGISTRATION( ORichTextModel )
+ virtual OUString SAL_CALL getImplementationName() throw (::css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+ virtual ::css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (::css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XPersistObject
DECLARE_XPERSISTOBJECT()
diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx
index d337a35..e6e831d 100644
--- a/forms/source/runtime/formoperations.cxx
+++ b/forms/source/runtime/formoperations.cxx
@@ -23,7 +23,6 @@
#include "frm_strings.hxx"
#include "frm_resource.hxx"
#include "frm_resource.hrc"
-#include "frm_module.hxx"
#include "services.hxx"
#include <com/sun/star/ucb/AlreadyInitializedException.hpp>
diff --git a/forms/source/solar/component/navbarcontrol.cxx b/forms/source/solar/component/navbarcontrol.cxx
index 92db496..3f2afea 100644
--- a/forms/source/solar/component/navbarcontrol.cxx
+++ b/forms/source/solar/component/navbarcontrol.cxx
@@ -20,7 +20,6 @@
#include "navbarcontrol.hxx"
#include "frm_strings.hxx"
-#include "frm_module.hxx"
#include "FormComponent.hxx"
#include "componenttools.hxx"
#include "navtoolbar.hxx"
diff --git a/forms/source/xforms/xpathlib/extension.cxx b/forms/source/xforms/xpathlib/extension.cxx
index a77b8a3..0588836 100644
--- a/forms/source/xforms/xpathlib/extension.cxx
+++ b/forms/source/xforms/xpathlib/extension.cxx
@@ -24,7 +24,6 @@
#include "extension.hxx"
#include "xpathlib.hxx"
#include "services.hxx"
-#include "frm_module.hxx"
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
commit a9535fe984e9c547dfb96daf621813ea39608d9d
Author: Matúš Kukan <matus.kukan at gmail.com>
Date: Fri Mar 27 22:19:27 2015 +0100
forms: More unused services related stuff
Change-Id: I3be9b1a57971286441d78e03130d0467ea2cc838
diff --git a/forms/Library_frm.mk b/forms/Library_frm.mk
index 8d467cb..0199d38 100644
--- a/forms/Library_frm.mk
+++ b/forms/Library_frm.mk
@@ -103,7 +103,6 @@ $(eval $(call gb_Library_add_exception_objects,frm,\
forms/source/helper/urltransformer \
forms/source/helper/windowstateguard \
forms/source/misc/componenttools \
- forms/source/misc/frm_module \
forms/source/misc/InterfaceContainer \
forms/source/misc/limitedformats \
forms/source/misc/listenercontainers \
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index ed8e1d2..6dea519 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -119,12 +119,6 @@ using namespace ::com::sun::star::data;
using namespace ::com::sun::star::util;
-extern "C" void SAL_CALL createRegistryInfo_ODatabaseForm()
-{
- static ::frm::OMultiInstanceAutoRegistration< ::frm::ODatabaseForm > aAutoRegistration;
-}
-
-
namespace frm
{
diff --git a/forms/source/inc/forms_module.hxx b/forms/source/inc/forms_module.hxx
index 98bdf73..4a5092a 100644
--- a/forms/source/inc/forms_module.hxx
+++ b/forms/source/inc/forms_module.hxx
@@ -17,168 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef FORMS_MODULE_INCLUDE_CONTEXT
- #error "not to be included directly! use 'foo_module.hxx instead'!"
-#endif
-
-#ifndef FORMS_MODULE_NAMESPACE
- #error "set FORMS_MODULE_NAMESPACE to your namespace identifier!"
-#endif
-
-#include <osl/mutex.hxx>
-#include <tools/resid.hxx>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include <com/sun/star/uno/Sequence.hxx>
-#include <com/sun/star/registry/XRegistryKey.hpp>
-#include <cppuhelper/factory.hxx>
-#include <rtl/string.hxx>
-#include <comphelper/processfactory.hxx>
-
-
-namespace FORMS_MODULE_NAMESPACE
-{
-
-
- typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > (SAL_CALL *FactoryInstantiation)
- (
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rServiceManager,
- const OUString & _rComponentName,
- ::cppu::ComponentInstantiation _pCreateFunction,
- const ::com::sun::star::uno::Sequence< OUString > & _rServiceNames,
- rtl_ModuleCount*
- );
-
- class OFormsModule
- {
- private:
- OFormsModule() SAL_DELETED_FUNCTION; //TODO: get rid of this class
-
- protected:
- // auto registration administration
- static ::com::sun::star::uno::Sequence< OUString >*
- s_pImplementationNames;
- static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< OUString > >*
- s_pSupportedServices;
- static ::com::sun::star::uno::Sequence< sal_Int64 >*
- s_pCreationFunctionPointers;
- static ::com::sun::star::uno::Sequence< sal_Int64 >*
- s_pFactoryFunctionPointers;
-
- public:
- /** register a component implementing a service with the given data.
- @param _rImplementationName
- the implementation name of the component
- @param _rServiceNames
- the services the component supports
- @param _pCreateFunction
- a function for creating an instance of the component
- @param _pFactoryFunction
- a function for creating a factory for that component
- @see revokeComponent
- */
- static void registerComponent(
- const OUString& _rImplementationName,
- const ::com::sun::star::uno::Sequence< OUString >& _rServiceNames,
- ::cppu::ComponentInstantiation _pCreateFunction,
- FactoryInstantiation _pFactoryFunction);
-
- /** revoke the registration for the specified component
- @param _rImplementationName
- the implementation name of the component
- */
- static void revokeComponent(
- const OUString& _rImplementationName);
-
- private:
- /** ensure that the impl class exists
- @precond m_aMutex is guarded when this method gets called
- */
- static void ensureImpl();
- };
-
- template <class TYPE>
- class OMultiInstanceAutoRegistration
- {
- public:
- /** automatically registeres a multi instance component
- <p>Assumed that the template argument has the three methods
- <ul>
- <li><code>static OUString getImplementationName_Static()</code><li/>
- <li><code>static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static()</code><li/>
- <li><code>static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
- Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&)</code>
- </li>
- <ul/>
- the instantiation of this object will automatically register the class via <method>OFormsModule::registerComponent</method>.
- <p/>
- <p>The factory creation function used is <code>::cppu::createSingleFactory</code>.</p>
-
- @see OOneInstanceAutoRegistration
- */
- OMultiInstanceAutoRegistration();
- ~OMultiInstanceAutoRegistration();
- };
-
- template <class TYPE>
- OMultiInstanceAutoRegistration<TYPE>::OMultiInstanceAutoRegistration()
- {
- OFormsModule::registerComponent(
- TYPE::getImplementationName_Static(),
- TYPE::getSupportedServiceNames_Static(),
- TYPE::Create,
- ::cppu::createSingleFactory
- );
- }
-
- template <class TYPE>
- OMultiInstanceAutoRegistration<TYPE>::~OMultiInstanceAutoRegistration()
- {
- OFormsModule::revokeComponent(TYPE::getImplementationName_Static());
- }
-
- template <class TYPE>
- class OOneInstanceAutoRegistration
- {
- public:
- /** automatically registeres a single instance component
- <p>Assumed that the template argument has the three methods
- <ul>
- <li><code>static OUString getImplementationName_Static()</code><li/>
- <li><code>static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static()</code><li/>
- <li><code>static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
- Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&)</code>
- </li>
- <ul/>
- the instantiation of this object will automatically register the class via <method>OFormsModule::registerComponent</method>.
- <p/>
- The factory creation function used is <code>::cppu::createOneInstanceFactory</code>.
- @see OOneInstanceAutoRegistration
- */
- OOneInstanceAutoRegistration();
- ~OOneInstanceAutoRegistration();
- };
-
- template <class TYPE>
- OOneInstanceAutoRegistration<TYPE>::OOneInstanceAutoRegistration()
- {
- OFormsModule::registerComponent(
- TYPE::getImplementationName_Static(),
- TYPE::getSupportedServiceNames_Static(),
- TYPE::Create,
- ::cppu::createOneInstanceFactory
- );
- }
-
- template <class TYPE>
- OOneInstanceAutoRegistration<TYPE>::~OOneInstanceAutoRegistration()
- {
- OFormsModule::revokeComponent(TYPE::getImplementationName_Static());
- }
-
-
- //= helper for classes implementing the service handling via
- //= OMultiInstanceAutoRegistration or OOneInstanceAutoRegistration
#define DECLARE_SERVICE_REGISTRATION( classname ) \
virtual OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; \
@@ -186,10 +24,6 @@ namespace FORMS_MODULE_NAMESPACE
\
static OUString SAL_CALL getImplementationName_Static(); \
static ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames_Static(); \
- static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Create( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory ); \
- \
- friend class OOneInstanceAutoRegistration< classname >; \
- friend class OMultiInstanceAutoRegistration< classname >; \
#define IMPLEMENT_SERVICE_REGISTRATION_BASE( classname, baseclass ) \
\
@@ -207,23 +41,6 @@ namespace FORMS_MODULE_NAMESPACE
OUString SAL_CALL classname::getImplementationName_Static() \
{ return OUString( "com.sun.star.comp.forms."#classname ); } \
\
- Reference< XInterface > SAL_CALL classname::Create( const Reference< XMultiServiceFactory >& _rxFactory ) \
- { return static_cast< XServiceInfo* >( new classname( comphelper::getComponentContext(_rxFactory) ) ); } \
- \
-
- #define IMPLEMENT_SERVICE_REGISTRATION_1( classname, baseclass, service1 ) \
- IMPLEMENT_SERVICE_REGISTRATION_BASE( classname, baseclass ) \
- \
- Sequence< OUString > SAL_CALL classname::getSupportedServiceNames_Static() \
- { \
- Sequence< OUString > aOwnNames( 1 ); \
- aOwnNames[ 0 ] = service1; \
- \
- return ::comphelper::concatSequences( \
- baseclass::getSupportedServiceNames_Static(), \
- aOwnNames \
- ); \
- } \
#define IMPLEMENT_SERVICE_REGISTRATION_2( classname, baseclass, service1, service2 ) \
IMPLEMENT_SERVICE_REGISTRATION_BASE( classname, baseclass ) \
@@ -240,26 +57,6 @@ namespace FORMS_MODULE_NAMESPACE
); \
} \
- #define IMPLEMENT_SERVICE_REGISTRATION_7( classname, baseclass, service1, service2, service3, service4 , service5, service6, service7 ) \
- IMPLEMENT_SERVICE_REGISTRATION_BASE( classname, baseclass ) \
- \
- Sequence< OUString > SAL_CALL classname::getSupportedServiceNames_Static() \
- { \
- Sequence< OUString > aOwnNames( 7 ); \
- aOwnNames[ 0 ] = service1; \
- aOwnNames[ 1 ] = service2; \
- aOwnNames[ 2 ] = service3; \
- aOwnNames[ 3 ] = service4; \
- aOwnNames[ 4 ] = service5; \
- aOwnNames[ 5 ] = service6; \
- aOwnNames[ 6 ] = service7; \
- \
- return ::comphelper::concatSequences( \
- baseclass::getSupportedServiceNames_Static(), \
- aOwnNames \
- ); \
- } \
-
#define IMPLEMENT_SERVICE_REGISTRATION_8( classname, baseclass, service1, service2, service3, service4 , service5, service6, service7, service8 ) \
IMPLEMENT_SERVICE_REGISTRATION_BASE( classname, baseclass ) \
\
@@ -282,7 +79,4 @@ namespace FORMS_MODULE_NAMESPACE
} \
-} // namespace FORMS_MODULE_NAMESPACE
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/forms/source/inc/forms_module_impl.hxx b/forms/source/inc/forms_module_impl.hxx
deleted file mode 100644
index 1719262..0000000
--- a/forms/source/inc/forms_module_impl.hxx
+++ /dev/null
@@ -1,131 +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 FORMS_MODULE_IMPLEMENTATION_INCLUDE_CONTEXT
- #error "not to be included directly! use 'foo_module.hxx instead'!"
-#endif
-
-#ifndef FORMS_MODULE_NAMESPACE
- #error "set FORMS_MODULE_NAMESPACE to your namespace identifier!"
-#endif
-
-#include <comphelper/sequence.hxx>
-
-
-namespace FORMS_MODULE_NAMESPACE
-{
-
-
- using namespace ::com::sun::star::uno;
- using namespace ::com::sun::star::lang;
- using namespace ::com::sun::star::registry;
- using namespace ::comphelper;
- using namespace ::cppu;
-
-
- //= OFormsModule
-
-
-
- //- registration helper
-
-
- Sequence< OUString >* OFormsModule::s_pImplementationNames = NULL;
- Sequence< Sequence< OUString > >* OFormsModule::s_pSupportedServices = NULL;
- Sequence< sal_Int64 >* OFormsModule::s_pCreationFunctionPointers = NULL;
- Sequence< sal_Int64 >* OFormsModule::s_pFactoryFunctionPointers = NULL;
-
-
- void OFormsModule::registerComponent(
- const OUString& _rImplementationName,
- const Sequence< OUString >& _rServiceNames,
- ComponentInstantiation _pCreateFunction,
- FactoryInstantiation _pFactoryFunction)
- {
- if (!s_pImplementationNames)
- {
- OSL_ENSURE(!s_pSupportedServices && !s_pCreationFunctionPointers && !s_pFactoryFunctionPointers,
- "OFormsModule::registerComponent : inconsistent state (the pointers (1)) !");
- s_pImplementationNames = new Sequence< OUString >;
- s_pSupportedServices = new Sequence< Sequence< OUString > >;
- s_pCreationFunctionPointers = new Sequence< sal_Int64 >;
- s_pFactoryFunctionPointers = new Sequence< sal_Int64 >;
- }
- OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers,
- "OFormsModule::registerComponent : inconsistent state (the pointers (2)) !");
-
- OSL_ENSURE( (s_pImplementationNames->getLength() == s_pSupportedServices->getLength())
- && (s_pImplementationNames->getLength() == s_pCreationFunctionPointers->getLength())
- && (s_pImplementationNames->getLength() == s_pFactoryFunctionPointers->getLength()),
- "OFormsModule::registerComponent : inconsistent state !");
-
- sal_Int32 nOldLen = s_pImplementationNames->getLength();
- s_pImplementationNames->realloc(nOldLen + 1);
- s_pSupportedServices->realloc(nOldLen + 1);
- s_pCreationFunctionPointers->realloc(nOldLen + 1);
- s_pFactoryFunctionPointers->realloc(nOldLen + 1);
-
- s_pImplementationNames->getArray()[nOldLen] = _rImplementationName;
- s_pSupportedServices->getArray()[nOldLen] = _rServiceNames;
- s_pCreationFunctionPointers->getArray()[nOldLen] = reinterpret_cast<sal_Int64>(_pCreateFunction);
- s_pFactoryFunctionPointers->getArray()[nOldLen] = reinterpret_cast<sal_Int64>(_pFactoryFunction);
- }
-
-
- void OFormsModule::revokeComponent(const OUString& _rImplementationName)
- {
- if (!s_pImplementationNames)
- {
- OSL_FAIL("OFormsModule::revokeComponent : have no class infos ! Are you sure called this method at the right time ?");
- return;
- }
- OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers,
- "OFormsModule::revokeComponent : inconsistent state (the pointers) !");
- OSL_ENSURE( (s_pImplementationNames->getLength() == s_pSupportedServices->getLength())
- && (s_pImplementationNames->getLength() == s_pCreationFunctionPointers->getLength())
- && (s_pImplementationNames->getLength() == s_pFactoryFunctionPointers->getLength()),
- "OFormsModule::revokeComponent : inconsistent state !");
-
- sal_Int32 nLen = s_pImplementationNames->getLength();
- const OUString* pImplNames = s_pImplementationNames->getConstArray();
- for (sal_Int32 i=0; i<nLen; ++i, ++pImplNames)
- {
- if (pImplNames->equals(_rImplementationName))
- {
- removeElementAt(*s_pImplementationNames, i);
- removeElementAt(*s_pSupportedServices, i);
- removeElementAt(*s_pCreationFunctionPointers, i);
- removeElementAt(*s_pFactoryFunctionPointers, i);
- break;
- }
- }
-
- if (s_pImplementationNames->getLength() == 0)
- {
- delete s_pImplementationNames; s_pImplementationNames = NULL;
- delete s_pSupportedServices; s_pSupportedServices = NULL;
- delete s_pCreationFunctionPointers; s_pCreationFunctionPointers = NULL;
- delete s_pFactoryFunctionPointers; s_pFactoryFunctionPointers = NULL;
- }
- }
-
-} // namespace FORMS_MODULE_NAMESPACE
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/forms/source/inc/frm_module.hxx b/forms/source/inc/frm_module.hxx
index 9a6f7ee..6c71454 100644
--- a/forms/source/inc/frm_module.hxx
+++ b/forms/source/inc/frm_module.hxx
@@ -20,10 +20,7 @@
#ifndef INCLUDED_FORMS_SOURCE_INC_FRM_MODULE_HXX
#define INCLUDED_FORMS_SOURCE_INC_FRM_MODULE_HXX
-#define FORMS_MODULE_INCLUDE_CONTEXT
- #define FORMS_MODULE_NAMESPACE frm
- #include "forms_module.hxx"
-#undef FORMS_MODULE_INCLUDE_CONTEXT
+#include "forms_module.hxx"
#endif // INCLUDED_FORMS_SOURCE_INC_FRM_MODULE_HXX
diff --git a/forms/source/inc/services.hxx b/forms/source/inc/services.hxx
index 170cc33..25cc382 100644
--- a/forms/source/inc/services.hxx
+++ b/forms/source/inc/services.hxx
@@ -202,21 +202,6 @@
#define SRV_SDB_ROWSET "com.sun.star.sdb.RowSet"
#define SRV_SDB_CONNECTION "com.sun.star.sdb.Connection"
-extern "C" {
-
-void SAL_CALL createRegistryInfo_CLibxml2XFormsExtension();
-void SAL_CALL createRegistryInfo_FormOperations();
-void SAL_CALL createRegistryInfo_ODatabaseForm();
-void SAL_CALL createRegistryInfo_OFilterControl();
-void SAL_CALL createRegistryInfo_ONavigationBarControl();
-void SAL_CALL createRegistryInfo_ONavigationBarModel();
-void SAL_CALL createRegistryInfo_ORichTextControl();
-void SAL_CALL createRegistryInfo_ORichTextModel();
-void SAL_CALL createRegistryInfo_OScrollBarModel();
-void SAL_CALL createRegistryInfo_OSpinButtonModel();
-
-}
-
#endif // INCLUDED_FORMS_SOURCE_INC_SERVICES_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/forms/source/misc/frm_module.cxx b/forms/source/misc/frm_module.cxx
deleted file mode 100644
index 43d64cc..0000000
--- a/forms/source/misc/frm_module.cxx
+++ /dev/null
@@ -1,27 +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 "frm_module.hxx"
-
-#define FORMS_MODULE_IMPLEMENTATION_INCLUDE_CONTEXT
- #define FORMS_MODULE_NAMESPACE frm
- #include "forms_module_impl.hxx"
-#undef FORMS_MODULE_IMPLEMENTATION_INCLUDE_CONTEXT
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unusedcode.easy b/unusedcode.easy
index a0d4860..7f7580a 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -196,9 +196,6 @@ dbaui::OQueryViewSwitch::setReadOnly(bool)
dbaui::OTableRowView::SetUpdatable(bool)
dbaui::OTableWindowAccess::isEditable() const
dp_registry::backend::RegisteredDb::getEntry(rtl::OUString const&)
-frm::ORichTextModel::Create(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&)
-frm::OScrollBarModel::Create(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&)
-frm::OSpinButtonModel::Create(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&)
oglcanvas::CanvasHelper::flush() const
oglcanvas::TextLayout::draw(com::sun::star::rendering::ViewState const&, com::sun::star::rendering::RenderState const&, com::sun::star::uno::Reference<com::sun::star::rendering::XGraphicDevice> const&) const
oox::drawingml::TextListStyle::dump() const
More information about the Libreoffice-commits
mailing list