summaryrefslogtreecommitdiff
path: root/sw/source/ui/wrtsh/wrtsh1.cxx
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2011-10-07 16:55:03 +0200
committerCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2011-10-07 16:59:11 +0200
commiteb0e2fcf15ed37f56c2334d292bdc1fb054bc287 (patch)
treef838e1fa71a861c435a5beccb32e0c9fedf07def /sw/source/ui/wrtsh/wrtsh1.cxx
parent6055a5df7b6e7452987a9584d10f436ca2d349fd (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/ui/wrtsh/wrtsh1.cxx')
-rw-r--r--sw/source/ui/wrtsh/wrtsh1.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx
index 15efd5ca4aa3..07a926dc2dd6 100644
--- a/sw/source/ui/wrtsh/wrtsh1.cxx
+++ b/sw/source/ui/wrtsh/wrtsh1.cxx
@@ -1611,8 +1611,9 @@ void SwWrtShell::QuickUpdateStyle()
}
-void SwWrtShell::AutoUpdatePara(SwTxtFmtColl* pColl, const SfxItemSet& rStyleSet)
+void SwWrtShell::AutoUpdatePara(SwTxtFmtColl* pColl, const SfxItemSet& rStyleSet, SwPaM* pPaM )
{
+ SwPaM* pCrsr = pPaM ? pPaM : GetCrsr( );
SfxItemSet aCoreSet( GetAttrPool(),
RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
RES_PARATR_BEGIN, RES_PARATR_END - 1,
@@ -1624,7 +1625,7 @@ void SwWrtShell::AutoUpdatePara(SwTxtFmtColl* pColl, const SfxItemSet& rStyleSet
SID_ATTR_PARA_MODEL, SID_ATTR_PARA_KEEP,
SID_ATTR_PARA_PAGENUM, SID_ATTR_PARA_PAGENUM,
0 );
- GetCurAttr( aCoreSet );
+ GetPaMAttr( pCrsr, aCoreSet );
sal_Bool bReset = sal_False;
SfxItemIter aParaIter( aCoreSet );
const SfxPoolItem* pParaItem = aParaIter.FirstItem();
@@ -1645,8 +1646,8 @@ void SwWrtShell::AutoUpdatePara(SwTxtFmtColl* pColl, const SfxItemSet& rStyleSet
StartAction();
if(bReset)
{
- ResetAttr();
- SetAttr(aCoreSet);
+ ResetAttr( std::set<sal_uInt16>(), pCrsr );
+ SetAttr(aCoreSet, 0, pCrsr);
}
pDoc->ChgFmt(*pColl, rStyleSet );
EndAction();