Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | Yet another breakIterator bug | ||
---|---|---|---|
Product: | Writer | Reporter: | ingenstans |
Component: | code | Assignee: | stefan.baltzer |
Status: | CLOSED DUPLICATE | QA Contact: | issues@sw <issues> |
Severity: | Trivial | ||
Priority: | P3 | CC: | issues |
Version: | 680m51 | Keywords: | oooqa |
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | Windows 2000 | ||
Issue Type: | DEFECT | Latest Confirmation in: | --- |
Developer Difficulty: | --- |
Description
ingenstans
2004-08-30 17:36:34 UTC
This only applies when moving backwards through the text. Moving forwards is fine. MRU->SBA: pls have a look. Can be worked around in m_56 by using this: Sub fixmovefor680 ' Fixed up for m_56 using a breakiterator, which works for almost every case ' October 12 04 dim oDoc,oText,oVCursor,mySelection,testright,testleft,brk,dodgystring,p,q dim aLocale as new com.sun.star.lang.Locale aLocale.Language="en" 'atend is a boolean to check for end of doc condition oDoc = thiscomponent oText = oDoc.getText() brk=createUnoService("com.sun.star.i18n.BreakIterator") oVCursor = oDoc.getCurrentController().getViewCursor() mySelection = oText.createTextCursorByRange ( oVCursor.getstart() ) mySelection.gotoPreviousSentence(TRUE) dodgystring=mySelection.getString() p=len(dodgystring) ' OK test if there is a sentence break in this. q=brk.beginOfSentence(dodgystring,p,aLocale) ' msgbox(dodgystring,0,"Dodgystring") ' msgbox(q,0,"q") mySelection.collapseToStart if q>0 then mySelection.gotoNextSentence(FALSE) end if oVCursor.gotoRange(MySelection,FALSE) end sub So it is probably an oddment in the way that gotopreviousSentence is implemented. Not that I really understand what's going on. I'm just happy to get something working. On reflection, this is the same as 27013, since triggered only when moving backwards. *** This issue has been marked as a duplicate of 27013 *** typo in entering duplicate. sorry . *** This issue has been marked as a duplicate of 27031 *** closing duplicate. |