From 3646640458c797498def2810bc282cd873d6b55e Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 17 Dec 2014 13:00:55 +0100 Subject: android: turn off text and table boundaries in the viewer Change-Id: I9923332372c1a09a734f3c6fd1bbd5989c6dc5d3 --- android/mobile-config.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'android') diff --git a/android/mobile-config.py b/android/mobile-config.py index 3ad495bc6f1d..998184096a40 100755 --- a/android/mobile-config.py +++ b/android/mobile-config.py @@ -75,14 +75,25 @@ 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' % { + nsDict = { "component-schema": "{http://openoffice.org/2001/registry}component-schema", "name": "{http://openoffice.org/2001/registry}name", } + microsoftImport = '%(component-schema)s[@%(name)s="Common"]/component/group[@%(name)s="Filter"]/group[@%(name)s="Microsoft"]/group[@%(name)s="Import"]/prop' % nsDict props = root.findall(microsoftImport) for prop in props: prop.findall("value")[0].text = "false" + # Disable View -> Text Boundaries + for prop in root.findall('%(component-schema)s[@%(name)s="UI"]/templates/group[@%(name)s="ColorScheme"]/group[@%(name)s="DocBoundaries"]/prop' % nsDict): + for value in prop.findall("value"): + value.text = "false" + + # Disable Table -> Table Boundaries + for prop in root.findall('%(component-schema)s[@%(name)s="UI"]/templates/group[@%(name)s="ColorScheme"]/group[@%(name)s="TableBoundaries"]/prop' % nsDict): + for value in prop.findall("value"): + value.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. -- cgit