https://bugs.freedesktop.org/show_bug.cgi?id=52461

Jan Holesovsky <ke...@collabora.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Whiteboard|                            |EasyHack
                   |                            |DifficultyInteresting
                   |                            |SkillCpp TopicUI

--- Comment #5 from Jan Holesovsky <ke...@collabora.com> ---
So unfortunately it is not that easy; but still could be a nice advanced easy
hack :-)

The color is set in two places:

sc/source/ui/app/inputhdl.cxx

search for 

aSet.Put( SvxColorItem( Color( ScRangeFindList::GetColorName( nCount ) ),

This sets the color of the text (=B1+B3).

sc/source/ui/view/gridwin4.cxx

search for

Color( ScRangeFindList::GetColorName( i ) ),

This sets the color of the higlighted cells.

In both cases, you can see that the ScRangeFindList::GetColorName() is being
used; it is implemented here:

sc/source/ui/app/rfindlst.cxx

as

ColorData ScRangeFindList::GetColorName( size_t nIndex )
{
    return aColNames[nIndex % SC_RANGECOLORS];
}

You want to improve the implementation so that it does not blindly use the
color based on the index, but actually it reuses the already used colors - so
you want to make GetColorName non-static, traverse through the entries in the
maEntries, and either use the same color (if the entry repeats), or a new one
(if it is there for the 1st time).

Then you have to update the callers of GetColorName because it is not static
any more.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to