Kaydet (Commit) fb1f3db0 authored tarafından Andras Timar's avatar Andras Timar

String to OUString

Change-Id: Ibb0b1808532622ffb2dfc55d533428f6d72b890c
üst d25486b5
...@@ -787,7 +787,7 @@ void EditorWindow::ImpDoHighlight( sal_uLong nLine ) ...@@ -787,7 +787,7 @@ void EditorWindow::ImpDoHighlight( sal_uLong nLine )
{ {
if ( bDoSyntaxHighlight ) if ( bDoSyntaxHighlight )
{ {
String aLine( pEditEngine->GetText( nLine ) ); OUString aLine( pEditEngine->GetText( nLine ) );
Range aChanges = aHighlighter.notifyChange( nLine, 0, &aLine, 1 ); Range aChanges = aHighlighter.notifyChange( nLine, 0, &aLine, 1 );
if ( aChanges.Len() ) if ( aChanges.Len() )
{ {
...@@ -935,7 +935,7 @@ void EditorWindow::ParagraphInsertedDeleted( sal_uLong nPara, bool bInserted ) ...@@ -935,7 +935,7 @@ void EditorWindow::ParagraphInsertedDeleted( sal_uLong nPara, bool bInserted )
if ( bDoSyntaxHighlight ) if ( bDoSyntaxHighlight )
{ {
String aDummy; OUString aDummy;
aHighlighter.notifyChange( nPara, bInserted ? 1 : (-1), &aDummy, 1 ); aHighlighter.notifyChange( nPara, bInserted ? 1 : (-1), &aDummy, 1 );
} }
} }
......
...@@ -131,8 +131,8 @@ public: ...@@ -131,8 +131,8 @@ public:
SimpleTokenizer_Impl( HighlighterLanguage aLang = HIGHLIGHT_BASIC ); SimpleTokenizer_Impl( HighlighterLanguage aLang = HIGHLIGHT_BASIC );
~SimpleTokenizer_Impl( void ); ~SimpleTokenizer_Impl( void );
sal_uInt16 parseLine( sal_uInt32 nLine, const String* aSource ); sal_uInt16 parseLine( sal_uInt32 nLine, const OUString* aSource );
void getHighlightPortions( sal_uInt32 nParseLine, const String& rLine, void getHighlightPortions( sal_uInt32 nParseLine, const OUString& rLine,
/*out*/HighlightPortions& portions ); /*out*/HighlightPortions& portions );
void setKeyWords( const char** ppKeyWords, sal_uInt16 nCount ); void setKeyWords( const char** ppKeyWords, sal_uInt16 nCount );
}; };
...@@ -165,9 +165,9 @@ public: ...@@ -165,9 +165,9 @@ public:
void initialize( HighlighterLanguage eLanguage_ ); void initialize( HighlighterLanguage eLanguage_ );
const Range notifyChange( sal_uInt32 nLine, sal_Int32 nLineCountDifference, const Range notifyChange( sal_uInt32 nLine, sal_Int32 nLineCountDifference,
const String* pChangedLines, sal_uInt32 nArrayLength); const OUString* pChangedLines, sal_uInt32 nArrayLength);
void getHighlightPortions( sal_uInt32 nLine, const String& rLine, void getHighlightPortions( sal_uInt32 nLine, const OUString& rLine,
HighlightPortions& pPortions ); HighlightPortions& pPortions );
HighlighterLanguage GetLanguage() { return eLanguage;} HighlighterLanguage GetLanguage() { return eLanguage;}
......
...@@ -167,7 +167,7 @@ void MultiLineEditSyntaxHighlight::UpdateData() ...@@ -167,7 +167,7 @@ void MultiLineEditSyntaxHighlight::UpdateData()
sal_Bool bTempModified = GetTextEngine()->IsModified(); sal_Bool bTempModified = GetTextEngine()->IsModified();
for (unsigned int nLine=0; nLine < GetTextEngine()->GetParagraphCount(); nLine++) for (unsigned int nLine=0; nLine < GetTextEngine()->GetParagraphCount(); nLine++)
{ {
String aLine( GetTextEngine()->GetText( nLine ) ); OUString aLine( GetTextEngine()->GetText( nLine ) );
aHighlighter.notifyChange( nLine, 0, &aLine, 1 ); aHighlighter.notifyChange( nLine, 0, &aLine, 1 );
GetTextEngine()->RemoveAttribs( nLine, sal_True ); GetTextEngine()->RemoveAttribs( nLine, sal_True );
......
...@@ -636,10 +636,10 @@ SimpleTokenizer_Impl* getSimpleTokenizer( void ) ...@@ -636,10 +636,10 @@ SimpleTokenizer_Impl* getSimpleTokenizer( void )
return pSimpleTokenizer; return pSimpleTokenizer;
} }
sal_uInt16 SimpleTokenizer_Impl::parseLine( sal_uInt32 nParseLine, const String* aSource ) sal_uInt16 SimpleTokenizer_Impl::parseLine( sal_uInt32 nParseLine, const OUString* aSource )
{ {
// Set the position to the beginning of the source string // Set the position to the beginning of the source string
mpStringBegin = mpActualPos = aSource->GetBuffer(); mpStringBegin = mpActualPos = aSource->getStr();
// Initialize row and column // Initialize row and column
nLine = nParseLine; nLine = nParseLine;
...@@ -658,11 +658,11 @@ sal_uInt16 SimpleTokenizer_Impl::parseLine( sal_uInt32 nParseLine, const String* ...@@ -658,11 +658,11 @@ sal_uInt16 SimpleTokenizer_Impl::parseLine( sal_uInt32 nParseLine, const String*
return nTokenCount; return nTokenCount;
} }
void SimpleTokenizer_Impl::getHighlightPortions( sal_uInt32 nParseLine, const String& rLine, void SimpleTokenizer_Impl::getHighlightPortions( sal_uInt32 nParseLine, const OUString& rLine,
/*out*/HighlightPortions& portions ) /*out*/HighlightPortions& portions )
{ {
// Set the position to the beginning of the source string // Set the position to the beginning of the source string
mpStringBegin = mpActualPos = rLine.GetBuffer(); mpStringBegin = mpActualPos = rLine.getStr();
// Initialize row and column // Initialize row and column
nLine = nParseLine; nLine = nParseLine;
...@@ -722,7 +722,7 @@ void SyntaxHighlighter::initialize( HighlighterLanguage eLanguage_ ) ...@@ -722,7 +722,7 @@ void SyntaxHighlighter::initialize( HighlighterLanguage eLanguage_ )
} }
const Range SyntaxHighlighter::notifyChange( sal_uInt32 nLine, sal_Int32 nLineCountDifference, const Range SyntaxHighlighter::notifyChange( sal_uInt32 nLine, sal_Int32 nLineCountDifference,
const String* pChangedLines, sal_uInt32 nArrayLength) const OUString* pChangedLines, sal_uInt32 nArrayLength)
{ {
(void)nLineCountDifference; (void)nLineCountDifference;
...@@ -732,7 +732,7 @@ const Range SyntaxHighlighter::notifyChange( sal_uInt32 nLine, sal_Int32 nLineCo ...@@ -732,7 +732,7 @@ const Range SyntaxHighlighter::notifyChange( sal_uInt32 nLine, sal_Int32 nLineCo
return Range( nLine, nLine + nArrayLength-1 ); return Range( nLine, nLine + nArrayLength-1 );
} }
void SyntaxHighlighter::getHighlightPortions( sal_uInt32 nLine, const String& rLine, void SyntaxHighlighter::getHighlightPortions( sal_uInt32 nLine, const OUString& rLine,
/*out*/HighlightPortions& portions ) /*out*/HighlightPortions& portions )
{ {
m_pSimpleTokenizer->getHighlightPortions( nLine, rLine, portions ); m_pSimpleTokenizer->getHighlightPortions( nLine, rLine, portions );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment