summaryrefslogtreecommitdiff
path: root/svtools/source/config/menuoptions.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source/config/menuoptions.cxx')
-rw-r--r--svtools/source/config/menuoptions.cxx25
1 files changed, 13 insertions, 12 deletions
diff --git a/svtools/source/config/menuoptions.cxx b/svtools/source/config/menuoptions.cxx
index 1551361f252f..1eae19a35679 100644
--- a/svtools/source/config/menuoptions.cxx
+++ b/svtools/source/config/menuoptions.cxx
@@ -27,12 +27,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svtools.hxx"
-#ifndef GCC
-#endif
-
-//_________________________________________________________________________________________________________________
-// includes
-//_________________________________________________________________________________________________________________
#include <svtools/menuoptions.hxx>
#include <unotools/configmgr.hxx>
@@ -190,9 +184,9 @@ class SvtMenuOptions_Impl : public ConfigItem
Commit();
}
- void SetMenuIconsState ( sal_Int16 bState )
+ void SetMenuIconsState ( sal_Int16 nState )
{
- m_nMenuIcons = bState;
+ m_nMenuIcons = nState;
SetModified();
for ( USHORT n=0; n<aList.Count(); n++ )
aList.GetObject(n)->Call( this );
@@ -245,8 +239,15 @@ SvtMenuOptions_Impl::SvtMenuOptions_Impl()
// Follow assignment use order of values in relation to our list of key names!
DBG_ASSERT( !(seqNames.getLength()!=seqValues.getLength()), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nI miss some values of configuration keys!\n" );
- sal_Bool bMenuIcons = true;
- sal_Bool bSystemMenuIcons = true;
+ sal_Bool bMenuIcons = sal_True;
+ sal_Bool bSystemMenuIcons = sal_True;
+ if (m_nMenuIcons == 2)
+ bMenuIcons = (sal_Bool)(Application::GetSettings().GetStyleSettings().GetPreferredUseImagesInMenus());
+ else
+ {
+ bSystemMenuIcons = sal_False;
+ bMenuIcons = m_nMenuIcons ? sal_True : sal_False;
+ }
// Copy values from list in right order to ouer internal member.
sal_Int32 nPropertyCount = seqValues.getLength() ;
@@ -335,12 +336,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\"?" );
- bMenuSettingsChanged = 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\"?" );
- bMenuSettingsChanged = seqValues[nProperty] >>= bSystemMenuIcons;
+ bMenuSettingsChanged |= seqValues[nProperty] >>= bSystemMenuIcons;
}
#if OSL_DEBUG_LEVEL > 1