summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2023-07-05 14:04:17 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2023-07-05 19:54:17 +0200
commit6efc72b99a08384e56c5a4da7918177be60b3b09 (patch)
tree67e228fb3914c392a009bc0191a63287678fed8c /include
parent082993c38e68089282b42fdb46179ac2574d61d5 (diff)
tdf#138504 svx,etc.: decorative flag on SdrObject shapes
* SdrObject new member m_IsDecorative * new Undo SdrUndoObjDecorative * surprising amount of changes in sw including additional SwUndoFlyDecorative * svx API SvxShape property "Decorative" * UI checkbox "Decorative" * ODF import/export as loext:decorative on style:graphic-properties * PDF/UA export: ViewObjectContcat tag shapes with this flag as Artifact Change-Id: I37f7a0597eab92c6c6aff94fad6c16c59b231c80 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154063 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'include')
-rw-r--r--include/cui/dlgname.hxx6
-rw-r--r--include/svl/solar.hrc2
-rw-r--r--include/svx/strings.hrc1
-rw-r--r--include/svx/svdobj.hxx2
-rw-r--r--include/svx/svdovirt.hxx2
-rw-r--r--include/svx/svdundo.hxx16
-rw-r--r--include/svx/svxdlg.hxx3
-rw-r--r--include/svx/unoshprp.hxx4
8 files changed, 32 insertions, 4 deletions
diff --git a/include/cui/dlgname.hxx b/include/cui/dlgname.hxx
index 1a7ffc4f3bd5..04fc5610e937 100644
--- a/include/cui/dlgname.hxx
+++ b/include/cui/dlgname.hxx
@@ -110,12 +110,16 @@ private:
// description
std::unique_ptr<weld::TextView> m_xEdtDescription;
+ std::unique_ptr<weld::CheckButton> m_xDecorativeCB;
+
public:
// constructor
- SvxObjectTitleDescDialog(weld::Window* pWindow, const OUString& rTitle, const OUString& rDesc);
+ SvxObjectTitleDescDialog(weld::Window* pWindow, const OUString& rTitle, const OUString& rDesc,
+ bool isDecorative);
// data access
OUString GetTitle() const { return m_xEdtTitle->get_text(); }
OUString GetDescription() const { return m_xEdtDescription->get_text(); }
+ bool IsDecorative() const { return m_xDecorativeCB->get_active(); }
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svl/solar.hrc b/include/svl/solar.hrc
index 5caeb64f40c2..f1ec1a456829 100644
--- a/include/svl/solar.hrc
+++ b/include/svl/solar.hrc
@@ -23,7 +23,7 @@
// defines ------------------------------------------------------------------
#define OWN_ATTR_VALUE_START 3900
-#define OWN_ATTR_VALUE_END 4007
+#define OWN_ATTR_VALUE_END 4008
#define RID_LIB_START 10000
#define RID_LIB_END 19999
diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc
index eb8ca335f91c..80066b3d33f3 100644
--- a/include/svx/strings.hrc
+++ b/include/svx/strings.hrc
@@ -258,6 +258,7 @@
#define STR_UndoObjName NC_("STR_UndoObjName", "Change object name of %1 to")
#define STR_UndoObjTitle NC_("STR_UndoObjTitle", "Change object title of %1")
#define STR_UndoObjDescription NC_("STR_UndoObjDescription", "Change object description of %1")
+#define STR_UndoObjDecorative NC_("STR_UndoObjDecorative", "Change decorative of %1")
#define STR_ItemValON NC_("STR_ItemValON", "on")
#define STR_ItemValOFF NC_("STR_ItemValOFF", "off")
#define STR_ItemValYES NC_("STR_ItemValYES", "yes")
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index 54376b1f0397..8dadf982b490 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -380,6 +380,8 @@ public:
virtual OUString GetTitle() const;
virtual void SetDescription(const OUString& rStr);
virtual OUString GetDescription() const;
+ virtual void SetDecorative(bool isDecorative);
+ virtual bool IsDecorative() const;
// for group objects
bool IsGroupObject() const;
diff --git a/include/svx/svdovirt.hxx b/include/svx/svdovirt.hxx
index fc8ce86247ed..8ccddce4d263 100644
--- a/include/svx/svdovirt.hxx
+++ b/include/svx/svdovirt.hxx
@@ -68,6 +68,8 @@ public:
virtual OUString GetTitle() const override;
virtual void SetDescription(const OUString& rStr) override;
virtual OUString GetDescription() const override;
+ virtual void SetDecorative(bool isDecorative) override;
+ virtual bool IsDecorative() const override;
virtual const tools::Rectangle& GetCurrentBoundRect() const override;
virtual const tools::Rectangle& GetLastBoundRect() const override;
diff --git a/include/svx/svdundo.hxx b/include/svx/svdundo.hxx
index f198a3c3e554..36c59ca482a4 100644
--- a/include/svx/svdundo.hxx
+++ b/include/svx/svdundo.hxx
@@ -476,6 +476,20 @@ private:
};
+class SdrUndoObjDecorative final : public SdrUndoObj
+{
+private:
+ bool const m_WasDecorative;
+
+public:
+ SdrUndoObjDecorative(SdrObject & rObj, bool const WasDecorative);
+
+ virtual void Undo() override;
+ virtual void Redo() override;
+
+ virtual OUString GetComment() const override;
+};
+
/*
* Layer
@@ -747,6 +761,8 @@ public:
SdrUndoObjStrAttr::ObjStrAttrType eObjStrAttrType,
const OUString& sOldStr,
const OUString& sNewStr );
+ static std::unique_ptr<SdrUndoAction> CreateUndoObjectDecorative(SdrObject& rObject,
+ bool const WasDecorative);
// Diagram ModelData changes
virtual std::unique_ptr<SdrUndoAction> CreateUndoDiagramModelData( SdrObject& rObject, std::shared_ptr< svx::diagram::DiagramDataState >& rStartState );
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index 3ac7ac86d008..d5a0b5fec7fc 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -186,6 +186,7 @@ protected:
public:
virtual void GetTitle(OUString& rTitle) = 0;
virtual void GetDescription(OUString& rDescription) = 0;
+ virtual void IsDecorative(bool & rIsDecorative) = 0;
};
/// Abstract class provides the get information from the numbering and position dialog.
@@ -380,7 +381,7 @@ public:
// #i68101#
virtual VclPtr<AbstractSvxObjectNameDialog> CreateSvxObjectNameDialog(weld::Window* pParent, const OUString& rName) = 0;
- virtual VclPtr<AbstractSvxObjectTitleDescDialog> CreateSvxObjectTitleDescDialog(weld::Window* pParent, const OUString& rTitle, const OUString& rDescription) = 0;
+ virtual VclPtr<AbstractSvxObjectTitleDescDialog> CreateSvxObjectTitleDescDialog(weld::Window* pParent, const OUString& rTitle, const OUString& rDescription, bool isDecorative) = 0;
virtual VclPtr<AbstractSvxMultiPathDialog> CreateSvxMultiPathDialog(weld::Window* pParent) = 0 ;
virtual VclPtr<AbstractSvxMultiPathDialog> CreateSvxPathSelectDialog(weld::Window* pParent) = 0 ;
virtual VclPtr<AbstractSvxHpLinkDlg> CreateSvxHpLinkDlg(SfxChildWindow* pChild, SfxBindings* pBindings, weld::Window* pParent) = 0;
diff --git a/include/svx/unoshprp.hxx b/include/svx/unoshprp.hxx
index 6c60eac60933..aef31edf1e19 100644
--- a/include/svx/unoshprp.hxx
+++ b/include/svx/unoshprp.hxx
@@ -196,7 +196,8 @@
#define OWN_ATTR_TEXTFITTOSIZESCALE (OWN_ATTR_VALUE_START+105)
#define OWN_ATTR_TEXTCOLUMNS (OWN_ATTR_VALUE_START+106)
#define OWN_ATTR_HYPERLINK (OWN_ATTR_VALUE_START+107)
-// ATTENTION: current maximum is OWN_ATTR_VALUE_START+107 svx; wnen adding values, update
+#define OWN_ATTR_MISC_OBJ_DECORATIVE (OWN_ATTR_VALUE_START+108)
+// ATTENTION: current maximum is OWN_ATTR_VALUE_START+108 svx; when adding values, update
// OWN_ATTR_VALUE_END in include/svl/solar.hrc accordingly
// #FontWork#
@@ -369,6 +370,7 @@
/* #i68101# */ \
{ UNO_NAME_MISC_OBJ_TITLE, OWN_ATTR_MISC_OBJ_TITLE , ::cppu::UnoType<OUString>::get(), 0, 0}, \
{ UNO_NAME_MISC_OBJ_DESCRIPTION, OWN_ATTR_MISC_OBJ_DESCRIPTION , ::cppu::UnoType<OUString>::get(), 0, 0}, \
+ { u"Decorative", OWN_ATTR_MISC_OBJ_DECORATIVE, ::cppu::UnoType<bool>::get(), 0, 0}, \
{ UNO_NAME_HYPERLINK, OWN_ATTR_HYPERLINK, ::cppu::UnoType<OUString>::get(), 0, 0}, \
{ u"WritingMode", SDRATTR_WRITINGMODE2, ::cppu::UnoType<sal_Int16>::get(), 0, 0},