diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-05-18 21:14:00 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-05-21 19:28:59 +0200 |
commit | d666c2f87d56da1f4dd3d421665ac3078c447a17 (patch) | |
tree | fb837b5b12955d94c06e1abdb0ccb09ceb901607 /reportdesign | |
parent | d3ba63909740262e0cd64648e2eb00096b4626d2 (diff) |
make string translation loading more uniform
change various ResId classes that use conversion operator to OUString to
functions that return a OUString
drop various defines
drop unnecessary toString calls
Change-Id: Ibeccdf2b91a46a2ed5b4b74e6024e301a023bc92
Reviewed-on: https://gerrit.libreoffice.org/37817
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 2155e04d6343638ca9815d394cbc4f78c2b17c3a)
drop toString
Change-Id: I0f67c8931523bbe90bfbc8cc7d9a5bd523758ee5
(cherry picked from commit 8b1101023f01b2c7478a014b5ead73ada4fd4861)
pNameResId is unused
Change-Id: Ic1fe6abc7066517187695266c4d1a0888b41ffe7
(cherry picked from commit c2667d7ff558a1b7bf83e694909465f00d1a16f6)
Reviewed-on: https://gerrit.libreoffice.org/37843
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'reportdesign')
4 files changed, 8 insertions, 7 deletions
diff --git a/reportdesign/source/core/sdr/UndoActions.cxx b/reportdesign/source/core/sdr/UndoActions.cxx index 390b9a0b8540..aedab260613f 100644 --- a/reportdesign/source/core/sdr/UndoActions.cxx +++ b/reportdesign/source/core/sdr/UndoActions.cxx @@ -383,7 +383,7 @@ void ORptUndoPropertyAction::setProperty(bool _bOld) OUString ORptUndoPropertyAction::GetComment() const { - OUString aStr( ModuleRes(RID_STR_UNDO_PROPERTY).toString() ); + OUString aStr( ModuleRes(RID_STR_UNDO_PROPERTY) ); return aStr.replaceFirst("#", m_aPropertyName); } diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx index a50e3e01a40b..8297cba94832 100644 --- a/reportdesign/source/ui/inspection/GeometryHandler.cxx +++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx @@ -1751,7 +1751,7 @@ void GeometryHandler::impl_fillScopeList_nothrow(::std::vector< OUString >& _out else if ( xSection == xReportDefinition->getDetail() ) nPos = xGroups->getCount()-1; - const OUString sGroup = ModuleRes(RID_STR_SCOPE_GROUP).toString(); + const OUString sGroup = ModuleRes(RID_STR_SCOPE_GROUP); for (sal_Int32 i = 0 ; i <= nPos ; ++i) { xGroup.set(xGroups->getByIndex(i),uno::UNO_QUERY_THROW); @@ -1778,7 +1778,7 @@ uno::Reference< report::XFunctionsSupplier> GeometryHandler::fillScope_throw(OUS const uno::Reference< report::XGroup> xGroup(xSection->getGroup(),uno::UNO_QUERY); if ( xGroup.is() ) { - OUString sGroupName = ModuleRes(RID_STR_SCOPE_GROUP).toString(); + OUString sGroupName = ModuleRes(RID_STR_SCOPE_GROUP); _rsNamePostfix = xGroup->getExpression(); m_sScope = sGroupName.replaceFirst("%1",_rsNamePostfix); xReturn = xGroup.get(); diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 2404ff61e236..d89b20903a21 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -2906,7 +2906,7 @@ uno::Reference<frame::XModel> OReportController::executeReport() // our first message says: we caught an exception sdb::SQLContext aFirstMessage; - OUString sInfo(ModuleRes(RID_STR_CAUGHT_FOREIGN_EXCEPTION).toString()); + OUString sInfo(ModuleRes(RID_STR_CAUGHT_FOREIGN_EXCEPTION)); sInfo = sInfo.replaceAll("$type$", aCaughtException.getValueTypeName()); aFirstMessage.Message = sInfo; @@ -3261,12 +3261,12 @@ void OReportController::createPageNumber(const Sequence< PropertyValue >& _aArgs SequenceAsHashMap aMap(_aArgs); bool bStateOfPage = aMap.getUnpackedValueOrDefault(PROPERTY_STATE, false); - OUString sFunction( ModuleRes(STR_RPT_PN_PAGE).toString() ); + OUString sFunction( ModuleRes(STR_RPT_PN_PAGE) ); sFunction = sFunction.replaceFirst("#PAGENUMBER#", "PageNumber()"); if ( bStateOfPage ) { - sFunction += ModuleRes(STR_RPT_PN_PAGE_OF).toString(); + sFunction += ModuleRes(STR_RPT_PN_PAGE_OF); sFunction = sFunction.replaceFirst("#PAGECOUNT#", "PageCount()"); } diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx index 502609531ec0..6e4a3fa386e6 100644 --- a/reportdesign/source/ui/report/SectionWindow.cxx +++ b/reportdesign/source/ui/report/SectionWindow.cxx @@ -191,7 +191,8 @@ bool OSectionWindow::setGroupSectionTitle(const uno::Reference< report::XGroup>& sExpression = sLabel; } - OUString sTitle( ModuleRes(_nResId).toString() ); + ModuleRes aRes(_nResId); + OUString sTitle(aRes); sTitle = sTitle.replaceFirst("#", sExpression); m_aStartMarker->setTitle( sTitle ); m_aStartMarker->Invalidate(InvalidateFlags::Children); |