summaryrefslogtreecommitdiff
path: root/sw/source/core/text
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2021-03-18 11:41:29 +0100
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2021-03-25 07:23:55 +0100
commit5302268de6a33716c7746aa13232746ad2f2b561 (patch)
treea531f28c5cb97aaa5feda8ee59f354dc827922cb /sw/source/core/text
parentf5221d1c74ce789ae1e3f25453e1c3701bc63c23 (diff)
tdf#141079 Restore double click behavior for script fields
Change-Id: I5daa730740ea042bdae56b832f2557ec974339b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112668 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Diffstat (limited to 'sw/source/core/text')
-rw-r--r--sw/source/core/text/itrcrsr.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index 9a1f7140b52f..4c39874eb862 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -1560,8 +1560,12 @@ TextFrameIndex SwTextCursor::GetModelPositionForViewPoint( SwPosition *pPos, con
{
if (pPor->IsPostItsPortion())
{
- // Offset would be nCurrStart + nLength below, do the same for post-it portions.
- nCurrStart += pPor->GetLen();
+ SwPostItsPortion* pPostItsPortion = dynamic_cast<SwPostItsPortion*>(pPor);
+ if (!pPostItsPortion->IsScript()) // tdf#141079
+ {
+ // Offset would be nCurrStart + nLength below, do the same for post-it portions.
+ nCurrStart += pPor->GetLen();
+ }
}
return nCurrStart;
}