summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-04-02 23:18:19 +0200
committerMichael Stahl <mstahl@redhat.com>2012-04-02 23:18:19 +0200
commit9ef0b8e3aa2137af67624dbd757fe464e44202ed (patch)
tree7e82df7d8c5c5b76b5cec04a5604842310e90404 /basctl
parente5a916eeeed8e79a3d105040f3fb832134bf7b32 (diff)
Convert tools/table.hxx to std::set in EditorWindow class in basctl module
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/baside2.hxx6
-rw-r--r--basctl/source/basicide/baside2b.cxx16
2 files changed, 11 insertions, 11 deletions
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index c7b3f058942b..8adbe15105d6 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -51,11 +51,11 @@ class SvxSearchItem;
#include <sfx2/progress.hxx>
#include <svtools/syntaxhighlight.hxx>
#include <unotools/options.hxx>
-#include <tools/table.hxx>
#include "breakpoint.hxx"
#include "linenumberwindow.hxx"
#include "objdlg.hxx"
+#include <set>
#include <tools/table.hxx>
@@ -95,6 +95,8 @@ inline void ProgressInfo::StepProgress()
SetState( ++nCurState );
}
+typedef std::set<sal_uInt16> SyntaxLineSet;
+
class EditorWindow : public Window, public SfxListener
{
private:
@@ -113,7 +115,7 @@ private:
SyntaxHighlighter aHighlighter;
Timer aSyntaxIdleTimer;
- Table aSyntaxLineTable;
+ SyntaxLineSet aSyntaxLineTable;
DECL_LINK(SyntaxTimerHdl, void *);
ProgressInfo* pProgress;
ModulWindow* pModulWindow;
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index efe352ff4c14..ef6743536aca 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -628,7 +628,7 @@ void EditorWindow::CreateEditEngine()
for ( sal_uInt16 nLine = 0; nLine < nLines; nLine++ )
- aSyntaxLineTable.Insert( nLine, (void*)(sal_uInt16)1 );
+ aSyntaxLineTable.insert( nLine );
ForceSyntaxTimeout();
DELETEZ( pProgress );
@@ -793,7 +793,7 @@ void EditorWindow::ImpDoHighlight( sal_uLong nLine )
if ( aChanges.Len() )
{
for ( long n = aChanges.Min() + 1; n <= aChanges.Max(); n++ )
- aSyntaxLineTable.Insert( n, (void*)(sal_uLong)1 );
+ aSyntaxLineTable.insert( n );
aSyntaxIdleTimer.Start();
}
@@ -868,7 +868,7 @@ void EditorWindow::DoDelayedSyntaxHighlight( sal_uLong nPara )
{
if ( bDelayHighlight )
{
- aSyntaxLineTable.Insert( nPara, (void*)(sal_uLong)1 );
+ aSyntaxLineTable.insert( nPara );
aSyntaxIdleTimer.Start();
}
else
@@ -884,13 +884,11 @@ IMPL_LINK_NOARG(EditorWindow, SyntaxTimerHdl)
// pEditEngine->SetUpdateMode( sal_False );
bHighlightning = sal_True;
- sal_uInt16 nLine;
- void* p = aSyntaxLineTable.First();
- while ( p )
+ for ( SyntaxLineSet::const_iterator it = aSyntaxLineTable.begin();
+ it != aSyntaxLineTable.end(); ++it )
{
- nLine = (sal_uInt16)aSyntaxLineTable.GetCurKey();
+ sal_uInt16 nLine = *it;
DoSyntaxHighlight( nLine );
- p = aSyntaxLineTable.Next();
}
// #i45572#
@@ -899,7 +897,7 @@ IMPL_LINK_NOARG(EditorWindow, SyntaxTimerHdl)
pEditEngine->SetModified( bWasModified );
- aSyntaxLineTable.Clear();
+ aSyntaxLineTable.clear();
bHighlightning = sal_False;
return 0;