Bug 98453 - OPEN: Drawing's save unit should be used when opening it
Summary: OPEN: Drawing's save unit should be used when opening it
Status: RESOLVED DUPLICATE of bug 59068
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
Keywords: needsDevEval, topicUI
Depends on:
Blocks: Draw-File-Handling
  Show dependency treegraph
Reported: 2016-03-05 21:59 UTC by Robert Gonzalez MX
Modified: 2019-02-28 14:05 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:

Testfile in meters (9.69 KB, application/vnd.oasis.opendocument.graphics)
2016-03-05 22:00 UTC, Robert Gonzalez MX
Test file in inches (9.04 KB, application/vnd.oasis.opendocument.graphics)
2016-03-05 22:00 UTC, Robert Gonzalez MX

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Gonzalez MX 2016-03-05 21:59:25 UTC
In Draw, when opening a drawing that was created in different units of measurement that the ones defined in Options Draw General, displays and perform with that units and not the ones defined originally in the drawing.

Expected behavior:
Draw should adjust the displaying and work of the units for that file in that instance of the program.

Steps to reproduce
Create a new drawing
Select Options Draw General
Set Units of measure to meters 1:100 and save it
Draw a square (say 10 m by 10 m)
draw a dimension line that it will measure meters
Save the file to testmeters.odg and close

Create a new drawing
Select Options Draw General
Set Units of measure to inches 1:1 and save it
Close the file without saving
Open the Testmeters.odg from the open file icon or directly by double clicking in it
select the square
Look in the sidebar for the position and size properties of the figure
The values are in inches but the dimension line is in meters and the drawing originally was created in meters.
Notice in the status bar that the dimension of the figure is in inches

The dimension lines displays the measures in meters but, if selected, the units in the sidebar and in the status bar are in inches.

Right click in the rulers and display measures of meters which is OK

Selecting the figure and using the context menu options with right click, displays the width and height in inches also.

Trying to change the dimensions to 9 m by 9 m in that window or in the sidebar, typing the number and the “m” symbol of meters will result in automatic inches conversion.

Trying to change the units in Tools Options Draw General, display already the meter units, but if select the OK button to update, the units in the drawing won’t change.

As a workaround, to display and work correctly, it is necessary to close the file, create a new drawing file, change the units, in this case to meters, close without saving and then open the file to display correctly and be able to work on it.

The trouble is when working in two different drawings with different units. If the units are set to centimeters and open a drawing in meters and another drawing in inches, the two of them displays values in centimeters.

Even more, looking in Tools Options Draw General, for each file, displays the units correctly as they were set.

Tested with 
LO (RC1)
LO 5.0
LO 3.6.7
LO 3.3.0
AOO 4.1.1
AOO 3.2.1

So I believe is inherited
Comment 1 Robert Gonzalez MX 2016-03-05 22:00:24 UTC
Created attachment 123321 [details]
Testfile in meters
Comment 2 Robert Gonzalez MX 2016-03-05 22:00:50 UTC
Created attachment 123322 [details]
Test file in inches
Comment 3 Yousuf Philips (jay) (retired) 2016-03-06 00:46:33 UTC
Totally agree that if the unit is being saved into the file, then Draw should change temporarily change the default unit while the file is open.
Comment 4 Yousuf Philips (jay) (retired) 2016-03-06 01:19:34 UTC
So i went digging into a odg file and yep we are saving the unit in the ./settings.xml like so, where 3 is equal to cm.

<config:config-item config:name="MeasureUnit" config:type="short">3</config:config-item>
Comment 5 Heiko Tietze 2016-06-30 08:47:09 UTC
What to save with documents:
Bug 78035: grid settings
Bug 59068: drawing scale
Bug 83325: measure units
Comment 6 Heiko Tietze 2019-02-28 14:05:26 UTC
Making this a duplicate. Comments are there.

*** This bug has been marked as a duplicate of bug 59068 ***