https://bugs.documentfoundation.org/show_bug.cgi?id=107012
Bug ID: 107012
Summary: date with custom format macro and locale other than
English don't produce desired result
Product: LibreOffice
Version: 5.3.0.3 release
Hardware: x86-64 (AMD64)
OS: Windows (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: libreoffice-bugs@lists.freedesktop.org
Reporter: adrian.george...@gmail.com
When using the basic function Format in a macro (for Writer) and other locale
language settings than English it gives me wrong results.
Macro:
sub addDateText
dim document as object
dim dispatcher as object
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dim sText as string
sText = Format(Now(),"dd/mm/yyyy")
dim textFormatat(0) as new com.sun.star.beans.PropertyValue
textFormatat(0).Name = "Text"
textFormatat(0).Value = sText+CHR$(9)+"[SomeText]"
dispatcher.executeDispatch(document, ".uno:InsertText", "", 0,
textFormatat())
end sub
With locale set to ro-RO: 07.04.2017 [Some text]
With locale set to en-US: 07/04/2017 [Some text]
With locale set to en-UK: 07/04/2017 [Some text]
With locale set to fr-FR: 07.04.2017 [Some text]
With locale set to de-DE: 07.04.2017 [Some text]
after modifying sText = Format(Now(),"dd\/mm\/yyyy") it produced the desired
results.
I've tried but didn't work changing the Date accepted patterns in
Options->Language Settings->Languages.
--
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