summaryrefslogtreecommitdiff
path: root/svx/source/dialog
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/dialog')
-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/hyperdlg.cxx6
-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
13 files changed, 19 insertions, 24 deletions
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index 1b33ad47ac..581c12712c 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 a81eba3cb1..92c03de1d6 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 2005cfb043..ad96fab911 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 2d3b9d33b4..a0d401eb4f 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 cd828cfaa8..ea7ff7479a 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 c361d97426..b967f3ed79 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 88bbbb8ef2..1347062895 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/hyperdlg.cxx b/svx/source/dialog/hyperdlg.cxx
index 3bb5f0b6b1..efbe2e850b 100644
--- a/svx/source/dialog/hyperdlg.cxx
+++ b/svx/source/dialog/hyperdlg.cxx
@@ -78,9 +78,11 @@ SvxHlinkDlgWrapper::SvxHlinkDlgWrapper( Window* _pParent, USHORT nId,
pWindow = mpDlg->GetWindow();
((MyStruct*)pImp)->bVisible = FALSE;
- if ( pInfo->aSize.Width() != 0 && pInfo->aSize.Height() != 0 )
+ Window* pTopWindow = 0;
+ if ( pInfo->aSize.Width() != 0 && pInfo->aSize.Height() != 0 &&
+ (0 != (pTopWindow = SFX_APP()->GetTopWindow())))
{
- Size aParentSize( SFX_APP()->GetTopWindow()->GetSizePixel() );
+ Size aParentSize( pTopWindow->GetSizePixel() );
Size aDlgSize ( GetSizePixel () );
if( aParentSize.Width() < pInfo->aPos.X() )
diff --git a/svx/source/dialog/hyprlink.cxx b/svx/source/dialog/hyprlink.cxx
index ee7c272fcc..c1be60ebe3 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 9cf1e4cb46..23dbaa60ea 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 b70f498c60..499f96d6a4 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 c7a4786a0f..3311375461 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 fc72b665ad..5bdfa05a3f 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 );