diff options
author | Andreas Martens <ama@openoffice.org> | 2001-05-02 13:23:39 +0000 |
---|---|---|
committer | Andreas Martens <ama@openoffice.org> | 2001-05-02 13:23:39 +0000 |
commit | b1ed75dca5431d9807b608fa397fea9c3bbd4647 (patch) | |
tree | a78eceff49718730868328e8ccd1e1cb8b8384e2 /sw | |
parent | afb194838965bc6577ec6deadaa085cf1dcf24c3 (diff) |
Fix #86476#: Position of chararcter bounded flyframes
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/text/frmcrsr.cxx | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx index 0177f8a1b7f6..7db80ff84d5d 100644 --- a/sw/source/core/text/frmcrsr.cxx +++ b/sw/source/core/text/frmcrsr.cxx @@ -2,9 +2,9 @@ * * $RCSfile: frmcrsr.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: fme $ $Date: 2001-04-10 14:37:47 $ + * last change: $Author: ama $ $Date: 2001-05-02 14:23:39 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -344,8 +344,19 @@ sal_Bool SwTxtFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const if( !pFrm->HasPara() ) return sal_False; SwTxtSizeInfo aInf( pFrm ); - SwTxtCursor aLine( pFrm, &aInf ); - return aLine.GetCharRect( &rOrig, nOffset, NULL, nMaxY ); + SwTxtCursor aLine( pFrm, &aInf ); + SwCrsrMoveState aTmpState( MV_SETONLYTEXT ); + aTmpState.bRealHeight = TRUE; + if( aLine.GetCharRect( &rOrig, nOffset, &aTmpState, nMaxY ) ) + { + if( aTmpState.aRealHeight.X() >= 0 ) + { + rOrig.Pos().Y() += aTmpState.aRealHeight.X(); + rOrig.Height( aTmpState.aRealHeight.Y() ); + } + return TRUE; + } + return FALSE; } } @@ -493,7 +504,7 @@ sal_Bool SwTxtFrm::GetCrsrOfst(SwPosition* pPos, Point& rPoint, MV_TBLSEL == pCMS->eState ) nChgFrm = 1; } - return _GetCrsrOfst( pPos, rPoint, nChgFrm, pCMS ); + return _GetCrsrOfst( pPos, rPoint, nChgFrm != 0, pCMS ); } /************************************************************************* @@ -677,7 +688,7 @@ sal_Bool SwTxtFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset, // siehe Kommentar in SwTxtFrm::GetCrsrOfst() #ifndef PRODUCT - const xub_StrLen nOldNode = pPam->pPoint->nNode.GetIndex(); + const ULONG nOldNode = pPam->pPoint->nNode.GetIndex(); #endif // Der Node soll nicht gewechselt werden xub_StrLen nOfst = aLine.GetCrsrOfst( pPam->pPoint, @@ -786,7 +797,7 @@ sal_Bool SwTxtFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset, aCharBox.SSize().Width() /= 2; #ifndef PRODUCT // siehe Kommentar in SwTxtFrm::GetCrsrOfst() - const xub_StrLen nOldNode = pPam->pPoint->nNode.GetIndex(); + const ULONG nOldNode = pPam->pPoint->nNode.GetIndex(); #endif if ( pNextLine && ! bFirstOfDouble ) aLine.NextLine(); @@ -996,7 +1007,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const nFirst = 0; } else if( nDist < nFirst ) - nFirst -= nDist; + nFirst -= (USHORT)nDist; else nFirst = 0; nDist = Max( nDist, long( GetLineSpace() ) ); |