summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extensions/source/activex/main/SODispatchInterceptor.cpp11
-rw-r--r--extensions/source/activex/main/SODispatchInterceptor.h6
-rw-r--r--extensions/source/activex/main/so_activex.cpp15
-rw-r--r--extensions/source/activex/msidl/so_activex.idl4
4 files changed, 30 insertions, 6 deletions
diff --git a/extensions/source/activex/main/SODispatchInterceptor.cpp b/extensions/source/activex/main/SODispatchInterceptor.cpp
index 048f0e606734..c3b8f5b3b4f7 100644
--- a/extensions/source/activex/main/SODispatchInterceptor.cpp
+++ b/extensions/source/activex/main/SODispatchInterceptor.cpp
@@ -47,7 +47,14 @@ STDMETHODIMP SODispatchInterceptor::queryDispatch( IDispatch FAR* aURL,
if( !strncmp( OLE2T( aTargetUrl.bstrVal ), "ftp://", 6 )
|| !strncmp( OLE2T( aTargetUrl.bstrVal ), "http://", 7 )
|| !strncmp( OLE2T( aTargetUrl.bstrVal ), "file://", 7 ) )
- *retVal = this;
+ {
+ CComQIPtr< IDispatch, &IID_IDispatch > pIDisp( this );
+ if( pIDisp )
+ {
+ this->AddRef();
+ *retVal = pIDisp;
+ }
+ }
else
{
if( !m_xSlave )
@@ -63,9 +70,11 @@ STDMETHODIMP SODispatchInterceptor::queryDispatch( IDispatch FAR* aURL,
if( !SUCCEEDED( hr ) || aResult.vt != VT_DISPATCH || aResult.pdispVal == NULL ) return E_FAIL;
*retVal = aResult.pdispVal;
+ /* following code is workaround for UNO bug
CComQIPtr< IUnknown, &IID_IUnknown > pIUnk( *retVal );
if( pIUnk )
(*retVal)->AddRef();
+ */
}
return S_OK;
diff --git a/extensions/source/activex/main/SODispatchInterceptor.h b/extensions/source/activex/main/SODispatchInterceptor.h
index 922349bd0d38..d355a653cdbb 100644
--- a/extensions/source/activex/main/SODispatchInterceptor.h
+++ b/extensions/source/activex/main/SODispatchInterceptor.h
@@ -123,7 +123,7 @@ DECLARE_REGISTRY_RESOURCEID(IDR_SODISPATCHINTERCEPTOR)
virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Bridge_implementedInterfaces(
/* [retval][out] */ SAFEARRAY __RPC_FAR * __RPC_FAR *pVal)
{
- *pVal = SafeArrayCreateVector( VT_BSTR, 0, 3 );
+ *pVal = SafeArrayCreateVector( VT_BSTR, 0, 4 );
if( !*pVal )
return E_FAIL;
@@ -139,11 +139,11 @@ DECLARE_REGISTRY_RESOURCEID(IDR_SODISPATCHINTERCEPTOR)
ix = 2;
aInterface = CComBSTR( OLESTR( "com.sun.star.frame.XDispatch" ) );
SafeArrayPutElement( *pVal, &ix, aInterface );
- /*
+
ix = 3;
aInterface = CComBSTR( OLESTR( "com.sun.star.frame.XInterceptorInfo" ) );
SafeArrayPutElement( *pVal, &ix, aInterface );
- */
+
return S_OK;
}
};
diff --git a/extensions/source/activex/main/so_activex.cpp b/extensions/source/activex/main/so_activex.cpp
index bbcd2f023e01..4e54d9f27178 100644
--- a/extensions/source/activex/main/so_activex.cpp
+++ b/extensions/source/activex/main/so_activex.cpp
@@ -83,9 +83,14 @@ const char* aMimeType[] = { "application/vnd.stardivision.chart",
const char* aClassID = "{67F2A879-82D5-4A6D-8CC5-FFB3C114B69D}";
const char* aTypeLib = "{61FA3F13-8061-4796-B055-3697ED28CB38}";
+// ISOComWindowPeer interface information
const char* aInterIDWinPeer = "{BF5D10F3-8A10-4A0B-B150-2B6AA2D7E118}";
const char* aProxyStubWinPeer = "{00020424-0000-0000-C000-000000000046}";
+// ISODispatchInterceptor interface information
+const char* aInterIDDispInt = "{9337694C-B27D-4384-95A4-9D8E0EABC9E5}";
+const char* aProxyStubDispInt = "{00020424-0000-0000-C000-000000000046}";
+
const char* aLocalPrefix = "Software\\Classes\\";
BOOL createKey( HKEY hkey,
@@ -187,6 +192,12 @@ STDAPI DllRegisterServerNative( BOOL bForAllUsers )
&& createKey( hkey2, "ProxyStubClsid32", aProxyStubWinPeer )
&& createKey( hkey2, "TypeLib", aTypeLib, "Version", "1.0" )
&& ERROR_SUCCESS == RegCloseKey( hkey2 )
+ && createKey( hkey1, aInterIDDispInt, "ISODispatchInterceptor" )
+ && ERROR_SUCCESS == RegCreateKey( hkey1, aInterIDDispInt, &hkey2 )
+ && createKey( hkey2, "ProxyStubClsid", aProxyStubDispInt )
+ && createKey( hkey2, "ProxyStubClsid32", aProxyStubDispInt )
+ && createKey( hkey2, "TypeLib", aTypeLib, "Version", "1.0" )
+ && ERROR_SUCCESS == RegCloseKey( hkey2 )
&& ERROR_SUCCESS == RegCloseKey( hkey1 )
&& ERROR_SUCCESS == RegCloseKey( hkey ) );
}
@@ -276,6 +287,10 @@ STDAPI DllUnregisterServerNative( BOOL bForAllUsers )
if( ERROR_SUCCESS != SHDeleteKey( bForAllUsers ? HKEY_CLASSES_ROOT : HKEY_CURRENT_USER, aSubKey ) )
fErr = TRUE;
+ wsprintf( aSubKey, "%s\\Interface\\%s", aPrefix, aInterIDDispInt );
+ if( ERROR_SUCCESS != SHDeleteKey( bForAllUsers ? HKEY_CLASSES_ROOT : HKEY_CURRENT_USER, aSubKey ) )
+ fErr = TRUE;
+
return !fErr;
}
diff --git a/extensions/source/activex/msidl/so_activex.idl b/extensions/source/activex/msidl/so_activex.idl
index b2bac64f128b..6f60aacd314e 100644
--- a/extensions/source/activex/msidl/so_activex.idl
+++ b/extensions/source/activex/msidl/so_activex.idl
@@ -95,14 +95,14 @@ interface ISODispatchInterceptor : IDispatch
[id(6), helpstring("method queryDispatches")]
HRESULT queryDispatches( [in] SAFEARRAY(IDispatch*) aDescripts,
- [out,retval] SAFEARRAY(IDispatch*)* retVal );
+ [out,retval] SAFEARRAY(VARIANT)* retVal );
// com.sun.star.frame.XDispatch
[id(7), helpstring("method dispatch")]
HRESULT dispatch( [in] IDispatch* aURL,
- [in] SAFEARRAY(IDispatch*) aArgs );
+ [in] SAFEARRAY(VARIANT) aArgs );
[id(8), helpstring("method addStatusListener")]
HRESULT addStatusListener( [in] IDispatch* xControl,