summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-09-11 11:10:31 +0000
committerKurt Zenker <kz@openoffice.org>2009-09-11 11:10:31 +0000
commitba079682ac262fd45add1a728726baac219a29db (patch)
tree21afc79781f7e223e380cb900a8e8cf31c7476a0
parentfd41dc34fe96b0c84108f19616bbd2c62f53752e (diff)
CWS-TOOLING: integrate CWS changehc
2009-08-31 19:38:50 +0200 pl r275633 : remove dbug printf 2009-08-31 17:41:50 +0200 pl r275623 : CWS-TOOLING: rebase CWS changehc to trunk@275331 (milestone: DEV300:m56) 2009-07-15 19:45:46 +0200 pl r274028 : #i35482# use HC flag to decide high contrast mode 2009-07-15 17:40:52 +0200 pl r274020 : #i35482# use HC flag to decide high contrast mode 2009-07-15 17:39:50 +0200 pl r274019 : #i35482# update autohc correctly in MergeSystemSettings 2009-07-15 17:38:57 +0200 pl r274018 : #i35482# update autohc correctly in MergeSystemSettings
-rw-r--r--framework/source/classes/bmkmenu.cxx2
-rw-r--r--framework/source/classes/menumanager.cxx6
-rw-r--r--framework/source/helper/actiontriggerhelper.cxx2
-rw-r--r--framework/source/services/backingwindow.cxx5
-rw-r--r--framework/source/uielement/controlmenucontroller.cxx4
-rw-r--r--framework/source/uielement/imagebuttontoolbarcontroller.cxx2
-rw-r--r--framework/source/uielement/menubarmanager.cxx6
-rw-r--r--framework/source/uielement/newmenucontroller.cxx4
-rw-r--r--framework/source/uielement/toolbarmanager.cxx6
-rw-r--r--framework/source/uielement/toolbarsmenucontroller.cxx2
-rw-r--r--svx/source/cui/optaccessibility.cxx4
11 files changed, 22 insertions, 21 deletions
diff --git a/framework/source/classes/bmkmenu.cxx b/framework/source/classes/bmkmenu.cxx
index 5abb25f17c13..efa66b3a6140 100644
--- a/framework/source/classes/bmkmenu.cxx
+++ b/framework/source/classes/bmkmenu.cxx
@@ -175,7 +175,7 @@ void BmkMenu::Initialize()
::rtl::OUString aTargetFrame;
::rtl::OUString aImageId;
- BOOL bIsHiContrastMode = rSettings.GetMenuColor().IsDark();
+ BOOL bIsHiContrastMode = rSettings.GetHighContrastMode();
UINT32 i, nCount = aDynamicMenuEntries.getLength();
for ( i = 0; i < nCount; ++i )
diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx
index e57934a5a65f..bb850b876e5c 100644
--- a/framework/source/classes/menumanager.cxx
+++ b/framework/source/classes/menumanager.cxx
@@ -157,7 +157,7 @@ MenuManager::MenuManager(
SAL_STATIC_CAST( ::com::sun::star::uno::XInterface*, (OWeakObject*)this )->acquire();
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- m_bWasHiContrast = rSettings.GetMenuColor().IsDark();
+ m_bWasHiContrast = rSettings.GetHighContrastMode();
m_bShowMenuImages = rSettings.GetUseImagesInMenus();
sal_Int32 nAddonsURLPrefixLength = ADDONSPOPUPMENU_URL_PREFIX.getLength();
@@ -371,7 +371,7 @@ MenuManager::MenuManager(
m_bIsBookmarkMenu = sal_True;
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- m_bWasHiContrast = rSettings.GetMenuColor().IsDark();
+ m_bWasHiContrast = rSettings.GetHighContrastMode();
SAL_STATIC_CAST( ::com::sun::star::uno::XInterface*, (OWeakObject*)this )->acquire();
@@ -919,7 +919,7 @@ IMPL_LINK( MenuManager, Activate, Menu *, pMenu )
UpdateSpecialWindowMenu( pMenu,getServiceFactory(),m_aLock );
// Check if some modes have changed so we have to update our menu images
- sal_Bool bIsHiContrast = rSettings.GetMenuColor().IsDark();
+ sal_Bool bIsHiContrast = rSettings.GetHighContrastMode();
if ( m_bWasHiContrast != bIsHiContrast || bShowMenuImages != m_bShowMenuImages )
{
diff --git a/framework/source/helper/actiontriggerhelper.cxx b/framework/source/helper/actiontriggerhelper.cxx
index b2acbfd3409b..dae7002d08ff 100644
--- a/framework/source/helper/actiontriggerhelper.cxx
+++ b/framework/source/helper/actiontriggerhelper.cxx
@@ -119,7 +119,7 @@ void InsertSubMenuItems( Menu* pSubMenu, USHORT& nItemId, Reference< XIndexConta
{
AddonsOptions aAddonOptions;
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- sal_Bool bHiContrast = rSettings.GetMenuColor().IsDark();
+ sal_Bool bHiContrast = rSettings.GetHighContrastMode();
OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
index c58334ab085b..40e4a9f7a6b9 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -245,6 +245,7 @@ void BackingWindow::DataChanged( const DataChangedEvent& rDCEvt )
if ( rDCEvt.GetFlags() & SETTINGS_STYLE )
{
initBackground();
+ Invalidate();
}
}
@@ -252,7 +253,7 @@ void BackingWindow::initBackground()
{
SetBackground( GetSettings().GetStyleSettings().GetWorkspaceGradient() );
- bool bDark = GetSettings().GetStyleSettings().GetWindowColor().IsDark();
+ bool bDark = GetSettings().GetStyleSettings().GetHighContrastMode();
maWelcomeTextColor = maLabelTextColor = bDark ? Color( COL_WHITE ) : Color( 0x26, 0x35, 0x42 );
Color aTextBGColor( bDark ? COL_BLACK : COL_WHITE );
@@ -527,7 +528,7 @@ void BackingWindow::layoutButtonAndText(
void BackingWindow::Paint( const Rectangle& )
{
- bool bDark = GetSettings().GetStyleSettings().GetWindowColor().IsDark();
+ bool bDark = GetSettings().GetStyleSettings().GetHighContrastMode();
Color aBackColor( bDark ? COL_BLACK : COL_WHITE );
diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx
index 0872e778a727..311db615ed2a 100644
--- a/framework/source/uielement/controlmenucontroller.cxx
+++ b/framework/source/uielement/controlmenucontroller.cxx
@@ -227,7 +227,7 @@ ControlMenuController::ControlMenuController( const ::com::sun::star::uno::Refer
m_pResPopupMenu( 0 )
{
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- m_bWasHiContrast = rSettings.GetMenuColor().IsDark();
+ m_bWasHiContrast = rSettings.GetHighContrastMode();
m_bShowMenuImages = rSettings.GetUseImagesInMenus();
}
@@ -369,7 +369,7 @@ void SAL_CALL ControlMenuController::activate( const css::awt::MenuEvent& ) thro
// Check if some modes have changed so we have to update our menu images
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- sal_Bool bIsHiContrast = rSettings.GetMenuColor().IsDark();
+ sal_Bool bIsHiContrast = rSettings.GetHighContrastMode();
sal_Bool bShowMenuImages = rSettings.GetUseImagesInMenus();
sal_Bool bUpdateImages = (( m_bWasHiContrast != bIsHiContrast ) || ( bShowMenuImages != m_bShowMenuImages ));
diff --git a/framework/source/uielement/imagebuttontoolbarcontroller.cxx b/framework/source/uielement/imagebuttontoolbarcontroller.cxx
index 17fb412aeff5..ed941ea58b71 100644
--- a/framework/source/uielement/imagebuttontoolbarcontroller.cxx
+++ b/framework/source/uielement/imagebuttontoolbarcontroller.cxx
@@ -143,7 +143,7 @@ ImageButtonToolbarController::ImageButtonToolbarController(
ComplexToolbarController( rServiceManager, rFrame, pToolbar, nID, aCommand )
{
sal_Bool bBigImages( SvtMiscOptions().AreCurrentSymbolsLarge() );
- sal_Bool bHiContrast( pToolbar->GetDisplayBackground().GetColor().IsDark() );
+ sal_Bool bHiContrast( pToolbar->GetSettings().GetStyleSettings().GetHighContrastMode() );
Image aImage = AddonsOptions().GetImageFromURL( aCommand, bBigImages, bHiContrast, sal_True );
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 4e1df67d69fb..4c20b96f00dc 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -870,7 +870,7 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu )
MenuManager::UpdateSpecialWindowMenu( pMenu,getServiceFactory(),m_aLock );
// Check if some modes have changed so we have to update our menu images
- sal_Bool bIsHiContrast = rSettings.GetMenuColor().IsDark();
+ sal_Bool bIsHiContrast = rSettings.GetHighContrastMode();
sal_Int16 nSymbolsStyle = SvtMiscOptions().GetCurrentSymbolsStyle();
if ( m_bRetrieveImages ||
@@ -1267,7 +1267,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
m_xDispatchProvider = rDispatchProvider;
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- m_bWasHiContrast = rSettings.GetMenuColor().IsDark();
+ m_bWasHiContrast = rSettings.GetHighContrastMode();
m_bShowMenuImages = rSettings.GetUseImagesInMenus();
m_bRetrieveImages = sal_False;
@@ -2049,7 +2049,7 @@ void MenuBarManager::Init(const Reference< XFrame >& rFrame,AddonMenu* pAddonMen
UNO_QUERY );
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- m_bWasHiContrast = rSettings.GetMenuColor().IsDark();
+ m_bWasHiContrast = rSettings.GetHighContrastMode();
Reference< XStatusListener > xStatusListener;
Reference< XDispatch > xDispatch;
diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx
index fea156dceb9d..37580f86f546 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -486,7 +486,7 @@ void SAL_CALL NewMenuController::activate( const css::awt::MenuEvent& ) throw (R
{
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
sal_Bool bShowImages( rSettings.GetUseImagesInMenus() );
- sal_Bool bHiContrast( rSettings.GetMenuColor().IsDark() );
+ sal_Bool bHiContrast( rSettings.GetHighContrastMode() );
PopupMenu* pVCLPopupMenu = (PopupMenu *)pPopupMenu->GetMenu();
@@ -563,7 +563,7 @@ void SAL_CALL NewMenuController::initialize( const Sequence< Any >& aArguments )
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
m_bShowImages = rSettings.GetUseImagesInMenus();
- m_bHiContrast = rSettings.GetMenuColor().IsDark();
+ m_bHiContrast = rSettings.GetHighContrastMode();
m_bNewMenu = m_aCommandURL.equalsAscii( ".uno:AddDirect" );
}
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 88ecaae88ad1..55c8d16af2ec 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -243,7 +243,7 @@ ToolBarManager::ToolBarManager( const Reference< XMultiServiceFactory >& rServic
ThreadHelpBase( &Application::GetSolarMutex() ),
OWeakObject(),
m_bDisposed( sal_False ),
- m_bIsHiContrast( pToolBar->GetSettings().GetStyleSettings().GetFaceColor().IsDark() ),
+ m_bIsHiContrast( pToolBar->GetSettings().GetStyleSettings().GetHighContrastMode() ),
m_bSmallSymbols( !SvtMiscOptions().AreCurrentSymbolsLarge() ),
m_bModuleIdentified( sal_False ),
m_bAddedToTaskPaneList( sal_True ),
@@ -371,7 +371,7 @@ void ToolBarManager::CheckAndUpdateImages()
sal_Bool bRefreshImages = sal_False;
// Check if high contrast/normal mode have changed
- if ( m_pToolBar->GetSettings().GetStyleSettings().GetFaceColor().IsDark() )
+ if ( m_pToolBar->GetSettings().GetStyleSettings().GetHighContrastMode() )
{
if ( !m_bIsHiContrast )
{
@@ -1365,7 +1365,7 @@ void ToolBarManager::RequestImages()
}
sal_Bool bBigImages( SvtMiscOptions().AreCurrentSymbolsLarge() );
- m_bIsHiContrast = m_pToolBar->GetSettings().GetStyleSettings().GetFaceColor().IsDark();
+ m_bIsHiContrast = m_pToolBar->GetSettings().GetStyleSettings().GetHighContrastMode();
sal_Int16 p = getImageTypeFromBools( SvtMiscOptions().AreCurrentSymbolsLarge(), m_bIsHiContrast );
if ( m_xDocImageManager.is() )
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index 80c4c013a71b..3b359eea97c2 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -211,7 +211,7 @@ void ToolbarsMenuController::addCommand(
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
if ( rSettings.GetUseImagesInMenus() )
- aImage = GetImageFromURL( m_xFrame, rCommandURL, FALSE, rSettings.GetMenuColor().IsDark() );
+ aImage = GetImageFromURL( m_xFrame, rCommandURL, FALSE, rSettings.GetHighContrastMode() );
VCLXPopupMenu* pPopupMenu = (VCLXPopupMenu *)VCLXPopupMenu::GetImplementation( rPopupMenu );
if ( pPopupMenu )
diff --git a/svx/source/cui/optaccessibility.cxx b/svx/source/cui/optaccessibility.cxx
index 749e98a7d5c2..eb7cac6d8c5d 100644
--- a/svx/source/cui/optaccessibility.cxx
+++ b/svx/source/cui/optaccessibility.cxx
@@ -145,14 +145,14 @@ BOOL SvxAccessibilityOptionsTabPage::FillItemSet( SfxItemSet& )
if(m_pImpl->m_aConfig.IsModified())
m_pImpl->m_aConfig.Commit();
-#ifndef UNX
AllSettings aAllSettings = Application::GetSettings();
MiscSettings aMiscSettings = aAllSettings.GetMiscSettings();
+#ifndef UNX
aMiscSettings.SetEnableATToolSupport( m_aAccessibilityTool.IsChecked() );
+#endif
aAllSettings.SetMiscSettings(aMiscSettings);
Application::SetSettings(aAllSettings);
Application::MergeSystemSettings( aAllSettings );
-#endif
return FALSE;
}