From 686f1f6aead3e935755a26bdd5c9e65e59e63f49 Mon Sep 17 00:00:00 2001 From: Mauricio Baeza Date: Sat, 3 Jul 2021 19:23:47 -0500 Subject: [PATCH] Update easymacro.py --- source/easymacro.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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)