summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Martens <ama@openoffice.org>2000-12-18 08:59:53 +0000
committerAndreas Martens <ama@openoffice.org>2000-12-18 08:59:53 +0000
commit55121049b0cb1ccc28b7d0c2b6b6bd9083b1e7c7 (patch)
treee13690402f176464d48b31be81ac82555a140181
parentf5e7a9f543a6f6d2bf2530c4091070afa74b19f2 (diff)
Fix: cursor travelling in double line portion in block adjustment environment
-rw-r--r--sw/source/core/text/itrcrsr.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index 38f623ff87a3..22ecb17cba74 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: itrcrsr.cxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: ama $ $Date: 2000-12-11 10:54:21 $
+ * last change: $Author: ama $ $Date: 2000-12-18 09:59:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -491,9 +491,12 @@ sal_Bool SwTxtCursor::GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
{
pCMS->p2Lines = new Sw2LinesPos();
pCMS->p2Lines->aLine = SwRect(aCharPos, aCharSize);
+ SwTwips nTmpWidth = pPor->Width();
+ if( nSpaceAdd )
+ nTmpWidth += pPor->CalcSpacing(nSpaceAdd, aInf);
pCMS->p2Lines->aPortion =
SwRect( Point( aCharPos.X() + nX, Y() ),
- Size( pPor->Width(), pPor->Height() ) );
+ Size( nTmpWidth, pPor->Height() ) );
}
// In a multi-portion we use GetCharRect()-function
@@ -501,11 +504,11 @@ sal_Bool SwTxtCursor::GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
// of the multi-portion.
xub_StrLen nOldStart = nStart;
BYTE nOldProp = GetPropFont();
- if( ((SwMultiPortion*)pPor)->IsDouble() )
- SetPropFont( 50 );
nStart = aInf.GetIdx();
SwLineLayout* pOldCurr = pCurr;
pCurr = &((SwMultiPortion*)pPor)->GetRoot();
+ if( ((SwMultiPortion*)pPor)->IsDouble() )
+ SetPropFont( 50 );
if( nStart + pCurr->GetLen() <= nOfst )
Next();
sal_Bool bSpaceChg = ((SwMultiPortion*)pPor)->