summaryrefslogtreecommitdiffstats
path: root/extensions/source/activex/SOActiveX.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/source/activex/SOActiveX.cxx')
-rw-r--r--extensions/source/activex/SOActiveX.cxx26
1 files changed, 6 insertions, 20 deletions
diff --git a/extensions/source/activex/SOActiveX.cxx b/extensions/source/activex/SOActiveX.cxx
index 2d8dc2a73b91..b72ab0d66ca0 100644
--- a/extensions/source/activex/SOActiveX.cxx
+++ b/extensions/source/activex/SOActiveX.cxx
@@ -20,21 +20,13 @@
// SOActiveX.cpp : Implementation of CSOActiveX
#include "StdAfx2.h"
+#include <so_activex.h>
#include "SOActiveX.h"
#include "SOComWindowPeer.h"
#include "SODispatchInterceptor.h"
#include "SOActionsApproval.h"
#include "com_uno_helper.h"
-#if defined __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
-#endif
-#include <so_activex.h>
-#if defined __clang__
-#pragma clang diagnostic pop
-#endif
-
#define STAROFFICE_WINDOWCLASS L"SOParentWindow"
@@ -359,7 +351,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CSOActiveX::Load( LPPROPERTYBAG pPropBag, LPER
// all information from the 'object' tag is in strings
if (aVal[ind].vt == VT_BSTR && !wcscmp(aPropNames[ind].pstrName, L"src"))
{
- mCurFileUrl = wcsdup( aVal[ind].bstrVal );
+ mCurFileUrl.AssignBSTR(aVal[ind].bstrVal);
}
else if( aVal[ind].vt == VT_BSTR
&& !wcscmp(aPropNames[ind].pstrName, L"readonly"))
@@ -384,16 +376,10 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CSOActiveX::Load( LPPROPERTYBAG pPropBag, LPER
return hr;
mbReadyForActivation = FALSE;
- if (BSTR bStrUrl = SysAllocString(mCurFileUrl))
- {
- hr = CBindStatusCallback<CSOActiveX>::Download(
- this, &CSOActiveX::CallbackCreateXInputStream, bStrUrl, m_spClientSite, FALSE);
- SysFreeString(bStrUrl);
- if (hr == MK_S_ASYNCHRONOUS)
- hr = S_OK;
- }
- else
- hr = E_OUTOFMEMORY;
+ hr = CBindStatusCallback<CSOActiveX>::Download(
+ this, &CSOActiveX::CallbackCreateXInputStream, mCurFileUrl, m_spClientSite, FALSE);
+ if (hr == MK_S_ASYNCHRONOUS)
+ hr = S_OK;
if ( !SUCCEEDED( hr ) )
{