diff options
author | Gulsah Kose <gulsah.1004@gmail.com> | 2016-02-27 16:21:06 +0200 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2016-02-28 10:18:01 +0000 |
commit | 728c9ce48d4e84a6b44d7d50258936f5da34cea4 (patch) | |
tree | f1986bb469cb3664d28b50c0cd718ef3eed33bc1 /sw | |
parent | 1c85800345239754d5c4ec71c2aad526d0439eea (diff) |
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 <gulsah.1004@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/22731
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/sdi/viewsh.sdi | 25 | ||||
-rw-r--r-- | sw/source/uibase/ribbar/conpoly.cxx | 17 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewdraw.cxx | 5 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewstat.cxx | 5 | ||||
-rw-r--r-- | sw/uiconfig/swriter/toolbar/linesbar.xml | 7 |
5 files changed, 58 insertions, 1 deletions
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 @@ <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:toolbarbreak/> </toolbar:toolbar> |