xref: /trunk/main/sc/inc/compiler.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef SC_COMPILER_HXX
29 #define SC_COMPILER_HXX
30 
31 #ifndef INCLUDED_STRING_H
32 #include <string.h>
33 #define INCLUDED_STRING_H
34 #endif
35 #include <tools/mempool.hxx>
36 #include "scdllapi.h"
37 #include "global.hxx"
38 #include "refdata.hxx"
39 #include "formula/token.hxx"
40 #include "formula/intruref.hxx"
41 #include "formula/grammar.hxx"
42 #include <unotools/charclass.hxx>
43 #include <rtl/ustrbuf.hxx>
44 #include <com/sun/star/sheet/ExternalLinkInfo.hpp>
45 #include <vector>
46 
47 #include <formula/FormulaCompiler.hxx>
48 
49 
50 #ifndef BOOST_SHARED_PTR_HPP_INCLUDED
51 #include <boost/shared_ptr.hpp>
52 #endif
53 
54 #ifndef INCLUDED_HASH_MAP
55 #include <hash_map>
56 #define INCLUDED_HASH_MAP
57 #endif
58 
59 //-----------------------------------------------
60 
61 // constants and data types also for external modules (ScInterpreter et al)
62 
63 #define MAXCODE      512    /* maximum number of tokens in formula */
64 #define MAXSTRLEN    1024   /* maximum length of input string of one symbol */
65 #define MAXJUMPCOUNT 32     /* maximum number of jumps (ocChose) */
66 
67 // flag values of CharTable
68 #define SC_COMPILER_C_ILLEGAL         0x00000000
69 #define SC_COMPILER_C_CHAR            0x00000001
70 #define SC_COMPILER_C_CHAR_BOOL       0x00000002
71 #define SC_COMPILER_C_CHAR_WORD       0x00000004
72 #define SC_COMPILER_C_CHAR_VALUE      0x00000008
73 #define SC_COMPILER_C_CHAR_STRING     0x00000010
74 #define SC_COMPILER_C_CHAR_DONTCARE   0x00000020
75 #define SC_COMPILER_C_BOOL            0x00000040
76 #define SC_COMPILER_C_WORD            0x00000080
77 #define SC_COMPILER_C_WORD_SEP        0x00000100
78 #define SC_COMPILER_C_VALUE           0x00000200
79 #define SC_COMPILER_C_VALUE_SEP       0x00000400
80 #define SC_COMPILER_C_VALUE_EXP       0x00000800
81 #define SC_COMPILER_C_VALUE_SIGN      0x00001000
82 #define SC_COMPILER_C_VALUE_VALUE     0x00002000
83 #define SC_COMPILER_C_STRING_SEP      0x00004000
84 #define SC_COMPILER_C_NAME_SEP        0x00008000  // there can be only one! '\''
85 #define SC_COMPILER_C_CHAR_IDENT      0x00010000  // identifier (built-in function) or reference start
86 #define SC_COMPILER_C_IDENT           0x00020000  // identifier or reference continuation
87 #define SC_COMPILER_C_ODF_LBRACKET    0x00040000  // ODF '[' reference bracket
88 #define SC_COMPILER_C_ODF_RBRACKET    0x00080000  // ODF ']' reference bracket
89 #define SC_COMPILER_C_ODF_LABEL_OP    0x00100000  // ODF '!!' automatic intersection of labels
90 #define SC_COMPILER_C_ODF_NAME_MARKER 0x00200000  // ODF '$$' marker that starts a defined (range) name
91 #define SC_COMPILER_C_CHAR_NAME       0x00400000  // start character of a defined name
92 #define SC_COMPILER_C_NAME            0x00800000  // continuation character of a defined name
93 
94 #define SC_COMPILER_FILE_TAB_SEP      '#'         // 'Doc'#Tab
95 
96 
97 class ScDocument;
98 class ScMatrix;
99 class ScRangeData;
100 class ScExternalRefManager;
101 class ScTokenArray;
102 
103 // constants and data types internal to compiler
104 
105 #if 0
106 /*
107     OpCode   eOp;           // OpCode
108     formula::StackVar eType;         // type of data
109     sal_uInt16   nRefCnt;       // reference count
110     sal_Bool     bRaw;          // not cloned yet and trimmed to real size
111  */
112 #endif
113 
114 #define SC_TOKEN_FIX_MEMBERS    \
115     OpCode   eOp;               \
116     formula::StackVar eType;    \
117     sal_uInt16   nRefCnt;           \
118     sal_Bool     bRaw;
119 
120 struct ScDoubleRawToken
121 {
122 private:
123     SC_TOKEN_FIX_MEMBERS
124 public:
125     union
126     {   // union only to assure alignment identical to ScRawToken
127         double      nValue;
128         struct {
129             sal_uInt8        cByte;
130             bool        bHasForceArray;
131         } sbyte;
132     };
133                 DECL_FIXEDMEMPOOL_NEWDEL( ScDoubleRawToken );
134 };
135 
136 struct ScRawToken
137 {
138     friend class ScCompiler;
139     // Friends that use a temporary ScRawToken on the stack (and therefor need
140     // the private dtor) and know what they're doing..
141     friend class ScTokenArray;
142     friend sal_uInt16 lcl_ScRawTokenOffset();
143 private:
144     SC_TOKEN_FIX_MEMBERS
145 public:
146     union {
147         double       nValue;
148         struct {
149             sal_uInt8        cByte;
150             bool        bHasForceArray;
151         } sbyte;
152         ScComplexRefData aRef;
153         struct {
154             sal_uInt16      nFileId;
155             sal_Unicode     cTabName[MAXSTRLEN+1];
156             ScComplexRefData    aRef;
157         } extref;
158         struct {
159             sal_uInt16  nFileId;
160             sal_Unicode cName[MAXSTRLEN+1];
161         } extname;
162         ScMatrix*    pMat;
163         sal_uInt16       nIndex;                // index into name collection
164         sal_Unicode  cStr[ MAXSTRLEN+1 ];   // string (up to 255 characters + 0)
165         short        nJump[MAXJUMPCOUNT+1]; // If/Chose token
166     };
167 
168                 //! other members not initialized
169                 ScRawToken() : bRaw( sal_True ) {}
170 private:
171                 ~ScRawToken() {}                //! only delete via Delete()
172 public:
173                 DECL_FIXEDMEMPOOL_NEWDEL( ScRawToken );
174     formula::StackVar    GetType()   const       { return (formula::StackVar) eType; }
175     OpCode      GetOpCode() const       { return (OpCode)   eOp;   }
176     void        NewOpCode( OpCode e )   { eOp = e; }
177     void        IncRef()                { nRefCnt++;       }
178     void        DecRef()                { if( !--nRefCnt ) Delete(); }
179     sal_uInt16      GetRef() const          { return nRefCnt; }
180     SC_DLLPUBLIC void       Delete();
181 
182     // Use these methods only on tokens that are not part of a token array,
183     // since the reference count is cleared!
184     void SetOpCode( OpCode eCode );
185     void SetString( const sal_Unicode* pStr );
186     void SetSingleReference( const ScSingleRefData& rRef );
187     void SetDoubleReference( const ScComplexRefData& rRef );
188     void SetDouble( double fVal );
189 //UNUSED2008-05  void SetInt( int nVal );
190 //UNUSED2008-05  void SetMatrix( ScMatrix* p );
191 
192     // These methods are ok to use, reference count not cleared.
193 //UNUSED2008-05  ScComplexRefData& GetReference();
194 //UNUSED2008-05  void SetReference( ScComplexRefData& rRef );
195     void SetName( sal_uInt16 n );
196     void SetExternalSingleRef( sal_uInt16 nFileId, const String& rTabName, const ScSingleRefData& rRef );
197     void SetExternalDoubleRef( sal_uInt16 nFileId, const String& rTabName, const ScComplexRefData& rRef );
198     void SetExternalName( sal_uInt16 nFileId, const String& rName );
199     void SetMatrix( ScMatrix* p );
200     void SetExternal(const sal_Unicode* pStr);
201 
202     ScRawToken* Clone() const;      // real copy!
203     formula::FormulaToken* CreateToken() const;   // create typified token
204     void Load( SvStream&, sal_uInt16 nVer );
205 
206     static xub_StrLen GetStrLen( const sal_Unicode* pStr ); // as long as a "string" is an array
207     static size_t GetStrLenBytes( xub_StrLen nLen )
208         { return nLen * sizeof(sal_Unicode); }
209     static size_t GetStrLenBytes( const sal_Unicode* pStr )
210         { return GetStrLenBytes( GetStrLen( pStr ) ); }
211 };
212 
213 
214 typedef formula::SimpleIntrusiveReference< struct ScRawToken > ScRawTokenRef;
215 
216 class SC_DLLPUBLIC ScCompiler : public formula::FormulaCompiler
217 {
218 public:
219 
220     enum EncodeUrlMode
221     {
222         ENCODE_BY_GRAMMAR,
223         ENCODE_ALWAYS,
224         ENCODE_NEVER,
225     };
226 
227     struct Convention
228     {
229         const formula::FormulaGrammar::AddressConvention meConv;
230         const sal_uLong*                mpCharTable;
231 
232 
233         Convention( formula::FormulaGrammar::AddressConvention eConvP );
234         virtual ~Convention();
235 
236         virtual void MakeRefStr( rtl::OUStringBuffer&   rBuffer,
237                                  const ScCompiler&      rCompiler,
238                                  const ScComplexRefData&    rRef,
239                                  sal_Bool bSingleRef ) const = 0;
240         virtual ::com::sun::star::i18n::ParseResult
241                     parseAnyToken( const String& rFormula,
242                                    xub_StrLen nSrcPos,
243                                    const CharClass* pCharClass) const = 0;
244 
245         /**
246          * Parse the symbol string and pick up the file name and the external
247          * range name.
248          *
249          * @return true on successful parse, or false otherwise.
250          */
251         virtual bool parseExternalName( const String& rSymbol, String& rFile, String& rName,
252                 const ScDocument* pDoc,
253                 const ::com::sun::star::uno::Sequence<
254                     const ::com::sun::star::sheet::ExternalLinkInfo > * pExternalLinks ) const = 0;
255 
256         virtual String makeExternalNameStr( const String& rFile, const String& rName ) const = 0;
257 
258         virtual void makeExternalRefStr( ::rtl::OUStringBuffer& rBuffer, const ScCompiler& rCompiler,
259                                          sal_uInt16 nFileId, const String& rTabName, const ScSingleRefData& rRef,
260                                          ScExternalRefManager* pRefMgr ) const = 0;
261 
262         virtual void makeExternalRefStr( ::rtl::OUStringBuffer& rBuffer, const ScCompiler& rCompiler,
263                                          sal_uInt16 nFileId, const String& rTabName, const ScComplexRefData& rRef,
264                                          ScExternalRefManager* pRefMgr ) const = 0;
265 
266         enum SpecialSymbolType
267         {
268             /**
269              * Character between sheet name and address.  In OOO A1 this is
270              * '.', while XL A1 and XL R1C1 this is '!'.
271              */
272             SHEET_SEPARATOR,
273 
274             /**
275              * In OOO A1, a sheet name may be prefixed with '$' to indicate an
276              * absolute sheet position.
277              */
278             ABS_SHEET_PREFIX
279         };
280         virtual sal_Unicode getSpecialSymbol( SpecialSymbolType eSymType ) const = 0;
281     };
282     friend struct Convention;
283 
284 private:
285 
286 
287     static CharClass            *pCharClassEnglish;                      // character classification for en_US locale
288     static const Convention     *pConventions[ formula::FormulaGrammar::CONV_LAST ];
289 
290     static const Convention * const pConvOOO_A1;
291     static const Convention * const pConvOOO_A1_ODF;
292     static const Convention * const pConvXL_A1;
293     static const Convention * const pConvXL_R1C1;
294     static const Convention * const pConvXL_OOX;
295 
296     static struct AddInMap
297     {
298         const char* pODFF;
299         const char* pEnglish;
300         bool        bMapDupToInternal;      // when writing ODFF
301         const char* pOriginal;              // programmatical name
302         const char* pUpper;                 // upper case programmatical name
303     } maAddInMap[];
304     static const AddInMap* GetAddInMap();
305     static size_t GetAddInMapCount();
306 
307     ScDocument* pDoc;
308     ScAddress   aPos;
309 
310     // For CONV_XL_OOX, may be set via API by MOOXML filter.
311     ::com::sun::star::uno::Sequence< const ::com::sun::star::sheet::ExternalLinkInfo > maExternalLinks;
312 
313     sal_Unicode cSymbol[MAXSTRLEN];                 // current Symbol
314     String      aFormula;                           // formula source code
315     xub_StrLen  nSrcPos;                            // tokenizer position (source code)
316     ScRawTokenRef   pRawToken;
317 
318     const CharClass*    pCharClass;         // which character classification is used for parseAnyToken
319     sal_uInt16      mnPredetectedReference;     // reference when reading ODF, 0 (none), 1 (single) or 2 (double)
320     SCsTAB      nMaxTab;                    // last sheet in document
321     sal_Int32   mnRangeOpPosInSymbol;       // if and where a range operator is in symbol
322     const Convention *pConv;
323     EncodeUrlMode   meEncodeUrlMode;
324     bool        mbCloseBrackets;            // whether to close open brackets automatically, default TRUE
325     bool        mbExtendedErrorDetection;
326     bool        mbRewind;                   // whether symbol is to be rewound to some step during lexical analysis
327 
328     sal_Bool   NextNewToken(bool bInArray = false);
329 
330     virtual void SetError(sal_uInt16 nError);
331     xub_StrLen NextSymbol(bool bInArray);
332     sal_Bool IsValue( const String& );
333     sal_Bool IsOpCode( const String&, bool bInArray );
334     sal_Bool IsOpCode2( const String& );
335     sal_Bool IsString();
336     sal_Bool IsReference( const String& );
337     sal_Bool IsSingleReference( const String& );
338     sal_Bool IsPredetectedReference( const String& );
339     sal_Bool IsDoubleReference( const String& );
340     sal_Bool IsMacro( const String& );
341     sal_Bool IsNamedRange( const String& );
342     bool IsExternalNamedRange( const String& rSymbol );
343     sal_Bool IsDBRange( const String& );
344     sal_Bool IsColRowName( const String& );
345     sal_Bool IsBoolean( const String& );
346     void AutoCorrectParsedSymbol();
347 
348     void SetRelNameReference();
349 
350     static void InitCharClassEnglish();
351 
352 public:
353     ScCompiler( ScDocument* pDocument, const ScAddress&);
354 
355     ScCompiler( ScDocument* pDocument, const ScAddress&,ScTokenArray& rArr);
356 
357 public:
358     static void DeInit();               /// all
359 
360     // for ScAddress::Format()
361     static void CheckTabQuotes( String& aTabName,
362                                 const formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_OOO );
363 
364     /** Analyzes a string for a 'Doc'#Tab construct, or 'Do''c'#Tab etc..
365 
366         @returns the position of the unquoted # hash mark in 'Doc'#Tab, or
367                  STRING_NOTFOUND if none. */
368     static xub_StrLen GetDocTabPos( const String& rString );
369 
370     static sal_Bool EnQuote( String& rStr );
371     sal_Unicode GetNativeAddressSymbol( Convention::SpecialSymbolType eType ) const;
372 
373 
374     // Check if it is a valid english function name
375     bool IsEnglishSymbol( const String& rName );
376 
377     //! _either_ CompileForFAP _or_ AutoCorrection, _not_ both
378     // #i101512# SetCompileForFAP is in formula::FormulaCompiler
379     void            SetAutoCorrection( sal_Bool bVal )
380                         { bAutoCorrect = bVal; bIgnoreErrors = bVal; }
381     void            SetCloseBrackets( bool bVal ) { mbCloseBrackets = bVal; }
382     void            SetRefConvention( const Convention *pConvP );
383     void            SetRefConvention( const formula::FormulaGrammar::AddressConvention eConv );
384 
385     /// Set symbol map if not empty.
386     void            SetFormulaLanguage( const OpCodeMapPtr & xMap );
387 
388     void            SetGrammar( const formula::FormulaGrammar::Grammar eGrammar );
389 
390     void            SetEncodeUrlMode( EncodeUrlMode eMode );
391     EncodeUrlMode   GetEncodeUrlMode() const;
392 private:
393     /** Set grammar and reference convention from within SetFormulaLanguage()
394         or SetGrammar().
395 
396         @param eNewGrammar
397             The new grammar to be set and the associated reference convention.
398 
399         @param eOldGrammar
400             The previous grammar that was active before SetFormulaLanguage().
401      */
402     void            SetGrammarAndRefConvention(
403                         const formula::FormulaGrammar::Grammar eNewGrammar,
404                         const formula::FormulaGrammar::Grammar eOldGrammar );
405 public:
406 
407     /// Set external link info for ScAddress::CONV_XL_OOX.
408     inline  void    SetExternalLinks(
409             const ::com::sun::star::uno::Sequence<
410             const ::com::sun::star::sheet::ExternalLinkInfo > & rLinks )
411     {
412         maExternalLinks = rLinks;
413     }
414 
415     void            CreateStringFromXMLTokenArray( String& rFormula, String& rFormulaNmsp );
416 
417     void            SetExtendedErrorDetection( bool bVal ) { mbExtendedErrorDetection = bVal; }
418 
419     sal_Bool            IsCorrected() { return bCorrected; }
420     const String&   GetCorrectedFormula() { return aCorrectedFormula; }
421 
422     // Use convention from this->aPos by default
423     ScTokenArray* CompileString( const String& rFormula );
424     ScTokenArray* CompileString( const String& rFormula, const String& rFormulaNmsp );
425     const ScDocument* GetDoc() const { return pDoc; }
426     const ScAddress& GetPos() const { return aPos; }
427 
428     void MoveRelWrap( SCCOL nMaxCol, SCROW nMaxRow );
429     static void MoveRelWrap( ScTokenArray& rArr, ScDocument* pDoc, const ScAddress& rPos,
430                              SCCOL nMaxCol, SCROW nMaxRow );
431 
432     sal_Bool UpdateNameReference( UpdateRefMode eUpdateRefMode,
433                               const ScRange&,
434                               SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
435                               sal_Bool& rChanged, sal_Bool bSharedFormula = sal_False);
436 
437     ScRangeData* UpdateReference( UpdateRefMode eUpdateRefMode,
438                                   const ScAddress& rOldPos, const ScRange&,
439                                   SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
440                                   sal_Bool& rChanged, sal_Bool& rRefSizeChanged );
441 
442     /// Only once for converted shared formulas,
443     /// token array has to be compiled afterwards.
444     void UpdateSharedFormulaReference( UpdateRefMode eUpdateRefMode,
445                                   const ScAddress& rOldPos, const ScRange&,
446                                   SCsCOL nDx, SCsROW nDy, SCsTAB nDz );
447 
448     ScRangeData* UpdateInsertTab(SCTAB nTable, sal_Bool bIsName );
449     ScRangeData* UpdateDeleteTab(SCTAB nTable, sal_Bool bIsMove, sal_Bool bIsName, sal_Bool& bCompile);
450     ScRangeData* UpdateMoveTab(SCTAB nOldPos, SCTAB nNewPos, sal_Bool bIsName );
451 
452     sal_Bool HasModifiedRange();
453 
454     /** If the character is allowed as first character in sheet names or
455         references, includes '$' and '?'. */
456     static inline sal_Bool IsCharWordChar( String const & rStr,
457                                        xub_StrLen nPos,
458                                        const formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_OOO )
459         {
460             sal_Unicode c = rStr.GetChar( nPos );
461             if (c < 128)
462             {
463                 return pConventions[eConv] ? static_cast<sal_Bool>(
464                         (pConventions[eConv]->mpCharTable[ sal_uInt8(c) ] & SC_COMPILER_C_CHAR_WORD) == SC_COMPILER_C_CHAR_WORD) :
465                     sal_False;   // no convention => assume invalid
466             }
467             else
468                 return ScGlobal::pCharClass->isLetterNumeric( rStr, nPos );
469         }
470 
471     /** If the character is allowed in sheet names, thus may be part of a
472         reference, includes '$' and '?' and such. */
473     static inline sal_Bool IsWordChar( String const & rStr,
474                                    xub_StrLen nPos,
475                                    const formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_OOO )
476         {
477             sal_Unicode c = rStr.GetChar( nPos );
478             if (c < 128)
479             {
480                 return pConventions[eConv] ? static_cast<sal_Bool>(
481                         (pConventions[eConv]->mpCharTable[ sal_uInt8(c) ] & SC_COMPILER_C_WORD) == SC_COMPILER_C_WORD) :
482                     sal_False;   // convention not known => assume invalid
483             }
484             else
485                 return ScGlobal::pCharClass->isLetterNumeric( rStr, nPos );
486         }
487 
488     /** If the character is allowed as tested by nFlags (SC_COMPILER_C_...
489         bits) for all known address conventions. If more than one bit is given
490         in nFlags, all bits must match. If bTestLetterNumeric is sal_False and
491         char>=128, no LetterNumeric test is done and sal_False is returned. */
492     static inline bool IsCharFlagAllConventions( String const & rStr,
493                                                  xub_StrLen nPos,
494                                                  sal_uLong nFlags,
495                                                  bool bTestLetterNumeric = true )
496         {
497             sal_Unicode c = rStr.GetChar( nPos );
498             if (c < 128)
499             {
500                 for ( int nConv = formula::FormulaGrammar::CONV_UNSPECIFIED;
501                         ++nConv < formula::FormulaGrammar::CONV_LAST; )
502                 {
503                     if (pConventions[nConv] &&
504                             ((pConventions[nConv]->mpCharTable[ sal_uInt8(c) ] & nFlags) != nFlags))
505                         return false;
506                     // convention not known => assume valid
507                 }
508                 return true;
509             }
510             else if (bTestLetterNumeric)
511                 return ScGlobal::pCharClass->isLetterNumeric( rStr, nPos );
512             else
513                 return false;
514         }
515 
516 private:
517     // FormulaCompiler
518     virtual String FindAddInFunction( const String& rUpperName, sal_Bool bLocalFirst ) const;
519     virtual void fillFromAddInCollectionUpperName( NonConstOpCodeMapPtr xMap ) const;
520     virtual void fillFromAddInCollectionEnglishName( NonConstOpCodeMapPtr xMap ) const;
521     virtual void fillFromAddInMap( NonConstOpCodeMapPtr xMap, formula::FormulaGrammar::Grammar _eGrammar ) const;
522     virtual void fillAddInToken(::std::vector< ::com::sun::star::sheet::FormulaOpCodeMapEntry >& _rVec,bool _bIsEnglish) const;
523 
524     virtual sal_Bool HandleExternalReference(const formula::FormulaToken& _aToken);
525     virtual sal_Bool HandleRange();
526     virtual sal_Bool HandleSingleRef();
527     virtual sal_Bool HandleDbData();
528 
529     virtual formula::FormulaTokenRef ExtendRangeReference( formula::FormulaToken & rTok1, formula::FormulaToken & rTok2, bool bReuseDoubleRef );
530 	virtual void CreateStringFromExternal(rtl::OUStringBuffer& rBuffer, formula::FormulaToken* pTokenP);
531     virtual void CreateStringFromSingleRef(rtl::OUStringBuffer& rBuffer,formula::FormulaToken* _pTokenP);
532     virtual void CreateStringFromDoubleRef(rtl::OUStringBuffer& rBuffer,formula::FormulaToken* _pTokenP);
533     virtual void CreateStringFromMatrix( rtl::OUStringBuffer& rBuffer, formula::FormulaToken* _pTokenP);
534     virtual void CreateStringFromIndex(rtl::OUStringBuffer& rBuffer,formula::FormulaToken* _pTokenP);
535     virtual void LocalizeString( String& rName );	// modify rName - input: exact name
536     virtual sal_Bool IsImportingXML() const;
537 
538     /// Access the CharTable flags
539     inline sal_uLong GetCharTableFlags( sal_Unicode c )
540         { return c < 128 ? pConv->mpCharTable[ sal_uInt8(c) ] : 0; }
541 };
542 
543 SC_DLLPUBLIC String GetScCompilerNativeSymbol( OpCode eOp ); //CHINA001
544 
545 #endif
546