diff options
Diffstat (limited to 'sc/source/ui/unoobj/appluno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/appluno.cxx | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx index 437c220ba1c3..6a6d473f78c0 100644 --- a/sc/source/ui/unoobj/appluno.cxx +++ b/sc/source/ui/unoobj/appluno.cxx @@ -418,74 +418,74 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue( ScModule* pScMod = SC_MOD(); ScAppOptions aAppOpt(pScMod->GetAppOptions()); ScInputOptions aInpOpt(pScMod->GetInputOptions()); - BOOL bSaveApp = FALSE; - BOOL bSaveInp = FALSE; + sal_Bool bSaveApp = sal_False; + sal_Bool bSaveInp = sal_False; // print options aren't loaded until needed if (aString.EqualsAscii( SC_UNONAME_DOAUTOCP )) { aAppOpt.SetAutoComplete( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveApp = TRUE; + bSaveApp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_ENTERED )) { aInpOpt.SetEnterEdit( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_EXPREF )) { aInpOpt.SetExpandRefs( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_EXTFMT )) { aInpOpt.SetExtendFormat( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_LINKUPD )) { aAppOpt.SetLinkMode( (ScLkUpdMode) ScUnoHelpFunctions::GetInt16FromAny( aValue ) ); - bSaveApp = TRUE; + bSaveApp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_MARKHDR )) { aInpOpt.SetMarkHeader( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_MOVESEL )) { aInpOpt.SetMoveSelection( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_RANGEFIN )) { aInpOpt.SetRangeFinder( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_USETABCOL )) { aInpOpt.SetUseTabCol( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_PRMETRICS )) { aInpOpt.SetTextWysiwyg( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_REPLWARN )) { aInpOpt.SetReplaceCellsWarn( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_METRIC )) { aAppOpt.SetAppMetric( (FieldUnit) ScUnoHelpFunctions::GetInt16FromAny( aValue ) ); - bSaveApp = TRUE; + bSaveApp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_MOVEDIR )) { aInpOpt.SetMoveDir( ScUnoHelpFunctions::GetInt16FromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_SCALE )) { @@ -506,12 +506,12 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue( aAppOpt.SetZoom( nVal ); aAppOpt.SetZoomType( SVX_ZOOM_PERCENT ); } - bSaveApp = TRUE; + bSaveApp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_STBFUNC )) { aAppOpt.SetStatusFunc( ScUnoHelpFunctions::GetInt16FromAny( aValue ) ); - bSaveApp = TRUE; + bSaveApp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_ULISTS )) { @@ -523,16 +523,16 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue( // mehr tut ScGlobal::SetUserList auch nicht pUserList->FreeAll(); // alle Eintraege raus - USHORT nCount = (USHORT)aSeq.getLength(); + sal_uInt16 nCount = (sal_uInt16)aSeq.getLength(); const rtl::OUString* pAry = aSeq.getConstArray(); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) { String aEntry = pAry[i]; ScUserListData* pData = new ScUserListData(aEntry); if (!pUserList->Insert(pData)) // hinten anhaengen delete pData; // sollte nicht vorkommen } - bSaveApp = TRUE; // Liste wird mit den App-Optionen gespeichert + bSaveApp = sal_True; // Liste wird mit den App-Optionen gespeichert } } else if (aString.EqualsAscii( SC_UNONAME_PRALLSH )) @@ -584,7 +584,7 @@ uno::Any SAL_CALL ScSpreadsheetSettings::getPropertyValue( const rtl::OUString& else if (aString.EqualsAscii( SC_UNONAME_STBFUNC )) aRet <<= (sal_Int16) aAppOpt.GetStatusFunc(); else if (aString.EqualsAscii( SC_UNONAME_SCALE )) { - INT16 nZoomVal = 0; + sal_Int16 nZoomVal = 0; switch ( aAppOpt.GetZoomType() ) { case SVX_ZOOM_PERCENT: nZoomVal = aAppOpt.GetZoom(); break; @@ -603,10 +603,10 @@ uno::Any SAL_CALL ScSpreadsheetSettings::getPropertyValue( const rtl::OUString& ScUserList* pUserList = ScGlobal::GetUserList(); if (pUserList) { - USHORT nCount = pUserList->GetCount(); + sal_uInt16 nCount = pUserList->GetCount(); uno::Sequence<rtl::OUString> aSeq(nCount); rtl::OUString* pAry = aSeq.getArray(); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) { String aEntry((*pUserList)[i]->GetString()); pAry[i] = aEntry; @@ -665,13 +665,13 @@ uno::Sequence<sal_Int32> SAL_CALL ScRecentFunctionsObj::getRecentFunctionIds() { ScUnoGuard aGuard; const ScAppOptions& rOpt = SC_MOD()->GetAppOptions(); - USHORT nCount = rOpt.GetLRUFuncListCount(); - const USHORT* pFuncs = rOpt.GetLRUFuncList(); + sal_uInt16 nCount = rOpt.GetLRUFuncListCount(); + const sal_uInt16* pFuncs = rOpt.GetLRUFuncList(); if (pFuncs) { uno::Sequence<sal_Int32> aSeq(nCount); sal_Int32* pAry = aSeq.getArray(); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) pAry[i] = pFuncs[i]; return aSeq; } @@ -683,12 +683,12 @@ void SAL_CALL ScRecentFunctionsObj::setRecentFunctionIds( throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = (USHORT) Min( aRecentFunctionIds.getLength(), (INT32) LRU_MAX ); - const INT32* pAry = aRecentFunctionIds.getConstArray(); + sal_uInt16 nCount = (sal_uInt16) Min( aRecentFunctionIds.getLength(), (sal_Int32) LRU_MAX ); + const sal_Int32* pAry = aRecentFunctionIds.getConstArray(); - USHORT* pFuncs = nCount ? new USHORT[nCount] : NULL; - for (USHORT i=0; i<nCount; i++) - pFuncs[i] = (USHORT)pAry[i]; //! auf gueltige Werte testen? + sal_uInt16* pFuncs = nCount ? new sal_uInt16[nCount] : NULL; + for (sal_uInt16 i=0; i<nCount; i++) + pFuncs[i] = (sal_uInt16)pAry[i]; //! auf gueltige Werte testen? ScModule* pScMod = SC_MOD(); ScAppOptions aNewOpts(pScMod->GetAppOptions()); @@ -765,10 +765,10 @@ static void lcl_FillSequence( uno::Sequence<beans::PropertyValue>& rSequence, co pArray[4].Name = rtl::OUString::createFromAscii( SC_UNONAME_ARGUMENTS ); if (rDesc.ppDefArgNames && rDesc.ppDefArgDescs && rDesc.pDefArgFlags ) { - USHORT nCount = rDesc.nArgCount; + sal_uInt16 nCount = rDesc.nArgCount; if (nCount >= VAR_ARGS) nCount -= VAR_ARGS - 1; - USHORT nSeqCount = rDesc.GetSuppressedArgCount(); + sal_uInt16 nSeqCount = rDesc.GetSuppressedArgCount(); if (nSeqCount >= VAR_ARGS) nSeqCount -= VAR_ARGS - 1; @@ -776,7 +776,7 @@ static void lcl_FillSequence( uno::Sequence<beans::PropertyValue>& rSequence, co { uno::Sequence<sheet::FunctionArgument> aArgSeq(nSeqCount); sheet::FunctionArgument* pArgAry = aArgSeq.getArray(); - for (USHORT i=0, j=0; i<nCount; i++) + for (sal_uInt16 i=0, j=0; i<nCount; i++) { if (!rDesc.pDefArgFlags[i].bSuppress) { @@ -805,8 +805,8 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScFunctionListObj::getById( sal_Int const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList(); if ( pFuncList ) { - USHORT nCount = (USHORT)pFuncList->GetCount(); - for (USHORT nIndex=0; nIndex<nCount; nIndex++) + sal_uInt16 nCount = (sal_uInt16)pFuncList->GetCount(); + for (sal_uInt16 nIndex=0; nIndex<nCount; nIndex++) { const ScFuncDesc* pDesc = pFuncList->GetFunction(nIndex); if ( pDesc && pDesc->nFIndex == nId ) @@ -836,8 +836,8 @@ uno::Any SAL_CALL ScFunctionListObj::getByName( const rtl::OUString& aName ) const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList(); if ( pFuncList ) { - USHORT nCount = (USHORT)pFuncList->GetCount(); - for (USHORT nIndex=0; nIndex<nCount; nIndex++) + sal_uInt16 nCount = (sal_uInt16)pFuncList->GetCount(); + for (sal_uInt16 nIndex=0; nIndex<nCount; nIndex++) { const ScFuncDesc* pDesc = pFuncList->GetFunction(nIndex); //! Case-insensitiv ??? @@ -862,10 +862,10 @@ uno::Any SAL_CALL ScFunctionListObj::getByName( const rtl::OUString& aName ) sal_Int32 SAL_CALL ScFunctionListObj::getCount() throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = 0; + sal_uInt16 nCount = 0; const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList(); if ( pFuncList ) - nCount = (USHORT)pFuncList->GetCount(); + nCount = (sal_uInt16)pFuncList->GetCount(); return nCount; } @@ -925,10 +925,10 @@ uno::Sequence<rtl::OUString> SAL_CALL ScFunctionListObj::getElementNames() throw const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList(); if ( pFuncList ) { - USHORT nCount = (USHORT)pFuncList->GetCount(); + sal_uInt16 nCount = (sal_uInt16)pFuncList->GetCount(); uno::Sequence<rtl::OUString> aSeq(nCount); rtl::OUString* pAry = aSeq.getArray(); - for (USHORT nIndex=0; nIndex<nCount; nIndex++) + for (sal_uInt16 nIndex=0; nIndex<nCount; nIndex++) { const ScFuncDesc* pDesc = pFuncList->GetFunction(nIndex); if ( pDesc && pDesc->pFuncName ) @@ -947,16 +947,16 @@ sal_Bool SAL_CALL ScFunctionListObj::hasByName( const rtl::OUString& aName ) const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList(); if ( pFuncList ) { - USHORT nCount = (USHORT)pFuncList->GetCount(); - for (USHORT nIndex=0; nIndex<nCount; nIndex++) + sal_uInt16 nCount = (sal_uInt16)pFuncList->GetCount(); + for (sal_uInt16 nIndex=0; nIndex<nCount; nIndex++) { const ScFuncDesc* pDesc = pFuncList->GetFunction(nIndex); //! Case-insensitiv ??? if ( pDesc && pDesc->pFuncName && aNameStr == *pDesc->pFuncName ) - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } //------------------------------------------------------------------------ |