[REVIEW-3-6 LATE FEATURE] color scales and data bars in calc

Markus Mohrhard markus.mohrhard at googlemail.com
Thu Jun 14 22:10:00 PDT 2012


Hey guys,

so I have finally my big feature ready for 3-6. Since this is a really
large change I'm summarizing the changes below. Most of the feature in
the core is already in 3.6Beta1 except for some corrections to the
import/export code and one large refactoring to allow color formats(
color scales and data bars ) being integrated into normal conditional
format. The dialog added with this patch is far from perfect but I
think it is already good enough so that we can add it to 3.6Beta2 and
get input from our UX guys what they want changed in the dialog.
Currently the most important thing missing in the dialog is a set of
safety checks for invalid input.

Please also not that the implementation in 3-6 will have some serious
limitation. currently we can have only one conditional format applied
to a cell so if you have two overlapping conditional formats, the
first one wills till think it"owns" the cell but the second one has
overwritten the setting in the cell. This leads to strange situtations
but I can't solve this problem in 3-6 and in some form we had this
problem since we introduced in 3.4 the unique and duplicate
conditional format entries. Additionally right now copy/paste is based
on cell based copying while it should be range based copying. The
difference is that we need to create deep copies for conditional
formats during the copy operation and intersect copy range and range
of the conditional format.

So here now a list of all features introduced with this:

-features already in 3.6Beta1
  - color scale and data bar as new concept in calc core ( not related
to conditional formats )
  - import from xlsx and export of color scales to xlsx
  - broken import/export for color scales/data bars to odf ( we later
saw that we need more attributes)
  - some improvements from color format work to conditional format code

- features introduced with these commits:
  - new dialog for conditional formats + color formats
  - refactoring to merge conditional formats and color formats
  - make xlsx import code use core directly, no longer use uno api (
was necessary because uno does not know about color formats )
  - correct odf export and import of conditional formats/color formats
(new odf extension)
  - allowed data bar + color scale in the same cell

- work I plan to do till Beta3
  - work on copy/paste and undo/redo
  - finish parts of the dialog, see next point
  - change dialog based on input from ux
  - support different axis colors (already in the dialog but missing in core)
  - better checks against overriding conditional formats and input in
the dialogs

- work for 3-7
  - different color selection ( ColorListBox is a bad choice for this case )
  - refactoring (really necessary, sadly the rush in the last two
weeks was not so good for my code )
  - allow overlapping conditional formats
  - implement the full dialog concept after overlapping conditional
formats are in
  - data bar export to xlsx (is a bit tricky because most parts are in
an ooxml extension for MSO2010)

- work for 4-0
  - implement a new uno api interface for conditional formats + color formats

90% of the code changes only affect conditional format. Most
problematic in my opinion is the missing support for overlapping
conditional formats which will result in some problems. However this
is nothing new and already a problem for a year now.

I'm sorry that I did not make it into 3.6Beta1 with that but without
the refactoring we would have had some serious problems with the
generated odf files in later versions. I already talked to Astron
about the ux part and he made some comments for improvements that I'll
incoporate till Beta3:

Known problems right now:
- resizing in the dialog is not always working correctly
- the scroll bar is not setting sits zero point correctly
- the ui elements need a bit more space and the dialog needs to be a bit larger

Please ask if you have any questions about the code. I hope that I did
not forget one of the patches.

Regards,
Markus


More information about the LibreOffice mailing list