[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - svtools/source
Caolán McNamara
caolanm at redhat.com
Tue Apr 16 07:13:08 PDT 2013
svtools/source/edit/editsyntaxhighlighter.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit a4e27ec2be678fe126e49a5c8a9be4adc5cd6159
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Apr 16 13:40:04 2013 +0100
Resolves: fdo#47209 and rhbz#927223 syntax highlighter crash
when trying to parse empty lines looking for the matching
bracket
Change-Id: I3961a3d0e804d136de286e21934c6ba5ab0496cf
(cherry picked from commit 02917cb57e2c2e9fcab2db8f72960023f3e4edaf)
Reviewed-on: https://gerrit.libreoffice.org/3414
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
diff --git a/svtools/source/edit/editsyntaxhighlighter.cxx b/svtools/source/edit/editsyntaxhighlighter.cxx
index 6485311..3b5f3e5 100644
--- a/svtools/source/edit/editsyntaxhighlighter.cxx
+++ b/svtools/source/edit/editsyntaxhighlighter.cxx
@@ -89,6 +89,10 @@ void MultiLineEditSyntaxHighlight::DoBracketHilight(sal_uInt16 aKey)
continue;
String aLine( GetTextEngine()->GetText( aPara ) );
+
+ if (aLine.Len() == 0)
+ continue;
+
for (sal_uInt16 i = ((unsigned long)aPara==nStartPara) ? aStartPos-1 : (sal_uInt16)(aLine.Len()-1); i>0; --i)
{
if (aLine.GetChar(i)==aChar)
More information about the Libreoffice-commits
mailing list