From d1b6140239e3bace6a4ffd3147b2466583f4e1d0 Mon Sep 17 00:00:00 2001 From: Cédric Bosdonnat Date: Thu, 6 Oct 2011 16:59:35 +0200 Subject: Page Break: fixed the Edit dialog... wasn't using the correct selection --- sw/source/ui/docvw/PageBreakWin.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'sw') diff --git a/sw/source/ui/docvw/PageBreakWin.cxx b/sw/source/ui/docvw/PageBreakWin.cxx index 170ccce84e72..08425db2dc0d 100644 --- a/sw/source/ui/docvw/PageBreakWin.cxx +++ b/sw/source/ui/docvw/PageBreakWin.cxx @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -250,6 +251,16 @@ void SwPageBreakWin::Select( ) if ( pBodyFrm ) { + SwWrtShell& rSh = GetEditWin()->GetView().GetWrtShell(); + rSh.Push( ); + rSh.ClearMark(); + sal_Bool bOldLock = rSh.IsViewLocked(); + rSh.LockView( sal_True ); + + SwCntntFrm *pCnt = const_cast< SwCntntFrm* >( pBodyFrm->ContainsCntnt() ); + SwCntntNode* pNd = pCnt->GetNode(); + rSh.SetSelection( SwPaM( *pNd ) ); + if ( pBodyFrm->Lower()->IsTabFrm() ) { SfxUInt16Item aItem( GetEditWin()->GetView().GetPool( ).GetWhich( FN_FORMAT_TABLE_DLG ), TP_TABLE_TEXTFLOW ); @@ -262,6 +273,8 @@ void SwPageBreakWin::Select( ) GetEditWin()->GetView().GetViewFrame()->GetDispatcher()->Execute( SID_PARA_DLG, SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD, &aItem, NULL ); } + rSh.LockView( bOldLock ); + rSh.Pop( sal_False ); } } break; -- cgit