Issue 114997 - 'Regular' apostrophe not found
Summary: 'Regular' apostrophe not found
Alias: None
Product: Writer
Classification: Application
Component: editing (show other issues)
Version: OOo 3.2.1
Hardware: PC Windows XP
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2010-10-08 22:04 UTC by tab
Modified: 2017-05-20 11:33 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

contains apostrophes (10.94 KB, text/plain)
2010-10-08 22:05 UTC, tab
no flags Details
Test file with different examples (8.19 KB, application/vnd.oasis.opendocument.text)
2012-02-24 04:57 UTC, Mark Vasko
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description tab 2010-10-08 22:04:41 UTC
In NoFind.odt, search for ' (single apostrophe); find all 6, regular and bold; OK.
re do the the search, specifying Format/Typeface: regular (to skip the bold ones): 
Only the first instance is found, while 3 other 'regular' ones exist.
Comment 1 tab 2010-10-08 22:05:41 UTC
Created attachment 72001 [details]
contains apostrophes
Comment 2 eric.savary 2010-10-09 00:41:12 UTC
Reassigned to SBA
Comment 3 Mark Vasko 2012-02-24 04:56:46 UTC
I tested this in the following configurations
OOo 3.3.0 (build 9567) on win 7 
OOo 3.4.0 (build 9582) on win 7 

I duplicated the problem with the file attached by the original reporter.
I also created my own file with bold and italicized apostrophes and then use the find function. I was able to see some interesting behaviors based on what I selected in the format box for the text type. I haved attached that file to the report.
Here are my steps:
1 Open the file
2 hit Ctrl + F to open the find dialogue window
3 Enter ' in the Search for text field
4 click find
This iterated through successfully.
Next I did the following
1 Click on more options -> format
2 Click on "Regular" under the typeface options then click ok
3 Click on find
When I selected the "Regular" option under Typeface, the first nine apostrophes were skipped, 3 of which were regular. The find option then skips the last two apostrophes as well, which are also in a regular format but were several lines below the first line. The find went back up to where it had identified what it thought was the first regular apostrophe, again skipping the first nine apostrophes when it wraps around.

I tested with using the letter 's' in the same fashion and this appears to be not just limited to apostrophes because I was able to observe the same behavior by repeating the same steps.

I went back into the Format and instead selected "Italics" Typeface option instead. This time, the search correctly identifies the first italicized and then also the following two italicized apostrophes immediately after it. When I hit find again, it skipped the next three apostrophes and went to the first regular apostrophe that is down a few lines.
I went back into the format dialogue and clicked reset to reset the formatting settings however I noticed that the Typeface was set to regular. When I tried the search, the search wasn't corrected and was still skipping characters. I cleared the Typeface text box and clicked ok, and tried the find option which still was skipping characters. I went back into the format dialogue box, and the word Regular was back in the Typeface text box. So the setting seems to be held there.
At this point, I noticed that there were parameters listed under the search for text box. So I closed out of the program, saving my file and then opened the file back up. I also noticed that under the Search for text box at this point, the parameters stated "Not italic, normal" and from what I can tell the parameters based on what is being fed from the format box are Not Italic/Italic and Normal/Bold 

I tried putting a letter before and after the first apostrophe in the file, in case it was looking for characters around the apostrophe for some reason, but that didn't change the behavior of the find function. It still passed up characters that met the parameters.
This also impacts the replace feature, since the ability to find the character is hampered. This may more significant because users may rely on the replace feature thinking that the system made the correct changes when it may have troulbe finding the characters to replace.
Comment 4 Mark Vasko 2012-02-24 04:57:47 UTC
Created attachment 77244 [details]
Test file with different examples
Comment 5 2012-02-24 09:31:09 UTC
In newer builds such as the development snapshots for Apache OpenOffice which are provided at the regexp engine has been modernized. Testing the document you attached works fine there. Please confirm.
Comment 6 Mark Vasko 2012-02-24 13:35:44 UTC
(In reply to comment #5)
> In newer builds such as the development snapshots for Apache OpenOffice which
> are provided at
> the regexp engine has been
> modernized. Testing the document you attached works fine there. Please confirm.

1 uninstalled OOo-dev 3.4.0 (build 9586) and 
2 downloaded r1291124 from the dev page 
3 reinstalled OOo
4 Downloaded a new copy of the file 
5 repeated the steps from my previous report
6 was able to recreate the problems that I described.

The version I installed seems to be a matching version to the dev version I tested with the first time and indicated in my report (OOO340m1 build: 9586)

Is there another version available on that page that I did not see that I could test with? If so, please advise and I will be happy to install and test with that version.
Comment 7 2012-02-24 15:22:14 UTC
Retesting it again exactly as described showed that the problem happens indeed even with the newer AOO-Dev version; the regexp engine isn't at fault though, it is the attribute check deep in writer.
Comment 8 Olaf Felka 2012-02-24 15:43:59 UTC
@ hdu: Would you like to proceed?
Comment 9 Marcus 2017-05-20 11:33:47 UTC
Reset assigne to the default "".