From e7a5d9d3e189590ee054f2ec84d649e35a5a267e Mon Sep 17 00:00:00 2001 From: Oliver Düsterhoff Date: Wed, 14 Oct 2009 12:40:46 +0000 Subject: #i105571# method - skip character cells also for CJK --- sw/source/core/txtnode/fntcache.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index 9952c50e678d..826398ec2ce6 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; -- cgit -- cgit From 92fd3c6903822aa19cd346f5fa26e0ae1862dd64 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 30 Oct 2009 09:44:02 +0000 Subject: #cmcfixes65: #i106472# fix ww8 aliasing --- sw/source/filter/ww8/wrtww8.cxx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) 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 ); -- cgit From 0a21703aa86d73cbd064c89c6aba053979472fb7 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 3 Nov 2009 18:12:19 +0100 Subject: #i104678# use high contrast mode setting instead of IsDark (paradigm shift begun with issue i35482) --- starmath/source/dialog.cxx | 12 ++++++------ starmath/source/document.cxx | 2 +- starmath/source/toolbox.cxx | 2 +- sw/source/core/view/viewsh.cxx | 2 +- sw/source/ui/config/mailconfigpage.cxx | 2 +- sw/source/ui/config/optpage.cxx | 2 +- sw/source/ui/dbui/mailmergechildwindow.cxx | 6 +++--- sw/source/ui/envelp/envprt.cxx | 2 +- sw/source/ui/frmdlg/frmpage.cxx | 4 ++-- sw/source/ui/frmdlg/wrap.cxx | 2 +- sw/source/ui/lingu/olmenu.cxx | 10 +++++----- sw/source/ui/ribbar/inputwin.cxx | 17 ++++++++--------- sw/source/ui/ribbar/workctrl.cxx | 12 ++++++------ sw/source/ui/uno/unotxdoc.cxx | 2 +- sw/source/ui/utlui/content.cxx | 4 ++-- sw/source/ui/utlui/glbltree.cxx | 4 ++-- sw/source/ui/utlui/navipi.cxx | 4 ++-- sw/source/ui/utlui/viewlayoutctrl.cxx | 14 +++++++------- 18 files changed, 51 insertions(+), 52 deletions(-) diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 20af2f38b3ee..0f7e233cde87 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 ab467fc034e3..03beb26f7bb2 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 487bd6155fc9..0c108967e0c1 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/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/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) ); } // ----------------------------------------------------------------------- -- cgit From 2b86d661f3ec0dbd879bb48be8cfe3c15bb62408 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 6 Nov 2009 11:03:40 +0000 Subject: cmcfixes66: #i106674# fix remaining new[]/delete mismatches --- sw/source/core/doc/doccomp.cxx | 4 ++-- sw/source/filter/ww1/w1class.cxx | 2 +- sw/source/filter/ww1/w1filter.cxx | 4 ++-- sw/source/filter/ww8/ww8par.cxx | 2 +- 4 files changed, 6 insertions(+), 6 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/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&&jRead(pIn, nUnencryptedHdr); aDecryptMain.Write(pIn, nUnencryptedHdr); - delete pIn; + delete [] pIn; DecryptXOR(aCtx, *pStrm, aDecryptMain); -- cgit