Kaydet (Commit) d72c90cc authored tarafından Jan Holesovsky's avatar Jan Holesovsky

sw: Rename to avoid conflict after Crsr -> Cursor rename.

Change-Id: Iee7124259cadc1db416e8aedc5b4e87f75ba9d21
üst 764a1cdf
...@@ -2237,49 +2237,49 @@ SwLinePortion* SwTextFormatter::MakeRestPortion( const SwLineLayout* pLine, ...@@ -2237,49 +2237,49 @@ SwLinePortion* SwTextFormatter::MakeRestPortion( const SwLineLayout* pLine,
// SwTextCursorSave notes the start and current line of a SwTextCursor, // SwTextCursorSave notes the start and current line of a SwTextCursor,
// sets them to the values for GetCrsrOfst inside a multiportion // sets them to the values for GetCrsrOfst inside a multiportion
// and restores them in the destructor. // and restores them in the destructor.
SwTextCursorSave::SwTextCursorSave( SwTextCursor* pTextCursor, SwTextCursorSave::SwTextCursorSave( SwTextCursor* pCursor,
SwMultiPortion* pMulti, SwMultiPortion* pMulti,
SwTwips nY, SwTwips nY,
sal_uInt16& nX, sal_uInt16& nX,
sal_Int32 nCurrStart, sal_Int32 nCurrStart,
long nSpaceAdd ) long nSpaceAdd )
{ {
pTextCrsr = pTextCursor; pTextCrsr = pCursor;
nStart = pTextCursor->m_nStart; nStart = pCursor->m_nStart;
pTextCursor->m_nStart = nCurrStart; pCursor->m_nStart = nCurrStart;
pCurr = pTextCursor->m_pCurr; pCurr = pCursor->m_pCurr;
pTextCursor->m_pCurr = &pMulti->GetRoot(); pCursor->m_pCurr = &pMulti->GetRoot();
while( pTextCursor->Y() + pTextCursor->GetLineHeight() < nY && while( pCursor->Y() + pCursor->GetLineHeight() < nY &&
pTextCursor->Next() ) pCursor->Next() )
; // nothing ; // nothing
nWidth = pTextCursor->m_pCurr->Width(); nWidth = pCursor->m_pCurr->Width();
nOldProp = pTextCursor->GetPropFont(); nOldProp = pCursor->GetPropFont();
if ( pMulti->IsDouble() || pMulti->IsBidi() ) if ( pMulti->IsDouble() || pMulti->IsBidi() )
{ {
bSpaceChg = pMulti->ChgSpaceAdd( pTextCursor->m_pCurr, nSpaceAdd ); bSpaceChg = pMulti->ChgSpaceAdd( pCursor->m_pCurr, nSpaceAdd );
sal_Int32 nSpaceCnt; sal_Int32 nSpaceCnt;
if ( pMulti->IsDouble() ) if ( pMulti->IsDouble() )
{ {
pTextCursor->SetPropFont( 50 ); pCursor->SetPropFont( 50 );
nSpaceCnt = static_cast<SwDoubleLinePortion*>(pMulti)->GetSpaceCnt(); nSpaceCnt = static_cast<SwDoubleLinePortion*>(pMulti)->GetSpaceCnt();
} }
else else
{ {
const sal_Int32 nOldIdx = pTextCursor->GetInfo().GetIdx(); const sal_Int32 nOldIdx = pCursor->GetInfo().GetIdx();
pTextCursor->GetInfo().SetIdx ( nCurrStart ); pCursor->GetInfo().SetIdx ( nCurrStart );
nSpaceCnt = static_cast<SwBidiPortion*>(pMulti)->GetSpaceCnt(pTextCursor->GetInfo()); nSpaceCnt = static_cast<SwBidiPortion*>(pMulti)->GetSpaceCnt(pCursor->GetInfo());
pTextCursor->GetInfo().SetIdx ( nOldIdx ); pCursor->GetInfo().SetIdx ( nOldIdx );
} }
if( nSpaceAdd > 0 && !pMulti->HasTabulator() ) if( nSpaceAdd > 0 && !pMulti->HasTabulator() )
pTextCursor->m_pCurr->Width( static_cast<sal_uInt16>(nWidth + nSpaceAdd * nSpaceCnt / SPACING_PRECISION_FACTOR ) ); pCursor->m_pCurr->Width( static_cast<sal_uInt16>(nWidth + nSpaceAdd * nSpaceCnt / SPACING_PRECISION_FACTOR ) );
// For a BidiPortion we have to calculate the offset from the // For a BidiPortion we have to calculate the offset from the
// end of the portion // end of the portion
if ( nX && pMulti->IsBidi() ) if ( nX && pMulti->IsBidi() )
nX = pTextCursor->m_pCurr->Width() - nX; nX = pCursor->m_pCurr->Width() - nX;
} }
else else
bSpaceChg = false; bSpaceChg = false;
......
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