#!/usr/bin/env python3 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- # # This file is part of the LibreOffice project. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# this tool rips out configuration pieces that are not useful for # a mobile viewer / editing application without a full UI. # # ideally the postprocess/ makefile would cope with this but its # already over-complicated by rampant conditionals.
# 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"
# Disable follow link with Ctrl+Click, use Click only for mobile app. for prop in root.findall('%(component-schema)s[@%(name)s="Common"]/component/group[@%(name)s="Security"]/group[@%(name)s="Scripting"]/prop[@%(name)s="HyperlinksWithCtrlClick"]' % nsDict): for value in prop.findall("value"):
value.text = "false"
# Disable Impress View -> Slide Pane for prop in root.findall('%(component-data)s[@%(name)s="Impress"]/node[@%(name)s="MultiPaneGUI"]/node[@%(name)s="SlideSorterBar"]/node[@%(name)s="Visible"]/prop[@%(name)s="ImpressView"]' % 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.
root.set('xmlns:xs', 'http://www.w3.org/2001/XMLSchema')
root.set('xmlns:oor', 'http://openoffice.org/2001/registry')
tree.write(sys.argv[2], 'UTF-8', True)
# vim: set shiftwidth=4 softtabstop=4 expandtab:
¤ Dauer der Verarbeitung: 0.15 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.