summaryrefslogtreecommitdiff
path: root/ucb/source/core
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@novell.com>2011-02-21 15:48:08 +0200
committerTor Lillqvist <tlillqvist@novell.com>2011-02-21 16:21:18 +0200
commitafd26e766a59d131d59c5e80356c9982bdc03845 (patch)
tree6baf44324703f35f9fdaee9865992e631c8ee63c /ucb/source/core
parent0e19891c94ed10ec2313650a693a4e091cb6bc82 (diff)
Remove 'using namespace rtl'
The ambiguity of 'Reference' causes compilation errors when using precompiled headers. Instead use 'using ::rtl::OUString' and 'using ::rtl::OUStringBuffer'.
Diffstat (limited to 'ucb/source/core')
-rw-r--r--ucb/source/core/identify.cxx3
-rw-r--r--ucb/source/core/provprox.cxx3
-rw-r--r--ucb/source/core/ucb.cxx53
-rw-r--r--ucb/source/core/ucbserv.cxx3
-rw-r--r--ucb/source/core/ucbstore.cxx28
5 files changed, 48 insertions, 42 deletions
diff --git a/ucb/source/core/identify.cxx b/ucb/source/core/identify.cxx
index a474f898c8a9..9e02137a79ca 100644
--- a/ucb/source/core/identify.cxx
+++ b/ucb/source/core/identify.cxx
@@ -37,11 +37,12 @@
#include "identify.hxx"
-using namespace rtl;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::ucb;
+using ::rtl::OUString;
+
//=========================================================================
//
// ContentIdentifier Implementation.
diff --git a/ucb/source/core/provprox.cxx b/ucb/source/core/provprox.cxx
index 774c0780a63e..8233a3300d9d 100644
--- a/ucb/source/core/provprox.cxx
+++ b/ucb/source/core/provprox.cxx
@@ -32,11 +32,12 @@
#include "provprox.hxx"
#include <com/sun/star/lang/XInitialization.hpp>
-using namespace rtl;
using namespace com::sun::star::lang;
using namespace com::sun::star::ucb;
using namespace com::sun::star::uno;
+using ::rtl::OUString;
+
//=========================================================================
//=========================================================================
//
diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx
index f944980f8971..2cd0f6d1d238 100644
--- a/ucb/source/core/ucb.cxx
+++ b/ucb/source/core/ucb.cxx
@@ -59,7 +59,6 @@
#include <regexpmap.tpt>
#endif
-using namespace rtl;
using namespace cppu;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
@@ -68,6 +67,8 @@ using namespace ucb_impl;
using namespace com::sun::star;
using namespace ucbhelper;
+using ::rtl::OUString;
+using ::rtl::OUStringBuffer;
#define CONFIG_CONTENTPROVIDERS_KEY \
"/org.openoffice.ucb.Configuration/ContentProviders"
@@ -75,14 +76,14 @@ using namespace ucbhelper;
namespace {
-bool fillPlaceholders(rtl::OUString const & rInput,
+bool fillPlaceholders(OUString const & rInput,
uno::Sequence< uno::Any > const & rReplacements,
- rtl::OUString * pOutput)
+ OUString * pOutput)
{
sal_Unicode const * p = rInput.getStr();
sal_Unicode const * pEnd = p + rInput.getLength();
sal_Unicode const * pCopy = p;
- rtl::OUStringBuffer aBuffer;
+ OUStringBuffer aBuffer;
while (p != pEnd)
switch (*p++)
{
@@ -120,13 +121,13 @@ bool fillPlaceholders(rtl::OUString const & rInput,
++q;
if (q == pEnd)
break;
- rtl::OUString aKey(p, q - p);
- rtl::OUString aValue;
+ OUString aKey(p, q - p);
+ OUString aValue;
bool bFound = false;
for (sal_Int32 i = 2; i + 1 < rReplacements.getLength();
i += 2)
{
- rtl::OUString aReplaceKey;
+ OUString aReplaceKey;
if ((rReplacements[i] >>= aReplaceKey)
&& aReplaceKey == aKey
&& (rReplacements[i + 1] >>= aValue))
@@ -149,7 +150,7 @@ bool fillPlaceholders(rtl::OUString const & rInput,
}
void makeAndAppendXMLName(
- rtl::OUStringBuffer & rBuffer, const rtl::OUString & rIn )
+ OUStringBuffer & rBuffer, const OUString & rIn )
{
sal_Int32 nCount = rIn.getLength();
for ( sal_Int32 n = 0; n < nCount; ++n )
@@ -185,15 +186,15 @@ void makeAndAppendXMLName(
}
bool createContentProviderData(
- const rtl::OUString & rProvider,
+ const OUString & rProvider,
const uno::Reference< container::XHierarchicalNameAccess >& rxHierNameAccess,
ContentProviderData & rInfo)
{
// Obtain service name.
- rtl::OUStringBuffer aKeyBuffer (rProvider);
+ OUStringBuffer aKeyBuffer (rProvider);
aKeyBuffer.appendAscii( "/ServiceName" );
- rtl::OUString aValue;
+ OUString aValue;
try
{
if ( !( rxHierNameAccess->getByHierarchicalName(
@@ -659,7 +660,7 @@ Any SAL_CALL UniversalContentBroker::execute(
{
ucbhelper::cancelCommandExecution(
makeAny( IllegalArgumentException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ OUString(RTL_CONSTASCII_USTRINGPARAM(
"Wrong argument type!" )),
static_cast< cppu::OWeakObject * >( this ),
-1 ) ),
@@ -677,7 +678,7 @@ Any SAL_CALL UniversalContentBroker::execute(
ucbhelper::cancelCommandExecution(
makeAny( UnsupportedCommandException(
- rtl::OUString(),
+ OUString(),
static_cast< cppu::OWeakObject * >( this ) ) ),
Environment );
// Unreachable
@@ -718,7 +719,7 @@ void SAL_CALL UniversalContentBroker::changesOccurred( const util::ChangesEvent&
for ( sal_Int32 n = 0; n < nCount; ++n )
{
const util::ElementChange& rElem = pElementChanges[ n ];
- rtl::OUString aKey;
+ OUString aKey;
rElem.Accessor >>= aKey;
ContentProviderData aInfo;
@@ -780,8 +781,8 @@ Reference< XContentProvider > UniversalContentBroker::queryContentProvider(
bool UniversalContentBroker::configureUcb()
throw (uno::RuntimeException)
{
- rtl::OUString aKey1;
- rtl::OUString aKey2;
+ OUString aKey1;
+ OUString aKey2;
if (m_aArguments.getLength() < 2
|| !(m_aArguments[0] >>= aKey1) || !(m_aArguments[1] >>= aKey2))
{
@@ -808,7 +809,7 @@ void UniversalContentBroker::prepareAndRegister(
for (ContentProviderDataList::const_iterator aIt(rData.begin());
aIt != aEnd; ++aIt)
{
- rtl::OUString aProviderArguments;
+ OUString aProviderArguments;
if (fillPlaceholders(aIt->Arguments,
m_aArguments,
&aProviderArguments))
@@ -829,8 +830,8 @@ void UniversalContentBroker::prepareAndRegister(
//=========================================================================
bool UniversalContentBroker::getContentProviderData(
- const rtl::OUString & rKey1,
- const rtl::OUString & rKey2,
+ const OUString & rKey1,
+ const OUString & rKey2,
ContentProviderDataList & rListToFill )
{
if ( !m_xSMgr.is() || !rKey1.getLength() || !rKey2.getLength() )
@@ -844,11 +845,11 @@ bool UniversalContentBroker::getContentProviderData(
{
uno::Reference< lang::XMultiServiceFactory > xConfigProv(
m_xSMgr->createInstance(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ OUString(RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.configuration.ConfigurationProvider" )) ),
uno::UNO_QUERY_THROW );
- rtl::OUStringBuffer aFullPath;
+ OUStringBuffer aFullPath;
aFullPath.appendAscii( CONFIG_CONTENTPROVIDERS_KEY "/['" );
makeAndAppendXMLName( aFullPath, rKey1 );
aFullPath.appendAscii( "']/SecondaryKeys/['" );
@@ -858,13 +859,13 @@ bool UniversalContentBroker::getContentProviderData(
uno::Sequence< uno::Any > aArguments( 1 );
beans::PropertyValue aProperty;
aProperty.Name
- = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) );
+ = OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) );
aProperty.Value <<= aFullPath.makeStringAndClear();
aArguments[ 0 ] <<= aProperty;
uno::Reference< uno::XInterface > xInterface(
xConfigProv->createInstanceWithArguments(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
+ OUString( RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.configuration.ConfigurationAccess" ) ),
aArguments ) );
@@ -879,8 +880,8 @@ bool UniversalContentBroker::getContentProviderData(
uno::Reference< container::XNameAccess > xNameAccess(
xInterface, uno::UNO_QUERY_THROW );
- uno::Sequence< rtl::OUString > aElems = xNameAccess->getElementNames();
- const rtl::OUString* pElems = aElems.getConstArray();
+ uno::Sequence< OUString > aElems = xNameAccess->getElementNames();
+ const OUString* pElems = aElems.getConstArray();
sal_Int32 nCount = aElems.getLength();
if ( nCount > 0 )
@@ -897,7 +898,7 @@ bool UniversalContentBroker::getContentProviderData(
ContentProviderData aInfo;
- rtl::OUStringBuffer aElemBuffer;
+ OUStringBuffer aElemBuffer;
aElemBuffer.appendAscii( "['" );
makeAndAppendXMLName( aElemBuffer, pElems[ n ] );
aElemBuffer.appendAscii( "']" );
diff --git a/ucb/source/core/ucbserv.cxx b/ucb/source/core/ucbserv.cxx
index 73b1523ad1b9..85a935b7a8bd 100644
--- a/ucb/source/core/ucbserv.cxx
+++ b/ucb/source/core/ucbserv.cxx
@@ -37,11 +37,12 @@
#include "provprox.hxx"
#include "cmdenv.hxx"
-using namespace rtl;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::registry;
+using ::rtl::OUString;
+
//=========================================================================
static sal_Bool writeInfo( void * pRegistryKey,
const OUString & rImplementationName,
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index 6acd923e9306..8aaf9d294937 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -55,12 +55,14 @@ using namespace com::sun::star::ucb;
using namespace com::sun::star::uno;
using namespace com::sun::star::util;
using namespace cppu;
-using namespace rtl;
+
+using ::rtl::OUString;
+using ::rtl::OUStringBuffer;
//=========================================================================
-rtl::OUString makeHierarchalNameSegment( const rtl::OUString & rIn )
+OUString makeHierarchalNameSegment( const OUString & rIn )
{
- rtl::OUStringBuffer aBuffer;
+ OUStringBuffer aBuffer;
aBuffer.appendAscii( "['" );
sal_Int32 nCount = rIn.getLength();
@@ -96,7 +98,7 @@ rtl::OUString makeHierarchalNameSegment( const rtl::OUString & rIn )
}
aBuffer.appendAscii( "']" );
- return rtl::OUString( aBuffer.makeStringAndClear() );
+ return OUString( aBuffer.makeStringAndClear() );
}
//=========================================================================
@@ -843,7 +845,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey,
try
{
- rtl::OUString aOldValuesKey
+ OUString aOldValuesKey
= makeHierarchalNameSegment( rOldKey );
aOldValuesKey += OUString(RTL_CONSTASCII_USTRINGPARAM("/Values"));
@@ -865,7 +867,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey,
sal_Int32 nCount = aElems.getLength();
if ( nCount )
{
- rtl::OUString aNewValuesKey
+ OUString aNewValuesKey
= makeHierarchalNameSegment( rNewKey );
aNewValuesKey += OUString(RTL_CONSTASCII_USTRINGPARAM("/Values"));
@@ -1134,10 +1136,10 @@ Reference< XInterface > PropertySetRegistry::getRootConfigReadAccess()
Sequence< Any > aArguments( 1 );
PropertyValue aProperty;
aProperty.Name
- = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
+ = OUString( RTL_CONSTASCII_USTRINGPARAM(
CFGPROPERTY_NODEPATH ) );
aProperty.Value
- <<= rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
+ <<= OUString( RTL_CONSTASCII_USTRINGPARAM(
STORE_CONTENTPROPERTIES_KEY ) );
aArguments[ 0 ] <<= aProperty;
@@ -1718,7 +1720,7 @@ OUString SAL_CALL PersistentPropertySet::getKey()
//=========================================================================
// virtual
-rtl::OUString SAL_CALL PersistentPropertySet::getName()
+OUString SAL_CALL PersistentPropertySet::getName()
throw( RuntimeException )
{
// same as getKey()
@@ -2434,7 +2436,7 @@ const OUString& PersistentPropertySet::getFullKey()
m_pImpl->m_aFullKey
= makeHierarchalNameSegment( m_pImpl->m_aKey );
m_pImpl->m_aFullKey
- += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/Values" ) );
+ += OUString( RTL_CONSTASCII_USTRINGPARAM( "/Values" ) );
}
}
@@ -2558,7 +2560,7 @@ Sequence< Property > SAL_CALL PropertySetInfo_Impl::getProperties()
try
{
// Obtain and set property handle
- rtl::OUString aHierName = aXMLName;
+ OUString aHierName = aXMLName;
aHierName += aHandleName;
Any aKeyValue
= xHierNameAccess->getByHierarchicalName(
@@ -2581,7 +2583,7 @@ Sequence< Property > SAL_CALL PropertySetInfo_Impl::getProperties()
try
{
// Obtain and set property type
- rtl::OUString aHierName = aXMLName;
+ OUString aHierName = aXMLName;
aHierName += aValueName;
Any aKeyValue
= xHierNameAccess->getByHierarchicalName(
@@ -2605,7 +2607,7 @@ Sequence< Property > SAL_CALL PropertySetInfo_Impl::getProperties()
try
{
// Obtain and set property attributes
- rtl::OUString aHierName = aXMLName;
+ OUString aHierName = aXMLName;
aHierName += aAttrName;
Any aKeyValue
= xHierNameAccess->getByHierarchicalName(