summaryrefslogtreecommitdiff
path: root/extensions/source/ole
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/source/ole')
-rw-r--r--extensions/source/ole/oleobjw.cxx23
-rw-r--r--extensions/source/ole/unoconversionutilities.hxx9
2 files changed, 15 insertions, 17 deletions
diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx
index 01f8aa368596..364e25670017 100644
--- a/extensions/source/ole/oleobjw.cxx
+++ b/extensions/source/ole/oleobjw.cxx
@@ -25,7 +25,7 @@
#include "osl/doublecheckedlocking.h"
#include "osl/thread.h"
-#include "boost/scoped_array.hpp"
+#include <memory>
#include <com/sun/star/script/FailReason.hpp>
#include <com/sun/star/beans/XMaterialHolder.hpp>
#include <com/sun/star/script/XTypeConverter.hpp>
@@ -54,7 +54,6 @@
#include "unoobjw.hxx"
#include <stdio.h>
using namespace std;
-using namespace boost;
using namespace osl;
using namespace cppu;
using namespace com::sun::star::script;
@@ -761,8 +760,8 @@ Any IUnknownWrapper_Impl::invokeWithDispIdUnoTlb(const OUString& sFunctionName,
// Then out and in/out parameters have to be treated differently than
// with common COM objects.
sal_Bool bJScriptObject= isJScriptObject();
- scoped_array<CComVariant> sarParams;
- scoped_array<CComVariant> sarParamsRef;
+ std::unique_ptr<CComVariant[]> sarParams;
+ std::unique_ptr<CComVariant[]> sarParamsRef;
CComVariant *pVarParams= NULL;
CComVariant *pVarParamsRef= NULL;
sal_Bool bConvRet= sal_True;
@@ -1298,9 +1297,9 @@ uno::Any SAL_CALL IUnknownWrapper_Impl::directInvoke( const OUString& aName, con
{
DISPPARAMS dispparams = {NULL, NULL, 0, 0};
- scoped_array<DISPID> arDispidNamedArgs;
- scoped_array<CComVariant> ptrArgs;
- scoped_array<CComVariant> ptrRefArgs; // referenced arguments
+ std::unique_ptr<DISPID[]> arDispidNamedArgs;
+ std::unique_ptr<CComVariant[]> ptrArgs;
+ std::unique_ptr<CComVariant[]> ptrRefArgs; // referenced arguments
CComVariant * arArgs = NULL;
CComVariant * arRefArgs = NULL;
@@ -1319,7 +1318,7 @@ uno::Any SAL_CALL IUnknownWrapper_Impl::directInvoke( const OUString& aName, con
if ( pInvkinds[nStep] == INVOKE_PROPERTYPUT )
nSizeAr = dispparams.cNamedArgs;
- scoped_array<OLECHAR*> saNames(new OLECHAR*[nSizeAr]);
+ std::unique_ptr<OLECHAR*[]> saNames(new OLECHAR*[nSizeAr]);
OLECHAR ** pNames = saNames.get();
pNames[0] = const_cast<OLECHAR*>(reinterpret_cast<LPCOLESTR>(aName.getStr()));
@@ -1687,9 +1686,9 @@ Any IUnknownWrapper_Impl::invokeWithDispIdComTlb(FuncDesc& aFuncDesc,
sal_Int32 i = 0;
sal_Int32 nUnoArgs = Params.getLength();
DISPID idPropertyPut = DISPID_PROPERTYPUT;
- scoped_array<DISPID> arDispidNamedArgs;
- scoped_array<CComVariant> ptrArgs;
- scoped_array<CComVariant> ptrRefArgs; // referenced arguments
+ std::unique_ptr<DISPID[]> arDispidNamedArgs;
+ std::unique_ptr<CComVariant[]> ptrArgs;
+ std::unique_ptr<CComVariant[]> ptrRefArgs; // referenced arguments
CComVariant * arArgs = NULL;
CComVariant * arRefArgs = NULL;
sal_Int32 revIndex = 0;
@@ -1762,7 +1761,7 @@ Any IUnknownWrapper_Impl::invokeWithDispIdComTlb(FuncDesc& aFuncDesc,
nSizeAr = dispparams.cNamedArgs; //counts the DISID_PROPERTYPUT
}
- scoped_array<OLECHAR*> saNames(new OLECHAR*[nSizeAr]);
+ std::unique_ptr<OLECHAR*[]> saNames(new OLECHAR*[nSizeAr]);
OLECHAR ** arNames = saNames.get();
arNames[0] = const_cast<OLECHAR*>(reinterpret_cast<LPCOLESTR>(sFuncName.getStr()));
diff --git a/extensions/source/ole/unoconversionutilities.hxx b/extensions/source/ole/unoconversionutilities.hxx
index 1984d1003e0a..122acc5137a7 100644
--- a/extensions/source/ole/unoconversionutilities.hxx
+++ b/extensions/source/ole/unoconversionutilities.hxx
@@ -19,7 +19,7 @@
#ifndef INCLUDED_EXTENSIONS_SOURCE_OLE_UNOCONVERSIONUTILITIES_HXX
#define INCLUDED_EXTENSIONS_SOURCE_OLE_UNOCONVERSIONUTILITIES_HXX
-#include "boost/scoped_array.hpp"
+#include <memory>
#include "com/sun/star/script/XInvocationAdapterFactory.hpp"
#include "com/sun/star/script/XInvocationAdapterFactory2.hpp"
#include "com/sun/star/script/XTypeConverter.hpp"
@@ -60,7 +60,6 @@ using namespace com::sun::star::bridge;
using namespace com::sun::star::bridge::ModelDependent;
#endif
using namespace com::sun::star::bridge::oleautomation;
-using namespace boost;
namespace ole_adapter
{
extern std::unordered_map<sal_uInt32, sal_uInt32> AdapterToWrapperMap;
@@ -1038,7 +1037,7 @@ SAFEARRAY* UnoConversionUtilities<T>::createUnoSequenceWrapper(const Any& rSeq,
if( elementTypeDesc.is() )
{
// set up the SAFEARRAY
- scoped_array<SAFEARRAYBOUND> sarSafeArrayBound(new SAFEARRAYBOUND[dims]);
+ std::unique_ptr<SAFEARRAYBOUND[]> sarSafeArrayBound(new SAFEARRAYBOUND[dims]);
SAFEARRAYBOUND* prgsabound= sarSafeArrayBound.get();
for( sal_Int32 i=0; i < dims; i++)
{
@@ -1069,7 +1068,7 @@ SAFEARRAY* UnoConversionUtilities<T>::createUnoSequenceWrapper(const Any& rSeq,
// In this case arDimSeqIndices would have the size 1. That is the elements are not counted
// but the Sequences that contain those elements.
// The indices ar 0 based
- scoped_array<sal_Int32> sarDimsSeqIndices;
+ std::unique_ptr<sal_Int32[]> sarDimsSeqIndices;
sal_Int32* arDimsSeqIndices= NULL;
if( dimsSeq > 0)
{
@@ -2238,7 +2237,7 @@ Sequence<Any> UnoConversionUtilities<T>::createOleArrayWrapper(SAFEARRAY* pArray
if (dim > 0)
{
- scoped_array<long> sarIndex(new long[dim]);
+ std::unique_ptr<long[]> sarIndex(new long[dim]);
long * index = sarIndex.get();
for (unsigned int i = 0; i < dim; i++)