diff options
author | Mathias Bauer <mba@openoffice.org> | 2009-11-23 17:39:22 +0100 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2009-11-23 17:39:22 +0100 |
commit | 71eaab652d0e062b909c526718f09e8e1b0bd4be (patch) | |
tree | aaea2104e2a323374d1f9b7add5cfb656664f108 /sw | |
parent | 0f0f9256c57df2281fb54089697444e0f608285c (diff) | |
parent | 8eeb6688770ab12a2243926098526417764fa38b (diff) |
merge commit for m65
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/doccomp.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/txtnode/fntcache.cxx | 6 | ||||
-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 | 15 | ||||
-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 |
21 files changed, 61 insertions, 59 deletions
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index 5fa7731fcb..58e3cccc6f 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 b01c132c61..b9b62a3388 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 dd53eea0e4..a2c1e030cd 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 7fb33d4529..a137ca479f 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 32a1a42245..b932a49c18 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 a445b8dc59..f00d44ea7a 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3523,15 +3523,15 @@ 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 + 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 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // | /16 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 934498d526..2ae8a362ea 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 fd8d7969b6..d4a0c25a59 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 b0561b37bb..b16b22325e 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 ca506787a4..d02480a6ef 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 295f740cff..46b3c4d47b 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 5c5ccd33cb..2bbaa672f5 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 b373ea79a9..c9488c26ba 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 e777b8fa74..ddce0b731d 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 85abb6e1df..3f129b9848 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 7425dee840..e692364362 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 e897aa9a81..044c5bd78f 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 ce7af04e48..c031c4f546 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 4f78743b1b..546b276a5b 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 41e45e7f0e..f6f8a42e91 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 47b2255e40..23478588f5 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) ); } // ----------------------------------------------------------------------- |