sw/source/core/crsr/crsrsh.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 90b12c9bad55e8f50b75a6d7b68caa27d82cc2b9 Author: Justin Luth <jl...@mail.com> AuthorDate: Fri Dec 22 14:59:47 2023 -0500 Commit: Justin Luth <jl...@mail.com> CommitDate: Sat Dec 23 00:51:52 2023 +0100 tdf#111969 sw: add selected smarttag to context menu If the smart tag was selected (from start to end), then GetPoint() was returning the end position which is considered to be outside of the smarttag. Instead, use Start(), which doesn't care which direction the selection happened in. Smart tags REQUIRE an extension, so no unit test possible. Change-Id: I3ad2f686a9f5d6accb0d1ac2ffbf272260249223 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161194 Tested-by: Jenkins Reviewed-by: Justin Luth <jl...@mail.com> diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index e910a3aa92fa..449b074194bc 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -4109,7 +4109,7 @@ void SwCursorShell::GetSmartTagTerm( std::vector< OUString >& rSmartTagTypes, return; SwPaM* pCursor = GetCursor(); - SwPosition aPos( *pCursor->GetPoint() ); + SwPosition aPos(*pCursor->Start()); SwTextNode *pNode = aPos.GetNode().GetTextNode(); if ( !pNode || pNode->IsInProtectSect() ) return;