summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2013-10-17 11:43:40 +0200
committerThomas Arnhold <thomas@arnhold.org>2013-10-17 15:22:20 +0200
commitc65eb7e56934b22f9bea68e62c0a51fd59869f1c (patch)
tree969c97ef97180a4d70cb6b1ccc610c0240800d5c /reportdesign
parent5df4743236c0d41ad0d28ba7e743f2ea4f74c8e5 (diff)
Related: fdo#38838 remove String::SearchAndReplace
Change-Id: I1cc52d0be360b05e722a18b3ca5d08b2b0b0842d
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/core/sdr/UndoActions.cxx5
-rw-r--r--reportdesign/source/ui/inc/StartMarker.hxx2
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx10
-rw-r--r--reportdesign/source/ui/report/SectionWindow.cxx6
-rw-r--r--reportdesign/source/ui/report/StartMarker.cxx2
5 files changed, 11 insertions, 14 deletions
diff --git a/reportdesign/source/core/sdr/UndoActions.cxx b/reportdesign/source/core/sdr/UndoActions.cxx
index 943a5e30a656..b43033724c01 100644
--- a/reportdesign/source/core/sdr/UndoActions.cxx
+++ b/reportdesign/source/core/sdr/UndoActions.cxx
@@ -392,10 +392,9 @@ void ORptUndoPropertyAction::setProperty(sal_Bool _bOld)
OUString ORptUndoPropertyAction::GetComment() const
{
- String aStr(ModuleRes(RID_STR_UNDO_PROPERTY).toString());
+ OUString aStr( ModuleRes(RID_STR_UNDO_PROPERTY).toString() );
- aStr.SearchAndReplace(OUString('#'), m_aPropertyName);
- return aStr;
+ return aStr.replaceFirst("#", m_aPropertyName);
}
OUndoPropertyGroupSectionAction::OUndoPropertyGroupSectionAction(SdrModel& _rMod
diff --git a/reportdesign/source/ui/inc/StartMarker.hxx b/reportdesign/source/ui/inc/StartMarker.hxx
index 0c3115cfb87a..77e2fa80a6ae 100644
--- a/reportdesign/source/ui/inc/StartMarker.hxx
+++ b/reportdesign/source/ui/inc/StartMarker.hxx
@@ -60,7 +60,7 @@ namespace rptui
virtual void RequestHelp( const HelpEvent& rHEvt );
using Window::Notify;
- void setTitle(const String& _sTitle);
+ void setTitle(const OUString& _sTitle);
sal_Int32 getMinHeight() const;
/** shows or hides the ruler.
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 7741b491b78a..146e01fedf6a 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -3281,15 +3281,13 @@ void OReportController::createPageNumber(const Sequence< PropertyValue >& _aArgs
SequenceAsHashMap aMap(_aArgs);
sal_Bool bStateOfPage = aMap.getUnpackedValueOrDefault(PROPERTY_STATE,sal_False);
- String sFunction = String(ModuleRes(STR_RPT_PN_PAGE));
- OUString sPageNumber("PageNumber()");
- sFunction.SearchAndReplace(OUString("#PAGENUMBER#"),sPageNumber);
+ OUString sFunction( ModuleRes(STR_RPT_PN_PAGE).toString() );
+ sFunction = sFunction.replaceFirst("#PAGENUMBER#", "PageNumber()");
if ( bStateOfPage )
{
- OUString sPageCount("PageCount()");
- sFunction += String(ModuleRes(STR_RPT_PN_PAGE_OF));
- sFunction.SearchAndReplace(OUString("#PAGECOUNT#"),sPageCount);
+ sFunction += ModuleRes(STR_RPT_PN_PAGE_OF).toString();
+ sFunction = sFunction.replaceFirst("#PAGECOUNT#", "PageCount()");
}
sal_Bool bInPageHeader = aMap.getUnpackedValueOrDefault(PROPERTY_PAGEHEADERON,sal_True);
diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx
index 3dbc65f06e69..96e03c3d1e4a 100644
--- a/reportdesign/source/ui/report/SectionWindow.cxx
+++ b/reportdesign/source/ui/report/SectionWindow.cxx
@@ -184,9 +184,9 @@ bool OSectionWindow::setGroupSectionTitle(const uno::Reference< report::XGroup>&
sExpression = sLabel;
}
- String sTitle = ModuleRes(_nResId).toString();
- sTitle.SearchAndReplace(OUString('#') ,sExpression);
- m_aStartMarker.setTitle(sTitle);
+ OUString sTitle( ModuleRes(_nResId).toString() );
+ sTitle = sTitle.replaceFirst("#", sExpression);
+ m_aStartMarker.setTitle( sTitle );
m_aStartMarker.Invalidate(INVALIDATE_CHILDREN);
}
return bRet;
diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx
index fbb10b47f914..cdb9eef19cd3 100644
--- a/reportdesign/source/ui/report/StartMarker.cxx
+++ b/reportdesign/source/ui/report/StartMarker.cxx
@@ -235,7 +235,7 @@ void OStartMarker::Resize()
m_aImage.SetPosSizePixel(aPos,aImageSize);
}
// -----------------------------------------------------------------------------
-void OStartMarker::setTitle(const String& _sTitle)
+void OStartMarker::setTitle(const OUString& _sTitle)
{
m_aText.SetText(_sTitle);
}