Issue 33594

Summary: Yet another breakIterator bug
Product: Writer Reporter: ingenstans
Component: codeAssignee: stefan.baltzer
Status: CLOSED DUPLICATE QA Contact: issues@sw <issues>
Severity: Trivial    
Priority: P3 CC: issues
Version: 680m51Keywords: 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 may have been fixed in CVS. I don't know). Sentences that end in smart 
quotes are not recognised as having a sentence break. This is a common 
construction in English:

"Is this really true?"
"Yes. It is a common constructon in English."

And at the moment, moving to the beginning of this sentence will not stop, as it 
should, in front of the closing double quote.
Comment 1 ingenstans 2004-08-30 17:38:05 UTC
This only applies when moving backwards through the text. Moving forwards is 
fine. 
Comment 2 michael.ruess 2004-08-31 07:24:34 UTC
MRU->SBA: pls have a look.
Comment 3 ingenstans 2004-10-12 11:09:25 UTC
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.
Comment 4 ingenstans 2004-10-14 16:18:51 UTC
On reflection, this is the same as 27013, since triggered only when moving 
backwards. 

*** This issue has been marked as a duplicate of 27013 ***
Comment 5 ingenstans 2004-10-14 16:19:59 UTC
typo in entering duplicate. sorry
Comment 6 ingenstans 2004-10-14 16:20:33 UTC
.

*** This issue has been marked as a duplicate of 27031 ***
Comment 7 lohmaier 2004-10-14 17:52:12 UTC
closing duplicate.