diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-01-23 13:13:03 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-01-23 17:26:35 +0100 |
commit | d03c46eba1bd1d3399ee3d4e6af1c9e16c2c1718 (patch) | |
tree | 1492348b0f17b1a702d1bf4241ca5c4df4472558 /svtools | |
parent | 0a64b33617299ece871a947828855b16e2482706 (diff) |
weld SvxBmpMask
Change-Id: Ied627a0c6b1c85bac8fd0cafc21ae1acceaf2bcc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87281
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/valueset.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index d9ce31ad08c4..4c5fb740508c 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -3576,6 +3576,26 @@ void SvtValueSet::SetItemImage( sal_uInt16 nItemId, const Image& rImage ) mbFormat = true; } +void SvtValueSet::SetItemColor( sal_uInt16 nItemId, const Color& rColor ) +{ + size_t nPos = GetItemPos( nItemId ); + + if ( nPos == VALUESET_ITEM_NOTFOUND ) + return; + + SvtValueSetItem* pItem = mItemList[nPos].get(); + pItem->meType = VALUESETITEM_COLOR; + pItem->maColor = rColor; + + if ( !mbFormat && IsReallyVisible() && IsUpdateMode() ) + { + const tools::Rectangle aRect = ImplGetItemRect(nPos); + Invalidate( aRect ); + } + else + mbFormat = true; +} + Color SvtValueSet::GetItemColor( sal_uInt16 nItemId ) const { size_t nPos = GetItemPos( nItemId ); |