Bug 72966 - [FILESAVE] LibreOffice-4 creates fake SVM files
Summary: [FILESAVE] LibreOffice-4 creates fake SVM files
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
4.2.0.1 rc
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.1.0 target:6.0.0.1
Keywords:
Depends on:
Blocks: ODF-export-invalid
  Show dependency treegraph
 
Reported: 2013-12-22 11:34 UTC by ape
Modified: 2019-11-23 14:13 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
file as example (678.87 KB, application/vnd.oasis.opendocument.text)
2013-12-22 11:34 UTC, ape
Details
ODT file with fake and native svm images (1.05 MB, application/vnd.oasis.opendocument.text)
2013-12-23 07:29 UTC, ape
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ape 2013-12-22 11:34:51 UTC
Created attachment 91121 [details]
file as example

LibreOffice-4 creates fake SVM file:
1. Run the program (LibO_4.0.0 ÷ 4.3.0.0+).
2. Set the value: Tools> Option> Load/Save> General> ODF_format_version = 1.0/1.1.
3. Create a new file and insert the SVG file as image and then save new document (the result – see an attachment).
4. Run the archiver.
5. Extract the SVM and PNG files from the ODF document.
6. Compare the file sizes - they are the same.
7. Open the SVM file from the simple bitmap editor. I used The Irfan View (Windows OS). It opened the file and informed me that the file is in PNG format.
Comment 1 Regina Henschel 2013-12-22 16:41:54 UTC
There is no need to use svm. Older versions of OpenOffice can read the png file. That way it is done in AOO. It contains the svg image and a png file.
Comment 2 ape 2013-12-22 18:42:28 UTC
(In reply to comment #1)
> There is no need to use svm. Older versions of OpenOffice can read the png
> file. That way it is done in AOO. It contains the svg image and a png file.
--
@Regina:
Read the posts (bug 62461) please. It seems to me that the introduction of the AOO’s patch was a big mistake. 
PNG preview image (scale 30% of the original) can’t be a substitute for the full file.
--
ape
Comment 3 Valek Filippov 2013-12-22 18:55:14 UTC
(In reply to comment #1)
> There is no need to use svm. Older versions of OpenOffice can read the png
> file. That way it is done in AOO. It contains the svg image and a png file.

At the bare minimum it would make sense to change file extension to reflect real format.

To use SVM is definitely not a good idea -- outside StarOffice derivatives nobody supports it. At the same time the way LO adopted AOO patch doesn't seem to be well thought through.
Comment 4 Regina Henschel 2013-12-22 21:23:56 UTC
I see, that dpi of the png has been reduced from OOo341 to LO41. But that is a different issue than using svm and effects the embedded .png file as well.

What do you want to be the content of the .svm file? ODF1.0 makes only sense to be read from old OOo versions, and those cannot read .svg format. So you would need to break the .svg image into Draw objects.
Comment 5 Valek Filippov 2013-12-22 21:53:34 UTC
(In reply to comment #4)
> I see, that dpi of the png has been reduced from OOo341 to LO41. But that is
> a different issue than using svm and effects the embedded .png file as well.
> 
> What do you want to be the content of the .svm file? ODF1.0 makes only sense
> to be read from old OOo versions, and those cannot read .svg format. So you
> would need to break the .svg image into Draw objects.

Regina, I have no problem if PNG is used instead of SVM. What I don't like though is to have PNG stored with SVM as an extension, while it's NOT svm.
Plus what's the point to save PNG and its second copy with different extension?
Comment 6 ape 2013-12-23 07:29:15 UTC
Created attachment 91144 [details]
ODT file with fake and native svm images

@Regina:
 The SVM file is the drawing object. It has a nice view under magnification. But we have now a bitmap object PNG image, which has the wrong someone else's extension (*.svm). This fake SVM file is an exact copy of a low-quality preview PNG image.
 Open the file “fake&native_svm.odt” and set the zoom to 600%. Are you convinced now that “fake SVM” there is a bad substitute for the native SVM file or the high quality (pixel by pixel) PNG image?
 p.s. It is possible that you have forgotten. AOO-4 does not convert the SVG object to the Star View Metafile in the “Pictures” folder, when saves the file as ODF version 1.0/1.1.
Comment 7 ape 2014-03-19 09:13:26 UTC
(In reply to comment #4)
> I see, that dpi of the png has been reduced from OOo341 to LO41. But that is
> a different issue than using svm and effects the embedded .png file as well.
> 
> What do you want to be the content of the .svm file? ODF1.0 makes only sense
> to be read from old OOo versions, and those cannot read .svg format. So you
> would need to break the .svg image into Draw objects.

I saw that SVM format is also used in the charts. Look at this attachment 93391 [details] (Eckert.ods\Object 2\Pictures\..).
Comment 8 Joel Madero 2015-05-02 15:42:45 UTC Comment hidden (obsolete)
Comment 9 ape 2016-04-25 11:59:59 UTC
I confirm this bug:
LibO version: 5.2.0.0.alpha1; Build ID: 902b28a39528b6c92602e9b521a1d0861be1caf9
OS Version: Windows 5.2 x64
Comment 10 QA Administrators 2017-05-22 13:24:52 UTC Comment hidden (obsolete)
Comment 11 ape 2017-05-31 15:55:55 UTC
I confirm this bug.

Версия: 5.4.0.0.beta1
ID сборки: 8672113ead4e403c55e31b1d9a3d1e0f3b299577
CPU threads: 4; OS: Linux 4.4; UI render: по умолчанию; VCL: gtk2; 
Локаль: ru-RU (ru_RU.UTF-8); Calc: group
Comment 12 ape 2017-06-02 16:05:19 UTC
Версия: 5.4.0.0.beta1
ID сборки: 8672113ead4e403c55e31b1d9a3d1e0f3b299577
CPU threads: 4; OS: Linux 4.4; UI render: по умолчанию; VCL: gtk2; 
Локаль: ru-RU (ru_RU.UTF-8); Calc: group

I set value: Tools> Option> Load/Save> General> ODF_format_version = 1.2.
LibreOffice-5.4.0.0.beta1 created fake SVM files too.
Comment 13 Jos van den Oever 2017-09-21 15:33:56 UTC
When the storage mode is set to "1.2", svm is saved instead of svg.

So users that want strict ODF, do not get it.
Comment 14 Commit Notification 2017-12-01 01:21:25 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6b3cc69fd2b2de5ace68f2739eb383267d66f76f

Related tdf#72966 Provide replacement graphic also for metafiles

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 15 Commit Notification 2017-12-04 08:20:43 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f6ce8116b14892e26549c2dc2d59044a961c1dff&h=libreoffice-6-0

Related tdf#72966 Provide replacement graphic also for metafiles

It will be available in 6.0.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 Commit Notification 2017-12-04 12:42:20 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2d3023c9713c4c7cac732a6831c69dec581a7751

Related tdf#72966 Provide replacement graphic also for metafiles

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 Commit Notification 2017-12-04 14:15:48 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4e8f20a5c2731f3aecffa515dc73a3fc071af6d6&h=libreoffice-6-0

Related tdf#72966 Provide replacement graphic also for metafiles

It will be available in 6.0.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 18 Xisco Faulí 2018-01-04 09:50:53 UTC
A polite ping to Samuel Mehrbrodt: is this bug fixed? if so, could you
please close it as RESOLVED FIXED ? Thanks
Comment 19 Xisco Faulí 2018-02-05 11:08:51 UTC
(In reply to Xisco Faulí from comment #18)
> A polite ping to Samuel Mehrbrodt: is this bug fixed? if so, could you
> please close it as RESOLVED FIXED ? Thanks

Ping
Comment 20 QA Administrators 2019-10-02 02:56:03 UTC Comment hidden (obsolete)
Comment 21 Franklin Weng 2019-11-23 14:13:11 UTC
Still reproducible in

版本:6.4.0.0.alpha1
組建 ID:cc57df8f942f239d29cb575ea5a7cb01405db787
CPU 執行緒:4; OS:Linux 5.2; UI 算繪:預設; VCL: kf5; 
語言地區:zh-TW (zh_TW.UTF-8); UI-Language: zh-TW
Calc: threaded

But I wonder if it needs to be fixed or not...