summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2009-11-23 17:39:22 +0100
committerMathias Bauer <mba@openoffice.org>2009-11-23 17:39:22 +0100
commit89ad581281e4790f616db43f3dbe6cb769b9c00f (patch)
treef2a1e0b1dc56f9affbf9f5350a50317539efd857
parent739e55aa044a5691b750e42473fafab0f5907a0f (diff)
parent70ebc074eaf9bdec8c657962290b45e8d89b3db3 (diff)
merge commit for m65
-rw-r--r--starmath/source/dialog.cxx12
-rw-r--r--starmath/source/document.cxx2
-rw-r--r--starmath/source/toolbox.cxx2
-rw-r--r--sw/source/core/doc/doccomp.cxx4
-rw-r--r--sw/source/core/txtnode/fntcache.cxx6
-rw-r--r--sw/source/core/view/viewsh.cxx2
-rw-r--r--sw/source/filter/ww1/w1class.cxx2
-rw-r--r--sw/source/filter/ww1/w1filter.cxx4
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx13
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
-rw-r--r--sw/source/ui/config/mailconfigpage.cxx2
-rw-r--r--sw/source/ui/config/optpage.cxx2
-rw-r--r--sw/source/ui/dbui/mailmergechildwindow.cxx6
-rw-r--r--sw/source/ui/envelp/envprt.cxx2
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx4
-rw-r--r--sw/source/ui/frmdlg/wrap.cxx2
-rw-r--r--sw/source/ui/lingu/olmenu.cxx10
-rw-r--r--sw/source/ui/ribbar/inputwin.cxx17
-rw-r--r--sw/source/ui/ribbar/workctrl.cxx12
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx2
-rw-r--r--sw/source/ui/utlui/content.cxx4
-rw-r--r--sw/source/ui/utlui/glbltree.cxx4
-rw-r--r--sw/source/ui/utlui/navipi.cxx4
-rw-r--r--sw/source/ui/utlui/viewlayoutctrl.cxx14
24 files changed, 68 insertions, 66 deletions
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 3a0c7455144f..95b2e0c36aad 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -396,9 +396,9 @@ void SmFontDialog::InitColor_Impl()
#endif
ColorData nBgCol = COL_WHITE,
nTxtCol = COL_BLACK;
- if (GetDisplayBackground().GetColor().IsDark())
+ const StyleSettings &rS = GetSettings().GetStyleSettings();
+ if (rS.GetHighContrastMode())
{
- const StyleSettings &rS = GetSettings().GetStyleSettings();
nBgCol = rS.GetFieldColor().GetColor();
nTxtCol = rS.GetFieldTextColor().GetColor();
}
@@ -967,7 +967,7 @@ SmDistanceDialog::~SmDistanceDialog()
void SmDistanceDialog::ApplyImages()
{
- BOOL bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ BOOL bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
for (int i = 0; i < NOCATEGORIES; ++i)
{
SmCategoryDesc *pCat = Categories[i];
@@ -1551,9 +1551,9 @@ void SmSymbolDialog::InitColor_Impl()
#endif
ColorData nBgCol = COL_WHITE,
nTxtCol = COL_BLACK;
- if (GetDisplayBackground().GetColor().IsDark())
+ const StyleSettings &rS = GetSettings().GetStyleSettings();
+ if (rS.GetHighContrastMode())
{
- const StyleSettings &rS = GetSettings().GetStyleSettings();
nBgCol = rS.GetFieldColor().GetColor();
nTxtCol = rS.GetFieldTextColor().GetColor();
}
@@ -2180,7 +2180,7 @@ void SmSymDefineDialog::InitColor_Impl()
#endif
ColorData nBgCol = COL_WHITE,
nTxtCol = COL_BLACK;
- BOOL bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ BOOL bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
if (bHighContrast)
{
const StyleSettings &rS = GetSettings().GetStyleSettings();
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 63b651fd0539..b9064a78a5f5 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -467,7 +467,7 @@ void SmDocShell::Draw(OutputDevice &rDev, Point &rPosition)
ULONG nOldDrawMode = DRAWMODE_DEFAULT;
BOOL bRestoreDrawMode = FALSE;
if (OUTDEV_WINDOW == rDev.GetOutDevType() &&
- ((Window &) rDev).GetDisplayBackground().GetColor().IsDark())
+ ((Window &) rDev).GetSettings().GetStyleSettings().GetHighContrastMode())
{
nOldDrawMode = rDev.GetDrawMode();
rDev.SetDrawMode( DRAWMODE_DEFAULT );
diff --git a/starmath/source/toolbox.cxx b/starmath/source/toolbox.cxx
index 2a912664fde4..c775f9be038b 100644
--- a/starmath/source/toolbox.cxx
+++ b/starmath/source/toolbox.cxx
@@ -222,7 +222,7 @@ const ImageList * SmToolBoxWindow::GetImageList( USHORT nResId, BOOL bHighContra
void SmToolBoxWindow::ApplyImageLists( USHORT nCategoryRID )
{
- BOOL bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ BOOL bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
// set image list for toolbox 'catalog'
const ImageList *pImageList = GetImageList( bHighContrast ? RID_ILH_CATALOG : RID_IL_CATALOG, bHighContrast );
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index 68c84dd3b644..047b5b2dc582 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -428,7 +428,7 @@ Compare::Compare( ULONG nDiff, CompareData& rData1, CompareData& rData2 )
SetDiscard( rData2, pDiscard2, pCount1 );
// die Arrays koennen wir wieder vergessen
- delete pCount1; delete pCount2;
+ delete [] pCount1; delete [] pCount2;
CheckDiscard( rData1.GetLineCount(), pDiscard1 );
CheckDiscard( rData2.GetLineCount(), pDiscard2 );
@@ -437,7 +437,7 @@ Compare::Compare( ULONG nDiff, CompareData& rData1, CompareData& rData2 )
pMD2 = new MovedData( rData2, pDiscard2 );
// die Arrays koennen wir wieder vergessen
- delete pDiscard1; delete pDiscard2;
+ delete [] pDiscard1; delete [] pDiscard2;
}
{
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 45c820445b44..c0e797f4236e 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -2424,8 +2424,12 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
const xub_StrLen nEnd = rInf.GetIdx() + rInf.GetLen();
// skip character cells for complex scripts
- if ( rInf.GetFont() && SW_CTL == rInf.GetFont()->GetActual() &&
+ // --> OD 2009-10-14 #i105571# - skip also character cells for CJK
+ if ( rInf.GetFont() &&
+ ( SW_CTL == rInf.GetFont()->GetActual() ||
+ SW_CJK == rInf.GetFont()->GetActual() ) &&
pBreakIt->GetBreakIter().is() )
+ // <--
{
aLang = rInf.GetFont()->GetLanguage();
bSkipCell = sal_True;
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 5401d3d01fd5..fb7c08a61f19 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -2685,7 +2685,7 @@ const BitmapEx& ViewShell::GetReplacementBitmap( bool bIsErrorState )
if( !*ppRet )
{
USHORT nBmpResId =
- Application::GetSettings().GetStyleSettings().GetWindowColor().IsDark()
+ Application::GetSettings().GetStyleSettings().GetHighContrastMode()
? nHCResId : nResId;
*ppRet = new BitmapEx( SW_RES( nBmpResId ) );
}
diff --git a/sw/source/filter/ww1/w1class.cxx b/sw/source/filter/ww1/w1class.cxx
index 374ca58b6799..eb5618bcf967 100644
--- a/sw/source/filter/ww1/w1class.cxx
+++ b/sw/source/filter/ww1/w1class.cxx
@@ -257,7 +257,7 @@ Ww1StyleSheet::Ww1StyleSheet(Ww1Fib& _rFib)
DBG_ASSERT(cbStshf==0, "Ww1StyleSheet");
bOK = cbStshf == 0;
}
- delete del;
+ delete [] del;
}
USHORT Ww1StyleSheet::ReadNames( BYTE*& p, USHORT& rnCountBytes )
diff --git a/sw/source/filter/ww1/w1filter.cxx b/sw/source/filter/ww1/w1filter.cxx
index bdf857cbd944..1b069f44a0e9 100644
--- a/sw/source/filter/ww1/w1filter.cxx
+++ b/sw/source/filter/ww1/w1filter.cxx
@@ -1899,11 +1899,11 @@ void Ww1Picture::WriteBmp(SvStream& rOut)
nSize -= sizeof(BYTE);
}
if(rOut.Write(pBuf, padx) != padx){
- delete pBuf;
+ delete [] pBuf;
goto error;
}
}
- delete pBuf;
+ delete [] pBuf;
}
#else
for (j=0;nSize>0&&j<maxy;j++)
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 46c74872e709..037f10b9d86e 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -3523,7 +3523,6 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
const sal_uInt8 aFldData[] =
{
- 0,0,0,0, // len of struct
0x44,0, // the start of "next" data
0,0,0,0,0,0,0,0,0,0, // PIC-Structure! /10
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // | /16
@@ -3531,7 +3530,8 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // | /16
0,0,0,0, // / /4
};
- int slen = sizeof( aFldData )
+ sal_uInt32 slen=sizeof(sal_uInt32)
+ + sizeof(aFldData)
+ sizeof( aFldHeader )
+ 2*ffname.getLength() + 4
+ 2*ffdeftext.getLength() + 4
@@ -3540,12 +3540,11 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
+ 2*ffstattext.getLength() + 4
+ 2*ffentrymcr.getLength() + 4
+ 2*ffexitmcr.getLength() + 4;
-#ifdef OSL_BIGENDIAN
- slen = SWAPLONG( slen );
-#endif // OSL_BIGENDIAN
- *( (sal_uInt32 *)aFldData ) = slen;
+
+ *pDataStrm << slen;
+
int len = sizeof( aFldData );
- OSL_ENSURE( len == 0x44, "SwWW8Writer::WriteFormData(..) - wrong aFldData length" );
+ OSL_ENSURE( len == 0x44-sizeof(sal_uInt32), "SwWW8Writer::WriteFormData(..) - wrong aFldData length" );
pDataStrm->Write( aFldData, len );
len = sizeof( aFldHeader );
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 5d67e1635216..b92f80c85290 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4379,7 +4379,7 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
sal_uInt8 *pIn = new sal_uInt8[nUnencryptedHdr];
pStrm->Read(pIn, nUnencryptedHdr);
aDecryptMain.Write(pIn, nUnencryptedHdr);
- delete pIn;
+ delete [] pIn;
DecryptXOR(aCtx, *pStrm, aDecryptMain);
diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx
index f17af2f8061a..00219b8d9cdf 100644
--- a/sw/source/ui/config/mailconfigpage.cxx
+++ b/sw/source/ui/config/mailconfigpage.cxx
@@ -295,7 +295,7 @@ SwTestAccountSettingsDialog::SwTestAccountSettingsDialog(SwMailConfigPage* pPare
#ifdef MSC
#pragma warning (default : 4355)
#endif
- m_aImageList( SW_RES( GetSettings().GetStyleSettings().GetWindowColor().IsDark() ? ILIST_HC : ILIST) ),
+ m_aImageList( SW_RES( GetSettings().GetStyleSettings().GetHighContrastMode() ? ILIST_HC : ILIST) ),
m_sTask( SW_RES( ST_TASK )),
m_sStatus( SW_RES( ST_STATUS )),
m_sEstablish( SW_RES( ST_ESTABLISH )),
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 823c8d8c3471..b206bce741fd 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -1763,7 +1763,7 @@ void SwMarkPreview::InitColors( void )
const StyleSettings& rSettings = GetSettings().GetStyleSettings();
m_aBgCol = Color( rSettings.GetWindowColor() );
- BOOL bHC = m_aBgCol.IsDark();
+ BOOL bHC = rSettings.GetHighContrastMode();
m_aLineCol = bHC? SwViewOption::GetFontColor() : Color( COL_BLACK );
m_aShadowCol = bHC? m_aBgCol : rSettings.GetShadowColor();
m_aTxtCol = bHC? SwViewOption::GetFontColor() : Color( COL_GRAY );
diff --git a/sw/source/ui/dbui/mailmergechildwindow.cxx b/sw/source/ui/dbui/mailmergechildwindow.cxx
index ca3489b99776..d70dea638297 100644
--- a/sw/source/ui/dbui/mailmergechildwindow.cxx
+++ b/sw/source/ui/dbui/mailmergechildwindow.cxx
@@ -103,7 +103,7 @@ SwMailMergeChildWin::SwMailMergeChildWin( SfxBindings* _pBindings,
m_aBackTB(this, SW_RES( TB_BACK ))
{
m_aBackTB.SetSelectHdl(LINK(this, SwMailMergeChildWin, BackHdl));
- sal_uInt16 nIResId = GetSettings().GetStyleSettings().GetWindowColor().IsDark() ?
+ sal_uInt16 nIResId = GetSettings().GetStyleSettings().GetHighContrastMode() ?
ILIST_TBX_HC : ILIST_TBX;
ResId aResId( nIResId, *pSwResMgr );
ImageList aIList(aResId);
@@ -639,7 +639,7 @@ void SwSendMailDialog::IterateMails()
{
if(!SwMailMergeHelper::CheckMailAddress( pCurrentMailDescriptor->sEMail ))
{
- ImageList& rImgLst = GetSettings().GetStyleSettings().GetWindowColor().IsDark() ?
+ ImageList& rImgLst = GetSettings().GetStyleSettings().GetHighContrastMode() ?
m_aImageListHC : m_aImageList;
Image aInsertImg = rImgLst.GetImage( FN_FORMULA_CANCEL );
@@ -747,7 +747,7 @@ void SwSendMailDialog::DocumentSent( uno::Reference< mail::XMailMessage> xMessag
Application::PostUserEvent( STATIC_LINK( this, SwSendMailDialog,
StopSendMails ), this );
}
- ImageList& rImgLst = GetSettings().GetStyleSettings().GetWindowColor().IsDark() ?
+ ImageList& rImgLst = GetSettings().GetStyleSettings().GetHighContrastMode() ?
m_aImageListHC : m_aImageList;
Image aInsertImg = rImgLst.GetImage( bResult ? FN_FORMULA_APPLY : FN_FORMULA_CANCEL );
diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx
index 01b6bc394b5c..c54911294912 100644
--- a/sw/source/ui/envelp/envprt.cxx
+++ b/sw/source/ui/envelp/envprt.cxx
@@ -107,7 +107,7 @@ SwEnvPrtPage::~SwEnvPrtPage()
IMPL_LINK( SwEnvPrtPage, ClickHdl, Button *, EMPTYARG )
{
- sal_Bool bHC = GetDisplayBackground().GetColor().IsDark();
+ sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
if (aBottomButton.IsChecked())
{
// Briefumschlaege von unten
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index dbeb13ba76ba..eeb58d83c7fd 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2641,8 +2641,8 @@ void BmpWindow::Paint( const Rectangle& )
aGraphic.Draw( this, aPntPos, aPntSz );
else
{
- bool bIsDark = ( GetSettings().GetStyleSettings().GetWindowColor().IsDark() != FALSE );
- DrawBitmapEx( aPntPos, aPntSz, bIsDark ? aBmpHC : aBmp );
+ bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
+ DrawBitmapEx( aPntPos, aPntSz, bHC ? aBmpHC : aBmp );
}
}
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index f3c43137fcd1..3dfad685f732 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -748,7 +748,7 @@ void SwWrapTabPage::DataChanged( const DataChangedEvent& rDCEvt )
---------------------------------------------------------------------------*/
void SwWrapTabPage::ApplyImageList()
{
- ImageList& rImgLst = GetDisplayBackground().GetColor().IsDark() ?
+ ImageList& rImgLst = GetSettings().GetStyleSettings().GetHighContrastMode() ?
aWrapILH : aWrapIL;
aWrapThroughRB.SetModeRadioImage(rImgLst.GetImage(IMG_THROUGH));
diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
index ea73abdb2f88..be469f14db1b 100644
--- a/sw/source/ui/lingu/olmenu.cxx
+++ b/sw/source/ui/lingu/olmenu.cxx
@@ -428,7 +428,7 @@ bGrammarResults(false)
sal_Int16 nStringCount = static_cast< sal_Int16 >( aSuggestions.getLength() );
SvtLinguConfig aCfg;
- const bool bIsDark = Application::GetSettings().GetStyleSettings().GetWindowColor().IsDark();
+ const bool bHC = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
PopupMenu *pMenu = GetPopupMenu(MN_AUTOCORR);
pMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS);
@@ -440,7 +440,7 @@ bGrammarResults(false)
uno::Reference< container::XNamed > xNamed( xSpellAlt, uno::UNO_QUERY );
if (xNamed.is())
{
- aSuggestionImageUrl = aCfg.GetSpellAndGrammarContextSuggestionImage( xNamed->getName(), bIsDark );
+ aSuggestionImageUrl = aCfg.GetSpellAndGrammarContextSuggestionImage( xNamed->getName(), bHC );
aImage = Image( lcl_GetImageFromPngUrl( aSuggestionImageUrl ) );
}
@@ -529,7 +529,7 @@ bGrammarResults(false)
if (xSvcInfo.is())
{
OUString aDictionaryImageUrl( aCfg.GetSpellAndGrammarContextDictionaryImage(
- xSvcInfo->getImplementationName(), bIsDark) );
+ xSvcInfo->getImplementationName(), bHC) );
if (aDictionaryImageUrl.getLength() > 0)
{
Image aImage( lcl_GetImageFromPngUrl( aDictionaryImageUrl ) );
@@ -583,7 +583,7 @@ bGrammarResults(false)
uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame()->GetFrameInterface();
Image rImg = ::GetImage( xFrame,
::rtl::OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False,
- Application::GetSettings().GetStyleSettings().GetWindowColor().IsDark() );
+ Application::GetSettings().GetStyleSettings().GetHighContrastMode() );
SetItemImage( MN_SPELLING, rImg );
//////////////////////////////////////////////////////////////////////////////////
@@ -717,7 +717,7 @@ aInfo16( SW_RES(IMG_INFO_16) )
uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame()->GetFrameInterface();
Image rImg = ::GetImage( xFrame,
::rtl::OUString::createFromAscii(".uno:SpellingAndGrammarDialog"), sal_False,
- Application::GetSettings().GetStyleSettings().GetWindowColor().IsDark() );
+ Application::GetSettings().GetStyleSettings().GetHighContrastMode() );
SetItemImage( MN_SPELLING, rImg );
//////////////////////////////////////////////////////////////////////////////////
diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx
index bd5b53286a76..005f9e019cf3 100644
--- a/sw/source/ui/ribbar/inputwin.cxx
+++ b/sw/source/ui/ribbar/inputwin.cxx
@@ -95,10 +95,10 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind )
InsertWindow( ED_FORMULA, &aEdit);
SetHelpId(ED_FORMULA, HID_EDIT_FORMULA);
- BOOL bDark = GetSettings().GetStyleSettings().GetFaceColor().IsDark();
- SetItemImage( FN_FORMULA_CALC, pManager->GetImage(FN_FORMULA_CALC, bDark ));
- SetItemImage( FN_FORMULA_CANCEL, pManager->GetImage(FN_FORMULA_CANCEL, bDark ));
- SetItemImage( FN_FORMULA_APPLY, pManager->GetImage(FN_FORMULA_APPLY, bDark ));
+ BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
+ SetItemImage( FN_FORMULA_CALC, pManager->GetImage(FN_FORMULA_CALC, bHC ));
+ SetItemImage( FN_FORMULA_CANCEL, pManager->GetImage(FN_FORMULA_CANCEL, bHC ));
+ SetItemImage( FN_FORMULA_APPLY, pManager->GetImage(FN_FORMULA_APPLY, bHC ));
SetItemBits( FN_FORMULA_CALC, GetItemBits( FN_FORMULA_CALC ) | TIB_DROPDOWNONLY );
SetDropdownClickHdl( LINK( this, SwInputWindow, DropdownClickHdl ));
@@ -156,12 +156,11 @@ void SwInputWindow::DataChanged( const DataChangedEvent& rDCEvt )
// update item images
SwModule *pMod = SW_MOD();
SfxImageManager *pImgMgr = SfxImageManager::GetImageManager( pMod );
- //!! Don't use display-background to check for IsDark !!
- BOOL bDark = GetSettings().GetStyleSettings().GetFaceColor().IsDark();
+ BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
//
- SetItemImage( FN_FORMULA_CALC, pImgMgr->GetImage(FN_FORMULA_CALC, bDark ));
- SetItemImage( FN_FORMULA_CANCEL, pImgMgr->GetImage(FN_FORMULA_CANCEL, bDark ));
- SetItemImage( FN_FORMULA_APPLY, pImgMgr->GetImage(FN_FORMULA_APPLY, bDark ));
+ SetItemImage( FN_FORMULA_CALC, pImgMgr->GetImage(FN_FORMULA_CALC, bHC ));
+ SetItemImage( FN_FORMULA_CANCEL, pImgMgr->GetImage(FN_FORMULA_CANCEL, bHC ));
+ SetItemImage( FN_FORMULA_APPLY, pImgMgr->GetImage(FN_FORMULA_APPLY, bHC ));
}
ToolBox::DataChanged( rDCEvt );
diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx
index 5fc9ec9890df..dea86994f2d3 100644
--- a/sw/source/ui/ribbar/workctrl.cxx
+++ b/sw/source/ui/ribbar/workctrl.cxx
@@ -115,7 +115,7 @@ void SAL_CALL SwTbxInsertCtrl::update() throw (uno::RuntimeException)
Image aImage = GetImage( m_xFrame,
aSlotURL,
hasBigImages(),
- rTbx.GetDisplayBackground().GetColor().IsDark() );
+ rTbx.GetSettings().GetStyleSettings().GetHighContrastMode() );
rTbx.SetItemImage(GetId(), aImage);
rTbx.Invalidate();
@@ -146,11 +146,11 @@ void SwTbxInsertCtrl::StateChanged( USHORT /*nSID*/,
rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
aSlotURL += rtl::OUString::valueOf( sal_Int32( nId ));
+ ToolBox& rBox = GetToolBox();
Image aImage = GetImage( m_xFrame,
aSlotURL,
hasBigImages(),
- GetToolBox().GetDisplayBackground().GetColor().IsDark() );
- ToolBox& rBox = GetToolBox();
+ rBox.GetSettings().GetStyleSettings().GetHighContrastMode() );
rBox.SetItemImage(GetId(), aImage);
rBox.SetItemImageMirrorMode( GetId(), FALSE );
rBox.SetItemImageAngle( GetId(), pItem->GetRotation() );
@@ -572,7 +572,7 @@ void SwScrollNaviPopup::DataChanged( const DataChangedEvent& rDCEvt )
---------------------------------------------------------------------------*/
void SwScrollNaviPopup::ApplyImageList()
{
- ImageList& rImgLst = aToolBox.GetDisplayBackground().GetColor().IsDark() ?
+ ImageList& rImgLst = aToolBox.GetSettings().GetStyleSettings().GetHighContrastMode() ?
aIListH : aIList;
for(USHORT i = 0; i < NID_COUNT; i++)
{
@@ -746,7 +746,7 @@ SwNaviImageButton::SwNaviImageButton(
FreeResource();
SetStyle(GetStyle()|WB_NOPOINTERFOCUS);
SetQuickHelpText(sQuickText);
- SetModeImage( GetDisplayBackground().GetColor().IsDark() ? aImageH : aImage);
+ SetModeImage( GetSettings().GetStyleSettings().GetHighContrastMode() ? aImageH : aImage);
}
/* -----------------------------2002/07/05 9:41-------------------------------
@@ -755,7 +755,7 @@ void SwNaviImageButton::DataChanged( const DataChangedEvent& rDCEvt )
{
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
- SetModeImage( GetDisplayBackground().GetColor().IsDark() ? aImageH : aImage);
+ SetModeImage( GetSettings().GetStyleSettings().GetHighContrastMode() ? aImageH : aImage);
Window::DataChanged( rDCEvt );
}
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index a047c73e0aa9..aa2712225703 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -3506,7 +3506,7 @@ Any lcl_GetDisplayBitmap(String sLinkSuffix)
if(USHRT_MAX != nImgId)
{
nImgId += 20000;
- BOOL bHighContrast = Application::GetSettings().GetStyleSettings().GetWindowColor().IsDark();
+ BOOL bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
ImageList aEntryImages( SW_RES(bHighContrast ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP) );
const Image& rImage = aEntryImages.GetImage( nImgId );
Bitmap aBitmap( rImage.GetBitmapEx().GetBitmap() );
diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx
index a534ea200090..28c340b63cd3 100644
--- a/sw/source/ui/utlui/content.cxx
+++ b/sw/source/ui/utlui/content.cxx
@@ -1354,7 +1354,7 @@ void SwContentTree::Display( sal_Bool bActive )
{
if(!bIsImageListInitialized)
{
- USHORT nResId = GetDisplayBackground().GetColor().IsDark() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
+ USHORT nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
aEntryImages = ImageList(SW_RES(nResId));
bIsImageListInitialized = sal_True;
}
@@ -3257,7 +3257,7 @@ void SwContentTree::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- USHORT nResId = GetDisplayBackground().GetColor().IsDark() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
+ USHORT nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
aEntryImages = ImageList(SW_RES(nResId));
FindActiveTypeAndRemoveUserData();
Display(sal_True);
diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx
index 702ce8d28864..20bb340218b2 100644
--- a/sw/source/ui/utlui/glbltree.cxx
+++ b/sw/source/ui/utlui/glbltree.cxx
@@ -728,7 +728,7 @@ void SwGlobalTree::Display(BOOL bOnlyUpdateUserData)
{
if(!bIsImageListInitialized)
{
- USHORT nResId = GetDisplayBackground().GetColor().IsDark() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
+ USHORT nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
aEntryImages = ImageList(SW_RES(nResId));
bIsImageListInitialized = TRUE;
}
@@ -1396,7 +1396,7 @@ void SwGlobalTree::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- USHORT nResId = GetDisplayBackground().GetColor().IsDark() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
+ USHORT nResId = GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_NAVI_ENTRYBMPH : IMG_NAVI_ENTRYBMP;
aEntryImages = ImageList(SW_RES(nResId));
Update(sal_True);
}
diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx
index 3254eb80ae7e..4932053422e4 100644
--- a/sw/source/ui/utlui/navipi.cxx
+++ b/sw/source/ui/utlui/navipi.cxx
@@ -1375,7 +1375,7 @@ void SwNavigationPI::SetRegionDropMode(USHORT nNewMode)
else if(nRegionMode == REGION_MODE_EMBEDDED)
nDropId = FN_DROP_REGION_COPY;
- ImageList& rImgLst = aContentToolBox.GetDisplayBackground().GetColor().IsDark()
+ ImageList& rImgLst = aContentToolBox.GetSettings().GetStyleSettings().GetHighContrastMode()
? aContentImageListH : aContentImageList;
aContentToolBox.SetItemImage( FN_DROP_REGION,
@@ -1531,7 +1531,7 @@ void SwNavigationPI::InitImageList()
{
USHORT k;
- ImageList& rImgLst = aContentToolBox.GetDisplayBackground().GetColor().IsDark() ?
+ ImageList& rImgLst = aContentToolBox.GetSettings().GetStyleSettings().GetHighContrastMode() ?
aContentImageListH : aContentImageList;
for( k = 0; k < aContentToolBox.GetItemCount(); k++)
aContentToolBox.SetItemImage(aContentToolBox.GetItemId(k),
diff --git a/sw/source/ui/utlui/viewlayoutctrl.cxx b/sw/source/ui/utlui/viewlayoutctrl.cxx
index b8b84013e848..b7a4fdb033d6 100644
--- a/sw/source/ui/utlui/viewlayoutctrl.cxx
+++ b/sw/source/ui/utlui/viewlayoutctrl.cxx
@@ -78,13 +78,13 @@ SwViewLayoutControl::SwViewLayoutControl( USHORT _nSlotId, USHORT _nId, StatusBa
{
mpImpl->mnState = 0;
- const sal_Bool bIsDark = GetStatusBar().GetBackground().GetColor().IsDark();
- mpImpl->maImageSingleColumn = Image( bIsDark ? SW_RES(IMG_VIEWLAYOUT_SINGLECOLUMN_HC) : SW_RES(IMG_VIEWLAYOUT_SINGLECOLUMN) );
- mpImpl->maImageSingleColumn_Active = Image( bIsDark ? SW_RES(IMG_VIEWLAYOUT_SINGLECOLUMN_ACTIVE_HC) : SW_RES(IMG_VIEWLAYOUT_SINGLECOLUMN_ACTIVE) );
- mpImpl->maImageAutomatic = Image( bIsDark ? SW_RES(IMG_VIEWLAYOUT_AUTOMATIC_HC) : SW_RES(IMG_VIEWLAYOUT_AUTOMATIC) );
- mpImpl->maImageAutomatic_Active = Image( bIsDark ? SW_RES(IMG_VIEWLAYOUT_AUTOMATIC_ACTIVE_HC) : SW_RES(IMG_VIEWLAYOUT_AUTOMATIC_ACTIVE) );
- mpImpl->maImageBookMode = Image( bIsDark ? SW_RES(IMG_VIEWLAYOUT_BOOKMODE_HC) : SW_RES(IMG_VIEWLAYOUT_BOOKMODE) );
- mpImpl->maImageBookMode_Active = Image( bIsDark ? SW_RES(IMG_VIEWLAYOUT_BOOKMODE_ACTIVE_HC) : SW_RES(IMG_VIEWLAYOUT_BOOKMODE_ACTIVE) );
+ const sal_Bool bHC = GetStatusBar().GetSettings().GetStyleSettings().GetHighContrastMode();
+ mpImpl->maImageSingleColumn = Image( bHC ? SW_RES(IMG_VIEWLAYOUT_SINGLECOLUMN_HC) : SW_RES(IMG_VIEWLAYOUT_SINGLECOLUMN) );
+ mpImpl->maImageSingleColumn_Active = Image( bHC ? SW_RES(IMG_VIEWLAYOUT_SINGLECOLUMN_ACTIVE_HC) : SW_RES(IMG_VIEWLAYOUT_SINGLECOLUMN_ACTIVE) );
+ mpImpl->maImageAutomatic = Image( bHC ? SW_RES(IMG_VIEWLAYOUT_AUTOMATIC_HC) : SW_RES(IMG_VIEWLAYOUT_AUTOMATIC) );
+ mpImpl->maImageAutomatic_Active = Image( bHC ? SW_RES(IMG_VIEWLAYOUT_AUTOMATIC_ACTIVE_HC) : SW_RES(IMG_VIEWLAYOUT_AUTOMATIC_ACTIVE) );
+ mpImpl->maImageBookMode = Image( bHC ? SW_RES(IMG_VIEWLAYOUT_BOOKMODE_HC) : SW_RES(IMG_VIEWLAYOUT_BOOKMODE) );
+ mpImpl->maImageBookMode_Active = Image( bHC ? SW_RES(IMG_VIEWLAYOUT_BOOKMODE_ACTIVE_HC) : SW_RES(IMG_VIEWLAYOUT_BOOKMODE_ACTIVE) );
}
// -----------------------------------------------------------------------