[Libreoffice-commits] core.git: sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Nov 2 11:41:17 UTC 2020
sc/source/ui/view/gridwin.cxx | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
New commits:
commit ff69401d8c941e5adaa662da81c6f02d9fe71955
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Nov 2 09:20:31 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Nov 2 12:40:42 2020 +0100
tdf#137620 support surrounding text for calc comments
Change-Id: I362a8ec6cd5de8602863fd2e520c8bd1a3706f00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105171
Reviewed-by: Justin Luth <justin_luth at sil.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Jenkins
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index c3815041f3eb..c5274ec4c23b 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -3358,6 +3358,13 @@ OUString ScGridWindow::GetSurroundingText() const
if (pHdl)
return pHdl->GetSurroundingText();
}
+ else if (SdrView* pSdrView = mrViewData.GetView()->GetScDrawView())
+ {
+ // if no cell editview is active, look at drawview
+ OutlinerView* pOlView = pSdrView->GetTextEditOutlinerView();
+ if (pOlView && pOlView->GetWindow() == this)
+ return pOlView->GetSurroundingText();
+ }
return Window::GetSurroundingText();
}
@@ -3372,6 +3379,13 @@ Selection ScGridWindow::GetSurroundingTextSelection() const
if (pHdl)
return pHdl->GetSurroundingTextSelection();
}
+ else if (SdrView* pSdrView = mrViewData.GetView()->GetScDrawView())
+ {
+ // if no cell editview is active, look at drawview
+ OutlinerView* pOlView = pSdrView->GetTextEditOutlinerView();
+ if (pOlView && pOlView->GetWindow() == this)
+ return pOlView->GetSurroundingTextSelection();
+ }
return Window::GetSurroundingTextSelection();
}
@@ -3386,6 +3400,13 @@ bool ScGridWindow::DeleteSurroundingText(const Selection& rSelection)
if (pHdl)
return pHdl->DeleteSurroundingText(rSelection);
}
+ else if (SdrView* pSdrView = mrViewData.GetView()->GetScDrawView())
+ {
+ // if no cell editview is active, look at drawview
+ OutlinerView* pOlView = pSdrView->GetTextEditOutlinerView();
+ if (pOlView && pOlView->GetWindow() == this)
+ return pOlView->DeleteSurroundingText(rSelection);
+ }
return Window::DeleteSurroundingText(rSelection);
}
More information about the Libreoffice-commits
mailing list