LCOV - code coverage report
Current view: top level - basic/source/comp - scanner.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 303 0.0 %
Date: 2014-04-14 Functions: 0 11 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #include "basiccharclass.hxx"
      21             : #include "sbcomp.hxx"
      22             : 
      23             : #include <vcl/svapp.hxx>
      24             : 
      25           0 : SbiScanner::SbiScanner( const OUString& rBuf, StarBASIC* p ) : aBuf( rBuf )
      26             : {
      27           0 :     pBasic   = p;
      28           0 :     pLine    = NULL;
      29           0 :     nVal     = 0;
      30           0 :     eScanType = SbxVARIANT;
      31           0 :     nErrors  = 0;
      32           0 :     nBufPos  = 0;
      33           0 :     nCurCol1 = 0;
      34           0 :     nSavedCol1 = 0;
      35           0 :     nColLock = 0;
      36           0 :     nLine    = 0;
      37           0 :     nCol1    = 0;
      38           0 :     nCol2    = 0;
      39           0 :     nCol     = 0;
      40             :     bError   =
      41             :     bAbort   =
      42             :     bSpaces  =
      43             :     bNumber  =
      44             :     bSymbol  =
      45             :     bCompatible =
      46             :     bVBASupportOn =
      47             :     bInStatement =
      48           0 :     bPrevLineExtentsComment = false;
      49           0 :     bHash    = true;
      50           0 :     pSaveLine = NULL;
      51           0 : }
      52             : 
      53           0 : SbiScanner::~SbiScanner()
      54           0 : {}
      55             : 
      56           0 : void SbiScanner::LockColumn()
      57             : {
      58           0 :     if( !nColLock++ )
      59           0 :         nSavedCol1 = nCol1;
      60           0 : }
      61             : 
      62           0 : void SbiScanner::UnlockColumn()
      63             : {
      64           0 :     if( nColLock )
      65           0 :         nColLock--;
      66           0 : }
      67             : 
      68           0 : void SbiScanner::GenError( SbError code )
      69             : {
      70           0 :     if( GetSbData()->bBlockCompilerError )
      71             :     {
      72           0 :         bAbort = true;
      73           0 :         return;
      74             :     }
      75           0 :     if( !bError )
      76             :     {
      77           0 :         bool bRes = true;
      78             :         // report only one error per statement
      79           0 :         bError = true;
      80           0 :         if( pBasic )
      81             :         {
      82             :             // in case of EXPECTED or UNEXPECTED it always refers
      83             :             // to the last token, so take the Col1 over
      84           0 :             sal_Int32 nc = nColLock ? nSavedCol1 : nCol1;
      85           0 :             switch( code )
      86             :             {
      87             :                 case SbERR_EXPECTED:
      88             :                 case SbERR_UNEXPECTED:
      89             :                 case SbERR_SYMBOL_EXPECTED:
      90             :                 case SbERR_LABEL_EXPECTED:
      91           0 :                     nc = nCol1;
      92           0 :                     if( nc > nCol2 ) nCol2 = nc;
      93           0 :                     break;
      94             :             }
      95           0 :             bRes = pBasic->CError( code, aError, nLine, nc, nCol2 );
      96             :         }
      97           0 :         bAbort = bAbort || !bRes  || ( code == SbERR_NO_MEMORY || code == SbERR_PROG_TOO_LARGE );
      98             :     }
      99           0 :     nErrors++;
     100             : }
     101             : 
     102             : 
     103             : // used by SbiTokenizer::MayBeLabel() to detect a label
     104           0 : bool SbiScanner::DoesColonFollow()
     105             : {
     106           0 :     if(nCol < aLine.getLength() && aLine[nCol] == ':')
     107             :     {
     108           0 :         ++pLine; ++nCol;
     109           0 :         return true;
     110             :     }
     111             :     else
     112           0 :         return false;
     113             : }
     114             : 
     115             : // test for legal suffix
     116           0 : static SbxDataType GetSuffixType( sal_Unicode c )
     117             : {
     118           0 :     switch (c)
     119             :     {
     120             :     case '%':
     121           0 :         return SbxDataType(SbxINTEGER);
     122             :     case '&':
     123           0 :         return SbxDataType(SbxLONG);
     124             :     case '!':
     125           0 :         return SbxDataType(SbxSINGLE);
     126             :     case '#':
     127           0 :         return SbxDataType(SbxDOUBLE);
     128             :     case '@':
     129           0 :         return SbxDataType(SbxCURRENCY);
     130             :     case '$':
     131           0 :         return SbxDataType(SbxSTRING);
     132             :     default:
     133           0 :         return SbxDataType(SbxVARIANT);
     134             :     }
     135             : }
     136             : 
     137             : // reading the next symbol into the variables aSym, nVal and eType
     138             : // return value is sal_False at EOF or errors
     139             : #define BUF_SIZE 80
     140             : 
     141           0 : void SbiScanner::scanAlphanumeric()
     142             : {
     143           0 :     sal_Int32 n = nCol;
     144           0 :     while(nCol < aLine.getLength() && (theBasicCharClass::get().isAlphaNumeric(aLine[nCol], bCompatible) || aLine[nCol] == '_'))
     145             :     {
     146           0 :         ++pLine;
     147           0 :         ++nCol;
     148             :     }
     149           0 :     aSym = aLine.copy(n, nCol - n);
     150           0 : }
     151             : 
     152           0 : void SbiScanner::scanGoto()
     153             : {
     154           0 :     sal_Int32 n = nCol;
     155           0 :     while(n < aLine.getLength() && theBasicCharClass::get().isWhitespace(aLine[n]))
     156           0 :         ++n;
     157             : 
     158           0 :     if(n + 1 < aLine.getLength())
     159             :     {
     160           0 :         OUString aTemp = aLine.copy(n, 2);
     161           0 :         if(aTemp.equalsIgnoreAsciiCase("to"))
     162             :         {
     163           0 :             aSym = "goto";
     164           0 :             pLine += n + 2 - nCol;
     165           0 :             nCol = n + 2;
     166           0 :         }
     167             :     }
     168           0 : }
     169             : 
     170           0 : bool SbiScanner::readLine()
     171             : {
     172           0 :     if(nBufPos >= aBuf.getLength())
     173           0 :         return false;
     174             : 
     175           0 :     sal_Int32 n = nBufPos;
     176           0 :     sal_Int32 nLen = aBuf.getLength();
     177             : 
     178           0 :     while(n < nLen && aBuf[n] != '\r' && aBuf[n] != '\n')
     179           0 :         ++n;
     180             : 
     181             :     // Trim trailing whitespace
     182           0 :     sal_Int32 nEnd = n;
     183           0 :     while(nBufPos < nEnd && theBasicCharClass::get().isWhitespace(aBuf[nEnd - 1]))
     184           0 :         --nEnd;
     185             : 
     186           0 :     aLine = aBuf.copy(nBufPos, nEnd - nBufPos);
     187             : 
     188             :     // Fast-forward past the line ending
     189           0 :     if(n + 1 < nLen && aBuf[n] == '\r' && aBuf[n + 1] == '\n')
     190           0 :         n += 2;
     191           0 :     else if(n < nLen)
     192           0 :         ++n;
     193             : 
     194           0 :     nBufPos = n;
     195           0 :     pLine = aLine.getStr();
     196             : 
     197           0 :     ++nLine;
     198           0 :     nCol = nCol1 = nCol2 = 0;
     199           0 :     nColLock = 0;
     200             : 
     201           0 :     return true;
     202             : }
     203             : 
     204           0 : bool SbiScanner::NextSym()
     205             : {
     206             :     // memorize for the EOLN-case
     207           0 :     sal_Int32 nOldLine = nLine;
     208           0 :     sal_Int32 nOldCol1 = nCol1;
     209           0 :     sal_Int32 nOldCol2 = nCol2;
     210           0 :     sal_Unicode buf[ BUF_SIZE ], *p = buf;
     211             : 
     212           0 :     eScanType = SbxVARIANT;
     213           0 :     aSym = "";
     214           0 :     bHash = bSymbol = bNumber = bSpaces = false;
     215             : 
     216             :     // read in line?
     217           0 :     if( !pLine )
     218             :     {
     219           0 :         if(!readLine())
     220           0 :             return false;
     221             : 
     222           0 :         nOldLine = nLine;
     223           0 :         nOldCol1 = nOldCol2 = 0;
     224             :     }
     225             : 
     226           0 :     if(nCol < aLine.getLength() && theBasicCharClass::get().isWhitespace(aLine[nCol]))
     227             :     {
     228           0 :         bSpaces = true;
     229           0 :         while(nCol < aLine.getLength() && theBasicCharClass::get().isWhitespace(aLine[nCol]))
     230           0 :             ++pLine, ++nCol;
     231             :     }
     232             : 
     233           0 :     nCol1 = nCol;
     234             : 
     235             :     // only blank line?
     236           0 :     if(nCol >= aLine.getLength())
     237           0 :         goto eoln;
     238             : 
     239           0 :     if( bPrevLineExtentsComment )
     240           0 :         goto PrevLineCommentLbl;
     241             : 
     242           0 :     if(nCol < aLine.getLength() && aLine[nCol] == '#')
     243             :     {
     244           0 :         ++pLine;
     245           0 :         ++nCol;
     246           0 :         bHash = true;
     247             :     }
     248             : 
     249             :     // copy character if symbol
     250           0 :     if(nCol < aLine.getLength() && (theBasicCharClass::get().isAlpha(aLine[nCol], bCompatible) || aLine[nCol] == '_'))
     251             :     {
     252             :         // if there's nothing behind '_' , it's the end of a line!
     253           0 :         if(nCol + 1 == aLine.getLength() && aLine[nCol] == '_')
     254             :         {
     255             :             // Note that nCol is not incremented here...
     256           0 :             ++pLine;
     257           0 :             goto eoln;
     258             :         }
     259             : 
     260           0 :         bSymbol = true;
     261             : 
     262           0 :         scanAlphanumeric();
     263             : 
     264             :         // Special handling for "go to"
     265           0 :         if(nCol < aLine.getLength() && bCompatible && aSym.equalsIgnoreAsciiCase("go"))
     266           0 :             scanGoto();
     267             : 
     268             :         // replace closing '_' by space when end of line is following
     269             :         // (wrong line continuation otherwise)
     270           0 :         if(nCol == aLine.getLength() && aLine[nCol - 1] == '_' )
     271             :         {
     272             :             // We are going to modify a potentially shared string, so force
     273             :             // a copy, so that aSym is not modified by the following operation
     274           0 :             OUString aSymCopy( aSym.getStr(), aSym.getLength() );
     275           0 :             aSym = aSymCopy;
     276             : 
     277             :             // HACK: modifying a potentially shared string here!
     278           0 :             *((sal_Unicode*)(pLine-1)) = ' ';
     279             :         }
     280             : 
     281             :         // type recognition?
     282             :         // don't test the exclamation mark
     283             :         // if there's a symbol behind it
     284           0 :         else if((nCol >= aLine.getLength() || aLine[nCol] != '!') ||
     285           0 :                 (nCol + 1 >= aLine.getLength() || !theBasicCharClass::get().isAlpha(aLine[nCol + 1], bCompatible)))
     286             :         {
     287           0 :             if(nCol < aLine.getLength())
     288             :             {
     289           0 :                 SbxDataType t(GetSuffixType(aLine[nCol]));
     290           0 :                 if( t != SbxVARIANT )
     291             :                 {
     292           0 :                     eScanType = t;
     293           0 :                     ++pLine;
     294           0 :                     ++nCol;
     295             :                 }
     296             :             }
     297             :         }
     298             :     }
     299             : 
     300             :     // read in and convert if number
     301           0 :     else if((nCol < aLine.getLength() && theBasicCharClass::get().isDigit(aLine[nCol] & 0xFF)) ||
     302           0 :             (nCol + 1 < aLine.getLength() && aLine[nCol] == '.' && theBasicCharClass::get().isDigit(aLine[nCol + 1] & 0xFF)))
     303             :     {
     304           0 :         short exp = 0;
     305           0 :         short dec = 0;
     306           0 :         eScanType = SbxDOUBLE;
     307           0 :         bool bScanError = false;
     308           0 :         bool bBufOverflow = false;
     309             :         // All this because of 'D' or 'd' floating point type, sigh..
     310           0 :         while(!bScanError && nCol < aLine.getLength() && strchr("0123456789.DEde", aLine[nCol]))
     311             :         {
     312             :             // from 4.1.1996: buffer full? -> go on scanning empty
     313           0 :             if( (p-buf) == (BUF_SIZE-1) )
     314             :             {
     315           0 :                 bBufOverflow = true;
     316           0 :                 ++pLine, ++nCol;
     317           0 :                 continue;
     318             :             }
     319             :             // point or exponent?
     320           0 :             if(aLine[nCol] == '.')
     321             :             {
     322           0 :                 if( ++dec > 1 )
     323           0 :                     bScanError = true;
     324             :                 else
     325           0 :                     *p++ = '.';
     326             :             }
     327           0 :             else if(strchr("DdEe", aLine[nCol]))
     328             :             {
     329           0 :                 if (++exp > 1)
     330           0 :                     bScanError = true;
     331             :                 else
     332             :                 {
     333           0 :                     *p++ = 'E';
     334           0 :                     if (nCol + 1 < aLine.getLength() && (aLine[nCol+1] == '+' || aLine[nCol+1] == '-'))
     335             :                     {
     336           0 :                         ++pLine, ++nCol;
     337           0 :                         if( (p-buf) == (BUF_SIZE-1) )
     338             :                         {
     339           0 :                             bBufOverflow = true;
     340           0 :                             continue;
     341             :                         }
     342           0 :                         *p++ = aLine[nCol];
     343             :                     }
     344             :                 }
     345             :             }
     346             :             else
     347             :             {
     348           0 :                 *p++ = aLine[nCol];
     349             :             }
     350           0 :             ++pLine, ++nCol;
     351             :         }
     352           0 :         *p = 0;
     353           0 :         aSym = p; bNumber = true;
     354             : 
     355             :         // For bad characters, scan and parse errors generate only one error.
     356           0 :         SbError nError = 0;
     357           0 :         if (bScanError)
     358             :         {
     359           0 :             --pLine, --nCol;
     360           0 :             aError = OUString( aLine[nCol]);
     361           0 :             nError = SbERR_BAD_CHAR_IN_NUMBER;
     362             :         }
     363             : 
     364           0 :         rtl_math_ConversionStatus eStatus = rtl_math_ConversionStatus_Ok;
     365           0 :         const sal_Unicode* pParseEnd = buf;
     366           0 :         nVal = rtl_math_uStringToDouble( buf, buf+(p-buf), '.', ',', &eStatus, &pParseEnd );
     367           0 :         if (pParseEnd != buf+(p-buf))
     368             :         {
     369             :             // e.g. "12e" or "12e+", or with bScanError "12d"+"E".
     370           0 :             sal_Int32 nChars = buf+(p-buf) - pParseEnd;
     371           0 :             pLine -= nChars;
     372           0 :             nCol -= nChars;
     373             :             // For bScanError, pLine and nCol were already decremented, just
     374             :             // add that character to the parse end.
     375           0 :             if (bScanError)
     376           0 :                 ++nChars;
     377             :             // Copy error position from original string, not the buffer
     378             :             // replacement where "12dE" => "12EE".
     379           0 :             aError = aLine.copy( nCol, nChars);
     380           0 :             nError = SbERR_BAD_CHAR_IN_NUMBER;
     381             :         }
     382           0 :         else if (eStatus != rtl_math_ConversionStatus_Ok)
     383             :         {
     384             :             // Keep the scan error and character at position, if any.
     385           0 :             if (!nError)
     386           0 :                 nError = SbERR_MATH_OVERFLOW;
     387             :         }
     388             : 
     389           0 :         if (nError)
     390           0 :             GenError( nError );
     391             : 
     392           0 :         if( !dec && !exp )
     393             :         {
     394           0 :             if( nVal >= SbxMININT && nVal <= SbxMAXINT )
     395           0 :                 eScanType = SbxINTEGER;
     396           0 :             else if( nVal >= SbxMINLNG && nVal <= SbxMAXLNG )
     397           0 :                     eScanType = SbxLONG;
     398             :         }
     399             : 
     400           0 :         if( bBufOverflow )
     401           0 :             GenError( SbERR_MATH_OVERFLOW );
     402             : 
     403             :         // type recognition?
     404           0 :         if( nCol < aLine.getLength() )
     405             :         {
     406           0 :             SbxDataType t(GetSuffixType(aLine[nCol]));
     407           0 :             if( t != SbxVARIANT )
     408             :             {
     409           0 :                 eScanType = t;
     410           0 :                 ++pLine;
     411           0 :                 ++nCol;
     412             :             }
     413             :        }
     414             :     }
     415             : 
     416             :     // Hex/octal number? Read in and convert:
     417           0 :     else if(nCol < aLine.getLength() && aLine[nCol] == '&')
     418             :     {
     419           0 :         ++pLine; ++nCol;
     420           0 :         sal_Unicode cmp1[] = { '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F', 0 };
     421           0 :         sal_Unicode cmp2[] = { '0', '1', '2', '3', '4', '5', '6', '7', 0 };
     422           0 :         sal_Unicode *cmp = cmp1;
     423           0 :         sal_Unicode base = 16;
     424           0 :         sal_Unicode ndig = 8;
     425           0 :         sal_Unicode xch  = aLine[nCol] & 0xFF;
     426           0 :         ++pLine; ++nCol;
     427           0 :         switch( toupper( xch ) )
     428             :         {
     429             :             case 'O':
     430           0 :                 cmp = cmp2; base = 8; ndig = 11; break;
     431             :             case 'H':
     432           0 :                 break;
     433             :             default :
     434             :                 // treated as an operator
     435           0 :                 --pLine; --nCol; nCol1 = nCol-1;
     436           0 :                 aSym = "&";
     437           0 :                 return true;
     438             :         }
     439           0 :         bNumber = true;
     440             :         // Hex literals are signed Integers ( as defined by basic
     441             :         // e.g. -2,147,483,648 through 2,147,483,647 (signed)
     442           0 :         sal_Int32 l = 0;
     443             :         int i;
     444           0 :         bool bBufOverflow = false;
     445           0 :         while(nCol < aLine.getLength() &&  theBasicCharClass::get().isAlphaNumeric(aLine[nCol] & 0xFF, bCompatible))
     446             :         {
     447             :             sal_Unicode ch = sal::static_int_cast< sal_Unicode >(
     448           0 :                 toupper(aLine[nCol] & 0xFF));
     449           0 :             ++pLine; ++nCol;
     450             :             // from 4.1.1996: buffer full, go on scanning empty
     451           0 :             if( (p-buf) == (BUF_SIZE-1) )
     452           0 :                 bBufOverflow = true;
     453           0 :             else if( OUString( cmp ).indexOf( ch ) != -1 )
     454           0 :                 *p++ = ch;
     455             :             else
     456             :             {
     457           0 :                 aError = OUString(ch);
     458           0 :                 GenError( SbERR_BAD_CHAR_IN_NUMBER );
     459             :             }
     460             :         }
     461           0 :         *p = 0;
     462           0 :         for( p = buf; *p; ++p )
     463             :         {
     464           0 :             i = (*p & 0xFF) - '0';
     465           0 :             if( i > 9 ) i -= 7;
     466           0 :             l = ( l * base ) + i;
     467           0 :             if( !ndig-- )
     468             :             {
     469           0 :                 GenError( SbERR_MATH_OVERFLOW ); break;
     470             :             }
     471             :         }
     472           0 :         if(nCol < aLine.getLength() && aLine[nCol] == '&') ++pLine, ++nCol;
     473           0 :         nVal = (double) l;
     474           0 :         eScanType = ( l >= SbxMININT && l <= SbxMAXINT ) ? SbxINTEGER : SbxLONG;
     475           0 :         if( bBufOverflow )
     476           0 :             GenError( SbERR_MATH_OVERFLOW );
     477             :     }
     478             : 
     479             :     // Strings:
     480           0 :     else if( *pLine == '"' || *pLine == '[' )
     481             :     {
     482           0 :         sal_Unicode cSep = *pLine;
     483           0 :         if( cSep == '[' )
     484           0 :             bSymbol = true, cSep = ']';
     485           0 :         sal_Int32 n = nCol + 1;
     486           0 :         while( *pLine )
     487             :         {
     488           0 :             do pLine++, nCol++;
     489           0 :             while( *pLine && ( *pLine != cSep ) );
     490           0 :             if( *pLine == cSep )
     491             :             {
     492           0 :                 pLine++; nCol++;
     493           0 :                 if( *pLine != cSep || cSep == ']' ) break;
     494           0 :             } else aError = OUString(cSep), GenError( SbERR_EXPECTED );
     495             :         }
     496             :         // If VBA Interop then doen't eat the [] chars
     497           0 :         if ( cSep == ']' && bVBASupportOn )
     498           0 :             aSym = aLine.copy( n - 1, nCol - n  + 1);
     499             :         else
     500           0 :             aSym = aLine.copy( n, nCol - n - 1 );
     501             :         // get out duplicate string delimiters
     502           0 :         OUStringBuffer aSymBuf;
     503           0 :         for ( sal_Int32 i = 0, len = aSym.getLength(); i < len; ++i )
     504             :         {
     505           0 :             aSymBuf.append( aSym[i] );
     506           0 :             if ( aSym[i] == cSep && ( i+1 < len ) && aSym[i+1] == cSep )
     507           0 :                 ++i;
     508             :         }
     509           0 :         aSym = aSymBuf.makeStringAndClear();
     510           0 :         if( cSep != ']' )
     511           0 :             eScanType = ( cSep == '#' ) ? SbxDATE : SbxSTRING;
     512             :     }
     513             :     // invalid characters:
     514           0 :     else if( ( *pLine & 0xFF ) >= 0x7F )
     515             :     {
     516           0 :         GenError( SbERR_SYNTAX ); pLine++; nCol++;
     517             :     }
     518             :     // other groups:
     519             :     else
     520             :     {
     521           0 :         sal_Int32 n = 1;
     522           0 :         switch( *pLine++ )
     523             :         {
     524           0 :             case '<': if( *pLine == '>' || *pLine == '=' ) n = 2; break;
     525           0 :             case '>': if( *pLine == '=' ) n = 2; break;
     526           0 :             case ':': if( *pLine == '=' ) n = 2; break;
     527             :         }
     528           0 :         aSym = aLine.copy( nCol, n );
     529           0 :         pLine += n-1; nCol = nCol + n;
     530             :     }
     531             : 
     532           0 :     nCol2 = nCol-1;
     533             : 
     534             : PrevLineCommentLbl:
     535             : 
     536           0 :     if( bPrevLineExtentsComment || (eScanType != SbxSTRING &&
     537           0 :                                     ( aSym.startsWith("'") || aSym.equalsIgnoreAsciiCase( "REM" ) ) ) )
     538             :     {
     539           0 :         bPrevLineExtentsComment = false;
     540           0 :         aSym = "REM";
     541           0 :         sal_Int32 nLen = rtl_ustr_getLength(pLine);
     542           0 :         if( bCompatible && pLine[ nLen - 1 ] == '_' && pLine[ nLen - 2 ] == ' ' )
     543           0 :             bPrevLineExtentsComment = true;
     544           0 :         nCol2 = nCol2 + nLen;
     545           0 :         pLine = NULL;
     546             :     }
     547           0 :     return true;
     548             : 
     549             : 
     550             : eoln:
     551           0 :     if( nCol && *--pLine == '_' )
     552             :     {
     553           0 :         pLine = NULL;
     554           0 :         bool bRes = NextSym();
     555           0 :         if( bVBASupportOn && aSym[0] == '.' )
     556             :         {
     557             :             // object _
     558             :             //    .Method
     559             :             // ^^^  <- spaces is legal in MSO VBA
     560             :             OSL_TRACE("*** resetting bSpaces***");
     561           0 :             bSpaces = false;
     562             :         }
     563           0 :         return bRes;
     564             :     }
     565             :     else
     566             :     {
     567           0 :         pLine = NULL;
     568           0 :         nLine = nOldLine;
     569           0 :         nCol1 = nOldCol1;
     570           0 :         nCol2 = nOldCol2;
     571           0 :         aSym = "\n";
     572           0 :         nColLock = 0;
     573           0 :         return true;
     574             :     }
     575             : }
     576             : 
     577             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10