diff options
Diffstat (limited to 'sw/source/core/fields/dbfld.cxx')
-rw-r--r-- | sw/source/core/fields/dbfld.cxx | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx index 20760cc751..b21c15d983 100644 --- a/sw/source/core/fields/dbfld.cxx +++ b/sw/source/core/fields/dbfld.cxx @@ -62,7 +62,7 @@ String lcl_DBTrennConv(const String& aContent) { String sTmp(aContent); sal_Unicode* pStr = sTmp.GetBufferAccess(); - for( USHORT i = sTmp.Len(); i; --i, ++pStr ) + for( sal_uInt16 i = sTmp.Len(); i; --i, ++pStr ) if( DB_DELIM == *pStr ) *pStr = '.'; return sTmp; @@ -113,7 +113,7 @@ void SwDBFieldType::ReleaseRef() if (--nRefCnt <= 0) { - USHORT nPos = GetDoc()->GetFldTypes()->GetPos(this); + sal_uInt16 nPos = GetDoc()->GetFldTypes()->GetPos(this); if (nPos != USHRT_MAX) { @@ -126,7 +126,7 @@ void SwDBFieldType::ReleaseRef() /* -----------------24.02.99 14:51------------------- * * --------------------------------------------------*/ -BOOL SwDBFieldType::QueryValue( uno::Any& rAny, USHORT nWhichId ) const +sal_Bool SwDBFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const { switch( nWhichId ) { @@ -145,12 +145,12 @@ BOOL SwDBFieldType::QueryValue( uno::Any& rAny, USHORT nWhichId ) const default: DBG_ERROR("illegal property"); } - return TRUE; + return sal_True; } /* -----------------24.02.99 14:51------------------- * * --------------------------------------------------*/ -BOOL SwDBFieldType::PutValue( const uno::Any& rAny, USHORT nWhichId ) +sal_Bool SwDBFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) { switch( nWhichId ) { @@ -190,18 +190,18 @@ BOOL SwDBFieldType::PutValue( const uno::Any& rAny, USHORT nWhichId ) default: DBG_ERROR("illegal property"); } - return TRUE; + return sal_True; } /*-------------------------------------------------------------------- Beschreibung: SwDBField --------------------------------------------------------------------*/ -SwDBField::SwDBField(SwDBFieldType* pTyp, ULONG nFmt) +SwDBField::SwDBField(SwDBFieldType* pTyp, sal_uLong nFmt) : SwValueField(pTyp, nFmt), nSubType(0), - bIsInBodyTxt(TRUE), - bValidValue(FALSE), - bInitialized(FALSE) + bIsInBodyTxt(sal_True), + bValidValue(sal_False), + bInitialized(sal_False) { if (GetTyp()) ((SwDBFieldType*)GetTyp())->AddRef(); @@ -297,7 +297,7 @@ String SwDBField::GetFieldName() const //------------------------------------------------------------------------------ -void SwDBField::ChgValue( double d, BOOL bVal ) +void SwDBField::ChgValue( double d, sal_Bool bVal ) { bValidValue = bVal; SetValue(d); @@ -329,7 +329,7 @@ void SwDBField::Evaluate() SwNewDBMgr* pMgr = GetDoc()->GetNewDBMgr(); // erstmal loeschen - bValidValue = FALSE; + bValidValue = sal_False; double nValue = DBL_MAX; const SwDBData& aTmpData = GetDBData(); @@ -358,7 +358,7 @@ void SwDBField::Evaluate() if (*pDocFormatter->GetNullDate() != aStandard) nValue += (aStandard - *pDocFormatter->GetNullDate()); } - bValidValue = TRUE; + bValidValue = sal_True; SetValue(nValue); aContent = ((SwValueFieldType*)GetTyp())->ExpandValue(nValue, GetFormat(), GetLanguage()); } @@ -373,15 +373,15 @@ void SwDBField::Evaluate() SvNumberFormatter* pFormatter = GetDoc()->GetNumberFormatter(); if (nFmt && nFmt != SAL_MAX_UINT32 && !pFormatter->IsTextFormat(nFmt)) - bValidValue = TRUE; // Wegen Bug #60339 nicht mehr bei allen Strings + bValidValue = sal_True; // Wegen Bug #60339 nicht mehr bei allen Strings } else { - // Bei Strings TRUE wenn Laenge > 0 sonst FALSE + // Bei Strings sal_True wenn Laenge > 0 sonst sal_False SetValue(aContent.Len() ? 1 : 0); } } - bInitialized = TRUE; + bInitialized = sal_True; } /*-------------------------------------------------------------------- @@ -397,7 +397,7 @@ const String& SwDBField::GetPar1() const Beschreibung: --------------------------------------------------------------------*/ -USHORT SwDBField::GetSubType() const +sal_uInt16 SwDBField::GetSubType() const { return nSubType; } @@ -406,7 +406,7 @@ USHORT SwDBField::GetSubType() const Beschreibung: --------------------------------------------------------------------*/ -void SwDBField::SetSubType(USHORT nType) +void SwDBField::SetSubType(sal_uInt16 nType) { nSubType = nType; } @@ -414,13 +414,13 @@ void SwDBField::SetSubType(USHORT nType) /*-----------------06.03.98 16:15------------------- --------------------------------------------------*/ -BOOL SwDBField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const +sal_Bool SwDBField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const { switch( nWhichId ) { case FIELD_PROP_BOOL1: { - BOOL bTemp = 0 == (GetSubType()&nsSwExtendedSubType::SUB_OWN_FMT); + sal_Bool bTemp = 0 == (GetSubType()&nsSwExtendedSubType::SUB_OWN_FMT); rAny.setValue(&bTemp, ::getBooleanCppuType()); } break; @@ -442,13 +442,13 @@ BOOL SwDBField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const default: DBG_ERROR("illegal property"); } - return TRUE; + return sal_True; } /*-----------------06.03.98 16:15------------------- --------------------------------------------------*/ -BOOL SwDBField::PutValue( const uno::Any& rAny, USHORT nWhichId ) +sal_Bool SwDBField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) { switch( nWhichId ) { @@ -460,10 +460,10 @@ BOOL SwDBField::PutValue( const uno::Any& rAny, USHORT nWhichId ) break; case FIELD_PROP_BOOL2: { - USHORT nSubTyp = GetSubType(); + sal_uInt16 nSubTyp = GetSubType(); sal_Bool bVisible = sal_False; if(!(rAny >>= bVisible)) - return FALSE; + return sal_False; if(bVisible) nSubTyp &= ~nsSwExtendedSubType::SUB_INVISIBLE; else @@ -504,14 +504,14 @@ BOOL SwDBField::PutValue( const uno::Any& rAny, USHORT nWhichId ) default: DBG_ERROR("illegal property"); } - return TRUE; + return sal_True; } /*-------------------------------------------------------------------- Beschreibung: Basisklasse fuer alle weiteren Datenbankfelder --------------------------------------------------------------------*/ -SwDBNameInfField::SwDBNameInfField(SwFieldType* pTyp, const SwDBData& rDBData, ULONG nFmt) : +SwDBNameInfField::SwDBNameInfField(SwFieldType* pTyp, const SwDBData& rDBData, sal_uLong nFmt) : SwField(pTyp, nFmt), aDBData(rDBData), nSubType(0) @@ -554,7 +554,7 @@ String SwDBNameInfField::GetFieldName() const /*-----------------06.03.98 16:55------------------- --------------------------------------------------*/ -BOOL SwDBNameInfField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const +sal_Bool SwDBNameInfField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const { switch( nWhichId ) { @@ -576,12 +576,12 @@ BOOL SwDBNameInfField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const default: DBG_ERROR("illegal property"); } - return TRUE; + return sal_True; } /*-----------------06.03.98 16:55------------------- --------------------------------------------------*/ -BOOL SwDBNameInfField::PutValue( const uno::Any& rAny, USHORT nWhichId ) +sal_Bool SwDBNameInfField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) { switch( nWhichId ) { @@ -596,10 +596,10 @@ BOOL SwDBNameInfField::PutValue( const uno::Any& rAny, USHORT nWhichId ) break; case FIELD_PROP_BOOL2: { - USHORT nSubTyp = GetSubType(); + sal_uInt16 nSubTyp = GetSubType(); sal_Bool bVisible = sal_False; if(!(rAny >>= bVisible)) - return FALSE; + return sal_False; if(bVisible) nSubTyp &= ~nsSwExtendedSubType::SUB_INVISIBLE; else @@ -610,19 +610,19 @@ BOOL SwDBNameInfField::PutValue( const uno::Any& rAny, USHORT nWhichId ) default: DBG_ERROR("illegal property"); } - return TRUE; + return sal_True; } /* -----------------4/10/2003 15:03------------------ --------------------------------------------------*/ -USHORT SwDBNameInfField::GetSubType() const +sal_uInt16 SwDBNameInfField::GetSubType() const { return nSubType; } /* -----------------4/10/2003 15:03------------------ --------------------------------------------------*/ -void SwDBNameInfField::SetSubType(USHORT nType) +void SwDBNameInfField::SetSubType(sal_uInt16 nType) { nSubType = nType; } @@ -651,7 +651,7 @@ SwDBNextSetField::SwDBNextSetField(SwDBNextSetFieldType* pTyp, const String& rCond, const String& , const SwDBData& rDBData) : - SwDBNameInfField(pTyp, rDBData), aCond(rCond), bCondValid(TRUE) + SwDBNameInfField(pTyp, rDBData), aCond(rCond), bCondValid(sal_True) {} //------------------------------------------------------------------------------ @@ -699,9 +699,9 @@ void SwDBNextSetField::SetPar1(const String& rStr) /*-----------------06.03.98 16:16------------------- --------------------------------------------------*/ -BOOL SwDBNextSetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const +sal_Bool SwDBNextSetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const { - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; switch( nWhichId ) { case FIELD_PROP_PAR3: @@ -715,9 +715,9 @@ BOOL SwDBNextSetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const /*-----------------06.03.98 16:16------------------- --------------------------------------------------*/ -BOOL SwDBNextSetField::PutValue( const uno::Any& rAny, USHORT nWhichId ) +sal_Bool SwDBNextSetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) { - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; switch( nWhichId ) { case FIELD_PROP_PAR3: @@ -772,7 +772,7 @@ SwDBNumSetField::SwDBNumSetField(SwDBNumSetFieldType* pTyp, SwDBNameInfField(pTyp, rDBData), aCond(rCond), aPar2(rDBNum), - bCondValid(TRUE) + bCondValid(sal_True) {} //------------------------------------------------------------------------------ @@ -801,7 +801,7 @@ void SwDBNumSetField::Evaluate(SwDoc* pDoc) if( bCondValid && pMgr && pMgr->IsInMerge() && pMgr->IsDataSourceOpen(aTmpData.sDataSource, aTmpData.sCommand, sal_True)) { // Bedingug OK -> aktuellen Set einstellen - pMgr->ToRecordId(Max((USHORT)aPar2.ToInt32(), USHORT(1))-1); + pMgr->ToRecordId(Max((sal_uInt16)aPar2.ToInt32(), sal_uInt16(1))-1); } } @@ -835,9 +835,9 @@ void SwDBNumSetField::SetPar2(const String& rStr) /*-----------------06.03.98 16:16------------------- --------------------------------------------------*/ -BOOL SwDBNumSetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const +sal_Bool SwDBNumSetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const { - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; switch( nWhichId ) { case FIELD_PROP_PAR3: @@ -854,9 +854,9 @@ BOOL SwDBNumSetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const /*-----------------06.03.98 16:16------------------- --------------------------------------------------*/ -BOOL SwDBNumSetField::PutValue( const uno::Any& rAny, USHORT nWhichId ) +sal_Bool SwDBNumSetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) { - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; switch( nWhichId ) { case FIELD_PROP_PAR3: @@ -886,7 +886,7 @@ SwDBNameFieldType::SwDBNameFieldType(SwDoc* pDocument) } //------------------------------------------------------------------------------ -String SwDBNameFieldType::Expand(ULONG ) const +String SwDBNameFieldType::Expand(sal_uLong ) const { const SwDBData aData = pDoc->GetDBData(); String sRet(aData.sDataSource); @@ -908,7 +908,7 @@ SwFieldType* SwDBNameFieldType::Copy() const Beschreibung: Name der angedockten DB --------------------------------------------------------------------*/ -SwDBNameField::SwDBNameField(SwDBNameFieldType* pTyp, const SwDBData& rDBData, ULONG nFmt) +SwDBNameField::SwDBNameField(SwDBNameFieldType* pTyp, const SwDBData& rDBData, sal_uLong nFmt) : SwDBNameInfField(pTyp, rDBData, nFmt) {} @@ -936,14 +936,14 @@ SwField* SwDBNameField::Copy() const /*-----------------06.03.98 16:16------------------- --------------------------------------------------*/ -BOOL SwDBNameField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const +sal_Bool SwDBNameField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const { return SwDBNameInfField::QueryValue(rAny, nWhichId ); } /*-----------------06.03.98 16:16------------------- --------------------------------------------------*/ -BOOL SwDBNameField::PutValue( const uno::Any& rAny, USHORT nWhichId ) +sal_Bool SwDBNameField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) { return SwDBNameInfField::PutValue(rAny, nWhichId ); } @@ -972,7 +972,7 @@ SwFieldType* SwDBSetNumberFieldType::Copy() const SwDBSetNumberField::SwDBSetNumberField(SwDBSetNumberFieldType* pTyp, const SwDBData& rDBData, - ULONG nFmt) + sal_uLong nFmt) : SwDBNameInfField(pTyp, rDBData, nFmt), nNumber(0) {} @@ -983,7 +983,7 @@ String SwDBSetNumberField::Expand() const if(0 !=(GetSubType() & nsSwExtendedSubType::SUB_INVISIBLE) || nNumber == 0) return aEmptyStr; else - return FormatNumber((USHORT)nNumber, GetFormat()); + return FormatNumber((sal_uInt16)nNumber, GetFormat()); //return(nNumber == 0 ? aEmptyStr : FormatNumber(nNumber, GetFormat())); } @@ -1015,9 +1015,9 @@ SwField* SwDBSetNumberField::Copy() const /*-----------------06.03.98 16:15------------------- --------------------------------------------------*/ -BOOL SwDBSetNumberField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const +sal_Bool SwDBSetNumberField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const { - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; switch( nWhichId ) { case FIELD_PROP_USHORT1: @@ -1034,16 +1034,16 @@ BOOL SwDBSetNumberField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const /*-----------------06.03.98 16:15------------------- --------------------------------------------------*/ -BOOL SwDBSetNumberField::PutValue( const uno::Any& rAny, USHORT nWhichId ) +sal_Bool SwDBSetNumberField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) { - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; switch( nWhichId ) { case FIELD_PROP_USHORT1: { sal_Int16 nSet = 0; rAny >>= nSet; - if(nSet < (INT16) SVX_NUMBER_NONE ) + if(nSet < (sal_Int16) SVX_NUMBER_NONE ) SetFormat(nSet); else { //exception(wrong_value) |