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

2012-07-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=49629

Caolán McNamara caol...@redhat.com changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 AssignedTo|libreoffice-b...@lists.free |caol...@redhat.com
   |desktop.org |

--- Comment #9 from Caolán McNamara caol...@redhat.com 2012-07-13 14:45:32 
UTC ---
Well, I munged all the available bug reports into test cases anyway. 

Much of the trouble here is that 0x0002 is stuffed in as a code point which can
appear in a word in the source/breakiterator/data/*word*.txt rules. But
0x0002 doesn't appear as a code point that is non-whitespace in the skipSpace
rules so its inconsistent.

Having 0x0002 as a code point than can appear in a word gives all sorts of odd
results in writer for word counting, character counting word skipping etc.

I'm inclined to remove the special handing of 0x0002 down in the breakiterator
rules and go back up to writer (which I presume is the only thing with the
rather mad 0x0002 usage) and handle it specifically there when necessary, e.g.
expanding it out to its display text for the purposes of character and word
counting

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


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

2012-07-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=49629

Michael Stahl mst...@redhat.com changed:

   What|Removed |Added

 CC||caol...@redhat.com,
   ||mst...@redhat.com

--- Comment #4 from Michael Stahl mst...@redhat.com 2012-07-06 11:51:00 PDT 
---
Caolan, does this break iterator patch make sense to you?

it doesn't look obviously wrong to me, but that doesn't mean much here...

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


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

2012-07-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=49629

--- Comment #5 from Eike Rathke er...@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.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


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

2012-05-11 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=49629

David Tardon dtar...@redhat.com changed:

   What|Removed |Added

   Platform|x86-64 (AMD64)  |All
 OS/Version|Windows (All)   |All
 Status|UNCONFIRMED |NEW
 CC||dtar...@redhat.com
 Ever Confirmed|0   |1

--- Comment #1 from David Tardon dtar...@redhat.com 2012-05-11 01:28:14 PDT 
---
(In reply to comment #0)
 msgbox sText: + sText

This should of course be

msgbox(sText: + sText)

otherwise nothing is ever shown.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


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

2012-05-11 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=49629

--- Comment #2 from David Tardon dtar...@redhat.com 2012-05-11 01:36:30 PDT 
---
Created attachment 61429
  -- https://bugs.freedesktop.org/attachment.cgi?id=61429
tentative fix

The problem is that footnote is represented as character \002 internally by
Writer. getWordBoundary() includes it into the word, but isEndWord() does not,
because of:

   sal_Int32 tmp = skipSpace(Text, nPos, len, rWordType, sal_False);

and returns false at the next line.

The attached patch fixes the problem, but I am not sure it is the best way to
do that.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


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

2012-05-11 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=49629

--- Comment #3 from o...@supernover.de 2012-05-11 02:04:00 PDT ---
(In reply to comment #1)
 (In reply to comment #0)
  msgbox sText: + sText
 
 This should of course be
 
 msgbox(sText: + sText)
 
 otherwise nothing is ever shown.

Not very important, but gets shown perfectly with the LO version 3.5.2
specified for this bug.

I'd guess getWordBoundary() is the function used with doubleclick marking
(since this includes the footnote). Not sure if doubleclick *should* do that,
though.

I'm not familiar with LibreOffice code, but I'd think those two functions
(doubleclick marking and gotoStartOfWord/GotoEndOfWord) should arrive at the
same boundaries.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


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

2012-05-08 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=49629

o...@supernover.de changed:

   What|Removed |Added

   Platform|Other   |x86-64 (AMD64)
 OS/Version|All |Windows (All)

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs