diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/doccomp.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww1/w1class.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww1/w1filter.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 13 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/config/mailconfigpage.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/config/optpage.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dbui/mailmergechildwindow.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/envelp/envprt.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/frmdlg/frmpage.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/frmdlg/wrap.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/lingu/olmenu.cxx | 10 | ||||
-rw-r--r-- | sw/source/ui/ribbar/inputwin.cxx | 17 | ||||
-rw-r--r-- | sw/source/ui/ribbar/workctrl.cxx | 12 | ||||
-rw-r--r-- | sw/source/ui/uno/unotxdoc.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/utlui/content.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/utlui/glbltree.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/utlui/navipi.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/utlui/viewlayoutctrl.cxx | 14 |
20 files changed, 55 insertions, 57 deletions
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/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 2c25ffbad82a..920c2d809f51 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 4021d449c286..9f177765a4f7 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 6601f874c60f..c015c13fc65b 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3510,7 +3510,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 @@ -3518,7 +3517,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 @@ -3527,12 +3527,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 b9fd20dc1cba..599c6b3ea1b6 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 4b85042d0003..114a57215d10 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 3225e120248a..dc9fe2d1bf2e 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 f73d977969ab..b3828797fc07 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 865908568cd6..771836c6ccd5 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 07745f3c01bb..764d83a8e8e7 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 c0f248dfcd66..51e818604dae 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 db81543fb883..fe3d8639bf84 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 e86270c55e12..1660f7da38c5 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 613bbac403b2..eca568ca60a2 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 eb3500ea59c4..78fc237f8b20 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 2741b668844b..9a8526c941b5 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) ); } // ----------------------------------------------------------------------- |