Hi all,
I am locked up in a situation where I want to *remove* an existing
conditional format from a cell range. The minimal example (supposed to
be run in a spreadsheet context) looks as follows:
sub remove
dim sheet as variant
dim cell as variant
dim cond as object
sheet = thisComponent.sheets.getByIndex(0)
cell = sheet.getCellByPosition(3, 0)
cond = cell.conditionalFormat
cond.clear()
cell.conditionalFormat = cond
end sub
In OpenOffice.org 3.21, this last three lines would effectively
*replace* the pre-existing conditional format attached to cell (3, 0).
In the meantime (since LibreOffice 4.1.6.2.0 and still in 4.3.1.2) the
semantics has changed such that the re-assignment in the last line does
not replace pre-existing conditional formats but *adds* another (here,
empty) conditional format entry to the cell. Btw. the same occurs if I
operate on a whole cell range rather than a single cell.
I guess this change is mainly due to conditional formats now applying to
whole cell ranges rather then single cells.
So, my question:
a) Is this subtle change above a breakdown or a deliberate change of the
API semantics?
b) If the change is deliberate, how am I supposed to remove existing
conditional formats now?
c) If the change is a breakdown, I am willing to examine further details
also.
Thanks a lot,
Florian
--
PGP available:
http://home.informatik.tu-muenchen.de/haftmann/pgp/florian_haftmann_at_informatik_tu_muenchen_de
Context
- Removing conditional formats via UNO in LibreOffice · Florian Haftmann
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.