summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/evoab/LNoException.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/evoab/LNoException.cxx')
-rwxr-xr-x[-rw-r--r--]connectivity/source/drivers/evoab/LNoException.cxx57
1 files changed, 29 insertions, 28 deletions
diff --git a/connectivity/source/drivers/evoab/LNoException.cxx b/connectivity/source/drivers/evoab/LNoException.cxx
index 790dc16c7c98..3b223ddd943b 100644..100755
--- a/connectivity/source/drivers/evoab/LNoException.cxx
+++ b/connectivity/source/drivers/evoab/LNoException.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,40 +41,40 @@ xub_StrLen OEvoabString::GetTokenCount( sal_Unicode cTok, sal_Unicode cStrDel )
return 0;
xub_StrLen nTokCount = 1;
- sal_Bool bStart = sal_True; // Stehen wir auf dem ersten Zeichen im Token?
- sal_Bool bInString = sal_False; // Befinden wir uns INNERHALB eines (cStrDel delimited) String?
+ sal_Bool bStart = sal_True; // Are we on the fist character of the token?
+ sal_Bool bInString = sal_False; // Are we within a (cStrDel delimited) string?
- // Suche bis Stringende nach dem ersten nicht uebereinstimmenden Zeichen
+ // Search for the first not-matching character (search ends at the end of string)
for( xub_StrLen i = 0; i < Len(); i++ )
{
if (bStart)
{
bStart = sal_False;
- // Erstes Zeichen ein String-Delimiter?
+ // First character a string delimiter?
if ((*this).GetChar(i) == cStrDel)
{
- bInString = sal_True; // dann sind wir jetzt INNERHALB des Strings!
- continue; // dieses Zeichen ueberlesen!
+ bInString = sal_True; // then we are within a string!
+ continue; // read next character!
}
}
if (bInString) {
- // Wenn jetzt das String-Delimiter-Zeichen auftritt ...
+ // If we see the string delimiter ...
if ( (*this).GetChar(i) == cStrDel )
{
if ((i+1 < Len()) && ((*this).GetChar(i+1) == cStrDel))
{
- // Verdoppeltes String-Delimiter-Zeichen:
- i++; // kein String-Ende, naechstes Zeichen ueberlesen.
+ // doubled string-delimiter:
+ i++; // no end of string, skip next character.
}
else
{
- // String-Ende
+ // end of String
bInString = sal_False;
}
}
} else {
- // Stimmt das Tokenzeichen ueberein, dann erhoehe TokCount
+ // if the token character matches, then raise TokCount
if ( (*this).GetChar(i) == cTok )
{
nTokCount++;
@@ -93,51 +94,49 @@ void OEvoabString::GetTokenSpecial( String& _rStr,xub_StrLen& nStartPos, sal_Uni
xub_StrLen nLen = Len();
if ( nLen )
{
- sal_Bool bInString = (nStartPos < nLen) && ((*this).GetChar(nStartPos) == cStrDel); // Befinden wir uns INNERHALB eines (cStrDel delimited) String?
+ sal_Bool bInString = (nStartPos < nLen) && ((*this).GetChar(nStartPos) == cStrDel); // are we within a (cStrDel delimited) String?
- // Erstes Zeichen ein String-Delimiter?
+ // Is the first character a String-Delimiter?
if (bInString )
- ++nStartPos; // dieses Zeichen ueberlesen!
- // Suche bis Stringende nach dem ersten nicht uebereinstimmenden Zeichen
+ ++nStartPos; // skip the character!
+ // Search until end of string for the first not-matching character
for( xub_StrLen i = nStartPos; i < nLen; ++i )
{
if (bInString)
{
- // Wenn jetzt das String-Delimiter-Zeichen auftritt ...
+ // If we see the String-Delimiter ...
if ( (*this).GetChar(i) == cStrDel )
{
if ((i+1 < nLen) && ((*this).GetChar(i+1) == cStrDel))
{
- // Verdoppeltes String-Delimiter-Zeichen:
- ++i; // kein String-Ende, naechstes Zeichen ueberlesen.
-
- _rStr += (*this).GetChar(i); // Zeichen gehoert zum Resultat-String
+ // doubled String-Delimiter:
+ ++i; // no end of String, skip next character
+ _rStr += (*this).GetChar(i); // Character belongs to Result-String
}
else
{
- // String-Ende
+ // end of String
bInString = sal_False;
}
}
else
{
- _rStr += (*this).GetChar(i); // Zeichen gehoert zum Resultat-String
+ _rStr += (*this).GetChar(i); // Character belongs to Result-String
}
}
else
{
- // Stimmt das Tokenzeichen ueberein, dann erhoehe nTok
+ // Does the Token-character match, then raise nTok
if ( (*this).GetChar(i) == cTok )
{
- // Vorzeitiger Abbruch der Schleife moeglich, denn
- // wir haben, was wir wollten.
+ // Early termination of loop possible, because we found what we were looking for.
nStartPos = i+1;
break;
}
else
{
- _rStr += (*this).GetChar(i); // Zeichen gehoert zum Resultat-String
+ _rStr += (*this).GetChar(i); // Character belongs to Result-String
}
}
}
@@ -174,7 +173,7 @@ sal_Bool OEvoabTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_In
return sal_False;
OEvoabConnection* pConnection = (OEvoabConnection*)m_pConnection;
// ----------------------------------------------------------
- // Positionierung vorbereiten:
+ // prepare positioning:
//OSL_TRACE("OEvoabTable::(before SeekRow,m_pFileStriam Exist)m_aCurrentLine = %d\n", ((OUtoCStr(::rtl::OUString(m_aCurrentLine))) ? (OUtoCStr(::rtl::OUString(m_aCurrentLine))):("NULL")) );
m_nFilePos = nCurPos;
@@ -309,7 +308,7 @@ sal_Bool OEvoabTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_In
if (m_pFileStream->IsEof())
return sal_False;
- m_nFilePos = m_pFileStream->Tell(); // Byte-Position in der Datei merken (am ZeilenANFANG)
+ m_nFilePos = m_pFileStream->Tell(); // save Byte-Position in the file (at start of line)
m_pFileStream->ReadByteStringLine(m_aCurrentLine,pConnection->getTextEncoding());
if (m_pFileStream->IsEof())
return sal_False;
@@ -322,3 +321,5 @@ sal_Bool OEvoabTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_In
return sal_True;
}
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */