summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--solenv/gdb/libreoffice/basegfx.py26
1 files changed, 17 insertions, 9 deletions
diff --git a/solenv/gdb/libreoffice/basegfx.py b/solenv/gdb/libreoffice/basegfx.py
index ec564b99c903..81901fe8dae8 100644
--- a/solenv/gdb/libreoffice/basegfx.py
+++ b/solenv/gdb/libreoffice/basegfx.py
@@ -86,12 +86,12 @@ class B2DPolygonPrinter(object):
def __next__(self):
if self.index >= self.count:
raise StopIteration()
- currPoint = gdb.parse_and_eval(
- '((basegfx::B2DPolygon*)%d)->getB2DPoint(%d)' % (
- self.value.address, self.index))
- currPoint = gdb.parse_and_eval(
- '((basegfx::B2DPolygon*)%d)->getB2DPoint(%d)' % (
- self.value.address, self.index))
+ points = self.value['mpPolygon']['m_pimpl'].dereference()['m_value']['maPoints']['maVector']
+ currPoint = (points['_M_impl']['_M_start'] + self.index).dereference()
+ # doesn't work?
+ #currPoint = gdb.parse_and_eval(
+ # '((basegfx::B2DPolygon*)%d)->getB2DPoint(%d)' % (
+ # self.value.address, self.index))
self.index += 1
return ('point %d' % (self.index-1),
'(%15f, %15f)' % (currPoint['mfX'], currPoint['mfY']))
@@ -108,9 +108,11 @@ class B2DPolygonPrinter(object):
def __next__(self):
if self.index >= self.count:
raise StopIteration()
- currPoint = gdb.parse_and_eval(
- '((basegfx::B2DPolygon*)%d)->getB2DPoint(%d)' % (
- self.value.address, self.index))
+ points = self.value['mpPolygon']['m_pimpl'].dereference()['m_value']['maPoints']['maVector']
+ currPoint = (points['_M_impl']['_M_start'] + self.index).dereference()
+ #currPoint = gdb.parse_and_eval(
+ # '((basegfx::B2DPolygon*)%d)->getB2DPoint(%d)' % (
+ # self.value.address, self.index))
prevControl = gdb.parse_and_eval(
'((basegfx::B2DPolygon*)%d)->getPrevControlPoint(%d)' % (
self.value.address, self.index))
@@ -150,6 +152,12 @@ class B2DPolyPolygonPrinter(object):
def _isEmpty(self):
return self._count() == 0
+ def children(self):
+ impl = self.value['mpPolyPolygon']['m_pimpl']
+ vector = self.value['mpPolyPolygon']['m_pimpl'].dereference()['m_value']['maPolygons']
+ import libstdcxx.v6.printers as std
+ return std.StdVectorPrinter("std::vector", vector).children()
+
printer = None
def build_pretty_printers():