LibreOffice Module basic (master) 1
scanner.cxx
Go to the documentation of this file.
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 <scanner.hxx>
22#include <sbintern.hxx>
23#include <runtime.hxx>
24
25#include <basic/sberrors.hxx>
26#include <i18nlangtag/lang.h>
27#include <svl/numformat.hxx>
28#include <svl/zforlist.hxx>
29#include <rtl/character.hxx>
30#include <o3tl/string_view.hxx>
31#include <utility>
32
34 : aBuf(std::move(_aBuf))
35 , nLineIdx(-1)
36 , nSaveLineIdx(-1)
37 , pBasic(p)
38 , eScanType(SbxVARIANT)
39 , nVal(0)
40 , nSavedCol1(0)
41 , nCol(0)
42 , nErrors(0)
43 , nColLock(0)
44 , nBufPos(0)
45 , nLine(0)
46 , nCol1(0)
47 , nCol2(0)
48 , bSymbol(false)
49 , bNumber(false)
50 , bSpaces(false)
51 , bAbort(false)
52 , bHash(true)
53 , bError(false)
54 , bCompatible(false)
55 , bVBASupportOn(false)
56 , bPrevLineExtentsComment(false)
57 , bClosingUnderscore(false)
58 , bLineEndsWithWhitespace(false)
59 , bInStatement(false)
60{
61}
62
64{
65 if( !nColLock++ )
67}
68
70{
71 if( nColLock )
72 nColLock--;
73}
74
76{
77 if( GetSbData()->bBlockCompilerError )
78 {
79 bAbort = true;
80 return;
81 }
82 if( !bError )
83 {
84 bool bRes = true;
85 // report only one error per statement
86 bError = true;
87 if( pBasic )
88 {
89 // in case of EXPECTED or UNEXPECTED it always refers
90 // to the last token, so take the Col1 over
91 sal_Int32 nc = nColLock ? nSavedCol1 : nCol1;
92 if ( code.anyOf(
97 {
98 nc = nCol1;
99 if( nc > nCol2 ) nCol2 = nc;
100 }
101 bRes = pBasic->CError( code, aError, nLine, nc, nCol2 );
102 }
104 }
105 nErrors++;
106}
107
108
109// used by SbiTokenizer::MayBeLabel() to detect a label
111{
112 if(nCol < aLine.getLength() && aLine[nCol] == ':')
113 {
114 ++nLineIdx; ++nCol;
115 return true;
116 }
117 else
118 return false;
119}
120
121// test for legal suffix
123{
124 switch (c)
125 {
126 case '%':
127 return SbxINTEGER;
128 case '&':
129 return SbxLONG;
130 case '!':
131 return SbxSINGLE;
132 case '#':
133 return SbxDOUBLE;
134 case '@':
135 return SbxCURRENCY;
136 case '$':
137 return SbxSTRING;
138 default:
139 return SbxVARIANT;
140 }
141}
142
143// reading the next symbol into the variables aSym, nVal and eType
144// return value is sal_False at EOF or errors
145#define BUF_SIZE 80
146
148{
149 sal_Int32 n = nCol;
150 while(nCol < aLine.getLength() && (BasicCharClass::isAlphaNumeric(aLine[nCol], bCompatible) || aLine[nCol] == '_'))
151 {
152 ++nLineIdx;
153 ++nCol;
154 }
155 aSym = aLine.copy(n, nCol - n);
156}
157
159{
160 sal_Int32 n = nCol;
161 while(n < aLine.getLength() && BasicCharClass::isWhitespace(aLine[n]))
162 ++n;
163
164 if(n + 1 < aLine.getLength())
165 {
166 std::u16string_view aTemp = aLine.subView(n, 2);
167 if(o3tl::equalsIgnoreAsciiCase(aTemp, u"to"))
168 {
169 aSym = "goto";
170 nLineIdx += n + 2 - nCol;
171 nCol = n + 2;
172 }
173 }
174}
175
177{
178 if(nBufPos >= aBuf.getLength())
179 return false;
180
181 sal_Int32 n = nBufPos;
182 sal_Int32 nLen = aBuf.getLength();
183
184 while(n < nLen && aBuf[n] != '\r' && aBuf[n] != '\n')
185 ++n;
186
187 // Trim trailing whitespace
188 sal_Int32 nEnd = n;
189 while(nBufPos < nEnd && BasicCharClass::isWhitespace(aBuf[nEnd - 1]))
190 --nEnd;
191
192 // tdf#149402 - check if line ends with a whitespace
193 bLineEndsWithWhitespace = (n > nEnd);
194 aLine = aBuf.copy(nBufPos, nEnd - nBufPos);
195
196 // Fast-forward past the line ending
197 if(n + 1 < nLen && aBuf[n] == '\r' && aBuf[n + 1] == '\n')
198 n += 2;
199 else if(n < nLen)
200 ++n;
201
202 nBufPos = n;
203 nLineIdx = 0;
204
205 ++nLine;
206 nCol = nCol1 = nCol2 = 0;
207 nColLock = 0;
208
209 return true;
210}
211
213{
214 // memorize for the EOLN-case
215 sal_Int32 nOldLine = nLine;
216 sal_Int32 nOldCol1 = nCol1;
217 sal_Int32 nOldCol2 = nCol2;
218 sal_Unicode buf[ BUF_SIZE ], *p = buf;
219
221 aSym.clear();
222 bHash = bSymbol = bNumber = bSpaces = false;
223 bool bCompilerDirective = false;
224
225 // read in line?
226 if (nLineIdx == -1)
227 {
228 if(!readLine())
229 return false;
230
231 nOldLine = nLine;
232 nOldCol1 = nOldCol2 = 0;
233 }
234
235 const sal_Int32 nLineIdxScanStart = nLineIdx;
236
237 if(nCol < aLine.getLength() && BasicCharClass::isWhitespace(aLine[nCol]))
238 {
239 bSpaces = true;
240 while(nCol < aLine.getLength() && BasicCharClass::isWhitespace(aLine[nCol]))
241 {
242 ++nLineIdx;
243 ++nCol;
244 }
245 }
246
247 nCol1 = nCol;
248
249 // only blank line?
250 if(nCol >= aLine.getLength())
251 goto eoln;
252
254 goto PrevLineCommentLbl;
255
256 if(nCol < aLine.getLength() && aLine[nCol] == '#')
257 {
258 sal_Int32 nLineTempIdx = nLineIdx;
259 do
260 {
261 nLineTempIdx++;
262 } while (nLineTempIdx < aLine.getLength() && !BasicCharClass::isWhitespace(aLine[nLineTempIdx])
263 && aLine[nLineTempIdx] != '#' && aLine[nLineTempIdx] != ',');
264 // leave it if it is a date literal - it will be handled later
265 if (nLineTempIdx >= aLine.getLength() || aLine[nLineTempIdx] != '#')
266 {
267 ++nLineIdx;
268 ++nCol;
269 //ignore compiler directives (# is first non-space character)
270 if (nOldCol2 == 0)
271 bCompilerDirective = true;
272 else
273 bHash = true;
274 }
275 }
276
277 // copy character if symbol
278 if(nCol < aLine.getLength() && (BasicCharClass::isAlpha(aLine[nCol], bCompatible) || aLine[nCol] == '_'))
279 {
280 // if there's nothing behind '_' , it's the end of a line!
281 if(nCol + 1 == aLine.getLength() && aLine[nCol] == '_')
282 {
283 // Note that nCol is not incremented here...
284 ++nLineIdx;
285 goto eoln;
286 }
287
288 bSymbol = true;
289
291
292 // Special handling for "go to"
293 if(nCol < aLine.getLength() && bCompatible && aSym.equalsIgnoreAsciiCase("go"))
294 scanGoto();
295
296 // tdf#125637 - check for closing underscore
297 if (nCol == aLine.getLength() && aLine[nCol - 1] == '_')
298 {
299 bClosingUnderscore = true;
300 }
301 // type recognition?
302 // don't test the exclamation mark
303 // if there's a symbol behind it
304 else if((nCol >= aLine.getLength() || aLine[nCol] != '!') ||
305 (nCol + 1 >= aLine.getLength() || !BasicCharClass::isAlpha(aLine[nCol + 1], bCompatible)))
306 {
307 if(nCol < aLine.getLength())
308 {
310 if( t != SbxVARIANT )
311 {
312 eScanType = t;
313 ++nLineIdx;
314 ++nCol;
315 }
316 }
317 }
318 }
319
320 // read in and convert if number
321 else if((nCol < aLine.getLength() && rtl::isAsciiDigit(aLine[nCol])) ||
322 (nCol + 1 < aLine.getLength() && aLine[nCol] == '.' && rtl::isAsciiDigit(aLine[nCol + 1])))
323 {
324 short exp = 0;
325 short dec = 0;
327 bool bScanError = false;
328 bool bBufOverflow = false;
329 // All this because of 'D' or 'd' floating point type, sigh...
330 while(!bScanError && nCol < aLine.getLength() && strchr("0123456789.DEde", aLine[nCol]))
331 {
332 // from 4.1.1996: buffer full? -> go on scanning empty
333 if( (p-buf) == (BUF_SIZE-1) )
334 {
335 bBufOverflow = true;
336 ++nLineIdx;
337 ++nCol;
338 continue;
339 }
340 // point or exponent?
341 if(aLine[nCol] == '.')
342 {
343 if( ++dec > 1 )
344 bScanError = true;
345 else
346 *p++ = '.';
347 }
348 else if(strchr("DdEe", aLine[nCol]))
349 {
350 if (++exp > 1)
351 bScanError = true;
352 else
353 {
354 *p++ = 'E';
355 if (nCol + 1 < aLine.getLength() && (aLine[nCol+1] == '+' || aLine[nCol+1] == '-'))
356 {
357 ++nLineIdx;
358 ++nCol;
359 if( (p-buf) == (BUF_SIZE-1) )
360 {
361 bBufOverflow = true;
362 continue;
363 }
364 *p++ = aLine[nCol];
365 }
366 }
367 }
368 else
369 {
370 *p++ = aLine[nCol];
371 }
372 ++nLineIdx;
373 ++nCol;
374 }
375 *p = 0;
376 aSym = p; bNumber = true;
377
378 // For bad characters, scan and parse errors generate only one error.
379 ErrCode nError = ERRCODE_NONE;
380 if (bScanError)
381 {
382 --nLineIdx;
383 --nCol;
384 aError = OUString( aLine[nCol]);
386 }
387
388 rtl_math_ConversionStatus eStatus = rtl_math_ConversionStatus_Ok;
389 const sal_Unicode* pParseEnd = buf;
390 nVal = rtl_math_uStringToDouble( buf, buf+(p-buf), '.', ',', &eStatus, &pParseEnd );
391 if (pParseEnd != buf+(p-buf))
392 {
393 // e.g. "12e" or "12e+", or with bScanError "12d"+"E".
394 sal_Int32 nChars = buf+(p-buf) - pParseEnd;
395 nLineIdx -= nChars;
396 nCol -= nChars;
397 // For bScanError, nLineIdx and nCol were already decremented, just
398 // add that character to the parse end.
399 if (bScanError)
400 ++nChars;
401 // Copy error position from original string, not the buffer
402 // replacement where "12dE" => "12EE".
403 aError = aLine.copy( nCol, nChars);
405 }
406 else if (eStatus != rtl_math_ConversionStatus_Ok)
407 {
408 // Keep the scan error and character at position, if any.
409 if (!nError)
411 }
412
413 if (nError)
414 GenError( nError );
415
416 if( !dec && !exp )
417 {
418 if( nVal >= SbxMININT && nVal <= SbxMAXINT )
420 else if( nVal >= SbxMINLNG && nVal <= SbxMAXLNG )
422 }
423
424 if( bBufOverflow )
426
427 // type recognition?
428 if( nCol < aLine.getLength() )
429 {
431 if( t != SbxVARIANT )
432 {
433 eScanType = t;
434 ++nLineIdx;
435 ++nCol;
436 }
437 // tdf#130476 - don't allow String trailing data type character with numbers
438 if ( t == SbxSTRING )
439 {
441 }
442 }
443 }
444
445 // Hex/octal number? Read in and convert:
446 else if(aLine.getLength() - nCol > 1 && aLine[nCol] == '&')
447 {
448 ++nLineIdx; ++nCol;
449 sal_Unicode base = 16;
450 sal_Unicode xch = aLine[nCol];
451 ++nLineIdx; ++nCol;
452 switch( rtl::toAsciiUpperCase( xch ) )
453 {
454 case 'O':
455 base = 8;
456 break;
457 case 'H':
458 break;
459 default :
460 // treated as an operator
461 --nLineIdx; --nCol; nCol1 = nCol-1;
462 aSym = "&";
463 return true;
464 }
465 bNumber = true;
466 // Hex literals are signed Integers ( as defined by basic
467 // e.g. -2,147,483,648 through 2,147,483,647 (signed)
468 sal_uInt64 lu = 0;
469 bool bOverflow = false;
470 while(nCol < aLine.getLength() && BasicCharClass::isAlphaNumeric(aLine[nCol], false))
471 {
472 sal_Unicode ch = rtl::toAsciiUpperCase(aLine[nCol]);
473 ++nLineIdx; ++nCol;
474 if( ((base == 16 ) && rtl::isAsciiHexDigit( ch ) ) ||
475 ((base == 8) && rtl::isAsciiOctalDigit( ch )))
476 {
477 int i = ch - '0';
478 if( i > 9 ) i -= 7;
479 lu = ( lu * base ) + i;
480 if( lu > SAL_MAX_UINT32 )
481 {
482 bOverflow = true;
483 }
484 }
485 else
486 {
487 aError = OUString(ch);
489 }
490 }
491
492 // tdf#130476 - take into account trailing data type characters
493 if( nCol < aLine.getLength() )
494 {
496 if( t != SbxVARIANT )
497 {
498 eScanType = t;
499 ++nLineIdx;
500 ++nCol;
501 }
502 // tdf#130476 - don't allow String trailing data type character with numbers
503 if ( t == SbxSTRING )
504 {
506 }
507 }
508
509 // tdf#130476 - take into account trailing data type characters
510 switch ( eScanType )
511 {
512 case SbxINTEGER:
513 nVal = static_cast<double>( static_cast<sal_Int16>(lu) );
514 if ( lu > SbxMAXUINT )
515 {
516 bOverflow = true;
517 }
518 break;
519 case SbxLONG: nVal = static_cast<double>( static_cast<sal_Int32>(lu) ); break;
520 case SbxVARIANT:
521 {
522 // tdf#62326 - If the value of the hex string without explicit type character lies within
523 // the range of 0x8000 (SbxMAXINT + 1) and 0xFFFF (SbxMAXUINT) inclusive, cast the value
524 // to 16 bit in order to get signed integers, e.g., SbxMININT through SbxMAXINT
525 sal_Int32 ls = (lu > SbxMAXINT && lu <= SbxMAXUINT) ? static_cast<sal_Int16>(lu) : static_cast<sal_Int32>(lu);
526 eScanType = ( ls >= SbxMININT && ls <= SbxMAXINT ) ? SbxINTEGER : SbxLONG;
527 nVal = static_cast<double>(ls);
528 break;
529 }
530 default:
531 nVal = static_cast<double>(lu);
532 break;
533 }
534 if( bOverflow )
536 }
537
538 // Strings:
539 else if (nLineIdx < aLine.getLength() && (aLine[nLineIdx] == '"' || aLine[nLineIdx] == '['))
540 {
541 sal_Unicode cSep = aLine[nLineIdx];
542 if( cSep == '[' )
543 {
544 bSymbol = true;
545 cSep = ']';
546 }
547 sal_Int32 n = nCol + 1;
548 while (nLineIdx < aLine.getLength())
549 {
550 do
551 {
552 nLineIdx++;
553 nCol++;
554 }
555 while (nLineIdx < aLine.getLength() && (aLine[nLineIdx] != cSep));
556 if (nLineIdx < aLine.getLength() && aLine[nLineIdx] == cSep)
557 {
558 nLineIdx++; nCol++;
559 if (nLineIdx >= aLine.getLength() || aLine[nLineIdx] != cSep || cSep == ']')
560 {
561 // If VBA Interop then doesn't eat the [] chars
562 if ( cSep == ']' && bVBASupportOn )
563 aSym = aLine.copy( n - 1, nCol - n + 1);
564 else
565 aSym = aLine.copy( n, nCol - n - 1 );
566 // get out duplicate string delimiters
567 OUStringBuffer aSymBuf(aSym.getLength());
568 for ( sal_Int32 i = 0, len = aSym.getLength(); i < len; ++i )
569 {
570 aSymBuf.append( aSym[i] );
571 if ( aSym[i] == cSep && ( i+1 < len ) && aSym[i+1] == cSep )
572 ++i;
573 }
574 aSym = aSymBuf.makeStringAndClear();
575 if( cSep != ']' )
577 break;
578 }
579 }
580 else
581 {
582 aError = OUString(cSep);
584 }
585 }
586 }
587
588 // Date:
589 else if (nLineIdx < aLine.getLength() && aLine[nLineIdx] == '#')
590 {
591 sal_Int32 n = nCol + 1;
592 do
593 {
594 nLineIdx++;
595 nCol++;
596 }
597 while (nLineIdx < aLine.getLength() && (aLine[nLineIdx] != '#'));
598 if (nLineIdx < aLine.getLength() && aLine[nLineIdx] == '#')
599 {
600 nLineIdx++; nCol++;
601 aSym = aLine.copy( n, nCol - n - 1 );
602
603 // parse date literal
604 std::shared_ptr<SvNumberFormatter> pFormatter;
605 if (GetSbData()->pInst)
606 {
607 pFormatter = GetSbData()->pInst->GetNumberFormatter();
608 }
609 else
610 {
611 sal_uInt32 nDummy;
612 pFormatter = SbiInstance::PrepareNumberFormatter( nDummy, nDummy, nDummy );
613 }
614 sal_uInt32 nIndex = pFormatter->GetStandardIndex( LANGUAGE_ENGLISH_US);
615 bool bSuccess = pFormatter->IsNumberFormat(aSym, nIndex, nVal);
616 if( bSuccess )
617 {
618 SvNumFormatType nType_ = pFormatter->GetType(nIndex);
619 if( !(nType_ & SvNumFormatType::DATE) )
620 bSuccess = false;
621 }
622
623 if (!bSuccess)
625
626 bNumber = true;
628 }
629 else
630 {
631 aError = OUString('#');
633 }
634 }
635 // invalid characters:
636 else if (nLineIdx < aLine.getLength() && aLine[nLineIdx] >= 0x7F)
637 {
639 }
640 // other groups:
641 else
642 {
643 sal_Int32 n = 1;
644 auto nChar = nLineIdx < aLine.getLength() ? aLine[nLineIdx] : 0;
645 ++nLineIdx;
646 if (nLineIdx < aLine.getLength())
647 {
648 switch (nChar)
649 {
650 case '<': if( aLine[nLineIdx] == '>' || aLine[nLineIdx] == '=' ) n = 2; break;
651 case '>': if( aLine[nLineIdx] == '=' ) n = 2; break;
652 case ':': if( aLine[nLineIdx] == '=' ) n = 2; break;
653 }
654 }
655 aSym = aLine.copy(nCol, std::min(n, aLine.getLength() - nCol));
656 nLineIdx += n-1; nCol = nCol + n;
657 }
658
659 nCol2 = nCol-1;
660
661PrevLineCommentLbl:
662
664 ( bCompilerDirective ||
665 aSym.startsWith("'") ||
666 aSym.equalsIgnoreAsciiCase( "REM" ) ) ) )
667 {
669 aSym = "REM";
670 sal_Int32 nLen = aLine.getLength() - nLineIdx;
671 // tdf#149402 - don't extend comment if line ends in a whitespace (BasicCharClass::isWhitespace)
672 if (bCompatible && !bLineEndsWithWhitespace && aLine[nLineIdx + nLen - 1] == '_'
673 && aLine[nLineIdx + nLen - 2] == ' ')
675 nCol2 = nCol2 + nLen;
676 nLineIdx = -1;
677 }
678
679 if (nLineIdx == nLineIdxScanStart)
680 {
682 return false;
683 }
684
685 return true;
686
687
688eoln:
689 if (nCol && aLine[--nLineIdx] == '_' && !bClosingUnderscore)
690 {
691 nLineIdx = -1;
692 bool bRes = NextSym();
693 if( aSym.startsWith(".") )
694 {
695 // object _
696 // .Method
697 // ^^^ <- spaces is legal in MSO VBA
698 bSpaces = false;
699 }
700 return bRes;
701 }
702 else
703 {
704 nLineIdx = -1;
705 nLine = nOldLine;
706 nCol1 = nOldCol1;
707 nCol2 = nOldCol2;
708 aSym = "\n";
709 nColLock = 0;
710 bClosingUnderscore = false;
711 // tdf#149157 - break multiline continuation in a comment after a new line
713 return true;
714 }
715}
716
717/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
XPropertyListType t
static std::shared_ptr< SvNumberFormatter > PrepareNumberFormatter(sal_uInt32 &rnStdDateIdx, sal_uInt32 &rnStdTimeIdx, sal_uInt32 &rnStdDateTimeIdx, LanguageType const *peFormatterLangType=nullptr, DateOrder const *peFormatterDateOrder=nullptr)
Definition: runtime.cxx:404
std::shared_ptr< SvNumberFormatter > const & GetNumberFormatter()
Definition: runtime.cxx:380
OUString aLine
Definition: scanner.hxx:35
OUString aError
Definition: scanner.hxx:46
void UnlockColumn()
Definition: scanner.cxx:69
sal_Int32 nErrors
Definition: scanner.hxx:51
bool bHash
Definition: scanner.hxx:60
bool bSpaces
Definition: scanner.hxx:58
OUString aBuf
Definition: scanner.hxx:34
bool bSymbol
Definition: scanner.hxx:56
StarBASIC * pBasic
Definition: scanner.hxx:39
bool bClosingUnderscore
Definition: scanner.hxx:65
bool bAbort
Definition: scanner.hxx:59
bool bVBASupportOn
Definition: scanner.hxx:63
bool DoesColonFollow()
Definition: scanner.cxx:110
double nVal
Definition: scanner.hxx:48
sal_Int32 nColLock
Definition: scanner.hxx:52
void scanGoto()
Definition: scanner.cxx:158
sal_Int32 nCol
Definition: scanner.hxx:50
sal_Int32 nSavedCol1
Definition: scanner.hxx:49
void scanAlphanumeric()
Definition: scanner.cxx:147
SbiScanner(OUString, StarBASIC *=nullptr)
Definition: scanner.cxx:33
sal_Int32 nBufPos
Definition: scanner.hxx:53
bool bError
Definition: scanner.hxx:61
OUString aSym
Definition: scanner.hxx:45
bool bPrevLineExtentsComment
Definition: scanner.hxx:64
sal_Int32 nCol2
Definition: scanner.hxx:55
bool bCompatible
Definition: scanner.hxx:62
SbxDataType eScanType
Definition: scanner.hxx:47
void GenError(ErrCode)
Definition: scanner.cxx:75
bool bLineEndsWithWhitespace
Definition: scanner.hxx:66
sal_Int32 nCol1
Definition: scanner.hxx:55
bool NextSym()
Definition: scanner.cxx:212
bool readLine()
Definition: scanner.cxx:176
void LockColumn()
Definition: scanner.cxx:63
bool bNumber
Definition: scanner.hxx:57
sal_Int32 nLine
Definition: scanner.hxx:54
sal_Int32 nLineIdx
Definition: scanner.hxx:37
bool CError(ErrCode, const OUString &, sal_Int32, sal_Int32, sal_Int32)
Definition: sb.cxx:1599
float u
#define ERRCODE_NONE
void const * base
sal_Int32 nIndex
void * p
sal_Int64 n
#define LANGUAGE_ENGLISH_US
aBuf
bool isAlpha(sal_Unicode c, bool bCompatible)
bool isWhitespace(sal_Unicode c)
bool isAlphaNumeric(sal_Unicode c, bool bCompatible)
int i
bool equalsIgnoreAsciiCase(std::u16string_view s1, std::u16string_view s2)
sal_Unicode code
#define ERRCODE_BASIC_EXPECTED
Definition: sberrors.hxx:125
#define ERRCODE_BASIC_PROG_TOO_LARGE
Definition: sberrors.hxx:151
#define ERRCODE_BASIC_BAD_CHAR_IN_NUMBER
Definition: sberrors.hxx:143
#define ERRCODE_BASIC_UNEXPECTED
Definition: sberrors.hxx:124
#define ERRCODE_BASIC_LABEL_EXPECTED
Definition: sberrors.hxx:128
#define ERRCODE_BASIC_MATH_OVERFLOW
Definition: sberrors.hxx:27
#define ERRCODE_BASIC_SYMBOL_EXPECTED
Definition: sberrors.hxx:126
#define ERRCODE_BASIC_SYNTAX
Definition: sberrors.hxx:25
#define ERRCODE_BASIC_CONVERSION
Definition: sberrors.hxx:30
#define ERRCODE_BASIC_NO_MEMORY
Definition: sberrors.hxx:57
SbiGlobals * GetSbData()
Definition: sbintern.cxx:26
constexpr auto SbxMAXLNG
Definition: sbxdef.hxx:190
constexpr sal_Int32 SbxMINLNG
Definition: sbxdef.hxx:191
constexpr auto SbxMAXINT
Definition: sbxdef.hxx:187
constexpr sal_uInt16 SbxMAXUINT
Definition: sbxdef.hxx:189
SbxDataType
Definition: sbxdef.hxx:37
@ SbxLONG
Definition: sbxdef.hxx:41
@ SbxCURRENCY
Definition: sbxdef.hxx:44
@ SbxVARIANT
Definition: sbxdef.hxx:51
@ SbxSINGLE
Definition: sbxdef.hxx:42
@ SbxSTRING
Definition: sbxdef.hxx:46
@ SbxINTEGER
Definition: sbxdef.hxx:40
@ SbxDOUBLE
Definition: sbxdef.hxx:43
constexpr auto SbxMININT
Definition: sbxdef.hxx:188
#define BUF_SIZE
Definition: scanner.cxx:145
static SbxDataType GetSuffixType(sal_Unicode c)
Definition: scanner.cxx:122
SbiInstance * pInst
Definition: sbintern.hxx:108
sal_uInt16 sal_Unicode
#define SAL_MAX_UINT32
SvNumFormatType