Created attachment 182939 [details] Doc with Sample Text and Macro SearchDescriptor in macro finds specified regex pattern in overwritten text when Tracking Changes is enabled (but old text not visible). No issue when Tracking is disabled in document. Tested against the versions of LO I have on my Windows 10 system, it does NOT occur on LibreOffice 5.4.7.2 x64 but it DOES on LibreOffice 6.2.0.3 x64 Sample document with macro attached. Simple test macro to exhibit the problem is as follows, Dim oDoc:oDoc = ThisComponent Dim sDescriptor sDescriptor = oDoc.createSearchDescriptor Dim regx: regx = "[:digit:][:digit:]:[:digit:][:digit:]:[:digit:][:digit:]" sDescriptor.SearchString = regx sDescriptor.SearchRegularExpression = True Dim oVC: oVC = oDoc.CurrentController.getViewCursor() dim r, oText r = oDoc.findnext(oVC.end(),sDescriptor) oVC.gotoRange(r.end(), false)
Searching for regex using F&R dialog works correctly.
Bibisected with linux-64-6.2 to 94c1af65367dcbc7272455cf6d4940252a289b62 sw_redlinehide: make layout based Show/Hide mode the default Bad result is cursor stopping at the indicated spot: <-- There was a time code here, mustn’t stop here.
I got an error when running the macro in 24.2. So I just did Ctrl-H (find replace dialog), turn on regex and searched for [:digit:][:digit:]:[:digit:][:digit:]:[:digit:][:digit:]. It only found-next the three time-stamps. Interactively it works fine. So, I'm guessing that this 6.2 commit is some major re-write of redlining, where the "deleted text" stays around as regular nodes and is just displayed or not. I wouldn't consider this a regression. I imagine there is a way the macro can be re-written to accommodate the change.
Thanks for the useful reply here. https://tiny-fishing.com
Un-CCing developer, its unclear if we can find the time to look into it at this stage.