summaryrefslogtreecommitdiff
path: root/forms/source/xforms
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-17 12:25:11 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-17 12:25:11 +0100
commit3099c70b11c7e5b80fe4dbe3dc99171fb38c6fc2 (patch)
tree63699b525800b2c6708e90b817853bb60be5f6d8 /forms/source/xforms
parent5229726b4d4e7d76f410d221f8f8cd8abcfd5a19 (diff)
Fix various XServiceInfo implementations
...to match what is recorded in the .component files Change-Id: Ie548cd37872d3b8540222201afaac73040e65c8f
Diffstat (limited to 'forms/source/xforms')
-rw-r--r--forms/source/xforms/model.cxx18
-rw-r--r--forms/source/xforms/model.hxx16
-rw-r--r--forms/source/xforms/xforms_services.cxx27
3 files changed, 57 insertions, 4 deletions
diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx
index e428d451fcd0..c6774ddc0488 100644
--- a/forms/source/xforms/model.cxx
+++ b/forms/source/xforms/model.cxx
@@ -36,6 +36,7 @@
#include <comphelper/propertysetinfo.hxx>
#include <comphelper/processfactory.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <algorithm>
@@ -680,6 +681,23 @@ Sequence<sal_Int8> Model::getImplementationId()
return css::uno::Sequence<sal_Int8>();
}
+OUString Model::getImplementationName()
+ throw (css::uno::RuntimeException, std::exception)
+{
+ return OUString("com.sun.star.form.Model");
+}
+
+sal_Bool Model::supportsService(OUString const & ServiceName)
+ throw (css::uno::RuntimeException, std::exception)
+{
+ return cppu::supportsService(this, ServiceName);
+}
+
+css::uno::Sequence<OUString> Model::getSupportedServiceNames()
+ throw (css::uno::RuntimeException, std::exception)
+{
+ return css::uno::Sequence<OUString>{"com.sun.star.xforms.Model"};
+}
extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
com_sun_star_form_Model_get_implementation(::com::sun::star::uno::XComponentContext*,
diff --git a/forms/source/xforms/model.hxx b/forms/source/xforms/model.hxx
index 0d8b962414e5..2ae00816a163 100644
--- a/forms/source/xforms/model.hxx
+++ b/forms/source/xforms/model.hxx
@@ -20,11 +20,12 @@
#ifndef INCLUDED_FORMS_SOURCE_XFORMS_MODEL_HXX
#define INCLUDED_FORMS_SOURCE_XFORMS_MODEL_HXX
-#include <cppuhelper/implbase4.hxx>
+#include <cppuhelper/implbase.hxx>
#include <propertysetbase.hxx>
#include <com/sun/star/xforms/XModel2.hpp>
#include <com/sun/star/xforms/XFormsUIHelper1.hpp>
#include <com/sun/star/util/XUpdatable.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/uno/Reference.hxx>
@@ -65,12 +66,13 @@ namespace xforms
*
* See http://www.w3.org/TR/xforms/ for more information.
*/
-typedef cppu::ImplInheritanceHelper4<
+typedef cppu::ImplInheritanceHelper<
PropertySetBase,
com::sun::star::xforms::XModel2,
com::sun::star::xforms::XFormsUIHelper1,
com::sun::star::util::XUpdatable,
- com::sun::star::lang::XUnoTunnel
+ com::sun::star::lang::XUnoTunnel,
+ css::lang::XServiceInfo
> Model_t;
class Model : public Model_t
{
@@ -439,6 +441,14 @@ public:
virtual IntSequence_t SAL_CALL getImplementationId()
throw( RuntimeException_t ) SAL_OVERRIDE;
+ OUString SAL_CALL getImplementationName()
+ throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+
+ sal_Bool SAL_CALL supportsService(OUString const & ServiceName)
+ throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+
+ css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
+ throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
};
} // namespace
diff --git a/forms/source/xforms/xforms_services.cxx b/forms/source/xforms/xforms_services.cxx
index 9637ae1ae97c..7e88ab115db5 100644
--- a/forms/source/xforms/xforms_services.cxx
+++ b/forms/source/xforms/xforms_services.cxx
@@ -24,14 +24,39 @@
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/uno/XInterface.hpp>
+#include <cppuhelper/supportsservice.hxx>
using namespace ::com::sun::star;
+namespace {
+
+class Implementation:
+ public cppu::ImplInheritanceHelper<
+ NameContainer<css::uno::Reference<css::beans::XPropertySet>>,
+ css::lang::XServiceInfo>
+{
+ OUString SAL_CALL getImplementationName()
+ throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
+ { return OUString("com.sun.star.form.XForms"); }
+
+ sal_Bool SAL_CALL supportsService(OUString const & ServiceName)
+ throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
+ { return cppu::supportsService(this, ServiceName); }
+
+ css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
+ throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
+ {
+ return css::uno::Sequence<OUString>{"com.sun.star.xforms.XForms"};
+ }
+};
+
+}
+
extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface* SAL_CALL
com_sun_star_form_XForms_get_implementation(uno::XComponentContext*,
uno::Sequence<uno::Any> const &)
{
- return cppu::acquire(new NameContainer<uno::Reference<beans::XPropertySet> >());
+ return cppu::acquire(new Implementation);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */