https://bugs.documentfoundation.org/show_bug.cgi?id=145806
Justin L <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|[email protected] |[email protected] |desktop.org | Status|NEW |ASSIGNED --- Comment #6 from Justin L <[email protected]> --- The problem is related to OUString const aStr = lcl_CleanStr(*pTextNode->GetTextNode(), pFrame, pLayout, nStart, nEnd, aFltArr, false, false); where the last two false variables are for bool const bRemoveSoftHyphen, bool const bRemoveCommentAnchors By setting bRemoveCommentAnchors to true, then if (aSText.SearchForward(aStr, &nStart.GetAnyIndex(), &nEnd.GetAnyIndex(), ... becomes true, and so it utl::TextSearch::ReplaceBackReferences. During the 'find' phase, DoSearch runs with a cleaned string (because there is no explicit hyphen/comment in the search string). So the external regex library doesn't need to deal with those strange characters. But in the ReplaceBackReferences stage, we were running with the non-cleaned string (since bRemoveComemntAnchors is always false), and so this time the external regex library does need to deal with these strange characters - and thus the match is not found. The use of lcl_cleanStr in ReplaceBackReferences was introduced in 7.2.1 by commit 657ec7ff6863ebc79dcea2 Author: Mike Kaganski on Wed Sep 22 12:37:49 2021 +0200 tdf#137737: treat foot/endnote anchor as a "normal" (control) character lcl_CleanStr itself was part of the initial import, SoftHyphen added with commit 4be23ad0fb50c8ed40e3644f461f5 May 25 2007 Comment added with commit 16db6243768ccde2cf0f78da0834fe4f Sep 1 2017 tdf#101936 -- You are receiving this mail because: You are the assignee for the bug.
