Commits

Anonymous committed 1a62d65 Merge

sb135: merged in DEV300_m92

Comments (0)

Files changed (369)

 cdc7f7cfb35b1957c1daf4ccd6d10fc74d830417 OOO330_m11
 2618f192a815a37eb046a40d1935772d686b8bf8 DEV300_m90
 f7b3d91c70af128b6114647ec393b4ff04d95595 DEV300_m91
+f6274c44480b4e49fb3a8eb856b64aacdee784f5 OOO330_m12
+4e9498e84a5f502da9c8c89f782797306b971784 OOO330_m13
+0375d65fa3bd7387e009a85d2228394300e2bc6f DEV300_m92

basctl/source/basicide/baside2b.cxx

 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_basctl.hxx"
 
-
-#include <svl/svarray.hxx>
+#include <vector>
 #define _BASIC_TEXTPORTIONS
 #include <basic/sbdef.hxx>
 #include <ide_pch.hxx>
 		pEditEngine->RemoveAttribs( nLine, TRUE );
 		HighlightPortions aPortions;
 		aHighlighter.getHighlightPortions( nLine, aLine, aPortions );
-		USHORT nCount = aPortions.Count();
-		for ( USHORT i = 0; i < nCount; i++ )
+
+		for ( size_t i = 0; i < aPortions.size(); i++ )
 		{
 			HighlightPortion& r = aPortions[i];
 			const Color& rColor = ((ModulWindowLayout*)pModulWindow->GetLayoutWindow())->getSyntaxColor(r.tokenType);

basctl/source/basicide/bastype3.cxx

 #include <basdoc.hxx>
 #include <com/sun/star/script/XLibraryContainer.hpp>
 #include <com/sun/star/script/XLibraryContainerPassword.hpp>
+#include <deque>
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star;
 
 
-SV_DECL_VARARR( EntryArray, SvLBoxEntry*, 4, 4 )
-
-SV_IMPL_VARARR( EntryArray, SvLBoxEntry*);
+typedef std::deque< SvLBoxEntry* > EntryArray;
 
 
 void __EXPORT BasicTreeListBox::RequestingChilds( SvLBoxEntry* pEntry )
             case 2:
             case 1: 
             {
-                aEntries.C40_INSERT( SvLBoxEntry, pEntry, 0 );
+                aEntries.push_front( pEntry );
             }
             break;
             case 0: 
 
 	SbxVariable* pVar = 0;
     bool bDocumentObjects = false;
-	if ( aEntries.Count() )
+	if ( !aEntries.empty() )
 	{
-		for ( USHORT n = 0; n < aEntries.Count(); n++ )
+		for ( size_t n = 0; n < aEntries.size(); n++ )
 		{
 			SvLBoxEntry* pLE = aEntries[n];
-			DBG_ASSERT( pLE, "Entrie im Array nicht gefunden" );
+			DBG_ASSERT( pLE, "Can not find entry in array" );
 			BasicEntry* pBE = (BasicEntry*)pLE->GetUserData();
-			DBG_ASSERT( pBE, "Keine Daten im Eintrag gefunden!" );
+			DBG_ASSERT( pBE, "The data in the entry not found!" );
 			String aName( GetEntryText( pLE ) );
 
 			switch ( pBE->GetType() )
             case 2:
             case 1: 
             {
-                aEntries.C40_INSERT( SvLBoxEntry, pEntry, 0 );
+                aEntries.push_front( pEntry );
             }
             break;
             case 0: 
         pEntry = GetParent( pEntry );
     }
 
-	if ( aEntries.Count() )
+	if ( !aEntries.empty() )
 	{
-		for ( USHORT n = 0; n < aEntries.Count(); n++ )
+		for ( size_t n = 0; n < aEntries.size(); n++ )
 		{
 			SvLBoxEntry* pLE = aEntries[n];
 			DBG_ASSERT( pLE, "Entrie im Array nicht gefunden" );

basic/inc/basic/sbmod.hxx

 #include <rtl/ustring.hxx>
 #include <vector>
 
+#include <deque>
+
 class SbMethod;
 class SbProperty;
 class SbiRuntime;
-class SbiBreakpoints;
+typedef std::deque< USHORT > SbiBreakpoints;
 class SbiImage;
 class SbProcedureProperty;
 class SbIfaceMapperMethod;
 	const SbxObject* FindType( String aTypeName ) const;
 
 	virtual BOOL	IsBreakable( USHORT nLine ) const;
-	virtual USHORT	GetBPCount() const;
-	virtual USHORT	GetBP( USHORT n ) const;
+	virtual size_t	GetBPCount() const;
+	virtual USHORT	GetBP( size_t n ) const;
 	virtual BOOL	IsBP( USHORT nLine ) const;
 	virtual BOOL	SetBP( USHORT nLine );
 	virtual BOOL	ClearBP( USHORT nLine );

basic/inc/basic/sbstar.hxx

 class SbiRuntime;                   // currently running procedure
 class SbiImage;                     // compiled image
 class BasicLibInfo;                 // info block for basic manager
-class SbiBreakpoints;
 class SbTextPortions;
 class SbMethod;
 class BasicManager;

basic/source/classes/sbxmod.cxx

 TYPEINIT1(SbObjModule,SbModule)
 TYPEINIT1(SbUserFormModule,SbObjModule)
 
-SV_DECL_VARARR(SbiBreakpoints,USHORT,4,4)
-SV_IMPL_VARARR(SbiBreakpoints,USHORT)
-
-
-SV_IMPL_VARARR(HighlightPortions, HighlightPortion)
+typedef std::vector<HighlightPortion> HighlightPortions;
 
 bool getDefaultVBAMode( StarBASIC* pb )
 {
 	return FALSE;
 }
 
-USHORT SbModule::GetBPCount() const
+size_t SbModule::GetBPCount() const
 {
-	return pBreaks ? pBreaks->Count() : 0;
+	return pBreaks ? pBreaks->size() : 0;
 }
 
-USHORT SbModule::GetBP( USHORT n ) const
+USHORT SbModule::GetBP( size_t n ) const
 {
-	if( pBreaks && n < pBreaks->Count() )
-		return pBreaks->GetObject( n );
+	if( pBreaks && n < pBreaks->size() )
+		return pBreaks->operator[]( n );
 	else
 		return 0;
 }
 {
 	if( pBreaks )
 	{
-		const USHORT* p = pBreaks->GetData();
-		USHORT n = pBreaks->Count();
-		for( USHORT i = 0; i < n; i++, p++ )
+		for( size_t i = 0; i < pBreaks->size(); i++ )
 		{
-			USHORT b = *p;
+			USHORT b = pBreaks->operator[]( i );
 			if( b == nLine )
 				return TRUE;
 			if( b < nLine )
 		return FALSE;
 	if( !pBreaks )
 		pBreaks = new SbiBreakpoints;
-	const USHORT* p = pBreaks->GetData();
-	USHORT n = pBreaks->Count();
-	USHORT i;
-	for( i = 0; i < n; i++, p++ )
+	size_t i;
+	for( i = 0; i < pBreaks->size(); i++ )
 	{
-		USHORT b = *p;
+		USHORT b = pBreaks->operator[]( i );
 		if( b == nLine )
 			return TRUE;
 		if( b < nLine )
 			break;
 	}
-	pBreaks->Insert( &nLine, 1, i );
+	pBreaks->insert( pBreaks->begin() + i, nLine );
 
 	// #38568: Zur Laufzeit auch hier SbDEBUG_BREAK setzen
 	if( pINST && pINST->pRun )
 	BOOL bRes = FALSE;
 	if( pBreaks )
 	{
-		const USHORT* p = pBreaks->GetData();
-		USHORT n = pBreaks->Count();
-		for( USHORT i = 0; i < n; i++, p++ )
+		for( size_t i = 0; i < pBreaks->size(); i++ )
 		{
-			USHORT b = *p;
+			USHORT b = pBreaks->operator[]( i );
 			if( b == nLine )
 			{
-				pBreaks->Remove( i, 1 ); bRes = TRUE; break;
+				pBreaks->erase( pBreaks->begin() + i ); 
+				bRes = TRUE; 
+				break;
 			}
 			if( b < nLine )
 				break;
 		}
-		if( !pBreaks->Count() )
+		if( pBreaks->empty() )
 			delete pBreaks, pBreaks = NULL;
 	}
 	return bRes;
 
 void SbModule::ClearAllBP()
 {
-	delete pBreaks; pBreaks = NULL;
+	delete pBreaks; 
+	pBreaks = NULL;
 }
 
 void
 	Clear();
 	if( !SbxObject::LoadData( rStrm, 1 ) )
 		return FALSE;
-	// Sicherheitshalber...
+	// Precaution...
 	SetFlag( SBX_EXTSEARCH | SBX_GBLSEARCH );
 	BYTE bImage;
 	rStrm >> bImage;