Resolves tdf#126857 - Center object on page/slide
* uno:AlignMiddle labeled "Middle" * uno:AlignOnPage added Change-Id: Iafc162bdd80d7c20fabd55234e93212c1fa3435a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177348 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
This commit is contained in:
parent
fd2c9abe52
commit
b32d040d64
15 changed files with 64 additions and 1 deletions
|
@ -1786,6 +1786,28 @@
|
|||
<value>1</value>
|
||||
</prop>
|
||||
</node>
|
||||
<node oor:name=".uno:AlignOnPage" oor:op="replace">
|
||||
<prop oor:name="Label" oor:type="xs:string">
|
||||
<value xml:lang="en-US">~Center on Page</value>
|
||||
</prop>
|
||||
<prop oor:name="TooltipLabel" oor:type="xs:string">
|
||||
<value xml:lang="en-US">Center object vertically and horizontally</value>
|
||||
</prop>
|
||||
<prop oor:name="Properties" oor:type="xs:int">
|
||||
<value>1</value>
|
||||
</prop>
|
||||
</node>
|
||||
<node oor:name=".uno:AlignOnSlide" oor:op="replace">
|
||||
<prop oor:name="Label" oor:type="xs:string">
|
||||
<value xml:lang="en-US">~Center on Slide</value>
|
||||
</prop>
|
||||
<prop oor:name="TooltipLabel" oor:type="xs:string">
|
||||
<value xml:lang="en-US">Center object vertically and horizontally</value>
|
||||
</prop>
|
||||
<prop oor:name="TargetURL" oor:type="xs:string">
|
||||
<value>.uno:AlignOnPage</value>
|
||||
</prop>
|
||||
</node>
|
||||
</node>
|
||||
<node oor:name="Popups">
|
||||
<node oor:name=".uno:ModifyMenu" oor:op="replace">
|
||||
|
|
|
@ -2633,7 +2633,7 @@ bit 3 (0x8): #define UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8
|
|||
</node>
|
||||
<node oor:name=".uno:AlignMiddle" oor:op="replace">
|
||||
<prop oor:name="Label" oor:type="xs:string">
|
||||
<value xml:lang="en-US">C~enter</value>
|
||||
<value xml:lang="en-US">~Middle</value>
|
||||
</prop>
|
||||
<prop oor:name="Properties" oor:type="xs:int">
|
||||
<value>1</value>
|
||||
|
|
|
@ -451,5 +451,6 @@
|
|||
#define SID_HIDE_LAST_LEVEL (SID_SD_START+448)
|
||||
#define SID_SHOW_NEXT_LEVEL (SID_SD_START+449)
|
||||
#define SID_PRESENTATION_MINIMIZER (SID_SD_START+450)
|
||||
#define SID_ALIGN_PAGE (SID_SD_START+451)
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
|
|
@ -2977,4 +2977,9 @@ interface DrawView
|
|||
ExecMethod = FuTemporary;
|
||||
StateMethod = GetAttrState;
|
||||
]
|
||||
SID_ALIGN_PAGE
|
||||
[
|
||||
ExecMethod = FuTemporary ;
|
||||
StateMethod = GetMenuState;
|
||||
]
|
||||
}
|
||||
|
|
|
@ -4720,3 +4720,19 @@ SfxBoolItem UnderlineDotted SID_ULINE_VAL_DOTTED
|
|||
ToolBoxConfig = TRUE,
|
||||
GroupId = SfxGroupId::Format;
|
||||
]
|
||||
|
||||
SfxVoidItem AlignOnPage SID_ALIGN_PAGE
|
||||
[
|
||||
AutoUpdate = TRUE,
|
||||
FastCall = FALSE,
|
||||
ReadOnlyDoc = FALSE,
|
||||
Toggle = FALSE,
|
||||
Container = FALSE,
|
||||
RecordAbsolute = FALSE,
|
||||
RecordPerSet;
|
||||
|
||||
AccelConfig = TRUE,
|
||||
MenuConfig = TRUE,
|
||||
ToolBoxConfig = TRUE,
|
||||
GroupId = SfxGroupId::Modify;
|
||||
]
|
||||
|
|
|
@ -3139,6 +3139,14 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
|
|||
}
|
||||
break;
|
||||
|
||||
case SID_ALIGN_PAGE:
|
||||
{
|
||||
mpDrawView->AlignMarkedObjects(SdrHorAlign::Center, SdrVertAlign::Center);
|
||||
Cancel();
|
||||
rReq.Done ();
|
||||
}
|
||||
break;
|
||||
|
||||
case SID_OBJECT_ALIGN_DOWN: // BASIC
|
||||
{
|
||||
mpDrawView->AlignMarkedObjects(SdrHorAlign::NONE, SdrVertAlign::Bottom);
|
||||
|
|
|
@ -1337,6 +1337,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
|
|||
rSet.ClearItem(SID_3D_WIN);
|
||||
|
||||
rSet.DisableItem(SID_OBJECT_ALIGN);
|
||||
rSet.DisableItem(SID_ALIGN_PAGE);
|
||||
rSet.DisableItem(SID_ZOOM_TOOLBOX);
|
||||
rSet.DisableItem(SID_OBJECT_CHOOSE_MODE);
|
||||
rSet.DisableItem(SID_DRAWTBX_TEXT);
|
||||
|
|
|
@ -15,4 +15,6 @@
|
|||
<menu:menuitem menu:id=".uno:AlignUp"/>
|
||||
<menu:menuitem menu:id=".uno:AlignMiddle"/>
|
||||
<menu:menuitem menu:id=".uno:AlignDown"/>
|
||||
<menu:menuseparator/>
|
||||
<menu:menuitem menu:id=".uno:AlignOnPage"/>
|
||||
</menu:menupopup>
|
||||
|
|
|
@ -25,4 +25,5 @@
|
|||
<toolbar:toolbaritem xlink:href=".uno:AlignUp"/>
|
||||
<toolbar:toolbaritem xlink:href=".uno:AlignMiddle"/>
|
||||
<toolbar:toolbaritem xlink:href=".uno:AlignDown"/>
|
||||
<toolbar:toolbaritem xlink:href=".uno:AlignOnPage"/>
|
||||
</toolbar:toolbar>
|
|
@ -29,6 +29,7 @@
|
|||
<toolbar:toolbaritem xlink:href=".uno:AlignUp" toolbar:visible="false"/>
|
||||
<toolbar:toolbaritem xlink:href=".uno:AlignMiddle" toolbar:visible="false"/>
|
||||
<toolbar:toolbaritem xlink:href=".uno:AlignDown" toolbar:visible="false"/>
|
||||
<toolbar:toolbaritem xlink:href=".uno:AlignOnPage" toolbar:visible="false"/>
|
||||
<toolbar:toolbarseparator/>
|
||||
<toolbar:toolbaritem xlink:href=".uno:ObjectPosition" toolbar:visible="false"/>
|
||||
<toolbar:toolbarseparator/>
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
<toolbar:toolbaritem xlink:href=".uno:AlignUp" toolbar:visible="false"/>
|
||||
<toolbar:toolbaritem xlink:href=".uno:AlignMiddle" toolbar:visible="false"/>
|
||||
<toolbar:toolbaritem xlink:href=".uno:AlignDown" toolbar:visible="false"/>
|
||||
<toolbar:toolbaritem xlink:href=".uno:AlignOnPage" toolbar:visible="false"/>
|
||||
<toolbar:toolbarseparator/>
|
||||
<toolbar:toolbaritem xlink:href=".uno:ObjectPosition" toolbar:visible="false"/>
|
||||
<toolbar:toolbarseparator/>
|
||||
|
|
|
@ -15,4 +15,6 @@
|
|||
<menu:menuitem menu:id=".uno:AlignUp"/>
|
||||
<menu:menuitem menu:id=".uno:AlignMiddle"/>
|
||||
<menu:menuitem menu:id=".uno:AlignDown"/>
|
||||
<menu:menuseparator/>
|
||||
<menu:menuitem menu:id=".uno:AlignOnSlide"/>
|
||||
</menu:menupopup>
|
||||
|
|
|
@ -25,4 +25,5 @@
|
|||
<toolbar:toolbaritem xlink:href=".uno:AlignUp"/>
|
||||
<toolbar:toolbaritem xlink:href=".uno:AlignMiddle"/>
|
||||
<toolbar:toolbaritem xlink:href=".uno:AlignDown"/>
|
||||
<toolbar:toolbaritem xlink:href=".uno:AlignOnSlide"/>
|
||||
</toolbar:toolbar>
|
|
@ -29,6 +29,7 @@
|
|||
<toolbar:toolbaritem xlink:href=".uno:AlignUp" toolbar:visible="false"/>
|
||||
<toolbar:toolbaritem xlink:href=".uno:AlignMiddle" toolbar:visible="false"/>
|
||||
<toolbar:toolbaritem xlink:href=".uno:AlignDown" toolbar:visible="false"/>
|
||||
<toolbar:toolbaritem xlink:href=".uno:AlignOnSlide" toolbar:visible="false"/>
|
||||
<toolbar:toolbarseparator/>
|
||||
<toolbar:toolbaritem xlink:href=".uno:ObjectPosition" toolbar:visible="false"/>
|
||||
<toolbar:toolbarseparator/>
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
<toolbar:toolbaritem xlink:href=".uno:AlignUp" toolbar:visible="false"/>
|
||||
<toolbar:toolbaritem xlink:href=".uno:AlignMiddle" toolbar:visible="false"/>
|
||||
<toolbar:toolbaritem xlink:href=".uno:AlignDown" toolbar:visible="false"/>
|
||||
<toolbar:toolbaritem xlink:href=".uno:AlignOnSlide" toolbar:visible="false"/>
|
||||
<toolbar:toolbarseparator/>
|
||||
<toolbar:toolbaritem xlink:href=".uno:ObjectPosition" toolbar:visible="false"/>
|
||||
<toolbar:toolbarseparator/>
|
||||
|
|
Loading…
Reference in a new issue