these can all be made const

Change-Id: I6a8af82e8612196f20143f4997eb95c80a2ca13d
This commit is contained in:
Caolán McNamara
2015-02-12 10:53:18 +00:00
parent d8a9c74f41
commit f8b80701e0
4 changed files with 15 additions and 15 deletions

View File

@@ -157,7 +157,7 @@ public:
void UpdateSyntaxHighlighting ();
bool GetProcedureName(OUString& rLine, OUString& rProcType, OUString& rProcName);
bool GetProcedureName(OUString& rLine, OUString& rProcType, OUString& rProcName) const;
};

View File

@@ -789,7 +789,7 @@ void EditorWindow::HandleProcedureCompletion()
}
}
bool EditorWindow::GetProcedureName(OUString& rLine, OUString& rProcType, OUString& rProcName)
bool EditorWindow::GetProcedureName(OUString& rLine, OUString& rProcType, OUString& rProcName) const
{
std::vector<HighlightPortion> aPortions;
aHighlighter.getHighlightPortions(rLine, aPortions);

View File

@@ -261,11 +261,11 @@ class SyntaxHighlighter::Tokenizer
sal_uInt16 aCharTypeTab[256];
// Auxiliary function: testing of the character flags
bool testCharFlags( sal_Unicode c, sal_uInt16 nTestFlags );
bool testCharFlags(sal_Unicode c, sal_uInt16 nTestFlags) const;
// Get new token, EmptyString == nothing more over there
bool getNextToken(const sal_Unicode*& pos, /*out*/TokenTypes& reType,
/*out*/const sal_Unicode*& rpStartPos, /*out*/const sal_Unicode*& rpEndPos );
/*out*/const sal_Unicode*& rpStartPos, /*out*/const sal_Unicode*& rpEndPos) const;
const char** ppListKeyWords;
sal_uInt16 nKeyWordCount;
@@ -277,12 +277,12 @@ public:
~Tokenizer( void );
void getHighlightPortions(const OUString& rLine,
/*out*/std::vector<HighlightPortion>& portions );
/*out*/std::vector<HighlightPortion>& portions) const;
void setKeyWords( const char** ppKeyWords, sal_uInt16 nCount );
};
// Helper function: test character flag
bool SyntaxHighlighter::Tokenizer::testCharFlags( sal_Unicode c, sal_uInt16 nTestFlags )
bool SyntaxHighlighter::Tokenizer::testCharFlags(sal_Unicode c, sal_uInt16 nTestFlags) const
{
bool bRet = false;
if( c != 0 && c <= 255 )
@@ -304,7 +304,7 @@ void SyntaxHighlighter::Tokenizer::setKeyWords( const char** ppKeyWords, sal_uIn
}
bool SyntaxHighlighter::Tokenizer::getNextToken(const sal_Unicode*& pos, /*out*/TokenTypes& reType,
/*out*/const sal_Unicode*& rpStartPos, /*out*/const sal_Unicode*& rpEndPos )
/*out*/const sal_Unicode*& rpStartPos, /*out*/const sal_Unicode*& rpEndPos) const
{
reType = TT_UNKNOWN;
@@ -666,7 +666,7 @@ SyntaxHighlighter::Tokenizer::~Tokenizer( void )
}
void SyntaxHighlighter::Tokenizer::getHighlightPortions(const OUString& rLine,
/*out*/std::vector<HighlightPortion>& portions )
/*out*/std::vector<HighlightPortion>& portions) const
{
// Set the position to the beginning of the source string
const sal_Unicode* pos = rLine.getStr();
@@ -707,7 +707,7 @@ SyntaxHighlighter::SyntaxHighlighter(HighlighterLanguage language):
SyntaxHighlighter::~SyntaxHighlighter() {}
void SyntaxHighlighter::getHighlightPortions(const OUString& rLine,
/*out*/std::vector<HighlightPortion>& portions )
/*out*/std::vector<HighlightPortion>& portions) const
{
m_tokenizer->getHighlightPortions( rLine, portions );
}

View File

@@ -78,7 +78,7 @@ public:
~SyntaxHighlighter();
void getHighlightPortions( const OUString& rLine,
std::vector<HighlightPortion>& pPortions );
std::vector<HighlightPortion>& pPortions ) const;
HighlighterLanguage GetLanguage();
};