summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-04-28 16:12:19 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-04-28 16:25:31 +0200
commit1fd3167695aaebb050df53acd91f2e1625e8305a (patch)
treef65dcce76c273800e8b1cc80042c39704b6ed40c
parentd0d295af530e7dc1379a878ba5854e28eae250ad (diff)
fdo#63680 SwTxtCursor::GetCrsrOfst: don't pass reference to a temporary
This was a situation similar to d0d295af530e7dc1379a878ba5854e28eae250ad. Unfortunately just changing SwTxtSizeInfo's pTxt to an OUString copy doesn't work, as we still have code that relies on that being a pointer only. Change-Id: I202d7e6f5bd3005fc50551aa7195b419994ca3e8
-rw-r--r--sw/source/core/text/itrcrsr.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index d567e7648144..bb1d08bc5874 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -489,8 +489,8 @@ sal_Bool SwTxtCursor::GetEndCharRect( SwRect* pOrig, const xub_StrLen nOfst,
void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
SwCrsrMoveState* pCMS )
{
- const XubString &rText = GetInfo().GetTxt();
- SwTxtSizeInfo aInf( GetInfo(), rText, nStart );
+ const OUString aText = GetInfo().GetTxt();
+ SwTxtSizeInfo aInf( GetInfo(), aText, nStart );
if( GetPropFont() )
aInf.GetFont()->SetProportion( GetPropFont() );
KSHORT nTmpAscent, nTmpHeight; // Zeilenhoehe
@@ -1593,8 +1593,8 @@ xub_StrLen SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
else
nOldProp = 0;
{
- OUString rTextStr = rText;
- SwTxtSizeInfo aSizeInf( GetInfo(), rTextStr, nCurrStart );
+ OUString aText = rText;
+ SwTxtSizeInfo aSizeInf( GetInfo(), aText, nCurrStart );
((SwTxtCursor*)this)->SeekAndChg( aSizeInf );
SwTxtSlot aDiffTxt( &aSizeInf, ((SwTxtPortion*)pPor), false, false );
SwFontSave aSave( aSizeInf, pPor->IsDropPortion() ?