diff options
author | Carsten Driesner <cd@openoffice.org> | 2002-12-13 06:35:20 +0000 |
---|---|---|
committer | Carsten Driesner <cd@openoffice.org> | 2002-12-13 06:35:20 +0000 |
commit | 7d43ef8b099b4904ad5fa9f2a104ca6e32e667bc (patch) | |
tree | b9bdcbc80c02678f17b2ddb71244da6547d92078 /vcl/source/window | |
parent | 349beec8cf203e21b848ec5da6f1e76c6bc97911 (diff) |
#106166# Read 'images in menus'-setting from configuration
Diffstat (limited to 'vcl/source/window')
-rw-r--r-- | vcl/source/window/window.cxx | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 6fec38cdc6db..dd9f72410819 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -2,9 +2,9 @@ * * $RCSfile: window.cxx,v $ * - * $Revision: 1.164 $ + * $Revision: 1.165 $ * - * last change: $Author: ssa $ $Date: 2002-12-12 13:13:51 $ + * last change: $Author: cd $ $Date: 2002-12-13 07:35:20 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -467,7 +467,23 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, BOOL bCallHdl ) } } + // Detect if images in menus are allowed or not + { + sal_Bool bTmp, bUseImagesInMenus = sal_True; + utl::OConfigurationNode aNode = utl::OConfigurationTreeRoot::tryCreateWithServiceFactory( + vcl::unohelper::GetMultiServiceFactory(), + OUString::createFromAscii( "org.openoffice.Office.Common/View/Menu" ) ); // note: case sensisitive ! + if ( aNode.isValid() ) + { + ::com::sun::star::uno::Any aValue = aNode.getNodeValue( OUString::createFromAscii( "ShowIconsInMenues" ) ); + if( aValue >>= bTmp ) + bUseImagesInMenus = bTmp; + } + StyleSettings aStyleSettings = rSettings.GetStyleSettings(); + aStyleSettings.SetUseImagesInMenus( bUseImagesInMenus ); + rSettings.SetStyleSettings( aStyleSettings ); + } #ifdef DBG_UTIL // Evt. AppFont auf Fett schalten, damit man feststellen kann, |