Kaydet (Commit) 728c9ce4 authored tarafından Gulsah Kose's avatar Gulsah Kose Kaydeden (comit) Maxim Monastirsky

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: 's avatarGulsah Kose <gulsah.1004@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/22731Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMaxim Monastirsky <momonasmon@gmail.com>
üst 1c858003
......@@ -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 &amp; White View</value>
......
......@@ -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>
......
......@@ -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
()
[
......
......@@ -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
()
[
......
......@@ -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 ;
......
......@@ -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;
}
......
......@@ -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();
......
......@@ -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:
......
......@@ -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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment