diff options
author | Carsten Driesner <cd@openoffice.org> | 2010-07-21 10:20:25 +0200 |
---|---|---|
committer | Carsten Driesner <cd@openoffice.org> | 2010-07-21 10:20:25 +0200 |
commit | 5573de7952876cf759ac778f159ff095d0b40714 (patch) | |
tree | e15acee96213d636932cc7c8f253fb9752ff5a07 /svtools | |
parent | a1e6cecc361c2f6e26ee6738231184022f6b18dd (diff) |
fwk150: Fix problem that 'Icons in menus' doesn't work anymore
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/config/menuoptions.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/svtools/source/config/menuoptions.cxx b/svtools/source/config/menuoptions.cxx index 70d9d1623ef2..1551361f252f 100644 --- a/svtools/source/config/menuoptions.cxx +++ b/svtools/source/config/menuoptions.cxx @@ -316,6 +316,7 @@ void SvtMenuOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNames ) sal_Bool bMenuIcons = true; sal_Bool bSystemMenuIcons = true; + sal_Bool bMenuSettingsChanged = false; // Step over list of property names and get right value from coreesponding value list to set it on internal members! sal_Int32 nCount = seqPropertyNames.getLength(); @@ -334,12 +335,12 @@ void SvtMenuOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNames ) else if( seqPropertyNames[nProperty] == PROPERTYNAME_SHOWICONSINMENUES ) { DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Menu\\ShowIconsInMenues\"?" ); - seqValues[nProperty] >>= bMenuIcons; + bMenuSettingsChanged = seqValues[nProperty] >>= bMenuIcons; } else if( seqPropertyNames[nProperty] == PROPERTYNAME_SYSTEMICONSINMENUES ) { DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Menu\\IsSystemIconsInMenus\"?" ); - seqValues[nProperty] >>= bSystemMenuIcons; + bMenuSettingsChanged = seqValues[nProperty] >>= bSystemMenuIcons; } #if OSL_DEBUG_LEVEL > 1 @@ -347,7 +348,8 @@ void SvtMenuOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNames ) #endif } - m_nMenuIcons = bSystemMenuIcons ? 2 : bMenuIcons; + if ( bMenuSettingsChanged ) + m_nMenuIcons = bSystemMenuIcons ? 2 : bMenuIcons; for ( USHORT n=0; n<aList.Count(); n++ ) aList.GetObject(n)->Call( this ); @@ -377,11 +379,13 @@ void SvtMenuOptions_Impl::Commit() break; //Output cache of current setting as possibly modified by System Theme for older version case PROPERTYHANDLE_SHOWICONSINMENUES : { - seqValues[nProperty] <<=(sal_Bool)(Application::GetSettings().GetStyleSettings().GetUseImagesInMenus()); + sal_Bool bValue = (sal_Bool)(Application::GetSettings().GetStyleSettings().GetUseImagesInMenus()); + seqValues[nProperty] <<= bValue; } break; case PROPERTYHANDLE_SYSTEMICONSINMENUES : { - seqValues[nProperty] <<= (m_nMenuIcons == 2 ? sal_True : sal_False) ; + sal_Bool bValue = (m_nMenuIcons == 2 ? sal_True : sal_False) ; + seqValues[nProperty] <<= bValue; } break; } |