drop 'using namespace std' in cli_ure

Change-Id: Ib439d74284d52e32162164d14ab06e4f40df884a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123193
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
This commit is contained in:
Julien Nabet
2021-10-06 21:28:16 +02:00
parent 2129cc20ce
commit 961ebbe9eb

View File

@@ -42,7 +42,6 @@ namespace sr = System::Reflection;
namespace st = System::Text; namespace st = System::Text;
namespace ucss = unoidl::com::sun::star; namespace ucss = unoidl::com::sun::star;
using namespace std;
namespace cli_uno namespace cli_uno
{ {
@@ -51,9 +50,9 @@ OUString mapCliTypeName(System::String^ typeName);
System::String^ mapCliPolymorphicName(System::String^ unoName); System::String^ mapCliPolymorphicName(System::String^ unoName);
System::String^ mapPolymorphicName(System::String^ unoName, bool bCliToUno); System::String^ mapPolymorphicName(System::String^ unoName, bool bCliToUno);
inline unique_ptr< rtl_mem > seq_allocate( sal_Int32 nElements, sal_Int32 nSize ) inline std::unique_ptr< rtl_mem > seq_allocate( sal_Int32 nElements, sal_Int32 nSize )
{ {
unique_ptr< rtl_mem > seq( std::unique_ptr< rtl_mem > seq(
rtl_mem::allocate( SAL_SEQUENCE_HEADER_SIZE + (nElements * nSize) ) ); rtl_mem::allocate( SAL_SEQUENCE_HEADER_SIZE + (nElements * nSize) ) );
uno_Sequence * p = (uno_Sequence *)seq.get(); uno_Sequence * p = (uno_Sequence *)seq.get();
p->nRefCount = 1; p->nRefCount = 1;
@@ -899,7 +898,7 @@ void Bridge::map_to_uno(void * uno_data, System::Object^ cli_data,
} }
else else
{ {
unique_ptr< rtl_mem > mem( rtl_mem::allocate( sizeof (sal_Int64) ) ); std::unique_ptr< rtl_mem > mem( rtl_mem::allocate( sizeof (sal_Int64) ) );
*(sal_Int64 *) mem.get()= *safe_cast<System::Int64^>(aAny.Value); *(sal_Int64 *) mem.get()= *safe_cast<System::Int64^>(aAny.Value);
pAny->pData = mem.release(); pAny->pData = mem.release();
} }
@@ -912,7 +911,7 @@ void Bridge::map_to_uno(void * uno_data, System::Object^ cli_data,
} }
else else
{ {
unique_ptr< rtl_mem > mem( rtl_mem::allocate( sizeof (sal_uInt64) ) ); std::unique_ptr< rtl_mem > mem( rtl_mem::allocate( sizeof (sal_uInt64) ) );
*(sal_uInt64 *) mem.get()= *safe_cast<System::UInt64^>(aAny.Value); *(sal_uInt64 *) mem.get()= *safe_cast<System::UInt64^>(aAny.Value);
pAny->pData = mem.release(); pAny->pData = mem.release();
} }
@@ -925,7 +924,7 @@ void Bridge::map_to_uno(void * uno_data, System::Object^ cli_data,
} }
else else
{ {
unique_ptr< rtl_mem > mem( rtl_mem::allocate( sizeof (float) ) ); std::unique_ptr< rtl_mem > mem( rtl_mem::allocate( sizeof (float) ) );
*(float*) mem.get() = *safe_cast<System::Single^>(aAny.Value); *(float*) mem.get() = *safe_cast<System::Single^>(aAny.Value);
pAny->pData = mem.release(); pAny->pData = mem.release();
} }
@@ -938,7 +937,7 @@ void Bridge::map_to_uno(void * uno_data, System::Object^ cli_data,
} }
else else
{ {
unique_ptr< rtl_mem > mem( rtl_mem::allocate( sizeof (double) ) ); std::unique_ptr< rtl_mem > mem( rtl_mem::allocate( sizeof (double) ) );
*(double*) mem.get()= *safe_cast<System::Double^>(aAny.Value); *(double*) mem.get()= *safe_cast<System::Double^>(aAny.Value);
pAny->pData= mem.release(); pAny->pData= mem.release();
} }
@@ -967,7 +966,7 @@ void Bridge::map_to_uno(void * uno_data, System::Object^ cli_data,
css::uno::Type anyType(value_td); css::uno::Type anyType(value_td);
typelib_TypeDescription* td= NULL; typelib_TypeDescription* td= NULL;
anyType.getDescription(&td); anyType.getDescription(&td);
unique_ptr< rtl_mem > mem(rtl_mem::allocate(td->nSize)); std::unique_ptr< rtl_mem > mem(rtl_mem::allocate(td->nSize));
typelib_typedescription_release(td); typelib_typedescription_release(td);
map_to_uno( map_to_uno(
mem.get(), aAny.Value, value_td.getTypeLibType(), mem.get(), aAny.Value, value_td.getTypeLibType(),
@@ -1219,7 +1218,7 @@ void Bridge::map_to_uno(void * uno_data, System::Object^ cli_data,
typelib_TypeDescriptionReference * element_type = typelib_TypeDescriptionReference * element_type =
((typelib_IndirectTypeDescription *)td.get())->pType; ((typelib_IndirectTypeDescription *)td.get())->pType;
unique_ptr< rtl_mem > seq; std::unique_ptr< rtl_mem > seq;
System::Array^ ar = nullptr; System::Array^ ar = nullptr;
if (cli_data != nullptr) if (cli_data != nullptr)