summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/crsrsh.hxx3
-rw-r--r--sw/source/core/crsr/crsrsh.cxx56
2 files changed, 25 insertions, 34 deletions
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index b513fc15fa1c..17cf27b4374f 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -156,8 +156,7 @@ public:
UPDOWN = (1 << 0), ///< keep Up/Down on columns
SCROLLWIN = (1 << 1), ///< scroll window
CHKRANGE = (1 << 2), ///< check overlapping PaMs
- NOCALRECT = (1 << 3), ///< don't recalculate CharRect
- READONLY = (1 << 4) ///< make visible in spite of Readonly
+ READONLY = (1 << 3) ///< make visible in spite of Readonly
};
private:
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index e6b66805b397..c01966bb9829 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -1724,44 +1724,36 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd )
}
} while( bAgainst );
- if( !( eFlags & SwCrsrShell::NOCALRECT ))
- {
- SwCrsrMoveState aTmpState( m_eMvState );
- aTmpState.bSetInReadOnly = IsReadOnlyAvailable();
- aTmpState.bRealHeight = true;
- aTmpState.bRealWidth = IsOverwriteCrsr();
- aTmpState.nCursorBidiLevel = pShellCrsr->GetCrsrBidiLevel();
-
- // #i27615#,#i30453#
- SwSpecialPos aSpecialPos;
- aSpecialPos.nExtendRange = SwSPExtendRange::BEFORE;
- if (pShellCrsr->IsInFrontOfLabel())
- {
- aTmpState.pSpecialPos = &aSpecialPos;
- }
+ SwCrsrMoveState aTmpState( m_eMvState );
+ aTmpState.bSetInReadOnly = IsReadOnlyAvailable();
+ aTmpState.bRealHeight = true;
+ aTmpState.bRealWidth = IsOverwriteCrsr();
+ aTmpState.nCursorBidiLevel = pShellCrsr->GetCrsrBidiLevel();
- ++mnStartAction; // tdf#91602 prevent recursive Action!
- if( !pFrm->GetCharRect( m_aCharRect, *pShellCrsr->GetPoint(), &aTmpState ) )
- {
- Point& rPt = pShellCrsr->GetPtPos();
- rPt = m_aCharRect.Center();
- pFrm->GetCrsrOfst( pShellCrsr->GetPoint(), rPt, &aTmpState );
- }
- --mnStartAction;
+ // #i27615#,#i30453#
+ SwSpecialPos aSpecialPos;
+ aSpecialPos.nExtendRange = SwSPExtendRange::BEFORE;
+ if (pShellCrsr->IsInFrontOfLabel())
+ {
+ aTmpState.pSpecialPos = &aSpecialPos;
+ }
- if( !pShellCrsr->HasMark() )
- m_aCrsrHeight = aTmpState.aRealHeight;
- else
- {
- m_aCrsrHeight.setX(0);
- m_aCrsrHeight.setY(aTmpState.aRealHeight.getY() < 0 ?
- -m_aCharRect.Width() : m_aCharRect.Height());
- }
+ ++mnStartAction; // tdf#91602 prevent recursive Action!
+ if( !pFrm->GetCharRect( m_aCharRect, *pShellCrsr->GetPoint(), &aTmpState ) )
+ {
+ Point& rPt = pShellCrsr->GetPtPos();
+ rPt = m_aCharRect.Center();
+ pFrm->GetCrsrOfst( pShellCrsr->GetPoint(), rPt, &aTmpState );
}
+ --mnStartAction;
+
+ if( !pShellCrsr->HasMark() )
+ m_aCrsrHeight = aTmpState.aRealHeight;
else
{
m_aCrsrHeight.setX(0);
- m_aCrsrHeight.setY(m_aCharRect.Height());
+ m_aCrsrHeight.setY(aTmpState.aRealHeight.getY() < 0 ?
+ -m_aCharRect.Width() : m_aCharRect.Height());
}
if( !bFirst && aOld == m_aCharRect )