summaryrefslogtreecommitdiff
path: root/sc/source/filter/inc/tokstack.hxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-03-18 15:33:40 +0100
committerJan Holesovsky <kendy@suse.cz>2011-03-18 15:33:40 +0100
commite6064484fae8aa2797f86c68e9a8d23d2e213367 (patch)
treedb2f4d140efca43ab01dee4fc053fff0829d106b /sc/source/filter/inc/tokstack.hxx
parent9e0a09e89c38774dd1af902387a8b25de158b634 (diff)
parent378c75a798c8baa34cb26e7f07fe28cb5ee2a85f (diff)
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts: chart2/source/controller/main/UndoManager.cxx chart2/source/tools/RegressionCurveHelper.cxx sc/inc/address.hxx sc/inc/attrib.hxx sc/inc/bigrange.hxx sc/inc/callform.hxx sc/inc/cell.hxx sc/inc/chartarr.hxx sc/inc/chartlis.hxx sc/inc/chgtrack.hxx sc/inc/collect.hxx sc/inc/compiler.hxx sc/inc/detdata.hxx sc/inc/document.hxx sc/inc/fillinfo.hxx sc/inc/olinetab.hxx sc/inc/prnsave.hxx sc/inc/queryparam.hxx sc/inc/sc.hrc sc/inc/scabstdlg.hxx sc/inc/table.hxx sc/inc/validat.hxx sc/inc/zforauto.hxx sc/source/core/data/documen2.cxx sc/source/core/data/document.cxx sc/source/core/data/table1.cxx sc/source/core/tool/address.cxx sc/source/core/tool/token.cxx sc/source/filter/excel/frmbase.cxx sc/source/filter/excel/impop.cxx sc/source/filter/excel/xename.cxx sc/source/filter/inc/formel.hxx sc/source/filter/inc/xename.hxx sc/source/filter/xml/xmlexprt.cxx sc/source/filter/xml/xmlnexpi.cxx sc/source/filter/xml/xmlnexpi.hxx sc/source/ui/dbgui/filtdlg.cxx sc/source/ui/inc/docfunc.hxx sc/source/ui/inc/namedlg.hxx sc/source/ui/namedlg/namedlg.cxx sc/source/ui/src/namedlg.src
Diffstat (limited to 'sc/source/filter/inc/tokstack.hxx')
-rw-r--r--sc/source/filter/inc/tokstack.hxx110
1 files changed, 55 insertions, 55 deletions
diff --git a/sc/source/filter/inc/tokstack.hxx b/sc/source/filter/inc/tokstack.hxx
index 41ffec05dfd3..56b7c017dcfa 100644
--- a/sc/source/filter/inc/tokstack.hxx
+++ b/sc/source/filter/inc/tokstack.hxx
@@ -37,26 +37,26 @@
#include <vector>
typedef OpCode DefTokenId;
-// in PRODUCT version: ambiguity between OpCode (being USHORT) and UINT16
+// in PRODUCT version: ambiguity between OpCode (being sal_uInt16) and UINT16
// Unfortunately a typedef is just a dumb alias and not a real type ...
-//typedef UINT16 TokenId;
+//typedef sal_uInt16 TokenId;
struct TokenId
{
- UINT16 nId;
+ sal_uInt16 nId;
TokenId() : nId( 0 ) {}
- TokenId( UINT16 n ) : nId( n ) {}
+ TokenId( sal_uInt16 n ) : nId( n ) {}
TokenId( const TokenId& r ) : nId( r.nId ) {}
inline TokenId& operator =( const TokenId& r ) { nId = r.nId; return *this; }
- inline TokenId& operator =( UINT16 n ) { nId = n; return *this; }
- inline operator UINT16&() { return nId; }
- inline operator const UINT16&() const { return nId; }
- inline BOOL operator <( UINT16 n ) const { return nId < n; }
- inline BOOL operator >( UINT16 n ) const { return nId > n; }
- inline BOOL operator <=( UINT16 n ) const { return nId <= n; }
- inline BOOL operator >=( UINT16 n ) const { return nId >= n; }
- inline BOOL operator ==( UINT16 n ) const { return nId == n; }
- inline BOOL operator !=( UINT16 n ) const { return nId != n; }
+ inline TokenId& operator =( sal_uInt16 n ) { nId = n; return *this; }
+ inline operator sal_uInt16&() { return nId; }
+ inline operator const sal_uInt16&() const { return nId; }
+ inline sal_Bool operator <( sal_uInt16 n ) const { return nId < n; }
+ inline sal_Bool operator >( sal_uInt16 n ) const { return nId > n; }
+ inline sal_Bool operator <=( sal_uInt16 n ) const { return nId <= n; }
+ inline sal_Bool operator >=( sal_uInt16 n ) const { return nId >= n; }
+ inline sal_Bool operator ==( sal_uInt16 n ) const { return nId == n; }
+ inline sal_Bool operator !=( sal_uInt16 n ) const { return nId != n; }
};
@@ -93,25 +93,25 @@ class TokenPool
// Ausgabe Id = 0 -> Fehlerfall
private:
String** ppP_Str; // Pool fuer Strings
- UINT16 nP_Str; // ...mit Groesse
- UINT16 nP_StrAkt; // ...und Schreibmarke
+ sal_uInt16 nP_Str; // ...mit Groesse
+ sal_uInt16 nP_StrAkt; // ...und Schreibmarke
double* pP_Dbl; // Pool fuer Doubles
- UINT16 nP_Dbl;
- UINT16 nP_DblAkt;
+ sal_uInt16 nP_Dbl;
+ sal_uInt16 nP_DblAkt;
- USHORT* pP_Err; // Pool for error codes
- UINT16 nP_Err;
- UINT16 nP_ErrAkt;
+ sal_uInt16* pP_Err; // Pool for error codes
+ sal_uInt16 nP_Err;
+ sal_uInt16 nP_ErrAkt;
ScSingleRefData** ppP_RefTr; // Pool fuer Referenzen
- UINT16 nP_RefTr;
- UINT16 nP_RefTrAkt;
+ sal_uInt16 nP_RefTr;
+ sal_uInt16 nP_RefTrAkt;
- UINT16* pP_Id; // Pool fuer Id-Folgen
- UINT16 nP_Id;
- UINT16 nP_IdAkt;
- UINT16 nP_IdLast; // letzter Folgen-Beginn
+ sal_uInt16* pP_Id; // Pool fuer Id-Folgen
+ sal_uInt16 nP_Id;
+ sal_uInt16 nP_IdAkt;
+ sal_uInt16 nP_IdLast; // letzter Folgen-Beginn
struct EXTCONT
{
@@ -121,8 +121,8 @@ class TokenPool
eId( e ), aText( r ){}
};
EXTCONT** ppP_Ext;
- UINT16 nP_Ext;
- UINT16 nP_ExtAkt;
+ sal_uInt16 nP_Ext;
+ sal_uInt16 nP_ExtAkt;
struct NLFCONT
{
@@ -130,12 +130,12 @@ class TokenPool
NLFCONT( const ScSingleRefData& r ) : aRef( r ) {}
};
NLFCONT** ppP_Nlf;
- UINT16 nP_Nlf;
- UINT16 nP_NlfAkt;
+ sal_uInt16 nP_Nlf;
+ sal_uInt16 nP_NlfAkt;
ScMatrix** ppP_Matrix; // Pool fuer Matricies
- UINT16 nP_Matrix;
- UINT16 nP_MatrixAkt;
+ sal_uInt16 nP_Matrix;
+ sal_uInt16 nP_MatrixAkt;
/** for storage of named ranges */
struct RangeName
@@ -171,15 +171,15 @@ class TokenPool
};
::std::vector<ExtAreaRef> maExtAreaRefs;
- UINT16* pElement; // Array mit Indizes fuer Elemente
+ sal_uInt16* pElement; // Array mit Indizes fuer Elemente
E_TYPE* pType; // ...mit Typ-Info
- UINT16* pSize; // ...mit Laengenangabe (Anz. UINT16)
- UINT16 nElement;
- UINT16 nElementAkt;
+ sal_uInt16* pSize; // ...mit Laengenangabe (Anz. sal_uInt16)
+ sal_uInt16 nElement;
+ sal_uInt16 nElementAkt;
- static const UINT16 nScTokenOff;// Offset fuer SC-Token
+ static const sal_uInt16 nScTokenOff;// Offset fuer SC-Token
#ifdef DBG_UTIL
- UINT16 nRek; // Rekursionszaehler
+ sal_uInt16 nRek; // Rekursionszaehler
#endif
ScTokenArray* pScToken; // Tokenbastler
@@ -191,8 +191,8 @@ class TokenPool
void GrowExt( void );
void GrowNlf( void );
void GrowMatrix( void );
- void GetElement( const UINT16 nId );
- void GetElementRek( const UINT16 nId );
+ void GetElement( const sal_uInt16 nId );
+ void GetElementRek( const sal_uInt16 nId );
public:
TokenPool( void );
~TokenPool();
@@ -205,8 +205,8 @@ class TokenPool
const TokenId Store( const double& rDouble );
// nur fuer Range-Names
- const TokenId Store( const UINT16 nIndex );
- inline const TokenId Store( const INT16 nWert );
+ const TokenId Store( const sal_uInt16 nIndex );
+ inline const TokenId Store( const sal_Int16 nWert );
const TokenId Store( const String& rString );
const TokenId Store( const ScSingleRefData& rTr );
const TokenId Store( const ScComplexRefData& rTr );
@@ -224,7 +224,7 @@ class TokenPool
inline const ScTokenArray* operator []( const TokenId nId );
void Reset( void );
inline E_TYPE GetType( const TokenId& nId ) const;
- BOOL IsSingleOp( const TokenId& nId, const DefTokenId eId ) const;
+ sal_Bool IsSingleOp( const TokenId& nId, const DefTokenId eId ) const;
const String* GetExternal( const TokenId& nId ) const;
ScMatrix* GetMatrix( unsigned int n ) const;
};
@@ -238,10 +238,10 @@ class TokenStack
{
private:
TokenId* pStack; // Stack als Array
- UINT16 nPos; // Schreibmarke
- UINT16 nSize; // Erster Index ausserhalb des Stacks
+ sal_uInt16 nPos; // Schreibmarke
+ sal_uInt16 nSize; // Erster Index ausserhalb des Stacks
public:
- TokenStack( UINT16 nNewSize = 1024 );
+ TokenStack( sal_uInt16 nNewSize = 1024 );
~TokenStack();
inline TokenStack& operator <<( const TokenId nNewId );
inline void operator >>( TokenId &rId );
@@ -311,14 +311,14 @@ inline TokenPool& TokenPool::operator <<( const TokenId nId )
{
// POST: nId's werden hintereinander im Pool unter einer neuen Id
// abgelegt. Vorgang wird mit >> oder Store() abgeschlossen
- // nId -> ( UINT16 ) nId - 1;
- DBG_ASSERT( ( UINT16 ) nId < nScTokenOff,
+ // nId -> ( sal_uInt16 ) nId - 1;
+ DBG_ASSERT( ( sal_uInt16 ) nId < nScTokenOff,
"-TokenPool::operator <<: TokenId im DefToken-Bereich!" );
if( nP_IdAkt >= nP_Id )
GrowId();
- pP_Id[ nP_IdAkt ] = ( ( UINT16 ) nId ) - 1;
+ pP_Id[ nP_IdAkt ] = ( ( sal_uInt16 ) nId ) - 1;
nP_IdAkt++;
return *this;
@@ -327,13 +327,13 @@ inline TokenPool& TokenPool::operator <<( const TokenId nId )
inline TokenPool& TokenPool::operator <<( const DefTokenId eId )
{
- DBG_ASSERT( ( UINT32 ) eId + nScTokenOff < 0xFFFF,
+ DBG_ASSERT( ( sal_uInt32 ) eId + nScTokenOff < 0xFFFF,
"-TokenPool::operator<<: enmum zu gross!" );
if( nP_IdAkt >= nP_Id )
GrowId();
- pP_Id[ nP_IdAkt ] = ( ( UINT16 ) eId ) + nScTokenOff;
+ pP_Id[ nP_IdAkt ] = ( ( sal_uInt16 ) eId ) + nScTokenOff;
nP_IdAkt++;
return *this;
@@ -345,7 +345,7 @@ inline TokenPool& TokenPool::operator <<( TokenStack& rStack )
if( nP_IdAkt >= nP_Id )
GrowId();
- pP_Id[ nP_IdAkt ] = ( ( UINT16 ) rStack.Get() ) - 1;
+ pP_Id[ nP_IdAkt ] = ( ( sal_uInt16 ) rStack.Get() ) - 1;
nP_IdAkt++;
return *this;
@@ -368,7 +368,7 @@ inline const TokenId TokenPool::Store( void )
}
-inline const TokenId TokenPool::Store( const INT16 nWert )
+inline const TokenId TokenPool::Store( const sal_Int16 nWert )
{
return Store( ( double ) nWert );
}
@@ -389,7 +389,7 @@ const inline ScTokenArray* TokenPool::operator []( const TokenId nId )
#ifdef DBG_UTIL
nRek = 0;
#endif
- GetElement( ( UINT16 ) nId - 1 );
+ GetElement( ( sal_uInt16 ) nId - 1 );
}
return pScToken;
@@ -400,7 +400,7 @@ inline E_TYPE TokenPool::GetType( const TokenId& rId ) const
{
E_TYPE nRet;
- UINT16 nId = (UINT16) rId - 1;
+ sal_uInt16 nId = (sal_uInt16) rId - 1;
if( nId < nElementAkt )
nRet = pType[ nId ] ;