From 3a326395a48db313b907b4a35392216d7b2e2a11 Mon Sep 17 00:00:00 2001 From: Cédric Bosdonnat Date: Thu, 5 Jan 2012 11:34:49 +0100 Subject: Page Break: center the tab on the mouse and remove click on the line --- sw/source/ui/docvw/PageBreakWin.cxx | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'sw') diff --git a/sw/source/ui/docvw/PageBreakWin.cxx b/sw/source/ui/docvw/PageBreakWin.cxx index b16e51f08652..f954b6e6c767 100644 --- a/sw/source/ui/docvw/PageBreakWin.cxx +++ b/sw/source/ui/docvw/PageBreakWin.cxx @@ -125,7 +125,6 @@ namespace m_pWin( pWin ) {}; virtual void MouseMove( const MouseEvent& rMEvt ); - virtual void MouseButtonDown( const MouseEvent& rMEvt ); }; void SwBreakDashedLine::MouseMove( const MouseEvent& rMEvt ) @@ -148,16 +147,6 @@ namespace m_pWin->UpdatePosition( pPtr ); } } - - void SwBreakDashedLine::MouseButtonDown( const MouseEvent& rMEvt ) - { - sal_uInt16 nItemId = m_pWin->GetPopupMenu()->Execute( this, rMEvt.GetPosPixel() ); - if ( nItemId ) - { - m_pWin->SetCurItemId( nItemId ); - m_pWin->Select(); - } - } } SwPageBreakWin::SwPageBreakWin( SwEditWin* pEditWin, const SwPageFrm* pPageFrm ) : @@ -452,14 +441,10 @@ void SwPageBreakWin::UpdatePosition( const Point* pEvtPt ) if ( m_pMousePt ) { - nBtnLeft = nLineLeft + m_pMousePt->X(); + nBtnLeft = nLineLeft + m_pMousePt->X() - aBtnSize.getWidth() / 2; - if ( Application::GetSettings().GetLayoutRTL() ) - { - nBtnLeft -= aBtnSize.getWidth(); - if ( nBtnLeft < nLineLeft ) - nBtnLeft = nLineLeft; - } + if ( nBtnLeft < nLineLeft ) + nBtnLeft = nLineLeft; else if ( ( nBtnLeft + aBtnSize.getWidth() ) > nLineRight ) nBtnLeft = nLineRight - aBtnSize.getWidth(); } -- cgit