summaryrefslogtreecommitdiffstats
path: root/reportdesign
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-13 18:47:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-13 22:18:43 +0200
commit9ca8a4e229d270fe7ec16f3aa7b5cb2e1f8a522f (patch)
treec6dbbd17ef1320a9b9f349432e13bfb03dcf4b94 /reportdesign
parenttdf#142014 Fix displaying strokes when line width is 0 (diff)
downloadcore-9ca8a4e229d270fe7ec16f3aa7b5cb2e1f8a522f.tar.gz
core-9ca8a4e229d270fe7ec16f3aa7b5cb2e1f8a522f.zip
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@collabora.co.uk>
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/Library_rpt.mk1
-rw-r--r--reportdesign/inc/ReportDefinition.hxx7
-rw-r--r--reportdesign/source/core/api/FixedLine.cxx30
-rw-r--r--reportdesign/source/core/api/FixedText.cxx30
-rw-r--r--reportdesign/source/core/api/FormatCondition.cxx29
-rw-r--r--reportdesign/source/core/api/FormattedField.cxx27
-rw-r--r--reportdesign/source/core/api/Function.cxx29
-rw-r--r--reportdesign/source/core/api/ImageControl.cxx30
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx26
-rw-r--r--reportdesign/source/core/api/ReportEngineJFree.cxx30
-rw-r--r--reportdesign/source/core/api/Shape.cxx27
-rw-r--r--reportdesign/source/core/api/services.cxx82
-rw-r--r--reportdesign/source/core/inc/FixedLine.hxx6
-rw-r--r--reportdesign/source/core/inc/FixedText.hxx6
-rw-r--r--reportdesign/source/core/inc/FormatCondition.hxx6
-rw-r--r--reportdesign/source/core/inc/FormattedField.hxx6
-rw-r--r--reportdesign/source/core/inc/Function.hxx6
-rw-r--r--reportdesign/source/core/inc/ImageControl.hxx6
-rw-r--r--reportdesign/source/core/inc/ReportEngineJFree.hxx6
-rw-r--r--reportdesign/source/core/inc/Shape.hxx6
-rw-r--r--reportdesign/util/rpt.component29
21 files changed, 327 insertions, 98 deletions
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 6e83c1a25b21..8a70f07a5586 100644
--- a/reportdesign/source/core/api/FixedLine.cxx
+++ b/reportdesign/source/core/api/FixedLine.cxx
@@ -200,14 +200,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)
@@ -543,11 +562,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 e77eb4b3aa49..f8c7bef51c4e 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 d1418825f2d5..25ddb41156d7 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 857560194e90..371f8831e59b 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 119ff9870a1c..2fda942e438b 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 25016a25ef0f..210bf3705403 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 5c7287b87d84..8c37f99afda9 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
{
@@ -478,12 +494,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>