summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2010-08-02 16:25:43 +0200
committerIvo Hinkelmann <ihi@openoffice.org>2010-08-02 16:25:43 +0200
commiteb3e96cf3645a00e4b0269509f0bfeef58094674 (patch)
tree229099690eb21e658c996168ffaac2b0be594298 /svtools
parent01fed2ab114af11d711fc556d809fe6090b8b490 (diff)
parent5573de7952876cf759ac778f159ff095d0b40714 (diff)
CWS-TOOLING: integrate CWS fwk150
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/config/menuoptions.cxx14
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;
}