https://bugs.freedesktop.org/show_bug.cgi?id=62603

          Priority: medium
            Bug ID: 62603
          Assignee: [email protected]
           Summary: Regular expression replacements affect formatting in
                    undesired ways
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: [email protected]
          Hardware: All
            Status: UNCONFIRMED
           Version: 4.0.0.3 release
         Component: Libreoffice
           Product: LibreOffice

This bug corresponds to the Apache OpenOffice bug 121482, which was previously
marked as RESOLVED FIXED but has now been reopened.

Since LibreOffice 4.0 now uses the the same ICU-based regexp engine as AOO 3.4,
it also suffers from the same formatting-related problems. Regexp-based search
and replace operations now affect a text portion’s formatting, even though no
style-related operation was specified.

For example, the regexp search "([:alnum:]) replaced with “$1 to replace
straight quotes with curly quotes affects the formatting (specifically, italics
in this case are removed from part of the text portion).

This seems to suggest that search and replace operations using regular
expressions now not only operate on the underlying text content, but also
interfere with the text’s *representation*, which is of great concern since one
of the most important principles of both AOO and LibO is that they are supposed
to cleanly separate the “model” or content structure from the “frame” or
visible representation of the content.

This bug yields an underlying question: does the ICU regexp engine really allow
clean seperation between content and presentation? Is the problem solely
related to AOO and LibO’s implementation of ICU or is there an inherent problem
in ICU?

It appears necessary for the LibO project to fix this bug by themselves and
independently of AOO, since it is assumed that LibO will not re-base their code
on AOO’s in the future. The fact that AOO once thought that the bug was fixed
but then changed their mind and realized that they were not sure is troubling.

Eventually, fixing this bug might require cleaning up and improving the API’s
*search descriptors*, especially with regards to the way text portions are
treated by search descriptors. The very old and as of yet unfixed enhancement
bug (OOo/AOO bug 2997) asking for the addition of character styles searches
through the search and replace dialog comes to mind. It is troubling that this
particular issue was never fixed in more than ten years. The search decriptors’
use of the `awt` module for locating character formatting in paragraphs might
be a hint to understanding this issue.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to