summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2011-10-06 16:59:35 +0200
committerCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2011-10-06 22:28:42 +0200
commitd1b6140239e3bace6a4ffd3147b2466583f4e1d0 (patch)
tree29f36995efbdc27a00136865b8664602fee93eb0 /sw
parent77cb41a734c507722c652d0a675ccbf18e3d6b99 (diff)
Page Break: fixed the Edit dialog... wasn't using the correct selection
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/docvw/PageBreakWin.cxx13
1 files changed, 13 insertions, 0 deletions
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 <pagefrm.hxx>
#include <view.hxx>
#include <viewopt.hxx>
+#include <wrtsh.hxx>
#include <basegfx/color/bcolortools.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
@@ -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;