diff options
author | rash419 <rashesh.padia@collabora.com> | 2022-09-15 18:02:06 +0530 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2022-12-02 08:33:57 +0000 |
commit | c88d891cead135731a18d025698c1213de98b573 (patch) | |
tree | 8564fc3e9d4ca1f048804ea2ee65e3e3a8001f33 /include | |
parent | 4affd6a5472c71d9070402d3b84b9b3d2865f9a7 (diff) |
svx: extended SvxHyperlinkItem to have a new property sReplacementText
this property is use to pass text that needs to be replaced when
executing uno:SetHyperlink command in online for inserting the mention
Signed-off-by: rash419 <rashesh.padia@collabora.com>
Change-Id: I48fba347bda0652f7b657524f23c2dd837cd8186
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140015
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143556
Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/hlnkitem.hxx | 8 | ||||
-rw-r--r-- | include/svx/svxids.hrc | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/include/svx/hlnkitem.hxx b/include/svx/hlnkitem.hxx index 9222cfff1baf..19e8f10b73a5 100644 --- a/include/svx/hlnkitem.hxx +++ b/include/svx/hlnkitem.hxx @@ -26,6 +26,7 @@ #include <svx/svxdllapi.h> #include <o3tl/typed_flags_set.hxx> #include <memory> +#include <rtl/ustrbuf.hxx> enum class HyperDialogEvent { NONE = 0x0000, @@ -51,6 +52,7 @@ class SVX_DLLPUBLIC SvxHyperlinkItem final : public SfxPoolItem OUString sURL; OUString sTarget; SvxLinkInsertMode eType; + OUString sReplacementText; OUString sIntName; std::unique_ptr<SvxMacroTableDtor> pMacroTable; @@ -67,7 +69,8 @@ public: OUString aTarget, OUString aIntName, SvxLinkInsertMode eTyp, HyperDialogEvent nEvents, - SvxMacroTableDtor const *pMacroTbl ); + SvxMacroTableDtor const *pMacroTbl, + OUString aReplacementText = OUString()); virtual bool operator==( const SfxPoolItem& ) const override; virtual SvxHyperlinkItem* Clone( SfxItemPool *pPool = nullptr ) const override; @@ -97,6 +100,9 @@ public: void SetMacroEvents (const HyperDialogEvent nEvents) { nMacroEvents = nEvents; } HyperDialogEvent GetMacroEvents() const { return nMacroEvents; } + const OUString& GetReplacementText() const { return sReplacementText; } + void SetReplacementText(const OUString& rReplacementText) { sReplacementText = rReplacementText; } + }; #endif diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc index 20a2a29ac716..7d474a9510e6 100644 --- a/include/svx/svxids.hrc +++ b/include/svx/svxids.hrc @@ -82,6 +82,7 @@ class XFillGradientItem; #define MID_HLINK_TARGET 0x71 #define MID_HLINK_TYPE 0x72 #define MID_HLINK_TEXT 0x73 +#define MID_HLINK_REPLACEMENTTEXT 0x74 #define MID_VIEWLAYOUT_COLUMNS 0x77 #define MID_VIEWLAYOUT_BOOKMODE 0x78 |