summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-11-13 19:04:43 +0100
committerKurt Zenker <kz@openoffice.org>2009-11-13 19:04:43 +0100
commit4103eede62ab8421b3de4b38f9905f6335a3e83e (patch)
treeb9928b625b762f1d96c84610cd7479317e1c084d
parent784cb16f8bc2f5b95e8147689455e8fd9e4510ae (diff)
parent1f2e63a3934fb42f6fbbf97f8c4bd3674ca74937 (diff)
CWS-TOOLING: integrate CWS changehc02
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.cxx2
-rw-r--r--desktop/source/deployment/gui/license_dialog.cxx2
-rw-r--r--fpicker/source/office/iodlg.cxx4
-rw-r--r--fpicker/source/office/iodlgimp.cxx4
-rw-r--r--sfx2/source/appl/newhelp.cxx6
-rw-r--r--sfx2/source/dialog/templdlg.cxx4
-rw-r--r--sfx2/source/doc/docvor.cxx6
-rw-r--r--sfx2/source/menu/mnuitem.cxx4
-rw-r--r--sfx2/source/menu/virtmenu.cxx6
-rw-r--r--sfx2/source/toolbox/imgmgr.cxx4
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx6
-rw-r--r--svx/source/cui/SpellDialog.cxx6
-rw-r--r--svx/source/cui/align.cxx2
-rw-r--r--svx/source/cui/border.cxx8
-rw-r--r--svx/source/cui/cfg.cxx11
-rw-r--r--svx/source/cui/labdlg.cxx2
-rw-r--r--svx/source/cui/macropg.cxx4
-rw-r--r--svx/source/cui/optaccessibility.cxx2
-rw-r--r--svx/source/cui/optcolor.cxx2
-rw-r--r--svx/source/cui/optsave.cxx2
-rw-r--r--svx/source/cui/readonlyimage.cxx2
-rw-r--r--svx/source/cui/tphatch.cxx4
-rw-r--r--svx/source/cui/tpline.cxx2
-rw-r--r--svx/source/cui/treeopt.cxx4
-rw-r--r--svx/source/dialog/_bmpmask.cxx2
-rw-r--r--svx/source/dialog/_contdlg.cxx2
-rw-r--r--svx/source/dialog/connctrl.cxx2
-rw-r--r--svx/source/dialog/dlgctrl.cxx6
-rw-r--r--svx/source/dialog/docrecovery.cxx4
-rw-r--r--svx/source/dialog/fontwork.cxx4
-rw-r--r--svx/source/dialog/frmsel.cxx2
-rw-r--r--svx/source/dialog/hyprlink.cxx5
-rw-r--r--svx/source/dialog/imapdlg.cxx2
-rw-r--r--svx/source/dialog/langbox.cxx2
-rw-r--r--svx/source/dialog/measctrl.cxx4
-rw-r--r--svx/source/dialog/swframeexample.cxx2
-rw-r--r--svx/source/form/datanavi.cxx6
-rw-r--r--svx/source/form/fmshimp.cxx4
-rw-r--r--svx/source/form/tbxform.cxx2
-rw-r--r--svx/source/gallery2/galbrws2.cxx2
-rw-r--r--svx/source/stbctrls/xmlsecctrl.cxx8
-rw-r--r--svx/source/stbctrls/zoomsliderctrl.cxx8
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.cxx18
-rw-r--r--svx/source/tbxctrls/fontworkgallery.cxx8
-rw-r--r--svx/source/tbxctrls/itemwin.cxx4
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx2
-rw-r--r--svx/source/tbxctrls/tbxcolorupdate.cxx6
47 files changed, 94 insertions, 110 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index f4473c2c6fd8..36f08dbf5b32 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -1141,7 +1141,7 @@ void ExtensionBox_Impl::checkEntries()
//------------------------------------------------------------------------------
bool ExtensionBox_Impl::isHCMode()
{
- return (bool)GetDisplayBackground().GetColor().IsDark();
+ return (bool)GetSettings().GetStyleSettings().GetHighContrastMode();
}
//------------------------------------------------------------------------------
diff --git a/desktop/source/deployment/gui/license_dialog.cxx b/desktop/source/deployment/gui/license_dialog.cxx
index bbc6a983c1fd..555b7578b327 100644
--- a/desktop/source/deployment/gui/license_dialog.cxx
+++ b/desktop/source/deployment/gui/license_dialog.cxx
@@ -215,7 +215,7 @@ LicenseDialogImpl::LicenseDialogImpl(
{
- if (GetBackground().GetColor().IsDark())
+ if (GetSettings().GetStyleSettings().GetHighContrastMode())
{
// high contrast mode needs other images
m_fiArrow1.SetImage(Image(DpGuiResId(IMG_LICENCE_ARROW_HC)));
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 1b9494bdae22..5470df6fe409 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -560,7 +560,7 @@ void SvtFileDialog::Init_Impl
WinBits nStyle
)
{
- sal_Bool bIsHighContrast = GetDisplayBackground().GetColor().IsDark();
+ sal_Bool bIsHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
m_aImages = ImageList( SvtResId( bIsHighContrast ? RID_FILEPICKER_IMAGES_HC : RID_FILEPICKER_IMAGES ) );
_pImp->_nStyle = nStyle;
@@ -2683,7 +2683,7 @@ void SvtFileDialog::implUpdateImages( )
{
// determine high contrast mode
{
- sal_Bool bIsHighContrast = GetDisplayBackground().GetColor().IsDark();
+ sal_Bool bIsHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
m_aImages = ImageList( SvtResId( bIsHighContrast ? RID_FILEPICKER_IMAGES_HC : RID_FILEPICKER_IMAGES ) );
}
diff --git a/fpicker/source/office/iodlgimp.cxx b/fpicker/source/office/iodlgimp.cxx
index 3a34c1da7be6..4d217f518547 100644
--- a/fpicker/source/office/iodlgimp.cxx
+++ b/fpicker/source/office/iodlgimp.cxx
@@ -231,7 +231,7 @@ void SvtUpButton_Impl::FillURLMenu( PopupMenu* _pMenu )
::svtools::VolumeInfo aVolInfo( sal_True /* volume */, sal_False /* remote */,
sal_False /* removable */, sal_False /* floppy */,
sal_False /* compact disk */ );
- sal_Bool bIsHighContrast = pBox->GetDisplayBackground().GetColor().IsDark();
+ sal_Bool bIsHighContrast = pBox->GetSettings().GetStyleSettings().GetHighContrastMode();
Image aVolumeImage( SvFileInformationManager::GetFolderImage( aVolInfo, bIsHighContrast ) );
while ( nCount >= 1 )
@@ -319,7 +319,7 @@ void SvtTravelButton_Impl::FillURLMenu( PopupMenu* _pMenu )
_pMenu->Clear();
- sal_Bool bIsHighContrast = GetDialogParent()->GetView()->GetDisplayBackground().GetColor().IsDark();
+ sal_Bool bIsHighContrast = GetDialogParent()->GetView()->GetSettings().GetStyleSettings().GetHighContrastMode();
USHORT nItemId = 1;
String sDisplayName;
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 5051f71ab78e..df47180c9f77 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -296,7 +296,7 @@ ContentListBox_Impl::ContentListBox_Impl( Window* pParent, const ResId& rResId )
aDocumentImage ( SfxResId( IMG_HELP_CONTENT_DOC ) )
{
- if ( GetSettings().GetStyleSettings().GetWindowColor().IsDark() )
+ if ( GetSettings().GetStyleSettings().GetHighContrastMode() )
{
aOpenBookImage = Image( SfxResId( IMG_HELP_CONTENT_BOOK_OPEN_HC ) );
aClosedBookImage = Image( SfxResId( IMG_HELP_CONTENT_BOOK_CLOSED_HC ) );
@@ -2178,7 +2178,7 @@ sal_Bool SfxHelpTextWindow_Impl::HasSelection() const
void SfxHelpTextWindow_Impl::InitToolBoxImages()
{
sal_Bool bLarge = SvtMiscOptions().AreCurrentSymbolsLarge();
- sal_Bool bHiContrast = GetBackground().GetColor().IsDark();
+ sal_Bool bHiContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
aIndexOnImage = Image( SfxResId(
bLarge ? bHiContrast ? IMG_HELP_TOOLBOX_HCL_INDEX_ON : IMG_HELP_TOOLBOX_L_INDEX_ON
@@ -2584,7 +2584,7 @@ long SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt )
if ( pCmdEvt->GetCommand() == COMMAND_CONTEXTMENU && pCmdWin != this && pCmdWin != &aToolBox )
{
- sal_Bool bHiContrast = GetSettings().GetStyleSettings().GetMenuColor().IsDark();
+ sal_Bool bHiContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
Point aPos;
if ( pCmdEvt->IsMouseEvent() )
aPos = pCmdEvt->GetMousePosPixel();
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 706739cd0571..fb21ff8463a1 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -2407,7 +2407,7 @@ void SfxTemplateDialog_Impl::updateFamilyImages()
return;
// let the families collection update the images
- sal_Bool bIsHighContrast = m_pFloat->GetDisplayBackground().GetColor().IsDark();
+ sal_Bool bIsHighContrast = m_pFloat->GetSettings().GetStyleSettings().GetHighContrastMode();
pStyleFamilies->updateImages( *m_pStyleFamiliesId, bIsHighContrast ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL );
// and set the new images on our toolbox
@@ -2424,7 +2424,7 @@ void SfxTemplateDialog_Impl::updateFamilyImages()
void SfxTemplateDialog_Impl::updateNonFamilyImages()
{
m_aActionTbR.SetImageList( ImageList( SfxResId(
- m_pFloat->GetDisplayBackground().GetColor().IsDark() ? IMG_LST_STYLE_DESIGNER_HC
+ m_pFloat->GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_LST_STYLE_DESIGNER_HC
: DLG_STYLE_DESIGNER ) ) );
}
diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx
index e70824869070..d0c10556abd3 100644
--- a/sfx2/source/doc/docvor.cxx
+++ b/sfx2/source/doc/docvor.cxx
@@ -1188,7 +1188,7 @@ void SfxOrganizeListBox_Impl::RequestingChilds( SvLBoxEntry* pEntry )
// einfuegen
BmpColorMode eColorMode = BMP_COLOR_NORMAL;
- if ( GetDisplayBackground().GetColor().IsDark() )
+ if ( GetSettings().GetStyleSettings().GetHighContrastMode() )
eColorMode = BMP_COLOR_HIGHCONTRAST;
@@ -1480,7 +1480,7 @@ const Image &SfxOrganizeListBox_Impl::GetClosedBmp(USHORT nLevel) const
*/
{
- BOOL bHC = GetBackground().GetColor().IsDark();
+ BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
const Image* pRet = NULL;
switch( nLevel )
@@ -1514,7 +1514,7 @@ const Image &SfxOrganizeListBox_Impl::GetOpenedBmp(USHORT nLevel) const
*/
{
- BOOL bHC = GetBackground().GetColor().IsDark();
+ BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
const Image* pRet = NULL;
switch( nLevel )
diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx
index 988bbf3b4118..6619c17d3077 100644
--- a/sfx2/source/menu/mnuitem.cxx
+++ b/sfx2/source/menu/mnuitem.cxx
@@ -451,7 +451,7 @@ SfxAppMenuControl_Impl::SfxAppMenuControl_Impl(
// Determine the current background color setting for menus
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
m_nSymbolsStyle = rSettings.GetSymbolsStyle();
- m_bWasHiContrastMode = rSettings.GetMenuColor().IsDark();
+ m_bWasHiContrastMode = rSettings.GetHighContrastMode();
m_bShowMenuImages = rSettings.GetUseImagesInMenus();
Reference<com::sun::star::lang::XMultiServiceFactory> aXMultiServiceFactory(::comphelper::getProcessServiceFactory());
@@ -477,7 +477,7 @@ IMPL_LINK( SfxAppMenuControl_Impl, Activate, Menu *, pActMenu )
{
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
ULONG nSymbolsStyle = rSettings.GetSymbolsStyle();
- BOOL bIsHiContrastMode = rSettings.GetMenuColor().IsDark();
+ BOOL bIsHiContrastMode = rSettings.GetHighContrastMode();
BOOL bShowMenuImages = rSettings.GetUseImagesInMenus();
if (( nSymbolsStyle != m_nSymbolsStyle ) ||
diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx
index 88c9ba8aa757..e0b6f6f32bf2 100644
--- a/sfx2/source/menu/virtmenu.cxx
+++ b/sfx2/source/menu/virtmenu.cxx
@@ -336,11 +336,7 @@ SfxVirtualMenu::~SfxVirtualMenu()
BOOL SfxVirtualMenu::IsHiContrastMode() const
{
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- Color aMenuColor = rSettings.GetMenuColor();
- if ( aMenuColor.IsDark() )
- return TRUE;
- else
- return FALSE;
+ return rSettings.GetHighContrastMode();
}
//--------------------------------------------------------------------
diff --git a/sfx2/source/toolbox/imgmgr.cxx b/sfx2/source/toolbox/imgmgr.cxx
index 6f00ae5b7681..0d659826d453 100644
--- a/sfx2/source/toolbox/imgmgr.cxx
+++ b/sfx2/source/toolbox/imgmgr.cxx
@@ -229,7 +229,7 @@ void SfxImageManager_Impl::SetSymbolsSize_Impl( sal_Int16 nNewSymbolsSize )
if ( pInf->nFlags & SFX_TOOLBOX_CHANGESYMBOLSET )
{
ToolBox *pBox = pInf->pToolBox;
- BOOL bHiContrast = pBox->GetBackground().GetColor().IsDark();
+ BOOL bHiContrast = pBox->GetSettings().GetStyleSettings().GetHighContrastMode();
USHORT nCount = pBox->GetItemCount();
for ( USHORT nPos=0; nPos<nCount; nPos++ )
{
@@ -424,6 +424,6 @@ void SfxImageManager::SetImagesForceSize( ToolBox& rToolBox, BOOL bHiContrast, B
void SfxImageManager::SetImages( ToolBox& rToolBox )
{
BOOL bLarge = ( pImp->m_nSymbolsSize == SFX_SYMBOLS_SIZE_LARGE );
- BOOL bHiContrast = rToolBox.GetBackground().GetColor().IsDark();
+ BOOL bHiContrast = rToolBox.GetSettings().GetStyleSettings().GetHighContrastMode();
SetImagesForceSize( rToolBox, bHiContrast, bLarge );
}
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index 6a776f6a211e..b6e69156214d 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -1529,7 +1529,7 @@ SfxAppToolBoxControl_Impl::SfxAppToolBoxControl_Impl( USHORT nSlotId, USHORT nId
// Determine the current background color of the menus
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
m_nSymbolsStyle = rSettings.GetSymbolsStyle();
- m_bWasHiContrastMode = rSettings.GetMenuColor().IsDark();
+ m_bWasHiContrastMode = rSettings.GetHighContrastMode();
m_bShowMenuImages = rSettings.GetUseImagesInMenus();
SetImage( String() );
@@ -1654,7 +1654,7 @@ void SfxAppToolBoxControl_Impl::SetImage( const String &rURL )
aURL = sFallback;
BOOL bBig = SvtMiscOptions().AreCurrentSymbolsLarge();
- BOOL bHC = GetToolBox().GetBackground().GetColor().IsDark();
+ BOOL bHC = GetToolBox().GetSettings().GetStyleSettings().GetHighContrastMode();
Image aImage = SvFileInformationManager::GetImageNoDefault( INetURLObject( aURL ), bBig, bHC );
if ( !aImage )
aImage = !!aMenuImage ? aMenuImage :
@@ -1805,7 +1805,7 @@ IMPL_LINK( SfxAppToolBoxControl_Impl, Activate, Menu *, pActMenu )
{
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
ULONG nSymbolsStyle = rSettings.GetSymbolsStyle();
- BOOL bIsHiContrastMode = rSettings.GetMenuColor().IsDark();
+ BOOL bIsHiContrastMode = rSettings.GetHighContrastMode();
BOOL bShowMenuImages = rSettings.GetUseImagesInMenus();
if (( nSymbolsStyle != m_nSymbolsStyle ) ||
diff --git a/svx/source/cui/SpellDialog.cxx b/svx/source/cui/SpellDialog.cxx
index 3febb657ded2..86dbf966619a 100644
--- a/svx/source/cui/SpellDialog.cxx
+++ b/svx/source/cui/SpellDialog.cxx
@@ -914,7 +914,7 @@ void SpellDialog::SetTitle_Impl(LanguageType nLang)
const SpellErrorDescription* pSpellErrorDescription = aSentenceED.GetAlternatives();
if( pSpellErrorDescription && pSpellErrorDescription->sServiceName.getLength() )
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
::rtl::OUString sSuggestionImageUrl =
SvtLinguConfig().GetSpellAndGrammarDialogImage( pSpellErrorDescription->sServiceName, bHighContrast );
aVendorImageFI.SetImage( lcl_GetImageFromPngUrl( sSuggestionImageUrl ) );
@@ -924,7 +924,7 @@ void SpellDialog::SetTitle_Impl(LanguageType nLang)
}
else
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
aVendorImageFI.SetImage( bHighContrast ? aVendorImageHC : aVendorImage );
}
@@ -935,7 +935,7 @@ void SpellDialog::SetTitle_Impl(LanguageType nLang)
}
else
{
- //bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ //bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
sTitle = m_sTitleSpellingGrammar;
}
}
diff --git a/svx/source/cui/align.cxx b/svx/source/cui/align.cxx
index e6e65efc31f2..641ee0717b96 100644
--- a/svx/source/cui/align.cxx
+++ b/svx/source/cui/align.cxx
@@ -248,7 +248,7 @@ void AlignmentTabPage::InitVsRefEgde()
// remember selection - is deleted in call to ValueSet::Clear()
USHORT nSel = maVsRefEdge.GetSelectItemId();
- ResId aResId( GetBackground().GetColor().IsDark() ? IL_LOCK_BMPS_HC : IL_LOCK_BMPS, DIALOG_MGR() );
+ ResId aResId( GetSettings().GetStyleSettings().GetHighContrastMode() ? IL_LOCK_BMPS_HC : IL_LOCK_BMPS, DIALOG_MGR() );
ImageList aImageList( aResId );
Size aItemSize( aImageList.GetImage( IID_BOTTOMLOCK ).GetSizePixel() );
diff --git a/svx/source/cui/border.cxx b/svx/source/cui/border.cxx
index b2ed7bc9ef02..101afc828371 100644
--- a/svx/source/cui/border.cxx
+++ b/svx/source/cui/border.cxx
@@ -1033,8 +1033,8 @@ USHORT SvxBorderTabPage::GetPresetStringId( USHORT nValueSetIdx ) const
void SvxBorderTabPage::FillPresetVS()
{
// find correct image list
- bool bDark = aWndPresets.GetDisplayBackground().GetColor().IsDark();
- ImageList& rImgList = bDark ? aBorderImgLstH : aBorderImgLst;
+ bool bHC = aWndPresets.GetSettings().GetStyleSettings().GetHighContrastMode();
+ ImageList& rImgList = bHC ? aBorderImgLstH : aBorderImgLst;
Size aImgSize( rImgList.GetImage( IID_PRE_CELL_NONE ).GetSizePixel() );
// basic initialization of the ValueSet
@@ -1060,8 +1060,8 @@ void SvxBorderTabPage::FillPresetVS()
void SvxBorderTabPage::FillShadowVS()
{
// find correct image list
- bool bDark = aWndShadows.GetDisplayBackground().GetColor().IsDark();
- ImageList& rImgList = bDark ? aShadowImgLstH : aShadowImgLst;
+ bool bHC = aWndPresets.GetSettings().GetStyleSettings().GetHighContrastMode();
+ ImageList& rImgList = bHC ? aShadowImgLstH : aShadowImgLst;
Size aImgSize( rImgList.GetImage( IID_SHADOWNONE ).GetSizePixel() );
// basic initialization of the ValueSet
diff --git a/svx/source/cui/cfg.cxx b/svx/source/cui/cfg.cxx
index 346fb0bb5d1e..5df1e03edb53 100644
--- a/svx/source/cui/cfg.cxx
+++ b/svx/source/cui/cfg.cxx
@@ -403,7 +403,7 @@ void InitImageType()
Window* topwin = Application::GetActiveTopWindow();
if ( topwin != NULL &&
- topwin->GetDisplayBackground().GetColor().IsDark() )
+ topwin->GetSettings().GetStyleSettings().GetHighContrastMode() )
{
theImageType |= css::ui::ImageType::COLOR_HIGHCONTRAST;
}
@@ -5114,7 +5114,7 @@ SvxToolbarEntriesListBox::SvxToolbarEntriesListBox(
BuildCheckBoxButtonImages( m_pButtonData );
EnableCheckButton( m_pButtonData );
- m_bHiContrastMode = GetDisplayBackground().GetColor().IsDark();
+ m_bHiContrastMode = GetSettings().GetStyleSettings().GetHighContrastMode();
}
// --------------------------------------------------------
@@ -5189,11 +5189,8 @@ void SvxToolbarEntriesListBox::DataChanged( const DataChangedEvent& rDCEvt )
if (( rDCEvt.GetType() == DATACHANGED_SETTINGS ) &&
( rDCEvt.GetFlags() & SETTINGS_STYLE ))
{
- if ( m_bHiContrastMode != GetDisplayBackground().GetColor().IsDark() )
- {
- // We have to reset all images because we change to/from high contrast mode
- m_bHiContrastMode = GetDisplayBackground().GetColor().IsDark();
- }
+ // We have to reset all images because we change to/from high contrast mode
+ m_bHiContrastMode = GetSettings().GetStyleSettings().GetHighContrastMode();
BuildCheckBoxButtonImages( m_pButtonData );
Invalidate();
diff --git a/svx/source/cui/labdlg.cxx b/svx/source/cui/labdlg.cxx
index 02a3bd158c79..327300d3a603 100644
--- a/svx/source/cui/labdlg.cxx
+++ b/svx/source/cui/labdlg.cxx
@@ -574,7 +574,7 @@ void SvxCaptionTabPage::DataChanged( const DataChangedEvent& rDCEvt )
void SvxCaptionTabPage::FillValueSet()
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
Image** ppBitmaps = bHighContrast ? mpBmpCapTypesH : mpBmpCapTypes;
aCT_CAPTTYPE.SetItemImage(BMP_CAPTTYPE_1, *(ppBitmaps[0]) );
diff --git a/svx/source/cui/macropg.cxx b/svx/source/cui/macropg.cxx
index 0ee76246abe3..bda5aca7372b 100644
--- a/svx/source/cui/macropg.cxx
+++ b/svx/source/cui/macropg.cxx
@@ -494,9 +494,7 @@ void IconLBoxString::Paint( const Point& aPos, SvLBox& aDevice,
sal_Int32 nIndex = aURL.indexOf( aVndSunStarUNO );
bool bUNO = nIndex == 0;
- Wallpaper aBackground = aDevice.GetBackground();
- Color aColor = aBackground.GetColor();
- BOOL bHC = aColor.IsDark();
+ BOOL bHC = aDevice.GetSettings().GetStyleSettings().GetHighContrastMode();
const Image* pImg;
if( bHC )
pImg = bUNO ? m_pComponentImg_h : m_pMacroImg_h;
diff --git a/svx/source/cui/optaccessibility.cxx b/svx/source/cui/optaccessibility.cxx
index eb7cac6d8c5d..4f47bbf168ae 100644
--- a/svx/source/cui/optaccessibility.cxx
+++ b/svx/source/cui/optaccessibility.cxx
@@ -151,8 +151,8 @@ BOOL SvxAccessibilityOptionsTabPage::FillItemSet( SfxItemSet& )
aMiscSettings.SetEnableATToolSupport( m_aAccessibilityTool.IsChecked() );
#endif
aAllSettings.SetMiscSettings(aMiscSettings);
- Application::SetSettings(aAllSettings);
Application::MergeSystemSettings( aAllSettings );
+ Application::SetSettings(aAllSettings);
return FALSE;
}
diff --git a/svx/source/cui/optcolor.cxx b/svx/source/cui/optcolor.cxx
index 11112dd936cd..e20c2284314c 100644
--- a/svx/source/cui/optcolor.cxx
+++ b/svx/source/cui/optcolor.cxx
@@ -762,9 +762,9 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(Window* pParent, const ResId& rRe
Wallpaper aTransparentWall(TempColor);
sal_Int32 nWinWidth = GetSizePixel().Width();
sal_Int32 nFTHeight = aChapters[0]->GetSizePixel().Height();
- sal_Bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
Color aBackColor;
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
+ sal_Bool bHighContrast = rStyleSettings.GetHighContrastMode();
if ( bHighContrast )
aBackColor = rStyleSettings.GetShadowColor();
else
diff --git a/svx/source/cui/optsave.cxx b/svx/source/cui/optsave.cxx
index 29708444fe93..893300d10e01 100644
--- a/svx/source/cui/optsave.cxx
+++ b/svx/source/cui/optsave.cxx
@@ -233,7 +233,7 @@ SfxSaveTabPage::SfxSaveTabPage( Window* pParent, const SfxItemSet& rCoreSet ) :
pImpl ( new SvxSaveTabPage_Impl )
{
- sal_Bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+ sal_Bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
aODFWarningFI.SetImage(
Image( SVX_RES( bHighContrast ? IMG_ODF_WARNING_HC : IMG_ODF_WARNING ) ) );
diff --git a/svx/source/cui/readonlyimage.cxx b/svx/source/cui/readonlyimage.cxx
index a43a87d820c8..b22ee80f3a4c 100644
--- a/svx/source/cui/readonlyimage.cxx
+++ b/svx/source/cui/readonlyimage.cxx
@@ -46,7 +46,7 @@
ReadOnlyImage::ReadOnlyImage(Window* pParent, const ResId rResId) :
FixedImage(pParent, rResId)
{
- sal_Bool bHighContrast = pParent->GetDisplayBackground().GetColor().IsDark();
+ sal_Bool bHighContrast = pParent->GetSettings().GetStyleSettings().GetHighContrastMode();
SetImage( Image(SVX_RES(bHighContrast ? RID_SVXBMP_LOCK_HC : RID_SVXBMP_LOCK )));
}
diff --git a/svx/source/cui/tphatch.cxx b/svx/source/cui/tphatch.cxx
index d060031abea2..58c55321195a 100644
--- a/svx/source/cui/tphatch.cxx
+++ b/svx/source/cui/tphatch.cxx
@@ -164,7 +164,7 @@ SvxHatchTabPage::SvxHatchTabPage
aBtnLoad.SetClickHdl( LINK( this, SvxHatchTabPage, ClickLoadHdl_Impl ) );
aBtnSave.SetClickHdl( LINK( this, SvxHatchTabPage, ClickSaveHdl_Impl ) );
- aCtlPreview.SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
+ aCtlPreview.SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
}
// -----------------------------------------------------------------------
@@ -905,7 +905,7 @@ void SvxHatchTabPage::PointChanged( Window* pWindow, RECT_POINT eRcPt )
void SvxHatchTabPage::DataChanged( const DataChangedEvent& rDCEvt )
{
if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
- aCtlPreview.SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
+ aCtlPreview.SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
SvxTabPage::DataChanged( rDCEvt );
}
diff --git a/svx/source/cui/tpline.cxx b/svx/source/cui/tpline.cxx
index edbf7247fd47..c6cc30cbb0ba 100644
--- a/svx/source/cui/tpline.cxx
+++ b/svx/source/cui/tpline.cxx
@@ -299,7 +299,7 @@ void SvxLineTabPage::Construct()
void SvxLineTabPage::FillListboxes()
{
-// aCtlPreview.SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
+// aCtlPreview.SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
ResMgr& rMgr = DIALOG_MGR();
diff --git a/svx/source/cui/treeopt.cxx b/svx/source/cui/treeopt.cxx
index 744f9d5c1dbe..f33efffc2416 100644
--- a/svx/source/cui/treeopt.cxx
+++ b/svx/source/cui/treeopt.cxx
@@ -1078,7 +1078,7 @@ void OfaTreeOptionsDialog::DataChanged( const DataChangedEvent& rDCEvt )
!aTreeLB.GetParent(pEntry))
{
OptionsGroupInfo* pInfo = static_cast<OptionsGroupInfo*>(pEntry->GetUserData());
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
ImageList* pImgLst = bHighContrast ? &aPageImagesHC : &aPageImages;
for ( sal_uInt16 i = 0; i < aHelpTextsArr.Count(); ++i )
{
@@ -1336,7 +1336,7 @@ IMPL_LINK( OfaTreeOptionsDialog, SelectHdl_Impl, Timer*, EMPTYARG )
OptionsGroupInfo* pTGInfo = (OptionsGroupInfo *)pEntry->GetUserData();
if ( pTGInfo->m_sPageURL.getLength() == 0 )
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
ImageList* pImgLst = bHighContrast ? &aPageImagesHC : &aPageImages;
//hier den Hilfetext anzeigen
for ( sal_uInt16 i = 0; i < aHelpTextsArr.Count(); ++i )
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index 6eac7520fe42..91f6021b92b9 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -1212,7 +1212,7 @@ void SvxBmpMask::DataChanged( const DataChangedEvent& rDCEvt )
void SvxBmpMask::ApplyStyle()
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
aTbxPipette.SetItemImage( TBI_PIPETTE, bHighContrast ? maImgPipetteH : maImgPipette );
}
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index 1e01b9cfde24..fa07ac74d517 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -1133,7 +1133,7 @@ IMPL_LINK( SvxSuperContourDlg, WorkplaceClickHdl, ContourWindow*, pWnd )
void SvxSuperContourDlg::ApplyImageList()
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
ImageList& rImgLst = bHighContrast ? maImageListH : maImageList;
diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx
index acc101cf4fb3..74fde268f9fa 100644
--- a/svx/source/dialog/connctrl.cxx
+++ b/svx/source/dialog/connctrl.cxx
@@ -374,7 +374,7 @@ void SvxXConnectionPreview::MouseButtonDown( const MouseEvent& rMEvt )
void SvxXConnectionPreview::SetStyles()
{
const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
- SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
+ SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
SetBackground( Wallpaper( Color( rStyles.GetFieldColor() ) ) );
}
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 59d0c721b560..d2b01ac62ab4 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -1202,7 +1202,7 @@ void HatchingLB::UserDraw( const UserDrawEvent& rUDEvt )
OutputDevice* pDevice = rUDEvt.GetDevice();
ULONG nOldDrawMode = pDevice->GetDrawMode();
- pDevice->SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
+ pDevice->SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
XHatch& rXHatch = mpList->GetHatch( rUDEvt.GetItemId() )->GetHatch();
MapMode aMode( MAP_100TH_MM );
@@ -1943,7 +1943,7 @@ SvxPreviewBase::SvxPreviewBase( Window* pParent, const ResId& rResId )
{
// Draw the control's border as a flat thin black line.
SetBorderStyle(WINDOW_BORDER_MONO);
- SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
+ SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
SetMapMode(MAP_100TH_MM);
// init model
@@ -2006,7 +2006,7 @@ void SvxPreviewBase::StateChanged(StateChangedType nType)
void SvxPreviewBase::DataChanged(const DataChangedEvent& rDCEvt)
{
- SetDrawMode(GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR);
+ SetDrawMode(GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR);
if((DATACHANGED_SETTINGS == rDCEvt.GetType()) && (rDCEvt.GetFlags() & SETTINGS_STYLE))
{
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx
index 90cbdc27cb1a..a380e480f295 100644
--- a/svx/source/dialog/docrecovery.cxx
+++ b/svx/source/dialog/docrecovery.cxx
@@ -917,9 +917,7 @@ void RecovDocListEntry::Paint(const Point& aPos ,
const String* pTxt = 0;
RecovDocList* pList = static_cast< RecovDocList* >(&aDevice);
- Wallpaper aBackground = aDevice.GetBackground();
- Color aColor = aBackground.GetColor();
- BOOL bHC = aColor.IsDark();
+ BOOL bHC = aDevice.GetSettings().GetStyleSettings().GetHighContrastMode();
TURLInfo* pInfo = (TURLInfo*)pEntry->GetUserData();
switch(pInfo->RecoveryState)
diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx
index 54f831f3505a..ffcf8f21b49d 100644
--- a/svx/source/dialog/fontwork.cxx
+++ b/svx/source/dialog/fontwork.cxx
@@ -1228,9 +1228,7 @@ void SvxFontWorkDialog::DataChanged( const DataChangedEvent& rDCEvt )
---------------------------------------------------------------------------*/
void SvxFontWorkDialog::ApplyImageList()
{
- bool bHighContrast =
- (GetSettings().GetStyleSettings().GetHighContrastMode() != 0) &&
- (GetDisplayBackground().GetColor().IsDark() != 0);
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
ResMgr* _pMgr = &DIALOG_MGR();
diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index 10e53698af7e..fa413d81ed17 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -328,7 +328,7 @@ void FrameSelectorImpl::InitColors()
{
const StyleSettings& rSett = mrFrameSel.GetSettings().GetStyleSettings();
maBackCol = rSett.GetFieldColor();
- mbHCMode = maBackCol.IsDark();
+ mbHCMode = rSett.GetHighContrastMode();
maArrowCol = rSett.GetFieldTextColor();
maMarkCol.operator=( maBackCol ).Merge( maArrowCol, mbHCMode ? 0x80 : 0xC0 );
maHCLineCol = rSett.GetLabelTextColor();
diff --git a/svx/source/dialog/hyprlink.cxx b/svx/source/dialog/hyprlink.cxx
index 86d01aa9fdb8..0cb6cc4d52df 100644
--- a/svx/source/dialog/hyprlink.cxx
+++ b/svx/source/dialog/hyprlink.cxx
@@ -828,10 +828,7 @@ void SvxHyperlinkDlg::DataChanged( const DataChangedEvent& rDCEvt )
void SvxHyperlinkDlg::SetImages()
{
- bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode() != 0;
-
- if( bHighContrast )
- bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
SetItemImage( BTN_LINK, mpManager->GetImage( BTN_LINK, bHighContrast ) );
SetItemImage( BTN_INSERT_BOOKMARK, mpManager->GetImage( BTN_INSERT_BOOKMARK, bHighContrast ) );
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index 5777dc8e7446..a9c43347b7bf 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -1042,7 +1042,7 @@ IMPL_LINK( SvxIMapDlg, MiscHdl, void*, EMPTYARG )
void SvxIMapDlg::ApplyImageList()
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
ImageList& rImgLst = bHighContrast ? maImageListH : maImageList;
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index c196178a4d16..87f1b89bd3f4 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -181,7 +181,7 @@ USHORT SvxLanguageBox::ImplInsertImgEntry( const String& rEntry, USHORT nPos, bo
USHORT nRet = 0;
if( !bChecked )
nRet = InsertEntry( rEntry, m_aNotCheckedImage, nPos );
- else if( GetSettings().GetStyleSettings().GetFaceColor().IsDark() )
+ else if( GetSettings().GetStyleSettings().GetHighContrastMode() )
nRet = InsertEntry( rEntry, m_aCheckedImageHC, nPos );
else
nRet = InsertEntry( rEntry, m_aCheckedImage, nPos );
diff --git a/svx/source/dialog/measctrl.cxx b/svx/source/dialog/measctrl.cxx
index 2c1747dbc0b4..73e376f9eac1 100644
--- a/svx/source/dialog/measctrl.cxx
+++ b/svx/source/dialog/measctrl.cxx
@@ -79,7 +79,7 @@ SvxXMeasurePreview::SvxXMeasurePreview
//pMeasureObj->SetItemSetAndBroadcast(rInAttrs);
pMeasureObj->SetMergedItemSetAndBroadcast(rInAttrs);
- SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
+ SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
Invalidate();
}
@@ -196,7 +196,7 @@ void SvxXMeasurePreview::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
+ SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
}
}
diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx
index 67f5ee2ea318..79035bc4b8cb 100644
--- a/svx/source/dialog/swframeexample.cxx
+++ b/svx/source/dialog/swframeexample.cxx
@@ -76,7 +76,7 @@ void SvxSwFrameExample::InitColors_Impl( void )
const StyleSettings& rSettings = GetSettings().GetStyleSettings();
m_aBgCol = Color( rSettings.GetWindowColor() ); // old: COL_WHITE
- BOOL bHC = m_aBgCol.IsDark();
+ BOOL bHC = rSettings.GetHighContrastMode();
m_aFrameColor = Color( COL_LIGHTGREEN );
m_aAlignColor = Color( COL_LIGHTRED );
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 791bebc772c8..ffe012734ae5 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -778,7 +778,7 @@ namespace svxform
SvLBoxEntry* XFormsPage::AddEntry( ItemNode* _pNewNode, bool _bIsElement )
{
SvLBoxEntry* pParent = m_aItemList.FirstSelected();
- const ImageList& rImageList = GetBackground().GetColor().IsDark()
+ const ImageList& rImageList = GetSettings().GetStyleSettings().GetHighContrastMode()
? m_pNaviWin->GetItemHCImageList()
: m_pNaviWin->GetItemImageList();
USHORT nImageID = ( _bIsElement ) ? IID_ELEMENT : IID_ATTRIBUTE;
@@ -988,7 +988,7 @@ namespace svxform
SvLBoxEntry* XFormsPage::AddEntry( const Reference< XPropertySet >& _rEntry )
{
SvLBoxEntry* pEntry = NULL;
- const ImageList& rImageList = GetBackground().GetColor().IsDark()
+ const ImageList& rImageList = GetSettings().GetStyleSettings().GetHighContrastMode()
? m_pNaviWin->GetItemHCImageList()
: m_pNaviWin->GetItemImageList();
Image aImage = rImageList.GetImage( IID_ELEMENT );
@@ -1244,7 +1244,7 @@ namespace svxform
m_xUIHelper = Reference< css::xforms::XFormsUIHelper1 >( _xModel, UNO_QUERY );
String sRet;
m_bHasModel = true;
- const ImageList& rImageList = GetBackground().GetColor().IsDark()
+ const ImageList& rImageList = GetSettings().GetStyleSettings().GetHighContrastMode()
? m_pNaviWin->GetItemHCImageList()
: m_pNaviWin->GetItemImageList();
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 8c5ca61f6691..e4d656a06f28 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -987,7 +987,7 @@ PopupMenu* FmXFormShell::GetConversionMenu()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::GetConversionMenu" );
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- BOOL bIsHiContrastMode = rSettings.GetMenuColor().IsDark();
+ BOOL bIsHiContrastMode = rSettings.GetHighContrastMode();
PopupMenu* pNewMenu = new PopupMenu(SVX_RES( RID_FMSHELL_CONVERSIONMENU ));
@@ -2001,7 +2001,7 @@ bool FmXFormShell::setCurrentSelection( const InterfaceBag& _rSelection )
m_aCurrentSelection = _rSelection;
- // determine the form which all the selected objécts belong to, if any
+ // determine the form which all the selected obj�cts belong to, if any
Reference< XForm > xNewCurrentForm;
for ( InterfaceBag::const_iterator loop = m_aCurrentSelection.begin();
loop != m_aCurrentSelection.end();
diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx
index 08c83b571a8f..ee9fd0c165b8 100644
--- a/svx/source/form/tbxform.cxx
+++ b/svx/source/form/tbxform.cxx
@@ -219,7 +219,7 @@ void SvxFmTbxCtlConfig::StateChanged(USHORT nSID, SfxItemState eState, const Sfx
Image aImage = GetImage( m_xFrame,
aSlotURL,
hasBigImages(),
- GetToolBox().GetDisplayBackground().GetColor().IsDark() );
+ GetToolBox().GetSettings().GetStyleSettings().GetHighContrastMode() );
GetToolBox().SetItemImage( GetId(), aImage );
nLastSlot = nSlot;
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index edc7f253a024..8240f607f5fa 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -1228,7 +1228,7 @@ IMPL_LINK( GalleryBrowser2, SelectTbxHdl, ToolBox*, pBox )
IMPL_LINK( GalleryBrowser2, MiscHdl, void*, EMPTYARG )
{
- const sal_Bool bHC = GALLERY_DLG_COLOR.IsDark();
+ const sal_Bool bHC = maViewBox.GetSettings().GetStyleSettings().GetHighContrastMode();
maViewBox.SetOutStyle( maMiscOptions.GetToolboxStyle() );
diff --git a/svx/source/stbctrls/xmlsecctrl.cxx b/svx/source/stbctrls/xmlsecctrl.cxx
index 890cde02e428..787985d0e7e9 100644
--- a/svx/source/stbctrls/xmlsecctrl.cxx
+++ b/svx/source/stbctrls/xmlsecctrl.cxx
@@ -97,12 +97,12 @@ XmlSecStatusBarControl::XmlSecStatusBarControl( USHORT _nSlotId, USHORT _nId, S
{
mpImpl->mnState = (UINT16)SIGNATURESTATE_UNKNOWN;
- sal_Bool bIsDark = GetStatusBar().GetBackground().GetColor().IsDark();
- mpImpl->maImage = Image( SVX_RES( bIsDark ? RID_SVXBMP_SIGNET_H : RID_SVXBMP_SIGNET ) );
+ sal_Bool bHC = GetStatusBar().GetSettings().GetStyleSettings().GetHighContrastMode();
+ mpImpl->maImage = Image( SVX_RES( bHC ? RID_SVXBMP_SIGNET_H : RID_SVXBMP_SIGNET ) );
mpImpl->maImageBroken =
- Image( SVX_RES( bIsDark ? RID_SVXBMP_SIGNET_BROKEN_H : RID_SVXBMP_SIGNET_BROKEN ) );
+ Image( SVX_RES( bHC ? RID_SVXBMP_SIGNET_BROKEN_H : RID_SVXBMP_SIGNET_BROKEN ) );
mpImpl->maImageNotValidated =
- Image( SVX_RES( bIsDark ? RID_SVXBMP_SIGNET_NOTVALIDATED_H : RID_SVXBMP_SIGNET_NOTVALIDATED ) );
+ Image( SVX_RES( bHC ? RID_SVXBMP_SIGNET_NOTVALIDATED_H : RID_SVXBMP_SIGNET_NOTVALIDATED ) );
}
XmlSecStatusBarControl::~XmlSecStatusBarControl()
diff --git a/svx/source/stbctrls/zoomsliderctrl.cxx b/svx/source/stbctrls/zoomsliderctrl.cxx
index 2f3431accf64..70b12ac628a6 100644
--- a/svx/source/stbctrls/zoomsliderctrl.cxx
+++ b/svx/source/stbctrls/zoomsliderctrl.cxx
@@ -188,10 +188,10 @@ SvxZoomSliderControl::SvxZoomSliderControl( USHORT _nSlotId, USHORT _nId, Statu
SfxStatusBarControl( _nSlotId, _nId, _rStb ),
mpImpl( new SvxZoomSliderControl_Impl )
{
- const sal_Bool bIsDark = GetStatusBar().GetBackground().GetColor().IsDark();
- mpImpl->maSliderButton = Image( SVX_RES( bIsDark ? RID_SVXBMP_SLIDERBUTTON_HC : RID_SVXBMP_SLIDERBUTTON ) );
- mpImpl->maIncreaseButton = Image( SVX_RES( bIsDark ? RID_SVXBMP_SLIDERINCREASE_HC : RID_SVXBMP_SLIDERINCREASE ) );
- mpImpl->maDecreaseButton = Image( SVX_RES( bIsDark ? RID_SVXBMP_SLIDERDECREASE_HC : RID_SVXBMP_SLIDERDECREASE ) );
+ const sal_Bool bHC = GetStatusBar().GetSettings().GetStyleSettings().GetHighContrastMode();
+ mpImpl->maSliderButton = Image( SVX_RES( bHC ? RID_SVXBMP_SLIDERBUTTON_HC : RID_SVXBMP_SLIDERBUTTON ) );
+ mpImpl->maIncreaseButton = Image( SVX_RES( bHC ? RID_SVXBMP_SLIDERINCREASE_HC : RID_SVXBMP_SLIDERINCREASE ) );
+ mpImpl->maDecreaseButton = Image( SVX_RES( bHC ? RID_SVXBMP_SLIDERDECREASE_HC : RID_SVXBMP_SLIDERDECREASE ) );
}
// -----------------------------------------------------------------------
diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx
index 06fe8c26f0be..f4964d1b1ff1 100644
--- a/svx/source/tbxctrls/extrusioncontrols.cxx
+++ b/svx/source/tbxctrls/extrusioncontrols.cxx
@@ -137,7 +137,7 @@ void ExtrusionDirectionWindow::implInit()
mpDirectionSet->SetColCount( 3 );
mpDirectionSet->EnableFullItemMode( FALSE );
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
for( i = DIRECTION_NW; i <= DIRECTION_SE; i++ )
{
@@ -174,7 +174,7 @@ void ExtrusionDirectionWindow::DataChanged( const DataChangedEvent& rDCEvt )
if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
USHORT i;
for( i = DIRECTION_NW; i <= DIRECTION_SE; i++ )
@@ -514,7 +514,7 @@ void ExtrusionDepthWindow::implInit()
mpMenu->SetSelectHdl( LINK( this, ExtrusionDepthWindow, SelectHdl ) );
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
String aEmpty;
mpMenu->appendEntry( 0, aEmpty, bHighContrast ? maImgDepth0h : maImgDepth0 );
@@ -635,7 +635,7 @@ void ExtrusionDepthWindow::DataChanged( const DataChangedEvent& rDCEvt )
if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
mpMenu->setEntryImage( 0, bHighContrast ? maImgDepth0h : maImgDepth0 );
mpMenu->setEntryImage( 1, bHighContrast ? maImgDepth1h : maImgDepth1 );
@@ -882,7 +882,7 @@ void ExtrusionLightingWindow::implInit()
mpLightingSet->SetColCount( 3 );
mpLightingSet->EnableFullItemMode( FALSE );
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
for( i = FROM_TOP_LEFT; i <= FROM_BOTTOM_RIGHT; i++ )
{
@@ -949,7 +949,7 @@ void ExtrusionLightingWindow::implSetDirection( int nDirection, bool bEnabled )
mnDirection = nDirection;
mbDirectionEnabled = bEnabled;
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
if( !bEnabled )
nDirection = FROM_FRONT;
@@ -1022,7 +1022,7 @@ void ExtrusionLightingWindow::DataChanged( const DataChangedEvent& rDCEvt )
if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
implSetDirection( mnDirection, mbDirectionEnabled );
mpMenu->setEntryImage( 0, bHighContrast ? maImgBrighth : maImgBright );
@@ -1231,7 +1231,7 @@ void ExtrusionSurfaceWindow::implInit()
{
SetHelpId( HID_POPUP_EXTRUSION_SURFACE );
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
// mpSurfaceForewarder = new SfxStatusForwarder( SID_EXTRUSION_SURFACE, *this );
@@ -1316,7 +1316,7 @@ void ExtrusionSurfaceWindow::DataChanged( const DataChangedEvent& rDCEvt )
if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
mpMenu->appendEntry( 0, String( SVX_RES( STR_WIREFRAME ) ), bHighContrast ? maImgSurface1h : maImgSurface1 );
mpMenu->appendEntry( 1, String( SVX_RES( STR_MATTE ) ), bHighContrast ? maImgSurface2h : maImgSurface2 );
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index dfa22cc64e23..111f2394836a 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -397,7 +397,7 @@ void FontWorkAlignmentWindow::implInit()
{
SetHelpId( HID_POPUP_FONTWORK_ALIGN );
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
mpMenu = new ToolbarMenu( this, WB_CLIPCHILDREN );
mpMenu->SetHelpId( HID_POPUP_FONTWORK_ALIGN );
@@ -477,7 +477,7 @@ void FontWorkAlignmentWindow::DataChanged( const DataChangedEvent& rDCEvt )
if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
mpMenu->appendEntry( 0, String( SVX_RES( STR_ALIGN_LEFT ) ), bHighContrast ? maImgAlgin1h : maImgAlgin1 );
mpMenu->appendEntry( 1, String( SVX_RES( STR_ALIGN_CENTER ) ), bHighContrast ? maImgAlgin2h : maImgAlgin2 );
@@ -637,7 +637,7 @@ void FontWorkCharacterSpacingWindow::implInit()
{
SetHelpId( HID_POPUP_FONTWORK_CHARSPACE );
-// bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+// bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
mpMenu = new ToolbarMenu( this, WB_CLIPCHILDREN );
mpMenu->SetHelpId( HID_POPUP_FONTWORK_CHARSPACE );
@@ -754,7 +754,7 @@ void FontWorkCharacterSpacingWindow::DataChanged( const DataChangedEvent& rDCEvt
if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
{
-// bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+// bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
mpMenu->appendEntry( 0, String( SVX_RES( STR_CHARS_SPACING_VERY_TIGHT ) ), MIB_CHECKABLE );
mpMenu->appendEntry( 1, String( SVX_RES( STR_CHARS_SPACING_TIGHT ) ), MIB_CHECKABLE );
diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx
index 030d7e0cf0df..846cb1f81825 100644
--- a/svx/source/tbxctrls/itemwin.cxx
+++ b/svx/source/tbxctrls/itemwin.cxx
@@ -74,7 +74,7 @@ using namespace ::com::sun::star::beans;
SvxLineBox::SvxLineBox( Window* pParent, const Reference< XFrame >& rFrame, WinBits nBits ) :
LineLB( pParent, nBits ),
- meBmpMode ( GetDisplayBackground().GetColor().IsDark() ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL ),
+ meBmpMode ( GetSettings().GetStyleSettings().GetHighContrastMode() ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL ),
nCurPos ( 0 ),
aLogicalSize(40,140),
bRelease ( TRUE ),
@@ -268,7 +268,7 @@ void SvxLineBox::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- BmpColorMode eMode = GetDisplayBackground().GetColor().IsDark() ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL;
+ BmpColorMode eMode = GetSettings().GetStyleSettings().GetHighContrastMode() ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL;
if( eMode != meBmpMode )
{
meBmpMode = eMode;
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index efa49025bbc4..d631a2dac467 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -282,7 +282,7 @@ public:
inline BOOL SvxFrameWindow_Impl::IsHighContrast( void ) const
{
- return GetDisplayBackground().GetColor().IsDark();
+ return GetSettings().GetStyleSettings().GetHighContrastMode();
}
//========================================================================
diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx
index 4d0ebe5dd6c2..3df0d8487ac2 100644
--- a/svx/source/tbxctrls/tbxcolorupdate.cxx
+++ b/svx/source/tbxctrls/tbxcolorupdate.cxx
@@ -63,7 +63,7 @@ namespace svx
if (mnSlotId == SID_BACKGROUND_COLOR)
mnDrawMode = TBX_UPDATER_MODE_CHAR_COLOR_NEW;
DBG_ASSERT( ptrTbx, "ToolBox not found :-(" );
- mbWasHiContrastMode = ptrTbx ? ( ptrTbx->GetBackground().GetColor().IsDark() ) : FALSE;
+ mbWasHiContrastMode = ptrTbx ? ( ptrTbx->GetSettings().GetStyleSettings().GetHighContrastMode() ) : FALSE;
Update(mnSlotId == SID_ATTR_CHAR_COLOR2 ? COL_BLACK : COL_GRAY);
}
@@ -79,7 +79,7 @@ namespace svx
{
Image aImage( mpTbx->GetItemImage( mnBtnId ) );
const bool bSizeChanged = ( maBmpSize != aImage.GetSizePixel() );
- const bool bDisplayModeChanged = ( mbWasHiContrastMode != mpTbx->GetBackground().GetColor().IsDark() );
+ const bool bDisplayModeChanged = ( mbWasHiContrastMode != mpTbx->GetSettings().GetStyleSettings().GetHighContrastMode() );
Color aColor( rColor );
// !!! #109290# Workaround for SetFillColor with COL_AUTO
@@ -107,7 +107,7 @@ namespace svx
else
pMskAcc = NULL;
- mbWasHiContrastMode = mpTbx->GetBackground().GetColor().IsDark();
+ mbWasHiContrastMode = mpTbx->GetSettings().GetStyleSettings().GetHighContrastMode();
if( mnDrawMode == TBX_UPDATER_MODE_CHAR_COLOR_NEW && ( COL_TRANSPARENT != aColor.GetColor() ) )
pBmpAcc->SetLineColor( aColor );