This is a followup to my previous post on creating Conditional Formatting using a Basic Macro that was fixed:
http://user.services.openoffice.org/en/ ... 45&t=38922
The Basic Macro I created works great to create conditional formats on a selection, unless I use a a compound condition (i.e. AND(test1, test2). When a compound condition is created, everything gets written into the ConditionalFormat Property correctly, but the actual cell formatting doesn't refresh unless you bring up the Conditional Formatting GUI and hit enter. The problem with doing this (bringing the Conditional Formatting GUI and hitting enter) is that it wipes out Conditional Formats 4, 5, 6, 7, .... (since we are limited to 3 Condition Formats in the gui).
I think this is a bug, but maybe there's a way to say "Refresh Formatting" that could be called after creating the Conditional Formats. I couldnt' find this method though.
See a screencast of the problem at the following link:
http://www.screencast-o-matic.com/watch/cXeiFQ23D
Note: In the screencast notice that the 1st 3 Conditions "take hold" when hitting enter, but the 4th Condition ("Browns") and beyond are lost.
Refresh Problem - Creating Conditional Formats with Macro
Refresh Problem - Creating Conditional Formats with Macro
- Attachments
-
- CreateConditionalFormatting_RefreshProblem.ods
- (16.51 KiB) Downloaded 436 times
LibreOffice 3.3.1 on Fedora, Linux Mint Debian Edition, & Windows XP
Re: Refresh Problem - Creating Conditional Formats with Macr
I observed the same problem.
I found that I had to reset the property value of both ConditionalFormat and ConditionalFormatLocal.
I found that I had to reset the property value of both ConditionalFormat and ConditionalFormatLocal.
Code: Select all
oSelectionRange.setPropertyValue("ConditionalFormat", oSelectionConditions)
oSelectionRange.setPropertyValue("ConditionalFormatLocal", oSelectionConditions)
OpenOffice 3.3 on FC13 / LibreOffice 3.3 on Windows XP and CentOS
Re: Refresh Problem - Creating Conditional Formats with Macr
Unfortunately it didn't help me
don't understand why.....
don't understand why.....

Re: Refresh Problem - Creating Conditional Formats with Macr
Markovian - did you ever sort this out? I want to do a similar thing with a formula with 4 conditions ANDed together. And I don't want to spend ages just to find out that it's impossible!
Peter
OO 4.1.1 on MS Windows 7 64-bit
OO 4.1.1 on MS Windows 7 64-bit
Re: Refresh Problem - Creating Conditional Formats with Macr
hi guys...i dont want to use more than 3 conditions...BUT I want to get rid of...bringing the GUI up and clicking "OK" to let the formula actually calculate. After hiting "OK" the cell gets proper format (according to formula).
Do you know why is this happenin...actually not happenin = why is the formula not calculating it self?
thanks.
Do you know why is this happenin...actually not happenin = why is the formula not calculating it self?
thanks.
LO 5.2.7.2