From 871767acb2b8ea9771972e90001f342bdb233061 Mon Sep 17 00:00:00 2001 From: aumouvantsillage Date: Tue, 14 Sep 2021 21:04:05 +0200 Subject: [PATCH] Fixes #547 - Open SVG files exported from LibreOffice Draw --- locales/messages.pot | 2 +- src/js/svg/ImpressHandler.js | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/locales/messages.pot b/locales/messages.pot index 7c0b1594..8809fd3d 100644 --- a/locales/messages.pot +++ b/locales/messages.pot @@ -1,6 +1,6 @@ msgid "" msgstr "" -"POT-Creation-Date: 2021-08-01 10:20:+0000\n" +"POT-Creation-Date: 2021-09-14 07:01:+0000\n" "Project-Id-Version: PACKAGE VERSION\n" "Language-Team: LANGUAGE \n" "Language: \n" diff --git a/src/js/svg/ImpressHandler.js b/src/js/svg/ImpressHandler.js index 814c7f83..a213c5cc 100644 --- a/src/js/svg/ImpressHandler.js +++ b/src/js/svg/ImpressHandler.js @@ -24,8 +24,15 @@ export class ImpressHandler extends DefaultSVGHandler { /** @inheritdoc */ static transform(svgRoot) { const ds = svgRoot.querySelector("g.DummySlide"); - ds.parentNode.removeChild(ds); - + if (ds) { + ds.parentNode.removeChild(ds); + } + + const ms = svgRoot.querySelector("g.Master_Slide"); + if (ms) { + ms.parentNode.removeChild(ms); + } + const sg = svgRoot.querySelector("g.SlideGroup"); const g = sg.querySelector("g.Slide"); sg.parentNode.replaceChild(g, sg);