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

--- Comment #8 from Buovjaga <[email protected]> ---
Created attachment 179343
  --> https://bugs.documentfoundation.org/attachment.cgi?id=179343&action=edit
Example file

I can reproduce slowness with 7.3, but not really with master.

Notes from sanitising the comments:

After unzipping, I ran this to have a non-minified xml to work with:
xmllint --format content.xml > pretty_xml_file.xml

For the pretty xml file, I used my Kate editor to do this regular expression
find & replace:

Find:
(<text:span text:style-name="T[0-9]+">)([^<]+?)(</text:span>)

Replace:
\1xxx xxx xxx\3

It was tricky to find a suitable regex and I kind of gave up and settled for
good enough. The reason is that there could be these types of elements inside
the text spans:
<text:s/>

To explain the regex a bit:
- it uses three capture groups
- the capture groups are referenced in the replace statement with \1 and \3
(skipping the middle group as it had the private content)
- the middle group says that we want any characters as long as they are not <
- the +? means that there can be any number of characters in a "non-greedy"
way, so it will stop looking when it hits the next </text:span>

After the mass replacing, there remained only a few comments that I manually
replaced in LibreOffice itself.

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

Reply via email to