summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGulsah Kose <gulsah.1004@gmail.com>2016-02-28 20:03:41 +0200
committerMaxim Monastirsky <momonasmon@gmail.com>2016-02-28 21:17:32 +0000
commitebfa86c8ff962820b47ad0b4a93b0813c0ccaff5 (patch)
tree7856e0f350231db804b36d1d37934c60f66e1d58
parent1ef0a707d1f53e3c55fe355a3797cb6b487db146 (diff)
tdf#89646 Implement "uno:LineToolbox" command into calc.
Freeline filled, Polygon filled, Bezier Filled, Polygon 45, Polygon 45 filled buttons are added into writer's LineToolbox. Change-Id: I181d3cbc64a70ef1ef363b1ef76641b6b8ec2c79 Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/22748 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu14
-rw-r--r--sc/UIConfig_scalc.mk1
-rw-r--r--sc/sdi/tabvwsh.sdi6
-rw-r--r--sc/source/ui/view/tabvwsh2.cxx9
-rw-r--r--sc/uiconfig/scalc/toolbar/drawbar.xml4
-rw-r--r--sc/uiconfig/scalc/toolbar/linesbar.xml31
6 files changed, 62 insertions, 3 deletions
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu
index 6b798c5bb08d..a89f8a59963c 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu
@@ -119,6 +119,20 @@
<value>true</value>
</prop>
</node>
+ <node oor:name="private:resource/toolbar/linesbar" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Lines</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
<node oor:name="private:resource/toolbar/graphicobjectbar" oor:op="replace">
<prop oor:name="DockPos" oor:type="xs:string">
<value>0,2</value>
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index c83b2f8d3340..0594195090c6 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -70,6 +70,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/scalc,\
sc/uiconfig/scalc/toolbar/graphicobjectbar \
sc/uiconfig/scalc/toolbar/insertbar \
sc/uiconfig/scalc/toolbar/insertcellsbar \
+ sc/uiconfig/scalc/toolbar/linesbar \
sc/uiconfig/scalc/toolbar/mediaobjectbar \
sc/uiconfig/scalc/toolbar/moreformcontrols \
sc/uiconfig/scalc/toolbar/previewbar \
diff --git a/sc/sdi/tabvwsh.sdi b/sc/sdi/tabvwsh.sdi
index 43a8e58dbf04..46859c5807f3 100644
--- a/sc/sdi/tabvwsh.sdi
+++ b/sc/sdi/tabvwsh.sdi
@@ -90,9 +90,15 @@ interface BaseSelection
SID_DRAW_LINE [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
SID_DRAW_RECT [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
SID_DRAW_ELLIPSE [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_DRAWTBX_LINES [ StateMethod = GetDrawState; ]
+ SID_DRAW_POLYGON [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
SID_DRAW_POLYGON_NOFILL [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_DRAW_BEZIER_FILL [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
SID_DRAW_BEZIER_NOFILL [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_DRAW_FREELINE [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
SID_DRAW_FREELINE_NOFILL [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_DRAW_XPOLYGON [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
+ SID_DRAW_XPOLYGON_NOFILL [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
SID_DRAW_ARC [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
SID_DRAW_PIE [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
SID_DRAW_CIRCLECUT [ ExecMethod = ExecDraw; StateMethod = GetDrawState; ]
diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index 0abd8b3c2ffe..b81fc422d355 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -230,9 +230,13 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
rBindings.Invalidate( SID_BEZIER_EDIT );
break;
+ case SID_DRAW_XPOLYGON:
+ case SID_DRAW_XPOLYGON_NOFILL:
case SID_DRAW_POLYGON:
case SID_DRAW_POLYGON_NOFILL:
case SID_DRAW_BEZIER_NOFILL:
+ case SID_DRAW_BEZIER_FILL:
+ case SID_DRAW_FREELINE:
case SID_DRAW_FREELINE_NOFILL:
pTabView->SetDrawFuncPtr(new FuConstPolygon(this, pWin, pView, pDoc, rReq));
break;
@@ -359,8 +363,13 @@ void ScTabViewShell::GetDrawState(SfxItemSet &rSet)
case SID_DRAW_LINE:
case SID_DRAW_RECT:
case SID_DRAW_ELLIPSE:
+ case SID_DRAW_POLYGON:
case SID_DRAW_POLYGON_NOFILL:
+ case SID_DRAW_XPOLYGON:
+ case SID_DRAW_XPOLYGON_NOFILL:
+ case SID_DRAW_BEZIER_FILL:
case SID_DRAW_BEZIER_NOFILL:
+ case SID_DRAW_FREELINE:
case SID_DRAW_FREELINE_NOFILL:
case SID_DRAW_ARC:
case SID_DRAW_PIE:
diff --git a/sc/uiconfig/scalc/toolbar/drawbar.xml b/sc/uiconfig/scalc/toolbar/drawbar.xml
index f4bf9a711a4c..e724e75f2798 100644
--- a/sc/uiconfig/scalc/toolbar/drawbar.xml
+++ b/sc/uiconfig/scalc/toolbar/drawbar.xml
@@ -20,9 +20,7 @@
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink">
<toolbar:toolbaritem xlink:href=".uno:SelectObject" toolbar:helpid="10128"/>
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:Freeline_Unfilled" toolbar:helpid="10464"/>
- <toolbar:toolbaritem xlink:href=".uno:Bezier_Unfilled" toolbar:helpid="10397"/>
- <toolbar:toolbaritem xlink:href=".uno:Polygon_Unfilled" toolbar:helpid="10395"/>
+ <toolbar:toolbaritem xlink:href=".uno:LineToolbox"/>
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:Line" toolbar:helpid="10102"/>
<toolbar:toolbaritem xlink:href=".uno:BasicShapes.rectangle"/>
diff --git a/sc/uiconfig/scalc/toolbar/linesbar.xml b/sc/uiconfig/scalc/toolbar/linesbar.xml
new file mode 100644
index 000000000000..86fa223659d2
--- /dev/null
+++ b/sc/uiconfig/scalc/toolbar/linesbar.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * 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:toolbarbreak/>
+</toolbar:toolbar>