Update easymacro.py

This commit is contained in:
Mauricio Baeza 2021-07-03 19:23:47 -05:00
parent 0e656fbecb
commit 686f1f6aea
1 changed files with 2 additions and 3 deletions

View File

@ -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)