summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-06-25 13:23:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-06-25 13:23:16 +0200
commit2f00a7c61fff9c091f08b6aaa4f829cd34fb3745 (patch)
tree49bd38f6cb00bc00cca04d0eb9d1371961110916 /solenv
parent31589bf0239679d73417902655045c48c4868016 (diff)
remove Fraction pretty-printer
no longer necessary after commit 31589bf0239679d73417902655045c48c4868016 Date: Mon Jun 24 15:02:55 2019 +0200 tdf#94677 Calc is slow opening large CSV, improve tools::Fraction Change-Id: I1c9ee043a51216f7005bf8a4bf60bb4b4e39ab61
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gdb/libreoffice/tl.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/solenv/gdb/libreoffice/tl.py b/solenv/gdb/libreoffice/tl.py
index 44f3c78210cb..22ca3ba57c5f 100644
--- a/solenv/gdb/libreoffice/tl.py
+++ b/solenv/gdb/libreoffice/tl.py
@@ -53,29 +53,6 @@ class ColorPrinter(object):
else:
return "rgb(%d, %d, %d)" % (r, g, b)
-class FractionPrinter(object):
- '''Prints fraction'''
-
- def __init__(self, typename, val):
- self.typename = typename
- self.val = val
-
- def to_string(self):
- # Workaround gdb bug <https://sourceware.org/bugzilla/show_bug.cgi?id=22968> "ptype does not
- # find inner C++ class type without -readnow"
- gdb.lookup_type('Fraction')
- # This would be simpler and more reliable if we could call the operator* on mpImpl to get the internal Impl.
- # Different libc have different structures. Some have one _M_t, some have two nested.
- tmp = self.val['mpImpl']['_M_t']
- if tmp.type.fields()[0].name == '_M_t': tmp = tmp['_M_t']
- impl = tmp['_M_head_impl'].dereference().cast(gdb.lookup_type('Fraction::Impl'))
- numerator = impl['value']['num']
- denominator = impl['value']['den']
- if impl['valid']:
- return "%d/%d" % (numerator, denominator)
- else:
- return "invalid %s %d/%d" % (self.typename, numerator, denominator)
-
class DateTimeImpl(object):
def __init__(self, date, time):
@@ -228,7 +205,6 @@ def build_pretty_printers():
# various types
printer.add('BigInt', BigIntPrinter)
printer.add('Color', ColorPrinter)
- printer.add('Fraction', FractionPrinter)
printer.add('DateTime', DateTimePrinter)
printer.add('Date', DatePrinter)
printer.add('Time', TimePrinter)