summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-04-16 13:46:56 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-04-16 13:46:56 +0100
commit5358b9ba4ffa8667192b11bbb654fcdbcd463e7a (patch)
treec2d01abd8f90c065323acde284c4026824591d38 /svtools
parent02917cb57e2c2e9fcab2db8f72960023f3e4edaf (diff)
UniString->OUString
Change-Id: I217944d40ed7cd3a2fca4ad0d61729ff5d94ed96
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/edit/editsyntaxhighlighter.cxx48
1 files changed, 24 insertions, 24 deletions
diff --git a/svtools/source/edit/editsyntaxhighlighter.cxx b/svtools/source/edit/editsyntaxhighlighter.cxx
index 3f1cd8d4b0c5..33e96d9da0be 100644
--- a/svtools/source/edit/editsyntaxhighlighter.cxx
+++ b/svtools/source/edit/editsyntaxhighlighter.cxx
@@ -48,68 +48,68 @@ void MultiLineEditSyntaxHighlight::SetText(const OUString& rNewText)
UpdateData();
}
-void MultiLineEditSyntaxHighlight::DoBracketHilight(sal_uInt16 aKey)
+void MultiLineEditSyntaxHighlight::DoBracketHilight(sal_uInt16 nKey)
{
TextSelection aCurrentPos = GetTextView()->GetSelection();
- xub_StrLen aStartPos = aCurrentPos.GetStart().GetIndex();
+ xub_StrLen nStartPos = aCurrentPos.GetStart().GetIndex();
sal_uLong nStartPara = aCurrentPos.GetStart().GetPara();
- sal_uInt16 aCount = 0;
- int aChar = -1;
+ sal_uInt16 nCount = 0;
+ int nChar = -1;
- switch (aKey)
+ switch (nKey)
{
case '\'': // no break
case '"':
{
- aChar = aKey;
+ nChar = nKey;
break;
}
case '}' :
{
- aChar = '{';
+ nChar = '{';
break;
}
case ')':
{
- aChar = '(';
+ nChar = '(';
break;
}
case ']':
{
- aChar = '[';
+ nChar = '[';
break;
}
}
- if (aChar != -1)
+ if (nChar != -1)
{
- for (long aPara =nStartPara; aPara>=0;--aPara)
+ for (long nPara = nStartPara; nPara>=0; --nPara)
{
- if ( aStartPos == 0 )
+ if (nStartPos == 0)
continue;
- String aLine( GetTextEngine()->GetText( aPara ) );
+ OUString aLine( GetTextEngine()->GetText( nPara ) );
- if (aLine.Len() == 0)
+ if (aLine.isEmpty())
continue;
- for (sal_uInt16 i = ((unsigned long)aPara==nStartPara) ? aStartPos-1 : (sal_uInt16)(aLine.Len()-1); i>0; --i)
+ for (sal_Int32 i = ((sal_uLong)nPara==nStartPara) ? nStartPos-1 : aLine.getLength()-1; i>0; --i)
{
- if (aLine.GetChar(i)==aChar)
+ if (aLine[i] == nChar)
{
- if (!aCount)
+ if (!nCount)
{
- GetTextEngine()->SetAttrib( TextAttribFontWeight( WEIGHT_ULTRABOLD ), aPara, i, i+1, sal_True );
- GetTextEngine()->SetAttrib( TextAttribFontColor( Color(0,0,0) ), aPara, i, i+1, sal_True );
- GetTextEngine()->SetAttrib( TextAttribFontWeight( WEIGHT_ULTRABOLD ), nStartPara, aStartPos, aStartPos, sal_True );
- GetTextEngine()->SetAttrib( TextAttribFontColor( Color(0,0,0) ), nStartPara, aStartPos, aStartPos, sal_True );
+ GetTextEngine()->SetAttrib( TextAttribFontWeight( WEIGHT_ULTRABOLD ), nPara, i, i+1, sal_True );
+ GetTextEngine()->SetAttrib( TextAttribFontColor( Color(0,0,0) ), nPara, i, i+1, sal_True );
+ GetTextEngine()->SetAttrib( TextAttribFontWeight( WEIGHT_ULTRABOLD ), nStartPara, nStartPos, nStartPos, sal_True );
+ GetTextEngine()->SetAttrib( TextAttribFontColor( Color(0,0,0) ), nStartPara, nStartPos, nStartPos, sal_True );
return;
}
else
- aCount--;
+ --nCount;
}
- if (aLine.GetChar(i)==aKey)
- aCount++;
+ if (aLine[i] == nKey)
+ ++nCount;
}
}
}