diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2011-03-10 16:55:21 -0500 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-03-10 20:21:13 -0500 |
commit | 12343c15568dcc2c9209d8ca41fda2263122448f (patch) | |
tree | 3212a89c6cd8ea2e0aee7103aa9669bbb8a6f307 /sc/source/ui/unoobj/appluno.cxx | |
parent | 99745dbcbb25b61437914c9782475d0b67a4b0bd (diff) | |
parent | ce6308e4fad2281241bf4ca78280eba29f744d43 (diff) |
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101
Diffstat (limited to 'sc/source/ui/unoobj/appluno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/appluno.cxx | 181 |
1 files changed, 38 insertions, 143 deletions
diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx index 76c894fae0ae..bdafcadfb4f3 100644 --- a/sc/source/ui/unoobj/appluno.cxx +++ b/sc/source/ui/unoobj/appluno.cxx @@ -207,111 +207,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void * /* pServiceManager */, registry::XRegistryKey * pRegistryKey ) -{ - if (pRegistryKey) - { - try - { - lcl_WriteInfo( pRegistryKey, - ScSpreadsheetSettings::getImplementationName_Static(), - ScSpreadsheetSettings::getSupportedServiceNames_Static() ); - - lcl_WriteInfo( pRegistryKey, - ScRecentFunctionsObj::getImplementationName_Static(), - ScRecentFunctionsObj::getSupportedServiceNames_Static() ); - - lcl_WriteInfo( pRegistryKey, - ScFunctionListObj::getImplementationName_Static(), - ScFunctionListObj::getSupportedServiceNames_Static() ); - - lcl_WriteInfo( pRegistryKey, - ScAutoFormatsObj::getImplementationName_Static(), - ScAutoFormatsObj::getSupportedServiceNames_Static() ); - - lcl_WriteInfo( pRegistryKey, - ScFunctionAccess::getImplementationName_Static(), - ScFunctionAccess::getSupportedServiceNames_Static() ); - - lcl_WriteInfo( pRegistryKey, - ScFilterOptionsObj::getImplementationName_Static(), - ScFilterOptionsObj::getSupportedServiceNames_Static() ); - - lcl_WriteInfo( pRegistryKey, - ScXMLImport_getImplementationName(), - ScXMLImport_getSupportedServiceNames() ); - - lcl_WriteInfo( pRegistryKey, - ScXMLImport_Meta_getImplementationName(), - ScXMLImport_Meta_getSupportedServiceNames() ); - - lcl_WriteInfo( pRegistryKey, - ScXMLImport_Styles_getImplementationName(), - ScXMLImport_Styles_getSupportedServiceNames() ); - - lcl_WriteInfo( pRegistryKey, - ScXMLImport_Content_getImplementationName(), - ScXMLImport_Content_getSupportedServiceNames() ); - - lcl_WriteInfo( pRegistryKey, - ScXMLImport_Settings_getImplementationName(), - ScXMLImport_Settings_getSupportedServiceNames() ); - - lcl_WriteInfo( pRegistryKey, - ScXMLOOoExport_getImplementationName(), - ScXMLOOoExport_getSupportedServiceNames() ); - - lcl_WriteInfo( pRegistryKey, - ScXMLOOoExport_Meta_getImplementationName(), - ScXMLOOoExport_Meta_getSupportedServiceNames() ); - - lcl_WriteInfo( pRegistryKey, - ScXMLOOoExport_Styles_getImplementationName(), - ScXMLOOoExport_Styles_getSupportedServiceNames() ); - - lcl_WriteInfo( pRegistryKey, - ScXMLOOoExport_Content_getImplementationName(), - ScXMLOOoExport_Content_getSupportedServiceNames() ); - - lcl_WriteInfo( pRegistryKey, - ScXMLOOoExport_Settings_getImplementationName(), - ScXMLOOoExport_Settings_getSupportedServiceNames() ); - - lcl_WriteInfo( pRegistryKey, - ScXMLOasisExport_getImplementationName(), - ScXMLOasisExport_getSupportedServiceNames() ); - - lcl_WriteInfo( pRegistryKey, - ScXMLOasisExport_Meta_getImplementationName(), - ScXMLOasisExport_Meta_getSupportedServiceNames() ); - - lcl_WriteInfo( pRegistryKey, - ScXMLOasisExport_Styles_getImplementationName(), - ScXMLOasisExport_Styles_getSupportedServiceNames() ); - - lcl_WriteInfo( pRegistryKey, - ScXMLOasisExport_Content_getImplementationName(), - ScXMLOasisExport_Content_getSupportedServiceNames() ); - - lcl_WriteInfo( pRegistryKey, - ScXMLOasisExport_Settings_getImplementationName(), - ScXMLOasisExport_Settings_getSupportedServiceNames() ); - - lcl_WriteInfo( pRegistryKey, - ScDocument_getImplementationName(), - ScDocument_getSupportedServiceNames() ); - - return sal_True; - } - catch (registry::InvalidRegistryException&) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - return sal_False; -} - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ ) { @@ -538,74 +433,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 = false; + sal_Bool bSaveInp = 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 )) { @@ -626,12 +521,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 )) { @@ -643,16 +538,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 )) @@ -704,7 +599,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; @@ -723,10 +618,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; @@ -785,13 +680,13 @@ uno::Sequence<sal_Int32> SAL_CALL ScRecentFunctionsObj::getRecentFunctionIds() { SolarMutexGuard 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; } @@ -803,12 +698,12 @@ void SAL_CALL ScRecentFunctionsObj::setRecentFunctionIds( throw(uno::RuntimeException) { SolarMutexGuard aGuard; - USHORT nCount = (USHORT) Min( aRecentFunctionIds.getLength(), (INT32) LRU_MAX ); + sal_uInt16 nCount = (sal_uInt16) Min( aRecentFunctionIds.getLength(), (INT32) LRU_MAX ); const 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()); @@ -885,10 +780,10 @@ static void lcl_FillSequence( uno::Sequence<beans::PropertyValue>& rSequence, co pArray[4].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( 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; @@ -896,7 +791,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) { @@ -925,8 +820,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 ) @@ -954,8 +849,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 ??? @@ -1069,7 +964,7 @@ sal_Bool SAL_CALL ScFunctionListObj::hasByName( const rtl::OUString& aName ) return sal_True; } } - return sal_False; + return false; } //------------------------------------------------------------------------ |