[Libreoffice] [PATCH] Fix bug where an opening quote mark is treated as a word

John LeMoyne Castle jlc at mail2lee.com
Thu Nov 4 18:41:18 PDT 2010


Hi Mattias and Cedric, 

OOo issue #i89042 also has a test document that gives expected results over
several selections.  

http://nabble.documentfoundation.org/file/n1845889/i89042_Word_count_with_quotes.odt
i89042_Word_count_with_quotes.odt 

The issue *appears* to involve only leading special quotes according to that
test and what I observe in OO3.2 with that test document.  There is also
this mention of an AutoCorrect effect being part of the miscount: 

------- Additional comments from theandybarnes Tue Jan 12 23:08:06 +0000
2010 -------
Similar problem found in v3.1.1, with the start quote on words in inverted
commas.
These are the AutoCorrect -> Custom Quotes -> Single quotes -> Start quote
->
U+2018 quotes. No problem with the non-AutoCorrected quotes.

So, I suggest a test with and without auto correct.  Also suggest a test
with the leading quote at a position other than the first in para as in the
test doc (at least one #i speaks of initial leading special quotes getting
left out of actions on paras - but this patch may fix that too :-).  The
solution Mattias found is beyond my understanding of the break iterator and
SwScanner but sure looks nice and tidy.  I also don't know all the other
functionality based on the scanner etc. so I wouldn't know how to test for
fix/break.  

After a while spent reviewing some of the *many* related issue reports, I
think similar tweaks may be needed for internationalization problems
reported with the count.  One report spoke of failure to count CKJ
characters in compatibility mode and I see similar tokens a few entries down
from the patch point.  

Hope this helps  --  LeMoyne
-- 
View this message in context: http://nabble.documentfoundation.org/PATCH-Fix-bug-where-an-opening-quote-mark-is-treated-as-a-word-tp1841260p1845889.html
Sent from the Dev mailing list archive at Nabble.com.


More information about the LibreOffice mailing list