[GSoC] Improved Color Selection, Week 11

Krisztian Pinter pin.terminator at gmail.com
Mon Aug 4 07:25:45 PDT 2014


Hi All!

Last week I made small refinemets to the UI.
- Selecting a color from the color picker popup now applies it immediately.
- Loading soc palettes is now done lazily.
- I changed a vector of pointer to a ptr_vector.

I was also investigating the possibility of killing some classes.
*SdrShadowColorItem*, *XFillColorItem*, *XFormTextShadowColorItem*,
*XLineColorItem* and *XSecondaryFillColorItem* all inherit from *XColorItem*,
but they don't really add anything, just have a different *nWhich* value. I
considered replacing the call sites of the ctors of the child classes with
ctors for the parent class, but with the different *nWhich* value as a
parameter, but that'd lose type checking, so I decided against it.

My other problem is, I don't know how I could replace
*SvxLineColorToolBoxControl* with *SvxColorToolBoxControl*. They were
almost identical but now I moved code for *XLineColorItem* from the first
to the latter. As it was pointed out last week, I'd have to do something
with these lines:
http://opengrok.libreoffice.org/xref/core/svx/source/tbxctrls/tbcontrl.cxx#116

I think I might have to replace all occurrences of XLineColorItem
with SvxColorItem?

I'd welcome some advice regarding whether these color types should be
refactored, and if yes, how.

If anyone has any insights, please share them! Thank you!

All the best,
Krisztian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20140804/e9df797b/attachment.html>


More information about the LibreOffice mailing list