summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2014-08-25 09:14:18 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2014-09-06 12:09:06 +0200
commit55f44820f266bbba97f142a67af73f3b437e34af (patch)
tree81b5c34f0d0d8f80dbcea4df29489f70d1913132 /sw
parent72e7a1c2113ee36e3fc50589f3263ccd884ea1b2 (diff)
Avoid temporary OUStrings
Change-Id: If178bdbf13bbea3eb810267f207855bf6e2a6bda
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/text/porexp.cxx6
-rw-r--r--sw/source/core/text/porlin.cxx3
-rw-r--r--sw/source/core/text/porref.cxx3
-rw-r--r--sw/source/core/text/portox.cxx3
-rw-r--r--sw/source/core/text/txtftn.cxx4
-rw-r--r--sw/source/core/text/txthyph.cxx6
6 files changed, 8 insertions, 17 deletions
diff --git a/sw/source/core/text/porexp.cxx b/sw/source/core/text/porexp.cxx
index 88630be8f6fa..b95969453f7a 100644
--- a/sw/source/core/text/porexp.cxx
+++ b/sw/source/core/text/porexp.cxx
@@ -35,8 +35,7 @@ bool SwExpandPortion::GetExpTxt( const SwTxtSizeInfo&, OUString &rTxt ) const
void SwExpandPortion::HandlePortion( SwPortionHandler& rPH ) const
{
- OUString aString;
- rPH.Special( GetLen(), aString, GetWhichPor() );
+ rPH.Special( GetLen(), OUString(), GetWhichPor() );
}
SwPosSize SwExpandPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
@@ -199,8 +198,7 @@ bool SwBlankPortion::GetExpTxt( const SwTxtSizeInfo&, OUString &rTxt ) const
void SwBlankPortion::HandlePortion( SwPortionHandler& rPH ) const
{
- OUString aString( cChar );
- rPH.Special( GetLen(), aString, GetWhichPor() );
+ rPH.Special( GetLen(), OUString( cChar ), GetWhichPor() );
}
SwPostItsPortion::SwPostItsPortion( bool bScrpt )
diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx
index fb1c2de26ff2..68be6f01b416 100644
--- a/sw/source/core/text/porlin.cxx
+++ b/sw/source/core/text/porlin.cxx
@@ -317,8 +317,7 @@ bool SwLinePortion::GetExpTxt( const SwTxtSizeInfo &, OUString & ) const
void SwLinePortion::HandlePortion( SwPortionHandler& rPH ) const
{
- OUString aString;
- rPH.Special( GetLen(), aString, GetWhichPor(), Height(), Width() );
+ rPH.Special( GetLen(), OUString(), GetWhichPor(), Height(), Width() );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/porref.cxx b/sw/source/core/text/porref.cxx
index b51fa720957f..de74b2457db8 100644
--- a/sw/source/core/text/porref.cxx
+++ b/sw/source/core/text/porref.cxx
@@ -69,8 +69,7 @@ void SwIsoRefPortion::Paint( const SwTxtPaintInfo &rInf ) const
void SwIsoRefPortion::HandlePortion( SwPortionHandler& rPH ) const
{
- OUString aString;
- rPH.Special( GetLen(), aString, GetWhichPor() );
+ rPH.Special( GetLen(), OUString(), GetWhichPor() );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/portox.cxx b/sw/source/core/text/portox.cxx
index a45376e1f9b5..4882e1c50174 100644
--- a/sw/source/core/text/portox.cxx
+++ b/sw/source/core/text/portox.cxx
@@ -71,8 +71,7 @@ void SwIsoToxPortion::Paint( const SwTxtPaintInfo &rInf ) const
void SwIsoToxPortion::HandlePortion( SwPortionHandler& rPH ) const
{
- OUString aString;
- rPH.Special( GetLen(), aString, GetWhichPor() );
+ rPH.Special( GetLen(), OUString(), GetWhichPor() );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index 089e080e60a1..9e97acb39194 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -1419,9 +1419,7 @@ bool SwQuoVadisPortion::GetExpTxt( const SwTxtSizeInfo &, OUString &rTxt ) const
void SwQuoVadisPortion::HandlePortion( SwPortionHandler& rPH ) const
{
- OUString aString( aExpand );
- aString += aErgo;
- rPH.Special( GetLen(), aString, GetWhichPor() );
+ rPH.Special( GetLen(), aExpand + aErgo, GetWhichPor() );
}
void SwQuoVadisPortion::Paint( const SwTxtPaintInfo &rInf ) const
diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx
index 778c5e863ea5..f08854a44886 100644
--- a/sw/source/core/text/txthyph.cxx
+++ b/sw/source/core/text/txthyph.cxx
@@ -352,8 +352,7 @@ bool SwHyphPortion::GetExpTxt( const SwTxtSizeInfo &/*rInf*/, OUString &rTxt ) c
void SwHyphPortion::HandlePortion( SwPortionHandler& rPH ) const
{
- OUString aString( '-' );
- rPH.Special( GetLen(), aString, GetWhichPor() );
+ rPH.Special( GetLen(), OUString('-'), GetWhichPor() );
}
bool SwHyphPortion::Format( SwTxtFormatInfo &rInf )
@@ -545,11 +544,10 @@ bool SwSoftHyphPortion::GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) c
void SwSoftHyphPortion::HandlePortion( SwPortionHandler& rPH ) const
{
- const OUString aString( '-' );
const sal_uInt16 nWhich = ! Width() ?
POR_SOFTHYPH_COMP :
GetWhichPor();
- rPH.Special( GetLen(), aString, nWhich );
+ rPH.Special( GetLen(), OUString('-'), nWhich );
}
void SwSoftHyphStrPortion::Paint( const SwTxtPaintInfo &rInf ) const