Kaydet (Commit) 657747ac authored tarafından Miklos Vajna's avatar Miklos Vajna

fdo#85286 android: don't convert objects on load

For the WW8 bugdoc, the speedup is 435 -> 98 ms, and the end result is
the same from a viewer perspective.

Change-Id: I9b6ed3b77748cdc71f373daf07548c6cd0dc732e
üst 7b3fea40
...@@ -74,6 +74,15 @@ if __name__ == '__main__': ...@@ -74,6 +74,15 @@ if __name__ == '__main__':
print "saved %d of %d bytes: %2.f%%" % (saved, total, saved*100.0/total) print "saved %d of %d bytes: %2.f%%" % (saved, total, saved*100.0/total)
# Don't do pointless Word -> Writer and similar conversions when we have no UI.
microsoftImport = '%(component-schema)s[@%(name)s="Common"]/component/group[@%(name)s="Filter"]/group[@%(name)s="Microsoft"]/group[@%(name)s="Import"]/prop' % {
"component-schema": "{http://openoffice.org/2001/registry}component-schema",
"name": "{http://openoffice.org/2001/registry}name",
}
props = root.findall(microsoftImport)
for prop in props:
prop.findall("value")[0].text = "false"
# The namespace prefixes xs and oor are present in attribute *values*, and namespace # The namespace prefixes xs and oor are present in attribute *values*, and namespace
# declarations for them are needed, even if no actual elements or attributes with these # declarations for them are needed, even if no actual elements or attributes with these
# namespace prefixes are present. Fun. # namespace prefixes are present. Fun.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment