summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-05-28 13:34:08 +0000
committerOliver Bolte <obo@openoffice.org>2004-05-28 13:34:08 +0000
commitcb5d8171a2a3b07b4cca4267bffe55b776eac908 (patch)
tree59abc17abadb027041f67d64d9fab320daff0486 /basctl
parent2c3087c2befd2dad56d7abfc54f6e90724be25b3 (diff)
INTEGRATION: CWS ab08fixes (1.22.60); FILE MERGED
2004/05/05 15:00:07 ab 1.22.60.1: #i16341# Fixed EOL handling for syntax highlighter
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/bastypes.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 737862656ca7..3437180a516e 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: bastypes.cxx,v $
*
- * $Revision: 1.22 $
+ * $Revision: 1.23 $
*
- * last change: $Author: vg $ $Date: 2004-01-06 17:13:24 $
+ * last change: $Author: obo $ $Date: 2004-05-28 14:34:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -926,7 +926,7 @@ void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, BO
sal_Int32 nLine = 0;
while ( nLine < nStartLine )
{
- nStartPos = rStr.indexOf( LINE_SEP, nStartPos );
+ nStartPos = searchEOL( rStr, nStartPos );
if( nStartPos == -1 )
break;
nStartPos++; // nicht das \n.
@@ -939,7 +939,7 @@ void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, BO
{
nEndPos = nStartPos;
for ( sal_Int32 i = 0; i < nLines; i++ )
- nEndPos = rStr.indexOf( LINE_SEP, nEndPos+1 );
+ nEndPos = searchEOL( rStr, nEndPos+1 );
if ( nEndPos == -1 ) // kann bei letzter Zeile passieren
nEndPos = rStr.getLength();
@@ -954,8 +954,11 @@ void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, BO
{
sal_Int32 n = nStartPos;
sal_Int32 nLen = rStr.getLength();
- while ( ( n < nLen ) && ( rStr.getStr()[ n ] == LINE_SEP ) )
+ while ( ( n < nLen ) && ( rStr.getStr()[ n ] == LINE_SEP ||
+ rStr.getStr()[ n ] == LINE_SEP_CR ) )
+ {
n++;
+ }
if ( n > nStartPos )
{