[Libreoffice-commits] core.git: officecfg/registry sd/sdi svx/sdi sw/sdi sw/source sw/uiconfig

Gulsah Kose gulsah.1004 at gmail.com
Sun Feb 28 10:18:21 UTC 2016


 officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu |    8 ---
 officecfg/registry/data/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(-)

New commits:
commit 728c9ce48d4e84a6b44d7d50258936f5da34cea4
Author: Gulsah Kose <gulsah.1004 at gmail.com>
Date:   Sat Feb 27 16:21:06 2016 +0200

    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 at gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/22731
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Maxim Monastirsky <momonasmon at gmail.com>

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
index cfea8df..637d38d 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 @@
 <oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:install="http://openoffice.org/2004/installation" oor:name="DrawImpressCommands" oor:package="org.openoffice.Office.UI">
   <node oor:name="UserInterface">
     <node oor:name="Commands">
-      <node oor:name=".uno:Polygon" oor:op="replace">
-        <prop oor:name="Label" oor:type="xs:string">
-          <value xml:lang="en-US">Polygon, filled</value>
-        </prop>
-        <prop oor:name="Properties" oor:type="xs:int">
-          <value>1</value>
-        </prop>
-      </node>
       <node oor:name=".uno:ColorView" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
           <value xml:lang="en-US">Black & White View</value>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index 940a77b..1dcf8b8a 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 @@
 <oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:install="http://openoffice.org/2004/installation" oor:name="GenericCommands" oor:package="org.openoffice.Office.UI">
   <node oor:name="UserInterface">
     <node oor:name="Commands">
+      <node oor:name=".uno:Polygon" oor:op="replace">
+        <prop oor:name="Label" oor:type="xs:string">
+          <value xml:lang="en-US">Polygon, filled</value>
+        </prop>
+        <prop oor:name="Properties" oor:type="xs:int">
+          <value>1</value>
+        </prop>
+      </node>
       <node oor:name=".uno:ChangeControlType" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
           <value xml:lang="en-US">~Replace with</value>
diff --git a/sd/sdi/sdraw.sdi b/sd/sdi/sdraw.sdi
index 98842f2..19904de 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 169c086..69c25eb 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 370e460..d43ffb8 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 5225460..90fd0a2 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 6d94b47..9c1e436 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 884f047..627e944 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 74976c9..86fa223 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>


More information about the Libreoffice-commits mailing list