sw/source/core/crsr/viscrs.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit 2be683ba40b7d8f48ee6309831ede0d965add9e6 Author: Miklos Vajna <[email protected]> AuthorDate: Wed May 4 08:33:31 2022 +0200 Commit: Miklos Vajna <[email protected]> CommitDate: Mon May 9 08:26:47 2022 +0200 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. (cherry picked from commit 40fad57d097d2e2856e8e4f76ca2d5d6bc689e2f) Change-Id: I44dc3e0a68643bc670b75da21110914e5c4f8f59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133945 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index 1f91ae612c54..ef504ad5a6fb 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -644,10 +644,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);
