summaryrefslogtreecommitdiff
path: root/include/svx
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2021-07-19 08:11:43 +0200
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2021-07-26 14:13:53 +0200
commita23b44fd9f0119f7ea3523e32875f55c1a07c1cd (patch)
tree2a9ffc63b7186fea9d0cfea8660d95d30a8f6684 /include/svx
parent3c3b9ad8886da916027f0fb940a2df822d63d4d7 (diff)
tdf#123626 Allow adding hyperlinks to shapes
* Support hyperlinks on Shapes in Writer * Add menu items * Add context menu items * ODF import/export + test * OOXML import/export + test Change-Id: I7269064c4cabd16fdb8259a48429c508184d3ccf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119164 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Diffstat (limited to 'include/svx')
-rw-r--r--include/svx/svdobj.hxx5
-rw-r--r--include/svx/unoshprp.hxx6
2 files changed, 9 insertions, 2 deletions
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index 0960826d2c63..d7ccf830cf44 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -868,6 +868,9 @@ public:
// If fillstyle is drawing::FillStyle_BITMAP, returns the graphic.
const Graphic* getFillGraphic() const;
+ OUString getHyperlink() const { return msHyperlink; }
+ void setHyperlink(const OUString& sHyperlink) { msHyperlink = sHyperlink; }
+
protected:
mutable tools::Rectangle m_aOutRect; // surrounding rectangle for Paint (incl. LineWidth, ...)
Point m_aAnchor; // anchor position (Writer)
@@ -971,6 +974,8 @@ private:
// HACK: Do not automatically insert newly created object into a page.
// The user needs to do it manually later.
bool mbDoNotInsertIntoPageAutomatically;
+ // Hyperlink for the whole shape
+ OUString msHyperlink;
// only for internal use!
SvxShape* getSvxShape();
diff --git a/include/svx/unoshprp.hxx b/include/svx/unoshprp.hxx
index 3f61ce77c6d1..750a245b29d4 100644
--- a/include/svx/unoshprp.hxx
+++ b/include/svx/unoshprp.hxx
@@ -195,7 +195,8 @@
#define OWN_ATTR_QRCODE (OWN_ATTR_VALUE_START+104)
#define OWN_ATTR_TEXTFITTOSIZESCALE (OWN_ATTR_VALUE_START+105)
#define OWN_ATTR_TEXTCOLUMNS (OWN_ATTR_VALUE_START+106)
-// ATTENTION: current maximum is OWN_ATTR_VALUE_START+106 svx; wnen adding values, update
+#define OWN_ATTR_HYPERLINK (OWN_ATTR_VALUE_START+107)
+// ATTENTION: current maximum is OWN_ATTR_VALUE_START+107 svx; wnen adding values, update
// OWN_ATTR_VALUE_END in include/svl/solar.hrc accordingly
// #FontWork#
@@ -358,7 +359,8 @@
{ u"TextFitToSizeScale", OWN_ATTR_TEXTFITTOSIZESCALE, ::cppu::UnoType<sal_Int16>::get(), 0, 0}, \
/* #i68101# */ \
{ u"" UNO_NAME_MISC_OBJ_TITLE, OWN_ATTR_MISC_OBJ_TITLE , ::cppu::UnoType<OUString>::get(), 0, 0}, \
- { u"" UNO_NAME_MISC_OBJ_DESCRIPTION, OWN_ATTR_MISC_OBJ_DESCRIPTION , ::cppu::UnoType<OUString>::get(), 0, 0},
+ { u"" UNO_NAME_MISC_OBJ_DESCRIPTION, OWN_ATTR_MISC_OBJ_DESCRIPTION , ::cppu::UnoType<OUString>::get(), 0, 0}, \
+ { u"" UNO_NAME_HYPERLINK, OWN_ATTR_HYPERLINK, ::cppu::UnoType<OUString>::get(), 0, 0},
#define LINKTARGET_PROPERTIES \
{ u"" UNO_NAME_LINKDISPLAYNAME, OWN_ATTR_LDNAME , ::cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0}, \