From a43f7851c7d3424e845eedffe8ef25c6e9e8fe99 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 10 Sep 2010 13:10:07 +0200 Subject: sb129: #i113189# change UNO components to use passive registration --- sc/source/ui/unoobj/appluno.cxx | 120 ---------------------------------------- 1 file changed, 120 deletions(-) (limited to 'sc/source/ui/unoobj/appluno.cxx') diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx index 8b20d9849f47..437c220ba1c3 100644 --- a/sc/source/ui/unoobj/appluno.cxx +++ b/sc/source/ui/unoobj/appluno.cxx @@ -184,21 +184,6 @@ SC_SIMPLE_SERVICE_INFO( ScSpreadsheetSettings, "ScSpreadsheetSettings", SCSPREAD //------------------------------------------------------------------------ -static void lcl_WriteInfo( registry::XRegistryKey* pRegistryKey, - const rtl::OUString& rImplementationName, - const uno::Sequence< rtl::OUString >& rServices ) - throw( registry::InvalidRegistryException ) -{ - rtl::OUString aImpl(rtl::OUString::createFromAscii( "/" )); - aImpl += rImplementationName; - aImpl += rtl::OUString::createFromAscii( "/UNO/SERVICES" ); - uno::Reference xNewKey(pRegistryKey->createKey(aImpl)); - - const rtl::OUString* pArray = rServices.getConstArray(); - for( sal_Int32 i = 0; i < rServices.getLength(); i++ ) - xNewKey->createKey( pArray[i]); -} - extern "C" { SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( @@ -207,111 +192,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 */ ) { -- cgit From cd42389ad67b403a07a0dda8e2a6e213def49251 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Mon, 17 Jan 2011 13:20:22 +0100 Subject: removetooltypes01: #i112600# remove tooltypes from sc --- sc/source/ui/unoobj/appluno.cxx | 92 ++++++++++++++++++++--------------------- 1 file changed, 46 insertions(+), 46 deletions(-) (limited to 'sc/source/ui/unoobj/appluno.cxx') 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; iInsert(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 aSeq(nCount); rtl::OUString* pAry = aSeq.getArray(); - for (USHORT i=0; iGetString()); pAry[i] = aEntry; @@ -665,13 +665,13 @@ uno::Sequence 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 aSeq(nCount); sal_Int32* pAry = aSeq.getArray(); - for (USHORT i=0; iGetAppOptions()); @@ -765,10 +765,10 @@ static void lcl_FillSequence( uno::Sequence& 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& rSequence, co { uno::Sequence aArgSeq(nSeqCount); sheet::FunctionArgument* pArgAry = aArgSeq.getArray(); - for (USHORT i=0, j=0; i SAL_CALL ScFunctionListObj::getById( sal_Int const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList(); if ( pFuncList ) { - USHORT nCount = (USHORT)pFuncList->GetCount(); - for (USHORT nIndex=0; nIndexGetCount(); + for (sal_uInt16 nIndex=0; nIndexGetFunction(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; nIndexGetCount(); + for (sal_uInt16 nIndex=0; nIndexGetFunction(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 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 aSeq(nCount); rtl::OUString* pAry = aSeq.getArray(); - for (USHORT nIndex=0; nIndexGetFunction(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; nIndexGetCount(); + for (sal_uInt16 nIndex=0; nIndexGetFunction(nIndex); //! Case-insensitiv ??? if ( pDesc && pDesc->pFuncName && aNameStr == *pDesc->pFuncName ) - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } //------------------------------------------------------------------------ -- cgit