From 6cc2ceadbbb0d18688559ef745912ef86cd29add Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 2 Jan 2013 15:10:18 +0200 Subject: 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 --- reportdesign/source/core/api/ReportEngineJFree.cxx | 2 +- reportdesign/source/inc/stringconstants.hrc | 1 - reportdesign/source/shared/stringconstants.cxx | 1 - reportdesign/source/ui/report/ReportController.cxx | 5 +++-- 4 files changed, 4 insertions(+), 5 deletions(-) (limited to 'reportdesign') 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 #include #include +#include #include #include #include @@ -2914,7 +2915,7 @@ uno::Reference 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 = 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); -- cgit