From 1ef0a707d1f53e3c55fe355a3797cb6b487db146 Mon Sep 17 00:00:00 2001 From: Maxim Monastirsky Date: Sun, 28 Feb 2016 22:45:14 +0200 Subject: Related: tdf#89646 sw: Fix some issues with the new tools MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Don't crash on default object creation (by holding CTRL). - Correctly handle clicking on the start position. - Fix Polygon (45°) tools (inverted SHIFT effect via doConstructOrthogonal). - Toolbar layout similar to Impress/Draw. Change-Id: Iefbaf892d8856a2d136e7e2a040194c770507722 --- sw/source/core/frmedt/feshview.cxx | 2 ++ sw/source/uibase/ribbar/drawbase.cxx | 11 +++++++---- sw/uiconfig/swriter/toolbar/linesbar.xml | 11 +++++------ 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index c599111a9393..0a47026cfbbb 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -2747,6 +2747,7 @@ long SwFEShell::GetSectionWidth( SwFormat const & rFormat ) const switch(eSdrObjectKind) { case OBJ_PATHLINE: + case OBJ_PATHFILL: { basegfx::B2DPolygon aInnerPoly; @@ -2769,6 +2770,7 @@ long SwFEShell::GetSectionWidth( SwFormat const & rFormat ) const } break; case OBJ_FREELINE: + case OBJ_FREEFILL: { basegfx::B2DPolygon aInnerPoly; diff --git a/sw/source/uibase/ribbar/drawbase.cxx b/sw/source/uibase/ribbar/drawbase.cxx index b47366b01bf2..c4fac3cca929 100644 --- a/sw/source/uibase/ribbar/drawbase.cxx +++ b/sw/source/uibase/ribbar/drawbase.cxx @@ -247,9 +247,12 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) { const SdrObjKind nDrawMode = m_pWin->GetSdrDrawMode(); //objects with multiple point may end at the start position - bool bMultiPoint = OBJ_PLIN == nDrawMode || - OBJ_PATHLINE == nDrawMode || - OBJ_FREELINE == nDrawMode; + bool bMultiPoint = OBJ_PLIN == nDrawMode || + OBJ_POLY == nDrawMode || + OBJ_PATHLINE == nDrawMode || + OBJ_PATHFILL == nDrawMode || + OBJ_FREELINE == nDrawMode || + OBJ_FREEFILL == nDrawMode; if(rMEvt.IsRight() || (aPnt == m_aStartPos && !bMultiPoint)) { m_pSh->BreakCreate(); @@ -618,7 +621,7 @@ Point SwDrawBase::GetDefaultCenterPos() // #i33136# bool SwDrawBase::doConstructOrthogonal() const { - return false; + return ( m_nSlotId == SID_DRAW_XPOLYGON || m_nSlotId == SID_DRAW_XPOLYGON_NOFILL ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/uiconfig/swriter/toolbar/linesbar.xml b/sw/uiconfig/swriter/toolbar/linesbar.xml index 86fa223659d2..212bb71a1be6 100644 --- a/sw/uiconfig/swriter/toolbar/linesbar.xml +++ b/sw/uiconfig/swriter/toolbar/linesbar.xml @@ -18,14 +18,13 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . --> - - - - - - + + + + + -- cgit v1.2.3