summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorBartosz Kosiorek <gang65@openoffice.org>2010-09-17 19:06:31 +0200
committerBartosz Kosiorek <gang65@openoffice.org>2010-09-17 19:06:31 +0200
commit6e8f760461177edcd26d35c4eb8dc503c3e0df91 (patch)
tree95013e2beb4be5179b916d3b455998d7b8d144e2 /basctl
parent5d5d4aee838d02c8d6ee119d2325d8a39f5455c5 (diff)
svarray
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/baside2b.cxx7
-rw-r--r--basctl/source/basicide/bastype3.cxx21
2 files changed, 13 insertions, 15 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index b6b4accb7dd6..a115ce74d4bd 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -28,8 +28,7 @@
// 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>
@@ -773,8 +772,8 @@ void EditorWindow::ImpDoHighlight( ULONG nLine )
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);
diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx
index de9eff56ca24..77e92189507b 100644
--- a/basctl/source/basicide/bastype3.cxx
+++ b/basctl/source/basicide/bastype3.cxx
@@ -42,14 +42,13 @@
#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 )
@@ -196,7 +195,7 @@ SbxVariable* BasicTreeListBox::FindVariable( SvLBoxEntry* pEntry )
case 2:
case 1:
{
- aEntries.C40_INSERT( SvLBoxEntry, pEntry, 0 );
+ aEntries.push_front( pEntry );
}
break;
case 0:
@@ -210,14 +209,14 @@ SbxVariable* BasicTreeListBox::FindVariable( SvLBoxEntry* pEntry )
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() )
@@ -301,7 +300,7 @@ BasicEntryDescriptor BasicTreeListBox::GetEntryDescriptor( SvLBoxEntry* pEntry )
case 2:
case 1:
{
- aEntries.C40_INSERT( SvLBoxEntry, pEntry, 0 );
+ aEntries.push_front( pEntry );
}
break;
case 0:
@@ -319,9 +318,9 @@ BasicEntryDescriptor BasicTreeListBox::GetEntryDescriptor( SvLBoxEntry* pEntry )
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" );