Bug 145896 - Bad SVG interpretation
Summary: Bad SVG interpretation
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.2.2.2 release
Hardware: All All
: medium normal
Assignee: Xisco Faulí
URL:
Whiteboard: target:7.6.0.0.beta2 target:24.2.0 ta...
Keywords:
Depends on:
Blocks: SVG-Import Impress-Images
  Show dependency treegraph
 
Reported: 2021-11-26 01:46 UTC by yan102
Modified: 2023-06-22 11:08 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
SVG file (3.24 KB, image/svg+xml)
2021-11-26 01:46 UTC, yan102
Details
Real image in image viewer from os app (53.83 KB, image/png)
2021-11-26 01:47 UTC, yan102
Details
libreoffice see (15.64 KB, image/png)
2021-11-26 01:47 UTC, yan102
Details

Note You need to log in before you can comment on or make changes to this bug.
Description yan102 2021-11-26 01:46:08 UTC
Description:
The attached file is not correctly interpreted.

Steps to Reproduce:
Open a empty document and try attach file. The image in os viewer render a tool but in libreoffice see a rectangle.

Actual Results:
libreoffice see a rectangle

Expected Results:
see a tool


Reproducible: Always


User Profile Reset: No



Additional Info:
svg image:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
   viewBox="0 0 1920 1920"
   version="1.1"
   id="svg45"
   sodipodi:docname="syringe_icon_125928.svg"
   inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:svg="http://www.w3.org/2000/svg">
  <defs
     id="defs49" />
  <sodipodi:namedview
     id="namedview47"
     pagecolor="#ffffff"
     bordercolor="#666666"
     borderopacity="1.0"
     inkscape:pageshadow="2"
     inkscape:pageopacity="0.0"
     inkscape:pagecheckerboard="0"
     showgrid="false"
     inkscape:zoom="0.62166471"
     inkscape:cx="788.20623"
     inkscape:cy="817.16075"
     inkscape:window-width="1848"
     inkscape:window-height="1043"
     inkscape:window-x="1992"
     inkscape:window-y="0"
     inkscape:window-maximized="1"
     inkscape:current-layer="XMLID_2_" />
  <style
     id="style2">
        .st0{fill:#fff}.st1{fill:none;stroke:#231f20;stroke-width:50;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10}
    </style>
  <path
     class="st0"
     d="M434.6 274.2L622.9 477l-55.4 51.4-188.3-202.8 55.4-51.4zM323.8 377l188.3 202.9 55.4-51.4-188.3-202.9-55.4 51.4z"
     id="Layer_2"
     style="fill:none" />
  <g
     id="STROKES">
    <g
       id="XMLID_1_">
      <g
         id="XMLID_2_">
        <path
           class="st1"
           d="M434.6 274.2l61.6-57.3"
           id="path10" />
        <path
           class="st1"
           d="M262.2 434.2l61.6-57.2"
           id="path12" />
        <path
           class="st1"
           d="M678.2 425.6l64.2-59.5"
           id="path14" />
        <path
           class="st1"
           d="M392.6 690.8l64.2-59.6"
           id="path16" />
        <path
           class="st1"
           d="M622.9 477l55.3-51.4 614.5 662-221.5 205.6-125.2-135-96.6-104-96.6-104-96.5-104-96.6-104-102.9-111 55.3-51.4"
           id="path18" />
        <path
           class="st1"
           d="M1280 1210.2l110.8 136.2-68.8 63.8-127.6-120.6.8-.7z"
           id="path20" />
        <path
           class="st1"
           d="M1377.3 1400.9l280.5 302.2"
           id="path22" />
        <path
           class="st1"
           d="M1292.7 1087.6s32.5 48.1-12.7 122.6"
           id="path24" />
        <path
           class="st1"
           d="M1071.2 1293.2s45.6 34.5 123.2-5.1"
           id="path26" />
        <path
           class="st1"
           d="M434.6 274.2l-55.4 51.4-55.4 51.4 188.3 202.8 55.4-51.4 55.4-51.4z"
           id="path28" />
        <path
           class="st1"
           d="M379.2 325.6l188.3 202.8"
           id="path30"
           style="fill:none" />
        <path
           class="st1"
           d="M559.7 742.2l110.8-102.8"
           id="path32" />
        <path
           class="st1"
           d="M656.3 846.2L767 743.4"
           id="path34" />
        <path
           class="st1"
           d="M752.8 950.2l110.8-102.8"
           id="path36" />
        <path
           class="st1"
           d="M849.4 1054.2l110.7-102.8"
           id="path38" />
        <path
           class="st1"
           d="M946 1158.2l110.7-102.8"
           id="path40" />
      </g>
    </g>
  </g>
</svg>
Comment 1 yan102 2021-11-26 01:46:54 UTC
Created attachment 176511 [details]
SVG file
Comment 2 yan102 2021-11-26 01:47:35 UTC
Created attachment 176512 [details]
Real image in image viewer from os app
Comment 3 yan102 2021-11-26 01:47:57 UTC
Created attachment 176513 [details]
libreoffice see
Comment 4 MM 2021-11-26 15:09:23 UTC
Confirmed on windows 10 x64 with Version: 7.2.3.2 (x64) / LibreOffice Community
Build ID: d166454616c1632304285822f9c83ce2e660fd92
CPU threads: 12; OS: Windows 10.0 Build 19043; UI render: Skia/Vulkan; VCL: win UI: en-US Calc: CL
Comment 5 Xisco Faulí 2023-06-19 13:56:04 UTC
it works if type="text/css" is added to style element
Comment 6 Commit Notification 2023-06-19 18:39:44 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/7dbf237636f02b0f25aa9aedeaed227124ec12a4

tdf#145896: set style to 'text/css' by default

It will be available in 7.6.0.0.beta2.

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

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2023-06-19 21:05:05 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/08a6ca6d426280f9ce225d9f25694c43e7ab810f

tdf#145896: set style to 'text/css' by default

It will be available in 24.2.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2023-06-22 11:08:24 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/53506096acbaa7b81bfe8d0b6a1a12402877fdb8

tdf#145896: set style to 'text/css' by default

It will be available in 7.5.5.

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

Affected users are encouraged to test the fix and report feedback.