[Libreoffice-commits] core.git: sc/source
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Sat Nov 30 10:33:09 UTC 2019
sc/source/ui/app/inputhdl.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit b48bcb45d7c503eeb5ec54085d3261ceba7393fd
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sat Nov 30 08:24:55 2019 +0200
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sat Nov 30 11:31:56 2019 +0100
Clarify the comment
Change-Id: I610057d4226616cad928eba82ce0055b37fe4e16
Reviewed-on: https://gerrit.libreoffice.org/84102
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 2ea4ba7a6c2d..2d03cdecb5df 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1489,6 +1489,10 @@ void completeFunction( EditView* pView, const OUString& rInsert, bool& rParInser
// Since transliteration service is used to test for match, the replaced string could be
// longer than rInsert, so in order to find longest match before the cursor, test whole
// string from start to current cursor position (don't limit to length of rInsert)
+ // Disclaimer: I really don't know if a match longer than rInsert is actually possible,
+ // so the above is based on assumptions how "transliteration" might possibly work. If
+ // it's in fact impossible, an optimization would be useful to limit aSel.nStartPos to
+ // std::max(sal_Int32(0), aSel.nEndPos - rInsert.getLength()).
aSel.nStartPos = 0;
pView->SetSelection(aSel);
const OUString aAll = pView->GetSelected();
More information about the Libreoffice-commits
mailing list