summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-01-02 15:10:18 +0200
committerNoel Grandin <noel@peralex.com>2013-01-09 08:08:10 +0200
commit6cc2ceadbbb0d18688559ef745912ef86cd29add (patch)
tree814a4a4de23d465ed6ce27c7c6469c85d7880355 /reportdesign
parent42adbfccad151a29e56ea1ed8eeb323cd4b7dae4 (diff)
fdo#46808, Adapt report::ReportEngine UNO service to new style
The service already existed, it just did not have an IDL file. Change-Id: I5839ccbd99d6a9dbc1e4be930caec2c0089adbda
Diffstat (limited to 'reportdesign')
-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
4 files changed, 4 insertions, 5 deletions
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);