summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--offapi/UnoApi_offapi.mk1
-rw-r--r--offapi/com/sun/star/report/ReportEngine.idl37
-rw-r--r--reportdesign/source/core/api/ReportEngineJFree.cxx2
-rw-r--r--reportdesign/source/inc/stringconstants.hrc1
-rw-r--r--reportdesign/source/shared/stringconstants.cxx1
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx5
6 files changed, 42 insertions, 5 deletions
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index a887de2d9381..662f066e4351 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -216,6 +216,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/report,\
ReportControlFormat \
ReportControlModel \
ReportDefinition \
+ ReportEngine \
Section \
Shape \
))
diff --git a/offapi/com/sun/star/report/ReportEngine.idl b/offapi/com/sun/star/report/ReportEngine.idl
new file mode 100644
index 000000000000..4d58b6f84940
--- /dev/null
+++ b/offapi/com/sun/star/report/ReportEngine.idl
@@ -0,0 +1,37 @@
+/* -*- 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 __com_sun_star_report_ReportEngine_idl__
+#define __com_sun_star_report_ReportEngine_idl__
+
+#include <com/sun/star/report/XReportEngine.idl>
+
+module com { module sun { module star { module report {
+
+/**
+ @since LibreOffice 4.1
+*/
+
+service ReportEngine : XReportEngine;
+
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/reportdesign/source/core/api/ReportEngineJFree.cxx b/reportdesign/source/core/api/ReportEngineJFree.cxx
index cc005a39ccfa..0a3f89cb5073 100644
--- a/reportdesign/source/core/api/ReportEngineJFree.cxx
+++ b/reportdesign/source/core/api/ReportEngineJFree.cxx
@@ -101,7 +101,7 @@ void SAL_CALL OReportEngineJFree::dispose() throw(uno::RuntimeException)
uno::Sequence< ::rtl::OUString > OReportEngineJFree::getSupportedServiceNames_Static( ) throw(uno::RuntimeException)
{
uno::Sequence< ::rtl::OUString > aServices(1);
- aServices.getArray()[0] = SERVICE_REPORTENGINE;
+ aServices.getArray()[0] = OUString("com.sun.star.report.ReportEngine");
return aServices;
}
diff --git a/reportdesign/source/inc/stringconstants.hrc b/reportdesign/source/inc/stringconstants.hrc
index 539d3db1df5d..f0965f72da2c 100644
--- a/reportdesign/source/inc/stringconstants.hrc
+++ b/reportdesign/source/inc/stringconstants.hrc
@@ -36,7 +36,6 @@ DECLARE_CONSTASCII_USTRING(SERVICE_FIXEDLINE);
DECLARE_CONSTASCII_USTRING(SERVICE_FORMATTEDFIELD);
DECLARE_CONSTASCII_USTRING(SERVICE_IMAGECONTROL);
DECLARE_CONSTASCII_USTRING(SERVICE_FORMATCONDITION);
-DECLARE_CONSTASCII_USTRING(SERVICE_REPORTENGINE);
DECLARE_CONSTASCII_USTRING(SERVICE_FUNCTION);
DECLARE_CONSTASCII_USTRING(SERVICE_REPORTDEFINITION);
DECLARE_CONSTASCII_USTRING(SERVICE_SHAPE);
diff --git a/reportdesign/source/shared/stringconstants.cxx b/reportdesign/source/shared/stringconstants.cxx
index 963b963eabfc..b47c54e46cf2 100644
--- a/reportdesign/source/shared/stringconstants.cxx
+++ b/reportdesign/source/shared/stringconstants.cxx
@@ -26,7 +26,6 @@ IMPLEMENT_CONSTASCII_USTRING(SERVICE_FIXEDTEXT , "com.sun.star.report.F
IMPLEMENT_CONSTASCII_USTRING(SERVICE_FORMATTEDFIELD , "com.sun.star.report.FormattedField");
IMPLEMENT_CONSTASCII_USTRING(SERVICE_IMAGECONTROL , "com.sun.star.report.ImageControl");
IMPLEMENT_CONSTASCII_USTRING(SERVICE_FORMATCONDITION , "com.sun.star.report.FormatCondition");
-IMPLEMENT_CONSTASCII_USTRING(SERVICE_REPORTENGINE , "com.sun.star.report.ReportEngine");
IMPLEMENT_CONSTASCII_USTRING(SERVICE_FUNCTION , "com.sun.star.report.Function");
IMPLEMENT_CONSTASCII_USTRING(SERVICE_REPORTDEFINITION , "com.sun.star.report.ReportDefinition");
IMPLEMENT_CONSTASCII_USTRING(SERVICE_SHAPE , "com.sun.star.report.Shape");
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index da66390983a8..a8e7bcf3736f 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -89,6 +89,7 @@
#include <com/sun/star/awt/FontSlant.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/status/FontHeight.hpp>
+#include <com/sun/star/report/ReportEngine.hpp>
#include <com/sun/star/report/XFormattedField.hpp>
#include <com/sun/star/sdb/SQLContext.hpp>
#include <com/sun/star/sdbc/SQLWarning.hpp>
@@ -2914,7 +2915,7 @@ uno::Reference<frame::XModel> OReportController::executeReport()
{
WaitObject aWait(getView()); // cursor
if ( !m_xReportEngine.is() )
- m_xReportEngine.set(getORB()->createInstance(SERVICE_REPORTENGINE),uno::UNO_QUERY_THROW);
+ m_xReportEngine.set( report::ReportEngine::create(m_xContext) );
m_xReportEngine->setReportDefinition(m_xReportDefinition);
m_xReportEngine->setActiveConnection(getConnection());
Reference<XFrame> xFrame = getXFrame();
@@ -4296,7 +4297,7 @@ embed::VisualRepresentation SAL_CALL OReportController::getPreferredVisualRepres
try
{
if ( !m_xReportEngine.is() )
- m_xReportEngine.set(getORB()->createInstance(SERVICE_REPORTENGINE),uno::UNO_QUERY_THROW);
+ m_xReportEngine.set( report::ReportEngine::create(m_xContext) );
const sal_Int32 nOldMaxRows = m_xReportEngine->getMaxRows();
m_xReportEngine->setMaxRows(MAX_ROWS_FOR_PREVIEW);
m_xReportEngine->setReportDefinition(m_xReportDefinition);