From 728c9ce48d4e84a6b44d7d50258936f5da34cea4 Mon Sep 17 00:00:00 2001 From: Gulsah Kose Date: Sat, 27 Feb 2016 16:21:06 +0200 Subject: tdf#89646 Add new buttons into Linetoolbox of writer drawbar. Freeline filled, Polygon filled, Bezier Filled, Polygon 45, Polygon 45 filled buttons are added into writer's LineToolbox. Change-Id: Idf2b3d7484feb78a0ed762a14d9fde587b6a46fa Signed-off-by: Gulsah Kose Reviewed-on: https://gerrit.libreoffice.org/22731 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky --- .../openoffice/Office/UI/DrawImpressCommands.xcu | 8 ------- .../org/openoffice/Office/UI/GenericCommands.xcu | 8 +++++++ sd/sdi/sdraw.sdi | 18 ---------------- svx/sdi/svx.sdi | 18 ++++++++++++++++ sw/sdi/viewsh.sdi | 25 ++++++++++++++++++++++ sw/source/uibase/ribbar/conpoly.cxx | 17 ++++++++++++++- sw/source/uibase/uiview/viewdraw.cxx | 5 +++++ sw/source/uibase/uiview/viewstat.cxx | 5 +++++ sw/uiconfig/swriter/toolbar/linesbar.xml | 7 ++++++ 9 files changed, 84 insertions(+), 27 deletions(-) diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu index cfea8dfa1021..637d38d68540 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu @@ -3,14 +3,6 @@ - - - Polygon, filled - - - 1 - - Black & White View diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index 940a77bf87b0..1dcf8b8a2918 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -20,6 +20,14 @@ + + + Polygon, filled + + + 1 + + ~Replace with diff --git a/sd/sdi/sdraw.sdi b/sd/sdi/sdraw.sdi index 98842f26549a..19904de77dc3 100644 --- a/sd/sdi/sdraw.sdi +++ b/sd/sdi/sdraw.sdi @@ -3327,24 +3327,6 @@ SfxBoolItem PickThrough SID_PICK_THROUGH GroupId = GID_MODIFY; ] -SfxBoolItem Polygon SID_DRAW_POLYGON - -[ - AutoUpdate = TRUE, - FastCall = FALSE, - ReadOnlyDoc = FALSE, - Toggle = FALSE, - Container = FALSE, - RecordAbsolute = FALSE, - RecordPerItem; - - - AccelConfig = TRUE, - MenuConfig = TRUE, - ToolBoxConfig = TRUE, - GroupId = GID_DRAWING; -] - SfxVoidItem Presentation SID_PRESENTATION () [ diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index 169c086f2489..69c25eb99875 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -90,6 +90,24 @@ SfxVoidItem LineToolbox SID_DRAWTBX_LINES GroupId = GID_DRAWING; ] +SfxBoolItem Polygon SID_DRAW_POLYGON + +[ + AutoUpdate = TRUE, + FastCall = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerItem; + + + AccelConfig = TRUE, + MenuConfig = TRUE, + ToolBoxConfig = TRUE, + GroupId = GID_DRAWING; +] + SfxVoidItem AlignCenter SID_OBJECT_ALIGN_CENTER () [ diff --git a/sw/sdi/viewsh.sdi b/sw/sdi/viewsh.sdi index 370e4609a0d9..d43ffb8f8c6d 100644 --- a/sw/sdi/viewsh.sdi +++ b/sw/sdi/viewsh.sdi @@ -92,21 +92,46 @@ interface TextEditView : BaseTextEditView ExecMethod = ExecDraw ; StateMethod = GetDrawState ; ] + SID_DRAW_XPOLYGON_NOFILL + [ + ExecMethod = ExecDraw ; + StateMethod = GetDrawState ; + ] + SID_DRAW_XPOLYGON + [ + ExecMethod = ExecDraw ; + StateMethod = GetDrawState ; + ] SID_DRAW_POLYGON_NOFILL [ ExecMethod = ExecDraw ; StateMethod = GetDrawState ; ] + SID_DRAW_POLYGON + [ + ExecMethod = ExecDraw ; + StateMethod = GetDrawState ; + ] SID_DRAW_BEZIER_NOFILL [ ExecMethod = ExecDraw ; StateMethod = GetDrawState ; ] + SID_DRAW_BEZIER_FILL + [ + ExecMethod = ExecDraw ; + StateMethod = GetDrawState ; + ] SID_DRAW_FREELINE_NOFILL [ ExecMethod = ExecDraw ; StateMethod = GetDrawState ; ] + SID_DRAW_FREELINE + [ + ExecMethod = ExecDraw ; + StateMethod = GetDrawState ; + ] SID_DRAW_ARC [ ExecMethod = ExecDraw ; diff --git a/sw/source/uibase/ribbar/conpoly.cxx b/sw/source/uibase/ribbar/conpoly.cxx index 52254609aadb..90fd0a26293b 100644 --- a/sw/source/uibase/ribbar/conpoly.cxx +++ b/sw/source/uibase/ribbar/conpoly.cxx @@ -57,7 +57,8 @@ bool ConstPolygon::MouseButtonUp(const MouseEvent& rMEvt) if (m_pSh->IsDrawCreate()) { if (rMEvt.IsLeft() && rMEvt.GetClicks() == 1 && - m_pWin->GetSdrDrawMode() != OBJ_FREELINE) + m_pWin->GetSdrDrawMode() != OBJ_FREELINE && + m_pWin->GetSdrDrawMode() != OBJ_FREEFILL) { if (!m_pSh->EndCreate(SDRCREATE_NEXTPOINT)) { @@ -86,17 +87,31 @@ void ConstPolygon::Activate(const sal_uInt16 nSlotId) switch (nSlotId) { case SID_DRAW_POLYGON_NOFILL: + case SID_DRAW_XPOLYGON_NOFILL: m_pWin->SetSdrDrawMode(OBJ_PLIN); break; + case SID_DRAW_POLYGON: + case SID_DRAW_XPOLYGON: + m_pWin->SetSdrDrawMode(OBJ_POLY); + break; + case SID_DRAW_BEZIER_NOFILL: m_pWin->SetSdrDrawMode(OBJ_PATHLINE); break; + case SID_DRAW_BEZIER_FILL: + m_pWin->SetSdrDrawMode(OBJ_PATHFILL); + break; + case SID_DRAW_FREELINE_NOFILL: m_pWin->SetSdrDrawMode(OBJ_FREELINE); break; + case SID_DRAW_FREELINE: + m_pWin->SetSdrDrawMode(OBJ_FREEFILL); + break; + default: break; } diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx index 6d94b477d9f1..9c1e436f0f6d 100644 --- a/sw/source/uibase/uiview/viewdraw.cxx +++ b/sw/source/uibase/uiview/viewdraw.cxx @@ -255,9 +255,14 @@ void SwView::ExecDraw(SfxRequest& rReq) m_sDrawCustom.clear(); break; + case SID_DRAW_XPOLYGON_NOFILL: + case SID_DRAW_XPOLYGON: case SID_DRAW_POLYGON_NOFILL: + case SID_DRAW_POLYGON: case SID_DRAW_BEZIER_NOFILL: + case SID_DRAW_BEZIER_FILL: case SID_DRAW_FREELINE_NOFILL: + case SID_DRAW_FREELINE: pFuncPtr = new ConstPolygon(m_pWrtShell, m_pEditWin, this); m_nDrawSfxId = nSlotId; m_sDrawCustom.clear(); diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx index 884f0477a4b0..627e944f912f 100644 --- a/sw/source/uibase/uiview/viewstat.cxx +++ b/sw/source/uibase/uiview/viewstat.cxx @@ -480,9 +480,14 @@ void SwView::GetDrawState(SfxItemSet &rSet) case SID_DRAW_LINE: case SID_DRAW_RECT: case SID_DRAW_ELLIPSE: + case SID_DRAW_XPOLYGON_NOFILL: + case SID_DRAW_XPOLYGON: case SID_DRAW_POLYGON_NOFILL: + case SID_DRAW_POLYGON: case SID_DRAW_BEZIER_NOFILL: + case SID_DRAW_BEZIER_FILL: case SID_DRAW_FREELINE_NOFILL: + case SID_DRAW_FREELINE: case SID_DRAW_ARC: case SID_DRAW_PIE: case SID_DRAW_CIRCLECUT: diff --git a/sw/uiconfig/swriter/toolbar/linesbar.xml b/sw/uiconfig/swriter/toolbar/linesbar.xml index 74976c91f77d..86fa223659d2 100644 --- a/sw/uiconfig/swriter/toolbar/linesbar.xml +++ b/sw/uiconfig/swriter/toolbar/linesbar.xml @@ -21,4 +21,11 @@ + + + + + + + -- cgit v1.2.3