summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPranam Lashkari <lpranam@collabora.com>2020-03-28 06:02:05 +0530
committerAndras Timar <andras.timar@collabora.com>2020-03-30 18:44:49 +0200
commit287a4aaa7544cf8973a397db49131b8bc94faee2 (patch)
treed37fac3e231ce20fb67574900cc65c175bd847f7
parent204df13a29a9742e2c1a5c5d4e18a63e7616a347 (diff)
use "To Background" and "To Foreground" only in writer sidebar
Change-Id: Ib7ccac192721b663c9655417fc3d639766d0424d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91267 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--svx/source/sidebar/possize/PosSizePropertyPanel.cxx7
-rw-r--r--svx/source/sidebar/possize/PosSizePropertyPanel.hxx3
-rw-r--r--svx/uiconfig/ui/sidebarpossize.ui25
3 files changed, 33 insertions, 2 deletions
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 5af69633c30b..85bb026006a8 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -101,6 +101,7 @@ PosSizePropertyPanel::PosSizePropertyPanel(
get( mpFtFlip, "fliplabel" );
get( mpFlipTbx, "selectrotationtype" );
get( mpBtnEditChart, "btnEditChart" );
+ get( mpTBxArrange, "shaperespectedtotext");
Initialize();
mpBindings->Update( SID_ATTR_METRIC );
@@ -131,6 +132,7 @@ void PosSizePropertyPanel::dispose()
mpFtFlip.clear();
mpFlipTbx.clear();
mpBtnEditChart.clear();
+ mpTBxArrange.clear();
maTransfPosXControl.dispose();
maTransfPosYControl.dispose();
@@ -268,12 +270,14 @@ void PosSizePropertyPanel::HandleContextChange(
bool bShowAngle = false;
bool bShowFlip = false;
bool bShowEditChart = false;
+ bool bShowArrangeShape = false;
switch (maContext.GetCombinedContext_DI())
{
case CombinedEnumContext(Application::WriterVariants, Context::Draw):
bShowAngle = true;
bShowFlip = true;
+ bShowArrangeShape = true;
break;
case CombinedEnumContext(Application::WriterVariants, Context::Graphic):
@@ -333,6 +337,9 @@ void PosSizePropertyPanel::HandleContextChange(
// Edit Chart
mpBtnEditChart->Show(bShowEditChart);
+ // Arrange with respect to text
+ mpTBxArrange->Show(bShowArrangeShape);
+
if (mxSidebar.is())
mxSidebar->requestLayout();
}
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
index 8947f0f14a0f..74ac3fd8b88d 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
@@ -112,6 +112,9 @@ private:
//edit charts button for online's mobile view
VclPtr<PushButton> mpBtnEditChart;
+ // Arrange with respect to text
+ VclPtr<ToolBox> mpTBxArrange;
+
// Internal variables
basegfx::B2DRange maRect;
basegfx::B2DRange maWorkArea;
diff --git a/svx/uiconfig/ui/sidebarpossize.ui b/svx/uiconfig/ui/sidebarpossize.ui
index 727c90c62580..5a5fc9a00a6c 100644
--- a/svx/uiconfig/ui/sidebarpossize.ui
+++ b/svx/uiconfig/ui/sidebarpossize.ui
@@ -419,6 +419,27 @@
<property name="homogeneous">True</property>
</packing>
</child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="sfxlo-SidebarToolBox" id="shaperespectedtotext">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes" context="sidebarpossize|arrangetoolbar">Arrange</property>
+ <property name="halign">end</property>
+ <property name="show_arrow">False</property>
+ <child>
+ <object class="GtkSeparatorToolItem">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
<child>
<object class="GtkToolButton" id="tobackground">
<property name="visible">True</property>
@@ -446,8 +467,8 @@
</object>
<packing>
<property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
</packing>
</child>
</object>