[Libreoffice-commits] convert SfxItemState constants to a proper enum

Noel Grandin noel at peralex.com
Tue Sep 9 04:32:00 PDT 2014


On 2014-09-05 11:44 AM, Stephan Bergmann wrote:
> On 07/23/2014 01:26 PM, Noel Grandin wrote:
>> commit 88a874fcb3a3735634c638f34dcb0cc7bd2260ac
>> Author: Noel Grandin <noel at peralex.com>
>> Date:   Wed Jul 23 10:48:58 2014 +0200
>>
>>      convert SfxItemState constants to a proper enum
>>
>>      and while we're at it
>>      - use the enum type all over the place instead of passing around
>>      sal_uInt16
>>      - don't use bitwise logic on enum values
>>      - use enum values instead of numeric constants
>>
>>      Change-Id: I7f24cb4d242e1c00703e7bbcf1a00c18ef1e9fd4
>>
>> diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
>> index 14892aa..6bf9cab 100644
>> --- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx
>> +++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
>> @@ -153,7 +153,7 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs )
>>               bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue();
>>           m_pCbShowDescription->Check( bCheck );
>>
>> -        if( ( aState & SFX_ITEM_DEFAULT ) == 0 )
>> +        if( aState != SFX_ITEM_DEFAULT )
>>               m_pCbShowDescription->Hide();
>>       }
>>
>
> Is that change sound?  If e.g. aState is SFX_ITEM_SET (0x0030), the original condition was false while the new 
> condition will be true.
>
> Stephan



Thanks for finding this, fixed in commit 7ad83656484db970a9539f0fd73c387cda15d40b


Disclaimer: http://www.peralex.com/disclaimer.html




More information about the LibreOffice mailing list