summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2016-02-28 22:45:14 +0200
committerMaxim Monastirsky <momonasmon@gmail.com>2016-02-28 22:53:23 +0200
commit1ef0a707d1f53e3c55fe355a3797cb6b487db146 (patch)
treef0bf88d6ad8f8501b41a67e1f9b1dda95fb96b66
parent12b1113b42c2f7007efd5e4cfaba738d4adaa9a4 (diff)
Related: tdf#89646 sw: Fix some issues with the new tools
- 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
-rw-r--r--sw/source/core/frmedt/feshview.cxx2
-rw-r--r--sw/source/uibase/ribbar/drawbase.cxx11
-rw-r--r--sw/uiconfig/swriter/toolbar/linesbar.xml11
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 .
-->
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
- <toolbar:toolbaritem xlink:href=".uno:Freeline_Unfilled"/>
- <toolbar:toolbaritem xlink:href=".uno:Bezier_Unfilled"/>
- <toolbar:toolbaritem xlink:href=".uno:Polygon_Unfilled"/>
- <toolbar:toolbaritem xlink:href=".uno:Polygon_Diagonal_Unfilled"/>
- <toolbar:toolbarbreak/>
- <toolbar:toolbaritem xlink:href=".uno:Freeline"/>
<toolbar:toolbaritem xlink:href=".uno:BezierFill"/>
<toolbar:toolbaritem xlink:href=".uno:Polygon"/>
<toolbar:toolbaritem xlink:href=".uno:Polygon_Diagonal"/>
+ <toolbar:toolbaritem xlink:href=".uno:Freeline"/>
<toolbar:toolbarbreak/>
+ <toolbar:toolbaritem xlink:href=".uno:Bezier_Unfilled"/>
+ <toolbar:toolbaritem xlink:href=".uno:Polygon_Unfilled"/>
+ <toolbar:toolbaritem xlink:href=".uno:Polygon_Diagonal_Unfilled"/>
+ <toolbar:toolbaritem xlink:href=".uno:Freeline_Unfilled"/>
</toolbar:toolbar>