Makefile.top | 3 ++ sfx2/source/appl/lnkbase2.cxx | 6 ++-- svl/inc/svl/svdde.hxx | 8 ----- svl/source/svdde/ddesvr.cxx | 24 ++++++++-------- tools/inc/tools/list.hxx | 61 ------------------------------------------ 5 files changed, 21 insertions(+), 81 deletions(-)
New commits: commit e1544be5759bfbaf93d8a4dd66a950a8736e58e5 Author: Caolán McNamara <[email protected]> Date: Tue Jul 31 14:46:02 2012 +0100 remove DECLARE_LIST Change-Id: Ic74476797edbb08ed6721ea9a7d23b0dd042b4ce diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx index 8bc6704..a2b7410 100644 --- a/sfx2/source/appl/lnkbase2.cxx +++ b/sfx2/source/appl/lnkbase2.cxx @@ -606,8 +606,9 @@ static DdeTopic* FindTopic( const String & rLinkName, sal_uInt16* pItemStt ) String sService( sNm.GetToken( 0, cTokenSeperator, nTokenPos ) ); DdeServices& rSvc = DdeService::GetServices(); - for( DdeService* pService = rSvc.First(); pService; - pService = rSvc.Next() ) + for (DdeServices::iterator aI = rSvc.begin(); aI != rSvc.end(); ++aI) + { + DdeService* pService = *aI; if( pService->GetName() == sService ) { // then we search for the Topic @@ -631,6 +632,7 @@ static DdeTopic* FindTopic( const String & rLinkName, sal_uInt16* pItemStt ) } break; } + } return 0; } diff --git a/svl/inc/svl/svdde.hxx b/svl/inc/svl/svdde.hxx index e393b36..0895a81 100644 --- a/svl/inc/svl/svdde.hxx +++ b/svl/inc/svl/svdde.hxx @@ -23,7 +23,6 @@ #include "svl/svldllapi.h" #include <sot/exchange.hxx> #include <tools/string.hxx> -#include <tools/list.hxx> #include <tools/link.hxx> #include <vector> @@ -45,12 +44,7 @@ struct DdeImp; class DdeItemImp; struct Conversation; -#ifndef _SVDDE_NOLISTS -DECLARE_LIST( DdeServices, DdeService* ) -#else -typedef List DdeServices; -#endif - +typedef ::std::vector< DdeService* > DdeServices; typedef ::std::vector< long > DdeFormats; typedef ::std::vector< Conversation* > ConvList; diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx index d713191..dadba45 100644 --- a/svl/source/svdde/ddesvr.cxx +++ b/svl/source/svdde/ddesvr.cxx @@ -461,7 +461,7 @@ DdeService::DdeService( const String& rService ) pConv = new ConvList; if ( pInst->pServicesSvr ) - pInst->pServicesSvr->Insert( this ); + pInst->pServicesSvr->push_back( this ); pName = new DdeString( pInst->hDdeInstSvr, rService ); if ( nStatus == DMLERR_NO_ERROR ) @@ -486,7 +486,7 @@ DdeService::~DdeService() DdeInstData* pInst = ImpGetInstData(); DBG_ASSERT(pInst,"SVDDE:No instance data"); if ( pInst->pServicesSvr ) - pInst->pServicesSvr->Remove( this ); + pInst->pServicesSvr->erase(std::remove(pInst->pServicesSvr->begin(), pInst->pServicesSvr->end(), this), pInst->pServicesSvr->end()); // MT: Im Auftrage des Herrn (AM) auskommentiert... // Grund: diff --git a/tools/inc/tools/list.hxx b/tools/inc/tools/list.hxx index 63d4ff6..d7a4e0e 100644 --- a/tools/inc/tools/list.hxx +++ b/tools/inc/tools/list.hxx @@ -63,67 +63,6 @@ public: { return Container::operator !=( rList ); } }; -// ---------------- -// - DECLARE_LIST - -// ---------------- - -#define DECLARE_LIST( ClassName, Type ) \ -class ClassName : private List \ -{ \ -public: \ - using List::Clear; \ - using List::Count; \ - using List::GetCurPos; \ - \ - ClassName( sal_uInt16 _nInitSize = 16, \ - sal_uInt16 _nReSize = 16 ) : \ - List( _nInitSize, _nReSize ) {} \ - ClassName( sal_uInt16 _nBlockSize, sal_uInt16 _nInitSize, \ - sal_uInt16 _nReSize ) : \ - List( _nBlockSize, _nInitSize, _nReSize ) {} \ - ClassName( const ClassName& rClassName ) : \ - List( rClassName ) {} \ - \ - void Insert( Type p, sal_uIntPtr nIndex ) \ - { List::Insert( (void*)p, nIndex ); } \ - void Insert( Type p ) \ - { List::Insert( (void*)p ); } \ - Type Remove() \ - { return (Type)List::Remove(); } \ - Type Remove( sal_uIntPtr nIndex ) \ - { return (Type)List::Remove( nIndex ); } \ - Type Remove( Type p ) \ - { return (Type)List::Remove( (void*)p ); } \ - Type Replace( Type p, sal_uIntPtr nIndex ) \ - { return (Type)List::Replace( (void*)p, nIndex ); } \ - Type Replace( Type pNew, Type pOld ) \ - { return (Type)List::Replace( (void*)pNew, \ - (void*)pOld ); } \ - \ - Type GetCurObject() const \ - { return (Type)List::GetCurObject(); } \ - Type GetObject( sal_uIntPtr nIndex ) const \ - { return (Type)List::GetObject( nIndex ); } \ - sal_uIntPtr GetPos( const Type p ) const \ - { return List::GetPos( (const void*)p ); } \ - \ - Type Seek( sal_uIntPtr nIndex ) \ - { return (Type)List::Seek( nIndex ); } \ - Type Seek( void* p ) { return (Type)List::Seek( p ); } \ - Type First() { return (Type)List::First(); } \ - Type Last() { return (Type)List::Last(); } \ - Type Next() { return (Type)List::Next(); } \ - Type Prev() { return (Type)List::Prev(); } \ - \ - ClassName& operator =( const ClassName& rClassName ) \ - { List::operator =( rClassName ); return *this; } \ - \ - sal_Bool operator ==( const ClassName& rList ) const \ - { return List::operator ==( rList ); } \ - sal_Bool operator !=( const ClassName& rList ) const \ - { return List::operator !=( rList ); } \ -}; - #endif // _LIST_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit b168056750d6a1f88667376be0e8f48eeccc9aca Author: Caolán McNamara <[email protected]> Date: Tue Jul 31 14:43:28 2012 +0100 the dmake binary on many build-bots is not in sync with the in-tree version Change-Id: Ic52986c15de0051321d710e9c26d26786302a196 diff --git a/Makefile.top b/Makefile.top index 62715de..78806f2 100644 --- a/Makefile.top +++ b/Makefile.top @@ -319,6 +319,9 @@ $(eval $(call dmake_modules_rules,$(dmake_modules))) clean: clean-host clean-build clean-host: +ifeq ($(BUILD_DMAKE),YES) + if [ -f dmake/Makefile ] ; then $(GNUMAKE) -j $(GMAKE_PARALLELISM) -C dmake clean; fi +endif rm -fr $(DEVINSTALLDIR) rm -fr $(OUTDIR) rm -fr $(WORKDIR) commit 1f77c4320e473a28a7f3a30ea367fbfaa2c44784 Author: Caolán McNamara <[email protected]> Date: Tue Jul 31 13:27:46 2012 +0100 use of a pointer to a temporary strings buffer is very wrong Change-Id: Id5bee1f5120afb6efb60245a4606a4a15bb6db79 diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx index ea221a7..d713191 100644 --- a/svl/source/svdde/ddesvr.cxx +++ b/svl/source/svdde/ddesvr.cxx @@ -1013,31 +1013,33 @@ String DdeService::Formats() { String s; long f; - TCHAR buf[128]; - LPCTSTR p; short n = 0; - for ( size_t i = 0; i < aFormats.size(); ++i, n++ ) + for (size_t i = 0; i < aFormats.size(); ++i, ++n) { f = aFormats[ i ]; if ( n ) s += '\t'; - p = buf; switch( (sal_uInt16)f ) { case CF_TEXT: - p = reinterpret_cast<LPCTSTR>(String::CreateFromAscii("TEXT").GetBuffer()); + s += rtl::OUString("TEXT"); break; case CF_BITMAP: - p = reinterpret_cast<LPCTSTR>(String::CreateFromAscii("BITMAP").GetBuffer()); + s += rtl::OUString("BITMAP"); break; default: - GetClipboardFormatName( (UINT)f, buf, sizeof(buf) / sizeof(TCHAR) ); + { + TCHAR buf[128]; + GetClipboardFormatName( (UINT)f, buf, sizeof(buf) / sizeof(TCHAR) ); + s += rtl::OUString(buf); + } + break; } - s += String( reinterpret_cast<const sal_Unicode*>(p) ); + } - s += String::CreateFromAscii("\r\n"); + s += rtl::OUString("\r\n"); return s; }
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
