From 14b05361b8f8f5953289d1c8b03528fa0d3838cd Mon Sep 17 00:00:00 2001 From: Maxim Monastirsky Date: Sun, 18 May 2014 13:26:54 +0300 Subject: Fix last color detection Change-Id: Idb0f90a3f2100211689c3ede1dfedda86edb9728 --- svx/source/tbxctrls/tbcontrl.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'svx') diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 617b8c3b0c5a..d3a055e6bdaa 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1244,7 +1244,7 @@ void SvxColorWindow_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eState, co else if ( pState->ISA( XLineColorItem ) ) rColor = ((const XLineColorItem*)pState)->GetColorValue(); - for ( size_t i = 1; i < aColorSet.GetItemCount(); i++ ) + for ( size_t i = 1; i <= aColorSet.GetItemCount(); ++i ) { if ( rColor == aColorSet.GetItemColor(i) ) { -- cgit