diff options
author | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2011-10-07 16:55:03 +0200 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2011-10-07 16:59:11 +0200 |
commit | eb0e2fcf15ed37f56c2334d292bdc1fb054bc287 (patch) | |
tree | f838e1fa71a861c435a5beccb32e0c9fedf07def /sw/source/core/edit/ednumber.cxx | |
parent | 6055a5df7b6e7452987a9584d10f436ca2d349fd (diff) |
Page Break: Fixed part of the Edit menu action cursors handling
Added an optional SwPaM argument to SID_PARA_DLG action to avoid
changing the current cursor before showing the dialog.
Set the focus to SwEditWin after the action to continue editing the
document.
Diffstat (limited to 'sw/source/core/edit/ednumber.cxx')
-rw-r--r-- | sw/source/core/edit/ednumber.cxx | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx index 64b090afc343..1dba53cbebd2 100644 --- a/sw/source/core/edit/ednumber.cxx +++ b/sw/source/core/edit/ednumber.cxx @@ -719,11 +719,10 @@ sal_Bool SwEditShell::ReplaceNumRule( const String& rOldRule, const String& rNew return bRet; } -void SwEditShell::SetNumRuleStart( sal_Bool bFlag ) +void SwEditShell::SetNumRuleStart( sal_Bool bFlag, SwPaM* pPaM ) { StartAllAction(); - - SwPaM* pCrsr = GetCrsr(); + SwPaM* pCrsr = pPaM ? pPaM : GetCrsr(); if( pCrsr->GetNext() != pCrsr ) // Mehrfachselektion ? { GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL ); @@ -739,20 +738,21 @@ void SwEditShell::SetNumRuleStart( sal_Bool bFlag ) EndAllAction(); } -sal_Bool SwEditShell::IsNumRuleStart() const +sal_Bool SwEditShell::IsNumRuleStart( SwPaM* pPaM ) const { sal_Bool bResult = sal_False; - const SwTxtNode* pTxtNd = GetCrsr()->GetNode()->GetTxtNode(); + SwPaM* pCrsr = pPaM ? pPaM : GetCrsr( ); + const SwTxtNode* pTxtNd = pCrsr->GetNode()->GetTxtNode(); if( pTxtNd ) bResult = pTxtNd->IsListRestart() ? sal_True : sal_False; return bResult; } -void SwEditShell::SetNodeNumStart( sal_uInt16 nStt ) +void SwEditShell::SetNodeNumStart( sal_uInt16 nStt, SwPaM* pPaM ) { StartAllAction(); - SwPaM* pCrsr = GetCrsr(); + SwPaM* pCrsr = pPaM ? pPaM : GetCrsr(); if( pCrsr->GetNext() != pCrsr ) // Mehrfachselektion ? { GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL ); @@ -768,9 +768,10 @@ void SwEditShell::SetNodeNumStart( sal_uInt16 nStt ) EndAllAction(); } -sal_uInt16 SwEditShell::GetNodeNumStart() const +sal_uInt16 SwEditShell::GetNodeNumStart( SwPaM* pPaM ) const { - const SwTxtNode* pTxtNd = GetCrsr()->GetNode()->GetTxtNode(); + SwPaM* pCrsr = pPaM ? pPaM : GetCrsr(); + const SwTxtNode* pTxtNd = pCrsr->GetNode()->GetTxtNode(); // correction: check, if list restart value is set at text node and // use new method <SwTxtNode::GetAttrListRestartValue()>. // return USHRT_MAX, if no list restart value is found. |