summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorjp <jp@openoffice.org>2002-02-14 11:44:42 +0000
committerjp <jp@openoffice.org>2002-02-14 11:44:42 +0000
commit8367afc7d8648a9552413015b0ea5b4509dc3dcd (patch)
treeda613f72e409222980a350c708e1f1c1e4887665 /sw/source/core
parentb275ac60e9542fd2b1b7bcfaecd6114b205739d6 (diff)
Bug #97455#: IsSelOvr - FrmHeight of zero is also a invalid position
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/crsr/swcrsr.cxx50
1 files changed, 27 insertions, 23 deletions
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 5597195443a5..c10e02dac92a 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: swcrsr.cxx,v $
*
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
*
- * last change: $Author: jp $ $Date: 2002-02-01 12:37:59 $
+ * last change: $Author: jp $ $Date: 2002-02-14 12:44:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -406,30 +406,34 @@ FASTBOOL SwCursor::IsSelOvr( int eFlags )
if( pNd->IsCntntNode() && 0 == (SwUnoCrsr*)*this )
{
const SwCntntFrm* pFrm = ((SwCntntNode*)pNd)->GetFrm();
- if( pFrm && pFrm->IsValid() && 0 == pFrm->Frm().Height() &&
- 0 != ( SELOVER_CHANGEPOS & eFlags ) )
+ if( pFrm && pFrm->IsValid() && 0 == pFrm->Frm().Height() )
{
- // skip to the next / prev valida paragraph with a layout
- SwNodeIndex& rPtIdx = GetPoint()->nNode;
- int bGoNxt = pSavePos->nNode < rPtIdx.GetIndex();
- while( 0 != ( pFrm = ( bGoNxt ? pFrm->GetNextCntntFrm()
- : pFrm->GetPrevCntntFrm() )) &&
- 0 == pFrm->Frm().Height() )
- ;
-
- SwCntntNode* pCNd;
- if( pFrm && 0 != (pCNd = (SwCntntNode*)pFrm->GetNode()) )
+ if( 0 != ( SELOVER_CHANGEPOS & eFlags ) )
{
- // set this cntntNode as new position
- rPtIdx = *pCNd;
-
- // ContentIndex noch anmelden:
- xub_StrLen nTmpPos = bGoNxt ? 0 : pCNd->Len();
- GetPoint()->nContent.Assign( pCNd, nTmpPos );
- // sollten wir in einer Tabelle gelandet sein?
- if( IsInProtectTable( TRUE ) )
- pFrm = 0;
+ // skip to the next / prev valida paragraph with a layout
+ SwNodeIndex& rPtIdx = GetPoint()->nNode;
+ int bGoNxt = pSavePos->nNode < rPtIdx.GetIndex();
+ while( 0 != ( pFrm = ( bGoNxt ? pFrm->GetNextCntntFrm()
+ : pFrm->GetPrevCntntFrm() )) &&
+ 0 == pFrm->Frm().Height() )
+ ;
+
+ SwCntntNode* pCNd;
+ if( pFrm && 0 != (pCNd = (SwCntntNode*)pFrm->GetNode()) )
+ {
+ // set this cntntNode as new position
+ rPtIdx = *pCNd;
+
+ // ContentIndex noch anmelden:
+ xub_StrLen nTmpPos = bGoNxt ? 0 : pCNd->Len();
+ GetPoint()->nContent.Assign( pCNd, nTmpPos );
+ // sollten wir in einer Tabelle gelandet sein?
+ if( IsInProtectTable( TRUE ) )
+ pFrm = 0;
+ }
}
+ else
+ pFrm = 0;
}
if( !pFrm )