From 2f4197aa0bf5ef4282006ed300d59260cfe515f3 Mon Sep 17 00:00:00 2001 From: npower Developer Date: Fri, 5 Mar 2010 16:49:34 +0000 Subject: npower14miscfixes: #i103859# --- extensions/source/ole/oleobjw.cxx | 40 +++++++++++++++++++++++++++++++++++++++ extensions/source/ole/oleobjw.hxx | 1 + 2 files changed, 41 insertions(+) (limited to 'extensions/source') diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx index 79baf3c7d8df..ea9377ccf596 100644 --- a/extensions/source/ole/oleobjw.cxx +++ b/extensions/source/ole/oleobjw.cxx @@ -422,6 +422,46 @@ Any SAL_CALL IUnknownWrapper_Impl::getValue( const OUString& aPropertyName ) { o2u_attachCurrentThread(); ITypeInfo * pInfo = getTypeInfo(); + // I was going to implement an XServiceInfo interface to allow the type + // of the automation object to be exposed.. but it seems + // from looking at comments in the code that it is possible for + // this object to actually wrap an UNO object ( I guess if automation is + // used from MSO to create Openoffice objects ) Therefore, those objects + // will more than likely already have their own XServiceInfo interface. + // Instead here I chose a name that should be illegal both in COM and + // UNO ( from an IDL point of view ) therefore I think this is a safe + // hack + if ( aPropertyName.equals( rtl::OUString::createFromAscii("$GetTypeName") )) + { + if ( pInfo && m_sTypeName.getLength() == 0 ) + { + m_sTypeName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IDispatch") ); + CComBSTR sName; + + if ( SUCCEEDED( pInfo->GetDocumentation( -1, &sName, NULL, NULL, NULL ) ) ) + { + rtl::OUString sTmp( reinterpret_cast(LPCOLESTR(sName))); + if ( sTmp.indexOf('_') == 0 ) + sTmp = sTmp.copy(1); + // do we own the memory for pTypeLib, msdn doco is vague + // I'll assume we do + CComPtr< ITypeLib > pTypeLib; + unsigned int index; + if ( SUCCEEDED( pInfo->GetContainingTypeLib( &pTypeLib.p, &index )) ) + { + if ( SUCCEEDED( pTypeLib->GetDocumentation( -1, &sName, NULL, NULL, NULL ) ) ) + { + rtl::OUString sLibName( reinterpret_cast(LPCOLESTR(sName))); + m_sTypeName = sLibName.concat( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(".") ) ).concat( sTmp ); + + } + } + } + + } + ret <<= m_sTypeName; + return ret; + } FuncDesc aDescGet(pInfo); FuncDesc aDescPut(pInfo); VarDesc aVarDesc(pInfo); diff --git a/extensions/source/ole/oleobjw.hxx b/extensions/source/ole/oleobjw.hxx index 6d46452eb088..230de2b7dcf8 100644 --- a/extensions/source/ole/oleobjw.hxx +++ b/extensions/source/ole/oleobjw.hxx @@ -234,6 +234,7 @@ protected: Sequence m_seqTypes; CComPtr m_spUnknown; CComPtr m_spDispatch; + rtl::OUString m_sTypeName; // is "" ( not initialised ), "IDispatch" ( we have no idea ) or "SomeLibrary.SomeTypeName" if we managed to get a type /** This value is set dureing XInitialization::initialize. It indicates that the COM interface was transported as VT_DISPATCH in a VARIANT rather then a VT_UNKNOWN */ -- cgit From a203dad5a7670ee1e42b6df0021eea188ba0e70c Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Tue, 23 Mar 2010 15:03:04 +0100 Subject: fwk138: #i105549# integrate the patch --- extensions/source/abpilot/datasourcehandling.cxx | 19 ------------------- extensions/source/abpilot/datasourcehandling.hxx | 11 ----------- extensions/source/nsplugin/source/so_env.cxx | 21 --------------------- extensions/source/nsplugin/source/so_env.hxx | 3 --- extensions/source/nsplugin/source/so_instance.cxx | 8 -------- extensions/source/nsplugin/source/so_instance.hxx | 1 - extensions/source/nsplugin/source/so_main.cxx | 10 ---------- extensions/source/propctrlr/browserline.cxx | 6 ------ extensions/source/propctrlr/browserline.hxx | 1 - extensions/source/propctrlr/browserlistbox.cxx | 19 ------------------- extensions/source/propctrlr/browserlistbox.hxx | 2 -- extensions/source/propctrlr/handlerhelper.cxx | 8 -------- extensions/source/propctrlr/handlerhelper.hxx | 8 -------- 13 files changed, 117 deletions(-) (limited to 'extensions/source') diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx index b6d5298b7712..253e7d9e2d6e 100644 --- a/extensions/source/abpilot/datasourcehandling.cxx +++ b/extensions/source/abpilot/datasourcehandling.cxx @@ -346,25 +346,6 @@ namespace abp //===================================================================== //= ODataSource //===================================================================== - //--------------------------------------------------------------------- - ODataSource::ODataSource( const Reference< XMultiServiceFactory >& _rxORB, const ::rtl::OUString& _rName ) - :m_pImpl(new ODataSourceImpl(_rxORB)) - { - try - { - // get the data source context - Reference< XNameAccess > xContext = lcl_getDataSourceContext( m_pImpl->xORB ); - - // retrieve the UNO data source - if (xContext.is()) - xContext->getByName( _rName ) >>= m_pImpl->xDataSource; - } - catch(const Exception&) - { - DBG_ERROR("ODataSource::ODataSource: could not access the requested data source (caught an exception)!"); - } - } - //--------------------------------------------------------------------- ODataSource::ODataSource( const ODataSource& _rSource ) :m_pImpl( NULL ) diff --git a/extensions/source/abpilot/datasourcehandling.hxx b/extensions/source/abpilot/datasourcehandling.hxx index bcd4e64fd885..54819b9b9628 100644 --- a/extensions/source/abpilot/datasourcehandling.hxx +++ b/extensions/source/abpilot/datasourcehandling.hxx @@ -125,17 +125,6 @@ namespace abp // ---------------------------------------------------------------- // - ctor/dtor/assignment // ---------------------------------------------------------------- - /** ctor - @param _rxORB - the service factory to use to access the UNO objects - @param _rName - the name of the data source the object should represent - */ - ODataSource( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB, - const ::rtl::OUString& _rName - ); - /// constructs an object which is initially invalid ODataSource( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB diff --git a/extensions/source/nsplugin/source/so_env.cxx b/extensions/source/nsplugin/source/so_env.cxx index 36a2b3f3abec..34f4541b3330 100644 --- a/extensions/source/nsplugin/source/so_env.cxx +++ b/extensions/source/nsplugin/source/so_env.cxx @@ -210,27 +210,6 @@ const char* findProgramDir() return sProgram; } -// Return: "/home/build/staroffice/program" + original system library path -const char* getNewLibraryPath() -{ - static char pLPATH[NPP_PATH_MAX*4] = {0}; - - if (!pLPATH[0]) - { - const char* pProgram = findProgramDir(); - strcpy(pLPATH, "LD_LIBRARY_PATH="); - strcat(pLPATH, pProgram); - - char* pLD = getenv("LD_LIBRARY_PATH"); - if (pLD) - { - strcat(pLPATH, ":"); - strcat(pLPATH, pLD); - } - } - return pLPATH; -} - #ifdef WNT // Return SO executable absolute path, like "/home/build/staroffice/program/soffice" const char* findSofficeExecutable() diff --git a/extensions/source/nsplugin/source/so_env.hxx b/extensions/source/nsplugin/source/so_env.hxx index a4e98a878f2a..0cf1194c2dc2 100644 --- a/extensions/source/nsplugin/source/so_env.hxx +++ b/extensions/source/nsplugin/source/so_env.hxx @@ -69,9 +69,6 @@ // return the install path of staroffice, return value like "/home/build/staroffice" const char* findInstallDir(); -// return original system library path + "/home/build/staroffice/program" -const char* getNewLibraryPath(); - // return SO program dir absolute path, like "/home/build/staroffice/program" const char* findProgramDir(); diff --git a/extensions/source/nsplugin/source/so_instance.cxx b/extensions/source/nsplugin/source/so_instance.cxx index 65e511dfcc35..4b1e41f724bd 100644 --- a/extensions/source/nsplugin/source/so_instance.cxx +++ b/extensions/source/nsplugin/source/so_instance.cxx @@ -366,14 +366,6 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) return sal_True; } -sal_Bool SoPluginInstance::SetSODir(char * sDir) -{ - if(strlen(sDir) >= NPP_PATH_MAX) return sal_False; - - strcpy(sSO_Dir, sDir); - return sal_True; -} - sal_Bool SoPluginInstance::SetWindow(NSP_HWND hParent, int x, int y, int w, int h) { sal_Bool bRetval(sal_True); diff --git a/extensions/source/nsplugin/source/so_instance.hxx b/extensions/source/nsplugin/source/so_instance.hxx index 17266fcefc71..e95bb7c024ec 100644 --- a/extensions/source/nsplugin/source/so_instance.hxx +++ b/extensions/source/nsplugin/source/so_instance.hxx @@ -103,7 +103,6 @@ public: virtual sal_Bool Print(void) ; static sal_Bool ShutDown(void); - static sal_Bool SetSODir(char * sDir); static char* GetSODir(void) {return sSO_Dir;}; long GetParent(void) {return m_pParent;}; }; diff --git a/extensions/source/nsplugin/source/so_main.cxx b/extensions/source/nsplugin/source/so_main.cxx index 7932f63d6d4d..e49ce3d0c649 100644 --- a/extensions/source/nsplugin/source/so_main.cxx +++ b/extensions/source/nsplugin/source/so_main.cxx @@ -148,16 +148,6 @@ sal_Bool dump_plugin_message(PLUGIN_MSG* pMsg) return sal_True; } -int prepareEnviron() -{ - // if child process inherit the chdir() property from parent process, if yes, no getNewLibraryPath() needed - const char* pNewLibraryPath = getNewLibraryPath(); - putenv( (char*) pNewLibraryPath ); - SoPluginInstance::SetSODir((char *)findProgramDir()); - - return 0; -} - int Set_Window(PLUGIN_MSG* pMsg) { dump_plugin_message(pMsg); diff --git a/extensions/source/propctrlr/browserline.cxx b/extensions/source/propctrlr/browserline.cxx index 71a0bb2db3ce..108333076e19 100644 --- a/extensions/source/propctrlr/browserline.cxx +++ b/extensions/source/propctrlr/browserline.cxx @@ -319,12 +319,6 @@ namespace pcr return sDisplayName; } - //------------------------------------------------------------------ - sal_Bool OBrowserLine::IsPropertyInputEnabled( ) const - { - return ( m_nEnableFlags & PropertyLineElement::InputControl ) != 0; - } - //------------------------------------------------------------------ void OBrowserLine::SetReadOnly( bool _bReadOnly ) { diff --git a/extensions/source/propctrlr/browserline.hxx b/extensions/source/propctrlr/browserline.hxx index db747b4a6b99..7848b387d608 100644 --- a/extensions/source/propctrlr/browserline.hxx +++ b/extensions/source/propctrlr/browserline.hxx @@ -115,7 +115,6 @@ namespace pcr void EnablePropertyControls( sal_Int16 _nControls, bool _bEnable ); void EnablePropertyLine( bool _bEnable ); - sal_Bool IsPropertyInputEnabled( ) const; void SetReadOnly( bool _bReadOnly ); diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index 67257f960f5b..8a2885fc8c69 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -681,16 +681,6 @@ namespace pcr } } - //------------------------------------------------------------------------ - Any OBrowserListBox::GetPropertyValue( const ::rtl::OUString& _rEntryName ) const - { - Any aValue; - ListBoxLines::const_iterator line = m_aLines.find( _rEntryName ); - if ( line != m_aLines.end() ) - aValue = impl_getControlAsPropertyValue( line->second ); - return aValue; - } - //------------------------------------------------------------------------ sal_uInt16 OBrowserListBox::GetPropertyPos( const ::rtl::OUString& _rEntryName ) const { @@ -721,15 +711,6 @@ namespace pcr return ( NULL != _out_rpLine.get() ); } - //------------------------------------------------------------------------ - sal_Bool OBrowserListBox::IsPropertyInputEnabled( const ::rtl::OUString& _rEntryName ) const - { - BrowserLinePointer pLine; - if ( impl_getBrowserLineForName( _rEntryName, pLine ) ) - return pLine->IsPropertyInputEnabled(); - return sal_False; - } - //------------------------------------------------------------------------ void OBrowserListBox::EnablePropertyControls( const ::rtl::OUString& _rEntryName, sal_Int16 _nControls, bool _bEnable ) { diff --git a/extensions/source/propctrlr/browserlistbox.hxx b/extensions/source/propctrlr/browserlistbox.hxx index de0ebc9dd6b6..edd9d9bd40eb 100644 --- a/extensions/source/propctrlr/browserlistbox.hxx +++ b/extensions/source/propctrlr/browserlistbox.hxx @@ -163,13 +163,11 @@ namespace pcr void ChangeEntry( const OLineDescriptor&, sal_uInt16 nPos ); void SetPropertyValue( const ::rtl::OUString& rEntryName, const ::com::sun::star::uno::Any& rValue, bool _bUnknownValue ); - ::com::sun::star::uno::Any GetPropertyValue( const ::rtl::OUString& rEntryName ) const; sal_uInt16 GetPropertyPos( const ::rtl::OUString& rEntryName ) const; ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControl > GetPropertyControl( const ::rtl::OUString& rEntryName ); void EnablePropertyControls( const ::rtl::OUString& _rEntryName, sal_Int16 _nControls, bool _bEnable ); void EnablePropertyLine( const ::rtl::OUString& _rEntryName, bool _bEnable ); - sal_Bool IsPropertyInputEnabled( const ::rtl::OUString& _rEntryName ) const; sal_Int32 GetMinimumWidth(); sal_Int32 GetMinimumHeight(); diff --git a/extensions/source/propctrlr/handlerhelper.cxx b/extensions/source/propctrlr/handlerhelper.cxx index 0e82397dae2c..ae87a85a3722 100644 --- a/extensions/source/propctrlr/handlerhelper.cxx +++ b/extensions/source/propctrlr/handlerhelper.cxx @@ -159,14 +159,6 @@ namespace pcr } } - //-------------------------------------------------------------------- - Reference< XPropertyControl > PropertyHandlerHelper::createListBoxControl( const Reference< XPropertyControlFactory >& _rxControlFactory, - const Sequence< ::rtl::OUString >& _rInitialListEntries, sal_Bool _bReadOnlyControl, sal_Bool _bSorted ) - { - ::std::vector< ::rtl::OUString > aAsVector( _rInitialListEntries.getConstArray(), _rInitialListEntries.getConstArray() + _rInitialListEntries.getLength() ); - return lcl_implCreateListLikeControl( _rxControlFactory, aAsVector, _bReadOnlyControl, _bSorted, sal_True ); - } - //-------------------------------------------------------------------- Reference< XPropertyControl > PropertyHandlerHelper::createListBoxControl( const Reference< XPropertyControlFactory >& _rxControlFactory, const ::std::vector< ::rtl::OUString >& _rInitialListEntries, sal_Bool _bReadOnlyControl, sal_Bool _bSorted ) diff --git a/extensions/source/propctrlr/handlerhelper.hxx b/extensions/source/propctrlr/handlerhelper.hxx index bf42c5555f1b..e55cbf207526 100644 --- a/extensions/source/propctrlr/handlerhelper.hxx +++ b/extensions/source/propctrlr/handlerhelper.hxx @@ -102,14 +102,6 @@ namespace pcr @return the newly created control */ - static ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControl > - createListBoxControl( - const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControlFactory >& _rxControlFactory, - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rInitialListEntries, - sal_Bool _bReadOnlyControl, - sal_Bool _bSorted - ); - static ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControl > createListBoxControl( const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControlFactory >& _rxControlFactory, -- cgit From 13a7dda680909ce9558ba6c141b887feb04feb66 Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Tue, 13 Apr 2010 17:53:31 +0200 Subject: nspluginglobal: add patch to make mozilla plugin work when registered globally --- extensions/source/nsplugin/source/so_env.cxx | 126 ++++++++++++++++++++++++++- 1 file changed, 124 insertions(+), 2 deletions(-) (limited to 'extensions/source') diff --git a/extensions/source/nsplugin/source/so_env.cxx b/extensions/source/nsplugin/source/so_env.cxx index 36a2b3f3abec..aac37c8e4da4 100644 --- a/extensions/source/nsplugin/source/so_env.cxx +++ b/extensions/source/nsplugin/source/so_env.cxx @@ -31,6 +31,7 @@ #ifdef UNIX #include #include +#include #include // For vsnprintf() #define NSP_vsnprintf vsnprintf @@ -119,6 +120,114 @@ restoreUTF8(char *pPath) return 0; } +#ifdef UNIX +extern int nspluginOOoModuleHook (void** aResult); +int nspluginOOoModuleHook (void** aResult) +{ + void *dl_handle; + void *thisp; + + dl_handle = dlopen(NULL, RTLD_NOW); + if (!dl_handle) + { + fprintf (stderr, "Can't open myself '%s'\n", dlerror()); + return 1; + } + + Dl_info dl_info = { 0, }; + if(!dladdr((void *)nspluginOOoModuleHook, &dl_info)) + { + fprintf (stderr, "Can't find my own address '%s'\n", dlerror()); + return 1; + } + + if (!dl_info.dli_fname) + { + fprintf (stderr, "Can't find my own file name\n"); + return 1; + } + + char cwdstr[NPP_PATH_MAX]; + if (!getcwd (cwdstr, sizeof(cwdstr))) + { + fprintf (stderr, "Can't get cwd\n"); + return 1; + } + + char libFileName[NPP_PATH_MAX]; + + if (dl_info.dli_fname[0] != '/') + { + if ((strlen(cwdstr) + 1 + strlen(dl_info.dli_fname)) >= NPP_PATH_MAX) + { + fprintf (stderr, "Plugin path too long\n"); + return 1; + } + strcpy (libFileName, cwdstr); + strcat (libFileName, "/"); + strcat (libFileName, dl_info.dli_fname); + } + else + { + if (strlen(dl_info.dli_fname) >= NPP_PATH_MAX) + { + fprintf (stderr, "Plugin path too long\n"); + return 1; + } + strcpy (libFileName, dl_info.dli_fname); + } + + char *clobber; + static char realFileName[NPP_PATH_MAX] = {0}; +# define SEARCH_SUFFIX "/program/libnpsoplug" + + if (!(clobber = strstr (libFileName, SEARCH_SUFFIX))) + { + ssize_t len = readlink(libFileName, realFileName, NPP_PATH_MAX-1); + if (len == -1) + { + fprintf (stderr, "Couldn't read link '%s'\n", libFileName); + return 1; + } + realFileName[len] = '\0'; + if (!(clobber = strstr (realFileName, SEARCH_SUFFIX))) + { + fprintf (stderr, "Couldn't find suffix in '%s'\n", realFileName); + return 1; + } + *clobber = '\0'; + } + else + { + *clobber = '\0'; + strcpy (realFileName, libFileName); + } + + fprintf (stderr, "OpenOffice path before fixup is '%s'\n", realFileName); + + if (realFileName[0] != '/') { + /* a relative sym-link and we need to get an absolute path */ + char scratch[NPP_PATH_MAX] = {0}; + if (strlen (realFileName) + strlen (libFileName) + 2 >= NPP_PATH_MAX - 1) + { + fprintf (stderr, "Paths too long to fix up.\n"); + return 1; + } + strcpy (scratch, libFileName); + if (strrchr (scratch, '/')) /* remove the last element */ + *(strrchr (scratch, '/') + 1) = '\0'; + strcat (scratch, realFileName); + strcpy (realFileName, scratch); + } + + *aResult = realFileName; + + fprintf (stderr, "OpenOffice path is '%s'\n", realFileName); + + return 0; +} +#endif + // *aResult points the static string holding "/opt/staroffice8" int findReadSversion(void** aResult, int /*bWnt*/, const char* /*tag*/, const char* /*entry*/) { @@ -131,9 +240,22 @@ int findReadSversion(void** aResult, int /*bWnt*/, const char* /*tag*/, const ch // Filename of lnk file, eg. "soffice" char lnkFileName[NPP_PATH_MAX] = {0}; char* pTempZero = NULL; + + /* try to fetch a 'self' pointer */ + if (!nspluginOOoModuleHook (aResult)) + return 0; + + /* .. now in $HOME */ sprintf(lnkFileName, "%s/.mozilla/plugins/libnpsoplugin%s", getenv("HOME"), SAL_DLLEXTENSION); - if ((0 > readlink(lnkFileName, realFileName, NPP_PATH_MAX)) || - (NULL == (pTempZero = strstr(realFileName, "/program/libnpsoplugin" SAL_DLLEXTENSION)))) + ssize_t len = readlink(lnkFileName, realFileName, NPP_PATH_MAX-1); + if (-1 == len) + { + *realFileName = 0; + return -1; + } + realFileName[len] = '\0'; + + if (NULL == (pTempZero = strstr(realFileName, "/program/libnpsoplugin" SAL_DLLEXTENSION))) { *realFileName = 0; return -1; -- cgit From d687f220aa08ecbcfc7d50f05a9260f059054956 Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Wed, 14 Apr 2010 01:26:57 +0200 Subject: nspluginglobal: remove unsed variable for WaE builds... --- extensions/source/nsplugin/source/so_env.cxx | 1 - 1 file changed, 1 deletion(-) (limited to 'extensions/source') diff --git a/extensions/source/nsplugin/source/so_env.cxx b/extensions/source/nsplugin/source/so_env.cxx index aac37c8e4da4..88deb7ee5b37 100644 --- a/extensions/source/nsplugin/source/so_env.cxx +++ b/extensions/source/nsplugin/source/so_env.cxx @@ -125,7 +125,6 @@ extern int nspluginOOoModuleHook (void** aResult); int nspluginOOoModuleHook (void** aResult) { void *dl_handle; - void *thisp; dl_handle = dlopen(NULL, RTLD_NOW); if (!dl_handle) -- cgit From 2421e3d1a540110054f9e4a54bbe6ee41c6d774a Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Wed, 14 Apr 2010 09:58:22 +0200 Subject: nspluginglobal: ifdef UNIX -> LINUX and add missing ifdefs --- extensions/source/nsplugin/source/so_env.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'extensions/source') diff --git a/extensions/source/nsplugin/source/so_env.cxx b/extensions/source/nsplugin/source/so_env.cxx index 88deb7ee5b37..53bcdd69b6ad 100644 --- a/extensions/source/nsplugin/source/so_env.cxx +++ b/extensions/source/nsplugin/source/so_env.cxx @@ -31,7 +31,9 @@ #ifdef UNIX #include #include +#ifdef LINUX #include +#endif #include // For vsnprintf() #define NSP_vsnprintf vsnprintf @@ -120,7 +122,7 @@ restoreUTF8(char *pPath) return 0; } -#ifdef UNIX +#ifdef LINUX extern int nspluginOOoModuleHook (void** aResult); int nspluginOOoModuleHook (void** aResult) { @@ -240,12 +242,15 @@ int findReadSversion(void** aResult, int /*bWnt*/, const char* /*tag*/, const ch char lnkFileName[NPP_PATH_MAX] = {0}; char* pTempZero = NULL; +#ifdef LINUX /* try to fetch a 'self' pointer */ if (!nspluginOOoModuleHook (aResult)) return 0; /* .. now in $HOME */ +#endif sprintf(lnkFileName, "%s/.mozilla/plugins/libnpsoplugin%s", getenv("HOME"), SAL_DLLEXTENSION); +#ifdef LINUX ssize_t len = readlink(lnkFileName, realFileName, NPP_PATH_MAX-1); if (-1 == len) { @@ -255,6 +260,10 @@ int findReadSversion(void** aResult, int /*bWnt*/, const char* /*tag*/, const ch realFileName[len] = '\0'; if (NULL == (pTempZero = strstr(realFileName, "/program/libnpsoplugin" SAL_DLLEXTENSION))) +#else + if ((0 > readlink(lnkFileName, realFileName, NPP_PATH_MAX)) || + (NULL == (pTempZero = strstr(realFileName, "/program/libnpsoplugin" SAL_DLLEXTENSION)))) +#endif { *realFileName = 0; return -1; -- cgit From dc20aef81b2c6cac2fa175aad32bada6630a0aa0 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Wed, 14 Apr 2010 13:37:22 +0200 Subject: CWS nspluginglobal: #i49590#: warning fixed --- extensions/source/nsplugin/source/so_env.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extensions/source') diff --git a/extensions/source/nsplugin/source/so_env.cxx b/extensions/source/nsplugin/source/so_env.cxx index 88deb7ee5b37..f67853c90449 100644 --- a/extensions/source/nsplugin/source/so_env.cxx +++ b/extensions/source/nsplugin/source/so_env.cxx @@ -133,7 +133,7 @@ int nspluginOOoModuleHook (void** aResult) return 1; } - Dl_info dl_info = { 0, }; + Dl_info dl_info = { 0,0,0,0 }; if(!dladdr((void *)nspluginOOoModuleHook, &dl_info)) { fprintf (stderr, "Can't find my own address '%s'\n", dlerror()); -- cgit From dde1006548ba376ba1e55c5862165b92f8cf3b43 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 28 Apr 2010 07:21:13 +0200 Subject: fwk141: #i111191# do not use RegDeleteKeyEx for 32-bit library --- extensions/source/activex/main/so_activex.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'extensions/source') diff --git a/extensions/source/activex/main/so_activex.cpp b/extensions/source/activex/main/so_activex.cpp index 9c10fadadb06..b5793f6c7274 100644 --- a/extensions/source/activex/main/so_activex.cpp +++ b/extensions/source/activex/main/so_activex.cpp @@ -44,8 +44,10 @@ const REGSAM n32KeyAccess = KEY_ALL_ACCESS; #ifdef _AMD64_ const BOOL bX64 = TRUE; +#define REG_DELETE_KEY_A( key, aPath, nKeyAccess ) RegDeleteKeyExA( key, aPath, nKeyAccess, 0 ) #else const BOOL bX64 = FALSE; +#define REG_DELETE_KEY_A( key, aPath, nKeyAccess ) RegDeleteKeyA( key, aPath ) #endif // 10.11.2009 tkr: MinGW doesn't know anything about RegDeleteKeyExA if WINVER < 0x0502. @@ -363,7 +365,7 @@ HRESULT DeleteKeyTree( HKEY hkey, const char* pPath, REGSAM nKeyAccess ) RegCloseKey( hkey1 ),hkey1= NULL; // delete the key itself - return RegDeleteKeyExA( hkey, pPath, nKeyAccess & ( KEY_WOW64_64KEY | KEY_WOW64_32KEY ), 0 ); + return REG_DELETE_KEY_A( hkey, pPath, nKeyAccess & ( KEY_WOW64_64KEY | KEY_WOW64_32KEY ) ); } STDAPI DllUnregisterServerNative_Impl( int nMode, BOOL bForAllUsers, REGSAM nKeyAccess ) -- cgit From b32c3b61001429b6ca395fad77185bc2aa7660b4 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Tue, 13 Apr 2010 11:21:14 +0200 Subject: fwk140: #i110747# integrate the patch --- extensions/source/nsplugin/source/so_main.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extensions/source') diff --git a/extensions/source/nsplugin/source/so_main.cxx b/extensions/source/nsplugin/source/so_main.cxx index 7932f63d6d4d..c60da777689a 100644 --- a/extensions/source/nsplugin/source/so_main.cxx +++ b/extensions/source/nsplugin/source/so_main.cxx @@ -126,7 +126,7 @@ int find_free_node() return -1; } -int find_cur_node(sal_Int32 cur_id) +int find_cur_node(long cur_id) { for(int i=0; i Date: Wed, 14 Apr 2010 08:49:42 +0200 Subject: nativeb: #i110754#: rebranding nsplugin --- extensions/source/nsplugin/source/nsplugin.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extensions/source') diff --git a/extensions/source/nsplugin/source/nsplugin.rc b/extensions/source/nsplugin/source/nsplugin.rc index a97db09665e0..7d4b60b5bdad 100644 --- a/extensions/source/nsplugin/source/nsplugin.rc +++ b/extensions/source/nsplugin/source/nsplugin.rc @@ -26,5 +26,5 @@ ************************************************************************/ #define ADDITIONAL_VERINFO1 value "FileExtents", "sdc|sds|sda|sdd|sdp|smf|vor|sgl|sdw|sxc|stc|sxd|std|sxi|sti|sxm|sxw|sxg|stw|odt|ott|odm|oth|ods|ots|odg|otg|odp|otp|odf\0"\ value "FileOpenName", "StarCalc 3.0 - 5.0|StarChart 3.0 - 5.0|StarDraw 3.0 - 5.0|StarImpress 3.0 - 5.0|StarImpress-packed 3.0 - 5.0|StarMath 3.0 - 5.0|StarWriter Template 3.0 - 5.0|StarWriter Global 3.0 - 5.0|StarWriter 3.0 - 5.0|StarOffice 6.0/7 Spreadsheet|StarOffice 6.0/7 Spreadsheet Template|StarOffice 6.0/7 Drawing|StarOffice 6.0/7 Drawing Template|StarOffice 6.0/7 Presentation|StarOffice 6.0/7 Presentation Template|StarOffice 6.0/7 Formula|StarOffice 6.0/7 Text Document|StarOffice 6.0/7 Master Document|StarOffice 6.0/7 Text Document Template|OpenDocument Text|OpenDocument Text Template|OpenDocument Master Document|HTML Document Template|OpenDocument Spreadsheet|OpenDocument Spreadsheet Template|OpenDocument Drawing|OpenDocument Drawing Template|OpenDocument Presentation|OpenDocument Presentation Template|OpenDocument Formula\0" -#define ADDITIONAL_VERINFO2 value "FileDescription", "StarOffice/StarSuite Plug-in handles all its documents" value "ProductName", "StarOffice/StarSuite Plug-in" value "MIMEType", "application/vnd.stardivision.calc|application/vnd.stardivision.chart|application/vnd.stardivision.draw|application/vnd.stardivision.impress|application/vnd.stardivision.impress-packed|application/vnd.stardivision.math|application/vnd.stardivision.writer|application/vnd.stardivision.writer-global|application/vnd.staroffice.writer|application/vnd.sun.xml.calc|application/vnd.sun.xml.calc.template|application/vnd.sun.xml.draw|application/vnd.sun.xml.draw.template|" +#define ADDITIONAL_VERINFO2 value "FileDescription", "Oracle Open Office Plug-in handles all its documents" value "ProductName", "Oracle Open Office Plug-in" value "MIMEType", "application/vnd.stardivision.calc|application/vnd.stardivision.chart|application/vnd.stardivision.draw|application/vnd.stardivision.impress|application/vnd.stardivision.impress-packed|application/vnd.stardivision.math|application/vnd.stardivision.writer|application/vnd.stardivision.writer-global|application/vnd.staroffice.writer|application/vnd.sun.xml.calc|application/vnd.sun.xml.calc.template|application/vnd.sun.xml.draw|application/vnd.sun.xml.draw.template|" #define ADDITIONAL_VERINFO3 "application/vnd.sun.xml.impress|application/vnd.sun.xml.impress.template|application/vnd.sun.xml.math|application/vnd.sun.xml.writer|application/vnd.sun.xml.writer.global|application/vnd.sun.xml.writer.template|application/vnd.oasis.opendocument.text|application/vnd.oasis.opendocument.text-template|application/vnd.oasis.opendocument.text-master|application/vnd.oasis.opendocument.text-web|application/vnd.oasis.opendocument.spreadsheet|application/vnd.oasis.opendocument.spreadsheet-template|application/vnd.oasis.opendocument.graphics|application/vnd.oasis.opendocument.graphics-template|application/vnd.oasis.opendocument.presentation|application/vnd.oasis.opendocument.presentation-template|application/vnd.oasis.opendocument.formula\0" -- cgit