diff options
Diffstat (limited to 'sc/inc/scmatrix.hxx')
-rw-r--r-- | sc/inc/scmatrix.hxx | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/sc/inc/scmatrix.hxx b/sc/inc/scmatrix.hxx index b788672aa715..971b32336e6c 100644 --- a/sc/inc/scmatrix.hxx +++ b/sc/inc/scmatrix.hxx @@ -38,7 +38,7 @@ class SvStream; class ScInterpreter; class SvNumberFormatter; -typedef BYTE ScMatValType; +typedef sal_uInt8 ScMatValType; const ScMatValType SC_MATVAL_VALUE = 0x00; const ScMatValType SC_MATVAL_BOOLEAN = 0x01; const ScMatValType SC_MATVAL_STRING = 0x02; @@ -55,7 +55,7 @@ union ScMatrixValue const String& GetString() const { return pS ? *pS : EMPTY_STRING; } /// Only valid if ScMatrix methods indicate that this is no string! - USHORT GetError() const { return GetDoubleErrorValue( fVal); } + sal_uInt16 GetError() const { return GetDoubleErrorValue( fVal); } /// Only valid if ScMatrix methods indicate that this is a boolean bool GetBoolean() const { return fVal != 0.; } @@ -94,9 +94,9 @@ class SC_DLLPUBLIC ScMatrix { ScMatrixValue* pMat; ScMatValType* mnValType; - ULONG mnNonValue; // how many strings and empties + sal_uLong mnNonValue; // how many strings and empties ScInterpreter* pErrorInterpreter; - mutable ULONG nRefCnt; // reference count + mutable sal_uLong nRefCnt; // reference count SCSIZE nColCount; SCSIZE nRowCount; bool mbCloneIfConst; // Whether the matrix is cloned with a CloneIfConst() call. @@ -107,7 +107,7 @@ class SC_DLLPUBLIC ScMatrix void Clear(); // pStr may be NULL, bFlag MUST NOT be 0 - void PutStringEntry( const String* pStr, BYTE bFlag, SCSIZE nIndex ); + void PutStringEntry( const String* pStr, sal_uInt8 bFlag, SCSIZE nIndex ); // only delete via Delete() ~ScMatrix(); @@ -116,7 +116,7 @@ class SC_DLLPUBLIC ScMatrix ScMatrix( const ScMatrix& ); ScMatrix& operator=( const ScMatrix&); - void SetErrorAtInterpreter( USHORT nError) const; + void SetErrorAtInterpreter( sal_uInt16 nError) const; public: @@ -278,12 +278,12 @@ public: void PutString( const String& rStr, SCSIZE nIndex); void PutEmpty( SCSIZE nC, SCSIZE nR); void PutEmpty( SCSIZE nIndex); - /// Jump FALSE without path + /// Jump sal_False without path void PutEmptyPath( SCSIZE nC, SCSIZE nR); void PutEmptyPath( SCSIZE nIndex); - void PutError( USHORT nErrorCode, SCSIZE nC, SCSIZE nR ) + void PutError( sal_uInt16 nErrorCode, SCSIZE nC, SCSIZE nR ) { PutDouble( CreateDoubleError( nErrorCode ), nC, nR ); } - void PutError( USHORT nErrorCode, SCSIZE nIndex ) + void PutError( sal_uInt16 nErrorCode, SCSIZE nIndex ) { PutDouble( CreateDoubleError( nErrorCode ), nIndex ); } void PutBoolean( bool bVal, SCSIZE nC, SCSIZE nR); void PutBoolean( bool bVal, SCSIZE nIndex); @@ -296,15 +296,15 @@ public: @ATTENTION: MUST NOT be used if the element is a string! Use GetErrorIfNotString() instead if not sure. @returns 0 if no error, else one of err... constants */ - USHORT GetError( SCSIZE nC, SCSIZE nR) const; - USHORT GetError( SCSIZE nIndex) const + sal_uInt16 GetError( SCSIZE nC, SCSIZE nR) const; + sal_uInt16 GetError( SCSIZE nIndex) const { return pMat[nIndex].GetError(); } /** Use in ScInterpreter to obtain the error code, if any. @returns 0 if no error or string element, else one of err... constants */ - USHORT GetErrorIfNotString( SCSIZE nC, SCSIZE nR) const + sal_uInt16 GetErrorIfNotString( SCSIZE nC, SCSIZE nR) const { return IsValue( nC, nR) ? GetError( nC, nR) : 0; } - USHORT GetErrorIfNotString( SCSIZE nIndex) const + sal_uInt16 GetErrorIfNotString( SCSIZE nIndex) const { return IsValue( nIndex) ? GetError( nIndex) : 0; } /// @return 0.0 if empty or empty path, else value or DoubleError. @@ -314,7 +314,7 @@ public: { if ( pErrorInterpreter ) { - USHORT nError = GetDoubleErrorValue( pMat[nIndex].fVal); + sal_uInt16 nError = GetDoubleErrorValue( pMat[nIndex].fVal); if ( nError ) SetErrorAtInterpreter( nError); } @@ -339,56 +339,56 @@ public: const ScMatrixValue* Get( SCSIZE nC, SCSIZE nR, ScMatValType& nType) const; /// @return <TRUE/> if string or empty or empty path, in fact non-value. - BOOL IsString( SCSIZE nIndex ) const + sal_Bool IsString( SCSIZE nIndex ) const { return mnValType && IsNonValueType( mnValType[nIndex]); } /// @return <TRUE/> if string or empty or empty path, in fact non-value. - BOOL IsString( SCSIZE nC, SCSIZE nR ) const + sal_Bool IsString( SCSIZE nC, SCSIZE nR ) const { ValidColRowReplicated( nC, nR ); return mnValType && IsNonValueType( mnValType[ nC * nRowCount + nR ]); } /// @return <TRUE/> if empty or empty path. - BOOL IsEmpty( SCSIZE nIndex ) const + sal_Bool IsEmpty( SCSIZE nIndex ) const { return mnValType && ((mnValType[nIndex] & SC_MATVAL_EMPTY) == SC_MATVAL_EMPTY); } /// @return <TRUE/> if empty or empty path. - BOOL IsEmpty( SCSIZE nC, SCSIZE nR ) const + sal_Bool IsEmpty( SCSIZE nC, SCSIZE nR ) const { ValidColRowReplicated( nC, nR ); return mnValType && ((mnValType[ nC * nRowCount + nR ] & SC_MATVAL_EMPTY) == SC_MATVAL_EMPTY); } /// @return <TRUE/> if empty path. - BOOL IsEmptyPath( SCSIZE nC, SCSIZE nR ) const + sal_Bool IsEmptyPath( SCSIZE nC, SCSIZE nR ) const { ValidColRowReplicated( nC, nR ); return mnValType && ((mnValType[ nC * nRowCount + nR ] & SC_MATVAL_EMPTYPATH) == SC_MATVAL_EMPTYPATH); } /// @return <TRUE/> if empty path. - BOOL IsEmptyPath( SCSIZE nIndex ) const + sal_Bool IsEmptyPath( SCSIZE nIndex ) const { return mnValType && ((mnValType[nIndex] & SC_MATVAL_EMPTYPATH) == SC_MATVAL_EMPTYPATH); } /// @return <TRUE/> if value or boolean. - BOOL IsValue( SCSIZE nIndex ) const + sal_Bool IsValue( SCSIZE nIndex ) const { return !mnValType || IsValueType( mnValType[nIndex]); } /// @return <TRUE/> if value or boolean. - BOOL IsValue( SCSIZE nC, SCSIZE nR ) const + sal_Bool IsValue( SCSIZE nC, SCSIZE nR ) const { ValidColRowReplicated( nC, nR ); return !mnValType || IsValueType( mnValType[ nC * nRowCount + nR ]); } /// @return <TRUE/> if value or boolean or empty or empty path. - BOOL IsValueOrEmpty( SCSIZE nIndex ) const + sal_Bool IsValueOrEmpty( SCSIZE nIndex ) const { return !mnValType || IsValueType( mnValType[nIndex] ) || ((mnValType[nIndex] & SC_MATVAL_EMPTY) == SC_MATVAL_EMPTY); } /// @return <TRUE/> if value or boolean or empty or empty path. - BOOL IsValueOrEmpty( SCSIZE nC, SCSIZE nR ) const + sal_Bool IsValueOrEmpty( SCSIZE nC, SCSIZE nR ) const { ValidColRowReplicated( nC, nR ); return !mnValType || IsValueType( mnValType[ nC * nRowCount + nR ]) || @@ -397,18 +397,18 @@ public: } /// @return <TRUE/> if boolean. - BOOL IsBoolean( SCSIZE nIndex ) const + sal_Bool IsBoolean( SCSIZE nIndex ) const { return mnValType && IsBooleanType( mnValType[nIndex]); } /// @return <TRUE/> if boolean. - BOOL IsBoolean( SCSIZE nC, SCSIZE nR ) const + sal_Bool IsBoolean( SCSIZE nC, SCSIZE nR ) const { ValidColRowReplicated( nC, nR ); return mnValType && IsBooleanType( mnValType[ nC * nRowCount + nR ]); } /// @return <TRUE/> if entire matrix is numeric, including booleans, with no strings or empties - BOOL IsNumeric() const + sal_Bool IsNumeric() const { return 0 == mnNonValue; } void MatTrans( ScMatrix& mRes) const; |