Bug 98291 - libvisio imports dates in USA format - does not follow preference settings
Summary: libvisio imports dates in USA format - does not follow preference settings
Status: RESOLVED FIXED
Alias: None
Product: Document Liberation Project
Classification: Unclassified
Component: libvisio (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Bartosz
URL:
Whiteboard:
Keywords: filter:visio
Depends on:
Blocks:
 
Reported: 2016-03-01 05:22 UTC by rhanrick
Modified: 2023-02-11 21:45 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screen capture of Preference|Language (28.96 KB, image/png)
2016-03-03 09:31 UTC, rhanrick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rhanrick 2016-03-01 05:22:54 UTC
visio dates are imported using the USA format.  The visio import filter seems to ignore the preference settings.
Comment 1 David Tardon 2016-03-03 06:30:54 UTC
What preference settings?
Comment 2 rhanrick 2016-03-03 09:31:01 UTC
Created attachment 123185 [details]
Screen capture of Preference|Language

In the Language setting there is an option to set the Locale and the date format.  Screen shot attached to demonstrate.
Comment 3 David Tardon 2016-03-03 13:10:20 UTC
That dialog is for libreoffice. Dates are formatted to strings already inside libvisio, which is a separate library; it does not have access to libreoffice settings and there is currently no way to pass preferred language to it (and it would be a wrong thing to do anyway).

What I think would have to be done to support this:
1. Insert dates like actual fields, not text (i.e., insertField() with type text:date);
2. Pass description of the format (i.e., various number: properties) to insertField(), so libodfgen can create a suitable number:date-format;
3. Change libodfgen to create data formats for fields (and maybe even to handle fields at all--this might be implemented only for the text document generator now).

Step 1 should be very easy and step 2 time-consuming, but easy. The libodfgen side is a bit harder.
Comment 4 Bartosz 2019-06-26 19:59:04 UTC
Could you please attach Visio file with example.
I would like to implement proper solution based on that.