Kaydet (Commit) 55f44820 authored tarafından Matteo Casalin's avatar Matteo Casalin

Avoid temporary OUStrings

Change-Id: If178bdbf13bbea3eb810267f207855bf6e2a6bda
üst 72e7a1c2
...@@ -35,8 +35,7 @@ bool SwExpandPortion::GetExpTxt( const SwTxtSizeInfo&, OUString &rTxt ) const ...@@ -35,8 +35,7 @@ bool SwExpandPortion::GetExpTxt( const SwTxtSizeInfo&, OUString &rTxt ) const
void SwExpandPortion::HandlePortion( SwPortionHandler& rPH ) const void SwExpandPortion::HandlePortion( SwPortionHandler& rPH ) const
{ {
OUString aString; rPH.Special( GetLen(), OUString(), GetWhichPor() );
rPH.Special( GetLen(), aString, GetWhichPor() );
} }
SwPosSize SwExpandPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const SwPosSize SwExpandPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
...@@ -199,8 +198,7 @@ bool SwBlankPortion::GetExpTxt( const SwTxtSizeInfo&, OUString &rTxt ) const ...@@ -199,8 +198,7 @@ bool SwBlankPortion::GetExpTxt( const SwTxtSizeInfo&, OUString &rTxt ) const
void SwBlankPortion::HandlePortion( SwPortionHandler& rPH ) const void SwBlankPortion::HandlePortion( SwPortionHandler& rPH ) const
{ {
OUString aString( cChar ); rPH.Special( GetLen(), OUString( cChar ), GetWhichPor() );
rPH.Special( GetLen(), aString, GetWhichPor() );
} }
SwPostItsPortion::SwPostItsPortion( bool bScrpt ) SwPostItsPortion::SwPostItsPortion( bool bScrpt )
......
...@@ -317,8 +317,7 @@ bool SwLinePortion::GetExpTxt( const SwTxtSizeInfo &, OUString & ) const ...@@ -317,8 +317,7 @@ bool SwLinePortion::GetExpTxt( const SwTxtSizeInfo &, OUString & ) const
void SwLinePortion::HandlePortion( SwPortionHandler& rPH ) const void SwLinePortion::HandlePortion( SwPortionHandler& rPH ) const
{ {
OUString aString; rPH.Special( GetLen(), OUString(), GetWhichPor(), Height(), Width() );
rPH.Special( GetLen(), aString, GetWhichPor(), Height(), Width() );
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -69,8 +69,7 @@ void SwIsoRefPortion::Paint( const SwTxtPaintInfo &rInf ) const ...@@ -69,8 +69,7 @@ void SwIsoRefPortion::Paint( const SwTxtPaintInfo &rInf ) const
void SwIsoRefPortion::HandlePortion( SwPortionHandler& rPH ) const void SwIsoRefPortion::HandlePortion( SwPortionHandler& rPH ) const
{ {
OUString aString; rPH.Special( GetLen(), OUString(), GetWhichPor() );
rPH.Special( GetLen(), aString, GetWhichPor() );
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -71,8 +71,7 @@ void SwIsoToxPortion::Paint( const SwTxtPaintInfo &rInf ) const ...@@ -71,8 +71,7 @@ void SwIsoToxPortion::Paint( const SwTxtPaintInfo &rInf ) const
void SwIsoToxPortion::HandlePortion( SwPortionHandler& rPH ) const void SwIsoToxPortion::HandlePortion( SwPortionHandler& rPH ) const
{ {
OUString aString; rPH.Special( GetLen(), OUString(), GetWhichPor() );
rPH.Special( GetLen(), aString, GetWhichPor() );
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -1419,9 +1419,7 @@ bool SwQuoVadisPortion::GetExpTxt( const SwTxtSizeInfo &, OUString &rTxt ) const ...@@ -1419,9 +1419,7 @@ bool SwQuoVadisPortion::GetExpTxt( const SwTxtSizeInfo &, OUString &rTxt ) const
void SwQuoVadisPortion::HandlePortion( SwPortionHandler& rPH ) const void SwQuoVadisPortion::HandlePortion( SwPortionHandler& rPH ) const
{ {
OUString aString( aExpand ); rPH.Special( GetLen(), aExpand + aErgo, GetWhichPor() );
aString += aErgo;
rPH.Special( GetLen(), aString, GetWhichPor() );
} }
void SwQuoVadisPortion::Paint( const SwTxtPaintInfo &rInf ) const void SwQuoVadisPortion::Paint( const SwTxtPaintInfo &rInf ) const
......
...@@ -352,8 +352,7 @@ bool SwHyphPortion::GetExpTxt( const SwTxtSizeInfo &/*rInf*/, OUString &rTxt ) c ...@@ -352,8 +352,7 @@ bool SwHyphPortion::GetExpTxt( const SwTxtSizeInfo &/*rInf*/, OUString &rTxt ) c
void SwHyphPortion::HandlePortion( SwPortionHandler& rPH ) const void SwHyphPortion::HandlePortion( SwPortionHandler& rPH ) const
{ {
OUString aString( '-' ); rPH.Special( GetLen(), OUString('-'), GetWhichPor() );
rPH.Special( GetLen(), aString, GetWhichPor() );
} }
bool SwHyphPortion::Format( SwTxtFormatInfo &rInf ) bool SwHyphPortion::Format( SwTxtFormatInfo &rInf )
...@@ -545,11 +544,10 @@ bool SwSoftHyphPortion::GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) c ...@@ -545,11 +544,10 @@ bool SwSoftHyphPortion::GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) c
void SwSoftHyphPortion::HandlePortion( SwPortionHandler& rPH ) const void SwSoftHyphPortion::HandlePortion( SwPortionHandler& rPH ) const
{ {
const OUString aString( '-' );
const sal_uInt16 nWhich = ! Width() ? const sal_uInt16 nWhich = ! Width() ?
POR_SOFTHYPH_COMP : POR_SOFTHYPH_COMP :
GetWhichPor(); GetWhichPor();
rPH.Special( GetLen(), aString, nWhich ); rPH.Special( GetLen(), OUString('-'), nWhich );
} }
void SwSoftHyphStrPortion::Paint( const SwTxtPaintInfo &rInf ) const void SwSoftHyphStrPortion::Paint( const SwTxtPaintInfo &rInf ) const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment