Created attachment 125748 [details] the docx file after DOCX import (with problems, see #100491) exporting to SVG adds extra arrows
Created attachment 125749 [details] expected
Created attachment 125750 [details] svg export with extra arrows
Created attachment 125768 [details] the svg file itself the previous attachment is a png shoot of this svg file
How can I export it to SVG? File - Export does not give me the ability and neither does right-click context menu.
Hi (copy/paste to draw + right clik on the graphic should allow you to export) currently, this is done using uno api (pyUNO) obj is a graphic (in writer), doc is the writer document eg. obj = doc.getDrawPage().getByIndex(0) export_engine = smgr.createInstanceWithContext( 'com.sun.star.drawing.GraphicExportFilter', ctx) extension = '.svg' mimetype = 'image/svg+xml' export_engine.setSourceDocument(obj) url = unohelper.systemPathToFileUrl( os.path.join(out_dir_path, obj_file_name)) args = (PropertyValue('URL', 0, url, 0), PropertyValue('MediaType', 0, mimetype, 0)) export_engine.filter(args) feel free to ask if anything not clear
I pasted it to Draw. No right-click option, but used File - Export + Selection. I don't get the result shown in attachment 125768 [details]. I get the same as shown in LibO. I wonder, if the problem is with your Python thing. Did you try from Draw? 64-bit, KDE Plasma 5 Build ID: 5.1.4.2 Arch Linux build-1 CPU Threads: 8; OS Version: Linux 4.6; UI Render: default; Locale: fi-FI (fi_FI.UTF-8) Arch Linux 64-bit, KDE Plasma 5 Version: 5.3.0.0.alpha0+ Build ID: ff25ea3d5ccf3a990767cbb1ef99037d3f84b072 CPU Threads: 8; OS Version: Linux 4.6; UI Render: default; Locale: fi-FI (fi_FI.UTF-8) Built on June 26th 2016
Hi Thanks a lor for your investigation I confirm that doing manually (copy-paste to draw + export selection), the exported svg is the same as what is displayed in LibreOffice So the problem seems to be using GraphicExportFilter from Writer using UNO
Created attachment 125935 [details] writer file with macro to reproduce
Please find attached an odt file with a macro to reproduce enable macros, click the button the file will be saved at the same place than original file then note that the exported svg arrows are different than the (though wrongly as reported in #100491) original ones feel free to ask if anything more needed
(In reply to Laurent Godard from comment #8) > Created attachment 125935 [details] > writer file with macro to reproduce Repro with macro. Arch Linux 64-bit, KDE Plasma 5 Version: 5.3.0.0.alpha0+ Build ID: ff25ea3d5ccf3a990767cbb1ef99037d3f84b072 CPU Threads: 8; OS Version: Linux 4.6; UI Render: default; Locale: fi-FI (fi_FI.UTF-8) Built on June 26th 2016
Basic difference between (a) export from copied shape in draw/impress and (b) executing the macro that (a) does the 'big' svg exporter using UNO API, traveling over document/pages/shapes and exporting each as single shape (much better structured SVG), while (b) uses the GraphicExportFilter after fetching a single Metafile of all contained objects (raw geometry, bad structured SVG). Both land in SVGActionWriter::ImplWriteActions to write the metafile. Interstingly while (a) has the correct LineStart/End infos in the single Metafiles per object, (b) seems not to have that. Question is where these extra-Arrows come from. Looking into it...
Vasily Melenchuk committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=d3f1fa3cf190b83d585ec3d1b1a8e5b0896c8ea1 tdf#100492 Skip empty shapes in SVG export It will be available in 6.0.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.
Vasily Melenchuk committed a patch related to this issue. It has been pushed to "libreoffice-5-4": http://cgit.freedesktop.org/libreoffice/core/commit/?id=52f0d67e9756d81032c4b73fbb3e0aefe053e41d&h=libreoffice-5-4 tdf#100492 Skip empty shapes in SVG export It will be available in 5.4.2. 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.
Samuel Mehrbrodt committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/2c7bf3543ab798d1c117d9f3258467e4aef9a8db Related tdf#100492 Detect click into empty field It will be available in 7.1.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.
(In reply to Commit Notification from comment #14) > Samuel Mehrbrodt committed a patch related to this issue. > It has been pushed to "master": > > https://git.libreoffice.org/core/commit/ > 2c7bf3543ab798d1c117d9f3258467e4aef9a8db > > Related tdf#100492 Detect click into empty field Sorry, I mistyped the bug number here. This commit is not related to this issue.
Samuel Mehrbrodt committed a patch related to this issue. It has been pushed to "libreoffice-7-0": https://git.libreoffice.org/core/commit/e60e70d544d67237d11943dd4004d6540d8edce6 Related tdf#100492 Detect click into empty field It will be available in 7.0.3. 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.
(In reply to Samuel Mehrbrodt (CIB) from comment #15) > (In reply to Commit Notification from comment #14) > > Samuel Mehrbrodt committed a patch related to this issue. > > It has been pushed to "master": > > > > https://git.libreoffice.org/core/commit/ > > 2c7bf3543ab798d1c117d9f3258467e4aef9a8db > > > > Related tdf#100492 Detect click into empty field > > > Sorry, I mistyped the bug number here. This commit is not related to this > issue. Hi Samuel, Which is the correct bug ID ?
(In reply to Xisco Faulí from comment #17) > Hi Samuel, > Which is the correct bug ID ? Bug 101830.