diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-10-07 12:10:14 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-10-07 12:25:11 +0200 |
commit | 6adddbc2a80456cc2ad3b62deada7ecd4a6cf641 (patch) | |
tree | 160d6d573bf5b7d4bc9f0eee89744a7b2bded189 /sfx2/qa | |
parent | 1bbfa2834ee5f6ddefc801c2a63ce3fe9a5c863e (diff) |
Use URL as fallback for DocumentBaseURL in css.document.MediaDescriptor
...in SfxDocumentMetaData::getURLProperties, to avoid
"tools/source/fsys/urlobj.cxx:1741: cannot make <[...]> absolute against broken
base <>" warnings when SvXMLImport::GetAbsoluteReference tries to make absolute
against an erroneously empty base URI any relative URIs contained in the
document's meta data.
As a consequence, such relative URIs contained in the document's meta data will
now be made absolute upon loading in SfxDocumentMetaData::getURLProperties.
However, I saw no negative consequences of that (other than having to adapt
sfx2/qa/complex/sfx2/DocumentProperties.java in the obvious way). Whether a
document written out again contains such meta data URIs as absolute or relative
is only controlled by "Tools - Options... - Load/Save - General - Save - Save
URLs relative to file system" and not affected by this fix. (I verified that by
loading sfx2/qa/complex/sfx2/testdocuments/TEST.odt, which contains a relative
meta:auto-reload xlink:href="../TEST.odt" in its meta.xml, and saving it as a
new file, with and without "Save URLs relative to file system" checked, and
inspecting the resulting documen's meta.xml entries.)
Change-Id: Ia1b6004c8597a726eb59c6b2234fd3ecb0bdcc09
Diffstat (limited to 'sfx2/qa')
-rw-r--r-- | sfx2/qa/complex/sfx2/DocumentProperties.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sfx2/qa/complex/sfx2/DocumentProperties.java b/sfx2/qa/complex/sfx2/DocumentProperties.java index 88f0f4ccfa55..058897988e39 100644 --- a/sfx2/qa/complex/sfx2/DocumentProperties.java +++ b/sfx2/qa/complex/sfx2/DocumentProperties.java @@ -199,7 +199,8 @@ public class DocumentProperties assertTrue("TemplateURL", xDP.getTemplateURL().endsWith("memmodern.ott")); assertEquals("TemplateDate", 17, xDP.getTemplateDate().Hours); - assertEquals("AutoloadURL", "../TEST.odt", xDP.getAutoloadURL()); + assertTrue( + "AutoloadURL", xDP.getAutoloadURL().endsWith("/TEST.odt")); assertEquals("AutoloadSecs", 0, xDP.getAutoloadSecs()); assertEquals("DefaultTarget", "_blank", xDP.getDefaultTarget()); assertEquals("EditingCycles", 3, xDP.getEditingCycles()); |