summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2018-03-09 09:41:08 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2018-03-13 08:10:15 +0100
commit1a7444ed69a68696b05feb3f3618b6704a140ba6 (patch)
treef598a4a6ada225691de143689ba3ff3425961c40 /sc
parentb0259d3e857bef53b27c3f61ecc448c3f96aad07 (diff)
tdf#114552 Convert anchor toggle to anchor menu
Since we now have three, not two anchor types. Change-Id: I9654de574a9d546d2191093cba9c192fac3cd3d7 Reviewed-on: https://gerrit.libreoffice.org/50987 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sc')
-rw-r--r--sc/sdi/drawsh.sdi1
-rw-r--r--sc/source/ui/drawfunc/drawsh2.cxx2
-rw-r--r--sc/source/ui/drawfunc/drawsh5.cxx2
-rw-r--r--sc/uiconfig/scalc/toolbar/drawobjectbar.xml2
-rw-r--r--sc/uiconfig/scalc/toolbar/formdesign.xml2
-rw-r--r--sc/uiconfig/scalc/toolbar/graphicobjectbar.xml2
6 files changed, 6 insertions, 5 deletions
diff --git a/sc/sdi/drawsh.sdi b/sc/sdi/drawsh.sdi
index 038489e3e065..23e76a146e67 100644
--- a/sc/sdi/drawsh.sdi
+++ b/sc/sdi/drawsh.sdi
@@ -158,6 +158,7 @@ interface TableDraw
SID_MIRROR_VERTICAL [ ExecMethod = ExecDrawFunc; StateMethod = GetDrawFuncState; Export = FALSE; ]
SID_FLIP_HORIZONTAL [ ExecMethod = ExecDrawFunc; StateMethod = GetDrawFuncState; Export = FALSE; ]
SID_FLIP_VERTICAL [ ExecMethod = ExecDrawFunc; StateMethod = GetDrawFuncState; Export = FALSE; ]
+ SID_ANCHOR_MENU [ StateMethod = GetDrawFuncState; Export = FALSE; ]
SID_ANCHOR_PAGE [ ExecMethod = ExecDrawFunc; StateMethod = GetState; Export = FALSE; ]
SID_ANCHOR_TOGGLE [ ExecMethod = ExecDrawFunc; StateMethod = GetDrawFuncState; Export = FALSE; ]
SID_ANCHOR_CELL [ ExecMethod = ExecDrawFunc; StateMethod = GetState; Export = FALSE; ]
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx
index 83d5d51ade9c..a1cc5388a2ea 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -244,6 +244,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // disable functions
rSet.DisableItem( SID_COPY );
// Notes always default to Page anchor.
rSet.DisableItem( SID_ANCHOR_TOGGLE );
+ rSet.DisableItem( SID_ANCHOR_MENU );
}
}
@@ -273,6 +274,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // disable functions
rSet.DisableItem( SID_COPY );
// other
rSet.DisableItem( SID_ANCHOR_TOGGLE );
+ rSet.DisableItem( SID_ANCHOR_MENU );
rSet.DisableItem( SID_ORIGINALSIZE );
rSet.DisableItem( SID_FITCELLSIZE );
rSet.DisableItem( SID_ATTR_TRANSFORM );
diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx
index 971f1aa73782..cd4d38ae5b7f 100644
--- a/sc/source/ui/drawfunc/drawsh5.cxx
+++ b/sc/source/ui/drawfunc/drawsh5.cxx
@@ -368,8 +368,6 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
rBindings.Invalidate( SID_ANCHOR_CELL_RESIZE );
break;
- // TODO: This toggle should probably be converted to a dropdown,
- // since we now have three states, not two.
case SID_ANCHOR_TOGGLE:
{
switch( pView->GetAnchorType() )
diff --git a/sc/uiconfig/scalc/toolbar/drawobjectbar.xml b/sc/uiconfig/scalc/toolbar/drawobjectbar.xml
index 04122cd81849..4d55efe27314 100644
--- a/sc/uiconfig/scalc/toolbar/drawobjectbar.xml
+++ b/sc/uiconfig/scalc/toolbar/drawobjectbar.xml
@@ -32,7 +32,7 @@
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:FillStyle"/>
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:ToggleAnchorType"/>
+ <toolbar:toolbaritem xlink:href=".uno:AnchorMenu"/>
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:ToggleObjectRotateMode"/>
<toolbar:toolbaritem xlink:href=".uno:ObjectAlign"/>
diff --git a/sc/uiconfig/scalc/toolbar/formdesign.xml b/sc/uiconfig/scalc/toolbar/formdesign.xml
index ed70f63eb9ec..5804f06448c4 100644
--- a/sc/uiconfig/scalc/toolbar/formdesign.xml
+++ b/sc/uiconfig/scalc/toolbar/formdesign.xml
@@ -30,7 +30,7 @@
<toolbar:toolbaritem xlink:href=".uno:AddField"/>
<toolbar:toolbaritem xlink:href=".uno:AutoControlFocus"/>
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:ToggleAnchorType"/>
+ <toolbar:toolbaritem xlink:href=".uno:AnchorMenu"/>
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:BringToFront" toolbar:visible="false"/>
<toolbar:toolbaritem xlink:href=".uno:SendToBack" toolbar:visible="false"/>
diff --git a/sc/uiconfig/scalc/toolbar/graphicobjectbar.xml b/sc/uiconfig/scalc/toolbar/graphicobjectbar.xml
index e63f9946da90..ddc508fad1a9 100644
--- a/sc/uiconfig/scalc/toolbar/graphicobjectbar.xml
+++ b/sc/uiconfig/scalc/toolbar/graphicobjectbar.xml
@@ -35,7 +35,7 @@
<toolbar:toolbaritem xlink:href=".uno:Crop"/>
<toolbar:toolbaritem xlink:href=".uno:FillShadow"/>
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:ToggleAnchorType"/>
+ <toolbar:toolbaritem xlink:href=".uno:AnchorMenu"/>
<toolbar:toolbaritem xlink:href=".uno:ObjectAlign"/>
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:BringToFront"/>