1 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 from libreoffice
.util
import printing
14 class TranslateIdPrinter(object):
15 '''Prints a TranslateId.'''
17 def __init__(self
, typename
, value
):
18 self
.typename
= typename
22 return self
.value
['mpContext'].format_string(format
='s') + " " + self
.value
['mpId'].format_string(format
='s')
26 def build_pretty_printers():
29 printer
= printing
.Printer('libreoffice/utl')
32 printer
.add('TranslateId', TranslateIdPrinter
)
34 def register_pretty_printers(obj
):
35 printing
.register_pretty_printer(printer
, obj
)
37 build_pretty_printers()
39 # vim:set shiftwidth=4 softtabstop=4 expandtab: