summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2020-03-25 14:58:14 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2020-03-25 21:42:54 +0100
commit5a100a3b62da5ea94d4707c10633023065e1d04f (patch)
tree42e4e8d3e75b8a47e784849a80972f88082bc66e
parent4f1d258e4942631324aa1810bf016a1bf9ff8f9a (diff)
tdf#101181: add sidebar panel for Glow effect
... in Writer, Calc, Draw and Impress for CustomShapes. The artifacts that become apparent using the controls, e.g. remnants of the effect when decreasing radius (in Impress), or glow not drawn until reload after enabled or radius set to 0, should be fixed in a separate commit. Change-Id: I6107597161bc67ae8c3e62c260ef6ad241c7dedf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91056 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--include/svx/sdglowmetricitem.hxx37
-rw-r--r--include/svx/svxids.hrc3
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu25
-rw-r--r--sc/sdi/drawsh.sdi5
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx8
-rw-r--r--sd/sdi/_drvwsh.sdi15
-rw-r--r--sd/source/ui/view/drviews2.cxx15
-rw-r--r--sd/source/ui/view/drviewsf.cxx3
-rw-r--r--svx/Library_svx.mk1
-rw-r--r--svx/UIConfig_svx.mk1
-rw-r--r--svx/sdi/svx.sdi51
-rw-r--r--svx/source/sidebar/PanelFactory.cxx5
-rw-r--r--svx/source/sidebar/glow/GlowPropertyPanel.cxx169
-rw-r--r--svx/source/sidebar/glow/GlowPropertyPanel.hxx60
-rw-r--r--svx/source/svdraw/svdattr.cxx4
-rw-r--r--svx/uiconfig/ui/sidebarglow.ui128
-rw-r--r--sw/sdi/drawsh.sdi24
-rw-r--r--sw/source/uibase/shells/slotadd.cxx2
18 files changed, 516 insertions, 40 deletions
diff --git a/include/svx/sdglowmetricitem.hxx b/include/svx/sdglowmetricitem.hxx
deleted file mode 100644
index 4a78cdedc19c..000000000000
--- a/include/svx/sdglowmetricitem.hxx
+++ /dev/null
@@ -1,37 +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_SDGLOWMETRICITEM_HXX
-#define INCLUDED_SVX_SDGLOWMETRICITEM_HXX
-
-#include <svx/svddef.hxx>
-#include <svl/poolitem.hxx>
-#include <svx/svxdllapi.h>
-
-#include <com/sun/star/table/GlowFormat.hpp>
-#include <drawinglayer/attribute/sdrglowattribute.hxx>
-
-class SVX_DLLPUBLIC SdrGlowItem : public SfxPoolItem
-{
-private:
- css::uno::Reference<css::table::GlowFormat> m_xGlow;
-
-public:
- SdrGlowItem();
- virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric,
- MapUnit ePresMetric, OUString& rText,
- const IntlWrapper&) const override;
- virtual bool operator==(const SfxPoolItem&) const override;
- virtual bool QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId = 0) const override;
- virtual bool PutValue(const css::uno::Any& rVal, sal_uInt8 nMemberId) override;
- virtual SdrGlowItem* Clone(SfxItemPool* pPool = nullptr) const override;
-
- drawinglayer::attribute::SdrGlowAttribute GetGlowAttr() const;
-};
-
-#endif
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index f12a326d0d2a..32b0f5ba8350 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -414,6 +414,9 @@ class SvxSetItem;
#define SID_ATTR_TRANSFORM_HORI_MIRROR ( SID_SVX_START + 317 )
#define SID_ATTR_TRANSFORM_ANCHOR ( SID_SVX_START + 318 )
#define SID_ATTR_TRANSFORM_VERT_ORIENT ( SID_SVX_START + 319 )
+#define SID_ATTR_GLOW ( SID_SVX_START + 320 )
+#define SID_ATTR_GLOW_COLOR ( SID_SVX_START + 321 )
+#define SID_ATTR_GLOW_RADIUS ( SID_SVX_START + 322 )
#define SID_SCAN ( SID_SVX_START + 330 )
#define SID_TWAIN_SELECT ( SID_SVX_START + 331 )
#define SID_TWAIN_TRANSFER ( SID_SVX_START + 332 )
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index 42154bd6f9c1..d0ceb287d714 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -535,6 +535,31 @@
</prop>
</node>
+ <node oor:name="GlowPropertyPanel" oor:op="replace">
+ <prop oor:name="Title" oor:type="xs:string">
+ <value xml:lang="en-US">Glow</value>
+ </prop>
+ <prop oor:name="Id" oor:type="xs:string">
+ <value>GlowPropertyPanel</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 ;
+ WriterVariants, Draw, hidden ;
+ </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="ShadowPropertyPanel" oor:op="replace">
<prop oor:name="Title" oor:type="xs:string">
<value xml:lang="en-US">Shadow</value>
diff --git a/sc/sdi/drawsh.sdi b/sc/sdi/drawsh.sdi
index 6b28aea9dfbe..44faa5c18074 100644
--- a/sc/sdi/drawsh.sdi
+++ b/sc/sdi/drawsh.sdi
@@ -224,6 +224,11 @@ interface TableDraw
SID_DRAW_HLINK_EDIT [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; Export = FALSE; ]
SID_DRAW_HLINK_DELETE [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; Export = FALSE; ]
SID_OPEN_HYPERLINK [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawFuncState; Export = FALSE; ]
+
+ SID_ATTR_GLOW [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawAttrState; Export = FALSE; ]
+ SID_ATTR_GLOW_COLOR [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawAttrState; Export = FALSE; ]
+ SID_ATTR_GLOW_RADIUS [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawAttrState; Export = FALSE; ]
+
}
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index bf26953aa665..e83c87ff7e50 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -389,6 +389,14 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
}
break;
+ case SID_ATTR_GLOW:
+ case SID_ATTR_GLOW_COLOR:
+ case SID_ATTR_GLOW_RADIUS:
+ if (const SfxItemSet* pNewArgs = rReq.GetArgs())
+ pView->SetAttrToMarked(*pNewArgs, false);
+ rReq.Done();
+ break;
+
default:
break;
}
diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi
index 5d99ed09b16b..962ef2368e15 100644
--- a/sd/sdi/_drvwsh.sdi
+++ b/sd/sdi/_drvwsh.sdi
@@ -2860,5 +2860,20 @@ interface DrawView
ExecMethod = FuTemporary ;
StateMethod = GetMenuState ;
]
+ SID_ATTR_GLOW
+ [
+ ExecMethod = FuTemporary ;
+ StateMethod = GetAttrState ;
+ ]
+ SID_ATTR_GLOW_COLOR
+ [
+ ExecMethod = FuTemporary ;
+ StateMethod = GetAttrState ;
+ ]
+ SID_ATTR_GLOW_RADIUS
+ [
+ ExecMethod = FuTemporary;
+ StateMethod = GetAttrState;
+ ]
}
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 248092c06416..3348594ffdc7 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -3440,8 +3440,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
}
break;
- case SID_PHOTOALBUM:
- {
+ case SID_PHOTOALBUM:
+ {
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
vcl::Window* pWin = GetActiveWindow();
ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateSdPhotoAlbumDialog(
@@ -3456,7 +3456,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_INSERT_QRCODE:
case SID_EDIT_QRCODE:
- {
+ {
VclAbstractDialogFactory* pFact = VclAbstractDialogFactory::Create();
const uno::Reference<frame::XModel> xModel = GetViewShellBase().GetController()->getModel();
ScopedVclPtr<AbstractQrCodeGenDialog> pDlg(pFact->CreateQrCodeGenDialog(
@@ -3467,6 +3467,15 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
}
break;
+ case SID_ATTR_GLOW:
+ case SID_ATTR_GLOW_COLOR:
+ case SID_ATTR_GLOW_RADIUS:
+ if (const SfxItemSet* pNewArgs = rReq.GetArgs())
+ mpDrawView->SetAttributes(*pNewArgs);
+ rReq.Done();
+ Cancel();
+ break;
+
default:
{
SAL_WARN( "sd.ui", "Slot without function" );
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index 95ecd4a0d52a..c3401210c40d 100644
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -437,6 +437,9 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
case SID_ATTR_CHAR_COLOR:
case SID_ATTR_CHAR_KERNING:
case SID_ATTR_CHAR_CASEMAP:
+ case SID_ATTR_GLOW:
+ case SID_ATTR_GLOW_COLOR:
+ case SID_ATTR_GLOW_RADIUS:
case SID_SET_SUB_SCRIPT:
case SID_SET_SUPER_SCRIPT:
{
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index a7d72db44ccd..d3eff20b6769 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -197,6 +197,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/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 542c42ad8b7b..414361b8a316 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -115,6 +115,7 @@ $(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/sidebarshadow \
svx/uiconfig/ui/sidebargallery \
svx/uiconfig/ui/sidebargraphic \
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index d8a8af6c71e6..433bde068fb6 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -12218,3 +12218,54 @@ SfxVoidItem AccessibilityCheck SID_ACCESSIBILITY_CHECK
ToolBoxConfig = FALSE,
GroupId = SfxGroupId::Modify;
]
+
+SdrOnOffItem Glow SID_ATTR_GLOW
+
+[
+ AutoUpdate = TRUE,
+ FastCall = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = SfxGroupId::Document;
+]
+
+XColorItem GlowColor SID_ATTR_GLOW_COLOR
+
+[
+ AutoUpdate = TRUE,
+ FastCall = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = SfxGroupId::Document;
+]
+
+SdrMetricItem GlowRadius SID_ATTR_GLOW_RADIUS
+
+[
+ AutoUpdate = TRUE,
+ FastCall = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = SfxGroupId::Document;
+]
diff --git a/svx/source/sidebar/PanelFactory.cxx b/svx/source/sidebar/PanelFactory.cxx
index 5800099ecfa8..38e252c9b820 100644
--- a/svx/source/sidebar/PanelFactory.cxx
+++ b/svx/source/sidebar/PanelFactory.cxx
@@ -24,6 +24,7 @@
#include "paragraph/ParaPropertyPanel.hxx"
#include "lists/ListsPropertyPanel.hxx"
#include "area/AreaPropertyPanel.hxx"
+#include "glow/GlowPropertyPanel.hxx"
#include "shadow/ShadowPropertyPanel.hxx"
#include "graphic/GraphicPropertyPanel.hxx"
#include "line/LinePropertyPanel.hxx"
@@ -138,6 +139,10 @@ 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);
diff --git a/svx/source/sidebar/glow/GlowPropertyPanel.cxx b/svx/source/sidebar/glow/GlowPropertyPanel.cxx
new file mode 100644
index 000000000000..545394e5f7b6
--- /dev/null
+++ b/svx/source/sidebar/glow/GlowPropertyPanel.cxx
@@ -0,0 +1,169 @@
+/* -*- 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 "GlowPropertyPanel.hxx"
+
+#include <sfx2/dispatch.hxx>
+#include <svx/colorbox.hxx>
+#include <svx/sdmetitm.hxx>
+#include <svx/sdooitm.hxx>
+#include <svx/svddef.hxx>
+#include <svx/svxids.hrc>
+#include <svx/xcolit.hxx>
+
+namespace
+{
+sal_Int32 EMU2Pt(sal_Int32 nEMU)
+{
+ return static_cast<sal_Int32>(rtl::math::round(nEMU / 12700.0));
+}
+sal_Int32 Pt2EMU(sal_Int32 nPt) { return nPt * 12700; }
+}
+
+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, true)
+ , maGlowController(SID_ATTR_GLOW, *pBindings, *this)
+ , maGlowColorController(SID_ATTR_GLOW_COLOR, *pBindings, *this)
+ , maGlowRadiusController(SID_ATTR_GLOW_RADIUS, *pBindings, *this)
+ , mpBindings(pBindings)
+ , mxShowGlow(m_xBuilder->weld_check_button("SHOW_GLOW"))
+ , mxGlowRadius(m_xBuilder->weld_metric_spin_button("LB_GLOW_RADIUS", FieldUnit::POINT))
+ , mxLBGlowColor(new ColorListBox(m_xBuilder->weld_menu_button("LB_GLOW_COLOR"), GetFrameWeld()))
+ , mxFTRadius(m_xBuilder->weld_label("radius"))
+ , mxFTColor(m_xBuilder->weld_label("color"))
+{
+ Initialize();
+}
+
+GlowPropertyPanel::~GlowPropertyPanel() { disposeOnce(); }
+
+void GlowPropertyPanel::dispose()
+{
+ mxShowGlow.reset();
+ mxFTRadius.reset();
+ mxGlowRadius.reset();
+ mxFTColor.reset();
+ mxLBGlowColor.reset();
+
+ maGlowController.dispose();
+ maGlowColorController.dispose();
+ maGlowRadiusController.dispose();
+ PanelLayout::dispose();
+}
+
+void GlowPropertyPanel::Initialize()
+{
+ mxShowGlow->set_state(TRISTATE_FALSE);
+ mxShowGlow->connect_toggled(LINK(this, GlowPropertyPanel, ClickGlowHdl));
+ mxLBGlowColor->SetSelectHdl(LINK(this, GlowPropertyPanel, ModifyGlowColorHdl));
+ mxGlowRadius->connect_value_changed(LINK(this, GlowPropertyPanel, ModifyGlowRadiusHdl));
+}
+
+IMPL_LINK_NOARG(GlowPropertyPanel, ClickGlowHdl, weld::ToggleButton&, void)
+{
+ SdrOnOffItem aItem(SDRATTR_GLOW, mxShowGlow->get_state() != TRISTATE_FALSE);
+ mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_GLOW, SfxCallMode::RECORD, { &aItem });
+}
+
+IMPL_LINK_NOARG(GlowPropertyPanel, 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)
+{
+ SdrMetricItem aItem(SDRATTR_GLOW_RAD, Pt2EMU(mxGlowRadius->get_value(FieldUnit::POINT)));
+ mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_GLOW_RADIUS, SfxCallMode::RECORD, { &aItem });
+}
+
+void GlowPropertyPanel::UpdateControls()
+{
+ const bool bEnabled = mxShowGlow->get_state() != TRISTATE_FALSE;
+ mxGlowRadius->set_sensitive(bEnabled);
+ mxLBGlowColor->set_sensitive(bEnabled);
+ mxFTRadius->set_sensitive(bEnabled);
+ mxFTColor->set_sensitive(bEnabled);
+}
+
+void GlowPropertyPanel::NotifyItemUpdate(sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState)
+{
+ switch (nSID)
+ {
+ case SID_ATTR_GLOW:
+ {
+ if (eState >= SfxItemState::DEFAULT)
+ {
+ const SdrOnOffItem* pItem = dynamic_cast<const SdrOnOffItem*>(pState);
+ if (pItem)
+ {
+ if (pItem->GetValue())
+ mxShowGlow->set_state(TRISTATE_TRUE);
+ else
+ mxShowGlow->set_state(TRISTATE_FALSE);
+ }
+ }
+ }
+ break;
+
+ case SID_ATTR_GLOW_COLOR:
+ {
+ if (eState >= SfxItemState::DEFAULT)
+ {
+ const XColorItem* pColorItem = dynamic_cast<const XColorItem*>(pState);
+ if (pColorItem)
+ {
+ mxLBGlowColor->SelectEntry(pColorItem->GetColorValue());
+ }
+ }
+ }
+ break;
+ case SID_ATTR_GLOW_RADIUS:
+ {
+ if (eState >= SfxItemState::DEFAULT)
+ {
+ const SdrMetricItem* pRadiusItem = dynamic_cast<const SdrMetricItem*>(pState);
+ if (pRadiusItem)
+ {
+ mxGlowRadius->set_value(EMU2Pt(pRadiusItem->GetValue()), FieldUnit::POINT);
+ }
+ }
+ }
+ break;
+ }
+ UpdateControls();
+}
+
+VclPtr<vcl::Window>
+GlowPropertyPanel::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);
+ if (!rxFrame.is())
+ throw css::lang::IllegalArgumentException("no XFrame given to GlowPropertyPanel::Create",
+ nullptr, 1);
+ if (pBindings == nullptr)
+ throw css::lang::IllegalArgumentException(
+ "no SfxBindings given to GlowPropertyPanel::Create", nullptr, 2);
+
+ return VclPtr<GlowPropertyPanel>::Create(pParent, rxFrame, pBindings);
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sidebar/glow/GlowPropertyPanel.hxx b/svx/source/sidebar/glow/GlowPropertyPanel.hxx
new file mode 100644
index 000000000000..fe954311ce1a
--- /dev/null
+++ b/svx/source/sidebar/glow/GlowPropertyPanel.hxx
@@ -0,0 +1,60 @@
+/* -*- 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_GLOW_GLOWPROPERTYPANEL_HXX
+#define INCLUDED_SVX_SOURCE_SIDEBAR_GLOW_GLOWPROPERTYPANEL_HXX
+
+#include <vcl/vclptr.hxx>
+#include <sfx2/sidebar/ControllerItem.hxx>
+#include <svx/sidebar/PanelLayout.hxx>
+
+class ColorListBox;
+
+namespace svx::sidebar
+{
+class GlowPropertyPanel : 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;
+ 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;
+
+private:
+ sfx2::sidebar::ControllerItem maGlowController;
+ sfx2::sidebar::ControllerItem maGlowColorController;
+ sfx2::sidebar::ControllerItem maGlowRadiusController;
+
+ SfxBindings* mpBindings;
+
+ std::unique_ptr<weld::CheckButton> mxShowGlow;
+ std::unique_ptr<weld::MetricSpinButton> mxGlowRadius;
+ std::unique_ptr<ColorListBox> mxLBGlowColor;
+ std::unique_ptr<weld::Label> mxFTRadius;
+ std::unique_ptr<weld::Label> mxFTColor;
+
+ void Initialize();
+ void UpdateControls();
+
+ DECL_LINK(ClickGlowHdl, weld::ToggleButton&, void);
+ DECL_LINK(ModifyGlowColorHdl, ColorListBox&, void);
+ DECL_LINK(ModifyGlowRadiusHdl, weld::MetricSpinButton&, void);
+};
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index af8d7f7d45b9..38a1f235d583 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -344,6 +344,10 @@ SdrItemPool::SdrItemPool(
mpLocalItemInfos[SDRATTR_TABLE_BORDER_TLBR - SDRATTR_START ]._nSID = SID_ATTR_BORDER_DIAG_TLBR;
mpLocalItemInfos[SDRATTR_TABLE_BORDER_BLTR - SDRATTR_START ]._nSID = SID_ATTR_BORDER_DIAG_BLTR;
+ mpLocalItemInfos[SDRATTR_GLOW - SDRATTR_START]._nSID = SID_ATTR_GLOW;
+ mpLocalItemInfos[SDRATTR_GLOW_RAD - SDRATTR_START]._nSID = SID_ATTR_GLOW_RADIUS;
+ mpLocalItemInfos[SDRATTR_GLOW_COLOR - SDRATTR_START]._nSID = SID_ATTR_GLOW_COLOR;
+
// it's my own creation level, set Defaults and ItemInfos
SetDefaults(mpLocalPoolDefaults);
SetItemInfos(mpLocalItemInfos.get());
diff --git a/svx/uiconfig/ui/sidebarglow.ui b/svx/uiconfig/ui/sidebarglow.ui
new file mode 100644
index 000000000000..cc3accb4f8fa
--- /dev/null
+++ b/svx/uiconfig/ui/sidebarglow.ui
@@ -0,0 +1,128 @@
+<?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>
+ </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="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="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">1</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">1</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">2</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="hexpand">True</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">2</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">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="SHOW_GLOW">
+ <property name="label" translatable="yes" context="sidebarglow|SHOW_GLOW">Enable</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </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/sw/sdi/drawsh.sdi b/sw/sdi/drawsh.sdi
index a50df1289a61..c75bc6a8efca 100644
--- a/sw/sdi/drawsh.sdi
+++ b/sw/sdi/drawsh.sdi
@@ -184,6 +184,30 @@ interface TextDraw : TextDrawBase
DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
]
+ SID_ATTR_GLOW
+ [
+ Export = FALSE;
+ ExecMethod = ExecDrawAttrArgs ;
+ StateMethod = GetDrawAttrState ;
+ DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+ ]
+
+ SID_ATTR_GLOW_COLOR
+ [
+ Export = FALSE;
+ ExecMethod = ExecDrawAttrArgs ;
+ StateMethod = GetDrawAttrState ;
+ DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+ ]
+
+ SID_ATTR_GLOW_RADIUS
+ [
+ Export = FALSE;
+ ExecMethod = ExecDrawAttrArgs ;
+ StateMethod = GetDrawAttrState ;
+ DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+ ]
+
SID_ATTRIBUTES_LINE
[
ExecMethod = ExecDrawDlg ;
diff --git a/sw/source/uibase/shells/slotadd.cxx b/sw/source/uibase/shells/slotadd.cxx
index a4f4fe72e9b7..c6a3f35907b3 100644
--- a/sw/source/uibase/shells/slotadd.cxx
+++ b/sw/source/uibase/shells/slotadd.cxx
@@ -76,6 +76,8 @@
#include <editeng/boxitem.hxx>
#include <editeng/sizeitem.hxx>
#include <editeng/lrspitem.hxx>
+#include <svx/sdmetitm.hxx>
+#include <svx/sdooitm.hxx>
#include <svx/xlnstit.hxx>
#include <svx/xlnedit.hxx>
#include <svx/xfillit0.hxx>