diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-06-16 14:53:06 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-06-16 14:53:06 +0200 |
commit | 8132c691dea66f9e402161ff8fac8e31f313b72d (patch) | |
tree | 8396c739dbecf60cdb8283eba4307c35ed15d3e3 /solenv | |
parent | e74d125954051736f7862eb239e04ba1b199801f (diff) |
Improve output of UnoAnyPrinter
Change-Id: I1461264fe7f951c9ecec777c6217d0acfb7e4254
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gdb/libreoffice/cppu.py | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/solenv/gdb/libreoffice/cppu.py b/solenv/gdb/libreoffice/cppu.py index 1ab2b6e6312b..5114dbe127d5 100644 --- a/solenv/gdb/libreoffice/cppu.py +++ b/solenv/gdb/libreoffice/cppu.py @@ -20,22 +20,16 @@ class UnoAnyPrinter(object): self.typename = typename.replace('com::sun::star::', '') def to_string(self): - if self._is_set(): - return ('%s %s' % (self.typename, self._make_string())) - else: - return "empty %s" % self.typename - - def _is_set(self): - return self.value['pType'].dereference()['eTypeClass'] != TypeClass.VOID - - def _make_string(self): - ptr = self.value['pData'] - assert ptr type_desc = self.value['pType'] assert type_desc type = make_uno_type(type_desc.dereference()) assert type - return str(uno_cast(type, ptr).dereference()) + if type_desc.dereference()['eTypeClass'] == TypeClass.VOID: + return ('%s(%s)' % (self.typename, type.tag)) + else: + ptr = self.value['pData'] + assert ptr + return ('%s(%s: %s)' % (self.typename, type.tag, str(uno_cast(type, ptr).dereference()))) class UnoReferencePrinter(object): '''Prints reference to a UNO interface''' |