Bug 130984 - Searching the CharEscapement attribute using regexes replaces additional text
Summary: Searching the CharEscapement attribute using regexes replaces additional text
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
7.0.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:7.0.0
Keywords:
Depends on:
Blocks: Macro-UNOAPI
  Show dependency treegraph
 
Reported: 2020-02-27 12:28 UTC by Andreas Heinisch
Modified: 2020-02-28 10:13 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
ReplaceFormatting (9.77 KB, application/vnd.oasis.opendocument.text)
2020-02-27 12:31 UTC, Andreas Heinisch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Heinisch 2020-02-27 12:28:57 UTC
Description:
Consider the attached document with a macro, which searches for a superscript in the text and replaces it with <sup>&</sup>.

Example worked in:
Version: 6.3.0.0.beta1 (x64)
Build-ID: a187af327633f5f00363be5131bd21a13e0f1a7b
CPU-Threads: 4; BS: Windows 10.0; UI-Render: GL; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: CL

Does not work anymore in:
Version: 7.0.0.0.alpha0+ (x86)
Build ID: 2ce99d12771407631288af5a12fe2165ae3599d8
CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: default; VCL: win; 
Locale: en-GB (de_DE); UI-Language: en-US
Calc: CL



Actual Results:
Here is a <sup>x in superscript.</sup>

Expected Results:
Here is a <sup>x</sup> in superscript.


Reproducible: Always


User Profile Reset: No



Additional Info:
Has this bug something todo with https://bugs.documentfoundation.org/show_bug.cgi?id=75806?
Comment 1 Andreas Heinisch 2020-02-27 12:31:07 UTC
Created attachment 158228 [details]
ReplaceFormatting
Comment 2 Mike Kaganski 2020-02-27 19:45:50 UTC
Most likely regression since https://git.libreoffice.org/core/+/0cd3b7926cafc01d06b589124215e9cb7c148f19
Comment 3 Mike Kaganski 2020-02-28 06:03:56 UTC
https://unicode-org.atlassian.net/browse/ICU-20999
Comment 4 Mike Kaganski 2020-02-28 07:22:15 UTC
https://gerrit.libreoffice.org/c/core/+/89660
Comment 5 Commit Notification 2020-02-28 10:13:00 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1ec381335c7b2eef1443ce3756a35c3165b7964a

tdf#130984: use RegexMatcher::region to properly limit the search

It will be available in 7.0.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.