summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/find-can-be-private-symbols.functions.results2
-rw-r--r--bin/find-mergedlib-can-be-private-symbols.functions.results2
-rw-r--r--compilerplugins/clang/unusedfields.writeonly.results6
-rw-r--r--drawinglayer/Library_drawinglayer.mk1
-rw-r--r--drawinglayer/source/attribute/sdrglowtextattribute.cxx37
-rw-r--r--include/drawinglayer/attribute/sdrglowtextattribute.hxx45
-rw-r--r--include/oox/drawingml/effectproperties.hxx89
-rw-r--r--include/oox/export/drawingml.hxx1
-rw-r--r--include/svx/strings.hrc3
-rw-r--r--include/svx/svddef.hxx28
-rw-r--r--include/svx/svxids.hrc9
-rw-r--r--include/svx/unoshprp.hxx5
-rw-r--r--include/xmloff/xmltoken.hxx3
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu29
-rw-r--r--oox/inc/drawingml/textcharacterproperties.hxx10
-rw-r--r--oox/source/drawingml/effectproperties.cxx2
-rw-r--r--oox/source/drawingml/effectpropertiescontext.cxx2
-rw-r--r--oox/source/drawingml/shape.cxx46
-rw-r--r--oox/source/drawingml/textcharacterproperties.cxx1
-rw-r--r--oox/source/drawingml/textcharacterpropertiescontext.cxx2
-rw-r--r--oox/source/drawingml/themeelementscontext.cxx2
-rw-r--r--oox/source/export/drawingml.cxx33
-rw-r--r--sc/sdi/drawsh.sdi4
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx3
-rw-r--r--schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng16
-rw-r--r--sd/qa/unit/data/odp/shape-text-glow-effect.odpbin0 -> 28028 bytes
-rw-r--r--sd/qa/unit/data/pptx/shape-text-glow-effect.pptxbin0 -> 34693 bytes
-rw-r--r--sd/qa/unit/export-tests-ooxml4.cxx16
-rw-r--r--sd/qa/unit/export-tests.cxx41
-rw-r--r--sd/qa/unit/import-tests2.cxx16
-rw-r--r--sd/sdi/_drvwsh.sdi15
-rw-r--r--sd/source/ui/view/drviews2.cxx3
-rw-r--r--sd/source/ui/view/drviewsf.cxx3
-rw-r--r--static/CustomTarget_emscripten_fs_image.mk1
-rw-r--r--svx/Library_svx.mk1
-rw-r--r--svx/UIConfig_svx.mk1
-rw-r--r--svx/inc/sdr/attribute/sdreffectstextattribute.hxx6
-rw-r--r--svx/inc/sdr/attribute/sdrlineeffectstextattribute.hxx2
-rw-r--r--svx/inc/sdr/attribute/sdrlinefilleffectstextattribute.hxx1
-rw-r--r--svx/inc/sdr/primitive2d/sdrattributecreator.hxx2
-rw-r--r--svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx5
-rw-r--r--svx/sdi/svx.sdi51
-rw-r--r--svx/source/sdr/attribute/sdreffectstextattribute.cxx8
-rw-r--r--svx/source/sdr/attribute/sdrlineeffectstextattribute.cxx3
-rw-r--r--svx/source/sdr/attribute/sdrlinefilleffectstextattribute.cxx3
-rw-r--r--svx/source/sdr/primitive2d/sdrattributecreator.cxx70
-rw-r--r--svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx23
-rw-r--r--svx/source/sdr/primitive2d/sdrdecompositiontools.cxx15
-rw-r--r--svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx11
-rw-r--r--svx/source/sdr/properties/customshapeproperties.cxx2
-rw-r--r--svx/source/sdr/properties/textproperties.cxx1
-rw-r--r--svx/source/sidebar/PanelFactory.cxx5
-rw-r--r--svx/source/sidebar/effect/TextEffectPropertyPanel.cxx153
-rw-r--r--svx/source/sidebar/effect/TextEffectPropertyPanel.hxx58
-rw-r--r--svx/source/svdraw/svdattr.cxx8
-rw-r--r--svx/source/svdraw/svdedxv.cxx3
-rw-r--r--svx/source/unodraw/unoprov.cxx11
-rw-r--r--svx/uiconfig/ui/sidebartexteffect.ui135
-rw-r--r--sw/sdi/drawsh.sdi21
-rw-r--r--vcl/jsdialog/enabled.cxx1
-rw-r--r--xmloff/inc/xmlprop.hxx3
-rw-r--r--xmloff/source/core/xmltoken.cxx3
-rw-r--r--xmloff/source/draw/sdpropls.cxx5
-rw-r--r--xmloff/source/token/tokens.txt3
64 files changed, 1056 insertions, 34 deletions
diff --git a/bin/find-can-be-private-symbols.functions.results b/bin/find-can-be-private-symbols.functions.results
index 7572709eeb6c..732a616b5953 100644
--- a/bin/find-can-be-private-symbols.functions.results
+++ b/bin/find-can-be-private-symbols.functions.results
@@ -11944,6 +11944,7 @@ drawinglayer::attribute::SdrFillGraphicAttribute::getTiling() const
drawinglayer::attribute::SdrFillGraphicAttribute::operator=(drawinglayer::attribute::SdrFillGraphicAttribute const&)
drawinglayer::attribute::SdrFillGraphicAttribute::operator==(drawinglayer::attribute::SdrFillGraphicAttribute const&) const
drawinglayer::attribute::SdrGlowAttribute::operator=(drawinglayer::attribute::SdrGlowAttribute&&)
+drawinglayer::attribute::SdrGlowTextAttribute::operator=(drawinglayer::attribute::SdrGlowTextAttribute&&)
drawinglayer::attribute::SdrLightingAttribute::SdrLightingAttribute(drawinglayer::attribute::SdrLightingAttribute&&)
drawinglayer::attribute::SdrLightingAttribute::getAmbientLightColor() const
drawinglayer::attribute::SdrLightingAttribute::operator=(drawinglayer::attribute::SdrLightingAttribute const&)
@@ -12251,6 +12252,7 @@ drawinglayer::primitive2d::WrongSpellPrimitive2D::create2DDecomposition(drawingl
drawinglayer::primitive2d::WrongSpellPrimitive2D::getPrimitive2DID() const
drawinglayer::primitive2d::WrongSpellPrimitive2D::operator==(drawinglayer::primitive2d::BasePrimitive2D const&) const
drawinglayer::primitive2d::createEmbeddedGlowPrimitive(drawinglayer::primitive2d::Primitive2DContainer&&, drawinglayer::attribute::SdrGlowAttribute const&)
+drawinglayer::primitive2d::createEmbeddedTextGlowPrimitive(drawinglayer::primitive2d::Primitive2DContainer&&, drawinglayer::attribute::SdrGlowTextAttribute const&)
drawinglayer::primitive2d::createEmbeddedShadowPrimitive(drawinglayer::primitive2d::Primitive2DContainer&&, drawinglayer::attribute::SdrShadowAttribute const&, basegfx::B2DHomMatrix const&, drawinglayer::primitive2d::Primitive2DContainer const*)
drawinglayer::primitive2d::createEmbeddedSoftEdgePrimitive(drawinglayer::primitive2d::Primitive2DContainer&&, int)
drawinglayer::primitive2d::createHiddenGeometryPrimitives2D(bool, basegfx::B2DRange const&, basegfx::B2DHomMatrix const&)
diff --git a/bin/find-mergedlib-can-be-private-symbols.functions.results b/bin/find-mergedlib-can-be-private-symbols.functions.results
index 0fa7ff44a5a7..5312bf9abdb4 100644
--- a/bin/find-mergedlib-can-be-private-symbols.functions.results
+++ b/bin/find-mergedlib-can-be-private-symbols.functions.results
@@ -12420,6 +12420,7 @@ drawinglayer::attribute::SdrFillGraphicAttribute::getTiling() const
drawinglayer::attribute::SdrFillGraphicAttribute::operator=(drawinglayer::attribute::SdrFillGraphicAttribute const&)
drawinglayer::attribute::SdrFillGraphicAttribute::operator==(drawinglayer::attribute::SdrFillGraphicAttribute const&) const
drawinglayer::attribute::SdrGlowAttribute::operator=(drawinglayer::attribute::SdrGlowAttribute&&)
+drawinglayer::attribute::SdrGlowTextAttribute::operator=(drawinglayer::attribute::SdrGlowTextAttribute&&)
drawinglayer::attribute::SdrLightingAttribute::SdrLightingAttribute(drawinglayer::attribute::SdrLightingAttribute&&)
drawinglayer::attribute::SdrLightingAttribute::getAmbientLightColor() const
drawinglayer::attribute::SdrLightingAttribute::operator=(drawinglayer::attribute::SdrLightingAttribute const&)
@@ -12720,6 +12721,7 @@ drawinglayer::primitive2d::WrongSpellPrimitive2D::getPrimitive2DID() const
drawinglayer::primitive2d::WrongSpellPrimitive2D::operator==(drawinglayer::primitive2d::BasePrimitive2D const&) const
drawinglayer::primitive2d::arePrimitive2DReferencesEqual(rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D> const&, rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D> const&)
drawinglayer::primitive2d::createEmbeddedGlowPrimitive(drawinglayer::primitive2d::Primitive2DContainer&&, drawinglayer::attribute::SdrGlowAttribute const&)
+drawinglayer::primitive2d::createEmbeddedTextGlowPrimitive(drawinglayer::primitive2d::Primitive2DContainer&&, drawinglayer::attribute::SdrGlowTextAttribute const&)
drawinglayer::primitive2d::createEmbeddedShadowPrimitive(drawinglayer::primitive2d::Primitive2DContainer&&, drawinglayer::attribute::SdrShadowAttribute const&, basegfx::B2DHomMatrix const&, drawinglayer::primitive2d::Primitive2DContainer const*)
drawinglayer::primitive2d::createEmbeddedSoftEdgePrimitive(drawinglayer::primitive2d::Primitive2DContainer&&, int)
drawinglayer::primitive2d::createHiddenGeometryPrimitives2D(bool, basegfx::B2DRange const&, basegfx::B2DHomMatrix const&)
diff --git a/compilerplugins/clang/unusedfields.writeonly.results b/compilerplugins/clang/unusedfields.writeonly.results
index 9fc7025d4d47..109227ee1726 100644
--- a/compilerplugins/clang/unusedfields.writeonly.results
+++ b/compilerplugins/clang/unusedfields.writeonly.results
@@ -1046,6 +1046,12 @@ svx/source/sidebar/effect/EffectPropertyPanel.hxx:37
svx::sidebar::EffectPropertyPanel maGlowTransparencyController sfx2::sidebar::ControllerItem
svx/source/sidebar/effect/EffectPropertyPanel.hxx:39
svx::sidebar::EffectPropertyPanel maSoftEdgeRadiusController sfx2::sidebar::ControllerItem
+svx/source/sidebar/effect/TextEffectPropertyPanel.hxx:35
+ svx::sidebar::TextEffectPropertyPanel maTGlowColorController sfx2::sidebar::ControllerItem
+svx/source/sidebar/effect/TextEffectPropertyPanel.hxx:36
+ svx::sidebar::TextEffectPropertyPanel maTGlowRadiusController sfx2::sidebar::ControllerItem
+svx/source/sidebar/effect/TextEffectPropertyPanel.hxx:37
+ svx::sidebar::TextEffectPropertyPanel maTGlowTransparencyController sfx2::sidebar::ControllerItem
svx/source/sidebar/line/LinePropertyPanel.hxx:79
svx::sidebar::LinePropertyPanel maStyleControl sfx2::sidebar::ControllerItem
svx/source/sidebar/line/LinePropertyPanel.hxx:80
diff --git a/drawinglayer/Library_drawinglayer.mk b/drawinglayer/Library_drawinglayer.mk
index 6409e379df6b..14e40870d7f1 100644
--- a/drawinglayer/Library_drawinglayer.mk
+++ b/drawinglayer/Library_drawinglayer.mk
@@ -94,6 +94,7 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\
drawinglayer/source/attribute/sdrfillattribute \
drawinglayer/source/attribute/sdrfillgraphicattribute \
drawinglayer/source/attribute/sdrglowattribute \
+ drawinglayer/source/attribute/sdrglowtextattribute \
drawinglayer/source/attribute/sdrlightattribute3d \
drawinglayer/source/attribute/sdrlightingattribute3d \
drawinglayer/source/attribute/sdrlineattribute \
diff --git a/drawinglayer/source/attribute/sdrglowtextattribute.cxx b/drawinglayer/source/attribute/sdrglowtextattribute.cxx
new file mode 100644
index 000000000000..f456955624c3
--- /dev/null
+++ b/drawinglayer/source/attribute/sdrglowtextattribute.cxx
@@ -0,0 +1,37 @@
+/* -*- 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 <drawinglayer/attribute/sdrglowtextattribute.hxx>
+
+namespace drawinglayer::attribute
+{
+SdrGlowTextAttribute::SdrGlowTextAttribute(sal_Int32 nTextRadius, const Color& rTextColor)
+ : m_nTextRadius(nTextRadius)
+ , m_TextColor(rTextColor)
+{
+}
+
+SdrGlowTextAttribute::SdrGlowTextAttribute() = default;
+
+SdrGlowTextAttribute::SdrGlowTextAttribute(const SdrGlowTextAttribute&) = default;
+
+SdrGlowTextAttribute::SdrGlowTextAttribute(SdrGlowTextAttribute&&) = default;
+
+SdrGlowTextAttribute& SdrGlowTextAttribute::operator=(const SdrGlowTextAttribute&) = default;
+
+SdrGlowTextAttribute& SdrGlowTextAttribute::operator=(SdrGlowTextAttribute&&) = default;
+
+bool SdrGlowTextAttribute::operator==(const SdrGlowTextAttribute& rCandidate) const
+{
+ return m_nTextRadius == rCandidate.m_nTextRadius && m_TextColor == rCandidate.m_TextColor;
+}
+
+} // end of namespace drawinglayer::attribute
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/drawinglayer/attribute/sdrglowtextattribute.hxx b/include/drawinglayer/attribute/sdrglowtextattribute.hxx
new file mode 100644
index 000000000000..6702bae72c14
--- /dev/null
+++ b/include/drawinglayer/attribute/sdrglowtextattribute.hxx
@@ -0,0 +1,45 @@
+/* -*- 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_DRAWINGLAYER_ATTRIBUTE_SDRGLOWTEXTATTRIBUTE_HXX
+#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRGLOWTEXTATTRIBUTE_HXX
+
+#include <drawinglayer/drawinglayerdllapi.h>
+#include <tools/color.hxx>
+
+namespace drawinglayer::attribute
+{
+class DRAWINGLAYER_DLLPUBLIC SdrGlowTextAttribute
+{
+private:
+ sal_Int32 m_nTextRadius = 0;
+ Color m_TextColor; // Includes alpha!
+
+public:
+ SdrGlowTextAttribute(sal_Int32 nTextRadius, const Color& rTextColor);
+ SdrGlowTextAttribute();
+ SdrGlowTextAttribute(const SdrGlowTextAttribute&);
+ SdrGlowTextAttribute(SdrGlowTextAttribute&&);
+
+ bool operator==(const SdrGlowTextAttribute& rCandidate) const;
+
+ SdrGlowTextAttribute& operator=(const SdrGlowTextAttribute&);
+ SdrGlowTextAttribute& operator=(SdrGlowTextAttribute&&);
+
+ // data access
+ const Color& getTextColor() const { return m_TextColor; }
+ sal_Int32 getTextRadius() const { return m_nTextRadius; }
+ bool isDefault() const { return m_nTextRadius == 0; }
+};
+
+} // end of namespace drawinglayer::attribute
+
+#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRGLOWTEXTATTRIBUTE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/oox/drawingml/effectproperties.hxx b/include/oox/drawingml/effectproperties.hxx
new file mode 100644
index 000000000000..71b05af78752
--- /dev/null
+++ b/include/oox/drawingml/effectproperties.hxx
@@ -0,0 +1,89 @@
+/* -*- 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_OOX_DRAWINGML_EFFECTPROPERTIES_HXX
+#define INCLUDED_OOX_DRAWINGML_EFFECTPROPERTIES_HXX
+
+#include <oox/drawingml/color.hxx>
+#include <oox/helper/propertymap.hxx>
+
+#include <memory>
+#include <vector>
+#include <map>
+
+namespace model
+{
+enum class RectangleAlignment;
+}
+
+namespace oox::drawingml
+{
+struct EffectGlowProperties
+{
+ std::optional<sal_Int64> moGlowRad; // size of glow effect
+ Color moGlowColor;
+ // TODO saturation and luminance missing
+
+ void assignUsed(const EffectGlowProperties& rSourceProps);
+};
+
+struct EffectSoftEdgeProperties
+{
+ std::optional<sal_Int64> moRad; // size of effect
+
+ void assignUsed(const EffectSoftEdgeProperties& rSourceProps);
+};
+
+struct EffectShadowProperties
+{
+ std::optional<sal_Int64> moShadowDist;
+ std::optional<sal_Int64> moShadowDir;
+ std::optional<sal_Int64> moShadowSx;
+ std::optional<sal_Int64> moShadowSy;
+ Color moShadowColor;
+ std::optional<sal_Int64> moShadowBlur; // size of blur effect
+ std::optional<model::RectangleAlignment> moShadowAlignment;
+
+ /** Overwrites all members that are explicitly set in rSourceProps. */
+ void assignUsed(const EffectShadowProperties& rSourceProps);
+};
+
+struct Effect
+{
+ OUString msName;
+ std::map<OUString, css::uno::Any> maAttribs;
+ Color moColor;
+
+ css::beans::PropertyValue getEffect();
+};
+
+struct EffectProperties
+{
+ EffectShadowProperties maShadow;
+ EffectGlowProperties maGlow;
+ EffectSoftEdgeProperties maSoftEdge;
+
+ /** Stores all effect properties, including those not supported by core yet */
+ std::vector<std::unique_ptr<Effect>> m_Effects;
+
+ EffectProperties() {}
+ EffectProperties(EffectProperties const& rOther) { assignUsed(rOther); }
+
+ /** Overwrites all members that are explicitly set in rSourceProps. */
+ void assignUsed(const EffectProperties& rSourceProps);
+
+ /** Writes the properties to the passed property map. */
+ void pushToPropMap(PropertyMap& rPropMap, const GraphicHelper& rGraphicHelper) const;
+};
+
+} // namespace oox::drawingml
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index 864aaebbb61c..14df9e9cad8c 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -339,6 +339,7 @@ protected:
bool IsFontworkShape(const css::uno::Reference< css::beans::XPropertySet >& rXShapePropSet);
void WriteGlowEffect(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet);
+ void WriteTextGlowEffect(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet);
void WriteSoftEdgeEffect(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet);
void WriteCustomGeometryPoint(const css::drawing::EnhancedCustomShapeParameterPair& rParamPair,
const EnhancedCustomShape2d& rCustomShape2d,
diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc
index f2ee1a961725..23a9dc8c2d97 100644
--- a/include/svx/strings.hrc
+++ b/include/svx/strings.hrc
@@ -516,6 +516,9 @@
#define SIP_SA_GLOW_RADIUS NC_("SIP_SA_GLOW_RADIUS", "Radius of glow effect")
#define SIP_SA_GLOW_COLOR NC_("SIP_SA_GLOW_COLOR", "Color of glow effect")
#define SIP_SA_GLOW_TRANSPARENCY NC_("SIP_SA_GLOW_TRANSPARENCY", "Transparency of glow effect")
+#define SIP_SA_GLOW_TEXT_RADIUS NC_("SIP_SA_GLOW_TEXT_RADIUS", "Radius of text glow effect")
+#define SIP_SA_GLOW_TEXT_COLOR NC_("SIP_SA_GLOW_TEXT_COLOR", "Color of text glow effect")
+#define SIP_SA_GLOW_TEXT_TRANSPARENCY NC_("SIP_SA_GLOW_TEXT_TRANSPARENCY", "Transparency of text glow effect")
#define SIP_SA_SOFTEDGE_RADIUS NC_("SIP_SA_SOFTEDGE_RADIUS", "Radius of soft edge effect")
#define STR_ObjNameSingulMEDIA NC_("STR_ObjNameSingulMEDIA", "Media object")
#define STR_ObjNamePluralMEDIA NC_("STR_ObjNamePluralMEDIA", "Media objects")
diff --git a/include/svx/svddef.hxx b/include/svx/svddef.hxx
index 500d68fc3916..f54c872f6c8d 100644
--- a/include/svx/svddef.hxx
+++ b/include/svx/svddef.hxx
@@ -432,20 +432,26 @@ constexpr sal_uInt16 SDRATTR_SOFTEDGE_FIRST(SDRATTR_GLOW_LA
constexpr TypedWhichId<SdrMetricItem> SDRATTR_SOFTEDGE_RADIUS(SDRATTR_SOFTEDGE_FIRST+0); // 1245
constexpr sal_uInt16 SDRATTR_SOFTEDGE_LAST(SDRATTR_SOFTEDGE_RADIUS); // 1245
-constexpr sal_uInt16 SDRATTR_TEXTCOLUMNS_FIRST(SDRATTR_SOFTEDGE_LAST+1); // 1246
-constexpr TypedWhichId<SfxInt16Item> SDRATTR_TEXTCOLUMNS_NUMBER(SDRATTR_TEXTCOLUMNS_FIRST+0); // 1246
-constexpr TypedWhichId<SdrMetricItem> SDRATTR_TEXTCOLUMNS_SPACING(SDRATTR_TEXTCOLUMNS_FIRST+1); // 1247
-constexpr sal_uInt16 SDRATTR_TEXTCOLUMNS_LAST(SDRATTR_TEXTCOLUMNS_SPACING); // 1247
+constexpr sal_uInt16 SDRATTR_GLOW_TEXT_FIRST(SDRATTR_SOFTEDGE_LAST+1); // 1246
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_GLOW_TEXT_RADIUS(SDRATTR_GLOW_TEXT_FIRST+0); // 1246
+constexpr TypedWhichId<XColorItem> SDRATTR_GLOW_TEXT_COLOR(SDRATTR_GLOW_TEXT_FIRST+1); // 1247
+constexpr TypedWhichId<SdrPercentItem> SDRATTR_GLOW_TEXT_TRANSPARENCY(SDRATTR_GLOW_TEXT_FIRST+2);// 1248
+constexpr sal_uInt16 SDRATTR_GLOW_TEXT_LAST(SDRATTR_GLOW_TEXT_TRANSPARENCY); // 1248
-constexpr sal_uInt16 SDRATTR_WRITINGMODE2_FIRST(SDRATTR_TEXTCOLUMNS_LAST+1);// 1248
-constexpr TypedWhichId<SvxFrameDirectionItem> SDRATTR_WRITINGMODE2(SDRATTR_WRITINGMODE2_FIRST+0); // 1248
-constexpr sal_uInt16 SDRATTR_WRITINGMODE2_LAST(SDRATTR_WRITINGMODE2); // 1248
+constexpr sal_uInt16 SDRATTR_TEXTCOLUMNS_FIRST(SDRATTR_GLOW_TEXT_LAST+1); // 1249
+constexpr TypedWhichId<SfxInt16Item> SDRATTR_TEXTCOLUMNS_NUMBER(SDRATTR_TEXTCOLUMNS_FIRST+0); // 1249
+constexpr TypedWhichId<SdrMetricItem> SDRATTR_TEXTCOLUMNS_SPACING(SDRATTR_TEXTCOLUMNS_FIRST+1); // 1250
+constexpr sal_uInt16 SDRATTR_TEXTCOLUMNS_LAST(SDRATTR_TEXTCOLUMNS_SPACING); // 1250
-constexpr sal_uInt16 SDRATTR_EDGEOOXMLCURVE_FIRST(SDRATTR_WRITINGMODE2_LAST+1);// 1249
-constexpr TypedWhichId<SfxBoolItem> SDRATTR_EDGEOOXMLCURVE(SDRATTR_EDGEOOXMLCURVE_FIRST+0); // 1249
-constexpr sal_uInt16 SDRATTR_EDGEOOXMLCURVE_LAST(SDRATTR_EDGEOOXMLCURVE); // 1249
+constexpr sal_uInt16 SDRATTR_WRITINGMODE2_FIRST(SDRATTR_TEXTCOLUMNS_LAST+1);// 1251
+constexpr TypedWhichId<SvxFrameDirectionItem> SDRATTR_WRITINGMODE2(SDRATTR_WRITINGMODE2_FIRST+0); // 1251
+constexpr sal_uInt16 SDRATTR_WRITINGMODE2_LAST(SDRATTR_WRITINGMODE2); // 1251
-constexpr sal_uInt16 SDRATTR_END (SDRATTR_EDGEOOXMLCURVE_LAST); // 1249
+constexpr sal_uInt16 SDRATTR_EDGEOOXMLCURVE_FIRST(SDRATTR_WRITINGMODE2_LAST+1);// 1252
+constexpr TypedWhichId<SfxBoolItem> SDRATTR_EDGEOOXMLCURVE(SDRATTR_EDGEOOXMLCURVE_FIRST+0); // 1252
+constexpr sal_uInt16 SDRATTR_EDGEOOXMLCURVE_LAST(SDRATTR_EDGEOOXMLCURVE); // 1252
+
+constexpr sal_uInt16 SDRATTR_END (SDRATTR_EDGEOOXMLCURVE_LAST); // 1252
#endif // INCLUDED_SVX_SVDDEF_HXX
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 68d02d4a86fc..895507c4696b 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -437,10 +437,17 @@ class XFillGradientItem;
#define SID_ATTR_TRANSFORM_HORI_MIRROR TypedWhichId<SfxBoolItem>( SID_SVX_START + 317 )
#define SID_ATTR_TRANSFORM_ANCHOR TypedWhichId<SfxInt16Item>( SID_SVX_START + 318 )
#define SID_ATTR_TRANSFORM_VERT_ORIENT TypedWhichId<SfxInt16Item>( SID_SVX_START + 319 )
+
#define SID_ATTR_GLOW_RADIUS ( SID_SVX_START + 320 )
#define SID_ATTR_GLOW_COLOR ( SID_SVX_START + 321 )
#define SID_ATTR_GLOW_TRANSPARENCY ( SID_SVX_START + 322 )
-#define SID_ATTR_SOFTEDGE_RADIUS ( SID_SVX_START + 323 )
+
+#define SID_ATTR_GLOW_TEXT_RADIUS ( SID_SVX_START + 323 )
+#define SID_ATTR_GLOW_TEXT_COLOR ( SID_SVX_START + 324 )
+#define SID_ATTR_GLOW_TEXT_TRANSPARENCY ( SID_SVX_START + 325 )
+
+#define SID_ATTR_SOFTEDGE_RADIUS ( SID_SVX_START + 326 )
+
#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/include/svx/unoshprp.hxx b/include/svx/unoshprp.hxx
index c4fdfafacb2a..cbb2521684be 100644
--- a/include/svx/unoshprp.hxx
+++ b/include/svx/unoshprp.hxx
@@ -225,6 +225,11 @@
#define SOFTEDGE_PROPERTIES \
{ u"SoftEdgeRadius"_ustr, SDRATTR_SOFTEDGE_RADIUS, cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM},
+#define GLOW_TEXT_PROPERTIES \
+ { u"GlowTextEffectRadius"_ustr, SDRATTR_GLOW_TEXT_RADIUS, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { u"GlowTextEffectColor"_ustr, SDRATTR_GLOW_TEXT_COLOR, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
+ { u"GlowTextEffectTransparency"_ustr,SDRATTR_GLOW_TEXT_TRANSPARENCY,::cppu::UnoType<sal_Int16>::get(), 0, 0},
+
#define SHADOW_PROPERTIES \
{ UNO_NAME_SHADOW, SDRATTR_SHADOW, cppu::UnoType<bool>::get(), 0, 0}, \
{ UNO_NAME_SHADOWCOLOR, SDRATTR_SHADOWCOLOR, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index f410ce69344a..aecf9a5bd4ae 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -979,8 +979,11 @@ namespace xmloff::token {
XML_GENERATOR,
XML_GEQ,
XML_GLOW_RADIUS,
+ XML_GLOW_TEXT_RADIUS,
XML_GLOW_COLOR,
+ XML_GLOW_TEXT_COLOR,
XML_GLOW_TRANSPARENCY,
+ XML_GLOW_TEXT_TRANSPARENCY,
XML_GOURAUD,
XML_GRADIENT,
XML_GRADIENT_ANGLE,
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index 940aab4c0505..1e9475993207 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -724,6 +724,35 @@
</prop>
</node>
+ <node oor:name="TextEffectPropertyPanel" oor:op="replace">
+ <prop oor:name="Title" oor:type="xs:string">
+ <value xml:lang="en-US">Text Effect</value>
+ </prop>
+ <prop oor:name="Id" oor:type="xs:string">
+ <value>TextEffectPropertyPanel</value>
+ </prop>
+ <prop oor:name="DeckId" oor:type="xs:string">
+ <value>PropertyDeck</value>
+ </prop>
+ <prop oor:name="ContextList">
+ <value oor:separator=";">
+ Calc, Draw, hidden ;
+ Calc, TextObject, hidden ;
+ DrawImpress, Draw, hidden ;
+ DrawImpress, TextObject, hidden ;
+ </value>
+ </prop>
+ <prop oor:name="ImplementationURL" oor:type="xs:string">
+ <value>private:resource/toolpanel/SvxPanelFactory/TextEffectPropertyPanel</value>
+ </prop>
+ <prop oor:name="OrderIndex" oor:type="xs:int">
+ <value>350</value>
+ </prop>
+ <prop oor:name="WantsAWT" oor:type="xs:boolean">
+ <value>false</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/oox/inc/drawingml/textcharacterproperties.hxx b/oox/inc/drawingml/textcharacterproperties.hxx
index 9750407b817c..c806dde960f7 100644
--- a/oox/inc/drawingml/textcharacterproperties.hxx
+++ b/oox/inc/drawingml/textcharacterproperties.hxx
@@ -23,7 +23,9 @@
#include <oox/helper/helper.hxx>
#include <oox/helper/propertymap.hxx>
#include <oox/drawingml/color.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
#include <drawingml/textfont.hxx>
+#include <oox/drawingml/effectproperties.hxx>
#include <drawingml/fillproperties.hxx>
#include <drawingml/lineproperties.hxx>
@@ -32,6 +34,7 @@ namespace oox { class PropertySet; }
namespace oox::drawingml {
+struct EffectProperties;
struct TextCharacterProperties
{
@@ -69,6 +72,8 @@ struct TextCharacterProperties
/// In that case we use the default paragraph properties from the
/// <c:txPr><a:p><a:pPr><a:defRPr>...</a:defRPr>
bool mbHasEmptyParaProperties;
+ /// For text effect properties in shapes
+ EffectPropertiesPtr mpEffectPropertiesPtr;
std::vector<css::beans::PropertyValue> maTextEffectsProperties;
@@ -90,7 +95,10 @@ struct TextCharacterProperties
PropertySet& rPropSet,
const ::oox::core::XmlFilterBase& rFilter ) const;
- TextCharacterProperties() : mbHasVisualRunProperties(false), mbHasEmptyParaProperties(false) {}
+ /** Get effect properties. */
+ EffectProperties& getEffectProperties() const { return *mpEffectPropertiesPtr; }
+
+ TextCharacterProperties() : mbHasVisualRunProperties(false), mbHasEmptyParaProperties(false), mpEffectPropertiesPtr(std::make_shared<EffectProperties>()) {}
};
diff --git a/oox/source/drawingml/effectproperties.cxx b/oox/source/drawingml/effectproperties.cxx
index 83df8d59c57f..b1850b17c6d6 100644
--- a/oox/source/drawingml/effectproperties.cxx
+++ b/oox/source/drawingml/effectproperties.cxx
@@ -7,7 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include "effectproperties.hxx"
+#include <oox/drawingml/effectproperties.hxx>
#include <oox/drawingml/drawingmltypes.hxx>
#include <oox/helper/graphichelper.hxx>
#include <oox/token/properties.hxx>
diff --git a/oox/source/drawingml/effectpropertiescontext.cxx b/oox/source/drawingml/effectpropertiescontext.cxx
index 9e5fbd983689..ea949017cae2 100644
--- a/oox/source/drawingml/effectpropertiescontext.cxx
+++ b/oox/source/drawingml/effectpropertiescontext.cxx
@@ -8,7 +8,7 @@
*/
#include <drawingml/effectpropertiescontext.hxx>
-#include "effectproperties.hxx"
+#include <oox/drawingml/effectproperties.hxx>
#include <drawingml/colorchoicecontext.hxx>
#include <oox/helper/attributelist.hxx>
#include <oox/token/namespaces.hxx>
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index e3c08581f624..56e04caadbf1 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -29,7 +29,7 @@
#include <drawingml/presetgeometrynames.hxx>
#include <drawingml/shape3dproperties.hxx>
#include <drawingml/scene3dhelper.hxx>
-#include "effectproperties.hxx"
+#include <oox/drawingml/effectproperties.hxx>
#include <oox/drawingml/shapepropertymap.hxx>
#include <drawingml/textbody.hxx>
#include <drawingml/textparagraph.hxx>
@@ -2162,6 +2162,50 @@ Reference< XShape > const & Shape::createAndInsert(
u"SoftEdgeRadius"_ustr, Any(convertEmuToHmm(aEffectProperties.maSoftEdge.moRad.value())));
}
+ // Set text glow effect for shapes
+ if (mpTextBody && (!bDoNotInsertEmptyTextBody || !mpTextBody->isEmpty()))
+ {
+ const TextParagraphVector& rParagraphs = mpTextBody->getParagraphs();
+ if (!rParagraphs.empty())
+ {
+ EffectProperties aTextEffectProperties;
+ for (TextParagraphVector::const_iterator aPIt = rParagraphs.begin(), aPEnd = rParagraphs.end(); aPIt != aPEnd; ++aPIt)
+ {
+ const TextParagraph& rTextPara = **aPIt;
+ const TextCharacterProperties & rParaProps = rTextPara.getProperties().getTextCharacterProperties();
+ if (rParaProps.getEffectProperties().maGlow.moGlowRad.has_value())
+ {
+ aTextEffectProperties.assignUsed(rParaProps.getEffectProperties());
+ goto found;
+ }
+ else
+ {
+ for (TextRunVector::const_iterator aRIt = rTextPara.getRuns().begin(), aREnd = rTextPara.getRuns().end(); aRIt != aREnd; ++aRIt)
+ {
+ const TextRun& rTextRun = **aRIt;
+ const TextCharacterProperties& rRunrops = rTextRun.getTextCharacterProperties();
+ if (rRunrops.getEffectProperties().maGlow.moGlowRad.has_value())
+ {
+ aTextEffectProperties.assignUsed(rRunrops.getEffectProperties());
+ goto found;
+ }
+ }
+ }
+ }
+
+ found:
+ if (aTextEffectProperties.maGlow.moGlowRad.has_value())
+ {
+ xSet->setPropertyValue(u"GlowTextEffectRadius"_ustr,
+ uno::Any(convertEmuToHmm(aTextEffectProperties.maGlow.moGlowRad.value())));
+ xSet->setPropertyValue(u"GlowTextEffectColor"_ustr,
+ uno::Any(aTextEffectProperties.maGlow.moGlowColor.getColor(rGraphicHelper)));
+ xSet->setPropertyValue(u"GlowTextEffectTransparency"_ustr,
+ uno::Any(aTextEffectProperties.maGlow.moGlowColor.getTransparency()));
+ }
+ }
+ }
+
// Set the stroke and fill-color properties of the OLE shape
if (aServiceName == "com.sun.star.drawing.OLE2Shape" && mxOleObjectInfo
&& !mxOleObjectInfo->maShapeId.isEmpty())
diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx
index eafa93bf2c46..a32512743085 100644
--- a/oox/source/drawingml/textcharacterproperties.cxx
+++ b/oox/source/drawingml/textcharacterproperties.cxx
@@ -70,6 +70,7 @@ void TextCharacterProperties::assignUsed( const TextCharacterProperties& rSource
assignIfUsed( moTextOutlineProperties, rSourceProps.moTextOutlineProperties);
maTextEffectsProperties = rSourceProps.maTextEffectsProperties;
+ mpEffectPropertiesPtr->assignUsed(*rSourceProps.mpEffectPropertiesPtr);
maFillProperties.assignUsed( rSourceProps.maFillProperties );
}
diff --git a/oox/source/drawingml/textcharacterpropertiescontext.cxx b/oox/source/drawingml/textcharacterpropertiescontext.cxx
index 9bee9c88106a..711fa153b697 100644
--- a/oox/source/drawingml/textcharacterpropertiescontext.cxx
+++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx
@@ -21,6 +21,7 @@
#include <oox/helper/attributelist.hxx>
#include <drawingml/colorchoicecontext.hxx>
+#include <drawingml/effectpropertiescontext.hxx>
#include <drawingml/linepropertiescontext.hxx>
#include <drawingml/misccontexts.hxx>
#include <drawingml/textcharacterproperties.hxx>
@@ -129,6 +130,7 @@ ContextHandlerRef TextCharacterPropertiesContext::onCreateContext( sal_Int32 aEl
// EG_EffectProperties
case A_TOKEN( effectDag ): // CT_EffectContainer 5.1.10.25
case A_TOKEN( effectLst ): // CT_EffectList 5.1.10.26
+ return new EffectPropertiesContext(*this, mrTextCharacterProperties.getEffectProperties());
break;
case A_TOKEN( highlight ): // CT_Color
return new ColorContext(*this, mrTextCharacterProperties.maHighlightColor);
diff --git a/oox/source/drawingml/themeelementscontext.cxx b/oox/source/drawingml/themeelementscontext.cxx
index 921841b6a307..537a24441a85 100644
--- a/oox/source/drawingml/themeelementscontext.cxx
+++ b/oox/source/drawingml/themeelementscontext.cxx
@@ -26,7 +26,7 @@
#include <drawingml/textcharacterproperties.hxx>
#include <oox/drawingml/theme.hxx>
#include <oox/helper/attributelist.hxx>
-#include "effectproperties.hxx"
+#include <oox/drawingml/effectproperties.hxx>
#include <drawingml/effectpropertiescontext.hxx>
#include <oox/token/namespaces.hxx>
#include <oox/token/tokens.hxx>
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 227d1aa43dcf..4369aa225390 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -2761,6 +2761,13 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
else
WriteSolidFill(COL_BLACK);
}
+
+ if (rXShapePropSet.is() && GetDocumentType() != DOCUMENT_DOCX)
+ {
+ mpFS->startElementNS(XML_a, XML_effectLst);
+ WriteTextGlowEffect(rXShapePropSet);
+ mpFS->endElementNS(XML_a, XML_effectLst);
+ }
}
}
@@ -5573,7 +5580,7 @@ void DrawingML::WriteShapeEffect( std::u16string_view sName, const Sequence< Pro
nEffectToken = FSNS( XML_a, XML_innerShdw );
bContainsColor = true;
}
- else if( sName == u"glow" )
+ else if( sName == u"glow" || sName == u"glowtext" )
{
nEffectToken = FSNS( XML_a, XML_glow );
bContainsColor = true;
@@ -5916,6 +5923,30 @@ void DrawingML::WriteGlowEffect(const Reference< XPropertySet >& rXPropSet)
WriteShapeEffect(u"glow", aGlowProps);
}
+void DrawingML::WriteTextGlowEffect(const Reference< XPropertySet >& rXPropSet)
+{
+ if (!rXPropSet->getPropertySetInfo()->hasPropertyByName(u"GlowTextEffectRadius"_ustr))
+ {
+ return;
+ }
+
+ sal_Int32 nRad = 0;
+ rXPropSet->getPropertyValue(u"GlowTextEffectRadius"_ustr) >>= nRad;
+ if (!nRad)
+ return;
+
+ Sequence< PropertyValue > aGlowAttribs{ comphelper::makePropertyValue(
+ u"rad"_ustr, oox::drawingml::convertHmmToEmu(nRad)) };
+ Sequence< PropertyValue > aGlowProps{
+ comphelper::makePropertyValue(u"Attribs"_ustr, aGlowAttribs),
+ comphelper::makePropertyValue(u"RgbClr"_ustr, rXPropSet->getPropertyValue(u"GlowTextEffectColor"_ustr)),
+ comphelper::makePropertyValue(u"RgbClrTransparency"_ustr, rXPropSet->getPropertyValue(u"GlowTextEffectTransparency"_ustr))
+ };
+ // TODO other stuff like saturation or luminance
+
+ WriteShapeEffect(u"glowtext", aGlowProps);
+}
+
void DrawingML::WriteSoftEdgeEffect(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet)
{
if (!rXPropSet->getPropertySetInfo()->hasPropertyByName(u"SoftEdgeRadius"_ustr))
diff --git a/sc/sdi/drawsh.sdi b/sc/sdi/drawsh.sdi
index 668608c549ab..87688e93f8f7 100644
--- a/sc/sdi/drawsh.sdi
+++ b/sc/sdi/drawsh.sdi
@@ -221,6 +221,10 @@ interface TableDraw
SID_ATTR_GLOW_RADIUS [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawAttrState; ]
SID_ATTR_GLOW_TRANSPARENCY [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawAttrState; ]
+ SID_ATTR_GLOW_TEXT_COLOR [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawAttrState; ]
+ SID_ATTR_GLOW_TEXT_RADIUS [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawAttrState; ]
+ SID_ATTR_GLOW_TEXT_TRANSPARENCY [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawAttrState; ]
+
SID_ATTR_SOFTEDGE_RADIUS [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawAttrState; ]
SID_MOVE_SHAPE_HANDLE [ ExecMethod = ExecDrawAttr; ]
SID_ATTR_TEXTCOLUMNS_NUMBER [ ExecMethod = ExecDrawAttr; StateMethod = GetDrawAttrState; ]
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index c818820a7cda..b0728829cf49 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -400,6 +400,9 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
case SID_ATTR_GLOW_COLOR:
case SID_ATTR_GLOW_RADIUS:
case SID_ATTR_GLOW_TRANSPARENCY:
+ case SID_ATTR_GLOW_TEXT_COLOR:
+ case SID_ATTR_GLOW_TEXT_RADIUS:
+ case SID_ATTR_GLOW_TEXT_TRANSPARENCY:
case SID_ATTR_SOFTEDGE_RADIUS:
case SID_ATTR_TEXTCOLUMNS_NUMBER:
case SID_ATTR_TEXTCOLUMNS_SPACING:
diff --git a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
index 4073fa6f1af2..9ec0e09f5a6d 100644
--- a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
+++ b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
@@ -954,6 +954,22 @@ xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.
<rng:ref name="length"/>
</rng:attribute>
</rng:optional>
+ <!-- TODO: no proposal for loext:glow-text* -->
+ <rng:optional>
+ <rng:attribute name="loext:glow-text-radius">
+ <rng:ref name="length"/>
+ </rng:attribute>
+ </rng:optional>
+ <rng:optional>
+ <rng:attribute name="loext:glow-text-color">
+ <rng:ref name="color"/>
+ </rng:attribute>
+ </rng:optional>
+ <rng:optional>
+ <rng:attribute name="loext:glow-text-transparency">
+ <rng:ref name="zeroToHundredPercent"/>
+ </rng:attribute>
+ </rng:optional>
</rng:interleave>
</rng:define>
diff --git a/sd/qa/unit/data/odp/shape-text-glow-effect.odp b/sd/qa/unit/data/odp/shape-text-glow-effect.odp
new file mode 100644
index 000000000000..944d281cf99d
--- /dev/null
+++ b/sd/qa/unit/data/odp/shape-text-glow-effect.odp
Binary files differ
diff --git a/sd/qa/unit/data/pptx/shape-text-glow-effect.pptx b/sd/qa/unit/data/pptx/shape-text-glow-effect.pptx
new file mode 100644
index 000000000000..945c9baf5374
--- /dev/null
+++ b/sd/qa/unit/data/pptx/shape-text-glow-effect.pptx
Binary files differ
diff --git a/sd/qa/unit/export-tests-ooxml4.cxx b/sd/qa/unit/export-tests-ooxml4.cxx
index 054e2232107a..38afc68be086 100644
--- a/sd/qa/unit/export-tests-ooxml4.cxx
+++ b/sd/qa/unit/export-tests-ooxml4.cxx
@@ -474,6 +474,22 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testShapeGlowEffect)
CPPUNIT_ASSERT_EQUAL(sal_Int16(60), nTransparency);
}
+CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testShapeTextGlowEffect)
+{
+ createSdImpressDoc("pptx/shape-text-glow-effect.pptx");
+ saveAndReload(u"Impress Office Open XML"_ustr);
+ uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
+ sal_Int32 nRadius = -1;
+ xShape->getPropertyValue(u"GlowTextEffectRadius"_ustr) >>= nRadius;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(706), nRadius); // 20 pt = 706 mm/100
+ Color nColor;
+ xShape->getPropertyValue(u"GlowTextEffectColor"_ustr) >>= nColor;
+ CPPUNIT_ASSERT_EQUAL(Color(0x4EA72E), nColor);
+ sal_Int16 nTransparency;
+ xShape->getPropertyValue(u"GlowTextEffectTransparency"_ustr) >>= nTransparency;
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(5), nTransparency);
+}
+
CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testUnderline)
{
createSdImpressDoc("underline.fodp");
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 04ce872ffe10..c5630158f0d7 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -1534,6 +1534,47 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testGlow)
"glow-transparency"_ostr, u"60%"_ustr);
}
+CPPUNIT_TEST_FIXTURE(SdExportTest, testGlowTextInShape)
+{
+ createSdImpressDoc("odp/shape-text-glow-effect.odp");
+ saveAndReload(u"impress8"_ustr);
+
+ uno::Reference<drawing::XDrawPage> xDP(getPage(0));
+ uno::Reference<beans::XPropertySet> xShape(xDP->getByIndex(0), uno::UNO_QUERY);
+
+ // Check glow text properties in shapes
+ sal_Int32 nGlowEffectRad = 0;
+ CPPUNIT_ASSERT(xShape->getPropertyValue(u"GlowTextEffectRadius"_ustr) >>= nGlowEffectRad);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(706), nGlowEffectRad); // 20 pt = 706 mm/100
+ Color nGlowEffectColor;
+ CPPUNIT_ASSERT(xShape->getPropertyValue(u"GlowTextEffectColor"_ustr) >>= nGlowEffectColor);
+ CPPUNIT_ASSERT_EQUAL(Color(0x4EA72E), nGlowEffectColor);
+ sal_Int16 nGlowEffectTransparency = 0;
+ CPPUNIT_ASSERT(xShape->getPropertyValue(u"GlowTextEffectTransparency"_ustr)
+ >>= nGlowEffectTransparency);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(5), nGlowEffectTransparency);
+
+ // Test ODF element
+ xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
+
+ // check that we actually test graphic style
+ assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/style:style[3]"_ostr,
+ "family"_ostr, u"graphic"_ustr);
+ // check loext graphic attributes for th
+ assertXPath(
+ pXmlDoc,
+ "/office:document-content/office:automatic-styles/style:style[3]/style:graphic-properties"_ostr,
+ "glow-text-radius"_ostr, u"0.706cm"_ustr);
+ assertXPath(
+ pXmlDoc,
+ "/office:document-content/office:automatic-styles/style:style[3]/style:graphic-properties"_ostr,
+ "glow-text-color"_ostr, u"#4ea72e"_ustr);
+ assertXPath(
+ pXmlDoc,
+ "/office:document-content/office:automatic-styles/style:style[3]/style:graphic-properties"_ostr,
+ "glow-text-transparency"_ostr, u"5%"_ustr);
+}
+
CPPUNIT_TEST_FIXTURE(SdExportTest, testSoftEdges)
{
createSdDrawDoc("odg/softedges.odg");
diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx
index d66e12a52663..a39bc847c784 100644
--- a/sd/qa/unit/import-tests2.cxx
+++ b/sd/qa/unit/import-tests2.cxx
@@ -1664,6 +1664,22 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testShapeGlowEffectPPTXImpoer)
CPPUNIT_ASSERT_EQUAL(sal_Int16(60), nTransparency);
}
+CPPUNIT_TEST_FIXTURE(SdImportTest2, testShapeTextGlowEffectPPTXImport)
+{
+ createSdImpressDoc("pptx/shape-text-glow-effect.pptx");
+
+ uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0));
+ sal_Int32 nRadius = -1;
+ xShape->getPropertyValue(u"GlowTextEffectRadius"_ustr) >>= nRadius;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(706), nRadius); // 20 pt = 706 mm/100
+ Color nColor;
+ xShape->getPropertyValue(u"GlowTextEffectColor"_ustr) >>= nColor;
+ CPPUNIT_ASSERT_EQUAL(Color(0x4EA72E), nColor);
+ sal_Int16 nTransparency;
+ xShape->getPropertyValue(u"GlowTextEffectTransparency"_ustr) >>= nTransparency;
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(5), nTransparency);
+}
+
CPPUNIT_TEST_FIXTURE(SdImportTest2, testShapeBlurPPTXImport)
{
createSdImpressDoc("pptx/shape-blur-effect.pptx");
diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi
index 0d4bed12a9a7..f44bbfec51d7 100644
--- a/sd/sdi/_drvwsh.sdi
+++ b/sd/sdi/_drvwsh.sdi
@@ -2943,6 +2943,21 @@ interface DrawView
ExecMethod = FuTemporary;
StateMethod = GetAttrState;
]
+ SID_ATTR_GLOW_TEXT_COLOR
+ [
+ ExecMethod = FuTemporary ;
+ StateMethod = GetAttrState ;
+ ]
+ SID_ATTR_GLOW_TEXT_RADIUS
+ [
+ ExecMethod = FuTemporary;
+ StateMethod = GetAttrState;
+ ]
+ SID_ATTR_GLOW_TEXT_TRANSPARENCY
+ [
+ ExecMethod = FuTemporary;
+ StateMethod = GetAttrState;
+ ]
SID_ATTR_SOFTEDGE_RADIUS
[
ExecMethod = FuTemporary;
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index d464f1a8e955..9a8e86639865 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -3626,6 +3626,9 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_ATTR_GLOW_COLOR:
case SID_ATTR_GLOW_RADIUS:
case SID_ATTR_GLOW_TRANSPARENCY:
+ case SID_ATTR_GLOW_TEXT_COLOR:
+ case SID_ATTR_GLOW_TEXT_RADIUS:
+ case SID_ATTR_GLOW_TEXT_TRANSPARENCY:
case SID_ATTR_SOFTEDGE_RADIUS:
case SID_ATTR_TEXTCOLUMNS_NUMBER:
case SID_ATTR_TEXTCOLUMNS_SPACING:
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index 1c1577b7ab91..037207137c75 100644
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -440,6 +440,9 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
case SID_ATTR_GLOW_COLOR:
case SID_ATTR_GLOW_RADIUS:
case SID_ATTR_GLOW_TRANSPARENCY:
+ case SID_ATTR_GLOW_TEXT_COLOR:
+ case SID_ATTR_GLOW_TEXT_RADIUS:
+ case SID_ATTR_GLOW_TEXT_TRANSPARENCY:
case SID_ATTR_SOFTEDGE_RADIUS:
case SID_SET_SUB_SCRIPT:
case SID_SET_SUPER_SCRIPT:
diff --git a/static/CustomTarget_emscripten_fs_image.mk b/static/CustomTarget_emscripten_fs_image.mk
index 46f587118c88..b83676900859 100644
--- a/static/CustomTarget_emscripten_fs_image.mk
+++ b/static/CustomTarget_emscripten_fs_image.mk
@@ -1308,6 +1308,7 @@ gb_emscripten_fs_image_files += \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/svx/ui/selectionmenu.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/svx/ui/sidebararea.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/svx/ui/sidebareffect.ui \
+ $(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/svx/ui/sidebartexteffect.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/svx/ui/sidebarempty.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/svx/ui/sidebarfontwork.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/svx/ui/sidebargallery.ui \
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index 75b20d54506d..0160bc2a4a6d 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -235,6 +235,7 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
svx/source/sidebar/area/AreaPropertyPanelBase \
svx/source/sidebar/area/AreaTransparencyGradientPopup \
svx/source/sidebar/effect/EffectPropertyPanel \
+ svx/source/sidebar/effect/TextEffectPropertyPanel \
svx/source/sidebar/fontwork/FontworkPropertyPanel \
svx/source/sidebar/shadow/ShadowPropertyPanel \
svx/source/sidebar/graphic/GraphicPropertyPanel \
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index 9a1553005a85..fdbf7027ab35 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -123,6 +123,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/sidebararea \
svx/uiconfig/ui/sidebarempty \
svx/uiconfig/ui/sidebareffect \
+ svx/uiconfig/ui/sidebartexteffect \
svx/uiconfig/ui/sidebarfontwork \
svx/uiconfig/ui/sidebarshadow \
svx/uiconfig/ui/sidebargallery \
diff --git a/svx/inc/sdr/attribute/sdreffectstextattribute.hxx b/svx/inc/sdr/attribute/sdreffectstextattribute.hxx
index 95a7ffa3e356..f539dce750c3 100644
--- a/svx/inc/sdr/attribute/sdreffectstextattribute.hxx
+++ b/svx/inc/sdr/attribute/sdreffectstextattribute.hxx
@@ -22,6 +22,7 @@
#include <drawinglayer/attribute/sdrshadowattribute.hxx>
#include <sdr/attribute/sdrtextattribute.hxx>
#include <drawinglayer/attribute/sdrglowattribute.hxx>
+#include <drawinglayer/attribute/sdrglowtextattribute.hxx>
namespace drawinglayer::attribute
@@ -35,6 +36,9 @@ namespace drawinglayer::attribute
// glow effect
SdrGlowAttribute maGlow;
+ // glow text effect
+ SdrGlowTextAttribute maGlowText;
+
// soft edge
sal_Int32 mnSoftEdgeRadius = 0;
@@ -43,6 +47,7 @@ namespace drawinglayer::attribute
SdrShadowAttribute aShadow,
SdrTextAttribute aTextAttribute,
SdrGlowAttribute aGlow,
+ SdrGlowTextAttribute aGlowText,
sal_Int32 nSoftEdgeRadius);
SdrEffectsTextAttribute();
SdrEffectsTextAttribute(const SdrEffectsTextAttribute& rCandidate);
@@ -58,6 +63,7 @@ namespace drawinglayer::attribute
const SdrShadowAttribute& getShadow() const { return maShadow; }
const SdrTextAttribute& getText() const { return maTextAttribute; }
const SdrGlowAttribute& getGlow() const { return maGlow; }
+ const SdrGlowTextAttribute& getGlowText() const { return maGlowText; }
sal_Int32 getSoftEdgeRadius() const { return mnSoftEdgeRadius; }
};
diff --git a/svx/inc/sdr/attribute/sdrlineeffectstextattribute.hxx b/svx/inc/sdr/attribute/sdrlineeffectstextattribute.hxx
index 3134b0b78b4e..345ceacf67c8 100644
--- a/svx/inc/sdr/attribute/sdrlineeffectstextattribute.hxx
+++ b/svx/inc/sdr/attribute/sdrlineeffectstextattribute.hxx
@@ -21,6 +21,7 @@
#include <sdr/attribute/sdreffectstextattribute.hxx>
#include <drawinglayer/attribute/sdrglowattribute.hxx>
+#include <drawinglayer/attribute/sdrglowtextattribute.hxx>
#include <drawinglayer/attribute/sdrlineattribute.hxx>
#include <drawinglayer/attribute/sdrlinestartendattribute.hxx>
@@ -40,6 +41,7 @@ namespace drawinglayer::attribute
const SdrShadowAttribute& rShadow,
const SdrTextAttribute& rTextAttribute,
const SdrGlowAttribute& rGlow,
+ const SdrGlowTextAttribute& rGlowText,
sal_Int32 nSoftEdgeRadius);
SdrLineEffectsTextAttribute();
SdrLineEffectsTextAttribute(const SdrLineEffectsTextAttribute& rCandidate);
diff --git a/svx/inc/sdr/attribute/sdrlinefilleffectstextattribute.hxx b/svx/inc/sdr/attribute/sdrlinefilleffectstextattribute.hxx
index 0adb1e49ffc2..56b22f65fe91 100644
--- a/svx/inc/sdr/attribute/sdrlinefilleffectstextattribute.hxx
+++ b/svx/inc/sdr/attribute/sdrlinefilleffectstextattribute.hxx
@@ -41,6 +41,7 @@ namespace drawinglayer::attribute
FillGradientAttribute aFillFloatTransGradient,
const SdrTextAttribute& rTextAttribute,
const SdrGlowAttribute& rGlow,
+ const SdrGlowTextAttribute& rGlowText,
sal_Int32 nSoftEdgeRadius);
SdrLineFillEffectsTextAttribute();
SdrLineFillEffectsTextAttribute(const SdrLineFillEffectsTextAttribute& rCandidate);
diff --git a/svx/inc/sdr/primitive2d/sdrattributecreator.hxx b/svx/inc/sdr/primitive2d/sdrattributecreator.hxx
index 92a2b102ffdb..1bc3cc2f2f28 100644
--- a/svx/inc/sdr/primitive2d/sdrattributecreator.hxx
+++ b/svx/inc/sdr/primitive2d/sdrattributecreator.hxx
@@ -26,12 +26,14 @@
// predefines
class SfxItemSet;
class SdrText;
+class SvxFontHeightItem;
namespace drawinglayer::attribute {
class SdrLineAttribute;
class SdrLineStartEndAttribute;
class SdrShadowAttribute;
class SdrGlowAttribute;
+ class SdrGlowTextAttribute;
class SdrFillAttribute;
class SdrTextAttribute;
class FillGradientAttribute;
diff --git a/svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx b/svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx
index e504acd41ab6..48df2f1e6f3d 100644
--- a/svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx
+++ b/svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx
@@ -21,6 +21,7 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <drawinglayer/attribute/sdrglowattribute.hxx>
+#include <drawinglayer/attribute/sdrglowtextattribute.hxx>
#include <drawinglayer/primitive2d/Primitive2DContainer.hxx>
#include <svx/svxdllapi.h>
@@ -78,6 +79,10 @@ namespace drawinglayer::primitive2d
Primitive2DContainer&& rContent,
const attribute::SdrGlowAttribute& rGlow);
+ Primitive2DContainer SVXCORE_DLLPUBLIC createEmbeddedTextGlowPrimitive(
+ Primitive2DContainer&& rContent,
+ const attribute::SdrGlowTextAttribute& rGlow);
+
Primitive2DContainer SVXCORE_DLLPUBLIC createEmbeddedSoftEdgePrimitive(
Primitive2DContainer&& aContent,
sal_Int32 nRadius);
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index 51ab792cf969..ef8c9e32fd98 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -12698,6 +12698,57 @@ SdrPercentItem GlowTransparency SID_ATTR_GLOW_TRANSPARENCY
GroupId = SfxGroupId::Document;
]
+XColorItem GlowTextColor SID_ATTR_GLOW_TEXT_COLOR
+
+[
+ AutoUpdate = TRUE,
+ FastCall = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = SfxGroupId::Document;
+]
+
+SdrMetricItem GlowTextRadius SID_ATTR_GLOW_TEXT_RADIUS
+
+[
+ AutoUpdate = TRUE,
+ FastCall = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = SfxGroupId::Document;
+]
+
+SdrPercentItem GlowTextTransparency SID_ATTR_GLOW_TEXT_TRANSPARENCY
+
+[
+ AutoUpdate = TRUE,
+ FastCall = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = SfxGroupId::Document;
+]
+
SdrMetricItem SoftEdgeRadius SID_ATTR_SOFTEDGE_RADIUS
[
diff --git a/svx/source/sdr/attribute/sdreffectstextattribute.cxx b/svx/source/sdr/attribute/sdreffectstextattribute.cxx
index 30d8a6db1c1e..9275a965c421 100644
--- a/svx/source/sdr/attribute/sdreffectstextattribute.cxx
+++ b/svx/source/sdr/attribute/sdreffectstextattribute.cxx
@@ -28,10 +28,12 @@ namespace drawinglayer::attribute
SdrShadowAttribute aShadow,
SdrTextAttribute aTextAttribute,
SdrGlowAttribute aGlow,
+ SdrGlowTextAttribute aGlowText,
sal_Int32 nSoftEdgeRadius)
: maShadow(std::move(aShadow)),
maTextAttribute(std::move(aTextAttribute)),
maGlow(std::move(aGlow)),
+ maGlowText(std::move(aGlowText)),
mnSoftEdgeRadius(nSoftEdgeRadius)
{
}
@@ -44,6 +46,7 @@ namespace drawinglayer::attribute
: maShadow(rCandidate.getShadow()),
maTextAttribute(rCandidate.getText()),
maGlow(rCandidate.maGlow),
+ maGlowText(rCandidate.maGlowText),
mnSoftEdgeRadius(rCandidate.mnSoftEdgeRadius)
{
}
@@ -53,6 +56,7 @@ namespace drawinglayer::attribute
maShadow = rCandidate.getShadow();
maTextAttribute = rCandidate.getText();
maGlow = rCandidate.maGlow;
+ maGlowText = rCandidate.maGlowText;
mnSoftEdgeRadius = rCandidate.mnSoftEdgeRadius;
return *this;
@@ -61,7 +65,8 @@ namespace drawinglayer::attribute
bool SdrEffectsTextAttribute::isDefault() const
{
return (getShadow().isDefault()
- && getText().isDefault() && maGlow.isDefault() && getSoftEdgeRadius() == 0);
+ && getText().isDefault() && maGlow.isDefault()
+ && maGlowText.isDefault() && getSoftEdgeRadius() == 0);
}
bool SdrEffectsTextAttribute::operator==(const SdrEffectsTextAttribute& rCandidate) const
@@ -69,6 +74,7 @@ namespace drawinglayer::attribute
return (getShadow() == rCandidate.getShadow()
&& getText() == rCandidate.getText()
&& getGlow() == rCandidate.getGlow()
+ && getGlowText() == rCandidate.getGlowText()
&& getSoftEdgeRadius() == rCandidate.getSoftEdgeRadius());
}
diff --git a/svx/source/sdr/attribute/sdrlineeffectstextattribute.cxx b/svx/source/sdr/attribute/sdrlineeffectstextattribute.cxx
index c3f3dbcb18c4..ca9402c707a1 100644
--- a/svx/source/sdr/attribute/sdrlineeffectstextattribute.cxx
+++ b/svx/source/sdr/attribute/sdrlineeffectstextattribute.cxx
@@ -30,8 +30,9 @@ namespace drawinglayer::attribute
const SdrShadowAttribute& rShadow,
const SdrTextAttribute& rTextAttribute,
const SdrGlowAttribute& rGlow,
+ const SdrGlowTextAttribute& rGlowText,
sal_Int32 nSoftEdgeRadius)
- : SdrEffectsTextAttribute(rShadow, rTextAttribute, rGlow, nSoftEdgeRadius),
+ : SdrEffectsTextAttribute(rShadow, rTextAttribute, rGlow, rGlowText, nSoftEdgeRadius),
maLine(std::move(aLine)),
maLineStartEnd(std::move(aLineStartEnd))
{
diff --git a/svx/source/sdr/attribute/sdrlinefilleffectstextattribute.cxx b/svx/source/sdr/attribute/sdrlinefilleffectstextattribute.cxx
index 4d57225b2fb3..a5b7ab9cac2f 100644
--- a/svx/source/sdr/attribute/sdrlinefilleffectstextattribute.cxx
+++ b/svx/source/sdr/attribute/sdrlinefilleffectstextattribute.cxx
@@ -32,8 +32,9 @@ namespace drawinglayer::attribute
FillGradientAttribute aFillFloatTransGradient,
const SdrTextAttribute& rTextAttribute,
const SdrGlowAttribute& rGlow,
+ const SdrGlowTextAttribute& rGlowText,
sal_Int32 nSoftEdgeRadius)
- : SdrLineEffectsTextAttribute(rLine, rLineStartEnd, rShadow, rTextAttribute, rGlow, nSoftEdgeRadius),
+ : SdrLineEffectsTextAttribute(rLine, rLineStartEnd, rShadow, rTextAttribute, rGlow, rGlowText, nSoftEdgeRadius),
maFill(std::move(aFill)),
maFillFloatTransGradient(std::move(aFillFloatTransGradient))
{
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index 4a1f2c6560e2..192e6b080acf 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -72,6 +72,9 @@
#include <svx/svdmodel.hxx>
#include <svx/xflbmsli.hxx>
#include <editeng/editstat.hxx>
+#include <editeng/eeitem.hxx>
+#include <editeng/fhgtitem.hxx>
+#include <editeng/editobj.hxx>
#include <osl/diagnose.h>
#include <drawinglayer/attribute/fillhatchattribute.hxx>
#include <drawinglayer/attribute/fillgradientattribute.hxx>
@@ -80,12 +83,15 @@
#include <sdr/attribute/sdrformtextattribute.hxx>
#include <sdr/attribute/sdrlinefilleffectstextattribute.hxx>
#include <drawinglayer/attribute/sdrglowattribute.hxx>
+#include <drawinglayer/attribute/sdrglowtextattribute.hxx>
#include <drawinglayer/attribute/sdrsceneattribute3d.hxx>
#include <drawinglayer/attribute/sdrlightingattribute3d.hxx>
#include <drawinglayer/attribute/sdrlightattribute3d.hxx>
#include <sdr/attribute/sdrfilltextattribute.hxx>
#include <com/sun/star/drawing/LineCap.hpp>
+#include <math.h>
+
using namespace com::sun::star;
namespace drawinglayer
@@ -187,9 +193,12 @@ namespace drawinglayer
attribute::SdrGlowAttribute createNewSdrGlowAttribute(const SfxItemSet& rSet)
{
sal_Int32 nRadius = rSet.Get(SDRATTR_GLOW_RADIUS).GetValue();
+
if (!nRadius)
return attribute::SdrGlowAttribute();
+
Color aColor(rSet.Get(SDRATTR_GLOW_COLOR).GetColorValue());
+
sal_uInt16 nTransparency(rSet.Get(SDRATTR_GLOW_TRANSPARENCY).GetValue());
if (nTransparency)
aColor.SetAlpha(255 - std::round(nTransparency / 100.0 * 255.0));
@@ -198,6 +207,55 @@ namespace drawinglayer
return glowAttr;
}
+ attribute::SdrGlowTextAttribute createNewSdrGlowTextAttribute(const SfxItemSet& rSet, const SdrTextObj& rTextObj)
+ {
+ sal_Int32 nTextRadius = rSet.Get(SDRATTR_GLOW_TEXT_RADIUS).GetValue();
+
+ if (!nTextRadius)
+ return attribute::SdrGlowTextAttribute();
+
+ Color aTextColor(rSet.Get(SDRATTR_GLOW_TEXT_COLOR).GetColorValue());
+
+ sal_uInt16 nTextTransparency(rSet.Get(SDRATTR_GLOW_TEXT_TRANSPARENCY).GetValue());
+ if (nTextTransparency)
+ aTextColor.SetAlpha(255 - std::round(nTextTransparency / 100.0 * 255.0));
+
+ // calculate rendering text glow radius from biggest Char size for the full text in shape
+ double nRadius = 0.0;
+ const SvxFontHeightItem& rItem = *rSet.GetItemIfSet(EE_CHAR_FONTHEIGHT);
+ sal_uInt32 nFontSize = rItem.GetHeight();
+
+ if (rTextObj.GetOutlinerParaObject())
+ {
+ const EditTextObject& aEdit = rTextObj.GetOutlinerParaObject()->GetTextObject();
+ for (sal_Int32 i = 0; i < aEdit.GetParagraphCount(); i++)
+ {
+ std::vector<EECharAttrib> aAttribs;
+ aEdit.GetCharAttribs(i, aAttribs);
+ for (const auto& attrib : aAttribs)
+ {
+ if (const SvxFontHeightItem* pFontHeight = dynamic_cast<const SvxFontHeightItem*>(attrib.pAttr))
+ {
+ if (nFontSize < pFontHeight->GetHeight())
+ nFontSize = pFontHeight->GetHeight();
+ }
+ }
+ }
+ }
+
+ if (nFontSize)
+ {
+ // Rendering_glow_size = Original_glow_size / (154.39 * FontSize ^ -0,621)
+ // This is an approximate calculation similar to MSO text glow size which is
+ // depending on font size
+ nRadius = nTextRadius / (154.39 * pow(nFontSize, -0.621));
+ nTextRadius = std::round(nRadius);
+ }
+
+ attribute::SdrGlowTextAttribute glowTextAttr{ nTextRadius, aTextColor };
+ return glowTextAttr;
+ }
+
sal_Int32 getSoftEdgeRadius(const SfxItemSet& rSet)
{
return rSet.Get(SDRATTR_SOFTEDGE_RADIUS).GetValue();
@@ -749,10 +807,11 @@ namespace drawinglayer::primitive2d
// try shadow
const attribute::SdrShadowAttribute aShadow(createNewSdrShadowAttribute(rSet));
const attribute::SdrGlowAttribute aGlow(createNewSdrGlowAttribute(rSet));
+ const attribute::SdrGlowTextAttribute aGlowText(createNewSdrGlowTextAttribute(rSet, pText->GetObject()));
const sal_Int32 nSoftEdgeRadius(getSoftEdgeRadius(rSet));
return attribute::SdrEffectsTextAttribute(aShadow, std::move(aText),
- aGlow, nSoftEdgeRadius);
+ aGlow, aGlowText, nSoftEdgeRadius);
}
attribute::SdrLineEffectsTextAttribute createNewSdrLineEffectsTextAttribute(
@@ -796,13 +855,15 @@ namespace drawinglayer::primitive2d
// try shadow
attribute::SdrShadowAttribute aShadow(createNewSdrShadowAttribute(rSet));
attribute::SdrGlowAttribute aGlow = createNewSdrGlowAttribute(rSet);
+ attribute::SdrGlowTextAttribute aGlowText = createNewSdrGlowTextAttribute(rSet, pText->GetObject());
const sal_Int32 nSoftEdgeRadius(getSoftEdgeRadius(rSet));
return attribute::SdrLineEffectsTextAttribute(std::move(aLine),
std::move(aLineStartEnd),
std::move(aShadow),
std::move(aText),
- std::move(aGlow), nSoftEdgeRadius);
+ std::move(aGlow),
+ std::move(aGlowText), nSoftEdgeRadius);
}
return attribute::SdrLineEffectsTextAttribute();
@@ -868,11 +929,14 @@ namespace drawinglayer::primitive2d
// glow
const attribute::SdrGlowAttribute aGlow = createNewSdrGlowAttribute(rSet);
+ // text glow
+ const attribute::SdrGlowTextAttribute aGlowText = createNewSdrGlowTextAttribute(rSet, pText->GetObject());
+
const sal_Int32 nSoftEdgeRadius(getSoftEdgeRadius(rSet));
return attribute::SdrLineFillEffectsTextAttribute(aLine, std::move(aFill), aLineStartEnd,
aShadow, std::move(aFillFloatTransGradient),
- aText, aGlow, nSoftEdgeRadius);
+ aText, aGlow, aGlowText, nSoftEdgeRadius);
}
return attribute::SdrLineFillEffectsTextAttribute();
diff --git a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
index bfdd4922f1b3..88cc3cf9bc61 100644
--- a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
@@ -44,12 +44,20 @@ namespace drawinglayer::primitive2d
getSdrSTAttribute().getSoftEdgeRadius());
}
+ // tdf#132199: put glow before shadow, to have shadow of the glow, not the opposite
+ if (!aRetval.empty() && !getSdrSTAttribute().getGlow().isDefault())
+ {
+ // glow
+ aRetval = createEmbeddedGlowPrimitive(std::move(aRetval), getSdrSTAttribute().getGlow());
+ }
+
// add text
if(!getSdrSTAttribute().getText().isDefault())
{
const basegfx::B2DPolygon& aUnitOutline(basegfx::utils::createUnitPolygon());
- aRetval.push_back(
+ Primitive2DContainer aTempContentText;
+ aTempContentText.push_back(
createTextPrimitive(
basegfx::B2DPolyPolygon(aUnitOutline),
getTextBox(),
@@ -57,13 +65,14 @@ namespace drawinglayer::primitive2d
attribute::SdrLineAttribute(),
false,
getWordWrap()));
- }
- // tdf#132199: put glow before shadow, to have shadow of the glow, not the opposite
- if (!aRetval.empty() && !getSdrSTAttribute().getGlow().isDefault())
- {
- // glow
- aRetval = createEmbeddedGlowPrimitive(std::move(aRetval), getSdrSTAttribute().getGlow());
+ // put text glow before, shape glow and shadow
+ if (!aTempContentText.empty() && !getSdrSTAttribute().getGlowText().isDefault())
+ {
+ // add text glow
+ aTempContentText = createEmbeddedTextGlowPrimitive(std::move(aTempContentText), getSdrSTAttribute().getGlowText());
+ }
+ aRetval.append(std::move(aTempContentText));
}
// add shadow
diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
index b6d97a9fa39b..a29d1cbb1900 100644
--- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
+++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
@@ -52,6 +52,7 @@
#include <drawinglayer/attribute/sdrlinestartendattribute.hxx>
#include <drawinglayer/attribute/sdrshadowattribute.hxx>
#include <drawinglayer/attribute/sdrglowattribute.hxx>
+#include <drawinglayer/attribute/sdrglowtextattribute.hxx>
#include <docmodel/theme/FormatScheme.hxx>
#include <osl/diagnose.h>
@@ -931,6 +932,20 @@ sal_uInt32 SlideBackgroundFillPrimitive2D::getPrimitive2DID() const
return aRetval;
}
+ Primitive2DContainer createEmbeddedTextGlowPrimitive(
+ Primitive2DContainer&& rContent,
+ const attribute::SdrGlowTextAttribute& rGlow)
+ {
+ if (rContent.empty())
+ return std::move(rContent);
+
+ Primitive2DContainer aRetval(2);
+ aRetval[0] = new GlowPrimitive2D(rGlow.getTextColor(), rGlow.getTextRadius(), Primitive2DContainer(rContent));
+ aRetval[1] = new GroupPrimitive2D(Primitive2DContainer(std::move(rContent)));
+
+ return aRetval;
+ }
+
Primitive2DContainer createEmbeddedSoftEdgePrimitive(Primitive2DContainer&& aContent,
sal_Int32 nRadius)
{
diff --git a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
index 2b1f10a81aa6..cdfd75a88b98 100644
--- a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
@@ -92,7 +92,8 @@ namespace drawinglayer::primitive2d
// add text
if(!getSdrLFSTAttribute().getText().isDefault())
{
- aRetval.push_back(
+ Primitive2DContainer aTempContentText;
+ aTempContentText.push_back(
createTextPrimitive(
basegfx::B2DPolyPolygon(aUnitOutline),
getTransform(),
@@ -100,6 +101,14 @@ namespace drawinglayer::primitive2d
getSdrLFSTAttribute().getLine(),
false,
false));
+
+ // put text glow before, shape glow and shadow
+ if (!aTempContentText.empty() && !getSdrLFSTAttribute().getGlowText().isDefault())
+ {
+ // add text glow
+ aTempContentText = createEmbeddedTextGlowPrimitive(std::move(aTempContentText), getSdrLFSTAttribute().getGlowText());
+ }
+ aRetval.append(std::move(aTempContentText));
}
// add shadow
diff --git a/svx/source/sdr/properties/customshapeproperties.cxx b/svx/source/sdr/properties/customshapeproperties.cxx
index 2626d133d1b0..c63d7e4a4b3c 100644
--- a/svx/source/sdr/properties/customshapeproperties.cxx
+++ b/svx/source/sdr/properties/customshapeproperties.cxx
@@ -71,7 +71,7 @@ namespace sdr::properties
// Graphic attributes, 3D properties, CustomShape
// properties:
SDRATTR_GRAF_FIRST, SDRATTR_CUSTOMSHAPE_LAST,
- SDRATTR_GLOW_FIRST, SDRATTR_SOFTEDGE_LAST,
+ SDRATTR_GLOW_FIRST, SDRATTR_GLOW_TEXT_LAST,
SDRATTR_TEXTCOLUMNS_FIRST, SDRATTR_TEXTCOLUMNS_LAST,
SDRATTR_WRITINGMODE2, SDRATTR_WRITINGMODE2,
// Range from SdrTextObj:
diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx
index cefb8895878f..bf19b885db5c 100644
--- a/svx/source/sdr/properties/textproperties.cxx
+++ b/svx/source/sdr/properties/textproperties.cxx
@@ -54,6 +54,7 @@ namespace sdr::properties
svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
+ SDRATTR_GLOW_TEXT_FIRST, SDRATTR_GLOW_TEXT_LAST,
SDRATTR_TEXTCOLUMNS_FIRST, SDRATTR_TEXTCOLUMNS_LAST,
// range from SdrTextObj
diff --git a/svx/source/sidebar/PanelFactory.cxx b/svx/source/sidebar/PanelFactory.cxx
index 6d1bd1cc8c60..20479e8efa65 100644
--- a/svx/source/sidebar/PanelFactory.cxx
+++ b/svx/source/sidebar/PanelFactory.cxx
@@ -27,6 +27,7 @@
#include "fontwork/FontworkPropertyPanel.hxx"
#include "shadow/ShadowPropertyPanel.hxx"
#include "effect/EffectPropertyPanel.hxx"
+#include "effect/TextEffectPropertyPanel.hxx"
#include "graphic/GraphicPropertyPanel.hxx"
#include "line/LinePropertyPanel.hxx"
#include "possize/PosSizePropertyPanel.hxx"
@@ -153,6 +154,10 @@ Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement (
{
xControl = EffectPropertyPanel::Create(pParent, pBindings);
}
+ else if (rsResourceURL.endsWith("/TextEffectPropertyPanel"))
+ {
+ xControl = TextEffectPropertyPanel::Create(pParent, pBindings);
+ }
else if (rsResourceURL.endsWith("/GraphicPropertyPanel"))
{
xControl = GraphicPropertyPanel::Create(pParent, pBindings);
diff --git a/svx/source/sidebar/effect/TextEffectPropertyPanel.cxx b/svx/source/sidebar/effect/TextEffectPropertyPanel.cxx
new file mode 100644
index 000000000000..ab8797ee904f
--- /dev/null
+++ b/svx/source/sidebar/effect/TextEffectPropertyPanel.cxx
@@ -0,0 +1,153 @@
+/* -*- 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 "TextEffectPropertyPanel.hxx"
+
+#include <sfx2/dispatch.hxx>
+#include <svx/colorbox.hxx>
+#include <svx/sdmetitm.hxx>
+#include <svx/sdprcitm.hxx>
+#include <svx/svddef.hxx>
+#include <svx/svxids.hrc>
+#include <svx/xcolit.hxx>
+#include <svl/itemset.hxx>
+
+namespace svx::sidebar
+{
+TextEffectPropertyPanel::TextEffectPropertyPanel(weld::Widget* pParent, SfxBindings* pBindings)
+ : PanelLayout(pParent, u"TextEffectPropertyPanel"_ustr, u"svx/ui/sidebartexteffect.ui"_ustr)
+ , maTGlowColorController(SID_ATTR_GLOW_TEXT_COLOR, *pBindings, *this)
+ , maTGlowRadiusController(SID_ATTR_GLOW_TEXT_RADIUS, *pBindings, *this)
+ , maTGlowTransparencyController(SID_ATTR_GLOW_TEXT_TRANSPARENCY, *pBindings, *this)
+ , mxFTTTransparency(m_xBuilder->weld_label(u"texttransparency"_ustr))
+ , mpBindings(pBindings)
+ , mxTGlowRadius(
+ m_xBuilder->weld_metric_spin_button(u"LB_GLOW_TEXT_RADIUS"_ustr, FieldUnit::POINT))
+ , mxLBTGlowColor(new ColorListBox(m_xBuilder->weld_menu_button(u"LB_GLOW_TEXT_COLOR"_ustr),
+ [this] { return GetFrameWeld(); }))
+ , mxTGlowTransparency(m_xBuilder->weld_metric_spin_button(u"LB_GLOW_TEXT_TRANSPARENCY"_ustr,
+ FieldUnit::PERCENT))
+ , mxFTTColor(m_xBuilder->weld_label(u"glowtextcolorlabel"_ustr))
+{
+ Initialize();
+}
+
+TextEffectPropertyPanel::~TextEffectPropertyPanel()
+{
+ mxTGlowRadius.reset();
+ mxLBTGlowColor.reset();
+ mxTGlowTransparency.reset();
+ mxFTTColor.reset();
+ mxFTTTransparency.reset();
+
+ maTGlowColorController.dispose();
+ maTGlowRadiusController.dispose();
+ maTGlowTransparencyController.dispose();
+}
+
+void TextEffectPropertyPanel::Initialize()
+{
+ mxTGlowRadius->connect_value_changed(LINK(this, TextEffectPropertyPanel, ModifyTGlowRadiusHdl));
+ mxLBTGlowColor->SetSelectHdl(LINK(this, TextEffectPropertyPanel, ModifyTGlowColorHdl));
+ mxTGlowTransparency->connect_value_changed(
+ LINK(this, TextEffectPropertyPanel, ModifyTGlowTransparencyHdl));
+}
+
+IMPL_LINK_NOARG(TextEffectPropertyPanel, ModifyTGlowRadiusHdl, weld::MetricSpinButton&, void)
+{
+ SdrMetricItem aItem(SDRATTR_GLOW_TEXT_RADIUS, mxTGlowRadius->get_value(FieldUnit::MM_100TH));
+ mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_GLOW_TEXT_RADIUS, SfxCallMode::RECORD,
+ { &aItem });
+}
+
+IMPL_LINK_NOARG(TextEffectPropertyPanel, ModifyTGlowColorHdl, ColorListBox&, void)
+{
+ XColorItem aItem(SDRATTR_GLOW_TEXT_COLOR, mxLBTGlowColor->GetSelectEntryColor());
+ mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_GLOW_TEXT_COLOR, SfxCallMode::RECORD,
+ { &aItem });
+}
+
+IMPL_LINK_NOARG(TextEffectPropertyPanel, ModifyTGlowTransparencyHdl, weld::MetricSpinButton&, void)
+{
+ SdrPercentItem aItem(SDRATTR_GLOW_TEXT_TRANSPARENCY,
+ mxTGlowTransparency->get_value(FieldUnit::PERCENT));
+ mpBindings->GetDispatcher()->ExecuteList(SID_ATTR_GLOW_TEXT_TRANSPARENCY, SfxCallMode::RECORD,
+ { &aItem });
+}
+
+void TextEffectPropertyPanel::UpdateControls()
+{
+ const bool bTEnabled = mxTGlowRadius->get_value(FieldUnit::MM_100TH) != 0;
+ mxLBTGlowColor->set_sensitive(bTEnabled);
+ mxTGlowTransparency->set_sensitive(bTEnabled);
+ mxFTTColor->set_sensitive(bTEnabled);
+ mxFTTTransparency->set_sensitive(bTEnabled);
+}
+
+void TextEffectPropertyPanel::NotifyItemUpdate(sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState)
+{
+ switch (nSID)
+ {
+ case SID_ATTR_GLOW_TEXT_COLOR:
+ {
+ if (eState >= SfxItemState::DEFAULT)
+ {
+ const XColorItem* pColorItem = dynamic_cast<const XColorItem*>(pState);
+ if (pColorItem)
+ {
+ mxLBTGlowColor->SelectEntry(pColorItem->GetColorValue());
+ }
+ }
+ }
+ break;
+ case SID_ATTR_GLOW_TEXT_RADIUS:
+ {
+ if (eState >= SfxItemState::DEFAULT)
+ {
+ const SdrMetricItem* pRadiusItem = dynamic_cast<const SdrMetricItem*>(pState);
+ if (pRadiusItem)
+ {
+ mxTGlowRadius->set_value(pRadiusItem->GetValue(), FieldUnit::MM_100TH);
+ }
+ }
+ }
+ break;
+ case SID_ATTR_GLOW_TEXT_TRANSPARENCY:
+ {
+ if (eState >= SfxItemState::DEFAULT)
+ {
+ if (auto pItem = dynamic_cast<const SdrPercentItem*>(pState))
+ {
+ mxTGlowTransparency->set_value(pItem->GetValue(), FieldUnit::PERCENT);
+ }
+ }
+ }
+ break;
+ }
+ UpdateControls();
+}
+
+std::unique_ptr<PanelLayout> TextEffectPropertyPanel::Create(weld::Widget* pParent,
+ SfxBindings* pBindings)
+{
+ if (pParent == nullptr)
+ throw css::lang::IllegalArgumentException(
+ u"no parent Window given to TextEffectPropertyPanel::Create"_ustr, nullptr, 0);
+ if (pBindings == nullptr)
+ throw css::lang::IllegalArgumentException(
+ u"no SfxBindings given to TextEffectPropertyPanel::Create"_ustr, nullptr, 2);
+
+ return std::make_unique<TextEffectPropertyPanel>(pParent, pBindings);
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sidebar/effect/TextEffectPropertyPanel.hxx b/svx/source/sidebar/effect/TextEffectPropertyPanel.hxx
new file mode 100644
index 000000000000..5966d407b055
--- /dev/null
+++ b/svx/source/sidebar/effect/TextEffectPropertyPanel.hxx
@@ -0,0 +1,58 @@
+/* -*- 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_EFFECT_TEXTEFFECTPROPERTYPANEL_HXX
+#define INCLUDED_SVX_SOURCE_SIDEBAR_EFFECT_TEXTEFFECTPROPERTYPANEL_HXX
+
+#include <sfx2/sidebar/ControllerItem.hxx>
+#include <sfx2/sidebar/PanelLayout.hxx>
+
+class ColorListBox;
+
+namespace svx::sidebar
+{
+class TextEffectPropertyPanel : public PanelLayout,
+ public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
+{
+public:
+ TextEffectPropertyPanel(weld::Widget* pParent, SfxBindings* pBindings);
+ virtual ~TextEffectPropertyPanel() override;
+
+ static std::unique_ptr<PanelLayout> Create(weld::Widget* pParent, 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 maTGlowColorController;
+ sfx2::sidebar::ControllerItem maTGlowRadiusController;
+ sfx2::sidebar::ControllerItem maTGlowTransparencyController;
+ std::unique_ptr<weld::Label> mxFTTTransparency;
+
+ SfxBindings* mpBindings;
+
+ std::unique_ptr<weld::MetricSpinButton> mxTGlowRadius;
+ std::unique_ptr<ColorListBox> mxLBTGlowColor;
+ std::unique_ptr<weld::MetricSpinButton> mxTGlowTransparency;
+ std::unique_ptr<weld::Label> mxFTTColor;
+
+ void Initialize();
+ void UpdateControls();
+
+ DECL_LINK(ModifyTGlowColorHdl, ColorListBox&, void);
+ DECL_LINK(ModifyTGlowRadiusHdl, weld::MetricSpinButton&, void);
+ DECL_LINK(ModifyTGlowTransparencyHdl, 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 cb6c197dfcd4..ab052e912031 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -429,6 +429,10 @@ static ItemInfoPackage& getItemInfoPackageSdr()
{ SDRATTR_SOFTEDGE_RADIUS, new SdrMetricItem(SDRATTR_SOFTEDGE_RADIUS, 0), SID_ATTR_SOFTEDGE_RADIUS, SFX_ITEMINFOFLAG_NONE },
+ { SDRATTR_GLOW_TEXT_RADIUS, new SdrMetricItem(SDRATTR_GLOW_TEXT_RADIUS, 0), SID_ATTR_GLOW_TEXT_RADIUS, SFX_ITEMINFOFLAG_NONE },
+ { SDRATTR_GLOW_TEXT_COLOR, new XColorItem(SDRATTR_GLOW_TEXT_COLOR, COL_BLACK), SID_ATTR_GLOW_TEXT_COLOR, SFX_ITEMINFOFLAG_NONE },
+ { SDRATTR_GLOW_TEXT_TRANSPARENCY, new SdrPercentItem(SDRATTR_GLOW_TEXT_TRANSPARENCY, 0), SID_ATTR_GLOW_TEXT_TRANSPARENCY, SFX_ITEMINFOFLAG_NONE },
+
{ SDRATTR_TEXTCOLUMNS_NUMBER, new SfxInt16Item(SDRATTR_TEXTCOLUMNS_NUMBER, 1), 0, SFX_ITEMINFOFLAG_NONE },
{ SDRATTR_TEXTCOLUMNS_SPACING, new SdrMetricItem(SDRATTR_TEXTCOLUMNS_SPACING, 0), 0, SFX_ITEMINFOFLAG_NONE },
@@ -603,6 +607,10 @@ OUString SdrItemPool::GetItemName(sal_uInt16 nWhich)
case SDRATTR_GLOW_COLOR : pResId = SIP_SA_GLOW_COLOR;break;
case SDRATTR_GLOW_TRANSPARENCY : pResId = SIP_SA_GLOW_TRANSPARENCY;break;
+ case SDRATTR_GLOW_TEXT_RADIUS : pResId = SIP_SA_GLOW_TEXT_RADIUS; break;
+ case SDRATTR_GLOW_TEXT_COLOR : pResId = SIP_SA_GLOW_TEXT_COLOR; break;
+ case SDRATTR_GLOW_TEXT_TRANSPARENCY : pResId = SIP_SA_GLOW_TEXT_TRANSPARENCY; break;
+
case SDRATTR_SOFTEDGE_RADIUS : pResId = SIP_SA_SOFTEDGE_RADIUS; break;
case SDRATTR_CAPTIONTYPE : pResId = SIP_SA_CAPTIONTYPE;break;
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 6d0d1a57ad76..fd6315976a5e 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -2900,7 +2900,8 @@ static const WhichRangesContainer& GetFormatRangeImpl(bool bTextOnly, bool withP
SDRATTR_MISC_LAST, // table cell formats
SDRATTR_GRAF_FIRST, SDRATTR_GRAF_LAST, SDRATTR_TABLE_FIRST, SDRATTR_TABLE_LAST,
SDRATTR_GLOW_FIRST, SDRATTR_GLOW_LAST, SDRATTR_SOFTEDGE_FIRST,
- SDRATTR_SOFTEDGE_LAST, EE_PARA_START, EE_PARA_END, EE_CHAR_START, EE_CHAR_END>);
+ SDRATTR_SOFTEDGE_LAST, SDRATTR_GLOW_TEXT_FIRST, SDRATTR_GLOW_TEXT_LAST,
+ EE_PARA_START, EE_PARA_END, EE_CHAR_START, EE_CHAR_END>);
static const WhichRangesContainer gTextOnly(
svl::Items<SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST, EE_CHAR_START, EE_CHAR_END>);
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index 356894621c0a..6b88355a88b8 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -65,6 +65,7 @@ static std::span<SfxItemPropertyMapEntry const> ImplGetSvxShapePropertyMap()
LINKTARGET_PROPERTIES
GLOW_PROPERTIES
SOFTEDGE_PROPERTIES
+ GLOW_TEXT_PROPERTIES
SHADOW_PROPERTIES
TEXT_PROPERTIES
// #FontWork#
@@ -89,6 +90,7 @@ static std::span<SfxItemPropertyMapEntry const> ImplGetSvxTextShapePropertyMap()
LINKTARGET_PROPERTIES
GLOW_PROPERTIES
SOFTEDGE_PROPERTIES
+ GLOW_TEXT_PROPERTIES
SHADOW_PROPERTIES
TEXT_PROPERTIES
// #FontWork#
@@ -114,6 +116,7 @@ static std::span<SfxItemPropertyMapEntry const> ImplGetSvxConnectorPropertyMap()
LINKTARGET_PROPERTIES
GLOW_PROPERTIES
SOFTEDGE_PROPERTIES
+ GLOW_TEXT_PROPERTIES
SHADOW_PROPERTIES
TEXT_PROPERTIES
// #FontWork#
@@ -139,6 +142,7 @@ static std::span<SfxItemPropertyMapEntry const> ImplGetSvxDimensioningPropertyMa
LINKTARGET_PROPERTIES
GLOW_PROPERTIES
SOFTEDGE_PROPERTIES
+ GLOW_TEXT_PROPERTIES
SHADOW_PROPERTIES
TEXT_PROPERTIES
// #FontWork#
@@ -164,6 +168,7 @@ static std::span<SfxItemPropertyMapEntry const> ImplGetSvxCirclePropertyMap()
LINKTARGET_PROPERTIES
GLOW_PROPERTIES
SOFTEDGE_PROPERTIES
+ GLOW_TEXT_PROPERTIES
SHADOW_PROPERTIES
TEXT_PROPERTIES
// #FontWork#
@@ -191,6 +196,7 @@ static std::span<SfxItemPropertyMapEntry const> ImplGetSvxPolyPolygonPropertyMap
LINKTARGET_PROPERTIES
GLOW_PROPERTIES
SOFTEDGE_PROPERTIES
+ GLOW_TEXT_PROPERTIES
SHADOW_PROPERTIES
TEXT_PROPERTIES
// #FontWork#
@@ -221,6 +227,7 @@ static std::span<SfxItemPropertyMapEntry const> ImplGetSvxGraphicObjectPropertyM
LINKTARGET_PROPERTIES
GLOW_PROPERTIES
SOFTEDGE_PROPERTIES
+ GLOW_TEXT_PROPERTIES
SHADOW_PROPERTIES
TEXT_PROPERTIES
// #FontWork#
@@ -366,6 +373,7 @@ static std::span<SfxItemPropertyMapEntry const> ImplGetSvxAllPropertyMap()
{
GLOW_PROPERTIES
SOFTEDGE_PROPERTIES
+ GLOW_TEXT_PROPERTIES
SHADOW_PROPERTIES
LINE_PROPERTIES
LINE_PROPERTIES_START_END
@@ -428,6 +436,7 @@ static std::span<SfxItemPropertyMapEntry const> ImplGetSvxOle2PropertyMap()
LINKTARGET_PROPERTIES
GLOW_PROPERTIES
SOFTEDGE_PROPERTIES
+ GLOW_TEXT_PROPERTIES
SHADOW_PROPERTIES
TEXT_PROPERTIES
FONTWORK_PROPERTIES
@@ -682,6 +691,7 @@ static std::span<SfxItemPropertyMapEntry const> ImplGetSvxCustomShapePropertyMap
LINKTARGET_PROPERTIES
GLOW_PROPERTIES
SOFTEDGE_PROPERTIES
+ GLOW_TEXT_PROPERTIES
SHADOW_PROPERTIES
TEXT_PROPERTIES
{u"UserDefinedAttributes"_ustr, SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0},
@@ -764,6 +774,7 @@ static std::span<comphelper::PropertyMapEntry const> ImplGetSvxDrawingDefaultsPr
{
GLOW_PROPERTIES
SOFTEDGE_PROPERTIES
+ GLOW_TEXT_PROPERTIES
SHADOW_PROPERTIES
LINE_PROPERTIES_DEFAULTS
FILL_PROPERTIES_BMP
diff --git a/svx/uiconfig/ui/sidebartexteffect.ui b/svx/uiconfig/ui/sidebartexteffect.ui
new file mode 100644
index 000000000000..e6484fc3d4fa
--- /dev/null
+++ b/svx/uiconfig/ui/sidebartexteffect.ui
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.38.2 -->
+<interface domain="svx">
+ <requires lib="gtk+" version="3.20"/>
+ <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>
+ <!-- n-columns=1 n-rows=1 -->
+ <object class="GtkGrid" id="TextEffectPropertyPanel">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <child>
+ <!-- n-columns=2 n-rows=4 -->
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="border-width">6</property>
+ <property name="row-spacing">3</property>
+ <property name="column-spacing">6</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes" context="sidebartextglow|glow">Text Glow</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="radiustextglow">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label" translatable="yes" context="sidebartextglow|radius">Radius:</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">LB_GLOW_TEXT_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="GtkLabel" id="glowtextcolorlabel">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label" translatable="yes" context="sidebartextglow|color">Color:</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">LB_GLOW_TEXT_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="GtkLabel" id="texttransparency">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label" translatable="yes" context="sidebartextglow|transparency">Transparency:</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">LB_GLOW_TEXT_TRANSPARENCY</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="LB_GLOW_TEXT_RADIUS">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="truncate-multiline">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="GtkMenuButton" id="LB_GLOW_TEXT_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>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="LB_GLOW_TEXT_TRANSPARENCY">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="truncate-multiline">True</property>
+ <property name="adjustment">adjustment2</property>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">3</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 6655b6fb2eda..f0d13b306f09 100644
--- a/sw/sdi/drawsh.sdi
+++ b/sw/sdi/drawsh.sdi
@@ -189,6 +189,27 @@ interface TextDraw : TextDrawBase
DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
]
+ SID_ATTR_GLOW_TEXT_COLOR
+ [
+ ExecMethod = ExecDrawAttrArgs ;
+ StateMethod = GetDrawAttrState ;
+ DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+ ]
+
+ SID_ATTR_GLOW_TEXT_RADIUS
+ [
+ ExecMethod = ExecDrawAttrArgs ;
+ StateMethod = GetDrawAttrState ;
+ DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+ ]
+
+ SID_ATTR_GLOW_TEXT_TRANSPARENCY
+ [
+ ExecMethod = ExecDrawAttrArgs ;
+ StateMethod = GetDrawAttrState ;
+ DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+ ]
+
SID_ATTR_SOFTEDGE_RADIUS
[
ExecMethod = ExecDrawAttrArgs ;
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 89c2654d9445..479e25fee7a9 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -381,6 +381,7 @@ bool isBuilderEnabledForSidebar(std::u16string_view rUIFile)
|| rUIFile == u"svx/ui/mediaplayback.ui"
|| rUIFile == u"svx/ui/sidebararea.ui"
|| rUIFile == u"svx/ui/sidebareffect.ui"
+ || rUIFile == u"svx/ui/sidebartexteffect.ui"
|| rUIFile == u"svx/ui/sidebarempty.ui"
|| rUIFile == u"svx/ui/sidebarfontwork.ui"
|| rUIFile == u"svx/ui/sidebargallery.ui"
diff --git a/xmloff/inc/xmlprop.hxx b/xmloff/inc/xmlprop.hxx
index 5b2793f9b2b6..b7acca175a1d 100644
--- a/xmloff/inc/xmlprop.hxx
+++ b/xmloff/inc/xmlprop.hxx
@@ -318,6 +318,9 @@ inline constexpr OUString PROP_GapWidth = u"GapWidth"_ustr;
inline constexpr OUString PROP_GlowEffectColor = u"GlowEffectColor"_ustr;
inline constexpr OUString PROP_GlowEffectRadius = u"GlowEffectRadius"_ustr;
inline constexpr OUString PROP_GlowEffectTransparency = u"GlowEffectTransparency"_ustr;
+inline constexpr OUString PROP_GlowTextEffectColor = u"GlowTextEffectColor"_ustr;
+inline constexpr OUString PROP_GlowTextEffectRadius = u"GlowTextEffectRadius"_ustr;
+inline constexpr OUString PROP_GlowTextEffectTransparency = u"GlowTextEffectTransparency"_ustr;
inline constexpr OUString PROP_GraphicColorMode = u"GraphicColorMode"_ustr;
inline constexpr OUString PROP_GraphicCrop = u"GraphicCrop"_ustr;
inline constexpr OUString PROP_GraphicIsInverted = u"GraphicIsInverted"_ustr;
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index 39ba7cc1b499..6f458260a69d 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -991,8 +991,11 @@ namespace xmloff::token {
TOKEN( "generator", XML_GENERATOR ),
TOKEN( "geq", XML_GEQ ),
TOKEN( "glow-radius", XML_GLOW_RADIUS ),
+ TOKEN( "glow-text-radius", XML_GLOW_TEXT_RADIUS ),
TOKEN( "glow-color", XML_GLOW_COLOR ),
+ TOKEN( "glow-text-color", XML_GLOW_TEXT_COLOR ),
TOKEN( "glow-transparency", XML_GLOW_TRANSPARENCY ),
+ TOKEN( "glow-text-transparency", XML_GLOW_TEXT_TRANSPARENCY ),
TOKEN( "gouraud", XML_GOURAUD ),
TOKEN( "gradient", XML_GRADIENT ),
TOKEN( "angle", XML_GRADIENT_ANGLE ),
diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index ce07c078e60a..b3c24a495d44 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -174,6 +174,11 @@ const XMLPropertyMapEntry aXMLSDProperties[] =
// soft edge attributes
GMAPV( PROP_SoftEdgeRadius, XML_NAMESPACE_LO_EXT, XML_SOFTEDGE_RADIUS, XML_TYPE_MEASURE , 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED),
+ // glow text attributes
+ GMAPV(PROP_GlowTextEffectRadius, XML_NAMESPACE_LO_EXT, XML_GLOW_TEXT_RADIUS, XML_TYPE_MEASURE , 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED),
+ GMAPV(PROP_GlowTextEffectColor, XML_NAMESPACE_LO_EXT, XML_GLOW_TEXT_COLOR, XML_TYPE_COLOR , 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED),
+ GMAPV(PROP_GlowTextEffectTransparency, XML_NAMESPACE_LO_EXT, XML_GLOW_TEXT_TRANSPARENCY, XML_TYPE_PERCENT16, 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED),
+
// graphic attributes
GMAP( PROP_GraphicColorMode, XML_NAMESPACE_DRAW, XML_COLOR_MODE, XML_TYPE_COLOR_MODE, 0 ), // exists in SW, too, with same property name
GMAP( PROP_AdjustLuminance, XML_NAMESPACE_DRAW, XML_LUMINANCE, XML_TYPE_PERCENT16, 0 ), // signed? exists in SW, too, with same property name
diff --git a/xmloff/source/token/tokens.txt b/xmloff/source/token/tokens.txt
index 29aa2c055658..9ade81537b5f 100644
--- a/xmloff/source/token/tokens.txt
+++ b/xmloff/source/token/tokens.txt
@@ -896,8 +896,11 @@ gcd
generator
geq
glow-radius
+glow-text-radius
glow-color
+glow-text-color
glow-transparency
+glow-text-transparency
gouraud
gradient
angle