diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-10-25 15:27:58 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-10-27 17:00:59 +0100 |
commit | b9405fbc4e19901c78d136895c5ab0437d8450ac (patch) | |
tree | f42d180c9f6b4450959ff94d6f40a2ae881d8984 /include/vcl | |
parent | 23c30c073495201acb82e6e2e83bb0840f25acce (diff) |
Resolves: tdf#137620 add DeleteSurroundingText at vcl::Window level
a) give it a default implementation based on the current one
b) re-use code introduced for WeldEditView::DeleteSurroundingText
for the EditView containing vcl::Window in impress/draw and
various similar Annotation windows
Change-Id: I55547c70e90ee394795b5545450cf8131538fad8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104781
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/layout.hxx | 6 | ||||
-rw-r--r-- | include/vcl/toolkit/edit.hxx | 1 | ||||
-rw-r--r-- | include/vcl/window.hxx | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx index 60a7f44825e4..d67ab24ffb21 100644 --- a/include/vcl/layout.hxx +++ b/include/vcl/layout.hxx @@ -648,6 +648,7 @@ private: Link<const CommandEvent&, bool> m_aCommandHdl; Link<tools::Rectangle&, OUString> m_aQueryTooltipHdl; Link<OUString&, int> m_aGetSurroundingHdl; + Link<const Selection&, bool> m_aDeleteSurroundingHdl; Link<VclDrawingArea*, bool> m_aStartDragHdl; virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override @@ -748,6 +749,7 @@ public: } virtual OUString GetSurroundingText() const override; virtual Selection GetSurroundingTextSelection() const override; + virtual bool DeleteSurroundingText(const Selection& rSelection) override; void SetUITestFactory(FactoryFunction pFactoryFunction, void* pUserData) { m_pFactoryFunction = pFactoryFunction; @@ -801,6 +803,10 @@ public: { m_aGetSurroundingHdl = rLink; } + void SetDeleteSurroundingHdl(const Link<const Selection&, bool>& rLink) + { + m_aDeleteSurroundingHdl = rLink; + } void SetStartDragHdl(const Link<VclDrawingArea*, bool>& rLink) { m_aStartDragHdl = rLink; diff --git a/include/vcl/toolkit/edit.hxx b/include/vcl/toolkit/edit.hxx index 99631d3a3dea..655171a98ea0 100644 --- a/include/vcl/toolkit/edit.hxx +++ b/include/vcl/toolkit/edit.hxx @@ -232,6 +232,7 @@ public: virtual OUString GetSurroundingText() const override; virtual Selection GetSurroundingTextSelection() const override; + virtual bool DeleteSurroundingText(const Selection& rSelection) override; virtual bool set_property(const OString &rKey, const OUString &rValue) override; void SetTextFilter(TextFilter* pFilter) { mpFilterText = pFilter; } diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 48b7f1137f69..0a378a11f65e 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -1534,6 +1534,7 @@ public: virtual OUString GetSurroundingText() const; virtual Selection GetSurroundingTextSelection() const; + virtual bool DeleteSurroundingText(const Selection& rSelection); virtual FactoryFunction GetUITestFactory() const; |