summaryrefslogtreecommitdiff
path: root/stoc/test
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2011-03-03 22:48:57 +0100
committerJulien Nabet <serval2412@yahoo.fr>2011-03-03 22:48:57 +0100
commit480ab8a2b34aff08355788e1b50142460d6c7633 (patch)
tree0a681f97687df514608b06e1da2bac08f61235c9 /stoc/test
parent9f14962a6c1c9b2610d0294dca2a28d2b23a958b (diff)
Remove "using namespace ::rtl"
Diffstat (limited to 'stoc/test')
-rw-r--r--stoc/test/excomp/excomp.cxx4
-rw-r--r--stoc/test/excomp/excomp1.cxx3
-rw-r--r--stoc/test/excomp/excomp2.cxx3
-rw-r--r--stoc/test/javavm/jvm_interaction/interactionhandler.cxx5
-rw-r--r--stoc/test/javavm/testjavavm.cxx5
-rw-r--r--stoc/test/testconv.cxx4
-rw-r--r--stoc/test/testcorefl.cxx5
-rw-r--r--stoc/test/testiadapter.cxx5
-rw-r--r--stoc/test/testintrosp.cxx6
-rw-r--r--stoc/test/testloader.cxx3
-rw-r--r--stoc/test/testregistry.cxx89
-rw-r--r--stoc/test/testsmgr_cpnt.cxx5
12 files changed, 83 insertions, 54 deletions
diff --git a/stoc/test/excomp/excomp.cxx b/stoc/test/excomp/excomp.cxx
index deb523d70e0b..7b3c4b4b14b3 100644
--- a/stoc/test/excomp/excomp.cxx
+++ b/stoc/test/excomp/excomp.cxx
@@ -51,7 +51,9 @@ using namespace com::sun::star::registry;
using namespace com::sun::star::lang;
using namespace example;
using namespace cppu;
-using namespace rtl;
+
+using ::rtl::OUString;
+using ::rtl::OUStringToOString;
#if OSL_DEBUG_LEVEL > 0
#define TEST_ENSHURE(c, m) OSL_ENSURE(c, m)
diff --git a/stoc/test/excomp/excomp1.cxx b/stoc/test/excomp/excomp1.cxx
index 058a06bc3f97..44d81cd55f06 100644
--- a/stoc/test/excomp/excomp1.cxx
+++ b/stoc/test/excomp/excomp1.cxx
@@ -46,7 +46,8 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::registry;
using namespace cppu;
using namespace osl;
-using namespace rtl;
+
+using ::rtl::OUString;
#define SERVICENAME1 "example.ExampleComponent1"
#define IMPLNAME1 "example.ExampleComponent1.Impl"
diff --git a/stoc/test/excomp/excomp2.cxx b/stoc/test/excomp/excomp2.cxx
index f62e957efec4..9e484c11d268 100644
--- a/stoc/test/excomp/excomp2.cxx
+++ b/stoc/test/excomp/excomp2.cxx
@@ -49,7 +49,8 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::registry;
using namespace cppu;
using namespace osl;
-using namespace rtl;
+
+using ::rtl::OUString;
#define SERVICENAME2 "example.ExampleComponent2"
#define IMPLNAME2 "example.ExampleComponent2.Impl"
diff --git a/stoc/test/javavm/jvm_interaction/interactionhandler.cxx b/stoc/test/javavm/jvm_interaction/interactionhandler.cxx
index a4e961d43466..a661eb89eb74 100644
--- a/stoc/test/javavm/jvm_interaction/interactionhandler.cxx
+++ b/stoc/test/javavm/jvm_interaction/interactionhandler.cxx
@@ -61,7 +61,6 @@
#include <uno/current_context.hxx>
using namespace std;
-using namespace rtl;
using namespace cppu;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
@@ -70,6 +69,10 @@ using namespace com::sun::star::registry;
using namespace com::sun::star::java;
using namespace com::sun::star::task;
+using ::rtl::OUString;
+using ::rtl::OUStringToOString;
+using ::rtl::OString;
+
#define OUSTR( x ) OUString(RTL_CONSTASCII_USTRINGPARAM( x ))
#define INTERACTION_HANDLER_NAME "java-vm.interaction-handler"
diff --git a/stoc/test/javavm/testjavavm.cxx b/stoc/test/javavm/testjavavm.cxx
index c585e771a293..0329f785b046 100644
--- a/stoc/test/javavm/testjavavm.cxx
+++ b/stoc/test/javavm/testjavavm.cxx
@@ -47,7 +47,6 @@
#include <com/sun/star/java/XJavaThreadRegister_11.hpp>
using namespace std;
-using namespace rtl;
using namespace cppu;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
@@ -55,6 +54,10 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::registry;
using namespace com::sun::star::java;
+using ::rtl::OUString;
+using ::rtl::OUStringToOString;
+using ::rtl::OString;
+
sal_Bool testJavaVM(const Reference< XMultiServiceFactory > & xMgr )
{
diff --git a/stoc/test/testconv.cxx b/stoc/test/testconv.cxx
index 978bab5b0c2e..d8c0dd359e6a 100644
--- a/stoc/test/testconv.cxx
+++ b/stoc/test/testconv.cxx
@@ -44,7 +44,6 @@
#include <stdio.h>
-using namespace rtl;
using namespace cppu;
using namespace osl;
using namespace com::sun::star::uno;
@@ -53,6 +52,9 @@ using namespace com::sun::star::script;
using namespace com::sun::star::reflection;
using namespace com::sun::star::registry;
+using ::rtl::OUString;
+using ::rtl::OUStringToOString;
+
const double MIN_DOUBLE = -DBL_MAX;
const double MAX_DOUBLE = DBL_MAX;
const double MIN_FLOAT = -FLT_MAX;
diff --git a/stoc/test/testcorefl.cxx b/stoc/test/testcorefl.cxx
index e2e44c366e96..63bde05d44e2 100644
--- a/stoc/test/testcorefl.cxx
+++ b/stoc/test/testcorefl.cxx
@@ -60,7 +60,6 @@
#include <stdio.h>
-using namespace rtl;
using namespace cppu;
using namespace osl;
using namespace ModuleA;
@@ -75,6 +74,10 @@ using namespace com::sun::star::registry;
using namespace com::sun::star::reflection;
using namespace com::sun::star::container;
+using ::rtl::OUString;
+using ::rtl::OUStringToOString;
+using ::rtl::OString;
+
//==================================================================================================
class OInterfaceA : public WeakImplHelper1< XInterfaceA >
diff --git a/stoc/test/testiadapter.cxx b/stoc/test/testiadapter.cxx
index 3c98bb74ef65..b91cae5ec98a 100644
--- a/stoc/test/testiadapter.cxx
+++ b/stoc/test/testiadapter.cxx
@@ -50,7 +50,6 @@
using namespace test;
-using namespace rtl;
using namespace cppu;
using namespace osl;
using namespace com::sun::star::uno;
@@ -61,6 +60,10 @@ using namespace com::sun::star::reflection;
using namespace com::sun::star::lang;
using namespace com::sun::star::registry;
+using ::rtl::OUString;
+using ::rtl::OString;
+using ::rtl::OUStringToOString;
+
//==================================================================================================
sal_Bool equals( const test::TestElement & rData1, const test::TestElement & rData2 )
diff --git a/stoc/test/testintrosp.cxx b/stoc/test/testintrosp.cxx
index 582d38f42a69..9a075333fac6 100644
--- a/stoc/test/testintrosp.cxx
+++ b/stoc/test/testintrosp.cxx
@@ -53,7 +53,6 @@
#include <stdio.h>
#include <string.h>
-using namespace rtl;
using namespace cppu;
using namespace ModuleA;
using namespace com::sun::star::uno;
@@ -64,6 +63,11 @@ using namespace com::sun::star::reflection;
using namespace com::sun::star::container;
using namespace com::sun::star::beans::PropertyAttribute;
+using ::rtl::OUString;
+using ::rtl::OString;
+using ::rtl::OUStringToOString;
+using ::rtl::OStringToOUString;
+
typedef WeakImplHelper4< XIntroTest, XPropertySet, XNameAccess, XIndexAccess > ImplIntroTestHelper;
typedef WeakImplHelper1< XPropertySetInfo > ImplPropertySetInfoHelper;
diff --git a/stoc/test/testloader.cxx b/stoc/test/testloader.cxx
index 902aaf633200..e6830dec36e4 100644
--- a/stoc/test/testloader.cxx
+++ b/stoc/test/testloader.cxx
@@ -52,9 +52,10 @@ using namespace com::sun::star::uno;
using namespace com::sun::star::loader;
using namespace com::sun::star::lang;
using namespace osl;
-using namespace rtl;
using namespace cppu;
+using ::rtl::OUString;
+
#if OSL_DEBUG_LEVEL > 0
#define TEST_ENSHURE(c, m) OSL_ENSURE(c, m)
#else
diff --git a/stoc/test/testregistry.cxx b/stoc/test/testregistry.cxx
index 9eacc563f8f3..50c8e34c08e3 100644
--- a/stoc/test/testregistry.cxx
+++ b/stoc/test/testregistry.cxx
@@ -60,9 +60,12 @@ using namespace com::sun::star::uno;
using namespace com::sun::star::registry;
using namespace com::sun::star::lang;
using namespace com::sun::star::beans;
-using namespace rtl;
using namespace osl;
+using ::rtl::OUString;
+using ::rtl::OUStringToOString;
+using ::rtl::OString;
+
#if OSL_DEBUG_LEVEL > 0
#define TEST_ENSHURE(c, m) OSL_ENSURE(c, m)
#else
@@ -72,35 +75,35 @@ using namespace osl;
namespace stoc_impreg
{
void SAL_CALL mergeKeys(
- Reference< registry::XRegistryKey > const & xDest,
- Reference< registry::XRegistryKey > const & xSource )
- SAL_THROW( (registry::InvalidRegistryException, registry::MergeConflictException) );
+Reference< registry::XRegistryKey > const & xDest,
+Reference< registry::XRegistryKey > const & xSource )
+SAL_THROW( (registry::InvalidRegistryException, registry::MergeConflictException) );
}
static void mergeKeys(
- Reference< registry::XSimpleRegistry > const & xDest,
- OUString const & rBaseNode,
- OUString const & rURL )
- SAL_THROW( (registry::InvalidRegistryException, registry::MergeConflictException) )
+Reference< registry::XSimpleRegistry > const & xDest,
+OUString const & rBaseNode,
+OUString const & rURL )
+SAL_THROW( (registry::InvalidRegistryException, registry::MergeConflictException) )
{
- Reference< registry::XRegistryKey > xDestRoot( xDest->getRootKey() );
- Reference< registry::XRegistryKey > xDestKey;
- if (rBaseNode.getLength())
- {
- xDestKey = xDestRoot->createKey( rBaseNode );
- xDestRoot->closeKey();
- }
- else
- {
- xDestKey = xDestRoot;
- }
- Reference< registry::XSimpleRegistry > xSimReg( ::cppu::createSimpleRegistry() );
- xSimReg->open( rURL, sal_True, sal_False );
- OSL_ASSERT( xSimReg->isValid() );
- Reference< registry::XRegistryKey > xSourceKey( xSimReg->getRootKey() );
- ::stoc_impreg::mergeKeys( xDestKey, xSourceKey );
- xSourceKey->closeKey();
- xSimReg->close();
- xDestKey->closeKey();
+Reference< registry::XRegistryKey > xDestRoot( xDest->getRootKey() );
+Reference< registry::XRegistryKey > xDestKey;
+if (rBaseNode.getLength())
+{
+xDestKey = xDestRoot->createKey( rBaseNode );
+xDestRoot->closeKey();
+}
+else
+{
+xDestKey = xDestRoot;
+}
+Reference< registry::XSimpleRegistry > xSimReg( ::cppu::createSimpleRegistry() );
+xSimReg->open( rURL, sal_True, sal_False );
+OSL_ASSERT( xSimReg->isValid() );
+Reference< registry::XRegistryKey > xSourceKey( xSimReg->getRootKey() );
+::stoc_impreg::mergeKeys( xDestKey, xSourceKey );
+xSourceKey->closeKey();
+xSimReg->close();
+xDestKey->closeKey();
}
@@ -108,33 +111,33 @@ OString userRegEnv("STAR_USER_REGISTRY=");
OUString getExePath()
{
- OUString exe;
- OSL_VERIFY( osl_getExecutableFile( &exe.pData ) == osl_Process_E_None);
+OUString exe;
+OSL_VERIFY( osl_getExecutableFile( &exe.pData ) == osl_Process_E_None);
#if defined(WIN32) || defined(__OS2__) || defined(WNT)
- exe = exe.copy(0, exe.getLength() - 16);
+exe = exe.copy(0, exe.getLength() - 16);
#else
- exe = exe.copy(0, exe.getLength() - 12);
+exe = exe.copy(0, exe.getLength() - 12);
#endif
- return exe;
+return exe;
}
void setStarUserRegistry()
{
- Registry *myRegistry = new Registry();
+Registry *myRegistry = new Registry();
- RegistryKey rootKey, rKey, rKey2;
+RegistryKey rootKey, rKey, rKey2;
- OUString userReg = getExePath();
- userReg += OUString(RTL_CONSTASCII_USTRINGPARAM("user.rdb"));
- if(myRegistry->open(userReg, REG_READWRITE))
- {
- TEST_ENSHURE(!myRegistry->create(userReg), "setStarUserRegistry error 1");
- }
+OUString userReg = getExePath();
+userReg += OUString(RTL_CONSTASCII_USTRINGPARAM("user.rdb"));
+if(myRegistry->open(userReg, REG_READWRITE))
+{
+TEST_ENSHURE(!myRegistry->create(userReg), "setStarUserRegistry error 1");
+}
- TEST_ENSHURE(!myRegistry->close(), "setStarUserRegistry error 9");
- delete myRegistry;
+TEST_ENSHURE(!myRegistry->close(), "setStarUserRegistry error 9");
+delete myRegistry;
- userRegEnv += OUStringToOString(userReg, RTL_TEXTENCODING_ASCII_US);
+userRegEnv += OUStringToOString(userReg, RTL_TEXTENCODING_ASCII_US);
putenv((char *)userRegEnv.getStr());
}
diff --git a/stoc/test/testsmgr_cpnt.cxx b/stoc/test/testsmgr_cpnt.cxx
index 0b3f6346f003..741f23b15954 100644
--- a/stoc/test/testsmgr_cpnt.cxx
+++ b/stoc/test/testsmgr_cpnt.cxx
@@ -75,9 +75,12 @@ using namespace com::sun::star::registry;
using namespace com::sun::star::lang;
using namespace com::sun::star::container;
using namespace osl;
-using namespace rtl;
using namespace cppu;
+using ::rtl::OUString;
+using ::rtl::OUStringToOString;
+using ::rtl::OString;
+
Reference<XMultiServiceFactory> getProcessServiceManager()
{