summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2022-05-04 08:33:31 +0200
committerMiklos Vajna <vmiklos@collabora.com>2022-05-04 09:43:55 +0200
commit40fad57d097d2e2856e8e4f76ca2d5d6bc689e2f (patch)
tree84c3e8945ee745fe7a002e11e2a33d6bdcb50492
parent422bf47201c7a18f7f61a2e39eb384fe540d90c9 (diff)
sw content controls: enable indicator on the RHS of the content control end
To be consistent with the SwTextContentControl ctor, which calls SetDontExpand(false). This way typing expands the content control exactly when the indicator is visible. Change-Id: I44dc3e0a68643bc670b75da21110914e5c4f8f59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133801 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
-rw-r--r--sw/source/core/crsr/viscrs.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index b73b157d1b36..10ef16eae754 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -645,10 +645,10 @@ void SwSelPaintRects::HighlightContentControl()
SwTextContentControl* pCurContentControlAtCursor = nullptr;
if (pTextNode)
{
- // SwTextNode::PARENT because this way we highlight when the cursor is on the right side
- // of the dummy character: ideally the end of the range would have the same behavior.
+ // SwTextNode::EXPAND because the LHS of the dummy character doesn't count, the RHS of
+ // the start of the LHS of the end counts.
SwTextAttr* pAttr = pTextNode->GetTextAttrAt(
- pStart->nContent.GetIndex(), RES_TXTATR_CONTENTCONTROL, SwTextNode::PARENT);
+ pStart->nContent.GetIndex(), RES_TXTATR_CONTENTCONTROL, SwTextNode::EXPAND);
if (pAttr)
{
pCurContentControlAtCursor = static_txtattr_cast<SwTextContentControl*>(pAttr);