summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2015-03-27 23:27:32 +0100
committerMatúš Kukan <matus.kukan@gmail.com>2015-03-28 11:52:41 +0100
commit39c4b2787ea05233dbd47ca71007c13487628284 (patch)
treede236f6bb3d8c4bb57ade46beff1570dc09cb17e /forms
parenta9535fe984e9c547dfb96daf621813ea39608d9d (diff)
forms: Replace these macros
Change-Id: I656905cf6f0e3647824ff3836fcea93920251264
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/DatabaseForm.cxx1
-rw-r--r--forms/source/component/Filter.cxx1
-rw-r--r--forms/source/component/navigationbar.cxx1
-rw-r--r--forms/source/component/scrollbar.cxx19
-rw-r--r--forms/source/component/scrollbar.hxx4
-rw-r--r--forms/source/component/spinbutton.cxx20
-rw-r--r--forms/source/component/spinbutton.hxx4
-rw-r--r--forms/source/inc/forms_module.hxx82
-rw-r--r--forms/source/inc/frm_module.hxx27
-rw-r--r--forms/source/richtext/richtextcontrol.cxx1
-rw-r--r--forms/source/richtext/richtextmodel.cxx34
-rw-r--r--forms/source/richtext/richtextmodel.hxx4
-rw-r--r--forms/source/runtime/formoperations.cxx1
-rw-r--r--forms/source/solar/component/navbarcontrol.cxx1
-rw-r--r--forms/source/xforms/xpathlib/extension.cxx1
15 files changed, 64 insertions, 137 deletions
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 6dea5199b105..28b312a157fe 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 016ac7051c8d..2cfd52d406e5 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 8f0bfad025e2..c52d1b6e0fcd 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 92f4181f92a2..f52aebbddd77 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 a561c447be86..a99b391e4d16 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 6fc2b3d4b6dd..77ea31200aaa 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 97af488459fd..e8642ce204f8 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 4a5092a13591..000000000000
--- 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 6c71454c43de..000000000000
--- 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 76372c341660..39a29a2b9651 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 3449c36d5729..7db6a9f5e633 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 10e7b3ee04c0..c39edc98a964 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 d337a35bf7cf..e6e831d27539 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 92db4965bcf0..3f2afea11653 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 a77b8a373d81..0588836179f6 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;