diff --git a/source/easymacro.py b/source/easymacro.py index 6b7292d..a29933d 100644 --- a/source/easymacro.py +++ b/source/easymacro.py @@ -1375,8 +1375,7 @@ class LOCalc(LODocument): sel = LOCalcRange(sel) elif sel.ImplementationName == OBJ_SHAPES: if len(sel) == 1: - sel = sel[0] - sel = LODrawPage(sel.Parent)[sel.Name] + sel = LOShape(sel[0]) else: debug(sel.ImplementationName) return sel @@ -3370,7 +3369,7 @@ class LOWriter(LODocument): class LOShape(LOBaseObject): IMAGE = 'com.sun.star.drawing.GraphicObjectShape' - def __init__(self, obj, index): + def __init__(self, obj, index=-1): self._index = index super().__init__(obj)