ScriptForge - (Calc) extend use cases of FilterFormula
A FilterFormula is a Calc formula that returns TRUE or FALSE The formula is expressed in terms of - the top-left cell of the range when FilterScope = "CELL" - the topmost row of the range when FilterScope = "ROW" - the leftmost column of the range when FilterScope = "COLUMN" After pasting, the relative and absolute references will be interpreted correctly. The FilterScope indicates the way the formula is applied, once by row, column or individual cell. The requested action is done only on the rows/columns/cells for which the FilterFormula returns True. Next methods receive 2 new arguments: => FilterFormula and FilterScope: ClearAll() ClearFormats() ClearValues() SetCellStyle() These changes are valid for Basic and Python user scripts. Without these new arguments above methods behave as before. The documentation needs to be adapted: - inclusion of FilterFormula and FilterScope concepts in the DEFINITIONS section of the SF_Calc help page - new arguments to add in resp. methods Change-Id: I657b231252106b91ed7e27a49ef3331c1fcee917 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138590 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
This commit is contained in:
@@ -2082,14 +2082,14 @@ class SFDocuments:
|
||||
def Charts(self, sheetname, chartname = ''):
|
||||
return self.ExecMethod(self.vbMethod + self.flgArrayRet, 'Charts', sheetname, chartname)
|
||||
|
||||
def ClearAll(self, range):
|
||||
return self.ExecMethod(self.vbMethod, 'ClearAll', range)
|
||||
def ClearAll(self, range, filterformula = '', filterscope = ''):
|
||||
return self.ExecMethod(self.vbMethod, 'ClearAll', range, filterformula, filterscope)
|
||||
|
||||
def ClearFormats(self, range):
|
||||
return self.ExecMethod(self.vbMethod, 'ClearFormats', range)
|
||||
def ClearFormats(self, range, filterformula = '', filterscope = ''):
|
||||
return self.ExecMethod(self.vbMethod, 'ClearFormats', range, filterformula, filterscope)
|
||||
|
||||
def ClearValues(self, range):
|
||||
return self.ExecMethod(self.vbMethod, 'ClearValues', range)
|
||||
def ClearValues(self, range, filterformula = '', filterscope = ''):
|
||||
return self.ExecMethod(self.vbMethod, 'ClearValues', range, filterformula, filterscope)
|
||||
|
||||
def CompactLeft(self, range, wholecolumn = False, filterformula = ''):
|
||||
return self.ExecMethod(self.vbMethod, 'CompactLeft', range, wholecolumn, filterformula)
|
||||
@@ -2194,8 +2194,8 @@ class SFDocuments:
|
||||
def SetArray(self, targetcell, value):
|
||||
return self.ExecMethod(self.vbMethod + self.flgArrayArg, 'SetArray', targetcell, value)
|
||||
|
||||
def SetCellStyle(self, targetrange, style):
|
||||
return self.ExecMethod(self.vbMethod, 'SetCellStyle', targetrange, style)
|
||||
def SetCellStyle(self, targetrange, style, filterformula = '', filterscope = ''):
|
||||
return self.ExecMethod(self.vbMethod, 'SetCellStyle', targetrange, style, filterformula, filterscope)
|
||||
|
||||
def SetFormula(self, targetrange, formula):
|
||||
return self.ExecMethod(self.vbMethod + self.flgArrayArg, 'SetFormula', targetrange, formula)
|
||||
|
||||
Reference in New Issue
Block a user