Add range in range

This commit is contained in:
Mauricio Baeza 2020-11-26 23:11:40 -06:00
parent 400d59a3b9
commit 811279bf7e
2 changed files with 8 additions and 15 deletions

View File

@ -533,15 +533,6 @@ class LOCellRange(object):
def auto_format(self, value):
self.obj.autoFormat(value)
def in_range(self, rango):
if isinstance(rango, LOCellRange):
address = rango.address
else:
address = rango.getRangeAddress()
cursor = self.sheet.get_cursor(self.obj)
result = cursor.queryIntersection(address)
return bool(result.Count)
def fill(self, source=1):
self.obj.fillAuto(0, source)
return
@ -625,12 +616,6 @@ class LOCellRange(object):
setattr(current, k, v)
self.obj.Validation = current
def rows_insert(self, count=0):
if not count:
count = self.rows
self.obj.Rows.insertByIndex(0, count)
return
def rows_merge(self):
for r in range(self.rows):
self[r].obj.merge(True)

View File

@ -2084,6 +2084,14 @@ class LOCalcRange(object):
self.doc.select(self.obj)
return
def in_range(self, rango):
if isinstance(rango, LOCalcRange):
address = rango.range_address
else:
address = rango.RangeAddress
result = self.cursor.queryIntersection(address)
return bool(result.Count)
def offset(self, rows=0, cols=1):
ra = self.range_address
col = ra.EndColumn + cols