Add range in range
This commit is contained in:
parent
400d59a3b9
commit
811279bf7e
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue