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

            Bug ID: 155407
           Summary: Incorrect autocorrection of double dashes in a
                    specific situation
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: [email protected]
          Reporter: [email protected]

In a Writer text, type:

Something
Foo - 111--222 

(after the last "2", type a space)

The text will get replaced into

Something
Foo – 111–222 

so the first dash turns into an en-dash, and the two dashes between 111 and 222
turn into another en-dash. So far so good, this is the expected and wanted
behavior.

Now delete everything, and type

Something
Foo -- 111--222 

(after the last "2", type a space)

The text will get replaced into

Something
Foo – 111-–22 

so the first two dashes turn into an en-dash (as expected), but the two dashes
between numbers get replaced incorrectly: the first dash is kept, and the
autocorrection replaced the text "-2" with an en dash.

This is wrong character indices used in SvxAutoCorrect::FnChgToEnEmDash, that
don't take into account that the document text may change length as the result
of the first replacement.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to