[Libreoffice-commits] core.git: starmath/inc starmath/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Oct 28 09:05:36 UTC 2020
starmath/inc/edit.hxx | 4 ++++
starmath/source/edit.cxx | 21 +++++++++++++++++++++
2 files changed, 25 insertions(+)
New commits:
commit 8dcbbea3802670004c3e78a1ff1ec56b23df674c
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Oct 27 16:49:48 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Oct 28 10:04:43 2020 +0100
tdf#137620 add explicit SurroundingText support to starmath Edit Window
Change-Id: Ie716dd66754dd774ee81fa97ebee8dc314002f12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104898
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx
index c1ce769ab1c6..43ef648ddd95 100644
--- a/starmath/inc/edit.hxx
+++ b/starmath/inc/edit.hxx
@@ -68,6 +68,10 @@ class SmEditWindow final : public vcl::Window, public DropTargetHelper
virtual void MouseButtonUp(const MouseEvent &rEvt) override;
virtual void MouseButtonDown(const MouseEvent &rEvt) override;
+ virtual OUString GetSurroundingText() const override;
+ virtual Selection GetSurroundingTextSelection() const override;
+ virtual bool DeleteSurroundingText(const Selection& rSelection) override;
+
virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) override;
virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override;
virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index c8f82355468e..ef1da5bca1ab 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -144,6 +144,27 @@ void SmEditWindow::dispose()
vcl::Window::dispose();
}
+OUString SmEditWindow::GetSurroundingText() const
+{
+ if (pEditView)
+ return pEditView->GetSurroundingText();
+ return OUString();
+}
+
+Selection SmEditWindow::GetSurroundingTextSelection() const
+{
+ if (pEditView)
+ return pEditView->GetSurroundingTextSelection();
+ return Selection(0, 0);
+}
+
+bool SmEditWindow::DeleteSurroundingText(const Selection& rSelection)
+{
+ if (pEditView)
+ return pEditView->DeleteSurroundingText(rSelection);
+ return false;
+}
+
void SmEditWindow::StartCursorMove()
{
if (!IsInlineEditEnabled())
More information about the Libreoffice-commits
mailing list