Skip to content

Commit

Permalink
Fixes #547 - Open SVG files exported from LibreOffice Draw
Browse files Browse the repository at this point in the history
  • Loading branch information
aumouvantsillage committed Sep 14, 2021
1 parent 9927863 commit 871767a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion locales/messages.pot
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>\n"
"Language: \n"
Expand Down
11 changes: 9 additions & 2 deletions src/js/svg/ImpressHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 871767a

Please sign in to comment.