[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - reportdesign/inc reportdesign/Library_rpt.mk reportdesign/source reportdesign/util

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Fri May 14 09:20:11 UTC 2021


 reportdesign/Library_rpt.mk                        |    1 
 reportdesign/inc/ReportDefinition.hxx              |    7 +
 reportdesign/source/core/api/FixedLine.cxx         |   30 +++++--
 reportdesign/source/core/api/FixedText.cxx         |   30 +++++--
 reportdesign/source/core/api/FormatCondition.cxx   |   29 +++++--
 reportdesign/source/core/api/FormattedField.cxx    |   27 ++++--
 reportdesign/source/core/api/Function.cxx          |   29 +++++--
 reportdesign/source/core/api/ImageControl.cxx      |   30 +++++--
 reportdesign/source/core/api/ReportDefinition.cxx  |   26 ++++--
 reportdesign/source/core/api/ReportEngineJFree.cxx |   30 +++++--
 reportdesign/source/core/api/Shape.cxx             |   27 ++++--
 reportdesign/source/core/api/services.cxx          |   82 +++++++++++++++++++++
 reportdesign/source/core/inc/FixedLine.hxx         |    6 +
 reportdesign/source/core/inc/FixedText.hxx         |    6 +
 reportdesign/source/core/inc/FormatCondition.hxx   |    6 +
 reportdesign/source/core/inc/FormattedField.hxx    |    6 +
 reportdesign/source/core/inc/Function.hxx          |    6 +
 reportdesign/source/core/inc/ImageControl.hxx      |    6 +
 reportdesign/source/core/inc/ReportEngineJFree.hxx |    6 +
 reportdesign/source/core/inc/Shape.hxx             |    6 +
 reportdesign/util/rpt.component                    |   29 ++-----
 21 files changed, 327 insertions(+), 98 deletions(-)

New commits:
commit b200460168e30bfe2ece67de99457b99b4c7fd7f
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu May 13 18:47:07 2021 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Fri May 14 11:19:39 2021 +0200

    tdf#141571 Base crashed on creation of user function
    
    Revert "reportdesign/core: create instances with uno constructors"
    This reverts commit 79c1d1234bdac0d41109930529f42d39c70b0f7b.
    
    I have no idea what is causing this. Something is stomping
    on memory belonging to something else, but why?
    
    Change-Id: Ieb758e5788f07e3f477063274ccd0721e3bf7726
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115567
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    (cherry picked from commit 9ca8a4e229d270fe7ec16f3aa7b5cb2e1f8a522f)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115515
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/reportdesign/Library_rpt.mk b/reportdesign/Library_rpt.mk
index 0ea86b62f0db..fb846e09ee8a 100644
--- a/reportdesign/Library_rpt.mk
+++ b/reportdesign/Library_rpt.mk
@@ -66,6 +66,7 @@ $(eval $(call gb_Library_add_exception_objects,rpt,\
     reportdesign/source/core/api/ReportEngineJFree \
     reportdesign/source/core/api/ReportVisitor \
     reportdesign/source/core/api/Section \
+    reportdesign/source/core/api/services \
     reportdesign/source/core/api/Shape \
     reportdesign/source/core/api/Tools \
     reportdesign/source/core/misc/conditionalexpression \
diff --git a/reportdesign/inc/ReportDefinition.hxx b/reportdesign/inc/ReportDefinition.hxx
index eede1cd61090..50973000d493 100644
--- a/reportdesign/inc/ReportDefinition.hxx
+++ b/reportdesign/inc/ReportDefinition.hxx
@@ -173,6 +173,13 @@ namespace reportdesign
                                   ,const css::uno::Reference< css::lang::XMultiServiceFactory > & _xFactory
                                   ,css::uno::Reference< css::drawing::XShape >& _xShape);
 
+        /// @throws css::uno::RuntimeException
+        static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
+        /// @throws css::uno::RuntimeException
+        static OUString getImplementationName_Static();
+        static css::uno::Reference< css::uno::XInterface >
+            create(css::uno::Reference< css::uno::XComponentContext > const & xContext);
+
         css::uno::Reference< css::uno::XComponentContext > getContext();
 
     private:
diff --git a/reportdesign/source/core/api/FixedLine.cxx b/reportdesign/source/core/api/FixedLine.cxx
index 984bf7d26305..b868febe7cdc 100644
--- a/reportdesign/source/core/api/FixedLine.cxx
+++ b/reportdesign/source/core/api/FixedLine.cxx
@@ -199,14 +199,33 @@ void SAL_CALL OFixedLine::dispose()
     cppu::WeakComponentImplHelperBase::dispose();
 }
 
-OUString SAL_CALL OFixedLine::getImplementationName(  )
+OUString OFixedLine::getImplementationName_Static(  )
 {
     return "com.sun.star.comp.report.OFixedLine";
 }
 
+
+OUString SAL_CALL OFixedLine::getImplementationName(  )
+{
+    return getImplementationName_Static();
+}
+
+uno::Sequence< OUString > OFixedLine::getSupportedServiceNames_Static(  )
+{
+    uno::Sequence< OUString > aServices { SERVICE_FIXEDLINE };
+
+    return aServices;
+}
+
+uno::Reference< uno::XInterface > OFixedLine::create(uno::Reference< uno::XComponentContext > const & xContext)
+{
+    return *(new OFixedLine(xContext));
+}
+
+
 uno::Sequence< OUString > SAL_CALL OFixedLine::getSupportedServiceNames(  )
 {
-    return { SERVICE_FIXEDLINE };
+    return getSupportedServiceNames_Static();
 }
 
 sal_Bool SAL_CALL OFixedLine::supportsService(const OUString& ServiceName)
@@ -542,11 +561,4 @@ void SAL_CALL OFixedLine::setPrintRepeatedValues( sal_Bool /*_printrepeatedvalue
 } // namespace reportdesign
 
 
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
-reportdesign_OFixedLine_get_implementation(
-    css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
-{
-    return cppu::acquire(new reportdesign::OFixedLine(context));
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/FixedText.cxx b/reportdesign/source/core/api/FixedText.cxx
index 589d68946406..5beaa5481667 100644
--- a/reportdesign/source/core/api/FixedText.cxx
+++ b/reportdesign/source/core/api/FixedText.cxx
@@ -88,14 +88,33 @@ void SAL_CALL OFixedText::dispose()
     uno::Reference< report::XFixedText> xHoldAlive = this;
 }
 
-OUString SAL_CALL OFixedText::getImplementationName(  )
+OUString OFixedText::getImplementationName_Static(  )
 {
     return "com.sun.star.comp.report.OFixedText";
 }
 
+
+OUString SAL_CALL OFixedText::getImplementationName(  )
+{
+    return getImplementationName_Static();
+}
+
+uno::Sequence< OUString > OFixedText::getSupportedServiceNames_Static(  )
+{
+    uno::Sequence< OUString > aServices { SERVICE_FIXEDTEXT };
+
+    return aServices;
+}
+
+uno::Reference< uno::XInterface > OFixedText::create(uno::Reference< uno::XComponentContext > const & xContext)
+{
+    return *(new OFixedText(xContext));
+}
+
+
 uno::Sequence< OUString > SAL_CALL OFixedText::getSupportedServiceNames(  )
 {
-    return { SERVICE_FIXEDTEXT };
+    return getSupportedServiceNames_Static();
 }
 
 sal_Bool SAL_CALL OFixedText::supportsService(const OUString& ServiceName)
@@ -300,12 +319,5 @@ OUString SAL_CALL OFixedText::getShapeType(  )
 
 } // namespace reportdesign
 
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
-reportdesign_OFixedText_get_implementation(
-    css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
-{
-    return cppu::acquire(new reportdesign::OFixedText(context));
-}
-
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/FormatCondition.cxx b/reportdesign/source/core/api/FormatCondition.cxx
index a515b76d24d9..04558f710ed9 100644
--- a/reportdesign/source/core/api/FormatCondition.cxx
+++ b/reportdesign/source/core/api/FormatCondition.cxx
@@ -27,6 +27,12 @@ namespace reportdesign
 
     using namespace com::sun::star;
 
+uno::Reference< uno::XInterface > OFormatCondition::create(uno::Reference< uno::XComponentContext > const & xContext)
+{
+    return *(new OFormatCondition(xContext));
+}
+
+
 OFormatCondition::OFormatCondition(uno::Reference< uno::XComponentContext > const & _xContext)
 :FormatConditionBase(m_aMutex)
 ,FormatConditionPropertySet(_xContext,IMPLEMENTS_PROPERTY_SET,uno::Sequence< OUString >())
@@ -46,14 +52,27 @@ void SAL_CALL OFormatCondition::dispose()
     cppu::WeakComponentImplHelperBase::dispose();
 }
 
-OUString SAL_CALL OFormatCondition::getImplementationName(  )
+OUString OFormatCondition::getImplementationName_Static(  )
 {
     return "com.sun.star.comp.report.OFormatCondition";
 }
 
+
+OUString SAL_CALL OFormatCondition::getImplementationName(  )
+{
+    return getImplementationName_Static();
+}
+
+uno::Sequence< OUString > OFormatCondition::getSupportedServiceNames_Static(  )
+{
+    uno::Sequence< OUString > aServices { SERVICE_FORMATCONDITION };
+
+    return aServices;
+}
+
 uno::Sequence< OUString > SAL_CALL OFormatCondition::getSupportedServiceNames(  )
 {
-    return { SERVICE_FORMATCONDITION };
+    return getSupportedServiceNames_Static();
 }
 
 sal_Bool SAL_CALL OFormatCondition::supportsService(const OUString& ServiceName)
@@ -124,11 +143,5 @@ REPORTCONTROLFORMAT_IMPL(OFormatCondition,m_aFormatProperties)
 
 } // namespace reportdesign
 
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
-reportdesign_OFormatCondition_get_implementation(
-    css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
-{
-    return cppu::acquire(new reportdesign::OFormatCondition(context));
-}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/FormattedField.cxx b/reportdesign/source/core/api/FormattedField.cxx
index 81553f9d7672..9414e87e6424 100644
--- a/reportdesign/source/core/api/FormattedField.cxx
+++ b/reportdesign/source/core/api/FormattedField.cxx
@@ -35,6 +35,11 @@ namespace reportdesign
     using namespace com::sun::star;
     using namespace comphelper;
 
+uno::Reference< uno::XInterface > OFormattedField::create(uno::Reference< uno::XComponentContext > const & xContext)
+{
+    return *(new OFormattedField(xContext));
+}
+
 static uno::Sequence< OUString > lcl_getFormattedFieldOptionals()
 {
     OUString pProps[] = { OUString(PROPERTY_MASTERFIELDS),OUString(PROPERTY_DETAILFIELDS) };
@@ -92,16 +97,27 @@ void SAL_CALL OFormattedField::dispose()
     m_xFormatsSupplier.clear();
 }
 
-OUString SAL_CALL OFormattedField::getImplementationName(  )
+OUString OFormattedField::getImplementationName_Static(  )
 {
     return "com.sun.star.comp.report.OFormattedField";
 }
 
-uno::Sequence< OUString > SAL_CALL OFormattedField::getSupportedServiceNames(  )
+
+OUString SAL_CALL OFormattedField::getImplementationName(  )
+{
+    return getImplementationName_Static();
+}
+
+uno::Sequence< OUString > OFormattedField::getSupportedServiceNames_Static(  )
 {
     return { SERVICE_FORMATTEDFIELD, "com.sun.star.awt.UnoControlFormattedFieldModel" };
 }
 
+uno::Sequence< OUString > SAL_CALL OFormattedField::getSupportedServiceNames(  )
+{
+    return getSupportedServiceNames_Static();
+}
+
 sal_Bool SAL_CALL OFormattedField::supportsService(const OUString& ServiceName)
 {
     return cppu::supportsService(this, ServiceName);
@@ -341,12 +357,5 @@ OUString SAL_CALL OFormattedField::getShapeType(  )
 
 } // namespace reportdesign
 
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
-reportdesign_OFormattedField_get_implementation(
-    css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
-{
-    return cppu::acquire(new reportdesign::OFormattedField(context));
-}
-
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/Function.cxx b/reportdesign/source/core/api/Function.cxx
index 61844eaad3bd..55150a992bf3 100644
--- a/reportdesign/source/core/api/Function.cxx
+++ b/reportdesign/source/core/api/Function.cxx
@@ -25,6 +25,11 @@ namespace reportdesign
 
     using namespace com::sun::star;
 
+uno::Reference< uno::XInterface > OFunction::create(uno::Reference< uno::XComponentContext > const & xContext)
+{
+    return *(new OFunction(xContext));
+}
+
 
 OFunction::OFunction(uno::Reference< uno::XComponentContext > const & _xContext)
 :FunctionBase(m_aMutex)
@@ -47,14 +52,27 @@ void SAL_CALL OFunction::dispose()
     cppu::WeakComponentImplHelperBase::dispose();
 }
 
-OUString SAL_CALL OFunction::getImplementationName(  )
+OUString OFunction::getImplementationName_Static(  )
 {
     return "com.sun.star.comp.report.OFunction";
 }
 
+
+OUString SAL_CALL OFunction::getImplementationName(  )
+{
+    return getImplementationName_Static();
+}
+
+uno::Sequence< OUString > OFunction::getSupportedServiceNames_Static(  )
+{
+    uno::Sequence< OUString > aServices { SERVICE_FUNCTION };
+
+    return aServices;
+}
+
 uno::Sequence< OUString > SAL_CALL OFunction::getSupportedServiceNames(  )
 {
-    return { SERVICE_FUNCTION };
+    return getSupportedServiceNames_Static();
 }
 
 sal_Bool SAL_CALL OFunction::supportsService(const OUString& ServiceName)
@@ -179,12 +197,5 @@ void SAL_CALL OFunction::setParent( const uno::Reference< uno::XInterface >& Par
 
 } // namespace reportdesign
 
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
-reportdesign_OFunction_get_implementation(
-    css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
-{
-    return cppu::acquire(new reportdesign::OFunction(context));
-}
-
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/ImageControl.cxx b/reportdesign/source/core/api/ImageControl.cxx
index 1d08baa1aa6a..7c72b84fb50e 100644
--- a/reportdesign/source/core/api/ImageControl.cxx
+++ b/reportdesign/source/core/api/ImageControl.cxx
@@ -161,14 +161,33 @@ void SAL_CALL OImageControl::dispose()
     cppu::WeakComponentImplHelperBase::dispose();
 }
 
-OUString SAL_CALL OImageControl::getImplementationName(  )
+OUString OImageControl::getImplementationName_Static(  )
 {
     return "com.sun.star.comp.report.OImageControl";
 }
 
+
+OUString SAL_CALL OImageControl::getImplementationName(  )
+{
+    return getImplementationName_Static();
+}
+
+uno::Sequence< OUString > OImageControl::getSupportedServiceNames_Static(  )
+{
+    uno::Sequence< OUString > aServices { SERVICE_IMAGECONTROL };
+
+    return aServices;
+}
+
+uno::Reference< uno::XInterface > OImageControl::create(uno::Reference< uno::XComponentContext > const & xContext)
+{
+    return *(new OImageControl(xContext));
+}
+
+
 uno::Sequence< OUString > SAL_CALL OImageControl::getSupportedServiceNames(  )
 {
-    return { SERVICE_IMAGECONTROL };
+    return getSupportedServiceNames_Static();
 }
 
 sal_Bool SAL_CALL OImageControl::supportsService(const OUString& ServiceName)
@@ -459,12 +478,5 @@ void SAL_CALL OImageControl::setPreserveIRI( sal_Bool _preserveiri )
 
 } // namespace reportdesign
 
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
-reportdesign_OImageControl_get_implementation(
-    css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
-{
-    return cppu::acquire(new reportdesign::OImageControl(context));
-}
-
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 981c42bdf00b..bac890602f22 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -673,11 +673,23 @@ void SAL_CALL OReportDefinition::disposing()
 }
 
 
-OUString SAL_CALL OReportDefinition::getImplementationName(  )
+OUString OReportDefinition::getImplementationName_Static(  )
 {
     return "com.sun.star.comp.report.OReportDefinition";
 }
 
+OUString SAL_CALL OReportDefinition::getImplementationName(  )
+{
+    return getImplementationName_Static();
+}
+
+uno::Sequence< OUString > OReportDefinition::getSupportedServiceNames_Static(  )
+{
+    uno::Sequence< OUString > aServices { SERVICE_REPORTDEFINITION };
+
+    return aServices;
+}
+
 uno::Sequence< OUString > SAL_CALL OReportDefinition::getSupportedServiceNames(  )
 {
     // first collect the services which are supported by our aggregate
@@ -720,6 +732,11 @@ uno::Sequence< uno::Type > SAL_CALL OReportDefinition::getTypes(  )
     return ReportDefinitionBase::getTypes();
 }
 
+uno::Reference< uno::XInterface > OReportDefinition::create(uno::Reference< uno::XComponentContext > const & xContext)
+{
+    return *(new OReportDefinition(xContext));
+}
+
 // XReportDefinition
 OUString SAL_CALL OReportDefinition::getCaption()
 {
@@ -2655,11 +2672,4 @@ uno::Reference< document::XUndoManager > SAL_CALL OReportDefinition::getUndoMana
 
 }// namespace reportdesign
 
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
-reportdesign_OReportDefinition_get_implementation(
-    css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
-{
-    return cppu::acquire(new reportdesign::OReportDefinition(context));
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/ReportEngineJFree.cxx b/reportdesign/source/core/api/ReportEngineJFree.cxx
index d8ead8f8eb88..ec92f26af23e 100644
--- a/reportdesign/source/core/api/ReportEngineJFree.cxx
+++ b/reportdesign/source/core/api/ReportEngineJFree.cxx
@@ -73,14 +73,33 @@ void SAL_CALL OReportEngineJFree::dispose()
     m_xActiveConnection.clear();
 }
 
-OUString SAL_CALL OReportEngineJFree::getImplementationName(  )
+OUString OReportEngineJFree::getImplementationName_Static(  )
 {
     return "com.sun.star.comp.report.OReportEngineJFree";
 }
 
+
+OUString SAL_CALL OReportEngineJFree::getImplementationName(  )
+{
+    return getImplementationName_Static();
+}
+
+uno::Sequence< OUString > OReportEngineJFree::getSupportedServiceNames_Static(  )
+{
+    uno::Sequence< OUString > aServices { "com.sun.star.report.ReportEngine" };
+
+    return aServices;
+}
+
+uno::Reference< uno::XInterface > OReportEngineJFree::create(uno::Reference< uno::XComponentContext > const & xContext)
+{
+    return *(new OReportEngineJFree(xContext));
+}
+
+
 uno::Sequence< OUString > SAL_CALL OReportEngineJFree::getSupportedServiceNames(  )
 {
-    return { "com.sun.star.report.ReportEngine" };
+    return getSupportedServiceNames_Static();
 }
 
 sal_Bool SAL_CALL OReportEngineJFree::supportsService(const OUString& ServiceName)
@@ -360,11 +379,4 @@ void SAL_CALL OReportEngineJFree::setMaxRows( ::sal_Int32 MaxRows )
 } // namespace reportdesign
 
 
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
-reportdesign_OReportEngineJFree_get_implementation(
-    css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
-{
-    return cppu::acquire(new reportdesign::OReportEngineJFree(context));
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/Shape.cxx b/reportdesign/source/core/api/Shape.cxx
index 077031c5c9aa..daafbd47ff0f 100644
--- a/reportdesign/source/core/api/Shape.cxx
+++ b/reportdesign/source/core/api/Shape.cxx
@@ -107,17 +107,33 @@ void SAL_CALL OShape::dispose()
     cppu::WeakComponentImplHelperBase::dispose();
 }
 
+uno::Reference< uno::XInterface > OShape::create(uno::Reference< uno::XComponentContext > const & xContext)
+{
+    return *(new OShape(xContext));
+}
 
-OUString SAL_CALL OShape::getImplementationName(  )
+
+OUString OShape::getImplementationName_Static(  )
 {
     return "com.sun.star.comp.report.Shape";
 }
 
+
+OUString SAL_CALL OShape::getImplementationName(  )
+{
+    return getImplementationName_Static();
+}
+
+uno::Sequence< OUString > OShape::getSupportedServiceNames_Static(  )
+{
+    return { SERVICE_SHAPE };
+}
+
 uno::Sequence< OUString > SAL_CALL OShape::getSupportedServiceNames(  )
 {
     if(m_sServiceName.isEmpty())
     {
-        return { SERVICE_SHAPE };
+        return getSupportedServiceNames_Static();
     }
     else
     {
@@ -482,12 +498,5 @@ void SAL_CALL OShape::setCustomShapeGeometry( const uno::Sequence< beans::Proper
 
 }// namespace reportdesign
 
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
-reportdesign_OShape_get_implementation(
-    css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
-{
-    return cppu::acquire(new reportdesign::OShape(context));
-}
-
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/services.cxx b/reportdesign/source/core/api/services.cxx
new file mode 100644
index 000000000000..de07c51e8c22
--- /dev/null
+++ b/reportdesign/source/core/api/services.cxx
@@ -0,0 +1,82 @@
+/* -*- 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 <sal/types.h>
+#include <cppuhelper/factory.hxx>
+#include <cppuhelper/implementationentry.hxx>
+#include <ReportDefinition.hxx>
+#include <FormattedField.hxx>
+#include <FixedText.hxx>
+#include <ImageControl.hxx>
+#include <FormatCondition.hxx>
+#include <ReportEngineJFree.hxx>
+#include <Function.hxx>
+#include <Shape.hxx>
+#include <FixedLine.hxx>
+
+/********************************************************************************************/
+
+using namespace ::reportdesign;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::registry;
+
+// registry functions
+namespace
+{
+cppu::ImplementationEntry const entries[]
+    = { { &OReportDefinition::create, &OReportDefinition::getImplementationName_Static,
+          &OReportDefinition::getSupportedServiceNames_Static, &cppu::createSingleComponentFactory,
+          nullptr, 0 },
+        { &OFormattedField::create, &OFormattedField::getImplementationName_Static,
+          &OFormattedField::getSupportedServiceNames_Static, &cppu::createSingleComponentFactory,
+          nullptr, 0 },
+        { &OFixedText::create, &OFixedText::getImplementationName_Static,
+          &OFixedText::getSupportedServiceNames_Static, &cppu::createSingleComponentFactory,
+          nullptr, 0 },
+        { &OImageControl::create, &OImageControl::getImplementationName_Static,
+          &OImageControl::getSupportedServiceNames_Static, &cppu::createSingleComponentFactory,
+          nullptr, 0 },
+        { &OFormatCondition::create, &OFormatCondition::getImplementationName_Static,
+          &OFormatCondition::getSupportedServiceNames_Static, &cppu::createSingleComponentFactory,
+          nullptr, 0 },
+        { &OReportEngineJFree::create, &OReportEngineJFree::getImplementationName_Static,
+          &OReportEngineJFree::getSupportedServiceNames_Static, &cppu::createSingleComponentFactory,
+          nullptr, 0 },
+        { &OFunction::create, &OFunction::getImplementationName_Static,
+          &OFunction::getSupportedServiceNames_Static, &cppu::createSingleComponentFactory, nullptr,
+          0 },
+        { &OShape::create, &OShape::getImplementationName_Static,
+          &OShape::getSupportedServiceNames_Static, &cppu::createSingleComponentFactory, nullptr,
+          0 },
+        { &OFixedLine::create, &OFixedLine::getImplementationName_Static,
+          &OFixedLine::getSupportedServiceNames_Static, &cppu::createSingleComponentFactory,
+          nullptr, 0 },
+        { nullptr, nullptr, nullptr, nullptr, nullptr, 0 } };
+}
+
+extern "C" {
+SAL_DLLPUBLIC_EXPORT void* rpt_component_getFactory(char const* implName, void* serviceManager,
+                                                    void* registryKey)
+{
+    return cppu::component_getFactoryHelper(implName, serviceManager, registryKey, entries);
+}
+
+} // extern "C"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/inc/FixedLine.hxx b/reportdesign/source/core/inc/FixedLine.hxx
index f3f77a63704d..5d726a85ed97 100644
--- a/reportdesign/source/core/inc/FixedLine.hxx
+++ b/reportdesign/source/core/inc/FixedLine.hxx
@@ -83,6 +83,12 @@ namespace reportdesign
         virtual OUString SAL_CALL getImplementationName(  ) override;
         virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  ) override;
 
+        /// @throws css::uno::RuntimeException
+        static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
+        /// @throws css::uno::RuntimeException
+        static OUString getImplementationName_Static();
+        static css::uno::Reference< css::uno::XInterface >
+            create(css::uno::Reference< css::uno::XComponentContext > const & xContext);
         // css::beans::XPropertySet
         virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) override;
         virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
diff --git a/reportdesign/source/core/inc/FixedText.hxx b/reportdesign/source/core/inc/FixedText.hxx
index 396a0d145be2..03126ab30e5f 100644
--- a/reportdesign/source/core/inc/FixedText.hxx
+++ b/reportdesign/source/core/inc/FixedText.hxx
@@ -111,6 +111,12 @@ namespace reportdesign
         virtual OUString SAL_CALL getImplementationName(  ) override;
         virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  ) override;
 
+        /// @throws css::uno::RuntimeException
+        static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
+        /// @throws css::uno::RuntimeException
+        static OUString getImplementationName_Static();
+        static css::uno::Reference< css::uno::XInterface >
+            create(css::uno::Reference< css::uno::XComponentContext > const & xContext);
         // css::beans::XPropertySet
         virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) override;
         virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
diff --git a/reportdesign/source/core/inc/FormatCondition.hxx b/reportdesign/source/core/inc/FormatCondition.hxx
index be1506f25ca1..409b1198f7ef 100644
--- a/reportdesign/source/core/inc/FormatCondition.hxx
+++ b/reportdesign/source/core/inc/FormatCondition.hxx
@@ -107,6 +107,12 @@ namespace reportdesign
         virtual OUString SAL_CALL getImplementationName(  ) override;
         virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  ) override;
 
+        /// @throws css::uno::RuntimeException
+        static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
+        /// @throws css::uno::RuntimeException
+        static OUString getImplementationName_Static();
+        static css::uno::Reference< css::uno::XInterface >
+            create(css::uno::Reference< css::uno::XComponentContext > const & xContext);
         // css::beans::XPropertySet
         virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) override;
         virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
diff --git a/reportdesign/source/core/inc/FormattedField.hxx b/reportdesign/source/core/inc/FormattedField.hxx
index 6606c48108e4..040b6af2dfbb 100644
--- a/reportdesign/source/core/inc/FormattedField.hxx
+++ b/reportdesign/source/core/inc/FormattedField.hxx
@@ -114,6 +114,12 @@ namespace reportdesign
         virtual OUString SAL_CALL getImplementationName(  ) override;
         virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  ) override;
 
+        /// @throws css::uno::RuntimeException
+        static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
+        /// @throws css::uno::RuntimeException
+        static OUString getImplementationName_Static();
+        static css::uno::Reference< css::uno::XInterface >
+            create(css::uno::Reference< css::uno::XComponentContext > const & xContext);
         // css::beans::XPropertySet
         virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) override;
         virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
diff --git a/reportdesign/source/core/inc/Function.hxx b/reportdesign/source/core/inc/Function.hxx
index 3a5be94effe4..bf067c8068be 100644
--- a/reportdesign/source/core/inc/Function.hxx
+++ b/reportdesign/source/core/inc/Function.hxx
@@ -86,6 +86,12 @@ namespace reportdesign
         virtual OUString SAL_CALL getImplementationName(  ) override;
         virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  ) override;
 
+        /// @throws css::uno::RuntimeException
+        static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
+        /// @throws css::uno::RuntimeException
+        static OUString getImplementationName_Static();
+        static css::uno::Reference< css::uno::XInterface >
+            create(css::uno::Reference< css::uno::XComponentContext > const & xContext);
         // css::beans::XPropertySet
         virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) override;
         virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
diff --git a/reportdesign/source/core/inc/ImageControl.hxx b/reportdesign/source/core/inc/ImageControl.hxx
index 00a218515036..63ed5468efc6 100644
--- a/reportdesign/source/core/inc/ImageControl.hxx
+++ b/reportdesign/source/core/inc/ImageControl.hxx
@@ -89,6 +89,12 @@ namespace reportdesign
         virtual OUString SAL_CALL getImplementationName(  ) override;
         virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  ) override;
 
+        /// @throws css::uno::RuntimeException
+        static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
+        /// @throws css::uno::RuntimeException
+        static OUString getImplementationName_Static();
+        static css::uno::Reference< css::uno::XInterface >
+            create(css::uno::Reference< css::uno::XComponentContext > const & xContext);
         // css::beans::XPropertySet
         virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) override;
         virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
diff --git a/reportdesign/source/core/inc/ReportEngineJFree.hxx b/reportdesign/source/core/inc/ReportEngineJFree.hxx
index 9816b551c44a..951dc93ce168 100644
--- a/reportdesign/source/core/inc/ReportEngineJFree.hxx
+++ b/reportdesign/source/core/inc/ReportEngineJFree.hxx
@@ -79,6 +79,12 @@ namespace reportdesign
         virtual OUString SAL_CALL getImplementationName(  ) override;
         virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  ) override;
 
+        /// @throws css::uno::RuntimeException
+        static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
+        /// @throws css::uno::RuntimeException
+        static OUString getImplementationName_Static();
+        static css::uno::Reference< css::uno::XInterface >
+            create(css::uno::Reference< css::uno::XComponentContext > const & xContext);
     private:
         // css::beans::XPropertySet
         virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) override;
diff --git a/reportdesign/source/core/inc/Shape.hxx b/reportdesign/source/core/inc/Shape.hxx
index 758d48ddf1c9..b7c9e6d882f9 100644
--- a/reportdesign/source/core/inc/Shape.hxx
+++ b/reportdesign/source/core/inc/Shape.hxx
@@ -121,6 +121,12 @@ namespace reportdesign
         virtual OUString SAL_CALL getImplementationName(  ) override;
         virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  ) override;
 
+        /// @throws css::uno::RuntimeException
+        static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
+        /// @throws css::uno::RuntimeException
+        static OUString getImplementationName_Static();
+        static css::uno::Reference< css::uno::XInterface >
+            create(css::uno::Reference< css::uno::XComponentContext > const & xContext);
         // css::beans::XPropertySet
         virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) override;
         virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
diff --git a/reportdesign/util/rpt.component b/reportdesign/util/rpt.component
index a44b941216e7..7b3be6603471 100644
--- a/reportdesign/util/rpt.component
+++ b/reportdesign/util/rpt.component
@@ -18,41 +18,32 @@
  -->
 
 <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
-    xmlns="http://openoffice.org/2010/uno-components">
-  <implementation name="com.sun.star.comp.report.OFixedLine"
-    constructor="reportdesign_OFixedLine_get_implementation">
+    prefix="rpt" xmlns="http://openoffice.org/2010/uno-components">
+  <implementation name="com.sun.star.comp.report.OFixedLine">
     <service name="com.sun.star.report.FixedLine"/>
   </implementation>
-  <implementation name="com.sun.star.comp.report.OFixedText"
-    constructor="reportdesign_OFixedText_get_implementation">
+  <implementation name="com.sun.star.comp.report.OFixedText">
     <service name="com.sun.star.report.FixedText"/>
   </implementation>
-  <implementation name="com.sun.star.comp.report.OFormatCondition"
-    constructor="reportdesign_OFormatCondition_get_implementation">
+  <implementation name="com.sun.star.comp.report.OFormatCondition">
     <service name="com.sun.star.report.FormatCondition"/>
   </implementation>
-  <implementation name="com.sun.star.comp.report.OFormattedField"
-    constructor="reportdesign_OFormattedField_get_implementation">
+  <implementation name="com.sun.star.comp.report.OFormattedField">
     <service name="com.sun.star.report.FormattedField"/>
   </implementation>
-  <implementation name="com.sun.star.comp.report.OFunction"
-    constructor="reportdesign_OFunction_get_implementation">
+  <implementation name="com.sun.star.comp.report.OFunction">
     <service name="com.sun.star.report.Function"/>
   </implementation>
-  <implementation name="com.sun.star.comp.report.OImageControl"
-    constructor="reportdesign_OImageControl_get_implementation">
+  <implementation name="com.sun.star.comp.report.OImageControl">
     <service name="com.sun.star.report.ImageControl"/>
   </implementation>
-  <implementation name="com.sun.star.comp.report.OReportDefinition"
-    constructor="reportdesign_OReportDefinition_get_implementation">
+  <implementation name="com.sun.star.comp.report.OReportDefinition">
     <service name="com.sun.star.report.ReportDefinition"/>
   </implementation>
-  <implementation name="com.sun.star.comp.report.OReportEngineJFree"
-    constructor="reportdesign_OReportEngineJFree_get_implementation">
+  <implementation name="com.sun.star.comp.report.OReportEngineJFree">
     <service name="com.sun.star.report.ReportEngine"/>
   </implementation>
-  <implementation name="com.sun.star.comp.report.Shape"
-    constructor="reportdesign_OShape_get_implementation">
+  <implementation name="com.sun.star.comp.report.Shape">
     <service name="com.sun.star.report.Shape"/>
   </implementation>
 </component>


More information about the Libreoffice-commits mailing list