diff options
Diffstat (limited to 'svx/source/dialog/imapdlg.cxx')
-rw-r--r-- | svx/source/dialog/imapdlg.cxx | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index ae4c7f4da1..ec2e302973 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -39,13 +40,9 @@ #include <stdlib.h> #include <tools/shl.hxx> -#ifndef _EINF_HXX #include <tools/errinf.hxx> -#endif #include <tools/urlobj.hxx> -#ifndef _UNOTOOLS_UCBSTREAMHELPER_HXX #include <unotools/ucbstreamhelper.hxx> -#endif #include <vcl/msgbox.hxx> #include <vcl/group.hxx> #include <vcl/lstbox.hxx> @@ -63,9 +60,7 @@ #include <sfx2/objsh.hxx> #include <sfx2/docfile.hxx> #include <unotools/localedatawrapper.hxx> -#ifndef _UNOTOOLS_PROCESSFACTORY_HXX #include <comphelper/processfactory.hxx> -#endif #define _IMAPDLG_PRIVATE #include "svx/imapdlg.hxx" @@ -203,7 +198,6 @@ SvxIMapDlg::SvxIMapDlg( SfxBindings *_pBindings, SfxChildWindow *pCW, maCbbTarget ( this, SVX_RES( RID_SVXCTL_CBB_TARGET ) ), aStbStatus ( this, WB_BORDER | WB_3DLOOK | WB_LEFT ), maImageList ( SVX_RES( IL_IMAPDLG ) ), - maImageListH ( SVX_RES( ILH_IMAPDLG ) ), pCheckObj ( NULL ), aIMapItem ( SID_IMAP_EXEC, *this, *_pBindings ) { @@ -409,8 +403,8 @@ void SvxIMapDlg::SetTargetList( const TargetList& rTargetList ) maCbbTarget.Clear(); - for( String* pStr = aNewList.First(); pStr; pStr = aNewList.Next() ) - maCbbTarget.InsertEntry( *pStr ); + for ( size_t i = 0, n = aNewList.size(); i < n; ++i ) + maCbbTarget.InsertEntry( *aNewList[ i ] ); } @@ -447,9 +441,9 @@ void SvxIMapDlg::Update( const Graphic& rGraphic, const ImageMap* pImageMap, // UpdateTargetList loeschen, da diese Methode // vor dem Zuschlagen des Update-Timers noch // mehrmals gerufen werden kann( #46540 ) - for( String* pStr = pOwnData->aUpdateTargetList.First(); pStr; pStr = pOwnData->aUpdateTargetList.Next() ) - delete pStr; - pOwnData->aUpdateTargetList.Clear(); + for ( size_t i = 0, n = pOwnData->aUpdateTargetList.size(); i < n; ++i ) + delete pOwnData->aUpdateTargetList[ i ]; + pOwnData->aUpdateTargetList.clear(); // TargetListe muss kopiert werden, da sie im // Besitz des Aufrufers ist und von ihm nach diesem @@ -459,8 +453,8 @@ void SvxIMapDlg::Update( const Graphic& rGraphic, const ImageMap* pImageMap, { TargetList aTargetList( *pTargetList ); - for( String* pStr = aTargetList.First(); pStr; pStr = aTargetList.Next() ) - pOwnData->aUpdateTargetList.Insert( new String( *pStr ) ); + for ( size_t i = 0, n = aTargetList.size(); i < n; ++i ) + pOwnData->aUpdateTargetList.push_back( new String( *aTargetList[ i ] ) ); } pOwnData->aTimer.Start(); @@ -954,10 +948,9 @@ IMPL_LINK( SvxIMapDlg, UpdateHdl, Timer*, EMPTYARG ) } // die in der Update-Methode kopierte Liste wieder loeschen - for( String* pStr = pOwnData->aUpdateTargetList.First(); pStr; pStr = pOwnData->aUpdateTargetList.Next() ) - delete pStr; - - pOwnData->aUpdateTargetList.Clear(); + for ( size_t i = 0, n = pOwnData->aUpdateTargetList.size(); i < n; ++i ) + delete pOwnData->aUpdateTargetList[ i ]; + pOwnData->aUpdateTargetList.clear(); GetBindings().Invalidate( SID_IMAP_EXEC ); @@ -1039,9 +1032,7 @@ IMPL_LINK( SvxIMapDlg, MiscHdl, void*, EMPTYARG ) void SvxIMapDlg::ApplyImageList() { - bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); - - ImageList& rImgLst = bHighContrast ? maImageListH : maImageList; + ImageList& rImgLst = maImageList; aTbxIMapDlg1.SetImageList( rImgLst ); } @@ -1053,3 +1044,5 @@ void SvxIMapDlg::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) ApplyImageList(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |