fdo#63680 SwTxtCursor::GetCrsrOfst: don't pass reference to a temporary
This was a situation similar to
d0d295af53
. 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
This commit is contained in:
parent
d0d295af53
commit
1fd3167695
1 changed files with 4 additions and 4 deletions
|
@ -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() ?
|
||||
|
|
Loading…
Reference in a new issue