Bug 103686 - FILEOPEN changing sizes when import SVG
Summary: FILEOPEN changing sizes when import SVG
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
5.2.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:svg, regression
Depends on:
Blocks: Draw-Images SVG-Open
  Show dependency treegraph
 
Reported: 2016-11-03 20:40 UTC by geeker
Modified: 2021-07-26 12:34 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description geeker 2016-11-03 20:40:54 UTC
Description:
Draw scales the SVG on 1.25 when import.

Steps to Reproduce:
1. create new drawing (for example empty A4 page)
2. export SVG
3. import this SVG

Actual Results:  
Page format already is User 26.25cm x 37.13cm, i.e. A4 is scaled on 1.25.
But in Inkscape page format is A4.

Expected Results:
Original sizes.


Reproducible: Always

User Profile Reset: No

Additional Info:
Objects are scaled the same.



User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
Comment 1 Regina Henschel 2016-11-03 21:41:13 UTC
Do you use File > Open or Insert > Image?
Comment 2 geeker 2016-11-03 22:17:56 UTC
I use File > Open.
When I use the Insert> Image i get another bug with undesirable grouping of objects (but more on that later).

I reproduced it with 5.3.0.0.alpha1 (x64) on windows 7.
Comment 3 Regina Henschel 2016-11-04 11:50:13 UTC
I see the described increase in size in case file open. So I set it to "New". But do not expect a quick fix. Please read https://bugs.documentfoundation.org/show_bug.cgi?id=88277#c9

The converting rule between units in and px has been changed in CSS from 1in=90px to 1in=96px. That might be a reason for wrong interpretation in the old file open filter.
Comment 4 geeker 2016-11-04 12:18:01 UTC
96/90 is not equal to 1.25.

Upd. In release 5.1.6 it work fine.
Comment 5 Regina Henschel 2016-11-04 13:52:21 UTC
It is a regression.

Good in
Version: 5.2.0.0.alpha0+
Build-ID: a8860122fecbaa932a48f41a38077f621275be9d
Threads 4; Ver: Windows 6.1; Render: default;
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-11-27_10:34:00
Gebietsschema: de-DE (de_DE)

Bad in
Version: 5.2.0.0.alpha0+
Build ID: 81fa5340191baf8687f9c82f1f414f5afc86b529
Threads 4; Ver: Windows 6.1; Render: default;
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-12-03_21:19:19
Locale: de-DE (de_DE)
Comment 6 raal 2016-11-06 09:35:01 UTC
This seems to have begun at the below commit.
Adding Cc: to Xisco Fauli; Could you possibly take a look at this one? Thanks

author	Xisco Fauli <anistenis@gmail.com>	2015-11-25 19:26:06 (GMT)
committer	Caolán McNamara <caolanm@redhat.com>	2015-11-27 16:13:18 (GMT)
commit 33e49a3b6655c1503dc81b583f5016fc3b2fda19 (patch)
tree 2c5d140f629c84ea2d4d94d42989470de7172a3c
parent 49a32f4b2f1773df353bfd05af2f81d560025d18 (diff)
tdf#96046 SVG: use the same PPI as in svgio
 c18a6454ce964faaee59c9f564759951edd7e0d7 is the first bad commit
commit c18a6454ce964faaee59c9f564759951edd7e0d7
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Sat Dec 5 23:57:02 2015 -0800

    source sha:33e49a3b6655c1503dc81b583f5016fc3b2fda19

	git bisect log
# bad: [6380ca07b05f68dedcaa379302cfe1fa478571c4] source sha:60b74fe1775e647545d2da1fcc58a4c63ec18aa5
# good: [1f670510f08cb800cbae2a1dd6ea70d3542e4721] source sha:49c2b9808df8a6b197dec666dfc0cda6321a4306
git bisect start 'origin/master' 'oldest'
# bad: [38f37b8ec1a2d199bb957cfd2581df7d1b273b74] source sha:c0da1080b61a1d51654fc34fdaeba373226065ff
git bisect bad 38f37b8ec1a2d199bb957cfd2581df7d1b273b74
# bad: [6998931a34ad75eb555f882fbed223e585548721] source sha:1fbd073828ef52f5206aed4643226bae9fb85f4f
git bisect bad 6998931a34ad75eb555f882fbed223e585548721
# bad: [0ea9534d0f4c90833e004706de7c11abe5bc522d] source sha:97361478e64f11330f7f7aea819d60c7562fb0f6
git bisect bad 0ea9534d0f4c90833e004706de7c11abe5bc522d
# bad: [f1485fe9fdb687868c722bcb082adecc451f7a91] source sha:ebe80ac6713b67b1801ede3d1e9038cb2c93cb11
git bisect bad f1485fe9fdb687868c722bcb082adecc451f7a91
# bad: [74b9a0610d51bbd4dd789766e42ebcda8ea810dc] source sha:13c8fe55de98560e136b741addbf8f78fd934bd5
git bisect bad 74b9a0610d51bbd4dd789766e42ebcda8ea810dc
# bad: [05252fd71200883c180eebaa50795d269a8f20f7] source sha:509cfa40691cf544519872a63335cff4a4d94006
git bisect bad 05252fd71200883c180eebaa50795d269a8f20f7
# good: [30e4e51b887df995c56d1ca1e2cf79cba3f3527f] source sha:d972dd9ad80fcfb007ad1689a6afdbcbe24d0f54
git bisect good 30e4e51b887df995c56d1ca1e2cf79cba3f3527f
# good: [b873f11a9026aa6028515b8f409e94f52efc7212] source sha:4033537b3aa3aefe1cfc9ceba71e780f7c23eb08
git bisect good b873f11a9026aa6028515b8f409e94f52efc7212
# good: [ffc022cf42f52baf1bee230a4cd399a6b63235e9] source sha:414530e9b24313c04f0151f50b12e26bfe785f54
git bisect good ffc022cf42f52baf1bee230a4cd399a6b63235e9
# bad: [c1b9f75b885a5ae8fed793f73bd162ab2accb219] source sha:bc7a490af90d2ec2e68a6385d6daf9720e9b6dd6
git bisect bad c1b9f75b885a5ae8fed793f73bd162ab2accb219
# bad: [45efc63eb004ebd2643cea9ebcdd810d0935bfa6] source sha:d7ceaae4cd1b31edb92c4a0987048b3405b3d346
git bisect bad 45efc63eb004ebd2643cea9ebcdd810d0935bfa6
# bad: [c18a6454ce964faaee59c9f564759951edd7e0d7] source sha:33e49a3b6655c1503dc81b583f5016fc3b2fda19
git bisect bad c18a6454ce964faaee59c9f564759951edd7e0d7
# good: [34b5531349e78ce59f334106c5ca5f7bd2d8d85e] source sha:49a32f4b2f1773df353bfd05af2f81d560025d18
git bisect good 34b5531349e78ce59f334106c5ca5f7bd2d8d85e
# first bad commit: [c18a6454ce964faaee59c9f564759951edd7e0d7] source sha:33e49a3b6655c1503dc81b583f5016fc3b2fda19
Comment 7 Xisco Faulí 2016-11-07 12:59:31 UTC
The problem is that import uses 90 PPI and export uses 72 PPI. Export should be changed to 90 PPI too. There's a bug for that already but I can't find it right now.
Comment 8 geeker 2016-11-07 14:12:43 UTC
No, no, export works fine. Almost. Just generates a strange group 

<g>
  <g id="id2" class="Master_Slide">
   <g id="bg-id2" class="Background"/>
   <g id="bo-id2" class="BackgroundObjects"/>
  </g>
</g>
Comment 9 geeker 2016-11-07 16:32:14 UTC
Sorry, i wanted to write about complex group
  <g>
   <g id="container-id1">
    <g id="id1" class="Slide" clip-path="url(#presentation_clip_path)">
     <g class="Page">

Sorry for offtop.
Comment 10 QA Administrators 2018-02-08 03:35:37 UTC Comment hidden (obsolete)
Comment 11 Roman Kuznetsov 2018-06-18 21:26:29 UTC
now in LibreOffice Draw 6.1 beta 2 i created drawing on page 42.00 x 29.70cm and made export it to SVG.
I used menu File->Open and opened my SVG and format of page is 42.03 x 29.73 cm

Difference is 0.03 cm. It isn't 25% of course

Xisco, what do you think? WFM or not?
Comment 12 QA Administrators 2019-06-21 02:51:57 UTC Comment hidden (obsolete)
Comment 13 QA Administrators 2021-06-21 03:38:15 UTC Comment hidden (obsolete)
Comment 14 Katka 2021-07-26 12:34:01 UTC
I cannost reproduce with:
Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: cb2827f5f65324f309fa0e3c30d0b19ad237410e
CPU threads: 16; OS: Windows 10.0 Build 19043; UI render: Skia/Vulkan; VCL: win