summaryrefslogtreecommitdiff
path: root/android/mobile-config.py
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-12-10 09:58:40 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-12-10 10:02:05 +0100
commit657747aca81fc6f4fd8c32551c0aae2ec0f4b0fd (patch)
tree59bf442fa573497cc861fb23abe7ab4ce1e4d6ae /android/mobile-config.py
parent7b3fea40032a3542349c688f44ae321397af2c07 (diff)
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
Diffstat (limited to 'android/mobile-config.py')
-rwxr-xr-xandroid/mobile-config.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/android/mobile-config.py b/android/mobile-config.py
index 13085c75b28c..3ad495bc6f1d 100755
--- a/android/mobile-config.py
+++ b/android/mobile-config.py
@@ -74,6 +74,15 @@ if __name__ == '__main__':
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
# declarations for them are needed, even if no actual elements or attributes with these
# namespace prefixes are present. Fun.