diff options
Diffstat (limited to 'editors/openoffice-3-devel/files/patch-i72372')
-rw-r--r-- | editors/openoffice-3-devel/files/patch-i72372 | 331 |
1 files changed, 0 insertions, 331 deletions
diff --git a/editors/openoffice-3-devel/files/patch-i72372 b/editors/openoffice-3-devel/files/patch-i72372 deleted file mode 100644 index 081bc0887742..000000000000 --- a/editors/openoffice-3-devel/files/patch-i72372 +++ /dev/null @@ -1,331 +0,0 @@ -Index: shlib.cxx -=================================================================== -RCS file: /cvs/udk/cppuhelper/source/shlib.cxx,v -retrieving revision 1.25 -diff -u -r1.25 shlib.cxx ---- cppuhelper/source/shlib.cxx 1 Dec 2006 17:18:35 -0000 1.25 -+++ cppuhelper/source/shlib.cxx 8 Dec 2006 16:31:16 -0000 -@@ -311,7 +311,6 @@ - pSym = osl_getFunctionSymbol( lib, aGetEnvName.pData ); - if (pSym != 0) - { -- uno_Environment * pCurrentEnv = 0; - uno_Environment * pEnv = 0; - - const sal_Char * pEnvTypeName = 0; -@@ -319,17 +318,6 @@ - &pEnvTypeName, &pEnv ); - OUString aEnvTypeName( OUString::createFromAscii( pEnvTypeName ) ); - -- if (! pEnv) -- { -- uno_getEnvironment( &pEnv, aEnvTypeName.pData, 0 ); -- } -- if (pEnv) -- { -- OUString aCppEnvTypeName = -- OUSTR(CPPU_CURRENT_LANGUAGE_BINDING_NAME); -- uno_getEnvironment( &pCurrentEnv, aCppEnvTypeName.pData, 0 ); -- } -- - OUString aGetFactoryName = OUSTR(COMPONENT_GETFACTORY); - pSym = osl_getFunctionSymbol( lib, aGetFactoryName.pData ); - if (pSym != 0) -@@ -337,59 +325,97 @@ - OString aImplName( - OUStringToOString( rImplName, RTL_TEXTENCODING_ASCII_US ) ); - -- if (pEnv && pCurrentEnv) -+ if (pEnv == NULL &&aEnvTypeName.equalsAsciiL( -+ RTL_CONSTASCII_STRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME))) -+ { -+ XInterface * pRet = -+ (XInterface *) (*((component_getFactoryFunc) pSym))( -+ aImplName.getStr(), xMgr.get(), xKey.get() ); -+ if (pRet) -+ { -+ xRet = pRet; -+ pRet->release(); -+ } -+ else -+ { -+ aExcMsg = aModulePath; -+ aExcMsg += OUSTR(": cannot get factory of demanded " -+ "implementation: "); -+ aExcMsg += OStringToOUString( -+ aImplName, RTL_TEXTENCODING_ASCII_US ); -+ } -+ } -+ else - { -- Mapping aCurrent2Env( pCurrentEnv, pEnv ); -- Mapping aEnv2Current( pEnv, pCurrentEnv ); -+ if (!pEnv) -+ uno_getEnvironment( &pEnv, aEnvTypeName.pData, 0 ); - -- if (aCurrent2Env.is() && aEnv2Current.is()) -+ uno_Environment * pCurrentEnv = 0; -+ if (pEnv) - { -- void * pSMgr = aCurrent2Env.mapInterface( -- xMgr.get(), ::getCppuType( &xMgr ) ); -- void * pKey = aCurrent2Env.mapInterface( -- xKey.get(), ::getCppuType( &xKey ) ); -- -- void * pSSF = -- (*((component_getFactoryFunc) pSym))( -- aImplName.getStr(), pSMgr, pKey ); -- -- if (pKey) -- { -- (*pEnv->pExtEnv->releaseInterface)( -- pEnv->pExtEnv, pKey ); -- } -- if (pSMgr) -- { -- (*pEnv->pExtEnv->releaseInterface)( -- pEnv->pExtEnv, pSMgr ); -- } -+ OUString aCppEnvTypeName = -+ OUSTR(CPPU_CURRENT_LANGUAGE_BINDING_NAME); -+ uno_getEnvironment( &pCurrentEnv, aCppEnvTypeName.pData, 0 ); -+ } -+ -+ -+ if (pEnv && pCurrentEnv) -+ { -+ Mapping aCurrent2Env( pCurrentEnv, pEnv ); -+ Mapping aEnv2Current( pEnv, pCurrentEnv ); - -- if (pSSF) -+ if (aCurrent2Env.is() && aEnv2Current.is()) - { -- aEnv2Current.mapInterface( -- reinterpret_cast< void ** >( &xRet ), -- pSSF, ::getCppuType( &xRet ) ); -- (*pEnv->pExtEnv->releaseInterface)( -- pEnv->pExtEnv, pSSF ); -+ void * pSMgr = aCurrent2Env.mapInterface( -+ xMgr.get(), ::getCppuType( &xMgr ) ); -+ void * pKey = aCurrent2Env.mapInterface( -+ xKey.get(), ::getCppuType( &xKey ) ); -+ -+ void * pSSF = -+ (*((component_getFactoryFunc) pSym))( -+ aImplName.getStr(), pSMgr, pKey ); -+ -+ if (pKey) -+ { -+ (*pEnv->pExtEnv->releaseInterface)( -+ pEnv->pExtEnv, pKey ); -+ } -+ if (pSMgr) -+ { -+ (*pEnv->pExtEnv->releaseInterface)( -+ pEnv->pExtEnv, pSMgr ); -+ } -+ -+ if (pSSF) -+ { -+ aEnv2Current.mapInterface( -+ reinterpret_cast< void ** >( &xRet ), -+ pSSF, ::getCppuType( &xRet ) ); -+ (*pEnv->pExtEnv->releaseInterface)( -+ pEnv->pExtEnv, pSSF ); -+ } -+ else -+ { -+ aExcMsg = aModulePath; -+ aExcMsg += OUSTR(": cannot get factory of " -+ "demanded implementation: "); -+ aExcMsg += OStringToOUString( -+ aImplName, RTL_TEXTENCODING_ASCII_US ); -+ } - } - else - { -- aExcMsg = aModulePath; -- aExcMsg += OUSTR(": cannot get factory of " -- "demanded implementation: "); -- aExcMsg += OStringToOUString( -- aImplName, RTL_TEXTENCODING_ASCII_US ); -+ aExcMsg = -+ OUSTR("cannot get uno mappings: C++ <=> UNO!"); - } - } - else - { -- aExcMsg = -- OUSTR("cannot get uno mappings: C++ <=> UNO!"); -+ aExcMsg = OUSTR("cannot get uno environments!"); - } -- } -- else -- { -- aExcMsg = OUSTR("cannot get uno environments!"); -+ -+ if (pCurrentEnv) -+ (*pCurrentEnv->release)( pCurrentEnv ); - } - } - else -@@ -401,8 +427,6 @@ - - if (pEnv) - (*pEnv->release)( pEnv ); -- if (pCurrentEnv) -- (*pCurrentEnv->release)( pCurrentEnv ); - } - else - { -@@ -463,7 +487,6 @@ - pSym = osl_getFunctionSymbol( lib, aGetEnvName.pData ); - if (pSym != 0) - { -- uno_Environment * pCurrentEnv = 0; - uno_Environment * pEnv = 0; - - const sal_Char * pEnvTypeName = 0; -@@ -471,65 +494,92 @@ - &pEnvTypeName, &pEnv ); - OUString aEnvTypeName( OUString::createFromAscii( pEnvTypeName ) ); - -- if (! pEnv) -- { -- uno_getEnvironment( &pEnv, aEnvTypeName.pData, 0 ); -- } -- if (pEnv) -- { -- OUString aCppEnvTypeName = -- OUSTR(CPPU_CURRENT_LANGUAGE_BINDING_NAME); -- uno_getEnvironment( &pCurrentEnv, aCppEnvTypeName.pData, 0 ); -- } -- - OUString aWriteInfoName = OUSTR(COMPONENT_WRITEINFO); - pSym = osl_getFunctionSymbol( lib, aWriteInfoName.pData ); - if (pSym != 0) - { -- if (pEnv && pCurrentEnv) -+ if (pEnv == NULL && aEnvTypeName.equalsAsciiL( -+ RTL_CONSTASCII_STRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME))) -+ { -+ if (xKey.is()) -+ { -+ bRet = (*((component_writeInfoFunc) pSym))( -+ xMgr.get(), xKey.get() ); -+ if (! bRet) -+ { -+ aExcMsg = aModulePath; -+ aExcMsg += OUSTR(": component_writeInfo() returned " -+ "false!"); -+ } -+ } -+ else -+ { -+ // key is mandatory -+ aExcMsg = aModulePath; -+ aExcMsg += OUSTR(": registry is mandatory to invoke " -+ "component_writeInfo()!"); -+ } -+ } -+ else - { -- Mapping aCurrent2Env( pCurrentEnv, pEnv ); -- if (aCurrent2Env.is()) -+ if (!pEnv) -+ uno_getEnvironment( &pEnv, aEnvTypeName.pData, 0 ); -+ -+ uno_Environment * pCurrentEnv = 0; -+ if (pEnv) - { -- void * pSMgr = aCurrent2Env.mapInterface( -- xMgr.get(), ::getCppuType( &xMgr ) ); -- void * pKey = aCurrent2Env.mapInterface( -- xKey.get(), ::getCppuType( &xKey ) ); -- if (pKey) -+ OUString aCppEnvTypeName = -+ OUSTR(CPPU_CURRENT_LANGUAGE_BINDING_NAME); -+ uno_getEnvironment( &pCurrentEnv, aCppEnvTypeName.pData, 0 ); -+ } -+ -+ if (pEnv && pCurrentEnv) -+ { -+ Mapping aCurrent2Env( pCurrentEnv, pEnv ); -+ if (aCurrent2Env.is()) - { -- bRet = (*((component_writeInfoFunc) pSym))( -- pSMgr, pKey ); -- (*pEnv->pExtEnv->releaseInterface)( -- pEnv->pExtEnv, pKey ); -- if (! bRet) -+ void * pSMgr = aCurrent2Env.mapInterface( -+ xMgr.get(), ::getCppuType( &xMgr ) ); -+ void * pKey = aCurrent2Env.mapInterface( -+ xKey.get(), ::getCppuType( &xKey ) ); -+ if (pKey) -+ { -+ bRet = (*((component_writeInfoFunc) pSym))( -+ pSMgr, pKey ); -+ (*pEnv->pExtEnv->releaseInterface)( -+ pEnv->pExtEnv, pKey ); -+ if (! bRet) -+ { -+ aExcMsg = aModulePath; -+ aExcMsg += OUSTR(": component_writeInfo() " -+ "returned false!"); -+ } -+ } -+ else - { -+ // key is mandatory - aExcMsg = aModulePath; -- aExcMsg += OUSTR(": component_writeInfo() " -- "returned false!"); -+ aExcMsg += OUSTR(": registry is mandatory to invoke" -+ " component_writeInfo()!"); -+ } -+ -+ if (pSMgr) -+ { -+ (*pEnv->pExtEnv->releaseInterface)( -+ pEnv->pExtEnv, pSMgr ); - } - } - else - { -- // key is mandatory -- aExcMsg = aModulePath; -- aExcMsg += OUSTR(": registry is mandatory to invoke" -- " component_writeInfo()!"); -- } -- -- if (pSMgr) -- { -- (*pEnv->pExtEnv->releaseInterface)( -- pEnv->pExtEnv, pSMgr ); -+ aExcMsg = OUSTR("cannot get uno mapping: C++ <=> UNO!"); - } - } - else - { -- aExcMsg = OUSTR("cannot get uno mapping: C++ <=> UNO!"); -+ aExcMsg = OUSTR("cannot get uno environments!"); - } -- } -- else -- { -- aExcMsg = OUSTR("cannot get uno environments!"); -+ if (pCurrentEnv) -+ (*pCurrentEnv->release)( pCurrentEnv ); - } - } - else -@@ -541,8 +591,6 @@ - - if (pEnv) - (*pEnv->release)( pEnv ); -- if (pCurrentEnv) -- (*pCurrentEnv->release)( pCurrentEnv ); - } - else - { |