summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreas kainz <kainz.a@gmail.com>2020-10-02 13:24:17 +0200
committerAndreas Kainz <kainz.a@gmail.com>2020-10-19 13:06:01 +0200
commit55281fe6d3cda23d37b0b0c368786c9fc4c5abe9 (patch)
tree663de5f00969585fa42b8caaed2f74b147d2ed59
parent657ea0d1250624312e104f9acfb6a04a3ba4cce3 (diff)
tdf#136073 combine glow and softedge sidebar section
Change-Id: I19381009f5b286b051ae0cb90a794ed51a413a7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103835 Tested-by: Jenkins Reviewed-by: Andreas Kainz <kainz.a@gmail.com>
-rw-r--r--compilerplugins/clang/unusedfields.writeonly.results14
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu34
-rw-r--r--svx/Library_svx.mk3
-rw-r--r--svx/UIConfig_svx.mk3
-rw-r--r--svx/source/sidebar/PanelFactory.cxx11
-rw-r--r--svx/source/sidebar/effect/EffectPropertyPanel.cxx (renamed from svx/source/sidebar/glow/GlowPropertyPanel.cxx)87
-rw-r--r--svx/source/sidebar/effect/EffectPropertyPanel.hxx (renamed from svx/source/sidebar/glow/GlowPropertyPanel.hxx)23
-rw-r--r--svx/source/sidebar/softedge/SoftEdgePropertyPanel.cxx96
-rw-r--r--svx/source/sidebar/softedge/SoftEdgePropertyPanel.hxx56
-rw-r--r--svx/uiconfig/ui/sidebareffect.ui240
-rw-r--r--svx/uiconfig/ui/sidebarglow.ui141
-rw-r--r--svx/uiconfig/ui/sidebarsoftedge.ui83
12 files changed, 327 insertions, 464 deletions
diff --git a/compilerplugins/clang/unusedfields.writeonly.results b/compilerplugins/clang/unusedfields.writeonly.results
index aa90dcb507b2..5860beec983e 100644
--- a/compilerplugins/clang/unusedfields.writeonly.results
+++ b/compilerplugins/clang/unusedfields.writeonly.results
@@ -770,12 +770,12 @@ svx/source/sdr/attribute/sdrtextattribute.cxx:49
drawinglayer::attribute::ImpSdrTextAttribute maPropertiesVersion sal_uInt32
svx/source/sdr/attribute/sdrtextattribute.cxx:63
drawinglayer::attribute::ImpSdrTextAttribute mbWrongSpell _Bool
-svx/source/sidebar/glow/GlowPropertyPanel.hxx:40
- svx::sidebar::GlowPropertyPanel maGlowColorController sfx2::sidebar::ControllerItem
-svx/source/sidebar/glow/GlowPropertyPanel.hxx:41
+svx/source/sidebar/effect/EffectPropertyPanel.hxx:40
+ svx::sidebar::EffectPropertyPanel maGlowColorController sfx2::sidebar::ControllerItem
+svx/source/sidebar/effect/EffectPropertyPanel.hxx:41
svx::sidebar::GlowPropertyPanel maGlowRadiusController sfx2::sidebar::ControllerItem
-svx/source/sidebar/glow/GlowPropertyPanel.hxx:42
- svx::sidebar::GlowPropertyPanel maGlowTransparencyController sfx2::sidebar::ControllerItem
+svx/source/sidebar/effect/EffectPropertyPanel.hxx:42
+ svx::sidebar::EffectPropertyPanel maGlowTransparencyController sfx2::sidebar::ControllerItem
svx/source/sidebar/line/LinePropertyPanel.hxx:83
svx::sidebar::LinePropertyPanel maStyleControl sfx2::sidebar::ControllerItem
svx/source/sidebar/line/LinePropertyPanel.hxx:84
@@ -816,8 +816,8 @@ svx/source/sidebar/possize/PosSizePropertyPanel.hxx:117
svx::sidebar::PosSizePropertyPanel mxAlignDispatch std::unique_ptr<ToolbarUnoDispatcher>
svx/source/sidebar/possize/PosSizePropertyPanel.hxx:119
svx::sidebar::PosSizePropertyPanel mxAlignDispatch2 std::unique_ptr<ToolbarUnoDispatcher>
-svx/source/sidebar/softedge/SoftEdgePropertyPanel.hxx:41
- svx::sidebar::SoftEdgePropertyPanel maSoftEdgeRadiusController sfx2::sidebar::ControllerItem
+svx/source/sidebar/effect/EffectPropertyPanel.hxx:41
+ svx::sidebar::EffectPropertyPanel maSoftEdgeRadiusController sfx2::sidebar::ControllerItem
svx/source/sidebar/styles/StylesPropertyPanel.hxx:13
svx::sidebar::StylesPropertyPanel m_xFontStyleDispatch std::unique_ptr<ToolbarUnoDispatcher>
svx/source/sidebar/styles/StylesPropertyPanel.hxx:16
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index 7deb82a87d4b..75a3a07eb1e3 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -589,12 +589,12 @@
</prop>
</node>
- <node oor:name="GlowPropertyPanel" oor:op="replace">
+ <node oor:name="EffectPropertyPanel" oor:op="replace">
<prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">Glow</value>
+ <value xml:lang="en-US">Effect</value>
</prop>
<prop oor:name="Id" oor:type="xs:string">
- <value>GlowPropertyPanel</value>
+ <value>EffectPropertyPanel</value>
</prop>
<prop oor:name="DeckId" oor:type="xs:string">
<value>PropertyDeck</value>
@@ -608,33 +608,7 @@
</value>
</prop>
<prop oor:name="ImplementationURL" oor:type="xs:string">
- <value>private:resource/toolpanel/SvxPanelFactory/GlowPropertyPanel</value>
- </prop>
- <prop oor:name="OrderIndex" oor:type="xs:int">
- <value>300</value>
- </prop>
- </node>
-
- <node oor:name="SoftEdgePropertyPanel" oor:op="replace">
- <prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">Soft Edge</value>
- </prop>
- <prop oor:name="Id" oor:type="xs:string">
- <value>SoftEdgePropertyPanel</value>
- </prop>
- <prop oor:name="DeckId" oor:type="xs:string">
- <value>PropertyDeck</value>
- </prop>
- <prop oor:name="ContextList">
- <value oor:separator=";">
- Calc, Draw, hidden ;
- DrawImpress, Draw, hidden ;
- DrawImpress, Graphic, hidden ;
- WriterVariants, Draw, hidden ;
- </value>
- </prop>
- <prop oor:name="ImplementationURL" oor:type="xs:string">
- <value>private:resource/toolpanel/SvxPanelFactory/SoftEdgePropertyPanel</value>
+ <value>private:resource/toolpanel/SvxPanelFactory/EffectPropertyPanel</value>
</prop>
<prop oor:name="OrderIndex" oor:type="xs:int">
<value>300</value>
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index 424361233542..f7b947934546 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -199,8 +199,7 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
svx/source/sidebar/area/AreaPropertyPanel \
svx/source/sidebar/area/AreaPropertyPanelBase \
svx/source/sidebar/area/AreaTransparencyGradientPopup \
- svx/source/sidebar/glow/GlowPropertyPanel \
- svx/source/sidebar/softedge/SoftEdgePropertyPanel \
+ svx/source/sidebar/effect/EffectPropertyPanel \
svx/source/sidebar/shadow/ShadowPropertyPanel \
svx/source/sidebar/graphic/GraphicPropertyPanel \
svx/source/sidebar/line/LinePropertyPanel \
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index a55e41358f00..b8e18d763c1f 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -123,9 +123,8 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/selectionmenu \
svx/uiconfig/ui/sidebararea \
svx/uiconfig/ui/sidebarempty \
- svx/uiconfig/ui/sidebarglow \
+ svx/uiconfig/ui/sidebareffect \
svx/uiconfig/ui/sidebarshadow \
- svx/uiconfig/ui/sidebarsoftedge \
svx/uiconfig/ui/sidebargallery \
svx/uiconfig/ui/sidebargraphic \
svx/uiconfig/ui/sidebarline \
diff --git a/svx/source/sidebar/PanelFactory.cxx b/svx/source/sidebar/PanelFactory.cxx
index 8f5c4d8ec4ea..1b93e207afda 100644
--- a/svx/source/sidebar/PanelFactory.cxx
+++ b/svx/source/sidebar/PanelFactory.cxx
@@ -24,9 +24,8 @@
#include "paragraph/ParaPropertyPanel.hxx"
#include "lists/ListsPropertyPanel.hxx"
#include "area/AreaPropertyPanel.hxx"
-#include "glow/GlowPropertyPanel.hxx"
#include "shadow/ShadowPropertyPanel.hxx"
-#include "softedge/SoftEdgePropertyPanel.hxx"
+#include "effect/EffectPropertyPanel.hxx"
#include "graphic/GraphicPropertyPanel.hxx"
#include "line/LinePropertyPanel.hxx"
#include "possize/PosSizePropertyPanel.hxx"
@@ -141,17 +140,13 @@ Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement (
{
pControl = AreaPropertyPanel::Create(pParentWindow, xFrame, pBindings);
}
- else if (rsResourceURL.endsWith("/GlowPropertyPanel"))
- {
- pControl = GlowPropertyPanel::Create(pParentWindow, xFrame, pBindings);
- }
else if (rsResourceURL.endsWith("/ShadowPropertyPanel"))
{
pControl = ShadowPropertyPanel::Create(pParentWindow, xFrame, pBindings);
}
- else if (rsResourceURL.endsWith("/SoftEdgePropertyPanel"))
+ else if (rsResourceURL.endsWith("/EffectPropertyPanel"))
{
- pControl = SoftEdgePropertyPanel::Create(pParentWindow, xFrame, pBindings);
+ pControl = EffectPropertyPanel::Create(pParentWindow, xFrame, pBindings);
}
else if (rsResourceURL.endsWith("/GraphicPropertyPanel"))
{
diff --git a/svx/source/sidebar/glow/GlowPropertyPanel.cxx b/svx/source/sidebar/effect/EffectPropertyPanel.cxx
index acb63e090acc..6e0ade4095cd 100644
--- a/svx/source/sidebar/glow/GlowPropertyPanel.cxx
+++ b/svx/source/sidebar/effect/EffectPropertyPanel.cxx
@@ -9,7 +9,7 @@
#include <sal/config.h>
-#include "GlowPropertyPanel.hxx"
+#include "EffectPropertyPanel.hxx"
#include <sfx2/dispatch.hxx>
#include <svx/colorbox.hxx>
@@ -23,63 +23,78 @@
namespace svx::sidebar
{
-GlowPropertyPanel::GlowPropertyPanel(vcl::Window* pParent,
- const css::uno::Reference<css::frame::XFrame>& rxFrame,
- SfxBindings* pBindings)
- : PanelLayout(pParent, "GlowPropertyPanel", "svx/ui/sidebarglow.ui", rxFrame)
+EffectPropertyPanel::EffectPropertyPanel(vcl::Window* pParent,
+ const css::uno::Reference<css::frame::XFrame>& rxFrame,
+ SfxBindings* pBindings)
+ : PanelLayout(pParent, "EffectPropertyPanel", "svx/ui/sidebareffect.ui", rxFrame)
, maGlowColorController(SID_ATTR_GLOW_COLOR, *pBindings, *this)
, maGlowRadiusController(SID_ATTR_GLOW_RADIUS, *pBindings, *this)
, maGlowTransparencyController(SID_ATTR_GLOW_TRANSPARENCY, *pBindings, *this)
+ , mxFTTransparency(m_xBuilder->weld_label("transparency"))
+ , maSoftEdgeRadiusController(SID_ATTR_SOFTEDGE_RADIUS, *pBindings, *this)
, mpBindings(pBindings)
, mxGlowRadius(m_xBuilder->weld_metric_spin_button("LB_GLOW_RADIUS", FieldUnit::POINT))
, mxLBGlowColor(new ColorListBox(m_xBuilder->weld_menu_button("LB_GLOW_COLOR"), GetFrameWeld()))
, mxGlowTransparency(
m_xBuilder->weld_metric_spin_button("LB_GLOW_TRANSPARENCY", FieldUnit::PERCENT))
- , mxFTRadius(m_xBuilder->weld_label("radius"))
+ , mxFTRadiusSoftEdge(m_xBuilder->weld_label("radiussoftedge"))
+ , mxFTRadiusGlow(m_xBuilder->weld_label("radiusglow"))
, mxFTColor(m_xBuilder->weld_label("color"))
- , mxFTTransparency(m_xBuilder->weld_label("transparency"))
+ , mxSoftEdgeRadius(m_xBuilder->weld_metric_spin_button("SB_SOFTEDGE_RADIUS", FieldUnit::POINT))
{
Initialize();
}
-GlowPropertyPanel::~GlowPropertyPanel() { disposeOnce(); }
+EffectPropertyPanel::~EffectPropertyPanel() { disposeOnce(); }
-void GlowPropertyPanel::dispose()
+void EffectPropertyPanel::dispose()
{
- mxFTRadius.reset();
mxGlowRadius.reset();
- mxFTColor.reset();
mxLBGlowColor.reset();
- mxFTTransparency.reset();
mxGlowTransparency.reset();
+ mxFTRadiusSoftEdge.reset();
+ mxFTColor.reset();
+ mxFTTransparency.reset();
+ mxSoftEdgeRadius.reset();
+ mxFTRadiusGlow.reset();
+ PanelLayout::dispose();
maGlowColorController.dispose();
maGlowRadiusController.dispose();
maGlowTransparencyController.dispose();
- PanelLayout::dispose();
+ maSoftEdgeRadiusController.dispose();
}
-void GlowPropertyPanel::Initialize()
+void EffectPropertyPanel::Initialize()
{
- mxLBGlowColor->SetSelectHdl(LINK(this, GlowPropertyPanel, ModifyGlowColorHdl));
- mxGlowRadius->connect_value_changed(LINK(this, GlowPropertyPanel, ModifyGlowRadiusHdl));
+ mxGlowRadius->connect_value_changed(LINK(this, EffectPropertyPanel, ModifyGlowRadiusHdl));
+ mxLBGlowColor->SetSelectHdl(LINK(this, EffectPropertyPanel, ModifyGlowColorHdl));
mxGlowTransparency->connect_value_changed(
- LINK(this, GlowPropertyPanel, ModifyGlowTransparencyHdl));
+ LINK(this, EffectPropertyPanel, ModifyGlowTransparencyHdl));
+ mxSoftEdgeRadius->connect_value_changed(
+ LINK(this, EffectPropertyPanel, ModifySoftEdgeRadiusHdl));
+}
+
+IMPL_LINK_NOARG(EffectPropertyPanel, ModifySoftEdgeRadiusHdl, weld::MetricSpinButton&, void)
+{
+ SdrMetricItem aItem(SDRATTR_SOFTEDGE_RADIUS, mxSoftEdgeRadius->get_value(FieldUnit::MM_100TH));
+ mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_SOFTEDGE_RADIUS, SfxCallMode::RECORD,
+ { &aItem });
}
-IMPL_LINK_NOARG(GlowPropertyPanel, ModifyGlowColorHdl, ColorListBox&, void)
+IMPL_LINK_NOARG(EffectPropertyPanel, ModifyGlowColorHdl, ColorListBox&, void)
{
XColorItem aItem(SDRATTR_GLOW_COLOR, mxLBGlowColor->GetSelectEntryColor());
mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_GLOW_COLOR, SfxCallMode::RECORD, { &aItem });
}
-IMPL_LINK_NOARG(GlowPropertyPanel, ModifyGlowRadiusHdl, weld::MetricSpinButton&, void)
+IMPL_LINK_NOARG(EffectPropertyPanel, ModifyGlowRadiusHdl, weld::MetricSpinButton&, void)
{
SdrMetricItem aItem(SDRATTR_GLOW_RADIUS, mxGlowRadius->get_value(FieldUnit::MM_100TH));
mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_GLOW_RADIUS, SfxCallMode::RECORD, { &aItem });
}
-IMPL_LINK_NOARG(GlowPropertyPanel, ModifyGlowTransparencyHdl, weld::MetricSpinButton&, void)
+IMPL_LINK_NOARG(EffectPropertyPanel, ModifyGlowTransparencyHdl, weld::MetricSpinButton&, void)
{
SdrPercentItem aItem(SDRATTR_GLOW_TRANSPARENCY,
mxGlowTransparency->get_value(FieldUnit::PERCENT));
@@ -87,7 +102,7 @@ IMPL_LINK_NOARG(GlowPropertyPanel, ModifyGlowTransparencyHdl, weld::MetricSpinBu
{ &aItem });
}
-void GlowPropertyPanel::UpdateControls()
+void EffectPropertyPanel::UpdateControls()
{
const bool bEnabled = mxGlowRadius->get_value(FieldUnit::MM_100TH) != 0;
mxLBGlowColor->set_sensitive(bEnabled);
@@ -96,11 +111,23 @@ void GlowPropertyPanel::UpdateControls()
mxFTTransparency->set_sensitive(bEnabled);
}
-void GlowPropertyPanel::NotifyItemUpdate(sal_uInt16 nSID, SfxItemState eState,
- const SfxPoolItem* pState)
+void EffectPropertyPanel::NotifyItemUpdate(sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState)
{
switch (nSID)
{
+ case SID_ATTR_SOFTEDGE_RADIUS:
+ {
+ if (eState >= SfxItemState::DEFAULT)
+ {
+ const SdrMetricItem* pRadiusItem = dynamic_cast<const SdrMetricItem*>(pState);
+ if (pRadiusItem)
+ {
+ mxSoftEdgeRadius->set_value(pRadiusItem->GetValue(), FieldUnit::MM_100TH);
+ }
+ }
+ }
+ break;
case SID_ATTR_GLOW_COLOR:
{
if (eState >= SfxItemState::DEFAULT)
@@ -141,21 +168,21 @@ void GlowPropertyPanel::NotifyItemUpdate(sal_uInt16 nSID, SfxItemState eState,
}
VclPtr<vcl::Window>
-GlowPropertyPanel::Create(vcl::Window* pParent,
- const css::uno::Reference<css::frame::XFrame>& rxFrame,
- SfxBindings* pBindings)
+EffectPropertyPanel::Create(vcl::Window* pParent,
+ const css::uno::Reference<css::frame::XFrame>& rxFrame,
+ SfxBindings* pBindings)
{
if (pParent == nullptr)
throw css::lang::IllegalArgumentException(
- "no parent Window given to GlowPropertyPanel::Create", nullptr, 0);
+ "no parent Window given to EffectPropertyPanel::Create", nullptr, 0);
if (!rxFrame.is())
- throw css::lang::IllegalArgumentException("no XFrame given to GlowPropertyPanel::Create",
+ throw css::lang::IllegalArgumentException("no XFrame given to EffectPropertyPanel::Create",
nullptr, 1);
if (pBindings == nullptr)
throw css::lang::IllegalArgumentException(
- "no SfxBindings given to GlowPropertyPanel::Create", nullptr, 2);
+ "no SfxBindings given to EffectPropertyPanel::Create", nullptr, 2);
- return VclPtr<GlowPropertyPanel>::Create(pParent, rxFrame, pBindings);
+ return VclPtr<EffectPropertyPanel>::Create(pParent, rxFrame, pBindings);
}
}
diff --git a/svx/source/sidebar/glow/GlowPropertyPanel.hxx b/svx/source/sidebar/effect/EffectPropertyPanel.hxx
index aaffa44e4b20..771c642f99a2 100644
--- a/svx/source/sidebar/glow/GlowPropertyPanel.hxx
+++ b/svx/source/sidebar/effect/EffectPropertyPanel.hxx
@@ -6,8 +6,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef INCLUDED_SVX_SOURCE_SIDEBAR_GLOW_GLOWPROPERTYPANEL_HXX
-#define INCLUDED_SVX_SOURCE_SIDEBAR_GLOW_GLOWPROPERTYPANEL_HXX
+#ifndef INCLUDED_SVX_SOURCE_SIDEBAR_EFFECT_EFFECTPROPERTYPANEL_HXX
+#define INCLUDED_SVX_SOURCE_SIDEBAR_EFFECT_EFFECTPROPERTYPANEL_HXX
#include <vcl/vclptr.hxx>
#include <sfx2/sidebar/ControllerItem.hxx>
@@ -17,13 +17,14 @@ class ColorListBox;
namespace svx::sidebar
{
-class GlowPropertyPanel : public PanelLayout,
- public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
+class EffectPropertyPanel : public PanelLayout,
+ public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
{
public:
- GlowPropertyPanel(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame,
- SfxBindings* pBindings);
- virtual ~GlowPropertyPanel() override;
+ EffectPropertyPanel(vcl::Window* pParent,
+ const css::uno::Reference<css::frame::XFrame>& rxFrame,
+ SfxBindings* pBindings);
+ virtual ~EffectPropertyPanel() override;
virtual void dispose() override;
static VclPtr<vcl::Window> Create(vcl::Window* pParent,
@@ -40,15 +41,18 @@ private:
sfx2::sidebar::ControllerItem maGlowColorController;
sfx2::sidebar::ControllerItem maGlowRadiusController;
sfx2::sidebar::ControllerItem maGlowTransparencyController;
+ std::unique_ptr<weld::Label> mxFTTransparency;
+ sfx2::sidebar::ControllerItem maSoftEdgeRadiusController;
SfxBindings* mpBindings;
std::unique_ptr<weld::MetricSpinButton> mxGlowRadius;
std::unique_ptr<ColorListBox> mxLBGlowColor;
std::unique_ptr<weld::MetricSpinButton> mxGlowTransparency;
- std::unique_ptr<weld::Label> mxFTRadius;
+ std::unique_ptr<weld::Label> mxFTRadiusSoftEdge;
+ std::unique_ptr<weld::Label> mxFTRadiusGlow;
std::unique_ptr<weld::Label> mxFTColor;
- std::unique_ptr<weld::Label> mxFTTransparency;
+ std::unique_ptr<weld::MetricSpinButton> mxSoftEdgeRadius;
void Initialize();
void UpdateControls();
@@ -56,6 +60,7 @@ private:
DECL_LINK(ModifyGlowColorHdl, ColorListBox&, void);
DECL_LINK(ModifyGlowRadiusHdl, weld::MetricSpinButton&, void);
DECL_LINK(ModifyGlowTransparencyHdl, weld::MetricSpinButton&, void);
+ DECL_LINK(ModifySoftEdgeRadiusHdl, weld::MetricSpinButton&, void);
};
}
diff --git a/svx/source/sidebar/softedge/SoftEdgePropertyPanel.cxx b/svx/source/sidebar/softedge/SoftEdgePropertyPanel.cxx
deleted file mode 100644
index 35511498fe44..000000000000
--- a/svx/source/sidebar/softedge/SoftEdgePropertyPanel.cxx
+++ /dev/null
@@ -1,96 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#include <sal/config.h>
-
-#include "SoftEdgePropertyPanel.hxx"
-
-#include <sfx2/dispatch.hxx>
-#include <svx/sdmetitm.hxx>
-#include <svx/svddef.hxx>
-#include <svx/svxids.hrc>
-#include <svx/xcolit.hxx>
-
-namespace svx::sidebar
-{
-SoftEdgePropertyPanel::SoftEdgePropertyPanel(vcl::Window* pParent,
- const css::uno::Reference<css::frame::XFrame>& rxFrame,
- SfxBindings* pBindings)
- : PanelLayout(pParent, "SoftEdgePropertyPanel", "svx/ui/sidebarsoftedge.ui", rxFrame)
- , maSoftEdgeRadiusController(SID_ATTR_SOFTEDGE_RADIUS, *pBindings, *this)
- , mpBindings(pBindings)
- , mxSoftEdgeRadius(m_xBuilder->weld_metric_spin_button("SB_SOFTEDGE_RADIUS", FieldUnit::POINT))
- , mxFTRadius(m_xBuilder->weld_label("radius"))
-{
- Initialize();
-}
-
-SoftEdgePropertyPanel::~SoftEdgePropertyPanel() { disposeOnce(); }
-
-void SoftEdgePropertyPanel::dispose()
-{
- mxFTRadius.reset();
- mxSoftEdgeRadius.reset();
- maSoftEdgeRadiusController.dispose();
- PanelLayout::dispose();
-}
-
-void SoftEdgePropertyPanel::Initialize()
-{
- mxSoftEdgeRadius->connect_value_changed(
- LINK(this, SoftEdgePropertyPanel, ModifySoftEdgeRadiusHdl));
-}
-
-IMPL_LINK_NOARG(SoftEdgePropertyPanel, ModifySoftEdgeRadiusHdl, weld::MetricSpinButton&, void)
-{
- SdrMetricItem aItem(SDRATTR_SOFTEDGE_RADIUS, mxSoftEdgeRadius->get_value(FieldUnit::MM_100TH));
- mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_SOFTEDGE_RADIUS, SfxCallMode::RECORD,
- { &aItem });
-}
-
-void SoftEdgePropertyPanel::NotifyItemUpdate(sal_uInt16 nSID, SfxItemState eState,
- const SfxPoolItem* pState)
-{
- switch (nSID)
- {
- case SID_ATTR_SOFTEDGE_RADIUS:
- {
- if (eState >= SfxItemState::DEFAULT)
- {
- const SdrMetricItem* pRadiusItem = dynamic_cast<const SdrMetricItem*>(pState);
- if (pRadiusItem)
- {
- mxSoftEdgeRadius->set_value(pRadiusItem->GetValue(), FieldUnit::MM_100TH);
- }
- }
- }
- break;
- }
-}
-
-VclPtr<vcl::Window>
-SoftEdgePropertyPanel::Create(vcl::Window* pParent,
- const css::uno::Reference<css::frame::XFrame>& rxFrame,
- SfxBindings* pBindings)
-{
- if (pParent == nullptr)
- throw css::lang::IllegalArgumentException(
- "no parent Window given to SoftEdgePropertyPanel::Create", nullptr, 0);
- if (!rxFrame.is())
- throw css::lang::IllegalArgumentException(
- "no XFrame given to SoftEdgePropertyPanel::Create", nullptr, 1);
- if (pBindings == nullptr)
- throw css::lang::IllegalArgumentException(
- "no SfxBindings given to SoftEdgePropertyPanel::Create", nullptr, 2);
-
- return VclPtr<SoftEdgePropertyPanel>::Create(pParent, rxFrame, pBindings);
-}
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sidebar/softedge/SoftEdgePropertyPanel.hxx b/svx/source/sidebar/softedge/SoftEdgePropertyPanel.hxx
deleted file mode 100644
index c7f3b698c0fb..000000000000
--- a/svx/source/sidebar/softedge/SoftEdgePropertyPanel.hxx
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-#ifndef INCLUDED_SVX_SOURCE_SIDEBAR_SOFTEDGE_SOFTEDGEPROPERTYPANEL_HXX
-#define INCLUDED_SVX_SOURCE_SIDEBAR_SOFTEDGE_SOFTEDGEPROPERTYPANEL_HXX
-
-#include <vcl/vclptr.hxx>
-#include <sfx2/sidebar/ControllerItem.hxx>
-#include <sfx2/sidebar/PanelLayout.hxx>
-
-class ColorListBox;
-
-namespace svx::sidebar
-{
-class SoftEdgePropertyPanel : public PanelLayout,
- public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
-{
-public:
- SoftEdgePropertyPanel(vcl::Window* pParent,
- const css::uno::Reference<css::frame::XFrame>& rxFrame,
- SfxBindings* pBindings);
- virtual ~SoftEdgePropertyPanel() override;
- virtual void dispose() override;
-
- static VclPtr<vcl::Window> Create(vcl::Window* pParent,
- const css::uno::Reference<css::frame::XFrame>& rxFrame,
- SfxBindings* pBindings);
-
- virtual void NotifyItemUpdate(const sal_uInt16 nSId, const SfxItemState eState,
- const SfxPoolItem* pState) override;
-
- virtual void GetControlState(const sal_uInt16 /*nSId*/,
- boost::property_tree::ptree& /*rState*/) override{};
-
-private:
- sfx2::sidebar::ControllerItem maSoftEdgeRadiusController;
-
- SfxBindings* mpBindings;
-
- std::unique_ptr<weld::MetricSpinButton> mxSoftEdgeRadius;
- std::unique_ptr<weld::Label> mxFTRadius;
-
- void Initialize();
-
- DECL_LINK(ModifySoftEdgeRadiusHdl, weld::MetricSpinButton&, void);
-};
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/uiconfig/ui/sidebareffect.ui b/svx/uiconfig/ui/sidebareffect.ui
new file mode 100644
index 000000000000..b77953610771
--- /dev/null
+++ b/svx/uiconfig/ui/sidebareffect.ui
@@ -0,0 +1,240 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.1 -->
+<interface domain="svx">
+ <requires lib="gtk+" version="3.18"/>
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="upper">150</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment2">
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkGrid" id="GlowPropertyPanel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkGrid" id="grid3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="border_width">6</property>
+ <child>
+ <object class="GtkBox" id="box2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkFrame" id="glowframe">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="row_spacing">3</property>
+ <property name="column_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="radiusglow">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes" context="sidebarglow|radius">Radius:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">LB_GLOW_RADIUS</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="LB_GLOW_RADIUS">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="adjustment">adjustment1</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="color">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes" context="sidebarglow|color">Color:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">LB_GLOW_COLOR</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkMenuButton" id="LB_GLOW_COLOR">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="valign">center</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="label" translatable="no"></property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="transparency">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes" context="sidebarglow|transparency">Transparency:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">LB_GLOW_TRANSPARENCY</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="LB_GLOW_TRANSPARENCY">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="adjustment">adjustment2</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes" context="sidebarglow|glow">Glow</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="softedgeframe">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="radiussoftedge">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes" context="sidebarsoftedge|radius">Radius:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">SB_SOFTEDGE_RADIUS</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="SB_SOFTEDGE_RADIUS">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="adjustment">adjustment1</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes" context="sidebarsoftedge|softedge">Soft Edge</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ </object>
+ <object class="GtkSizeGroup" id="sizegroupLabel">
+ <widgets>
+ <widget name="radiusglow"/>
+ <widget name="color"/>
+ <widget name="transparency"/>
+ <widget name="radiussoftedge"/>
+ </widgets>
+ </object>
+</interface>
diff --git a/svx/uiconfig/ui/sidebarglow.ui b/svx/uiconfig/ui/sidebarglow.ui
deleted file mode 100644
index 302d8b381f3f..000000000000
--- a/svx/uiconfig/ui/sidebarglow.ui
+++ /dev/null
@@ -1,141 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.22.1 -->
-<interface domain="svx">
- <requires lib="gtk+" version="3.18"/>
- <object class="GtkAdjustment" id="adjustment1">
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- <property name="upper">150</property>
- </object>
- <object class="GtkAdjustment" id="adjustment2">
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- <property name="upper">100</property>
- </object>
- <object class="GtkGrid" id="GlowPropertyPanel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkGrid" id="grid3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="border_width">6</property>
- <child>
- <object class="GtkBox" id="box2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkGrid" id="grid1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">6</property>
- <child>
- <object class="GtkLabel" id="radius">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="sidebarglow|radius">Radius:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">LB_GLOW_RADIUS</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="LB_GLOW_RADIUS">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="adjustment">adjustment1</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="color">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="sidebarglow|color">Color:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">LB_GLOW_COLOR</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkMenuButton" id="LB_GLOW_COLOR">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="valign">center</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- <property name="label" translatable="no"></property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="transparency">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="sidebarglow|transparency">Transparency:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">LB_GLOW_TRANSPARENCY</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="LB_GLOW_TRANSPARENCY">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="adjustment">adjustment2</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- </object>
-</interface>
diff --git a/svx/uiconfig/ui/sidebarsoftedge.ui b/svx/uiconfig/ui/sidebarsoftedge.ui
deleted file mode 100644
index 8130b069f9e5..000000000000
--- a/svx/uiconfig/ui/sidebarsoftedge.ui
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.22.1 -->
-<interface domain="svx">
- <requires lib="gtk+" version="3.18"/>
- <object class="GtkAdjustment" id="adjustment1">
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- <property name="upper">100</property>
- </object>
- <object class="GtkGrid" id="SoftEdgePropertyPanel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkGrid" id="grid3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="border_width">6</property>
- <child>
- <object class="GtkBox" id="box2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkGrid" id="grid1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
- <child>
- <object class="GtkLabel" id="radius">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="sidebarsoftedge|radius">Radius:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">SB_SOFTEDGE_RADIUS</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="SB_SOFTEDGE_RADIUS">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="adjustment">adjustment1</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- </object>
-</interface>