1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: tokstack.cxx,v $
10 * $Revision: 1.14.32.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_sc.hxx"
39 #include "compiler.hxx"
40 #include "tokstack.hxx"
42 #include "scmatrix.hxx"
44 #include <stdio.h> // printf
46 const UINT16
TokenPool::nScTokenOff
= 8192;
49 TokenStack::TokenStack( UINT16 nNewSize
)
51 pStack
= new TokenId
[ nNewSize
];
58 TokenStack::~TokenStack()
66 //------------------------------------------------------------------------
68 // !ACHTUNG!: nach Aussen hin beginnt die Nummerierung mit 1!
69 // !ACHTUNG!: SC-Token werden mit einem Offset nScTokenOff abgelegt
70 // -> Unterscheidung von anderen Token
73 TokenPool::TokenPool( void )
75 UINT16 nLauf
= nScTokenOff
;
77 // Sammelstelle fuer Id-Folgen
79 pP_Id
= new UINT16
[ nP_Id
];
81 // Sammelstelle fuer Ids
83 pElement
= new UINT16
[ nElement
];
84 pType
= new E_TYPE
[ nElement
];
85 pSize
= new UINT16
[ nElement
];
88 // Sammelstelle fuer Strings
90 ppP_Str
= new String
*[ nP_Str
];
91 for( nLauf
= 0 ; nLauf
< nP_Str
; nLauf
++ )
92 ppP_Str
[ nLauf
] = NULL
;
94 // Sammelstelle fuer double
96 pP_Dbl
= new double[ nP_Dbl
];
98 // Sammelstelle fuer error codes
100 pP_Err
= new USHORT
[ nP_Err
];
102 // Sammelstellen fuer Referenzen
104 ppP_RefTr
= new ScSingleRefData
*[ nP_RefTr
];
105 for( nLauf
= 0 ; nLauf
< nP_RefTr
; nLauf
++ )
106 ppP_RefTr
[ nLauf
] = NULL
;
109 ppP_Ext
= new EXTCONT
*[ nP_Ext
];
110 memset( ppP_Ext
, 0, sizeof( EXTCONT
* ) * nP_Ext
);
113 ppP_Nlf
= new NLFCONT
*[ nP_Nlf
];
114 memset( ppP_Nlf
, 0, sizeof( NLFCONT
* ) * nP_Nlf
);
117 ppP_Matrix
= new ScMatrix
*[ nP_Matrix
];
118 memset( ppP_Matrix
, 0, sizeof( ScMatrix
* ) * nP_Matrix
);
120 pScToken
= new ScTokenArray
;
126 TokenPool::~TokenPool()
137 for( n
= 0 ; n
< nP_RefTr
; n
++/*, pAktTr++*/ )
140 delete ppP_RefTr
[ n
];
144 for( n
= 0 ; n
< nP_Str
; n
++/*, pAktStr++*/ )
151 for( n
= 0 ; n
< nP_Ext
; n
++ )
158 for( n
= 0 ; n
< nP_Nlf
; n
++ )
165 for( n
= 0 ; n
< nP_Matrix
; n
++ )
167 if( ppP_Matrix
[ n
] )
168 ppP_Matrix
[ n
]->DecRef( );
176 void TokenPool::GrowString( void )
178 UINT16 nP_StrNew
= nP_Str
* 2;
181 String
** ppP_StrNew
= new String
*[ nP_StrNew
];
183 for( nL
= 0 ; nL
< nP_Str
; nL
++ )
184 ppP_StrNew
[ nL
] = ppP_Str
[ nL
];
185 for( nL
= nP_Str
; nL
< nP_StrNew
; nL
++ )
186 ppP_StrNew
[ nL
] = NULL
;
191 ppP_Str
= ppP_StrNew
;
195 void TokenPool::GrowDouble( void )
197 UINT16 nP_DblNew
= nP_Dbl
* 2;
199 double* pP_DblNew
= new double[ nP_DblNew
];
201 for( UINT16 nL
= 0 ; nL
< nP_Dbl
; nL
++ )
202 pP_DblNew
[ nL
] = pP_Dbl
[ nL
];
211 //UNUSED2009-05 void TokenPool::GrowError( void )
213 //UNUSED2009-05 UINT16 nP_ErrNew = nP_Err * 2;
215 //UNUSED2009-05 USHORT* pP_ErrNew = new USHORT[ nP_ErrNew ];
217 //UNUSED2009-05 for( UINT16 nL = 0 ; nL < nP_Err ; nL++ )
218 //UNUSED2009-05 pP_ErrNew[ nL ] = pP_Err[ nL ];
220 //UNUSED2009-05 nP_Err = nP_ErrNew;
222 //UNUSED2009-05 delete[] pP_Err;
223 //UNUSED2009-05 pP_Err = pP_ErrNew;
227 void TokenPool::GrowTripel( void )
229 UINT16 nP_RefTrNew
= nP_RefTr
* 2;
232 ScSingleRefData
** ppP_RefTrNew
= new ScSingleRefData
*[ nP_RefTrNew
];
234 for( nL
= 0 ; nL
< nP_RefTr
; nL
++ )
235 ppP_RefTrNew
[ nL
] = ppP_RefTr
[ nL
];
236 for( nL
= nP_RefTr
; nL
< nP_RefTrNew
; nL
++ )
237 ppP_RefTrNew
[ nL
] = NULL
;
239 nP_RefTr
= nP_RefTrNew
;
242 ppP_RefTr
= ppP_RefTrNew
;
246 void TokenPool::GrowId( void )
248 UINT16 nP_IdNew
= nP_Id
* 2;
250 UINT16
* pP_IdNew
= new UINT16
[ nP_IdNew
];
252 for( UINT16 nL
= 0 ; nL
< nP_Id
; nL
++ )
253 pP_IdNew
[ nL
] = pP_Id
[ nL
];
262 void TokenPool::GrowElement( void )
264 UINT16 nElementNew
= nElement
* 2;
266 UINT16
* pElementNew
= new UINT16
[ nElementNew
];
267 E_TYPE
* pTypeNew
= new E_TYPE
[ nElementNew
];
268 UINT16
* pSizeNew
= new UINT16
[ nElementNew
];
270 for( UINT16 nL
= 0 ; nL
< nElement
; nL
++ )
272 pElementNew
[ nL
] = pElement
[ nL
];
273 pTypeNew
[ nL
] = pType
[ nL
];
274 pSizeNew
[ nL
] = pSize
[ nL
];
277 nElement
= nElementNew
;
282 pElement
= pElementNew
;
288 void TokenPool::GrowExt( void )
290 UINT16 nNewSize
= nP_Ext
* 2;
292 EXTCONT
** ppNew
= new EXTCONT
*[ nNewSize
];
294 memset( ppNew
, 0, sizeof( EXTCONT
* ) * nNewSize
);
295 memcpy( ppNew
, ppP_Ext
, sizeof( EXTCONT
* ) * nP_Ext
);
303 void TokenPool::GrowNlf( void )
305 UINT16 nNewSize
= nP_Nlf
* 2;
307 NLFCONT
** ppNew
= new NLFCONT
*[ nNewSize
];
309 memset( ppNew
, 0, sizeof( NLFCONT
* ) * nNewSize
);
310 memcpy( ppNew
, ppP_Nlf
, sizeof( NLFCONT
* ) * nP_Nlf
);
318 void TokenPool::GrowMatrix( void )
320 UINT16 nNewSize
= nP_Matrix
* 2;
322 ScMatrix
** ppNew
= new ScMatrix
*[ nNewSize
];
324 memset( ppNew
, 0, sizeof( ScMatrix
* ) * nNewSize
);
325 memcpy( ppNew
, ppP_Matrix
, sizeof( ScMatrix
* ) * nP_Matrix
);
329 nP_Matrix
= nNewSize
;
332 void TokenPool::GetElement( const UINT16 nId
)
334 DBG_ASSERT( nId
< nElementAkt
, "*TokenPool::GetElement(): Id zu gross!?" );
336 if( pType
[ nId
] == T_Id
)
337 GetElementRek( nId
);
340 switch( pType
[ nId
] )
344 DBG_ERROR( "-TokenPool::GetElement(): hier hast Du nichts zu suchen!" );
348 pScToken
->AddString( ppP_Str
[ pElement
[ nId
] ]->GetBuffer() );
351 pScToken
->AddDouble( pP_Dbl
[ pElement
[ nId
] ] );
355 pScToken
->AddError( pP_Err
[ pElement
[ nId
] ] );
359 pScToken
->AddSingleReference( *ppP_RefTr
[ pElement
[ (UINT16
) nId
] ] );
363 ScComplexRefData aScComplexRefData
;
364 aScComplexRefData
.Ref1
= *ppP_RefTr
[ pElement
[ nId
] ];
365 aScComplexRefData
.Ref2
= *ppP_RefTr
[ pElement
[ nId
] + 1 ];
366 pScToken
->AddDoubleReference( aScComplexRefData
);
370 pScToken
->AddName( pElement
[ nId
] );
374 UINT16 n
= pElement
[ nId
];
375 EXTCONT
* p
= ( n
< nP_Ext
)? ppP_Ext
[ n
] : NULL
;
379 if( p
->eId
== ocEuroConvert
)
380 pScToken
->AddOpCode( p
->eId
);
382 pScToken
->AddExternal( p
->aText
, p
->eId
);
388 UINT16 n
= pElement
[ nId
];
389 NLFCONT
* p
= ( n
< nP_Nlf
)? ppP_Nlf
[ n
] : NULL
;
392 pScToken
->AddColRowName( p
->aRef
);
397 UINT16 n
= pElement
[ nId
];
398 ScMatrix
* p
= ( n
< nP_Matrix
)? ppP_Matrix
[ n
] : NULL
;
401 pScToken
->AddMatrix( p
);
406 UINT16 n
= pElement
[nId
];
407 if (n
< maExtNames
.size())
409 const ExtName
& r
= maExtNames
[n
];
410 pScToken
->AddExternalName(r
.mnFileId
, r
.maName
);
415 UINT16 n
= pElement
[nId
];
416 if (n
< maExtCellRefs
.size())
418 const ExtCellRef
& r
= maExtCellRefs
[n
];
419 pScToken
->AddExternalSingleReference(r
.mnFileId
, r
.maTabName
, r
.maRef
);
424 UINT16 n
= pElement
[nId
];
425 if (n
< maExtAreaRefs
.size())
427 const ExtAreaRef
& r
= maExtAreaRefs
[n
];
428 pScToken
->AddExternalDoubleReference(r
.mnFileId
, r
.maTabName
, r
.maRef
);
433 DBG_ERROR("-TokenPool::GetElement(): Zustand undefiniert!?");
439 void TokenPool::GetElementRek( const UINT16 nId
)
443 DBG_ASSERT( nRek
<= nP_Id
, "*TokenPool::GetElement(): Rekursion loopt!?" );
446 DBG_ASSERT( nId
< nElementAkt
, "*TokenPool::GetElementRek(): Id zu gross!?" );
448 DBG_ASSERT( pType
[ nId
] == T_Id
, "-TokenPool::GetElementRek(): nId nicht Id-Folge!" );
451 UINT16 nAnz
= pSize
[ nId
];
452 UINT16
* pAkt
= &pP_Id
[ pElement
[ nId
] ];
453 for( ; nAnz
> 0 ; nAnz
--, pAkt
++ )
455 if( *pAkt
< nScTokenOff
)
456 {// Rekursion oder nicht?
457 switch( pType
[ *pAkt
] )
460 GetElementRek( *pAkt
);
463 pScToken
->AddString( ppP_Str
[ pElement
[ *pAkt
] ]->GetBuffer() );
466 pScToken
->AddDouble( pP_Dbl
[ pElement
[ *pAkt
] ] );
470 pScToken
->AddError( pP_Err
[ pElement
[ *pAkt
] ] );
474 pScToken
->AddSingleReference( *ppP_RefTr
[ pElement
[ *pAkt
] ] );
478 ScComplexRefData aScComplexRefData
;
479 aScComplexRefData
.Ref1
= *ppP_RefTr
[ pElement
[ *pAkt
] ];
480 aScComplexRefData
.Ref2
= *ppP_RefTr
[ pElement
[ *pAkt
] + 1 ];
481 pScToken
->AddDoubleReference( aScComplexRefData
);
485 pScToken
->AddName( pElement
[ *pAkt
] );
489 UINT16 n
= pElement
[ *pAkt
];
490 EXTCONT
* p
= ( n
< nP_Ext
)? ppP_Ext
[ n
] : NULL
;
493 pScToken
->AddExternal( p
->aText
, p
->eId
);
498 UINT16 n
= pElement
[ *pAkt
];
499 NLFCONT
* p
= ( n
< nP_Nlf
)? ppP_Nlf
[ n
] : NULL
;
502 pScToken
->AddColRowName( p
->aRef
);
507 UINT16 n
= pElement
[ *pAkt
];
508 ScMatrix
* p
= ( n
< nP_Matrix
)? ppP_Matrix
[ n
] : NULL
;
511 pScToken
->AddMatrix( p
);
516 UINT16 n
= pElement
[*pAkt
];
517 if (n
< maExtNames
.size())
519 const ExtName
& r
= maExtNames
[n
];
520 pScToken
->AddExternalName(r
.mnFileId
, r
.maName
);
525 UINT16 n
= pElement
[*pAkt
];
526 if (n
< maExtCellRefs
.size())
528 const ExtCellRef
& r
= maExtCellRefs
[n
];
529 pScToken
->AddExternalSingleReference(r
.mnFileId
, r
.maTabName
, r
.maRef
);
534 UINT16 n
= pElement
[*pAkt
];
535 if (n
< maExtAreaRefs
.size())
537 const ExtAreaRef
& r
= maExtAreaRefs
[n
];
538 pScToken
->AddExternalDoubleReference(r
.mnFileId
, r
.maTabName
, r
.maRef
);
543 DBG_ERROR("-TokenPool::GetElementRek(): Zustand undefiniert!?");
546 else // elementarer SC_Token
547 pScToken
->AddOpCode( ( DefTokenId
) ( *pAkt
- nScTokenOff
) );
557 void TokenPool::operator >>( TokenId
& rId
)
559 rId
= ( TokenId
) ( nElementAkt
+ 1 );
561 if( nElementAkt
>= nElement
)
564 pElement
[ nElementAkt
] = nP_IdLast
; // Start der Token-Folge
565 pType
[ nElementAkt
] = T_Id
; // Typinfo eintragen
566 pSize
[ nElementAkt
] = nP_IdAkt
- nP_IdLast
;
567 // von nP_IdLast bis nP_IdAkt-1 geschrieben -> Laenge der Folge
569 nElementAkt
++; // Startwerte fuer naechste Folge
570 nP_IdLast
= nP_IdAkt
;
574 const TokenId
TokenPool::Store( const double& rDouble
)
576 if( nElementAkt
>= nElement
)
579 if( nP_DblAkt
>= nP_Dbl
)
582 pElement
[ nElementAkt
] = nP_DblAkt
; // Index in Double-Array
583 pType
[ nElementAkt
] = T_D
; // Typinfo Double eintragen
585 pP_Dbl
[ nP_DblAkt
] = rDouble
;
587 pSize
[ nElementAkt
] = 1; // eigentlich Banane
592 return ( const TokenId
) nElementAkt
; // Ausgabe von altem Wert + 1!
596 const TokenId
TokenPool::Store( const UINT16 nIndex
)
598 if( nElementAkt
>= nElement
)
601 pElement
[ nElementAkt
] = nIndex
; // Daten direkt im Index!
602 pType
[ nElementAkt
] = T_RN
; // Typinfo Range Name eintragen
605 return ( const TokenId
) nElementAkt
; // Ausgabe von altem Wert + 1!
609 const TokenId
TokenPool::Store( const String
& rString
)
611 // weitgehend nach Store( const sal_Char* ) kopiert, zur Vermeidung
612 // eines temporaeren Strings in "
613 if( nElementAkt
>= nElement
)
616 if( nP_StrAkt
>= nP_Str
)
619 pElement
[ nElementAkt
] = nP_StrAkt
; // Index in String-Array
620 pType
[ nElementAkt
] = T_Str
; // Typinfo String eintragen
623 if( !ppP_Str
[ nP_StrAkt
] )
624 //...aber nur, wenn noch nicht vorhanden
625 ppP_Str
[ nP_StrAkt
] = new String( rString
);
627 //...ansonsten nur kopieren
628 *ppP_Str
[ nP_StrAkt
] = rString
;
630 DBG_ASSERT( sizeof( xub_StrLen
) <= 2, "*TokenPool::Store(): StrLen doesn't match!" );
632 pSize
[ nElementAkt
] = ( UINT16
) ppP_Str
[ nP_StrAkt
]->Len();
637 return ( const TokenId
) nElementAkt
; // Ausgabe von altem Wert + 1!
641 const TokenId
TokenPool::Store( const ScSingleRefData
& rTr
)
643 if( nElementAkt
>= nElement
)
646 if( nP_RefTrAkt
>= nP_RefTr
)
649 pElement
[ nElementAkt
] = nP_RefTrAkt
;
650 pType
[ nElementAkt
] = T_RefC
; // Typinfo Cell-Reff eintragen
652 if( !ppP_RefTr
[ nP_RefTrAkt
] )
653 ppP_RefTr
[ nP_RefTrAkt
] = new ScSingleRefData( rTr
);
655 *ppP_RefTr
[ nP_RefTrAkt
] = rTr
;
660 return ( const TokenId
) nElementAkt
; // Ausgabe von altem Wert + 1!
664 const TokenId
TokenPool::Store( const ScComplexRefData
& rTr
)
666 if( nElementAkt
>= nElement
)
669 if( nP_RefTrAkt
+ 1 >= nP_RefTr
)
672 pElement
[ nElementAkt
] = nP_RefTrAkt
;
673 pType
[ nElementAkt
] = T_RefA
; // Typinfo Area-Reff eintragen
675 if( !ppP_RefTr
[ nP_RefTrAkt
] )
676 ppP_RefTr
[ nP_RefTrAkt
] = new ScSingleRefData( rTr
.Ref1
);
678 *ppP_RefTr
[ nP_RefTrAkt
] = rTr
.Ref1
;
681 if( !ppP_RefTr
[ nP_RefTrAkt
] )
682 ppP_RefTr
[ nP_RefTrAkt
] = new ScSingleRefData( rTr
.Ref2
);
684 *ppP_RefTr
[ nP_RefTrAkt
] = rTr
.Ref2
;
689 return ( const TokenId
) nElementAkt
; // Ausgabe von altem Wert + 1!
693 const TokenId
TokenPool::Store( const DefTokenId e
, const String
& r
)
695 if( nElementAkt
>= nElement
)
698 if( nP_ExtAkt
>= nP_Ext
)
701 pElement
[ nElementAkt
] = nP_ExtAkt
;
702 pType
[ nElementAkt
] = T_Ext
; // Typinfo String eintragen
704 if( ppP_Ext
[ nP_ExtAkt
] )
706 ppP_Ext
[ nP_ExtAkt
]->eId
= e
;
707 ppP_Ext
[ nP_ExtAkt
]->aText
= r
;
710 ppP_Ext
[ nP_ExtAkt
] = new EXTCONT( e
, r
);
715 return ( const TokenId
) nElementAkt
; // Ausgabe von altem Wert + 1!
719 const TokenId
TokenPool::StoreNlf( const ScSingleRefData
& rTr
)
721 if( nElementAkt
>= nElement
)
724 if( nP_NlfAkt
>= nP_Nlf
)
727 pElement
[ nElementAkt
] = nP_NlfAkt
;
728 pType
[ nElementAkt
] = T_Nlf
;
730 if( ppP_Nlf
[ nP_NlfAkt
] )
732 ppP_Nlf
[ nP_NlfAkt
]->aRef
= rTr
;
735 ppP_Nlf
[ nP_NlfAkt
] = new NLFCONT( rTr
);
740 return ( const TokenId
) nElementAkt
;
743 const TokenId
TokenPool::StoreMatrix( SCSIZE nC
, SCSIZE nR
)
747 if( nElementAkt
>= nElement
)
750 if( nP_MatrixAkt
>= nP_Matrix
)
753 pElement
[ nElementAkt
] = nP_MatrixAkt
;
754 pType
[ nElementAkt
] = T_Matrix
;
756 pM
= new ScMatrix( nC
, nR
);
757 pM
->FillDouble( 0., 0,0, nC
-1, nR
-1 );
759 ppP_Matrix
[ nP_MatrixAkt
] = pM
;
764 return ( const TokenId
) nElementAkt
;
767 const TokenId
TokenPool::StoreExtName( sal_uInt16 nFileId
, const String
& rName
)
769 if ( nElementAkt
>= nElement
)
772 pElement
[nElementAkt
] = static_cast<UINT16
>(maExtNames
.size());
773 pType
[nElementAkt
] = T_ExtName
;
775 maExtNames
.push_back(ExtName());
776 ExtName
& r
= maExtNames
.back();
777 r
.mnFileId
= nFileId
;
782 return static_cast<const TokenId
>(nElementAkt
);
785 const TokenId
TokenPool::StoreExtRef( sal_uInt16 nFileId
, const String
& rTabName
, const ScSingleRefData
& rRef
)
787 if ( nElementAkt
>= nElement
)
790 pElement
[nElementAkt
] = static_cast<UINT16
>(maExtCellRefs
.size());
791 pType
[nElementAkt
] = T_ExtRefC
;
793 maExtCellRefs
.push_back(ExtCellRef());
794 ExtCellRef
& r
= maExtCellRefs
.back();
795 r
.mnFileId
= nFileId
;
796 r
.maTabName
= rTabName
;
801 return static_cast<const TokenId
>(nElementAkt
);
804 const TokenId
TokenPool::StoreExtRef( sal_uInt16 nFileId
, const String
& rTabName
, const ScComplexRefData
& rRef
)
806 if ( nElementAkt
>= nElement
)
809 pElement
[nElementAkt
] = static_cast<UINT16
>(maExtAreaRefs
.size());
810 pType
[nElementAkt
] = T_ExtRefA
;
812 maExtAreaRefs
.push_back(ExtAreaRef());
813 ExtAreaRef
& r
= maExtAreaRefs
.back();
814 r
.mnFileId
= nFileId
;
815 r
.maTabName
= rTabName
;
820 return static_cast<const TokenId
>(nElementAkt
);
823 void TokenPool::Reset( void )
825 nP_IdAkt
= nP_IdLast
= nElementAkt
= nP_StrAkt
= nP_DblAkt
= nP_ErrAkt
= nP_RefTrAkt
= nP_ExtAkt
= nP_NlfAkt
= nP_MatrixAkt
= 0;
827 maExtCellRefs
.clear();
828 maExtAreaRefs
.clear();
832 BOOL
TokenPool::IsSingleOp( const TokenId
& rId
, const DefTokenId eId
) const
834 UINT16 nId
= (UINT16
) rId
;
835 if( nId
&& nId
<= nElementAkt
)
838 if( T_Id
== pType
[ nId
] )
840 if( pSize
[ nId
] == 1 )
842 UINT16 nSecId
= pP_Id
[ pElement
[ nId
] ];
843 if( nSecId
>= nScTokenOff
)
845 return ( DefTokenId
) ( nSecId
- nScTokenOff
) == eId
; // Gesuchter?
855 const String
* TokenPool::GetExternal( const TokenId
& rId
) const
857 const String
* p
= NULL
;
858 UINT16 n
= (UINT16
) rId
;
859 if( n
&& n
<= nElementAkt
)
862 if( (pType
[ n
] == T_Ext
) && ppP_Ext
[ pElement
[ n
] ] )
863 p
= &ppP_Ext
[ pElement
[ n
] ]->aText
;
870 //UNUSED2008-05 const String* TokenPool::GetString( const TokenId& r ) const
872 //UNUSED2008-05 const String* p = NULL;
873 //UNUSED2008-05 UINT16 n = (UINT16) r;
874 //UNUSED2008-05 if( n && n <= nElementAkt )
877 //UNUSED2008-05 if( pType[ n ] == T_Str )
878 //UNUSED2008-05 p = ppP_Str[ pElement[ n ] ];
881 //UNUSED2008-05 return p;
884 ScMatrix
* TokenPool::GetMatrix( unsigned int n
) const
886 if( n
< nP_MatrixAkt
)
887 return ppP_Matrix
[ n
];
889 printf ("GETMATRIX %d >= %d\n", n
, nP_MatrixAkt
);