https://bugs.documentfoundation.org/show_bug.cgi?id=105760

            Bug ID: 105760
           Summary: TextCursor.gotoPreviousWord fails when quote is at
                    start of paragraph
           Product: LibreOffice
           Version: 5.0.5.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: vic.orgos+bugslibreoff...@gmail.com

Description:
Given the following text,

One two Three.
"Four" five!
Six seven eight;

the following code will terminate when it encounters the paragraph starting
with quotes. 


        ovc = ThisComponent.currentcontroller.getViewCursor()
        otc = ThisComponent.getText().createTextCursor()

        otc.gotoRange(ovc,false)

        Dim wc
        wc=0

        While otc.gotoPreviousWord(true)
                wc = wc + 1
        wend

        Print wc
        ovc.gotoRange(otc,false)

BUT if the quote is on in the begining of the paragraph, it does not stop. For
example,

One two.
Three "Four" five!
Six seven eight;

This issue occurs with straight quotes, curly quotes and with Greek '«' quotes.


Steps to Reproduce:
1.Copy text above with quotes in the begining of the paragraph
2.Run macro
3.

Actual Results:  
gotoPreviousWord returns false 

Expected Results:
It should return true


Reproducible: Always

User Profile Reset: yes; tested on fresh install in vm

Additional Info:
Also tested on 5.2.5.1 with the same behaviour.


User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:51.0) Gecko/20100101
Firefox/51.0

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to