diff options
author | Mikhail Voitenko <mav@openoffice.org> | 2002-06-11 07:03:19 +0000 |
---|---|---|
committer | Mikhail Voitenko <mav@openoffice.org> | 2002-06-11 07:03:19 +0000 |
commit | bfe2ac4ebf2675f228a2f3734da652421424ba54 (patch) | |
tree | 9f696c4ffc177fb2fd4717a2094852969edb6873 /odk/examples/OLE | |
parent | 2f0cd6bccb9c15a2307cf215a299087aae49f8a7 (diff) |
#100120# use new service only for 6.1
Diffstat (limited to 'odk/examples/OLE')
-rw-r--r-- | odk/examples/OLE/activex/SOActiveX.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/odk/examples/OLE/activex/SOActiveX.cpp b/odk/examples/OLE/activex/SOActiveX.cpp index a66ad05f5bc1..2f4fe817a7c4 100644 --- a/odk/examples/OLE/activex/SOActiveX.cpp +++ b/odk/examples/OLE/activex/SOActiveX.cpp @@ -337,8 +337,14 @@ HRESULT CSOActiveX::CreateFrameOldWay( HWND hwnd, int width, int height ) if( !SUCCEEDED( hr ) ) return hr; // create frame - hr = GetIDispByFunc( mpDispFactory, L"createInstance", &CComVariant( L"com.sun.star.frame.Frame" ), 1, mpDispFrame ); - if( !SUCCEEDED( hr ) ) return hr; + hr = GetIDispByFunc( mpDispFactory, L"createInstance", &CComVariant( L"com.sun.star.frame.Task" ), 1, mpDispFrame ); + if( !SUCCEEDED( hr ) || !mpDispFrame ) + { + // the interface com.sun.star.frame.Task is removed in 6.1 + // but the interface com.sun.star.frame.Frame has some bugs in 6.0 + hr = GetIDispByFunc( mpDispFactory, L"createInstance", &CComVariant( L"com.sun.star.frame.Frame" ), 1, mpDispFrame ); + if( !SUCCEEDED( hr ) ) return hr; + } // initialize frame CComVariant dummyResult; |