diff options
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 16 | ||||
-rw-r--r-- | comphelper/source/misc/syntaxhighlight.cxx | 4 | ||||
-rw-r--r-- | helpcompiler/source/BasCodeTagger.cxx | 2 | ||||
-rw-r--r-- | include/comphelper/syntaxhighlight.hxx | 7 | ||||
-rw-r--r-- | svtools/source/edit/editsyntaxhighlighter.cxx | 2 |
5 files changed, 14 insertions, 17 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 10ee7b41cb9f..e26312d68eb8 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -594,7 +594,7 @@ void EditorWindow::HandleAutoCorrect() OUString aLine( pEditEngine->GetText( nLine ) ); // the line being modified const OUString& sActSubName = GetActualSubName( nLine ); // the actual procedure - HighlightPortions aPortions; + std::vector<HighlightPortion> aPortions; aHighlighter.getHighlightPortions( nLine, aLine, aPortions ); if( aPortions.size() == 0 ) @@ -668,7 +668,7 @@ TextSelection EditorWindow::GetLastHighlightPortionTextSelection() sal_uLong nLine = GetEditView()->GetSelection().GetStart().GetPara(); sal_uLong nIndex = GetEditView()->GetSelection().GetStart().GetIndex(); OUString aLine( pEditEngine->GetText( nLine ) ); // the line being modified - HighlightPortions aPortions; + std::vector<HighlightPortion> aPortions; aHighlighter.getHighlightPortions( nLine, aLine, aPortions ); HighlightPortion& r = aPortions[aPortions.size()-1]; @@ -714,7 +714,7 @@ void EditorWindow::HandleAutoCloseDoubleQuotes() sal_uLong nLine = aSel.GetStart().GetPara(); OUString aLine( pEditEngine->GetText( nLine ) ); // the line being modified - HighlightPortions aPortions; + std::vector<HighlightPortion> aPortions; aHighlighter.getHighlightPortions( nLine, aLine, aPortions ); if( aPortions.size() == 0 ) @@ -735,7 +735,7 @@ void EditorWindow::HandleProcedureCompletion() sal_uLong nLine = aSel.GetStart().GetPara(); OUString aLine( pEditEngine->GetText( nLine ) ); - HighlightPortions aPortions; + std::vector<HighlightPortion> aPortions; aHighlighter.getHighlightPortions( nLine, aLine, aPortions ); if( aPortions.size() == 0 ) @@ -785,7 +785,7 @@ void EditorWindow::HandleProcedureCompletion() for( sal_uLong i = nLine+1; i < pEditEngine->GetParagraphCount(); ++i ) {//searching forward for end token, or another sub/function definition OUString aCurrLine = pEditEngine->GetText( i ); - HighlightPortions aCurrPortions; + std::vector<HighlightPortion> aCurrPortions; aHighlighter.getHighlightPortions( i, aCurrLine, aCurrPortions ); if( aCurrPortions.size() >= 3 ) @@ -818,12 +818,12 @@ void EditorWindow::HandleCodeCompletion() OUString aLine( pEditEngine->GetText( nLine ) ); // the line being modified std::vector< OUString > aVect; //vector to hold the base variable+methods for the nested reflection - HighlightPortions aPortions; + std::vector<HighlightPortion> aPortions; aLine = aLine.copy(0, aSel.GetEnd().GetIndex()); aHighlighter.getHighlightPortions( nLine, aLine, aPortions ); if( aPortions.size() > 0 ) {//use the syntax highlighter to grab out nested reflection calls, eg. aVar.aMethod("aa").aOtherMethod .. - for( HighlightPortions::reverse_iterator aIt = aPortions.rbegin(); aIt != aPortions.rend(); ++aIt ) + for( std::vector<HighlightPortion>::reverse_iterator aIt = aPortions.rbegin(); aIt != aPortions.rend(); ++aIt ) { HighlightPortion r = *aIt; if( r.tokenType == TT_WHITESPACE ) // a whitespace: stop; if there is no ws, it goes to the beginning of the line @@ -1186,7 +1186,7 @@ void EditorWindow::ImpDoHighlight( sal_uLong nLine ) bool const bWasModified = pEditEngine->IsModified(); pEditEngine->RemoveAttribs( nLine, true ); - HighlightPortions aPortions; + std::vector<HighlightPortion> aPortions; aHighlighter.getHighlightPortions( nLine, aLine, aPortions ); for ( size_t i = 0; i < aPortions.size(); i++ ) diff --git a/comphelper/source/misc/syntaxhighlight.cxx b/comphelper/source/misc/syntaxhighlight.cxx index 82fc060894cc..63a4b1bf077e 100644 --- a/comphelper/source/misc/syntaxhighlight.cxx +++ b/comphelper/source/misc/syntaxhighlight.cxx @@ -659,7 +659,7 @@ sal_uInt16 SimpleTokenizer_Impl::parseLine( sal_uInt32 nParseLine, const OUStrin } void SimpleTokenizer_Impl::getHighlightPortions( sal_uInt32 nParseLine, const OUString& rLine, - /*out*/HighlightPortions& portions ) + /*out*/std::vector<HighlightPortion>& portions ) { // Set the position to the beginning of the source string mpStringBegin = mpActualPos = rLine.getStr(); @@ -731,7 +731,7 @@ void SyntaxHighlighter::notifyChange( sal_uInt32 nLine, sal_Int32 nLineCountDiff } void SyntaxHighlighter::getHighlightPortions( sal_uInt32 nLine, const OUString& rLine, - /*out*/HighlightPortions& portions ) + /*out*/std::vector<HighlightPortion>& portions ) { m_pSimpleTokenizer->getHighlightPortions( nLine, rLine, portions ); } diff --git a/helpcompiler/source/BasCodeTagger.cxx b/helpcompiler/source/BasCodeTagger.cxx index d394e1aad531..6eaf063cc78c 100644 --- a/helpcompiler/source/BasCodeTagger.cxx +++ b/helpcompiler/source/BasCodeTagger.cxx @@ -150,7 +150,7 @@ void BasicCodeTagger::tagParagraph( xmlNodePtr paragraph ) strlen(reinterpret_cast<const char*>(codeSnippet)), RTL_TEXTENCODING_UTF8 ); m_Highlighter.notifyChange ( 0, 0, &strLine, 1 ); - HighlightPortions portions; + std::vector<HighlightPortion> portions; m_Highlighter.getHighlightPortions( 0, strLine, portions ); for ( size_t i=0; i<portions.size(); i++ ) { diff --git a/include/comphelper/syntaxhighlight.hxx b/include/comphelper/syntaxhighlight.hxx index dfea10f787e3..5161a5622cda 100644 --- a/include/comphelper/syntaxhighlight.hxx +++ b/include/comphelper/syntaxhighlight.hxx @@ -46,9 +46,6 @@ enum TokenTypes struct HighlightPortion { sal_uInt16 nBegin; sal_uInt16 nEnd; TokenTypes tokenType; }; - -typedef std::vector<HighlightPortion> HighlightPortions; - ///////////////////////////////////////////////////////////////////////// // Auxiliary class to support JavaScript modules, next to find functions which // will later will be used for syntax highlighting @@ -108,7 +105,7 @@ public: sal_uInt16 parseLine( sal_uInt32 nLine, const OUString* aSource ); void getHighlightPortions( sal_uInt32 nParseLine, const OUString& rLine, - /*out*/HighlightPortions& portions ); + /*out*/std::vector<HighlightPortion>& portions ); void setKeyWords( const char** ppKeyWords, sal_uInt16 nCount ); }; @@ -140,7 +137,7 @@ public: const OUString* pChangedLines, sal_uInt32 nArrayLength); void getHighlightPortions( sal_uInt32 nLine, const OUString& rLine, - HighlightPortions& pPortions ); + std::vector<HighlightPortion>& pPortions ); HighlighterLanguage GetLanguage() { return eLanguage;} }; diff --git a/svtools/source/edit/editsyntaxhighlighter.cxx b/svtools/source/edit/editsyntaxhighlighter.cxx index d8bde9c7e14c..0d480d25a5ef 100644 --- a/svtools/source/edit/editsyntaxhighlighter.cxx +++ b/svtools/source/edit/editsyntaxhighlighter.cxx @@ -174,7 +174,7 @@ void MultiLineEditSyntaxHighlight::UpdateData() aHighlighter.notifyChange( nLine, 0, &aLine, 1 ); GetTextEngine()->RemoveAttribs( nLine, sal_True ); - HighlightPortions aPortions; + std::vector<HighlightPortion> aPortions; aHighlighter.getHighlightPortions( nLine, aLine, aPortions ); for ( size_t i = 0; i < aPortions.size(); i++ ) { |