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
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 )
......
......@@ -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: */
......@@ -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: */
......@@ -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: */
......@@ -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
......
......@@ -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
......
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