From 16be353077d135d452a4ac63ff4210d13610ffbd Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 28 Apr 2023 12:07:42 +0200 Subject: Writers.ODT: don't add settings.xml The way "ooo:configuration-settings" work is that if LibreOffice Writer loads a file in which it exists, it assumes that an old version of itself has produced it and it defaults any config-item that it knows but that doesn't exist in the file to the "backward-compatible" value, which usually means to enable some layout or text formatting bugs so that the document looks the same as in the old LO version that created it. If there is no "ooo:configuration-settings" then it will use the default values for a new document, which should give the best formatting results. Pandoc's documents are obviously not created by LO, so it doesn't make sense to produce ooo:configuration-settings. Regarding the "ooo:view-settings", IIRC these mainly set to the document view to the position where the document was last edited (by default only if the user in meta.xml matches the user data in LO's configuration), which is also irrelevant for Pandoc. So just leave out the settings.xml; only content.xml/styles.xml are required (see ODF 1.3, part 3, 2.2.1 OpenDocument Document, A.2). (The settings.xml that is produced for formulas by the documentSettings function hopefully isn't problematic because LO Math works a bit differently and stores important formatting attributes in settings.xml because MathML doesn't allow it in content.xml.) --- data/odt/META-INF/manifest.xml | 1 - data/odt/settings.xml | 2 -- pandoc.cabal | 1 - src/Text/Pandoc/Data.hs | 1 - 4 files changed, 5 deletions(-) delete mode 100644 data/odt/settings.xml diff --git a/data/odt/META-INF/manifest.xml b/data/odt/META-INF/manifest.xml index d00dba6d4..ff8d68030 100644 --- a/data/odt/META-INF/manifest.xml +++ b/data/odt/META-INF/manifest.xml @@ -2,7 +2,6 @@ - diff --git a/data/odt/settings.xml b/data/odt/settings.xml deleted file mode 100644 index 41c70945f..000000000 --- a/data/odt/settings.xml +++ /dev/null @@ -1,2 +0,0 @@ - -002174710874truefalseview23041304100217451087300false100falsetruefalsefalse1473719falsetruefalsefalsetruefalsefalsefalsefalsefalsefalsefalsefalsetruefalse0falsefalsefalsefalsefalsefalsefalsefalsefalsefalsetruetruefalsefalsetruetruetruefalsehigh-resolution147371910falsefalsefalsetruefalsefalsetruefalsetruetruefalsefalsefalsefalsetruetruefalsetruetruetruefalsefalsefalse0falsefalsetruetrue diff --git a/pandoc.cabal b/pandoc.cabal index 44749c784..6210bfda8 100644 --- a/pandoc.cabal +++ b/pandoc.cabal @@ -125,7 +125,6 @@ data-files: data/odt/styles.xml data/odt/content.xml data/odt/meta.xml - data/odt/settings.xml data/odt/META-INF/manifest.xml -- source files for reference.pptx data/pptx/_rels/.rels diff --git a/src/Text/Pandoc/Data.hs b/src/Text/Pandoc/Data.hs index 0d4828ca2..e6747a500 100644 --- a/src/Text/Pandoc/Data.hs +++ b/src/Text/Pandoc/Data.hs @@ -123,7 +123,6 @@ getDefaultReferenceODT = do "styles.xml", "content.xml", "meta.xml", - "settings.xml", "META-INF/manifest.xml"] let pathToEntry path = do epochtime <- floor `fmap` getPOSIXTime contents <- (BL.fromChunks . (:[])) `fmap` -- cgit v1.2.3