summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/crsrsh.hxx4
-rw-r--r--sw/source/core/crsr/crsrsh.cxx14
-rw-r--r--sw/source/core/crsr/crstrvl.cxx4
3 files changed, 13 insertions, 9 deletions
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 93083005e06f..2fd984172ba1 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -352,7 +352,7 @@ public:
// start parenthesing, hide SV-Cursor and selected areas
void StartAction();
// end parenthesing, show SV-Cursor and selected areas
- void EndAction( const bool bIdleEnd = false );
+ void EndAction( const bool bIdleEnd = false, const bool DoSetPosX = false );
// basic cursor travelling
long GetUpDownX() const { return m_nUpDownX; }
@@ -453,7 +453,7 @@ public:
#else
void SttCrsrMove() { ++m_nCrsrMove; StartAction(); }
void EndCrsrMove( const bool bIdleEnd = false )
- { EndAction( bIdleEnd ); --m_nCrsrMove; }
+ { EndAction( bIdleEnd, true ); --m_nCrsrMove; }
#endif
/*
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 9a7fa97ed6b2..608aff0291f0 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -229,11 +229,16 @@ void SwCrsrShell::StartAction()
SwViewShell::StartAction(); // to the SwViewShell
}
-void SwCrsrShell::EndAction( const bool bIdleEnd )
+void SwCrsrShell::EndAction( const bool bIdleEnd, const bool DoSetPosX )
{
comphelper::FlagRestorationGuard g(mbSelectAll, StartsWithTable() && ExtendedSelectedAll(/*bFootnotes =*/ false));
bool bVis = m_bSVCrsrVis;
+ sal_uInt16 eFlags = SwCrsrShell::CHKRANGE;
+ if ( !DoSetPosX )
+ eFlags |= SwCrsrShell::UPDOWN;
+
+
// Idle-formatting?
if( bIdleEnd && Imp()->GetRegion() )
{
@@ -267,7 +272,7 @@ void SwCrsrShell::EndAction( const bool bIdleEnd )
// Within a Basic action, one needs to update the cursor,
// to e.g. create the table cursor. This is being done in
// UpdateCrsr.
- UpdateCrsr( SwCrsrShell::CHKRANGE, bIdleEnd );
+ UpdateCrsr( eFlags, bIdleEnd );
{
// watch Crsr-Moves, call Link if needed, the DTOR is key here!
@@ -284,11 +289,10 @@ void SwCrsrShell::EndAction( const bool bIdleEnd )
return;
}
- sal_uInt16 nParm = SwCrsrShell::CHKRANGE;
if ( !bIdleEnd )
- nParm |= SwCrsrShell::SCROLLWIN;
+ eFlags |= SwCrsrShell::SCROLLWIN;
- UpdateCrsr( nParm, bIdleEnd ); // Show Cursor changes
+ UpdateCrsr( eFlags, bIdleEnd ); // Show Cursor changes
{
SwCallLink aLk( *this ); // watch Crsr-Moves
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 18608424398a..c956ecee5869 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -87,12 +87,12 @@ void SwCrsrShell::MoveCrsrToNum()
if( pFrm->IsVertical() )
{
aPt.setX(m_aCharRect.Center().getX());
- aPt.setY(pFrm->Frm().Top() + m_nUpDownX);
+ aPt.setY(pFrm->Frm().Top() + GetUpDownX());
}
else
{
aPt.setY(m_aCharRect.Center().getY());
- aPt.setX(pFrm->Frm().Left() + m_nUpDownX);
+ aPt.setX(pFrm->Frm().Left() + GetUpDownX());
}
pFrm->GetCrsrOfst( m_pCurCrsr->GetPoint(), aPt );
if ( !m_pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |