drop 'using namespace std' in o* r* x*
Change-Id: I15d56d133cf464a3cb6483be785b1259c7f35b43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123120 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
This commit is contained in:
@@ -49,7 +49,6 @@
|
||||
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
|
||||
#include <com/sun/star/registry/XSimpleRegistry.hpp>
|
||||
|
||||
using namespace std;
|
||||
using namespace com::sun::star::uno;
|
||||
using namespace com::sun::star::lang;
|
||||
using namespace com::sun::star::beans;
|
||||
@@ -67,14 +66,14 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
|
||||
|
||||
if (nCount < 1)
|
||||
{
|
||||
cout << "using: DocumentLoader -env:URE_MORE_TYPES=<office_types_rdb_url> <file_url> "
|
||||
std::cout << "using: DocumentLoader -env:URE_MORE_TYPES=<office_types_rdb_url> <file_url> "
|
||||
"[<uno_connection_url>]"
|
||||
<< endl
|
||||
<< endl
|
||||
<< std::endl
|
||||
<< std::endl
|
||||
<< "example: DocumentLoader -env:URE_MORE_TYPES=\"file:///.../program/offapi.rdb\" "
|
||||
"\"file:///e:/temp/test.odt\" "
|
||||
"\"uno:socket,host=localhost,port=2083;urp;StarOffice.ServiceManager\""
|
||||
<< endl;
|
||||
<< std::endl;
|
||||
exit(1);
|
||||
}
|
||||
if (nCount == 2)
|
||||
@@ -109,8 +108,8 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
|
||||
}
|
||||
catch ( Exception& e )
|
||||
{
|
||||
cout << "Error: cannot establish a connection using "
|
||||
<< sConnectionString << endl << e.Message << endl;
|
||||
std::cout << "Error: cannot establish a connection using "
|
||||
<< sConnectionString << std::endl << e.Message << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
@@ -16,8 +16,6 @@
|
||||
|
||||
#define LOG(args...) __android_log_print(ANDROID_LOG_INFO, "GeckoUpdater" , ## args)
|
||||
|
||||
using namespace std;
|
||||
|
||||
int InitProgressUI(int *argc, char ***argv)
|
||||
{
|
||||
return 0;
|
||||
@@ -48,7 +46,7 @@ void UpdateProgressUI(float progress)
|
||||
sLastNumBars = numBars;
|
||||
|
||||
size_t numSpaces = kProgressBarLength - numBars;
|
||||
string bars(numBars, '=');
|
||||
string spaces(numSpaces, ' ');
|
||||
std::string bars(numBars, '=');
|
||||
std::string spaces(numSpaces, ' ');
|
||||
LOG("Progress [ %s%s ]\n", bars.c_str(), spaces.c_str());
|
||||
}
|
||||
|
@@ -15,7 +15,6 @@
|
||||
#include <oox/token/tokenmap.hxx>
|
||||
#include <oox/token/tokens.hxx>
|
||||
|
||||
using namespace std;
|
||||
using namespace com::sun::star::uno;
|
||||
|
||||
namespace oox {
|
||||
|
@@ -18,8 +18,6 @@
|
||||
|
||||
#include <clew_setup.hxx>
|
||||
|
||||
using namespace std;
|
||||
|
||||
// The purpose of this separate executable is to check whether OpenCL works
|
||||
// without crashing (asserting, etc.). Other checks can be done by LO core itself.
|
||||
|
||||
@@ -44,7 +42,7 @@ static void runTest(const char* deviceName, const char* devicePlatform)
|
||||
// Find the given OpenCL device (in order to use the same one as LO core).
|
||||
cl_uint numPlatforms;
|
||||
openclcheck(clGetPlatformIDs(0, nullptr, &numPlatforms));
|
||||
vector<cl_platform_id> platforms(numPlatforms);
|
||||
std::vector<cl_platform_id> platforms(numPlatforms);
|
||||
openclcheck(clGetPlatformIDs(numPlatforms, platforms.data(), nullptr));
|
||||
cl_platform_id platformId = nullptr;
|
||||
for (cl_uint i = 0; i < numPlatforms; ++i)
|
||||
@@ -67,7 +65,7 @@ static void runTest(const char* deviceName, const char* devicePlatform)
|
||||
|
||||
cl_uint numDevices;
|
||||
openclcheck(clGetDeviceIDs(platformId, CL_DEVICE_TYPE_ALL, 0, nullptr, &numDevices));
|
||||
vector<cl_device_id> devices(numDevices);
|
||||
std::vector<cl_device_id> devices(numDevices);
|
||||
openclcheck(
|
||||
clGetDeviceIDs(platformId, CL_DEVICE_TYPE_ALL, numDevices, devices.data(), nullptr));
|
||||
cl_device_id deviceId = nullptr;
|
||||
@@ -116,11 +114,11 @@ static void runTest(const char* deviceName, const char* devicePlatform)
|
||||
size_t length;
|
||||
status
|
||||
= clGetProgramBuildInfo(program, deviceId, CL_PROGRAM_BUILD_LOG, 0, nullptr, &length);
|
||||
vector<char> error(length + 1);
|
||||
std::vector<char> error(length + 1);
|
||||
status = clGetProgramBuildInfo(program, deviceId, CL_PROGRAM_BUILD_LOG, length,
|
||||
error.data(), nullptr);
|
||||
error[length] = '\0';
|
||||
cerr << "OpenCL driver check build error:" << error.data() << endl;
|
||||
std::cerr << "OpenCL driver check build error:" << error.data() << std::endl;
|
||||
abort();
|
||||
}
|
||||
#endif
|
||||
|
@@ -56,8 +56,6 @@ if( status != CL_SUCCESS ) \
|
||||
return false; \
|
||||
}
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace {
|
||||
|
||||
bool bIsInited = false;
|
||||
|
@@ -30,9 +30,6 @@
|
||||
#include <rtl/ustring.hxx>
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
sal_Int32 lValue1 = 123456789;
|
||||
sal_Int32 lValue2 = 54321;
|
||||
sal_Int32 lValue3 = 111333111;
|
||||
@@ -103,7 +100,7 @@ void test_generateMerge1()
|
||||
|
||||
delete myRegistry;
|
||||
|
||||
cout << "test_generateMerge1() Ok!\n";
|
||||
std::cout << "test_generateMerge1() Ok!\n";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -168,7 +165,7 @@ void test_generateMerge2()
|
||||
|
||||
delete myRegistry;
|
||||
|
||||
cout << "test_generateMerge2() Ok!\n";
|
||||
std::cout << "test_generateMerge2() Ok!\n";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -400,7 +397,7 @@ void test_merge()
|
||||
|
||||
delete myRegistry;
|
||||
|
||||
cout << "test_merge() Ok!\n";
|
||||
std::cout << "test_merge() Ok!\n";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -29,8 +29,6 @@
|
||||
#include <rtl/alloc.h>
|
||||
#include <rtl/ustring.hxx>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
void test_coreReflection()
|
||||
{
|
||||
@@ -368,7 +366,7 @@ void test_coreReflection()
|
||||
// REG_ENSURE(!myRegistry->destroy(NULL), "testCoreReflection error 10");
|
||||
delete myRegistry;
|
||||
|
||||
cout << "test_coreReflection() Ok!\n";
|
||||
std::cout << "test_coreReflection() Ok!\n";
|
||||
}
|
||||
|
||||
void test_registry_CppApi()
|
||||
@@ -689,7 +687,7 @@ void test_registry_CppApi()
|
||||
REG_ENSURE(!myRegistry->destroy(OUString()), "test_registry_CppApi error 63");
|
||||
delete(myRegistry);
|
||||
|
||||
cout << "test_registry_CppApi() Ok!\n";
|
||||
std::cout << "test_registry_CppApi() Ok!\n";
|
||||
|
||||
return;
|
||||
}
|
||||
|
@@ -44,7 +44,6 @@
|
||||
#include "resultsetforquery.hxx"
|
||||
#include "databases.hxx"
|
||||
|
||||
using namespace std;
|
||||
using namespace chelp;
|
||||
using namespace com::sun::star;
|
||||
using namespace com::sun::star::ucb;
|
||||
@@ -85,7 +84,7 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< uno::XComponentConte
|
||||
xTrans->loadModule(TransliterationModules_UPPERCASE_LOWERCASE,
|
||||
aLocale );
|
||||
|
||||
vector< vector< OUString > > queryList;
|
||||
std::vector< std::vector< OUString > > queryList;
|
||||
{
|
||||
sal_Int32 idx;
|
||||
OUString query = aURLParameter.get_query();
|
||||
@@ -95,7 +94,7 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< uno::XComponentConte
|
||||
if( idx == -1 )
|
||||
idx = query.getLength();
|
||||
|
||||
vector< OUString > currentQuery;
|
||||
std::vector< OUString > currentQuery;
|
||||
OUString tmp(query.copy( 0,idx ));
|
||||
Sequence<sal_Int32> aSeq;
|
||||
OUString toliterate = xTrans->transliterate(
|
||||
@@ -112,7 +111,7 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< uno::XComponentConte
|
||||
}
|
||||
}
|
||||
|
||||
vector< OUString > aCompleteResultVector;
|
||||
std::vector< OUString > aCompleteResultVector;
|
||||
OUString scope = aURLParameter.get_scope();
|
||||
bool bCaptionsOnly = scope == "Heading";
|
||||
sal_Int32 hitCount = aURLParameter.get_hitCount();
|
||||
@@ -120,7 +119,7 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< uno::XComponentConte
|
||||
IndexFolderIterator aIndexFolderIt( *pDatabases, aURLParameter.get_module(), aURLParameter.get_language() );
|
||||
OUString idxDir;
|
||||
bool bExtension = false;
|
||||
vector< vector<HitItem> > aIndexFolderResultVectorVector;
|
||||
std::vector< std::vector<HitItem> > aIndexFolderResultVectorVector;
|
||||
|
||||
bool bTemporary;
|
||||
for (;;)
|
||||
@@ -128,12 +127,12 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< uno::XComponentConte
|
||||
idxDir = aIndexFolderIt.nextIndexFolder( bExtension, bTemporary );
|
||||
if( idxDir.isEmpty() )
|
||||
break;
|
||||
vector<HitItem> aIndexFolderResultVector;
|
||||
std::vector<HitItem> aIndexFolderResultVector;
|
||||
|
||||
try
|
||||
{
|
||||
vector< vector<HitItem> > aQueryListResultVectorVector;
|
||||
set< OUString > aSet,aCurrent,aResultSet;
|
||||
std::vector< std::vector<HitItem> > aQueryListResultVectorVector;
|
||||
std::set< OUString > aSet,aCurrent,aResultSet;
|
||||
|
||||
int nQueryListSize = queryList.size();
|
||||
if( nQueryListSize > 1 )
|
||||
@@ -141,7 +140,7 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< uno::XComponentConte
|
||||
|
||||
for( int i = 0; i < nQueryListSize; ++i )
|
||||
{
|
||||
vector<HitItem>* pQueryResultVector;
|
||||
std::vector<HitItem>* pQueryResultVector;
|
||||
if( nQueryListSize > 1 )
|
||||
{
|
||||
aQueryListResultVectorVector.emplace_back();
|
||||
@@ -156,8 +155,8 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< uno::XComponentConte
|
||||
const std::vector< OUString >& aListItem = queryList[i];
|
||||
OUString aNewQueryStr = aListItem[0];
|
||||
|
||||
vector<float> aScoreVector;
|
||||
vector<OUString> aPathVector;
|
||||
std::vector<float> aScoreVector;
|
||||
std::vector<OUString> aPathVector;
|
||||
|
||||
try
|
||||
{
|
||||
@@ -201,7 +200,7 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< uno::XComponentConte
|
||||
{
|
||||
for( int n = 0 ; n < nQueryListSize ; ++n )
|
||||
{
|
||||
vector<HitItem>& rQueryResultVector = aQueryListResultVectorVector[n];
|
||||
std::vector<HitItem>& rQueryResultVector = aQueryListResultVectorVector[n];
|
||||
|
||||
int nItemCount = rQueryResultVector.size();
|
||||
for( int i = 0 ; i < nItemCount ; ++i )
|
||||
@@ -251,7 +250,7 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< uno::XComponentConte
|
||||
|
||||
|
||||
int nVectorCount = aIndexFolderResultVectorVector.size();
|
||||
std::unique_ptr<std::vector<HitItem>::size_type[]> pCurrentVectorIndex(new vector<HitItem>::size_type[nVectorCount]);
|
||||
std::unique_ptr<std::vector<HitItem>::size_type[]> pCurrentVectorIndex(new std::vector<HitItem>::size_type[nVectorCount]);
|
||||
for( int j = 0 ; j < nVectorCount ; ++j )
|
||||
pCurrentVectorIndex[j] = 0;
|
||||
|
||||
@@ -263,7 +262,7 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< uno::XComponentConte
|
||||
float fBestScore = 0.0;
|
||||
for( int k = 0 ; k < nVectorCount ; ++k )
|
||||
{
|
||||
vector<HitItem>& rIndexFolderVector = aIndexFolderResultVectorVector[k];
|
||||
std::vector<HitItem>& rIndexFolderVector = aIndexFolderResultVectorVector[k];
|
||||
if( pCurrentVectorIndex[k] < rIndexFolderVector.size() )
|
||||
{
|
||||
const HitItem& rItem = rIndexFolderVector[ pCurrentVectorIndex[k] ];
|
||||
@@ -279,7 +278,7 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< uno::XComponentConte
|
||||
if( iVectorWithBestScore == -1 ) // No item left at all
|
||||
break;
|
||||
|
||||
vector<HitItem>& rIndexFolderVector = aIndexFolderResultVectorVector[iVectorWithBestScore];
|
||||
std::vector<HitItem>& rIndexFolderVector = aIndexFolderResultVectorVector[iVectorWithBestScore];
|
||||
const HitItem& rItem = rIndexFolderVector[ pCurrentVectorIndex[iVectorWithBestScore] ];
|
||||
|
||||
pCurrentVectorIndex[iVectorWithBestScore]++;
|
||||
|
@@ -16,7 +16,6 @@
|
||||
#include <xmloff/token/tokens.hxx>
|
||||
#include <xmloff/xmltoken.hxx>
|
||||
|
||||
using namespace std;
|
||||
using namespace com::sun::star::uno;
|
||||
|
||||
namespace xmloff {
|
||||
|
Reference in New Issue
Block a user