[Libreoffice-bugs] [Bug 49629] Macros: GotoEndOfWord fails when footnote at word end

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Jul 7 01:52:06 CEST 2012


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

--- Comment #5 from Eike Rathke <erack at redhat.com> 2012-07-06 16:52:06 PDT ---
Huh, I was on Cc of this? Missed it..

Including footnote with getWordBoundary() may be on purpose because you don't
want to leave the footnote on its own when breaking, I'm not sure. Check also
getCompatibilityScriptClassByBlock() that says
        //  0x02 - this can be inside a word
umm.. yes.

However, seeing with annotate that this few lines piece of code already did
undergo its 3rd iteration with "fix word breakiterator issues" I'm a bit
uncomfortable with such an invasive (in this case IMHO, maybe I'm overcautious)
change without some tests that take also those other issues into account.

As there were (check with git show -w because of extensive whitespace
reformatting)

43c90c8ad4c33388bb0cfc9c966cd3e7d44c7b2a
#i11993# #i14904# fix word breakiterator issues

f0939f43315a21f5134cd631773ddae7cfef4493
#112021# fix word boundary problem on begining and end of the string
#i21907# fix isBeginWord and isEndWord problem

2887ecb5554eee699e1dce4ffbc2dfcf71a54a41
#i11993# fix getWordBoundary problem when position is on the end of the word.


Sorry to be a pest here, but breakiterator is known to be a very fragile area
with corner cases in different locales or script types. AFAIK Writer has also
some behavior specifically adapted to the breakiterator so it may be possible
that when something is changed here something else may have to be adjusted in
Writer as well where the Boundary returned is evaluated.

Maybe treating the 0x02 specially in isEndWord() might be an option.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Libreoffice-bugs mailing list