SCRIPT OUTPUT
2019.09.03-17:54:05 : ::ConditionalFormat: range=$Sheet1.$G$1:$H$1048576 id=1 type=4 style=Good date=Good
MRI OUTPUT
Code: Select all
com.sun.star.beans.XPropertySet
(Name) (Value Type) (Value) (Info.) (Attr.) (Handle)
DateType long Good 0
ImplementationId []byte -SEQUENCE- Pseud Read_Only
PropertySetInfo .beans.XPropertySetInfo -INTERFACE- Pseud Read_Only
StyleName string Good 0
Type long 4 Pseud Read_Only
Types []type -Sequence- Pseud Read_Only
Code: Select all
sheet = sheet_by_name( 'Sheet1' ) # com.sun.star.sheet.XSpreadsheets
formats = sheet.getPropertyValue( 'ConditionalFormats' ) # com.sun.star.sheet.XConditionalFormats
for format in formats.getConditionalFormats( ): # com.sun.star.sheet.XConditionalFormat
cellrange = format.Range # com.sun.star.sheet.XSheetCellRanges
identifier = format.ID # long = 1
propertySet = format.getByIndex( 0 ) # com.sun.star.beans.XPropertySet
conditionType = propertySet.getType( ) # com.sun.star.sheet.XConditionEntry ConditionEntryType = 4 (DATE)
styleName = propertySet.getPropertyValue( 'StyleName' ) # com.sun.star.beans.XPropertySet = (String) Good
dateType = propertySet.getPropertyValue( 'DateType' ) # com.sun.star.beans.XPropertySet = (String) Good???
# expected com::sun::star::sheet::DateType = (long) 7 THISMONTH
log_write( '::ConditionalFormat: range={} id={} type={} style={} date={}'.format( cellrange.AbsoluteName, identifier, conditionType, styleName, dateType ) )