https://bugs.documentfoundation.org/show_bug.cgi?id=35250

Justin L <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|x86-64 (AMD64)              |All

--- Comment #20 from Justin L <[email protected]> ---
repro in 26.8 with comment 16's 'regex_search_and_replace.odt'

I searched for     ([:cntrl:])([.,;:])
and replaced with  $2$1

In 3.6.7.2, nothing happened (no replacement/deletion at all).

In 7.3, the control was lost (again - same as comment 6)
starting with commit 657ec7ff6863ebc79dcea228898b619d43543a6c
Author: Mike Kaganski on Wed Sep 22 12:37:49 2021 +0200
    tdf#137737: treat foot/endnote anchor as a "normal" (control) character


In sw/source/uibase/uiview/viewsrch.cxx, xBackRef if getting the correct string
(".\001"). And even the replace is correct - it ends up as ".\001". Apparently
it is just not retaining the hint RES_TXTATR_FTN.

So everything is 'correct' when we start getting into some of the very generic
functions, like SwTextNode::ReplaceText.

Oh, my. Creating an UNDO is removing the \001 from the node in
DocumentContentOperationsManager::ReplaceRangeImpl:
    pUndoRpl = new SwUndoReplace(aDelPam, sRepl, bRegExReplace);


Ultimately, I don't think this case is unique. I'll bet that it is true for
every single cntrl that can be found.

The same thing is true for character formatting (hints) in general. For
example, the font size from $1 will not follow it, but instead will continue to
be applied at its original position - therefore applying to $2.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to