Issue 121482

Summary: Regular expressions Search for bold word select all paragraph
Product: Writer Reporter: papayes <jyl44>
Component: editingAssignee: AOO issues mailing list <issues>
Status: CLOSED FIXED QA Contact:
Severity: Normal    
Priority: P3 CC: hdu, herrickinman, issues, marleen.overkamp+ooo, pescetti, rgb.mldc, yurggent1.791
Version: 3.4.1   
Target Milestone: 4.0.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: 3.4.1
Developer Difficulty: ---
Issue Depends on:    
Issue Blocks: 121500    

Description papayes 2012-12-14 10:56:46 UTC
Hello,
Find & Replace Ctrl + F
Regular expressions 
Sarch for (. +) and Format...> Bold 
only the group of bold characters ( the bold word) should be selected 

With AOO 3.4.1, it is the whole paragraph containing the bold word. 
http://forum.openoffice.org/fr/forum/download/file.php?id=52300&t=1

Procedure:
http://forum.openoffice.org/fr/forum/download/file.php?id=52299
In a text of 2or 3 paragraphs, put bold words
Ctrl + F> 
More Options 
Expression regular 
Sarch for: (. +)
Format... > Bold
Find > 
Cordially.
Comment 1 Rob Weir 2012-12-18 18:37:04 UTC
Based on my testing I can say:

1) The correct regular expression is (+.).  The original comment had a space between the + and . which is not correct.

2) Thia scenario worked correctly in OOo 3.3.0 and in AOO 3.4.0.

3) Thia scenario fails in AOO 3.4.1.  The behavior is that it selects, in each paragraph, from the first bolded character until the end of the paragraph.
Comment 2 Marleen O 2012-12-20 01:38:41 UTC
I've just encountered the same problem with a combined regex/bold (or italic or underline) search-and-replace in OO Basic. Using AOO 3.4.1 on Windows 7 64-bit.
This bug breaks the "Writer's Tools - Text Markup" menu item from the Writertools 1.9.1 extension (creates DokuWiki formatting). This part of the extension worked fine in OOO 3.3.0.
Comment 3 rgb 2013-01-03 16:30:05 UTC
If you, on the search options set "Backwards" the results are even worst, with the selection going on to both sides of the formatted text.
Comment 4 rgb 2013-01-12 13:53:07 UTC
Doing some experiments, if instead of searching for .* you sear for

[:alpha:]*

RegExp + formatting works as intended. The problem is then only with the dot.
Comment 5 rgb 2013-01-12 16:48:36 UTC
Another test: the expression

[:any:]*

fails too (selects up to the end of the paragraph)
Comment 6 Andrea Pescetti 2013-01-13 23:32:07 UTC
Confirming regression wrt 3.4.0.

Test: CTRL-F, "Regular Expression" on, Search ".+" plus Format: Bold.

In 3.4.0 select bold word only, in 3.4.1 selects until the end of paragraph.
Comment 7 SVN Robot 2013-01-14 10:19:07 UTC
"hdu" committed SVN revision 1432864 into trunk:
#i121482# fix attributed text search for regular expression patterns
Comment 8 SVN Robot 2013-01-14 11:02:17 UTC
"hdu" committed SVN revision 1432869 into trunk:
#i121482# fix backwards regexp search for matches overlapping search start
Comment 9 hdu@apache.org 2013-01-14 11:05:07 UTC
Thanks for catching this! They are fixed now. Please verify with the next nightly build (revision >= 1432869) from http://ci.apache.org/projects/openoffice/
Comment 10 Yurggent Alfredo Chable Torrez 2013-02-26 23:40:36 UTC
I have been tested in AOO 3.5 and 4.0 the bug 121482 and it is not corrected,

now i'll reopened  the bug.
Regars.
Yurggent Alfredo
Comment 11 hdu@apache.org 2013-02-27 08:24:54 UTC
(In reply to comment #10)
> I have been tested in AOO 3.5 and 4.0 the bug 121482 and it is not corrected,

Since neither AOO 3.5 nor 4.0 are released yet it is important to know which development revision was tested. Please report the revision number that is reported (in the "Help->About" info on Windows/Unix or the "OpenOffice->About" info on Mac).

Also a "tested, doesn't work, reopened" doesn't help much especially when the problem is reported to be solved, e.g. http://mail-archives.apache.org/mod_mbox/openoffice-dev/201301.mbox/%3cCAEtvNKdajyPK-OQ9P37sT6pHgVCF4UA8zUWDTJcK1yREJKYuxg@mail.gmail.com%3e

Providing steps to reproduce the problem on a build based on a revision containing the supposed fix is essential. Thanks for your help!
Comment 12 rgb 2013-09-29 09:08:06 UTC
*** Issue 121570 has been marked as a duplicate of this issue. ***
Comment 13 rgb 2013-09-29 09:10:26 UTC
It's working on both, 4.0.0 and 4.0.1 on Linux 64 bits
Comment 14 rgb 2013-09-29 09:11:57 UTC
Setting as Verified