summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorGergő Mocsi <gmocsi91@gmail.com>2013-02-20 04:33:49 +0100
committerAndras Timar <atimar@suse.com>2013-02-22 09:48:50 +0000
commit1da3af5f1eb6a32fd0ab10da7cf2f8ddb298a3a1 (patch)
tree11991caeeb5fb6f8a70b617430f09944e41398b0 /dbaccess
parentfc090acf829d0053c0a611acd73f08b51128031d (diff)
fdo#38838, ::rtl::OUString, String to OUString
I have cleared out String and ::rtl::OUString calls in module dbaccess/source/core/misc. It was mainly file dbaccess/source/core/misc/dnstypes.cxx , and it's usages. There are still some calls in dbaccess for this class(ODnsTypeCollection), that needs refactoring (eg. in file DbAdminImpl.cxx, method "String ODbDataSourceAdministrationHelper::getConnectionURL() const"). Remaining calls will be my next task (in module dbaccess). I also clear out deprecated macro RTL_CONSTASCII_USTRINGPARAM every time I find one. The class I've mentioned above (ODnsTypeCollector) is OK. Change-Id: Ia0f3bb8cc649d1ecf8decc093f8a1a20ee23c33c Reviewed-on: https://gerrit.libreoffice.org/2289 Reviewed-by: Andras Timar <atimar@suse.com> Tested-by: Andras Timar <atimar@suse.com>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx12
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.cxx79
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.hxx44
-rw-r--r--dbaccess/source/core/misc/dsntypes.cxx179
-rw-r--r--dbaccess/source/filter/xml/xmlExport.cxx180
-rw-r--r--dbaccess/source/filter/xml/xmlExport.hxx26
-rw-r--r--dbaccess/source/inc/dsntypes.hxx48
-rw-r--r--dbaccess/source/ui/app/AppController.cxx205
-rw-r--r--dbaccess/source/ui/app/AppController.hxx48
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPage.cxx46
-rw-r--r--dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx28
-rw-r--r--dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx2
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.cxx153
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.hxx14
-rw-r--r--dbaccess/source/ui/dlg/detailpages.cxx8
-rw-r--r--dbaccess/source/ui/dlg/detailpages.hxx2
-rw-r--r--dbaccess/source/ui/dlg/generalpage.cxx51
-rw-r--r--dbaccess/source/ui/dlg/generalpage.hxx18
18 files changed, 568 insertions, 575 deletions
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 546352b72fcf..f10af6519e72 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -258,7 +258,7 @@ OSingleSelectQueryComposer::OSingleSelectQueryComposer(const Reference< XNameAcc
{
Any aValue;
Reference<XInterface> xDs = dbaccess::getDataSource(_xConnection);
- if ( dbtools::getDataSourceSetting(xDs,static_cast <rtl::OUString> (PROPERTY_BOOLEANCOMPARISONMODE),aValue) )
+ if ( dbtools::getDataSourceSetting(xDs,static_cast <OUString> (PROPERTY_BOOLEANCOMPARISONMODE),aValue) )
{
OSL_VERIFY( aValue >>= m_nBoolCompareMode );
}
@@ -380,9 +380,8 @@ void SAL_CALL OSingleSelectQueryComposer::setCommand( const OUString& Command,sa
}
else
{
- String sMessage( DBACORE_RESSTRING( RID_STR_TABLE_DOES_NOT_EXIST ) );
- sMessage.SearchAndReplaceAscii( "$table$", Command );
- throwGenericSQLException(sMessage,*this);
+ OUString sMessage( DBACORE_RESSTRING( RID_STR_TABLE_DOES_NOT_EXIST ) );
+ throwGenericSQLException(sMessage.replaceAll( "$table$", Command ),*this);
}
break;
case CommandType::QUERY:
@@ -468,9 +467,8 @@ OUString OSingleSelectQueryComposer::impl_getColumnName_throw(const Reference< X
|| !column->getPropertySetInfo()->hasPropertyByName(PROPERTY_NAME)
)
{
- String sError(DBACORE_RESSTRING(RID_STR_COLUMN_UNKNOWN_PROP));
- sError.SearchAndReplaceAscii("%value", OUString(PROPERTY_NAME));
- SQLException aErr(sError,*this,SQLSTATE_GENERAL,1000,Any() );
+ OUString sError(DBACORE_RESSTRING(RID_STR_COLUMN_UNKNOWN_PROP));
+ SQLException aErr(sError.replaceAll("%value", OUString(PROPERTY_NAME)),*this,SQLSTATE_GENERAL,1000,Any() );
throw SQLException(DBACORE_RESSTRING(RID_STR_COLUMN_NOT_VALID),*this,SQLSTATE_GENERAL,1000,makeAny(aErr) );
}
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index 8144f82c0ebb..321de7223bfe 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -214,25 +214,25 @@ Reference< XInterface > ODatabaseContext::Create(const Reference< XComponentCont
return *( new ODatabaseContext( _rxContext ) );
}
-Sequence< rtl::OUString > ODatabaseContext::getSupportedServiceNames_static(void) throw( RuntimeException )
+Sequence< OUString > ODatabaseContext::getSupportedServiceNames_static(void) throw( RuntimeException )
{
- Sequence< ::rtl::OUString > aSNS( 1 );
+ Sequence< OUString > aSNS( 1 );
aSNS[0] = "com.sun.star.sdb.DatabaseContext";
return aSNS;
}
// XServiceInfo
-rtl::OUString ODatabaseContext::getImplementationName( ) throw(RuntimeException)
+OUString ODatabaseContext::getImplementationName( ) throw(RuntimeException)
{
return getImplementationName_static();
}
-sal_Bool ODatabaseContext::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
+sal_Bool ODatabaseContext::supportsService( const OUString& _rServiceName ) throw (RuntimeException)
{
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-Sequence< ::rtl::OUString > ODatabaseContext::getSupportedServiceNames( ) throw (RuntimeException)
+Sequence< OUString > ODatabaseContext::getSupportedServiceNames( ) throw (RuntimeException)
{
return getSupportedServiceNames_static();
}
@@ -255,7 +255,7 @@ Reference< XInterface > SAL_CALL ODatabaseContext::createInstance( ) throw (Exc
Reference< XInterface > SAL_CALL ODatabaseContext::createInstanceWithArguments( const Sequence< Any >& _rArguments ) throw (Exception, RuntimeException)
{
::comphelper::NamedValueCollection aArgs( _rArguments );
- ::rtl::OUString sURL = aArgs.getOrDefault( (::rtl::OUString)INFO_POOLURL, ::rtl::OUString() );
+ OUString sURL = aArgs.getOrDefault( (OUString)INFO_POOLURL, OUString() );
Reference< XInterface > xDataSource;
if ( !sURL.isEmpty() )
@@ -292,12 +292,12 @@ void ODatabaseContext::disposing()
}
// XNamingService
-Reference< XInterface > ODatabaseContext::getRegisteredObject(const rtl::OUString& _rName) throw( Exception, RuntimeException )
+Reference< XInterface > ODatabaseContext::getRegisteredObject(const OUString& _rName) throw( Exception, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(DatabaseAccessContext_Base::rBHelper.bDisposed);
- ::rtl::OUString sURL( getDatabaseLocation( _rName ) );
+ OUString sURL( getDatabaseLocation( _rName ) );
if ( sURL.isEmpty() )
// there is a registration for this name, but no URL
@@ -311,7 +311,7 @@ Reference< XInterface > ODatabaseContext::getRegisteredObject(const rtl::OUStri
return loadObjectFromURL( _rName, sURL );
}
-Reference< XInterface > ODatabaseContext::loadObjectFromURL(const ::rtl::OUString& _rName,const ::rtl::OUString& _sURL)
+Reference< XInterface > ODatabaseContext::loadObjectFromURL(const OUString& _rName,const OUString& _sURL)
{
INetURLObject aURL( _sURL );
if ( aURL.GetProtocol() == INET_PROT_NOT_VALID )
@@ -333,12 +333,11 @@ Reference< XInterface > ODatabaseContext::loadObjectFromURL(const ::rtl::OUStrin
)
{
// #i40463# #i39187#
- String sErrorMessage( DBACORE_RESSTRING( RID_STR_FILE_DOES_NOT_EXIST ) );
+ OUString sErrorMessage( DBACORE_RESSTRING( RID_STR_FILE_DOES_NOT_EXIST ) );
::svt::OFileNotation aTransformer( _sURL );
- sErrorMessage.SearchAndReplaceAscii( "$file$", aTransformer.get( ::svt::OFileNotation::N_SYSTEM ) );
SQLException aError;
- aError.Message = sErrorMessage;
+ aError.Message = sErrorMessage.replaceAll( "$file$", aTransformer.get( ::svt::OFileNotation::N_SYSTEM ) );
throw WrappedTargetException( _sURL, *this, makeAny( aError ) );
}
@@ -386,13 +385,13 @@ void ODatabaseContext::removeFromTerminateListener(const ODatabaseModelImpl& _rD
m_pDatabaseDocumentLoader->remove(_rDataSourceModel);
}
-void ODatabaseContext::setTransientProperties(const ::rtl::OUString& _sURL, ODatabaseModelImpl& _rDataSourceModel )
+void ODatabaseContext::setTransientProperties(const OUString& _sURL, ODatabaseModelImpl& _rDataSourceModel )
{
if ( m_aDatasourceProperties.end() == m_aDatasourceProperties.find(_sURL) )
return;
try
{
- ::rtl::OUString sAuthFailedPassword;
+ OUString sAuthFailedPassword;
Reference< XPropertySet > xDSProps( _rDataSourceModel.getOrCreateDataSource(), UNO_QUERY_THROW );
const Sequence< PropertyValue >& rSessionPersistentProps = m_aDatasourceProperties[_sURL];
const PropertyValue* pProp = rSessionPersistentProps.getConstArray();
@@ -417,20 +416,20 @@ void ODatabaseContext::setTransientProperties(const ::rtl::OUString& _sURL, ODat
}
}
-void ODatabaseContext::registerObject(const rtl::OUString& _rName, const Reference< XInterface > & _rxObject) throw( Exception, RuntimeException )
+void ODatabaseContext::registerObject(const OUString& _rName, const Reference< XInterface > & _rxObject) throw( Exception, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(DatabaseAccessContext_Base::rBHelper.bDisposed);
if ( _rName.isEmpty() )
- throw IllegalArgumentException( ::rtl::OUString(), *this, 1 );
+ throw IllegalArgumentException( OUString(), *this, 1 );
Reference< XDocumentDataSource > xDocDataSource( _rxObject, UNO_QUERY );
Reference< XModel > xModel( xDocDataSource.is() ? xDocDataSource->getDatabaseDocument() : Reference< XOfficeDatabaseDocument >(), UNO_QUERY );
if ( !xModel.is() )
- throw IllegalArgumentException( ::rtl::OUString(), *this, 2 );
+ throw IllegalArgumentException( OUString(), *this, 2 );
- ::rtl::OUString sURL = xModel->getURL();
+ OUString sURL = xModel->getURL();
if ( sURL.isEmpty() )
throw IllegalArgumentException( DBACORE_RESSTRING( RID_STR_DATASOURCE_NOT_STORED ), *this, 2 );
@@ -482,7 +481,7 @@ void ODatabaseContext::storeTransientProperties( ODatabaseModelImpl& _rModelImpl
// #i86178#
aRememberProps.put( "AuthFailedPassword", _rModelImpl.m_sFailedPassword );
- ::rtl::OUString sDocumentURL( _rModelImpl.getURL() );
+ OUString sDocumentURL( _rModelImpl.getURL() );
if ( m_aDatabaseObjects.find( sDocumentURL ) != m_aDatabaseObjects.end() )
{
m_aDatasourceProperties[ sDocumentURL ] = aRememberProps.getPropertyValues();
@@ -510,12 +509,12 @@ void SAL_CALL ODatabaseContext::removeContainerListener( const Reference< XConta
m_aContainerListeners.removeInterface(_rxListener);
}
-void ODatabaseContext::revokeObject(const rtl::OUString& _rName) throw( Exception, RuntimeException )
+void ODatabaseContext::revokeObject(const OUString& _rName) throw( Exception, RuntimeException )
{
ClearableMutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(DatabaseAccessContext_Base::rBHelper.bDisposed);
- ::rtl::OUString sURL = getDatabaseLocation( _rName );
+ OUString sURL = getDatabaseLocation( _rName );
revokeDatabaseLocation( _rName );
// will throw if something goes wrong
@@ -536,37 +535,37 @@ void ODatabaseContext::revokeObject(const rtl::OUString& _rName) throw( Exceptio
m_aContainerListeners.notifyEach( &XContainerListener::elementRemoved, aEvent );
}
-::sal_Bool SAL_CALL ODatabaseContext::hasRegisteredDatabase( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, RuntimeException)
+::sal_Bool SAL_CALL ODatabaseContext::hasRegisteredDatabase( const OUString& _Name ) throw (IllegalArgumentException, RuntimeException)
{
return m_xDatabaseRegistrations->hasRegisteredDatabase( _Name );
}
-Sequence< ::rtl::OUString > SAL_CALL ODatabaseContext::getRegistrationNames() throw (RuntimeException)
+Sequence< OUString > SAL_CALL ODatabaseContext::getRegistrationNames() throw (RuntimeException)
{
return m_xDatabaseRegistrations->getRegistrationNames();
}
-::rtl::OUString SAL_CALL ODatabaseContext::getDatabaseLocation( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, RuntimeException)
+OUString SAL_CALL ODatabaseContext::getDatabaseLocation( const OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, RuntimeException)
{
return m_xDatabaseRegistrations->getDatabaseLocation( _Name );
}
-void SAL_CALL ODatabaseContext::registerDatabaseLocation( const ::rtl::OUString& _Name, const ::rtl::OUString& _Location ) throw (IllegalArgumentException, ElementExistException, RuntimeException)
+void SAL_CALL ODatabaseContext::registerDatabaseLocation( const OUString& _Name, const OUString& _Location ) throw (IllegalArgumentException, ElementExistException, RuntimeException)
{
m_xDatabaseRegistrations->registerDatabaseLocation( _Name, _Location );
}
-void SAL_CALL ODatabaseContext::revokeDatabaseLocation( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, IllegalAccessException, RuntimeException)
+void SAL_CALL ODatabaseContext::revokeDatabaseLocation( const OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, IllegalAccessException, RuntimeException)
{
m_xDatabaseRegistrations->revokeDatabaseLocation( _Name );
}
-void SAL_CALL ODatabaseContext::changeDatabaseLocation( const ::rtl::OUString& _Name, const ::rtl::OUString& _NewLocation ) throw (IllegalArgumentException, NoSuchElementException, IllegalAccessException, RuntimeException)
+void SAL_CALL ODatabaseContext::changeDatabaseLocation( const OUString& _Name, const OUString& _NewLocation ) throw (IllegalArgumentException, NoSuchElementException, IllegalAccessException, RuntimeException)
{
m_xDatabaseRegistrations->changeDatabaseLocation( _Name, _NewLocation );
}
-::sal_Bool SAL_CALL ODatabaseContext::isDatabaseRegistrationReadOnly( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, RuntimeException)
+::sal_Bool SAL_CALL ODatabaseContext::isDatabaseRegistrationReadOnly( const OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, RuntimeException)
{
return m_xDatabaseRegistrations->isDatabaseRegistrationReadOnly( _Name );
}
@@ -603,7 +602,7 @@ Reference< ::com::sun::star::container::XEnumeration > ODatabaseContext::create
}
// ::com::sun::star::container::XNameAccess
-Any ODatabaseContext::getByName(const rtl::OUString& _rName) throw( NoSuchElementException,
+Any ODatabaseContext::getByName(const OUString& _rName) throw( NoSuchElementException,
WrappedTargetException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -618,7 +617,7 @@ Any ODatabaseContext::getByName(const rtl::OUString& _rName) throw( NoSuchElemen
return makeAny( xExistent );
// see whether this is an registered name
- ::rtl::OUString sURL;
+ OUString sURL;
if ( hasRegisteredDatabase( _rName ) )
{
sURL = getDatabaseLocation( _rName );
@@ -653,7 +652,7 @@ Any ODatabaseContext::getByName(const rtl::OUString& _rName) throw( NoSuchElemen
}
}
-Sequence< rtl::OUString > ODatabaseContext::getElementNames(void) throw( RuntimeException )
+Sequence< OUString > ODatabaseContext::getElementNames(void) throw( RuntimeException )
{
MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(DatabaseAccessContext_Base::rBHelper.bDisposed);
@@ -661,7 +660,7 @@ Sequence< rtl::OUString > ODatabaseContext::getElementNames(void) throw( Runtime
return getRegistrationNames();
}
-sal_Bool ODatabaseContext::hasByName(const rtl::OUString& _rName) throw( RuntimeException )
+sal_Bool ODatabaseContext::hasByName(const OUString& _rName) throw( RuntimeException )
{
MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(DatabaseAccessContext_Base::rBHelper.bDisposed);
@@ -669,7 +668,7 @@ sal_Bool ODatabaseContext::hasByName(const rtl::OUString& _rName) throw( Runtime
return hasRegisteredDatabase( _rName );
}
-Reference< XInterface > ODatabaseContext::getObject( const ::rtl::OUString& _rURL )
+Reference< XInterface > ODatabaseContext::getObject( const OUString& _rURL )
{
ObjectCacheIterator aFind = m_aDatabaseObjects.find( _rURL );
Reference< XInterface > xExistent;
@@ -680,9 +679,9 @@ Reference< XInterface > ODatabaseContext::getObject( const ::rtl::OUString& _rUR
void ODatabaseContext::registerDatabaseDocument( ODatabaseModelImpl& _rModelImpl )
{
- ::rtl::OUString sURL( _rModelImpl.getURL() );
+ OUString sURL( _rModelImpl.getURL() );
#if OSL_DEBUG_LEVEL > 1
- OSL_TRACE( "DatabaseContext: registering %s", ::rtl::OUStringToOString( sURL, RTL_TEXTENCODING_UTF8 ).getStr() );
+ OSL_TRACE( "DatabaseContext: registering %s", OUStringToOString( sURL, RTL_TEXTENCODING_UTF8 ).getStr() );
#endif
if ( m_aDatabaseObjects.find( sURL ) == m_aDatabaseObjects.end() )
{
@@ -695,19 +694,19 @@ void ODatabaseContext::registerDatabaseDocument( ODatabaseModelImpl& _rModelImpl
void ODatabaseContext::revokeDatabaseDocument( const ODatabaseModelImpl& _rModelImpl )
{
- ::rtl::OUString sURL( _rModelImpl.getURL() );
+ OUString sURL( _rModelImpl.getURL() );
#if OSL_DEBUG_LEVEL > 1
- OSL_TRACE( "DatabaseContext: deregistering %s", ::rtl::OUStringToOString( sURL, RTL_TEXTENCODING_UTF8 ).getStr() );
+ OSL_TRACE( "DatabaseContext: deregistering %s", OUStringToOString( sURL, RTL_TEXTENCODING_UTF8 ).getStr() );
#endif
m_aDatabaseObjects.erase( sURL );
}
-void ODatabaseContext::databaseDocumentURLChange( const ::rtl::OUString& _rOldURL, const ::rtl::OUString& _rNewURL )
+void ODatabaseContext::databaseDocumentURLChange( const OUString& _rOldURL, const OUString& _rNewURL )
{
#if OSL_DEBUG_LEVEL > 1
OSL_TRACE( "DatabaseContext: changing registration from %s to %s",
- ::rtl::OUStringToOString( _rOldURL, RTL_TEXTENCODING_UTF8 ).getStr(),
- ::rtl::OUStringToOString( _rNewURL, RTL_TEXTENCODING_UTF8 ).getStr() );
+ OUStringToOString( _rOldURL, RTL_TEXTENCODING_UTF8 ).getStr(),
+ OUStringToOString( _rNewURL, RTL_TEXTENCODING_UTF8 ).getStr() );
#endif
ObjectCache::iterator oldPos = m_aDatabaseObjects.find( _rOldURL );
ENSURE_OR_THROW( oldPos != m_aDatabaseObjects.end(), "illegal old database document URL" );
diff --git a/dbaccess/source/core/dataaccess/databasecontext.hxx b/dbaccess/source/core/dataaccess/databasecontext.hxx
index 6e4342597032..7f99ea7b3c50 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.hxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.hxx
@@ -78,14 +78,14 @@ private:
@throws WrappedTargetException
if an error occurs accessing the URL via the UCB
*/
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > loadObjectFromURL(const ::rtl::OUString& _rName,const ::rtl::OUString& _sURL);
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getObject( const ::rtl::OUString& _rURL );
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > loadObjectFromURL(const OUString& _rName,const OUString& _sURL);
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getObject( const OUString& _rURL );
/** sets all properties which were transient at the data source. e.g. password
@param _sURL The file URL of the data source
@param _xObject The data source itself.
*/
- void setTransientProperties(const ::rtl::OUString& _sURL, ODatabaseModelImpl& _rDataSourceModel );
+ void setTransientProperties(const OUString& _sURL, ODatabaseModelImpl& _rDataSourceModel );
/** creates a new data source
*/
@@ -128,13 +128,13 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArguments( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& _rArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
// XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
// XServiceInfo - static methods
- static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_static(void) throw( ::com::sun::star::uno::RuntimeException );
- static ::rtl::OUString getImplementationName_static(void) throw( ::com::sun::star::uno::RuntimeException );
+ static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_static(void) throw( ::com::sun::star::uno::RuntimeException );
+ static OUString getImplementationName_static(void) throw( ::com::sun::star::uno::RuntimeException );
static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&);
@@ -146,23 +146,23 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration( ) throw(::com::sun::star::uno::RuntimeException);
// XNameAccess
- virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName( const OUString& aName ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getElementNames( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) throw(::com::sun::star::uno::RuntimeException);
// XNamingService
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getRegisteredObject( const ::rtl::OUString& Name ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL registerObject( const ::rtl::OUString& Name, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Object ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL revokeObject( const ::rtl::OUString& Name ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getRegisteredObject( const OUString& Name ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL registerObject( const OUString& Name, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Object ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL revokeObject( const OUString& Name ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
// XDatabaseRegistrations
- virtual ::sal_Bool SAL_CALL hasRegisteredDatabase( const ::rtl::OUString& Name ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getRegistrationNames() throw (::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getDatabaseLocation( const ::rtl::OUString& Name ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL registerDatabaseLocation( const ::rtl::OUString& Name, const ::rtl::OUString& Location ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL revokeDatabaseLocation( const ::rtl::OUString& Name ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalAccessException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL changeDatabaseLocation( const ::rtl::OUString& Name, const ::rtl::OUString& NewLocation ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalAccessException, ::com::sun::star::uno::RuntimeException);
- virtual ::sal_Bool SAL_CALL isDatabaseRegistrationReadOnly( const ::rtl::OUString& Name ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL hasRegisteredDatabase( const OUString& Name ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getRegistrationNames() throw (::com::sun::star::uno::RuntimeException);
+ virtual OUString SAL_CALL getDatabaseLocation( const OUString& Name ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL registerDatabaseLocation( const OUString& Name, const OUString& Location ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL revokeDatabaseLocation( const OUString& Name ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalAccessException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL changeDatabaseLocation( const OUString& Name, const OUString& NewLocation ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalAccessException, ::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL isDatabaseRegistrationReadOnly( const OUString& Name ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL addDatabaseRegistrationsListener( const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseRegistrationsListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL removeDatabaseRegistrationsListener( const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseRegistrationsListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
@@ -176,7 +176,7 @@ public:
void registerDatabaseDocument( ODatabaseModelImpl& _rModelImpl);
void revokeDatabaseDocument( const ODatabaseModelImpl& _rModelImpl);
- void databaseDocumentURLChange(const ::rtl::OUString& _sOldName, const ::rtl::OUString& _sNewName);
+ void databaseDocumentURLChange(const OUString& _sOldName, const OUString& _sNewName);
void storeTransientProperties( ODatabaseModelImpl& _rModelImpl);
void appendAtTerminateListener(const ODatabaseModelImpl& _rDataSourceModel);
void removeFromTerminateListener(const ODatabaseModelImpl& _rDataSourceModel);
diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx
index 31b21b271b12..29ac5847ca5b 100644
--- a/dbaccess/source/core/misc/dsntypes.cxx
+++ b/dbaccess/source/core/misc/dsntypes.cxx
@@ -43,12 +43,12 @@ namespace dbaccess
namespace
{
- void lcl_extractHostAndPort(const String& _sUrl,String& _sHostname,sal_Int32& _nPortNumber)
+ void lcl_extractHostAndPort(const OUString& _sUrl,OUString& _sHostname,sal_Int32& _nPortNumber)
{
if ( comphelper::string::getTokenCount(_sUrl, ':') >= 2 )
{
- _sHostname = _sUrl.GetToken(0,':');
- _nPortNumber = _sUrl.GetToken(1,':').ToInt32();
+ _sHostname = _sUrl.getToken(0,':');
+ _nPortNumber = _sUrl.getToken(1,':').toInt32();
}
}
}
@@ -65,9 +65,9 @@ ODsnTypeCollection::ODsnTypeCollection(const ::com::sun::star::uno::Reference< :
#endif
{
DBG_CTOR(ODsnTypeCollection,NULL);
- const uno::Sequence< ::rtl::OUString > aURLs = m_aDriverConfig.getURLs();
- const ::rtl::OUString* pIter = aURLs.getConstArray();
- const ::rtl::OUString* pEnd = pIter + aURLs.getLength();
+ const uno::Sequence< OUString > aURLs = m_aDriverConfig.getURLs();
+ const OUString* pIter = aURLs.getConstArray();
+ const OUString* pEnd = pIter + aURLs.getLength();
for(;pIter != pEnd;++pIter )
{
m_aDsnPrefixes.push_back(*pIter);
@@ -85,27 +85,28 @@ ODsnTypeCollection::~ODsnTypeCollection()
OSL_ENSURE(0 == m_nLivingIterators, "ODsnTypeCollection::~ODsnTypeCollection : there are still living iterator objects!");
}
//-------------------------------------------------------------------------
-String ODsnTypeCollection::getTypeDisplayName(const ::rtl::OUString& _sURL) const
+OUString ODsnTypeCollection::getTypeDisplayName(const OUString& _sURL) const
{
return m_aDriverConfig.getDriverTypeDisplayName(_sURL);
}
//-------------------------------------------------------------------------
-String ODsnTypeCollection::cutPrefix(const ::rtl::OUString& _sURL) const
+OUString ODsnTypeCollection::cutPrefix(const OUString& _sURL) const
{
- String sURL( _sURL);
- String sRet;
- String sOldPattern;
+ OUString sURL( _sURL);
+ OUString sRet;
+ OUString sOldPattern;
StringVector::const_iterator aIter = m_aDsnPrefixes.begin();
StringVector::const_iterator aEnd = m_aDsnPrefixes.end();
+
for(;aIter != aEnd;++aIter)
{
WildCard aWildCard(*aIter);
- if ( sOldPattern.Len() < aIter->Len() && aWildCard.Matches(_sURL) )
+ if ( sOldPattern.getLength() < aIter->getLength() && aWildCard.Matches(_sURL) )
{
- if ( aIter->Len() < sURL.Len() )
- sRet = sURL.Copy(sURL.Match(*aIter));
+ if ( aIter->getLength() < sURL.getLength() )
+ sRet = sURL.copy(sURL.match(*aIter));
else
- sRet = sURL.Copy(aIter->Match(sURL));
+ sRet = sURL.copy(aIter->match(sURL));
sOldPattern = *aIter;
}
}
@@ -114,22 +115,22 @@ String ODsnTypeCollection::cutPrefix(const ::rtl::OUString& _sURL) const
}
//-------------------------------------------------------------------------
-String ODsnTypeCollection::getPrefix(const ::rtl::OUString& _sURL) const
+OUString ODsnTypeCollection::getPrefix(const OUString& _sURL) const
{
- String sURL( _sURL);
- String sRet;
- String sOldPattern;
+ OUString sURL( _sURL);
+ OUString sRet;
+ OUString sOldPattern;
StringVector::const_iterator aIter = m_aDsnPrefixes.begin();
StringVector::const_iterator aEnd = m_aDsnPrefixes.end();
for(;aIter != aEnd;++aIter)
{
WildCard aWildCard(*aIter);
- if ( sOldPattern.Len() < aIter->Len() && aWildCard.Matches(sURL) )
+ if ( sOldPattern.getLength() < aIter->getLength() && aWildCard.Matches(sURL) )
{
- if ( aIter->Len() < sURL.Len() )
- sRet = aIter->Copy(0,sURL.Match(*aIter));
+ if ( aIter->getLength() < sURL.getLength() )
+ sRet = aIter->copy(0,sURL.match(*aIter));
else
- sRet = sURL.Copy(0,aIter->Match(sURL));
+ sRet = sURL.copy(0,aIter->match(sURL));
sRet = comphelper::string::stripEnd(sRet, '*');
sOldPattern = *aIter;
}
@@ -141,48 +142,48 @@ String ODsnTypeCollection::getPrefix(const ::rtl::OUString& _sURL) const
//-------------------------------------------------------------------------
bool ODsnTypeCollection::hasDriver( const sal_Char* _pAsciiPattern ) const
{
- String sPrefix( getPrefix( ::rtl::OUString::createFromAscii( _pAsciiPattern ) ) );
- return ( sPrefix.Len() > 0 );
+ OUString sPrefix( getPrefix( OUString::createFromAscii( _pAsciiPattern ) ) );
+ return ( sPrefix.getLength() > 0 );
}
// -----------------------------------------------------------------------------
-bool ODsnTypeCollection::isConnectionUrlRequired(const ::rtl::OUString& _sURL) const
+bool ODsnTypeCollection::isConnectionUrlRequired(const OUString& _sURL) const
{
- String sURL( _sURL);
- String sRet;
- String sOldPattern;
+ OUString sURL( _sURL);
+ OUString sRet;
+ OUString sOldPattern;
StringVector::const_iterator aIter = m_aDsnPrefixes.begin();
StringVector::const_iterator aEnd = m_aDsnPrefixes.end();
for(;aIter != aEnd;++aIter)
{
WildCard aWildCard(*aIter);
- if ( sOldPattern.Len() < aIter->Len() && aWildCard.Matches(sURL) )
+ if ( sOldPattern.getLength() < aIter->getLength() && aWildCard.Matches(sURL) )
{
sRet = *aIter;
sOldPattern = *aIter;
}
}
- return sRet.Len() > 0 && sRet.GetChar(sRet.Len()-1) == '*';
+ return sRet.getLength() > 0 && sRet[sRet.getLength()-1] == '*';
}
// -----------------------------------------------------------------------------
-String ODsnTypeCollection::getMediaType(const ::rtl::OUString& _sURL) const
+OUString ODsnTypeCollection::getMediaType(const OUString& _sURL) const
{
const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getMetaData(_sURL);
- return aFeatures.getOrDefault("MediaType",::rtl::OUString());
+ return aFeatures.getOrDefault("MediaType",OUString());
}
// -----------------------------------------------------------------------------
-String ODsnTypeCollection::getDatasourcePrefixFromMediaType(const ::rtl::OUString& _sMediaType,const ::rtl::OUString& _sExtension)
+OUString ODsnTypeCollection::getDatasourcePrefixFromMediaType(const OUString& _sMediaType,const OUString& _sExtension)
{
- String sURL, sFallbackURL;
- const uno::Sequence< ::rtl::OUString > aURLs = m_aDriverConfig.getURLs();
- const ::rtl::OUString* pIter = aURLs.getConstArray();
- const ::rtl::OUString* pEnd = pIter + aURLs.getLength();
+ OUString sURL, sFallbackURL;
+ const uno::Sequence< OUString > aURLs = m_aDriverConfig.getURLs();
+ const OUString* pIter = aURLs.getConstArray();
+ const OUString* pEnd = pIter + aURLs.getLength();
for(;pIter != pEnd;++pIter )
{
const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getMetaData(*pIter);
- if ( aFeatures.getOrDefault("MediaType",::rtl::OUString()) == _sMediaType )
+ if ( aFeatures.getOrDefault("MediaType",OUString()) == _sMediaType )
{
- const ::rtl::OUString sFileExtension = aFeatures.getOrDefault("Extension",::rtl::OUString());
+ const OUString sFileExtension = aFeatures.getOrDefault("Extension",OUString());
if ( _sExtension == sFileExtension )
{
sURL = *pIter;
@@ -193,14 +194,14 @@ String ODsnTypeCollection::getDatasourcePrefixFromMediaType(const ::rtl::OUStrin
}
}
- if ( !sURL.Len() && sFallbackURL.Len() )
+ if ( !sURL.getLength() && sFallbackURL.getLength() )
sURL = sFallbackURL;
sURL = comphelper::string::stripEnd(sURL, '*');
return sURL;
}
// -----------------------------------------------------------------------------
-bool ODsnTypeCollection::isShowPropertiesEnabled( const ::rtl::OUString& _sURL ) const
+bool ODsnTypeCollection::isShowPropertiesEnabled( const OUString& _sURL ) const
{
return !( _sURL.matchIgnoreAsciiCaseAsciiL("sdbc:embedded:hsqldb",sizeof("sdbc:embedded:hsqldb")-1)
|| _sURL.matchIgnoreAsciiCaseAsciiL("sdbc:address:outlook",sizeof("sdbc:address:outlook")-1)
@@ -213,20 +214,20 @@ bool ODsnTypeCollection::isShowPropertiesEnabled( const ::rtl::OUString& _sURL )
|| _sURL.matchIgnoreAsciiCaseAsciiL("sdbc:address:macab",sizeof("sdbc:address:macab")-1) );
}
// -----------------------------------------------------------------------------
-void ODsnTypeCollection::extractHostNamePort(const ::rtl::OUString& _rDsn,String& _sDatabaseName,String& _rsHostname,sal_Int32& _nPortNumber) const
+void ODsnTypeCollection::extractHostNamePort(const OUString& _rDsn,OUString& _sDatabaseName,OUString& _rsHostname,sal_Int32& _nPortNumber) const
{
- String sUrl = cutPrefix(_rDsn);
+ OUString sUrl = cutPrefix(_rDsn);
if ( _rDsn.matchIgnoreAsciiCaseAsciiL("jdbc:oracle:thin:",sizeof("jdbc:oracle:thin:")-1) )
{
lcl_extractHostAndPort(sUrl,_rsHostname,_nPortNumber);
- if ( !_rsHostname.Len() && comphelper::string::getTokenCount(sUrl, ':') == 2 )
+ if ( !_rsHostname.getLength() && comphelper::string::getTokenCount(sUrl, ':') == 2 )
{
_nPortNumber = -1;
- _rsHostname = sUrl.GetToken(0,':');
+ _rsHostname = sUrl.getToken(0,':');
}
- if ( _rsHostname.Len() )
- _rsHostname = _rsHostname.GetToken(comphelper::string::getTokenCount(_rsHostname, '@') - 1, '@');
- _sDatabaseName = sUrl.GetToken(comphelper::string::getTokenCount(sUrl, ':') - 1, ':');
+ if ( _rsHostname.getLength() )
+ _rsHostname = _rsHostname.getToken(comphelper::string::getTokenCount(_rsHostname, '@') - 1, '@');
+ _sDatabaseName = sUrl.getToken(comphelper::string::getTokenCount(sUrl, ':') - 1, ':');
}
else if ( _rDsn.matchIgnoreAsciiCaseAsciiL("sdbc:address:ldap:",sizeof("sdbc:address:ldap:")-1) )
{
@@ -236,14 +237,14 @@ void ODsnTypeCollection::extractHostNamePort(const ::rtl::OUString& _rDsn,String
{
lcl_extractHostAndPort(sUrl,_rsHostname,_nPortNumber);
- if ( _nPortNumber == -1 && !_rsHostname.Len() && comphelper::string::getTokenCount(sUrl, '/') == 2 )
- _rsHostname = sUrl.GetToken(0,'/');
- _sDatabaseName = sUrl.GetToken(comphelper::string::getTokenCount(sUrl, '/') - 1, '/');
+ if ( _nPortNumber == -1 && !_rsHostname.getLength() && comphelper::string::getTokenCount(sUrl, '/') == 2 )
+ _rsHostname = sUrl.getToken(0,'/');
+ _sDatabaseName = sUrl.getToken(comphelper::string::getTokenCount(sUrl, '/') - 1, '/');
}
else if ( _rDsn.matchIgnoreAsciiCaseAsciiL("sdbc:ado:access:Provider=Microsoft.ACE.OLEDB.12.0;DATA SOURCE=",sizeof("sdbc:ado:access:Provider=Microsoft.ACE.OLEDB.12.0;DATA SOURCE=")-1)
|| _rDsn.matchIgnoreAsciiCaseAsciiL("sdbc:ado:access:PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=",sizeof("sdbc:ado:access:PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=")-1))
{
- ::rtl::OUString sNewFileName;
+ OUString sNewFileName;
if ( ::osl::FileBase::getFileURLFromSystemPath( sUrl, sNewFileName ) == ::osl::FileBase::E_None )
{
_sDatabaseName = sNewFileName;
@@ -251,52 +252,52 @@ void ODsnTypeCollection::extractHostNamePort(const ::rtl::OUString& _rDsn,String
}
}
// -----------------------------------------------------------------------------
-String ODsnTypeCollection::getJavaDriverClass(const ::rtl::OUString& _sURL) const
+OUString ODsnTypeCollection::getJavaDriverClass(const OUString& _sURL) const
{
const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getProperties(_sURL);
- return aFeatures.getOrDefault("JavaDriverClass",::rtl::OUString());
+ return aFeatures.getOrDefault("JavaDriverClass",OUString());
}
//-------------------------------------------------------------------------
-sal_Bool ODsnTypeCollection::isFileSystemBased(const ::rtl::OUString& _sURL) const
+sal_Bool ODsnTypeCollection::isFileSystemBased(const OUString& _sURL) const
{
const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getMetaData(_sURL);
return aFeatures.getOrDefault("FileSystemBased",sal_False);
}
// -----------------------------------------------------------------------------
-sal_Bool ODsnTypeCollection::supportsTableCreation(const ::rtl::OUString& _sURL) const
+sal_Bool ODsnTypeCollection::supportsTableCreation(const OUString& _sURL) const
{
const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getMetaData(_sURL);
return aFeatures.getOrDefault("SupportsTableCreation",sal_False);
}
// -----------------------------------------------------------------------------
-sal_Bool ODsnTypeCollection::supportsColumnDescription(const ::rtl::OUString& _sURL) const
+sal_Bool ODsnTypeCollection::supportsColumnDescription(const OUString& _sURL) const
{
const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getMetaData(_sURL);
return aFeatures.getOrDefault("SupportsColumnDescription",sal_False);
}
// -----------------------------------------------------------------------------
-sal_Bool ODsnTypeCollection::supportsBrowsing(const ::rtl::OUString& _sURL) const
+sal_Bool ODsnTypeCollection::supportsBrowsing(const OUString& _sURL) const
{
const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getMetaData(_sURL);
return aFeatures.getOrDefault("SupportsBrowsing",sal_False);
}
// -----------------------------------------------------------------------------
-bool ODsnTypeCollection::needsJVM(const String& _sURL) const
+bool ODsnTypeCollection::needsJVM(const OUString& _sURL) const
{
const ::comphelper::NamedValueCollection& aFeatures = m_aDriverConfig.getMetaData(_sURL);
return aFeatures.getOrDefault("UseJava",sal_False);
}
// -----------------------------------------------------------------------------
-Sequence<PropertyValue> ODsnTypeCollection::getDefaultDBSettings( const ::rtl::OUString& _sURL ) const
+Sequence<PropertyValue> ODsnTypeCollection::getDefaultDBSettings( const OUString& _sURL ) const
{
const ::comphelper::NamedValueCollection& aProperties = m_aDriverConfig.getProperties(_sURL);
return aProperties.getPropertyValues();
}
//-------------------------------------------------------------------------
-bool ODsnTypeCollection::isEmbeddedDatabase( const ::rtl::OUString& _sURL ) const
+bool ODsnTypeCollection::isEmbeddedDatabase( const OUString& _sURL ) const
{
- const ::rtl::OUString sEmbeddedDatabaseURL = getEmbeddedDatabase();
+ const OUString sEmbeddedDatabaseURL = getEmbeddedDatabase();
WildCard aWildCard(sEmbeddedDatabaseURL);
return aWildCard.Matches(_sURL);
}
@@ -333,10 +334,10 @@ ODsnTypeCollection::TypeIterator ODsnTypeCollection::end() const
return TypeIterator(this, m_aDsnTypesDisplayNames.size());
}
//-------------------------------------------------------------------------
-DATASOURCE_TYPE ODsnTypeCollection::determineType(const String& _rDsn) const
+DATASOURCE_TYPE ODsnTypeCollection::determineType(const OUString& _rDsn) const
{
- String sDsn(comphelper::string::stripEnd(_rDsn, '*'));
- sal_uInt16 nSeparator = sDsn.Search((sal_Unicode)':');
+ OUString sDsn(comphelper::string::stripEnd(_rDsn, '*'));
+ sal_uInt16 nSeparator = sDsn.indexOf((sal_Unicode)':');
if (STRING_NOTFOUND == nSeparator)
{
// there should be at least one such separator
@@ -344,22 +345,22 @@ DATASOURCE_TYPE ODsnTypeCollection::determineType(const String& _rDsn) const
return DST_UNKNOWN;
}
// find first :
- sal_uInt16 nOracleSeparator = sDsn.Search((sal_Unicode)':', nSeparator + 1);
+ sal_uInt16 nOracleSeparator = sDsn.indexOf((sal_Unicode)':', nSeparator + 1);
if ( nOracleSeparator != STRING_NOTFOUND )
{
- nOracleSeparator = sDsn.Search((sal_Unicode)':', nOracleSeparator + 1);
- if (nOracleSeparator != STRING_NOTFOUND && sDsn.EqualsIgnoreCaseAscii("jdbc:oracle:thin", 0, nOracleSeparator))
+ nOracleSeparator = sDsn.indexOf((sal_Unicode)':', nOracleSeparator + 1);
+ if (nOracleSeparator != STRING_NOTFOUND && sDsn.equalsIgnoreAsciiCaseAsciiL("jdbc:oracle:thin", nOracleSeparator))
return DST_ORACLE_JDBC;
}
- if (sDsn.EqualsIgnoreCaseAscii("jdbc", 0, nSeparator))
+ if (sDsn.equalsIgnoreAsciiCaseAsciiL("jdbc", nSeparator))
return DST_JDBC;
- if (sDsn.EqualsIgnoreCaseAscii("sdbc:embedded:hsqldb", 0, sDsn.Len()))
+ if (sDsn.equalsIgnoreAsciiCaseAsciiL("sdbc:embedded:hsqldb", sDsn.getLength()))
return DST_EMBEDDED_HSQLDB;
// find second :
- nSeparator = sDsn.Search((sal_Unicode)':', nSeparator + 1);
+ nSeparator = sDsn.indexOf((sal_Unicode)':', nSeparator + 1);
if (STRING_NOTFOUND == nSeparator)
{
// at the moment only jdbc is allowed to have just one separator
@@ -367,13 +368,13 @@ DATASOURCE_TYPE ODsnTypeCollection::determineType(const String& _rDsn) const
return DST_UNKNOWN;
}
- if (sDsn.EqualsIgnoreCaseAscii("sdbc:ado:", 0, nSeparator))
+ if (sDsn.equalsIgnoreAsciiCaseAsciiL("sdbc:ado:", nSeparator))
{
- nSeparator = sDsn.Search((sal_Unicode)':', nSeparator + 1);
- if (STRING_NOTFOUND != nSeparator && sDsn.EqualsIgnoreCaseAscii("sdbc:ado:access",0, nSeparator) )
+ nSeparator = sDsn.indexOf((sal_Unicode)':', nSeparator + 1);
+ if (STRING_NOTFOUND != nSeparator && sDsn.equalsIgnoreAsciiCaseAsciiL("sdbc:ado:access", nSeparator) )
{
- nSeparator = sDsn.Search((sal_Unicode)';', nSeparator + 1);
- if (STRING_NOTFOUND != nSeparator && sDsn.EqualsIgnoreCaseAscii("sdbc:ado:access:Provider=Microsoft.ACE.OLEDB.12.0",0, nSeparator) )
+ nSeparator = sDsn.indexOf((sal_Unicode)';', nSeparator + 1);
+ if (STRING_NOTFOUND != nSeparator && sDsn.equalsIgnoreAsciiCaseAsciiL("sdbc:ado:access:Provider=Microsoft.ACE.OLEDB.12.0", nSeparator) )
return DST_MSACCESS_2007;
return DST_MSACCESS;
@@ -425,15 +426,15 @@ DATASOURCE_TYPE ODsnTypeCollection::determineType(const String& _rDsn) const
for ( size_t i=0; i < sizeof( aKnowPrefixes ) / sizeof( aKnowPrefixes[0] ); ++i )
{
- sal_uInt16 nMatchLen = aKnowPrefixes[i].bMatchComplete ? sDsn.Len() : (sal_uInt16)rtl_str_getLength( aKnowPrefixes[i].pAsciiPrefix );
- if ( sDsn.EqualsIgnoreCaseAscii( aKnowPrefixes[i].pAsciiPrefix, 0, nMatchLen ) )
+ sal_uInt16 nMatchLen = aKnowPrefixes[i].bMatchComplete ? sDsn.getLength() : (sal_uInt16)rtl_str_getLength( aKnowPrefixes[i].pAsciiPrefix );
+ if ( sDsn.equalsIgnoreAsciiCaseAsciiL( aKnowPrefixes[i].pAsciiPrefix, nMatchLen ) )
return aKnowPrefixes[i].eType;
}
return DST_UNKNOWN;
}
// -----------------------------------------------------------------------------
-void ODsnTypeCollection::fillPageIds(const ::rtl::OUString& _sURL,::std::vector<sal_Int16>& _rOutPathIds) const
+void ODsnTypeCollection::fillPageIds(const OUString& _sURL,::std::vector<sal_Int16>& _rOutPathIds) const
{
DATASOURCE_TYPE eType = determineType(_sURL);
switch(eType)
@@ -495,15 +496,15 @@ void ODsnTypeCollection::fillPageIds(const ::rtl::OUString& _sURL,::std::vector<
}
}
// -----------------------------------------------------------------------------
-::rtl::OUString ODsnTypeCollection::getType(const ::rtl::OUString& _sURL) const
+OUString ODsnTypeCollection::getType(const OUString& _sURL) const
{
- ::rtl::OUString sOldPattern;
+ OUString sOldPattern;
StringVector::const_iterator aIter = m_aDsnPrefixes.begin();
StringVector::const_iterator aEnd = m_aDsnPrefixes.end();
for(;aIter != aEnd;++aIter)
{
WildCard aWildCard(*aIter);
- if ( sOldPattern.getLength() < aIter->Len() && aWildCard.Matches(_sURL) )
+ if ( sOldPattern.getLength() < aIter->getLength() && aWildCard.Matches(_sURL) )
{
sOldPattern = *aIter;
}
@@ -511,17 +512,17 @@ void ODsnTypeCollection::fillPageIds(const ::rtl::OUString& _sURL,::std::vector<
return sOldPattern;
}
// -----------------------------------------------------------------------------
-sal_Int32 ODsnTypeCollection::getIndexOf(const ::rtl::OUString& _sURL) const
+sal_Int32 ODsnTypeCollection::getIndexOf(const OUString& _sURL) const
{
sal_Int32 nRet = -1;
- String sURL( _sURL);
- String sOldPattern;
+ OUString sURL( _sURL);
+ OUString sOldPattern;
StringVector::const_iterator aIter = m_aDsnPrefixes.begin();
StringVector::const_iterator aEnd = m_aDsnPrefixes.end();
for(sal_Int32 i = 0;aIter != aEnd;++aIter,++i)
{
WildCard aWildCard(*aIter);
- if ( sOldPattern.Len() < aIter->Len() && aWildCard.Matches(sURL) )
+ if ( sOldPattern.getLength() < aIter->getLength() && aWildCard.Matches(sURL) )
{
nRet = i;
sOldPattern = *aIter;
@@ -568,13 +569,13 @@ ODsnTypeCollection::TypeIterator::~TypeIterator()
}
//-------------------------------------------------------------------------
-String ODsnTypeCollection::TypeIterator::getDisplayName() const
+OUString ODsnTypeCollection::TypeIterator::getDisplayName() const
{
OSL_ENSURE(m_nPosition < (sal_Int32)m_pContainer->m_aDsnTypesDisplayNames.size(), "ODsnTypeCollection::TypeIterator::getDisplayName : invalid position!");
return m_pContainer->m_aDsnTypesDisplayNames[m_nPosition];
}
// -----------------------------------------------------------------------------
-::rtl::OUString ODsnTypeCollection::TypeIterator::getURLPrefix() const
+OUString ODsnTypeCollection::TypeIterator::getURLPrefix() const
{
OSL_ENSURE(m_nPosition < (sal_Int32)m_pContainer->m_aDsnPrefixes.size(), "ODsnTypeCollection::TypeIterator::getDisplayName : invalid position!");
return m_pContainer->m_aDsnPrefixes[m_nPosition];
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index 4410d851446b..53fbca513dfe 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -64,15 +64,15 @@ namespace dbaxml
class ODBExportHelper
{
public:
- static ::rtl::OUString SAL_CALL getImplementationName_Static( ) throw (RuntimeException);
- static Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_Static( ) throw(RuntimeException);
+ static OUString SAL_CALL getImplementationName_Static( ) throw (RuntimeException);
+ static Sequence< OUString > SAL_CALL getSupportedServiceNames_Static( ) throw(RuntimeException);
static Reference< XInterface > SAL_CALL Create(const Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
};
class ODBFullExportHelper
{
public:
- static ::rtl::OUString SAL_CALL getImplementationName_Static( ) throw (RuntimeException);
- static Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_Static( ) throw(RuntimeException);
+ static OUString SAL_CALL getImplementationName_Static( ) throw (RuntimeException);
+ static Sequence< OUString > SAL_CALL getSupportedServiceNames_Static( ) throw(RuntimeException);
static Reference< XInterface > SAL_CALL Create(const Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
};
}
@@ -105,15 +105,15 @@ namespace dbaxml
return static_cast< XServiceInfo* >(new ODBExport(comphelper::getComponentContext(_rxORB),EXPORT_SETTINGS | EXPORT_PRETTY ));
}
//---------------------------------------------------------------------
- ::rtl::OUString SAL_CALL ODBExportHelper::getImplementationName_Static( ) throw (RuntimeException)
+ OUString SAL_CALL ODBExportHelper::getImplementationName_Static( ) throw (RuntimeException)
{
- return ::rtl::OUString("com.sun.star.comp.sdb.XMLSettingsExporter");
+ return OUString("com.sun.star.comp.sdb.XMLSettingsExporter");
}
//---------------------------------------------------------------------
- Sequence< ::rtl::OUString > SAL_CALL ODBExportHelper::getSupportedServiceNames_Static( ) throw(RuntimeException)
+ Sequence< OUString > SAL_CALL ODBExportHelper::getSupportedServiceNames_Static( ) throw(RuntimeException)
{
- Sequence< ::rtl::OUString > aSupported(1);
- aSupported[0] = ::rtl::OUString("com.sun.star.document.ExportFilter");
+ Sequence< OUString > aSupported(1);
+ aSupported[0] = OUString("com.sun.star.document.ExportFilter");
return aSupported;
}
@@ -124,29 +124,29 @@ namespace dbaxml
return static_cast< XServiceInfo* >(new ODBExport(comphelper::getComponentContext(_rxORB),EXPORT_ALL));
}
//---------------------------------------------------------------------
- ::rtl::OUString SAL_CALL ODBFullExportHelper::getImplementationName_Static( ) throw (RuntimeException)
+ OUString SAL_CALL ODBFullExportHelper::getImplementationName_Static( ) throw (RuntimeException)
{
- return ::rtl::OUString("com.sun.star.comp.sdb.XMLFullExporter");
+ return OUString("com.sun.star.comp.sdb.XMLFullExporter");
}
//---------------------------------------------------------------------
- Sequence< ::rtl::OUString > SAL_CALL ODBFullExportHelper::getSupportedServiceNames_Static( ) throw(RuntimeException)
+ Sequence< OUString > SAL_CALL ODBFullExportHelper::getSupportedServiceNames_Static( ) throw(RuntimeException)
{
- Sequence< ::rtl::OUString > aSupported(1);
- aSupported[0] = ::rtl::OUString("com.sun.star.document.ExportFilter");
+ Sequence< OUString > aSupported(1);
+ aSupported[0] = OUString("com.sun.star.document.ExportFilter");
return aSupported;
}
//---------------------------------------------------------------------
- ::rtl::OUString lcl_implGetPropertyXMLType(const Type& _rType)
+ OUString lcl_implGetPropertyXMLType(const Type& _rType)
{
// possible types we can write (either because we recognize them directly or because we convert _rValue
// into one of these types)
- static const ::rtl::OUString s_sTypeBoolean ("boolean");
- static const ::rtl::OUString s_sTypeShort ("short");
- static const ::rtl::OUString s_sTypeInteger ("int");
- static const ::rtl::OUString s_sTypeLong ("long");
- static const ::rtl::OUString s_sTypeDouble ("double");
- static const ::rtl::OUString s_sTypeString ("string");
+ static const OUString s_sTypeBoolean ("boolean");
+ static const OUString s_sTypeShort ("short");
+ static const OUString s_sTypeInteger ("int");
+ static const OUString s_sTypeLong ("long");
+ static const OUString s_sTypeDouble ("double");
+ static const OUString s_sTypeString ("string");
// handle the type description
switch (_rType.getTypeClass())
@@ -236,27 +236,27 @@ ODBExport::ODBExport(const Reference< XComponentContext >& _rxContext,sal_uInt16
GetAutoStylePool()->AddFamily(
XML_STYLE_FAMILY_TABLE_TABLE,
- rtl::OUString(XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME ),
+ OUString(XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME ),
m_xExportHelper.get(),
- rtl::OUString(XML_STYLE_FAMILY_TABLE_TABLE_STYLES_PREFIX ));
+ OUString(XML_STYLE_FAMILY_TABLE_TABLE_STYLES_PREFIX ));
GetAutoStylePool()->AddFamily(
XML_STYLE_FAMILY_TABLE_COLUMN,
- rtl::OUString(XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME ),
+ OUString(XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME ),
m_xColumnExportHelper.get(),
- rtl::OUString(XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_PREFIX ));
+ OUString(XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_PREFIX ));
GetAutoStylePool()->AddFamily(
XML_STYLE_FAMILY_TABLE_CELL,
- rtl::OUString(XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME ),
+ OUString(XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME ),
m_xCellExportHelper.get(),
- rtl::OUString(XML_STYLE_FAMILY_TABLE_CELL_STYLES_PREFIX ));
+ OUString(XML_STYLE_FAMILY_TABLE_CELL_STYLES_PREFIX ));
GetAutoStylePool()->AddFamily(
XML_STYLE_FAMILY_TABLE_ROW,
- rtl::OUString(XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME ),
+ OUString(XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME ),
m_xRowExportHelper.get(),
- rtl::OUString(XML_STYLE_FAMILY_TABLE_ROW_STYLES_PREFIX ));
+ OUString(XML_STYLE_FAMILY_TABLE_ROW_STYLES_PREFIX ));
}
// -----------------------------------------------------------------------------
IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(ODBExport, "com.sun.star.comp.sdb.DBExportFilter")
@@ -291,11 +291,11 @@ void ODBExport::exportDataSource()
xSettingsState->getPropertyDefault( INFO_THOUSANDSDELIMITER ) >>= aDelimiter.sThousand;
::connectivity::DriversConfig aDriverConfig(getComponentContext());
- const ::rtl::OUString sURL = ::comphelper::getString(xProp->getPropertyValue(PROPERTY_URL));
+ const OUString sURL = ::comphelper::getString(xProp->getPropertyValue(PROPERTY_URL));
::comphelper::NamedValueCollection aDriverSupportedProperties( aDriverConfig.getProperties( sURL ) );
- static ::rtl::OUString s_sTrue(::xmloff::token::GetXMLToken( XML_TRUE ));
- static ::rtl::OUString s_sFalse(::xmloff::token::GetXMLToken( XML_FALSE ));
+ static OUString s_sTrue(::xmloff::token::GetXMLToken( XML_TRUE ));
+ static OUString s_sFalse(::xmloff::token::GetXMLToken( XML_FALSE ));
// loop through the properties, and export only those which are not defaulted
TSettingsMap aSettingsMap;
Sequence< Property > aProperties = xSettingsInfo->getProperties();
@@ -303,7 +303,7 @@ void ODBExport::exportDataSource()
const Property* pPropertiesEnd = pProperties + aProperties.getLength();
for ( ; pProperties != pPropertiesEnd; ++pProperties )
{
- ::rtl::OUString sValue;
+ OUString sValue;
Any aValue = xDataSourceSettings->getPropertyValue( pProperties->Name );
switch ( aValue.getValueTypeClass() )
{
@@ -312,7 +312,7 @@ void ODBExport::exportDataSource()
break;
case TypeClass_DOUBLE:
// let the unit converter format is as string
- sValue = ::rtl::OUString::valueOf( getDouble( aValue ) );
+ sValue = OUString::valueOf( getDouble( aValue ) );
break;
case TypeClass_BOOLEAN:
sValue = ::xmloff::token::GetXMLToken( getBOOL( aValue ) ? XML_TRUE : XML_FALSE );
@@ -321,7 +321,7 @@ void ODBExport::exportDataSource()
case TypeClass_SHORT:
case TypeClass_LONG:
// let the unit converter format is as string
- sValue = ::rtl::OUString::valueOf( getINT32( aValue ) );
+ sValue = OUString::valueOf( getINT32( aValue ) );
break;
default:
break;
@@ -331,18 +331,18 @@ void ODBExport::exportDataSource()
struct PropertyMap
{
- const ::rtl::OUString sPropertyName;
+ const OUString sPropertyName;
const XMLTokenEnum eAttributeToken;
- const ::boost::optional< ::rtl::OUString > aXMLDefault;
+ const ::boost::optional< OUString > aXMLDefault;
- PropertyMap( const ::rtl::OUString& _rPropertyName, const XMLTokenEnum _eToken )
+ PropertyMap( const OUString& _rPropertyName, const XMLTokenEnum _eToken )
:sPropertyName( _rPropertyName )
,eAttributeToken( _eToken )
,aXMLDefault()
{
}
- PropertyMap( const ::rtl::OUString& _rPropertyName, const XMLTokenEnum _eToken, const ::rtl::OUString& _rDefault )
+ PropertyMap( const OUString& _rPropertyName, const XMLTokenEnum _eToken, const OUString& _rDefault )
:sPropertyName( _rPropertyName )
,eAttributeToken( _eToken )
,aXMLDefault( _rDefault )
@@ -404,13 +404,13 @@ void ODBExport::exportDataSource()
sal_Int32 nValue = 0;
aValue >>= nValue;
if ( sValue == "0" )
- sValue = ::rtl::OUString("equal-integer");
+ sValue = OUString("equal-integer");
else if ( sValue == "1" )
- sValue = ::rtl::OUString("is-boolean");
+ sValue = OUString("is-boolean");
else if ( sValue == "2" )
- sValue = ::rtl::OUString("equal-boolean");
+ sValue = OUString("equal-boolean");
else if ( sValue == "3" )
- sValue = ::rtl::OUString("equal-use-only-zero");
+ sValue = OUString("equal-use-only-zero");
if ( sValue == "equal-integer" )
continue;
eToken = XML_BOOLEAN_COMPARISON_MODE;
@@ -510,7 +510,7 @@ void ODBExport::exportApplicationConnectionSettings(const TSettingsMap& _aSettin
SvXMLElementExport aElem(*this,XML_NAMESPACE_DB, XML_APPLICATION_CONNECTION_SETTINGS, sal_True, sal_True);
Reference<XPropertySet> xProp(getDataSource());
- Sequence< ::rtl::OUString> aValue;
+ Sequence< OUString> aValue;
xProp->getPropertyValue(PROPERTY_TABLEFILTER) >>= aValue;
if ( aValue.getLength() )
{
@@ -551,7 +551,7 @@ void ODBExport::exportConnectionData()
SvXMLElementExport aConnData(*this,XML_NAMESPACE_DB, XML_CONNECTION_DATA, sal_True, sal_True);
{
- ::rtl::OUString sValue;
+ OUString sValue;
Reference<XPropertySet> xProp(getDataSource());
xProp->getPropertyValue(PROPERTY_URL) >>= sValue;
if ( m_aTypeCollection.isFileSystemBased(sValue) )
@@ -559,12 +559,12 @@ void ODBExport::exportConnectionData()
SvXMLElementExport aDatabaseDescription(*this,XML_NAMESPACE_DB, XML_DATABASE_DESCRIPTION, sal_True, sal_True);
{
SvtPathOptions aPathOptions;
- const String sOrigUrl = m_aTypeCollection.cutPrefix(sValue);
- String sFileName = aPathOptions.SubstituteVariable(sOrigUrl);
+ const OUString sOrigUrl = m_aTypeCollection.cutPrefix(sValue);
+ OUString sFileName = aPathOptions.SubstituteVariable(sOrigUrl);
if ( sOrigUrl == sFileName )
{
::svt::OFileNotation aTransformer( sFileName );
- ::rtl::OUStringBuffer sURL( aTransformer.get( ::svt::OFileNotation::N_URL ) );
+ OUStringBuffer sURL( aTransformer.get( ::svt::OFileNotation::N_URL ) );
if (sURL.getLength() == 0 || sURL[sURL.getLength() - 1] != '/')
sURL.append('/');
@@ -576,9 +576,9 @@ void ODBExport::exportConnectionData()
const ::dbaccess::DATASOURCE_TYPE eType = m_aTypeCollection.determineType(sValue);
try
{
- ::rtl::OUString sExtension;
+ OUString sExtension;
if ( eType == dbaccess::DST_MSACCESS )
- sExtension = ::rtl::OUString("mdb");
+ sExtension = OUString("mdb");
else
{
Reference< XPropertySet > xDataSourceSettings;
@@ -596,19 +596,19 @@ void ODBExport::exportConnectionData()
}
else
{
- String sDatabaseName,sHostName;
+ OUString sDatabaseName,sHostName;
sal_Int32 nPort = -1;
m_aTypeCollection.extractHostNamePort(sValue,sDatabaseName,sHostName,nPort);
- if ( sHostName.Len() )
+ if ( sHostName.getLength() )
{
SvXMLElementExport aDatabaseDescription(*this,XML_NAMESPACE_DB, XML_DATABASE_DESCRIPTION, sal_True, sal_True);
{
- String sType = comphelper::string::stripEnd(m_aTypeCollection.getPrefix(sValue), ':');
+ OUString sType = comphelper::string::stripEnd(m_aTypeCollection.getPrefix(sValue), ':');
AddAttribute(XML_NAMESPACE_DB,XML_TYPE,sType);
AddAttribute(XML_NAMESPACE_DB,XML_HOSTNAME,sHostName);
if ( nPort != -1 )
- AddAttribute(XML_NAMESPACE_DB,XML_PORT,::rtl::OUString::valueOf(nPort));
- if ( sDatabaseName.Len() )
+ AddAttribute(XML_NAMESPACE_DB,XML_PORT,OUString::valueOf(nPort));
+ if ( sDatabaseName.getLength() )
AddAttribute(XML_NAMESPACE_DB,XML_DATABASE_NAME,sDatabaseName);
try
@@ -639,10 +639,10 @@ void ODBExport::exportConnectionData()
++i
)
{
- const ::rtl::OUString sPropertyName = ::rtl::OUString::createFromAscii( aProperties[i].pAsciiPropertyName );
+ const OUString sPropertyName = OUString::createFromAscii( aProperties[i].pAsciiPropertyName );
if ( xSettingsInfo->hasPropertyByName( sPropertyName ) )
{
- ::rtl::OUString sPropertyValue;
+ OUString sPropertyValue;
if ( ( xDataSourceSettings->getPropertyValue( sPropertyName ) >>= sPropertyValue ) && !sPropertyValue.isEmpty() )
AddAttribute( XML_NAMESPACE_DB, XML_LOCAL_SOCKET, sPropertyValue );
@@ -702,7 +702,7 @@ void ODBExport::exportDataSourceSettings()
AddAttribute( XML_NAMESPACE_DB, XML_DATA_SOURCE_SETTING_IS_LIST,bIsSequence ? XML_TRUE : XML_FALSE );
AddAttribute( XML_NAMESPACE_DB, XML_DATA_SOURCE_SETTING_NAME, aIter->Name );
- ::rtl::OUString sTypeName = lcl_implGetPropertyXMLType( aSimpleType );
+ OUString sTypeName = lcl_implGetPropertyXMLType( aSimpleType );
if ( bIsSequence && aSimpleType.getTypeClass() == TypeClass_ANY )
{
Sequence<Any> aSeq;
@@ -727,7 +727,7 @@ void ODBExport::exportDataSourceSettings()
switch (aSimpleType.getTypeClass())
{
case TypeClass_STRING:
- exportDataSourceSettingsSequence< ::rtl::OUString >(
+ exportDataSourceSettingsSequence< OUString >(
aIter );
break;
case TypeClass_DOUBLE:
@@ -788,18 +788,18 @@ void ODBExport::exportAutoIncrement()
}
}
// -----------------------------------------------------------------------------
-void ODBExport::exportSequence(const Sequence< ::rtl::OUString>& _aValue
+void ODBExport::exportSequence(const Sequence< OUString>& _aValue
,::xmloff::token::XMLTokenEnum _eTokenFilter
,::xmloff::token::XMLTokenEnum _eTokenType)
{
Reference<XPropertySet> xProp(getDataSource());
- Sequence< ::rtl::OUString> aValue;
+ Sequence< OUString> aValue;
if ( _aValue.getLength() )
{
SvXMLElementExport aElem(*this,XML_NAMESPACE_DB, _eTokenFilter, sal_True, sal_True);
- const ::rtl::OUString* pIter = _aValue.getConstArray();
- const ::rtl::OUString* pEnd = pIter + _aValue.getLength();
+ const OUString* pIter = _aValue.getConstArray();
+ const OUString* pEnd = pIter + _aValue.getLength();
for(;pIter != pEnd;++pIter)
{
SvXMLElementExport aDataSource(*this,XML_NAMESPACE_DB, _eTokenType, sal_True, sal_False);
@@ -811,7 +811,7 @@ void ODBExport::exportSequence(const Sequence< ::rtl::OUString>& _aValue
void ODBExport::exportLogin()
{
Reference<XPropertySet> xProp(getDataSource());
- ::rtl::OUString sValue;
+ OUString sValue;
xProp->getPropertyValue(PROPERTY_USER) >>= sValue;
sal_Bool bAddLogin = !sValue.isEmpty();
if ( bAddLogin )
@@ -840,9 +840,9 @@ void ODBExport::exportCollection(const Reference< XNameAccess >& _xCollection
SAL_WNODEPRECATED_DECLARATIONS_POP
if ( _bExportContext )
pComponents.reset( new SvXMLElementExport(*this,XML_NAMESPACE_DB, _eComponents, sal_True, sal_True));
- Sequence< ::rtl::OUString> aSeq = _xCollection->getElementNames();
- const ::rtl::OUString* pIter = aSeq.getConstArray();
- const ::rtl::OUString* pEnd = pIter + aSeq.getLength();
+ Sequence< OUString> aSeq = _xCollection->getElementNames();
+ const OUString* pIter = aSeq.getConstArray();
+ const OUString* pEnd = pIter + aSeq.getLength();
for(;pIter != pEnd;++pIter)
{
Reference<XPropertySet> xProp(_xCollection->getByName(*pIter),UNO_QUERY);
@@ -861,14 +861,14 @@ void ODBExport::exportCollection(const Reference< XNameAccess >& _xCollection
// -----------------------------------------------------------------------------
void ODBExport::exportComponent(XPropertySet* _xProp)
{
- ::rtl::OUString sValue;
+ OUString sValue;
_xProp->getPropertyValue(PROPERTY_PERSISTENT_NAME) >>= sValue;
sal_Bool bIsForm = sal_True;
- _xProp->getPropertyValue(::rtl::OUString("IsForm")) >>= bIsForm;
+ _xProp->getPropertyValue(OUString("IsForm")) >>= bIsForm;
if ( bIsForm )
- sValue = ::rtl::OUString("forms/") + sValue;
+ sValue = OUString("forms/") + sValue;
else
- sValue = ::rtl::OUString("reports/") + sValue;
+ sValue = OUString("reports/") + sValue;
AddAttribute(XML_NAMESPACE_XLINK, XML_HREF,sValue);
sal_Bool bAsTemplate = sal_False;
@@ -945,7 +945,7 @@ void ODBExport::exportStyleName(const ::xmloff::token::XMLTokenEnum _eToken,cons
// -----------------------------------------------------------------------------
void ODBExport::exportTableName(XPropertySet* _xProp,sal_Bool _bUpdate)
{
- ::rtl::OUString sValue;
+ OUString sValue;
_xProp->getPropertyValue(_bUpdate ? PROPERTY_UPDATE_TABLENAME : PROPERTY_NAME) >>= sValue;
if ( !sValue.isEmpty() )
{
@@ -965,11 +965,11 @@ void ODBExport::exportTableName(XPropertySet* _xProp,sal_Bool _bUpdate)
}
// -----------------------------------------------------------------------------
void ODBExport::exportFilter(XPropertySet* _xProp
- ,const ::rtl::OUString& _sProp
+ ,const OUString& _sProp
,enum ::xmloff::token::XMLTokenEnum _eStatementType)
{
OSL_PRECOND(!GetAttrList().getLength(),"Invalid attribute length!");
- ::rtl::OUString sCommand;
+ OUString sCommand;
_xProp->getPropertyValue(_sProp) >>= sCommand;
if ( !sCommand.isEmpty() )
{
@@ -1006,9 +1006,9 @@ void ODBExport::exportColumns(const Reference<XColumnsSupplier>& _xColSup)
}
SvXMLElementExport aColumns(*this,XML_NAMESPACE_DB, XML_COLUMNS, sal_True, sal_True);
- Sequence< ::rtl::OUString> aSeq = xNameAccess->getElementNames();
- const ::rtl::OUString* pIter = aSeq.getConstArray();
- const ::rtl::OUString* pEnd = pIter + aSeq.getLength();
+ Sequence< OUString> aSeq = xNameAccess->getElementNames();
+ const OUString* pIter = aSeq.getConstArray();
+ const OUString* pEnd = pIter + aSeq.getLength();
for( ; pIter != pEnd ; ++pIter)
{
Reference<XPropertySet> xProp(xNameAccess->getByName(*pIter),UNO_QUERY);
@@ -1020,7 +1020,7 @@ void ODBExport::exportColumns(const Reference<XColumnsSupplier>& _xColSup)
sal_Bool bHidden = getBOOL(xProp->getPropertyValue(PROPERTY_HIDDEN));
- ::rtl::OUString sValue;
+ OUString sValue;
xProp->getPropertyValue(PROPERTY_HELPTEXT) >>= sValue;
Any aColumnDefault;
aColumnDefault = xProp->getPropertyValue(PROPERTY_CONTROLDEFAULT);
@@ -1036,7 +1036,7 @@ void ODBExport::exportColumns(const Reference<XColumnsSupplier>& _xColSup)
if ( aColumnDefault.hasValue() )
{
- ::rtl::OUStringBuffer sColumnDefaultString,sType;
+ OUStringBuffer sColumnDefaultString,sType;
::sax::Converter::convertAny(
sColumnDefaultString, sType, aColumnDefault );
AddAttribute(XML_NAMESPACE_DB, XML_TYPE_NAME,sType.makeStringAndClear());
@@ -1063,7 +1063,7 @@ void ODBExport::exportColumns(const Reference<XColumnsSupplier>& _xColSup)
void ODBExport::exportForms()
{
Any aValue;
- ::rtl::OUString sService;
+ OUString sService;
dbtools::getDataSourceSetting(getDataSource(),"Forms",aValue);
aValue >>= sService;
if ( sService.isEmpty() )
@@ -1084,7 +1084,7 @@ void ODBExport::exportForms()
void ODBExport::exportReports()
{
Any aValue;
- ::rtl::OUString sService;
+ OUString sService;
dbtools::getDataSourceSetting(getDataSource(),"Reports",aValue);
aValue >>= sService;
if ( sService.isEmpty() )
@@ -1105,7 +1105,7 @@ void ODBExport::exportReports()
void ODBExport::exportQueries(sal_Bool _bExportContext)
{
Any aValue;
- ::rtl::OUString sService;
+ OUString sService;
dbtools::getDataSourceSetting(getDataSource(),"CommandDefinitions",aValue);
aValue >>= sService;
if ( sService.isEmpty() )
@@ -1314,10 +1314,10 @@ void ODBExport::GetViewSettings(Sequence<PropertyValue>& aProps)
{
sal_Int32 nLength = aProps.getLength();
aProps.realloc(nLength + 1);
- aProps[nLength].Name = ::rtl::OUString("Queries");
- Sequence< ::rtl::OUString> aSeq = xCollection->getElementNames();
- const ::rtl::OUString* pIter = aSeq.getConstArray();
- const ::rtl::OUString* pEnd = pIter + aSeq.getLength();
+ aProps[nLength].Name = OUString("Queries");
+ Sequence< OUString> aSeq = xCollection->getElementNames();
+ const OUString* pIter = aSeq.getConstArray();
+ const OUString* pEnd = pIter + aSeq.getLength();
Sequence<PropertyValue> aQueries(aSeq.getLength());
for(sal_Int32 i = 0;pIter != pEnd;++pIter,++i)
@@ -1354,7 +1354,7 @@ void ODBExport::GetConfigurationSettings(Sequence<PropertyValue>& aProps)
if ( aPropValues.getLength() )
{
aProps.realloc(nLength + 1);
- aProps[nLength].Name = ::rtl::OUString("layout-settings");
+ aProps[nLength].Name = OUString("layout-settings");
aProps[nLength].Value = aValue;
}
}
@@ -1365,14 +1365,14 @@ void ODBExport::GetConfigurationSettings(Sequence<PropertyValue>& aProps)
}
}
// -----------------------------------------------------------------------------
-::rtl::OUString ODBExport::implConvertAny(const Any& _rValue)
+OUString ODBExport::implConvertAny(const Any& _rValue)
{
- ::rtl::OUStringBuffer aBuffer;
+ OUStringBuffer aBuffer;
switch (_rValue.getValueTypeClass())
{
case TypeClass_STRING:
{ // extract the string
- ::rtl::OUString sCurrentValue;
+ OUString sCurrentValue;
_rValue >>= sCurrentValue;
aBuffer.append(sCurrentValue);
}
diff --git a/dbaccess/source/filter/xml/xmlExport.hxx b/dbaccess/source/filter/xml/xmlExport.hxx
index 68ce90019e5a..e9a04e5367b5 100644
--- a/dbaccess/source/filter/xml/xmlExport.hxx
+++ b/dbaccess/source/filter/xml/xmlExport.hxx
@@ -64,29 +64,29 @@ using namespace ::com::sun::star::xml::sax;
class ODBExport : public SvXMLExport
{
- typedef ::std::map< ::xmloff::token::XMLTokenEnum, ::rtl::OUString> TSettingsMap;
+ typedef ::std::map< ::xmloff::token::XMLTokenEnum, OUString> TSettingsMap;
- typedef ::std::pair< ::rtl::OUString ,::rtl::OUString> TStringPair;
+ typedef ::std::pair< OUString ,OUString> TStringPair;
struct TDelimiter
{
- ::rtl::OUString sText;
- ::rtl::OUString sField;
- ::rtl::OUString sDecimal;
- ::rtl::OUString sThousand;
+ OUString sText;
+ OUString sField;
+ OUString sDecimal;
+ OUString sThousand;
bool bUsed;
TDelimiter() : bUsed( false ) { }
};
- typedef ::std::map< Reference<XPropertySet> ,::rtl::OUString > TPropertyStyleMap;
+ typedef ::std::map< Reference<XPropertySet> ,OUString > TPropertyStyleMap;
typedef ::std::map< Reference<XPropertySet> ,Reference<XPropertySet> > TTableColumnMap;
struct TypedPropertyValue
{
- ::rtl::OUString Name;
+ OUString Name;
::com::sun::star::uno::Type Type;
::com::sun::star::uno::Any Value;
- TypedPropertyValue( const ::rtl::OUString& _name, const ::com::sun::star::uno::Type& _type, const ::com::sun::star::uno::Any& _value )
+ TypedPropertyValue( const OUString& _name, const ::com::sun::star::uno::Type& _type, const ::com::sun::star::uno::Any& _value )
:Name( _name )
,Type( _type )
,Value( _value )
@@ -102,7 +102,7 @@ class ODBExport : public SvXMLExport
TPropertyStyleMap m_aCellAutoStyleNames;
TPropertyStyleMap m_aRowAutoStyleNames;
TTableColumnMap m_aTableDummyColumns;
- ::rtl::OUString m_sCharSet;
+ OUString m_sCharSet;
UniReference < SvXMLExportPropertyMapper> m_xExportHelper;
UniReference < SvXMLExportPropertyMapper> m_xColumnExportHelper;
UniReference < SvXMLExportPropertyMapper> m_xCellExportHelper;
@@ -122,7 +122,7 @@ class ODBExport : public SvXMLExport
void exportDriverSettings(const TSettingsMap& _aSettings);
void exportApplicationConnectionSettings(const TSettingsMap& _aSettings);
void exportLogin();
- void exportSequence(const Sequence< ::rtl::OUString>& _aValue
+ void exportSequence(const Sequence< OUString>& _aValue
,::xmloff::token::XMLTokenEnum _eTokenFilter
,::xmloff::token::XMLTokenEnum _eTokenType);
void exportDelimiter();
@@ -147,14 +147,14 @@ class ODBExport : public SvXMLExport
void exportQuery(XPropertySet* _xProp);
void exportTable(XPropertySet* _xProp);
void exportFilter(XPropertySet* _xProp
- ,const ::rtl::OUString& _sProp
+ ,const OUString& _sProp
,enum ::xmloff::token::XMLTokenEnum _eStatementType);
void exportTableName(XPropertySet* _xProp,sal_Bool _bUpdate);
void exportAutoStyle(XPropertySet* _xProp);
void exportColumns(const Reference<XColumnsSupplier>& _xColSup);
void collectComponentStyles();
- ::rtl::OUString implConvertAny(const Any& _rValue);
+ OUString implConvertAny(const Any& _rValue);
UniReference < XMLPropertySetMapper > GetTableStylesPropertySetMapper() const;
diff --git a/dbaccess/source/inc/dsntypes.hxx b/dbaccess/source/inc/dsntypes.hxx
index fc2d64d2f76b..eec1af661c00 100644
--- a/dbaccess/source/inc/dsntypes.hxx
+++ b/dbaccess/source/inc/dsntypes.hxx
@@ -104,7 +104,7 @@ enum DATASOURCE_TYPE
class OOO_DLLPUBLIC_DBA ODsnTypeCollection
{
protected:
- DECLARE_STL_VECTOR(String, StringVector);
+ DECLARE_STL_VECTOR(OUString, StringVector);
StringVector m_aDsnTypesDisplayNames; /// user readable names for the datasource types
StringVector m_aDsnPrefixes; /// DSN prefixes which determine the type of a datasource
@@ -123,69 +123,69 @@ public:
~ODsnTypeCollection();
/// get the datasource type display name from a DSN string
- String getTypeDisplayName(const ::rtl::OUString& _sURL) const;
+ OUString getTypeDisplayName(const OUString& _sURL) const;
/// on a given string, cut the type prefix and return the result
- String cutPrefix(const ::rtl::OUString& _sURL) const;
+ OUString cutPrefix(const OUString& _sURL) const;
/// on a given string, return the type prefix
- String getPrefix(const ::rtl::OUString& _sURL) const;
+ OUString getPrefix(const OUString& _sURL) const;
/// determines whether there is a driver for the given URL prefix/pattern
bool hasDriver( const sal_Char* _pAsciiPattern ) const;
/// on a given string, return the Java Driver Class
- String getJavaDriverClass(const ::rtl::OUString& _sURL) const;
+ OUString getJavaDriverClass(const OUString& _sURL) const;
/// returns the media type of a file based database
- String getMediaType(const ::rtl::OUString& _sURL) const;
+ OUString getMediaType(const OUString& _sURL) const;
/// returns the dsn prefix for a given media type
- String getDatasourcePrefixFromMediaType(const ::rtl::OUString& _sMediaType,const ::rtl::OUString& _sExtension = ::rtl::OUString() );
+ OUString getDatasourcePrefixFromMediaType(const OUString& _sMediaType,const OUString& _sExtension = OUString() );
- void extractHostNamePort(const ::rtl::OUString& _rDsn,String& _sDatabaseName,String& _rHostname,sal_Int32& _nPortNumber) const;
+ void extractHostNamePort(const OUString& _rDsn,OUString& _sDatabaseName,OUString& _rHostname,sal_Int32& _nPortNumber) const;
/// check if the given data source allows creation of tables
- sal_Bool supportsTableCreation(const ::rtl::OUString& _sURL) const;
+ sal_Bool supportsTableCreation(const OUString& _sURL) const;
/// check if the given data source allows to show column description.
- sal_Bool supportsColumnDescription(const ::rtl::OUString& _sURL) const;
+ sal_Bool supportsColumnDescription(const OUString& _sURL) const;
// check if a Browse button may be shown to insert connection url
- sal_Bool supportsBrowsing(const ::rtl::OUString& _sURL) const;
+ sal_Bool supportsBrowsing(const OUString& _sURL) const;
/// check if the given data source tyoe is based on the file system - i.e. the URL is a prefix plus a file URL
- sal_Bool isFileSystemBased(const ::rtl::OUString& _sURL) const;
+ sal_Bool isFileSystemBased(const OUString& _sURL) const;
- bool isConnectionUrlRequired(const ::rtl::OUString& _sURL) const;
+ bool isConnectionUrlRequired(const OUString& _sURL) const;
/// checks if the given data source type embeds its data into the database document
- bool isEmbeddedDatabase( const ::rtl::OUString& _sURL ) const;
+ bool isEmbeddedDatabase( const OUString& _sURL ) const;
- ::rtl::OUString getEmbeddedDatabase() const;
+ OUString getEmbeddedDatabase() const;
// returns true when the properties dialog can be shown, otherwise false.
- bool isShowPropertiesEnabled( const ::rtl::OUString& _sURL ) const;
+ bool isShowPropertiesEnabled( const OUString& _sURL ) const;
/** returns default settings for newly created databases of the given type.
*/
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>
- getDefaultDBSettings( const ::rtl::OUString& _sURL ) const;
+ getDefaultDBSettings( const OUString& _sURL ) const;
/// get access to the first element of the types collection
TypeIterator begin() const;
/// get access to the (last + 1st) element of the types collection
TypeIterator end() const;
- void fillPageIds(const ::rtl::OUString& _sURL,::std::vector<sal_Int16>& _rOutPathIds) const;
+ void fillPageIds(const OUString& _sURL,::std::vector<sal_Int16>& _rOutPathIds) const;
- DATASOURCE_TYPE determineType(const String& _rDsn) const;
+ DATASOURCE_TYPE determineType(const OUString& _rDsn) const;
- bool needsJVM(const String& _rDsn) const;
+ bool needsJVM(const OUString& _rDsn) const;
- sal_Int32 getIndexOf(const ::rtl::OUString& _sURL) const;
+ sal_Int32 getIndexOf(const OUString& _sURL) const;
sal_Int32 size() const;
- ::rtl::OUString getType(const ::rtl::OUString& _sURL) const;
+ OUString getType(const OUString& _sURL) const;
};
//-------------------------------------------------------------------------
@@ -206,8 +206,8 @@ public:
TypeIterator(const TypeIterator& _rSource);
~TypeIterator();
- ::rtl::OUString getURLPrefix() const;
- String getDisplayName() const;
+ OUString getURLPrefix() const;
+ OUString getDisplayName() const;
/// prefix increment
const TypeIterator& operator++();
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index cc9622490766..c21c1616373f 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -164,25 +164,25 @@ namespace DatabaseObject = ::com::sun::star::sdb::application::DatabaseObject;
namespace DatabaseObjectContainer = ::com::sun::star::sdb::application::DatabaseObjectContainer;
//------------------------------------------------------------------------------
-::rtl::OUString SAL_CALL OApplicationController::getImplementationName() throw( RuntimeException )
+OUString SAL_CALL OApplicationController::getImplementationName() throw( RuntimeException )
{
return getImplementationName_Static();
}
//------------------------------------------------------------------------------
-::rtl::OUString OApplicationController::getImplementationName_Static() throw( RuntimeException )
+OUString OApplicationController::getImplementationName_Static() throw( RuntimeException )
{
- return ::rtl::OUString(SERVICE_SDB_APPLICATIONCONTROLLER);
+ return OUString(SERVICE_SDB_APPLICATIONCONTROLLER);
}
//------------------------------------------------------------------------------
-Sequence< ::rtl::OUString> OApplicationController::getSupportedServiceNames_Static(void) throw( RuntimeException )
+Sequence< OUString> OApplicationController::getSupportedServiceNames_Static(void) throw( RuntimeException )
{
- Sequence< ::rtl::OUString> aSupported(1);
- aSupported.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.application.DefaultViewController"));
+ Sequence< OUString> aSupported(1);
+ aSupported.getArray()[0] = OUString("com.sun.star.sdb.application.DefaultViewController");
return aSupported;
}
//-------------------------------------------------------------------------
-Sequence< ::rtl::OUString> SAL_CALL OApplicationController::getSupportedServiceNames() throw(RuntimeException)
+Sequence< OUString> SAL_CALL OApplicationController::getSupportedServiceNames() throw(RuntimeException)
{
return getSupportedServiceNames_Static();
}
@@ -386,7 +386,7 @@ void SAL_CALL OApplicationController::disposing()
if ( m_xDataSource.is() )
{
- m_xDataSource->removePropertyChangeListener(::rtl::OUString(), this);
+ m_xDataSource->removePropertyChangeListener(OUString(), this);
m_xDataSource->removePropertyChangeListener(PROPERTY_INFO, this);
m_xDataSource->removePropertyChangeListener(PROPERTY_URL, this);
m_xDataSource->removePropertyChangeListener(PROPERTY_ISPASSWORDREQUIRED, this);
@@ -406,13 +406,13 @@ void SAL_CALL OApplicationController::disposing()
if ( m_xModel.is() )
{
- ::rtl::OUString sUrl = m_xModel->getURL();
+ OUString sUrl = m_xModel->getURL();
if ( !sUrl.isEmpty() )
{
::comphelper::NamedValueCollection aArgs( m_xModel->getArgs() );
if ( true == aArgs.getOrDefault( "PickListEntry", true ) )
{
- ::rtl::OUString aFilter;
+ OUString aFilter;
INetURLObject aURL( m_xModel->getURL() );
const SfxFilter* pFilter = getStandardDatabaseFilter();
if ( pFilter )
@@ -423,7 +423,7 @@ void SAL_CALL OApplicationController::disposing()
aURL.GetURLNoPass( INetURLObject::NO_DECODE ),
aFilter,
getStrippedDatabaseName(),
- ::rtl::OUString() );
+ OUString() );
}
}
@@ -531,7 +531,7 @@ sal_Bool SAL_CALL OApplicationController::suspend(sal_Bool bSuspend) throw( Runt
if ( xBroadcaster.is() )
{
xBroadcaster->notifyDocumentEvent(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OnPrepareViewClosing" ) ),
+ OUString("OnPrepareViewClosing"),
this,
Any()
);
@@ -660,7 +660,7 @@ FeatureState OApplicationController::GetState(sal_uInt16 _nId) const
aReturn.bEnabled = xEnumAccess.is();
if ( aReturn.bEnabled )
{
- const ::rtl::OUString sReportEngineServiceName = ::dbtools::getDefaultReportEngineServiceName(m_xContext);
+ const OUString sReportEngineServiceName = ::dbtools::getDefaultReportEngineServiceName(m_xContext);
aReturn.bEnabled = !sReportEngineServiceName.isEmpty();
if ( aReturn.bEnabled )
{
@@ -746,7 +746,7 @@ FeatureState OApplicationController::GetState(sal_uInt16 _nId) const
aReturn.bEnabled = xEnumAccess.is();
if ( aReturn.bEnabled )
{
- static ::rtl::OUString s_sReportDesign(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.report.pentaho.SOReportJobFactory"));
+ static OUString s_sReportDesign("com.sun.star.report.pentaho.SOReportJobFactory");
Reference< XEnumeration > xEnumDrivers = xEnumAccess->createContentEnumeration(s_sReportDesign);
aReturn.bEnabled = xEnumDrivers.is() && xEnumDrivers->hasMoreElements();
}
@@ -804,10 +804,10 @@ FeatureState OApplicationController::GetState(sal_uInt16 _nId) const
&& ( getContainer()->isALeafSelected() )
)
{
- ::std::vector< ::rtl::OUString > aSelected;
+ ::std::vector< OUString > aSelected;
getSelectionElementNames( aSelected );
bool bAlterableViews = true;
- for ( ::std::vector< ::rtl::OUString >::const_iterator selectedName = aSelected.begin();
+ for ( ::std::vector< OUString >::const_iterator selectedName = aSelected.begin();
bAlterableViews && ( selectedName != aSelected.end() ) ;
++selectedName
)
@@ -898,12 +898,12 @@ FeatureState OApplicationController::GetState(sal_uInt16 _nId) const
aReturn.bEnabled = m_xDataSource.is();
if ( aReturn.bEnabled )
{
- ::rtl::OUString sURL;
+ OUString sURL;
m_xDataSource->getPropertyValue(PROPERTY_URL) >>= sURL;
- ::rtl::OUString sDSTypeName;
+ OUString sDSTypeName;
if ( m_aTypeCollection.isEmbeddedDatabase( sURL ) )
{
- sDSTypeName = String( ModuleRes( RID_STR_EMBEDDED_DATABASE ) );
+ sDSTypeName = OUString( ModuleRes( RID_STR_EMBEDDED_DATABASE ) );
}
else
{
@@ -916,20 +916,20 @@ FeatureState OApplicationController::GetState(sal_uInt16 _nId) const
aReturn.bEnabled = m_xDataSource.is();
if ( aReturn.bEnabled )
{
- ::rtl::OUString sURL;
+ OUString sURL;
m_xDataSource->getPropertyValue(PROPERTY_URL) >>= sURL;
- String sDatabaseName;
- String sHostName;
+ OUString sDatabaseName;
+ OUString sHostName;
sal_Int32 nPortNumber( -1 );
m_aTypeCollection.extractHostNamePort( sURL, sDatabaseName, sHostName, nPortNumber );
- if ( !sDatabaseName.Len() )
+ if ( !sDatabaseName.getLength() )
sDatabaseName = m_aTypeCollection.cutPrefix( sURL );
if ( m_aTypeCollection.isFileSystemBased(sURL) )
{
sDatabaseName = SvtPathOptions().SubstituteVariable( sDatabaseName );
- if ( sDatabaseName.Len() )
+ if ( sDatabaseName.getLength() )
{
::svt::OFileNotation aFileNotation(sDatabaseName);
// set this decoded URL as text
@@ -937,7 +937,7 @@ FeatureState OApplicationController::GetState(sal_uInt16 _nId) const
}
}
- if ( sDatabaseName.Len() == 0 )
+ if ( sDatabaseName.getLength() == 0 )
sDatabaseName = m_aTypeCollection.getTypeDisplayName( sURL );
aReturn.sTitle = sDatabaseName;
@@ -952,10 +952,10 @@ FeatureState OApplicationController::GetState(sal_uInt16 _nId) const
aReturn.bEnabled = m_xDataSource.is();
if ( aReturn.bEnabled )
{
- ::rtl::OUString sURL;
+ OUString sURL;
m_xDataSource->getPropertyValue( PROPERTY_URL ) >>= sURL;
- String sHostName, sDatabaseName;
+ OUString sHostName, sDatabaseName;
sal_Int32 nPortNumber = -1;
m_aTypeCollection.extractHostNamePort( sURL, sDatabaseName, sHostName, nPortNumber );
aReturn.sTitle = sHostName;
@@ -1044,7 +1044,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
case E_TABLE:
{
// get the selected tablename
- ::std::vector< ::rtl::OUString > aList;
+ ::std::vector< OUString > aList;
getSelectionElementNames( aList );
if ( !aList.empty() )
m_aTableCopyHelper.SetTableNameForAppend( *aList.begin() );
@@ -1061,9 +1061,9 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
break;
default:
{
- ::std::vector< ::rtl::OUString> aList;
+ ::std::vector< OUString> aList;
getSelectionElementNames(aList);
- ::rtl::OUString sFolderNameToInsertInto;
+ OUString sFolderNameToInsertInto;
if ( !aList.empty() )
{
Reference< XHierarchicalNameAccess > xContainer(getElements(eType),UNO_QUERY);
@@ -1092,7 +1092,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
::std::vector<SotFormatStringId> aFormatIds;
getSupportedFormats(getContainer()->getElementType(),aFormatIds);
const ::std::vector<SotFormatStringId>::iterator aEnd = aFormatIds.end();
- ::rtl::OUString sEmpty;
+ OUString sEmpty;
for (::std::vector<SotFormatStringId>::iterator aIter = aFormatIds.begin();aIter != aEnd; ++aIter)
pDlg->Insert(*aIter,sEmpty);
@@ -1126,16 +1126,16 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
switch(_nId)
{
case SID_HELP_INDEX:
- aURL.Complete = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:HelpIndex"));
+ aURL.Complete = OUString(".uno:HelpIndex");
break;
case SID_OPENDOC:
- aURL.Complete = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Open"));
+ aURL.Complete = OUString(".uno:Open");
break;
}
if ( m_xUrlTransformer.is() )
m_xUrlTransformer->parseStrict( aURL );
- Reference < XDispatch > xDisp = xProv->queryDispatch( aURL, String(), 0 );
+ Reference < XDispatch > xDisp = xProv->queryDispatch( aURL, OUString(), 0 );
if ( xDisp.is() )
xDisp->dispatch( aURL, Sequence < PropertyValue >() );
}
@@ -1157,7 +1157,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
case ID_BROWSER_SAVEASDOC:
{
- ::rtl::OUString sUrl;
+ OUString sUrl;
if ( m_xModel.is() )
sUrl = m_xModel->getURL();
if ( sUrl.isEmpty() )
@@ -1252,7 +1252,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
eType = E_QUERY;
break;
case ID_NEW_QUERY_DESIGN:
- aCreationArgs.put( (::rtl::OUString)PROPERTY_GRAPHICAL_DESIGN, sal_True );
+ aCreationArgs.put( (OUString)PROPERTY_GRAPHICAL_DESIGN, sal_True );
// run through
case ID_NEW_QUERY_SQL:
eType = E_QUERY;
@@ -1277,7 +1277,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
case SID_APP_NEW_FOLDER:
{
ElementType eType = getContainer()->getElementType();
- ::rtl::OUString sName = getContainer()->getQualifiedName( NULL );
+ OUString sName = getContainer()->getQualifiedName( NULL );
insertHierachyElement(eType,sName);
}
break;
@@ -1290,11 +1290,11 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
QueryDesigner aDesigner( getORB(), this, getFrame(), true );
::comphelper::NamedValueCollection aCreationArgs;
- aCreationArgs.put( (::rtl::OUString)PROPERTY_GRAPHICAL_DESIGN, ID_NEW_VIEW_DESIGN == _nId );
+ aCreationArgs.put( (OUString)PROPERTY_GRAPHICAL_DESIGN, ID_NEW_VIEW_DESIGN == _nId );
const Reference< XDataSource > xDataSource( m_xDataSource, UNO_QUERY );
const Reference< XComponent > xComponent( aDesigner.createNew( xDataSource, aCreationArgs ), UNO_QUERY );
- onDocumentOpened( ::rtl::OUString(), E_QUERY, E_OPEN_DESIGN, xComponent, NULL );
+ onDocumentOpened( OUString(), E_QUERY, E_OPEN_DESIGN, xComponent, NULL );
}
}
break;
@@ -1337,7 +1337,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
case SID_DB_APP_DSRELDESIGN:
{
Reference< XComponent > xRelationDesigner;
- if ( !m_pSubComponentManager->activateSubFrame( ::rtl::OUString(), SID_DB_APP_DSRELDESIGN, E_OPEN_DESIGN, xRelationDesigner ) )
+ if ( !m_pSubComponentManager->activateSubFrame( OUString(), SID_DB_APP_DSRELDESIGN, E_OPEN_DESIGN, xRelationDesigner ) )
{
SharedConnection xConnection( ensureConnection() );
if ( xConnection.is() )
@@ -1346,7 +1346,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
const Reference< XDataSource > xDataSource( m_xDataSource, UNO_QUERY );
const Reference< XComponent > xComponent( aDesigner.createNew( xDataSource ), UNO_QUERY );
- onDocumentOpened( ::rtl::OUString(), SID_DB_APP_DSRELDESIGN, E_OPEN_DESIGN, xComponent, NULL );
+ onDocumentOpened( OUString(), SID_DB_APP_DSRELDESIGN, E_OPEN_DESIGN, xComponent, NULL );
}
}
}
@@ -1355,7 +1355,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
{
SharedConnection xConnection( ensureConnection() );
if ( xConnection.is() )
- openDialog(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.UserAdministrationDialog")));
+ openDialog(OUString("com.sun.star.sdb.UserAdministrationDialog"));
}
break;
case SID_DB_APP_TABLEFILTER:
@@ -1370,11 +1370,11 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
askToReconnect();
break;
case SID_DB_APP_DSADVANCED_SETTINGS:
- openDialog(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.AdvancedDatabaseSettingsDialog")));
+ openDialog(OUString("com.sun.star.sdb.AdvancedDatabaseSettingsDialog"));
askToReconnect();
break;
case SID_DB_APP_DSCONNECTION_TYPE:
- openDialog(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.DataSourceTypeChangeDialog")));
+ openDialog(OUString("com.sun.star.sdb.DataSourceTypeChangeDialog"));
askToReconnect();
break;
case ID_DIRECT_SQL:
@@ -1414,7 +1414,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
case SID_MAIL_SENDDOC:
{
SfxMailModel aSendMail;
- if ( aSendMail.AttachDocument(rtl::OUString(),getModel(), rtl::OUString()) == SfxMailModel::SEND_MAIL_OK )
+ if ( aSendMail.AttachDocument(OUString(),getModel(), OUString()) == SfxMailModel::SEND_MAIL_OK )
aSendMail.Send( getFrame() );
}
break;
@@ -1555,7 +1555,7 @@ void SAL_CALL OApplicationController::elementInserted( const ContainerEvent& _rE
OSL_ENSURE(getContainer(),"View is NULL! -> GPF");
if ( getContainer() )
{
- ::rtl::OUString sName;
+ OUString sName;
_rEvent.Accessor >>= sName;
ElementType eType = getElementType(xContainer);
@@ -1589,7 +1589,7 @@ void SAL_CALL OApplicationController::elementRemoved( const ContainerEvent& _rEv
if ( ::std::find(m_aCurrentContainers.begin(),m_aCurrentContainers.end(),xContainer) != m_aCurrentContainers.end() )
{
OSL_ENSURE(getContainer(),"View is NULL! -> GPF");
- ::rtl::OUString sName;
+ OUString sName;
_rEvent.Accessor >>= sName;
ElementType eType = getElementType(xContainer);
switch( eType )
@@ -1603,7 +1603,7 @@ void SAL_CALL OApplicationController::elementRemoved( const ContainerEvent& _rEv
Reference<XContent> xContent(xContainer,UNO_QUERY);
if ( xContent.is() )
{
- sName = xContent->getIdentifier()->getContentIdentifier() + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + sName;
+ sName = xContent->getIdentifier()->getContentIdentifier() + OUString("/") + sName;
}
}
break;
@@ -1623,13 +1623,13 @@ void SAL_CALL OApplicationController::elementReplaced( const ContainerEvent& _rE
if ( ::std::find(m_aCurrentContainers.begin(),m_aCurrentContainers.end(),xContainer) != m_aCurrentContainers.end() )
{
OSL_ENSURE(getContainer(),"View is NULL! -> GPF");
- ::rtl::OUString sName;
+ OUString sName;
try
{
_rEvent.Accessor >>= sName;
Reference<XConnection> xConnection;
Reference<XPropertySet> xProp(_rEvent.Element,UNO_QUERY);
- ::rtl::OUString sNewName;
+ OUString sNewName;
ElementType eType = getElementType(xContainer);
switch( eType )
@@ -1647,7 +1647,7 @@ void SAL_CALL OApplicationController::elementReplaced( const ContainerEvent& _rE
Reference<XContent> xContent(xContainer,UNO_QUERY);
if ( xContent.is() )
{
- sName = xContent->getIdentifier()->getContentIdentifier() + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + sName;
+ sName = xContent->getIdentifier()->getContentIdentifier() + OUString("/") + sName;
}
}
break;
@@ -1664,22 +1664,22 @@ void SAL_CALL OApplicationController::elementReplaced( const ContainerEvent& _rE
}
namespace
{
- ::rtl::OUString lcl_getToolBarResource(ElementType _eType)
+ OUString lcl_getToolBarResource(ElementType _eType)
{
- ::rtl::OUString sToolbar;
+ OUString sToolbar;
switch(_eType)
{
case E_TABLE:
- sToolbar = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/tableobjectbar" ));
+ sToolbar = OUString("private:resource/toolbar/tableobjectbar");
break;
case E_QUERY:
- sToolbar = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/queryobjectbar" ));
+ sToolbar = OUString("private:resource/toolbar/queryobjectbar");
break;
case E_FORM:
- sToolbar = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/formobjectbar" ));
+ sToolbar = OUString("private:resource/toolbar/formobjectbar");
break;
case E_REPORT:
- sToolbar = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/reportobjectbar" ));
+ sToolbar = OUString("private:resource/toolbar/reportobjectbar");
break;
case E_NONE:
break;
@@ -1724,8 +1724,8 @@ sal_Bool OApplicationController::onContainerSelect(ElementType _eType)
Reference< XLayoutManager > xLayoutManager = getLayoutManager( getFrame() );
if ( xLayoutManager.is() )
{
- ::rtl::OUString sToolbar = lcl_getToolBarResource(_eType);
- ::rtl::OUString sDestroyToolbar = lcl_getToolBarResource(m_eCurrentType);
+ OUString sToolbar = lcl_getToolBarResource(_eType);
+ OUString sDestroyToolbar = lcl_getToolBarResource(m_eCurrentType);
xLayoutManager->lock();
xLayoutManager->destroyElement( sDestroyToolbar );
@@ -1748,7 +1748,7 @@ sal_Bool OApplicationController::onContainerSelect(ElementType _eType)
SelectionByElementType::iterator pendingSelection = m_aPendingSelection.find( _eType );
if ( pendingSelection != m_aPendingSelection.end() )
{
- Sequence< ::rtl::OUString > aSelected( pendingSelection->second.size() );
+ Sequence< OUString > aSelected( pendingSelection->second.size() );
::std::copy( pendingSelection->second.begin(), pendingSelection->second.end(), aSelected.getArray() );
getContainer()->selectElements( aSelected );
@@ -1783,7 +1783,7 @@ bool OApplicationController::onEntryDoubleClick( SvTreeListBox& _rTree )
return false; // not handled
}
// -----------------------------------------------------------------------------
-bool OApplicationController::impl_isAlterableView_nothrow( const ::rtl::OUString& _rTableOrViewName ) const
+bool OApplicationController::impl_isAlterableView_nothrow( const OUString& _rTableOrViewName ) const
{
OSL_PRECOND( m_xDataSourceConnection.is(), "OApplicationController::impl_isAlterableView_nothrow: no connection!" );
@@ -1809,14 +1809,14 @@ bool OApplicationController::impl_isAlterableView_nothrow( const ::rtl::OUString
}
// -----------------------------------------------------------------------------
-Reference< XComponent > OApplicationController::openElement(const ::rtl::OUString& _sName, ElementType _eType,
+Reference< XComponent > OApplicationController::openElement(const OUString& _sName, ElementType _eType,
ElementOpenMode _eOpenMode, sal_uInt16 _nInstigatorCommand )
{
return openElementWithArguments( _sName, _eType, _eOpenMode, _nInstigatorCommand, ::comphelper::NamedValueCollection() );
}
// -----------------------------------------------------------------------------
-Reference< XComponent > OApplicationController::openElementWithArguments( const ::rtl::OUString& _sName, ElementType _eType,
+Reference< XComponent > OApplicationController::openElementWithArguments( const OUString& _sName, ElementType _eType,
ElementOpenMode _eOpenMode, sal_uInt16 _nInstigatorCommand, const ::comphelper::NamedValueCollection& _rAdditionalArguments )
{
OSL_PRECOND( getContainer(), "OApplicationController::openElementWithArguments: no view!" );
@@ -1901,7 +1901,7 @@ Reference< XComponent > OApplicationController::openElementWithArguments( const
if ( bAddViewTypeArg )
{
const bool bQueryGraphicalMode =( _nInstigatorCommand != SID_DB_APP_EDIT_SQL_VIEW );
- aArguments.put( (::rtl::OUString)PROPERTY_GRAPHICAL_DESIGN, bQueryGraphicalMode );
+ aArguments.put( (OUString)PROPERTY_GRAPHICAL_DESIGN, bQueryGraphicalMode );
}
}
@@ -1909,8 +1909,8 @@ Reference< XComponent > OApplicationController::openElementWithArguments( const
{
pDesigner.reset( new ResultSetBrowser( getORB(), this, m_aCurrentFrame.getFrame(), _eType == E_TABLE ) );
- if ( !aArguments.has( (::rtl::OUString)PROPERTY_SHOWMENU ) )
- aArguments.put( (::rtl::OUString)PROPERTY_SHOWMENU, makeAny( (sal_Bool)sal_True ) );
+ if ( !aArguments.has( (OUString)PROPERTY_SHOWMENU ) )
+ aArguments.put( (OUString)PROPERTY_SHOWMENU, makeAny( (sal_Bool)sal_True ) );
aDataSource <<= getDatabaseName();
}
@@ -1962,7 +1962,7 @@ void OApplicationController::newElementWithPilot( ElementType _eType )
if ( aHelper->isConnected() )
{
sal_Int32 nCommandType = -1;
- const ::rtl::OUString sCurrentSelected( getCurrentlySelectedName( nCommandType ) );
+ const OUString sCurrentSelected( getCurrentlySelectedName( nCommandType ) );
if ( E_REPORT == _eType )
aHelper->newReportWithPilot( nCommandType, sCurrentSelected );
else
@@ -2047,7 +2047,7 @@ Reference< XComponent > OApplicationController::newElement( ElementType _eType,
}
if ( xComponent.is() )
- onDocumentOpened( ::rtl::OUString(), _eType, E_OPEN_DESIGN, xComponent, o_rDocumentDefinition );
+ onDocumentOpened( OUString(), _eType, E_OPEN_DESIGN, xComponent, o_rDocumentDefinition );
return xComponent;
}
@@ -2081,7 +2081,7 @@ void OApplicationController::renameEntry()
::osl::MutexGuard aGuard( getMutex() );
OSL_ENSURE(getContainer(),"View is NULL! -> GPF");
- ::std::vector< ::rtl::OUString> aList;
+ ::std::vector< OUString> aList;
getSelectionElementNames(aList);
Reference< XNameAccess > xContainer = getElements(getContainer()->getElementType());
@@ -2108,13 +2108,13 @@ void OApplicationController::renameEntry()
Reference<XHierarchicalNameContainer> xHNames(xContainer, UNO_QUERY);
if ( xHNames.is() )
{
- String sLabel;
+ OUString sLabel;
if ( eType == E_FORM )
- sLabel = String(ModuleRes( STR_FRM_LABEL ));
+ sLabel = OUString(ModuleRes( STR_FRM_LABEL ));
else
- sLabel = String(ModuleRes( STR_RPT_LABEL ));
+ sLabel = OUString(ModuleRes( STR_RPT_LABEL ));
- ::rtl::OUString sName = *aList.begin();
+ OUString sName = *aList.begin();
if ( xHNames->hasByHierarchicalName(sName) )
{
xRename.set(xHNames->getByHierarchicalName(sName),UNO_QUERY);
@@ -2128,7 +2128,7 @@ void OApplicationController::renameEntry()
Reference<XPropertySet>(xRename,UNO_QUERY)->getPropertyValue(PROPERTY_NAME) >>= sName;
}
}
- pNameChecker.reset( new HierarchicalNameCheck( xHNames.get(), String() ) );
+ pNameChecker.reset( new HierarchicalNameCheck( xHNames.get(), OUString() ) );
aDialog.reset( new OSaveAsDlg(
getView(), getORB(), sName, sLabel, *pNameChecker, SAD_TITLE_RENAME ) );
}
@@ -2167,19 +2167,19 @@ void OApplicationController::renameEntry()
{
try
{
- ::rtl::OUString sNewName;
+ OUString sNewName;
if ( eType == E_TABLE )
{
- ::rtl::OUString sName = aDialog->getName();
- ::rtl::OUString sCatalog = aDialog->getCatalog();
- ::rtl::OUString sSchema = aDialog->getSchema();
+ OUString sName = aDialog->getName();
+ OUString sCatalog = aDialog->getCatalog();
+ OUString sSchema = aDialog->getSchema();
sNewName = ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sName, sal_False, ::dbtools::eInDataManipulation );
}
else
sNewName = aDialog->getName();
- ::rtl::OUString sOldName = *aList.begin();
+ OUString sOldName = *aList.begin();
if ( eType == E_FORM || eType == E_REPORT )
{
Reference<XContent> xContent(xRename,UNO_QUERY);
@@ -2207,10 +2207,9 @@ void OApplicationController::renameEntry()
}
catch(const ElementExistException& e)
{
- rtl::OUString sStatus("S1000");
- String sMsg = String( ModuleRes( STR_NAME_ALREADY_EXISTS ) );
- sMsg.SearchAndReplace(rtl::OUString('#'), e.Message);
- showError(SQLExceptionInfo(SQLException(sMsg, e.Context, sStatus, 0, Any())));
+ OUString sStatus("S1000");
+ OUString sMsg = OUString( ModuleRes( STR_NAME_ALREADY_EXISTS ) );
+ showError(SQLExceptionInfo(SQLException(sMsg.replaceAll(OUString('#'), e.Message), e.Context, sStatus, 0, Any())));
}
catch(const Exception& )
{
@@ -2245,13 +2244,13 @@ void OApplicationController::onSelectionChanged()
const ElementType eType = pView->getElementType();
if ( pView->isALeafSelected() )
{
- const ::rtl::OUString sName = pView->getQualifiedName( NULL /* means 'first selected' */ );
+ const OUString sName = pView->getQualifiedName( NULL /* means 'first selected' */ );
showPreviewFor( eType, sName );
}
}
}
// -----------------------------------------------------------------------------
-void OApplicationController::showPreviewFor(const ElementType _eType,const ::rtl::OUString& _sName)
+void OApplicationController::showPreviewFor(const ElementType _eType,const OUString& _sName)
{
if ( m_ePreviewMode == E_PREVIEWNONE )
return;
@@ -2382,13 +2381,13 @@ sal_Bool OApplicationController::isCommandEnabled(sal_uInt16 _nCommandId) const
}
// -----------------------------------------------------------------------------
-sal_Bool OApplicationController::isCommandEnabled( const ::rtl::OUString& _rCompleteCommandURL ) const
+sal_Bool OApplicationController::isCommandEnabled( const OUString& _rCompleteCommandURL ) const
{
return OApplicationController_CBASE::isCommandEnabled( _rCompleteCommandURL );
}
// -----------------------------------------------------------------------------
-sal_uInt16 OApplicationController::registerCommandURL( const ::rtl::OUString& _rCompleteCommandURL )
+sal_uInt16 OApplicationController::registerCommandURL( const OUString& _rCompleteCommandURL )
{
return OApplicationController_CBASE::registerCommandURL( _rCompleteCommandURL );
}
@@ -2488,7 +2487,7 @@ sal_Int8 OApplicationController::queryDrop( const AcceptDropEvent& _rEvt, const
if ( nAction != DND_ACTION_NONE )
{
SvTreeListEntry* pHitEntry = pView->getEntry(_rEvt.maPosPixel);
- ::rtl::OUString sName;
+ OUString sName;
if ( pHitEntry )
{
sName = pView->getQualifiedName( pHitEntry );
@@ -2539,7 +2538,7 @@ sal_Int8 OApplicationController::executeDrop( const ExecuteDropEvent& _rEvt )
m_aAsyncDrop.nAction = _rEvt.mnAction;
m_aAsyncDrop.bError = sal_False;
m_aAsyncDrop.bHtml = sal_False;
- m_aAsyncDrop.aUrl = ::rtl::OUString();
+ m_aAsyncDrop.aUrl = OUString();
// loop through the available formats and see what we can do ...
@@ -2564,7 +2563,7 @@ sal_Int8 OApplicationController::executeDrop( const ExecuteDropEvent& _rEvt )
m_aAsyncDrop.aDroppedData[daComponent] >>= xContent;
if ( xContent.is() )
{
- ::rtl::OUString sName = xContent->getIdentifier()->getContentIdentifier();
+ OUString sName = xContent->getIdentifier()->getContentIdentifier();
sal_Int32 nIndex = 0;
sName = sName.copy(sName.getToken(0,'/',nIndex).getLength() + 1);
if ( m_aAsyncDrop.aUrl.Len() >= sName.getLength() && 0 == sName.compareTo(m_aAsyncDrop.aUrl,sName.getLength()) )
@@ -2684,9 +2683,9 @@ IMPL_LINK( OApplicationController, OnFirstControllerConnected, void*, /**/ )
return 0L;
SQLWarning aWarning;
- aWarning.Message = String( ModuleRes( STR_SUB_DOCS_WITH_SCRIPTS ) );
+ aWarning.Message = OUString( ModuleRes( STR_SUB_DOCS_WITH_SCRIPTS ) );
SQLException aDetail;
- aDetail.Message = String( ModuleRes( STR_SUB_DOCS_WITH_SCRIPTS_DETAIL ) );
+ aDetail.Message = OUString( ModuleRes( STR_SUB_DOCS_WITH_SCRIPTS_DETAIL ) );
aWarning.NextException <<= aDetail;
Reference< XExecutableDialog > xDialog = ErrorMessageDialog::create( getORB(), "", NULL, makeAny( aWarning ) );
@@ -2727,7 +2726,7 @@ sal_Bool SAL_CALL OApplicationController::attachModel(const Reference< XModel >
return sal_False;
}
- const ::rtl::OUString aPropertyNames[] =
+ const OUString aPropertyNames[] =
{
PROPERTY_URL, PROPERTY_USER
};
@@ -2783,9 +2782,9 @@ sal_Bool SAL_CALL OApplicationController::attachModel(const Reference< XModel >
{
// to get the 'modified' for the data source
::comphelper::NamedValueCollection aLayoutInfo( m_xDataSource->getPropertyValue( PROPERTY_LAYOUTINFORMATION ) );
- if ( aLayoutInfo.has( (rtl::OUString)INFO_PREVIEW ) )
+ if ( aLayoutInfo.has( (OUString)INFO_PREVIEW ) )
{
- const sal_Int32 nPreviewMode( aLayoutInfo.getOrDefault( (rtl::OUString)INFO_PREVIEW, (sal_Int32)0 ) );
+ const sal_Int32 nPreviewMode( aLayoutInfo.getOrDefault( (OUString)INFO_PREVIEW, (sal_Int32)0 ) );
m_ePreviewMode = static_cast< PreviewMode >( nPreviewMode );
if ( getView() )
getContainer()->switchPreview( m_ePreviewMode );
@@ -2816,13 +2815,13 @@ void OApplicationController::containerFound( const Reference< XContainer >& _xCo
}
}
// -----------------------------------------------------------------------------
-::rtl::OUString OApplicationController::getCurrentlySelectedName(sal_Int32& _rnCommandType) const
+OUString OApplicationController::getCurrentlySelectedName(sal_Int32& _rnCommandType) const
{
_rnCommandType = ( (getContainer()->getElementType() == E_QUERY)
? CommandType::QUERY : ( (getContainer()->getElementType() == E_TABLE) ? CommandType::TABLE : -1 ));
- ::rtl::OUString sName;
+ OUString sName;
if ( _rnCommandType != -1 )
{
try
@@ -2855,7 +2854,7 @@ void SAL_CALL OApplicationController::removeSelectionChangeListener( const Refer
{
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
- Sequence< ::rtl::OUString> aSelection;
+ Sequence< OUString> aSelection;
if ( !_aSelection.hasValue() || !getView() )
{
getContainer()->selectElements(aSelection);
@@ -2944,10 +2943,10 @@ void SAL_CALL OApplicationController::removeSelectionChangeListener( const Refer
default:
case DatabaseObjectContainer::DATA_SOURCE:
{
- ::rtl::OUString sMessage(
- rtl::OUString(
+ OUString sMessage(
+ OUString(
String(ModuleRes(RID_STR_UNSUPPORTED_OBJECT_TYPE))).
- replaceFirst("$type$", ::rtl::OUString::valueOf(sal_Int32(pObject->Type))));
+ replaceFirst("$type$", OUString::valueOf(sal_Int32(pObject->Type))));
throw IllegalArgumentException(sMessage, *this, sal_Int16( pObject - aSelectedObjects.getConstArray() ));
}
}
@@ -2960,7 +2959,7 @@ void SAL_CALL OApplicationController::removeSelectionChangeListener( const Refer
{
if ( sel->first == m_eCurrentType )
{
- Sequence< ::rtl::OUString > aSelected( sel->second.size() );
+ Sequence< OUString > aSelected( sel->second.size() );
::std::copy( sel->second.begin(), sel->second.end(), aSelected.getArray() );
getContainer()->selectElements( aSelected );
}
@@ -3010,7 +3009,7 @@ void OApplicationController::impl_migrateScripts_nothrow()
{
try
{
- ::rtl::OUString sDialogService( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.application.MacroMigrationWizard" ) );
+ OUString sDialogService("com.sun.star.sdb.application.MacroMigrationWizard");
::comphelper::ComponentContext aContext( getORB() );
Sequence< Any > aDialogArgs(1);
aDialogArgs[0] <<= Reference< XOfficeDatabaseDocument >( m_xModel, UNO_QUERY_THROW );
diff --git a/dbaccess/source/ui/app/AppController.hxx b/dbaccess/source/ui/app/AppController.hxx
index 6584ce395a01..db827015973c 100644
--- a/dbaccess/source/ui/app/AppController.hxx
+++ b/dbaccess/source/ui/app/AppController.hxx
@@ -131,7 +131,7 @@ namespace dbaui
::std::auto_ptr< SelectionNotifier >
m_pSelectionNotifier;
- typedef ::std::map< ElementType, ::std::vector< ::rtl::OUString > > SelectionByElementType;
+ typedef ::std::map< ElementType, ::std::vector< OUString > > SelectionByElementType;
SelectionByElementType m_aPendingSelection;
private:
@@ -143,13 +143,13 @@ namespace dbaui
@return
the database name
*/
- ::rtl::OUString getDatabaseName() const;
+ OUString getDatabaseName() const;
/** returns the stripped database name.
@return
The stripped database name either the registered naem or if it is a file url the last segment.
*/
- ::rtl::OUString getStrippedDatabaseName() const;
+ OUString getStrippedDatabaseName() const;
/** return the element type for given container
@param _xContainer The container where the element type has to be found
@@ -169,7 +169,7 @@ namespace dbaui
@return the form or report model will only be returned, otherwise <NULL/>
*/
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > openElement(
- const ::rtl::OUString& _sName,
+ const OUString& _sName,
ElementType _eType,
ElementOpenMode _eOpenMode,
sal_uInt16 _nInstigatorCommand = 0
@@ -178,7 +178,7 @@ namespace dbaui
/** opens a new sub frame with a table/query/form/report/view, passing additional arguments
*/
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > openElementWithArguments(
- const ::rtl::OUString& _sName,
+ const OUString& _sName,
ElementType _eType,
ElementOpenMode _eOpenMode,
sal_uInt16 _nInstigatorCommand,
@@ -211,7 +211,7 @@ namespace dbaui
@param _sName
The name of the query.
*/
- void convertToView(const ::rtl::OUString& _sName);
+ void convertToView(const OUString& _sName);
/** checks if the connection for the selected data source is read only. If the connection doesn't exist, <TRUE/> will be returned.
@return
@@ -220,7 +220,7 @@ namespace dbaui
sal_Bool isConnectionReadOnly() const;
/// fills the list with the selected entries.
- void getSelectionElementNames( ::std::vector< ::rtl::OUString>& _rNames ) const;
+ void getSelectionElementNames( ::std::vector< OUString>& _rNames ) const;
/// deletes the entries selected.
void deleteEntries();
@@ -237,14 +237,14 @@ namespace dbaui
determines whether the user must confirm the deletion
*/
void deleteObjects( ElementType _eType,
- const ::std::vector< ::rtl::OUString>& _rList,
+ const ::std::vector< OUString>& _rList,
bool _bConfirm );
/** deletes tables.
@param _rList
The list of tables.
*/
- void deleteTables(const ::std::vector< ::rtl::OUString>& _rList);
+ void deleteTables(const ::std::vector< OUString>& _rList);
/// copies the current object into clipboard
TransferableHelper* copyObject();
@@ -306,7 +306,7 @@ namespace dbaui
@param _sServiceName
The serivce name of the dialog to be executed.
*/
- void openDialog(const ::rtl::OUString& _sServiceName);
+ void openDialog(const OUString& _sServiceName);
/** opens the administration dialog for the selected data source
*/
@@ -329,7 +329,7 @@ namespace dbaui
/** remember a newly opened sub document for later access
*/
void onDocumentOpened(
- const ::rtl::OUString& _rName,
+ const OUString& _rName,
const sal_Int32 _nType,
const ElementOpenMode _eMode,
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& _xDocument,
@@ -374,11 +374,11 @@ namespace dbaui
*
* \return the name of the currently table or query. If the tables or query container is selected otherwise an empty string will be returned.
*/
- ::rtl::OUString getCurrentlySelectedName(sal_Int32& _rnCommandType) const;
+ OUString getCurrentlySelectedName(sal_Int32& _rnCommandType) const;
/** shows the preview for the given entry
*/
- void showPreviewFor( const ElementType _eType,const ::rtl::OUString& _sName );
+ void showPreviewFor( const ElementType _eType,const OUString& _sName );
/** called we were attached to a frame
@@ -388,7 +388,7 @@ namespace dbaui
void onAttachedFrame();
/// determines whether the given table name denotes a view which can be altered
- bool impl_isAlterableView_nothrow( const ::rtl::OUString& _rTableOrViewName ) const;
+ bool impl_isAlterableView_nothrow( const OUString& _rTableOrViewName ) const;
/** does the macro/script migration, where macros/scripts in forms/reports are moved
to the database document itself.
@@ -398,7 +398,7 @@ namespace dbaui
/** verifies the object type denotes a valid DatabaseObject, and the object name denotes an existing
object of this type. Throws if not.
*/
- void impl_validateObjectTypeAndName_throw( const sal_Int32 _nObjectType, const ::boost::optional< ::rtl::OUString >& i_rObjectName );
+ void impl_validateObjectTypeAndName_throw( const sal_Int32 _nObjectType, const ::boost::optional< OUString >& i_rObjectName );
protected:
// ----------------------------------------------------------------
@@ -430,11 +430,11 @@ namespace dbaui
DECLARE_XTYPEPROVIDER( )
// XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
+ virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< OUString> SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
// need by registration
- static ::rtl::OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException );
- static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
+ static OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException );
+ static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
@@ -459,10 +459,10 @@ namespace dbaui
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > > SAL_CALL getSubComponents() throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL isConnected( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL connect( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::beans::Pair< ::sal_Int32, ::rtl::OUString > SAL_CALL identifySubComponent( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& SubComponent ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::beans::Pair< ::sal_Int32, OUString > SAL_CALL identifySubComponent( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& SubComponent ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL closeSubComponents( ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > SAL_CALL loadComponent( ::sal_Int32 ObjectType, const ::rtl::OUString& ObjectName, ::sal_Bool ForEditing ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > SAL_CALL loadComponentWithArguments( ::sal_Int32 ObjectType, const ::rtl::OUString& ObjectName, ::sal_Bool ForEditing, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Arguments ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > SAL_CALL loadComponent( ::sal_Int32 ObjectType, const OUString& ObjectName, ::sal_Bool ForEditing ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > SAL_CALL loadComponentWithArguments( ::sal_Int32 ObjectType, const OUString& ObjectName, ::sal_Bool ForEditing, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Arguments ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > SAL_CALL createComponent( ::sal_Int32 ObjectType, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& o_DocumentDefinition ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > SAL_CALL createComponentWithArguments( ::sal_Int32 ObjectType, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Arguments, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& o_DocumentDefinition ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
@@ -514,8 +514,8 @@ namespace dbaui
virtual void executeUnChecked(sal_uInt16 _nCommandId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
virtual void executeChecked(sal_uInt16 _nCommandId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
virtual sal_Bool isCommandEnabled(sal_uInt16 _nCommandId) const;
- virtual sal_Bool isCommandEnabled( const ::rtl::OUString& _rCompleteCommandURL ) const;
- virtual sal_uInt16 registerCommandURL( const ::rtl::OUString& _rCompleteCommandURL );
+ virtual sal_Bool isCommandEnabled( const OUString& _rCompleteCommandURL ) const;
+ virtual sal_uInt16 registerCommandURL( const OUString& _rCompleteCommandURL );
virtual void notifyHiContrastChanged();
virtual sal_Bool isDataSourceReadOnly() const;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx
index 77cfece9653c..2437f74a6c75 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx
@@ -139,49 +139,49 @@ namespace dbaui
switch( eType )
{
case ::dbaccess::DST_DBASE:
- m_aFT_Connection.SetText(String(ModuleRes(STR_DBASE_PATH_OR_FILE)));
+ m_aFT_Connection.SetText(OUString(ModuleRes(STR_DBASE_PATH_OR_FILE)));
m_aConnectionURL.SetHelpId(HID_DSADMIN_DBASE_PATH);
break;
case ::dbaccess::DST_FLAT:
- m_aFT_Connection.SetText(String(ModuleRes(STR_FLAT_PATH_OR_FILE)));
+ m_aFT_Connection.SetText(OUString(ModuleRes(STR_FLAT_PATH_OR_FILE)));
m_aConnectionURL.SetHelpId(HID_DSADMIN_FLAT_PATH);
break;
case ::dbaccess::DST_CALC:
- m_aFT_Connection.SetText(String(ModuleRes(STR_CALC_PATH_OR_FILE)));
+ m_aFT_Connection.SetText(OUString(ModuleRes(STR_CALC_PATH_OR_FILE)));
m_aConnectionURL.SetHelpId(HID_DSADMIN_CALC_PATH);
break;
case ::dbaccess::DST_ADO:
- m_aFT_Connection.SetText(String(ModuleRes(STR_COMMONURL)));
+ m_aFT_Connection.SetText(OUString(ModuleRes(STR_COMMONURL)));
break;
case ::dbaccess::DST_MSACCESS:
case ::dbaccess::DST_MSACCESS_2007:
- m_aFT_Connection.SetText(String(ModuleRes(STR_MSACCESS_MDB_FILE)));
+ m_aFT_Connection.SetText(OUString(ModuleRes(STR_MSACCESS_MDB_FILE)));
m_aConnectionURL.SetHelpId(HID_DSADMIN_MSACCESS_MDB_FILE);
break;
case ::dbaccess::DST_MYSQL_NATIVE:
case ::dbaccess::DST_MYSQL_JDBC:
- m_aFT_Connection.SetText(String(ModuleRes(STR_MYSQL_DATABASE_NAME)));
+ m_aFT_Connection.SetText(OUString(ModuleRes(STR_MYSQL_DATABASE_NAME)));
m_aConnectionURL.SetHelpId( HID_DSADMIN_MYSQL_DATABASE );
break;
case ::dbaccess::DST_ORACLE_JDBC:
- m_aFT_Connection.SetText(String(ModuleRes(STR_ORACLE_DATABASE_NAME)));
+ m_aFT_Connection.SetText(OUString(ModuleRes(STR_ORACLE_DATABASE_NAME)));
m_aConnectionURL.SetHelpId(HID_DSADMIN_ORACLE_DATABASE);
break;
case ::dbaccess::DST_MYSQL_ODBC:
case ::dbaccess::DST_ODBC:
- m_aFT_Connection.SetText(String(ModuleRes(STR_NAME_OF_ODBC_DATASOURCE)));
+ m_aFT_Connection.SetText(OUString(ModuleRes(STR_NAME_OF_ODBC_DATASOURCE)));
m_aConnectionURL.SetHelpId( eType == ::dbaccess::DST_MYSQL_ODBC ? HID_DSADMIN_MYSQL_ODBC_DATASOURCE : HID_DSADMIN_ODBC_DATASOURCE);
break;
case ::dbaccess::DST_LDAP:
- m_aFT_Connection.SetText(String(ModuleRes(STR_HOSTNAME)));
+ m_aFT_Connection.SetText(OUString(ModuleRes(STR_HOSTNAME)));
m_aConnectionURL.SetHelpId( HID_DSADMIN_LDAP_HOSTNAME );
break;
case ::dbaccess::DST_MOZILLA:
- m_aFT_Connection.SetText(String(ModuleRes(STR_MOZILLA_PROFILE_NAME)));
+ m_aFT_Connection.SetText(OUString(ModuleRes(STR_MOZILLA_PROFILE_NAME)));
m_aConnectionURL.SetHelpId( HID_DSADMIN_MOZILLA_PROFILE_NAME );
break;
case ::dbaccess::DST_THUNDERBIRD:
- m_aFT_Connection.SetText(String(ModuleRes(STR_THUNDERBIRD_PROFILE_NAME)));
+ m_aFT_Connection.SetText(OUString(ModuleRes(STR_THUNDERBIRD_PROFILE_NAME)));
m_aConnectionURL.SetHelpId( HID_DSADMIN_THUNDERBIRD_PROFILE_NAME );
break;
case ::dbaccess::DST_OUTLOOK:
@@ -191,19 +191,19 @@ namespace dbaui
case ::dbaccess::DST_EVOLUTION_LDAP:
case ::dbaccess::DST_KAB:
case ::dbaccess::DST_MACAB:
- m_aFT_Connection.SetText(String(ModuleRes(STR_NO_ADDITIONAL_SETTINGS)));
+ m_aFT_Connection.SetText(OUString(ModuleRes(STR_NO_ADDITIONAL_SETTINGS)));
{
- String sText = m_aFT_Connection.GetText();
- sText.SearchAndReplaceAscii("%test",m_aTestConnection.GetText());
- String sTemp;
- sText.SearchAndReplaceAscii("~",sTemp);
+ OUString sText = m_aFT_Connection.GetText();
+ sText = sText.replaceAll("%test",m_aTestConnection.GetText());
+ OUString sTemp;
+ sText = sText.replaceAll("~",sTemp);
m_aFT_Connection.SetText(sText);
}
m_aConnectionURL.Hide();
break;
case ::dbaccess::DST_JDBC:
default:
- m_aFT_Connection.SetText(String(ModuleRes(STR_COMMONURL)));
+ m_aFT_Connection.SetText(OUString(ModuleRes(STR_COMMONURL)));
break;
}
@@ -233,14 +233,14 @@ namespace dbaui
m_aUserName.SetText(pUidItem->GetValue());
m_aPasswordRequired.Check(pAllowEmptyPwd->GetValue());
- String sUrl = pUrlItem->GetValue();
+ OUString sUrl = pUrlItem->GetValue();
setURL( sUrl );
const sal_Bool bEnableJDBC = m_pCollection->determineType(m_eType) == ::dbaccess::DST_JDBC;
- if ( !pJdbcDrvItem->GetValue().Len() )
+ if ( !pJdbcDrvItem->GetValue().getLength() )
{
- String sDefaultJdbcDriverName = m_pCollection->getJavaDriverClass(m_eType);
- if ( sDefaultJdbcDriverName.Len() )
+ OUString sDefaultJdbcDriverName = m_pCollection->getJavaDriverClass(m_eType);
+ if ( sDefaultJdbcDriverName.getLength() )
{
m_aJavaDriver.SetText(sDefaultJdbcDriverName);
m_aJavaDriver.SetModifyFlag();
@@ -294,7 +294,7 @@ namespace dbaui
if (m_aUserName.GetText() != m_aUserName.GetSavedValue())
{
_rSet.Put(SfxStringItem(DSID_USER, m_aUserName.GetText()));
- _rSet.Put(SfxStringItem(DSID_PASSWORD, String()));
+ _rSet.Put(SfxStringItem(DSID_PASSWORD, OUString()));
bChangedSomething = sal_True;
}
@@ -328,7 +328,7 @@ namespace dbaui
const sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
const OSQLMessageBox::MessageType mt = bSuccess ? OSQLMessageBox::Info : OSQLMessageBox::Error;
- OSQLMessageBox aMsg( this, String( ModuleRes( nMessage ) ), String(), WB_OK | WB_DEF_OK, mt );
+ OSQLMessageBox aMsg( this, OUString( ModuleRes( nMessage ) ), OUString(), WB_OK | WB_DEF_OK, mt );
aMsg.Execute();
return 0L;
}
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index fa86f15622f0..0eb325abc851 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -166,7 +166,7 @@ DBG_NAME(OTextConnectionPageSetup)
,m_aCBUseSSL (this, ModuleRes(CB_WIZ_USESSL))
{
SetControlFontWeight(&m_aFTHeaderText);
- m_aFTDefaultPortNumber.SetText(String(ModuleRes(STR_LDAP_DEFAULT)));
+ m_aFTDefaultPortNumber.SetText(OUString(ModuleRes(STR_LDAP_DEFAULT)));
m_aETHostServer.SetModifyHdl(getControlModifiedLink());
m_aETBaseDN.SetModifyHdl(getControlModifiedLink());
m_aNFPortNumber.SetModifyHdl(getControlModifiedLink());
@@ -190,7 +190,7 @@ DBG_NAME(OTextConnectionPageSetup)
pCollection = pCollectionItem->getCollection();
OSL_ENSURE(pCollection, "OLDAPConnectionPageSetup::FillItemSet : really need a DSN type collection !");
- String sUrl = pCollection->getPrefix( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:address:ldap:")));
+ OUString sUrl = pCollection->getPrefix( ::rtl::OUString("sdbc:address:ldap:"));
sUrl += m_aETHostServer.GetText();
_rSet.Put(SfxStringItem(DSID_CONNECTURL, sUrl));
bChangedSomething = sal_True;
@@ -422,10 +422,10 @@ DBG_NAME(OMySQLIntroPageSetup)
,m_aPBTestJavaDriver (this, ModuleRes(PB_AUTOTESTDRIVERCLASS))
,m_nPortId(_nPortId)
{
- m_aFTDriverClass.SetText(String(ModuleRes(_nDriverClassId)));
+ m_aFTDriverClass.SetText(OUString(ModuleRes(_nDriverClassId)));
- m_aFTDefaultPortNumber.SetText(String(ModuleRes(_nDefaultPortResId)));
- String sHelpText = String(ModuleRes(_nHelpTextResId));
+ m_aFTDefaultPortNumber.SetText(OUString(ModuleRes(_nDefaultPortResId)));
+ OUString sHelpText = OUString(ModuleRes(_nHelpTextResId));
m_aFTHelpText.SetText(sHelpText);
//TODO this code snippet is redundant
SetHeaderText(FT_AUTOWIZARDHEADER, _nHeaderTextResId);
@@ -440,7 +440,7 @@ DBG_NAME(OMySQLIntroPageSetup)
SFX_ITEMSET_GET(_rCoreAttrs, pUrlItem, SfxStringItem, DSID_CONNECTURL, sal_True);
SFX_ITEMSET_GET(_rCoreAttrs, pTypesItem, DbuTypeCollectionItem, DSID_TYPECOLLECTION, sal_True);
::dbaccess::ODsnTypeCollection* pTypeCollection = pTypesItem ? pTypesItem->getCollection() : NULL;
- if (pTypeCollection && pUrlItem && pUrlItem->GetValue().Len() )
+ if (pTypeCollection && pUrlItem && pUrlItem->GetValue().getLength() )
{
m_sDefaultJdbcDriverName = pTypeCollection->getJavaDriverClass(pUrlItem->GetValue());
}
@@ -567,7 +567,7 @@ DBG_NAME(OMySQLIntroPageSetup)
const sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
const OSQLMessageBox::MessageType mt = bSuccess ? OSQLMessageBox::Info : OSQLMessageBox::Error;
- OSQLMessageBox aMsg( this, String( ModuleRes( nMessage ) ), String(), WB_OK | WB_DEF_OK, mt );
+ OSQLMessageBox aMsg( this, OUString( ModuleRes( nMessage ) ), OUString(), WB_OK | WB_DEF_OK, mt );
aMsg.Execute();
return 0L;
}
@@ -635,10 +635,10 @@ DBG_NAME(OMySQLIntroPageSetup)
if ( bValid )
{
- if ( !pDrvItem->GetValue().Len() )
+ if ( !pDrvItem->GetValue().getLength() )
{
- String sDefaultJdbcDriverName = m_pCollection->getJavaDriverClass(m_eType);
- if ( sDefaultJdbcDriverName.Len() )
+ OUString sDefaultJdbcDriverName = m_pCollection->getJavaDriverClass(m_eType);
+ if ( sDefaultJdbcDriverName.getLength() )
{
m_aETDriverClass.SetText(sDefaultJdbcDriverName);
m_aETDriverClass.SetModifyFlag();
@@ -650,7 +650,7 @@ DBG_NAME(OMySQLIntroPageSetup)
m_aETDriverClass.ClearModifyFlag();
}
}
- sal_Bool bEnable = pDrvItem->GetValue().Len() != 0;
+ sal_Bool bEnable = pDrvItem->GetValue().getLength() != 0;
m_aPBTestJavaDriver.Enable(bEnable);
OConnectionTabPageSetup::implInitControls(_rSet, _bSaveValue);
@@ -686,7 +686,7 @@ DBG_NAME(OMySQLIntroPageSetup)
}
sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
- OSQLMessageBox aMsg( this, String( ModuleRes( nMessage ) ), String() );
+ OSQLMessageBox aMsg( this, OUString( ModuleRes( nMessage ) ), OUString() );
aMsg.Execute();
return 0L;
}
@@ -828,7 +828,7 @@ DBG_NAME(OAuthentificationPageSetup)
if (m_aETUserName.GetText() != m_aETUserName.GetSavedValue())
{
_rSet.Put(SfxStringItem(DSID_USER, m_aETUserName.GetText()));
- _rSet.Put(SfxStringItem(DSID_PASSWORD, String()));
+ _rSet.Put(SfxStringItem(DSID_PASSWORD, OUString()));
bChangedSomething = sal_True;
}
fillBool(_rSet,&m_aCBPasswordRequired,DSID_PASSWORDREQUIRED,bChangedSomething);
@@ -856,7 +856,7 @@ DBG_NAME(OFinalDBPageSetup)
{
DBG_CTOR(OFinalDBPageSetup,NULL);
- String stext = m_aFTFinalHeader.GetText();
+ OUString stext = m_aFTFinalHeader.GetText();
SetControlFontWeight(&m_aFTFinalHeader);
m_aCBOpenAfterwards.SetClickHdl(LINK(this, OFinalDBPageSetup, OnOpenSelected));
m_aCBStartTableWizard.SetClickHdl(getControlModifiedLink());
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
index 006d23656245..2d50d1bae75d 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
@@ -181,7 +181,7 @@ namespace dbaui
Edit m_aETDriverClass;
PushButton m_aPBTestJavaDriver;
- String m_sDefaultJdbcDriverName;
+ OUString m_sDefaultJdbcDriverName;
sal_uInt16 m_nPortId;
};
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index 329faf48e4b6..9962d6f09bc4 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -107,7 +107,7 @@ namespace
return bCorrectType;
}
- void lcl_putProperty(const Reference< XPropertySet >& _rxSet, const ::rtl::OUString& _rName, const Any& _rValue)
+ void lcl_putProperty(const Reference< XPropertySet >& _rxSet, const OUString& _rName, const Any& _rValue)
{
try
{
@@ -126,17 +126,17 @@ namespace
}
- String lcl_createHostWithPort(const SfxStringItem* _pHostName,const SfxInt32Item* _pPortNumber)
+ OUString lcl_createHostWithPort(const SfxStringItem* _pHostName,const SfxInt32Item* _pPortNumber)
{
- String sNewUrl;
+ OUString sNewUrl;
- if ( _pHostName && _pHostName->GetValue().Len() )
+ if ( _pHostName && _pHostName->GetValue().getLength() )
sNewUrl = _pHostName->GetValue();
if ( _pPortNumber )
{
- sNewUrl += rtl::OUString::createFromAscii(":");
- sNewUrl += String::CreateFromInt32(_pPortNumber->GetValue());
+ sNewUrl += OUString::createFromAscii(":");
+ sNewUrl += OUString::number(_pPortNumber->GetValue());
}
return sNewUrl;
@@ -182,30 +182,30 @@ ODbDataSourceAdministrationHelper::ODbDataSourceAdministrationHelper(const Refer
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_AS_BEFORE_CORRNAME, INFO_AS_BEFORE_CORRELATION_NAME ) );
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CHECK_REQUIRED_FIELDS, INFO_FORMS_CHECK_REQUIRED_FIELDS ) );
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_ESCAPE_DATETIME, INFO_ESCAPE_DATETIME ) );
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_PRIMARY_KEY_SUPPORT, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrimaryKeySupport" ) ) ) );
+ m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_PRIMARY_KEY_SUPPORT, OUString("PrimaryKeySupport")));
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_PARAMETERNAMESUBST, INFO_PARAMETERNAMESUBST));
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_IGNOREDRIVER_PRIV, INFO_IGNOREDRIVER_PRIV));
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_BOOLEANCOMPARISON, PROPERTY_BOOLEANCOMPARISONMODE));
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_ENABLEOUTERJOIN, PROPERTY_ENABLEOUTERJOIN));
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CATALOG, PROPERTY_USECATALOGINSELECT));
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_SCHEMA, PROPERTY_USESCHEMAINSELECT));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_INDEXAPPENDIX, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AddIndexAppendix"))));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_DOSLINEENDS, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PreferDosLikeLineEnds" ) ) ) );
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_SOCKET, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LocalSocket" ) ) ) );
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_NAMED_PIPE, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "NamedPipe" ) ) ) );
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_RESPECTRESULTSETTYPE, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RespectDriverResultSetType" ) ) ) );
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_MAX_ROW_SCAN, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MaxRowScan" ) ) ) );
+ m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_INDEXAPPENDIX, OUString("AddIndexAppendix")));
+ m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_DOSLINEENDS, OUString("PreferDosLikeLineEnds")));
+ m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_SOCKET, OUString("LocalSocket")));
+ m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_NAMED_PIPE, OUString("NamedPipe")));
+ m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_RESPECTRESULTSETTYPE, OUString("RespectDriverResultSetType")));
+ m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_MAX_ROW_SCAN, OUString("MaxRowScan")));
// extra settings for odbc
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_USECATALOG, INFO_USECATALOG));
// extra settings for a ldap address book
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_LDAP_BASEDN, INFO_CONN_LDAP_BASEDN));
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_LDAP_ROWCOUNT, INFO_CONN_LDAP_ROWCOUNT));
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_LDAP_USESSL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UseSSL"))));
+ m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_LDAP_USESSL, OUString("UseSSL")));
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_DOCUMENT_URL, PROPERTY_URL));
// oracle
- m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_IGNORECURRENCY, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IgnoreCurrency"))));
+ m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_IGNORECURRENCY, OUString("IgnoreCurrency")));
try
{
@@ -213,7 +213,7 @@ ODbDataSourceAdministrationHelper::ODbDataSourceAdministrationHelper(const Refer
}
catch(const Exception&)
{
- ShowServiceNotAvailableError(_pParent->GetParent(), String("com.sun.star.sdb.DatabaseContext"), sal_True);
+ ShowServiceNotAvailableError(_pParent->GetParent(), OUString("com.sun.star.sdb.DatabaseContext"), sal_True);
}
}
//-------------------------------------------------------------------------
@@ -228,20 +228,20 @@ sal_Bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< Propert
// user: DSID_USER -> "user"
SFX_ITEMSET_GET(*m_pItemSetHelper->getOutputSet(), pUser, SfxStringItem, DSID_USER, sal_True);
- if (pUser && pUser->GetValue().Len())
+ if (pUser && pUser->GetValue().getLength())
aReturn.push_back(
- PropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("user")), 0,
- makeAny(::rtl::OUString(pUser->GetValue())), PropertyState_DIRECT_VALUE));
+ PropertyValue( OUString("user"), 0,
+ makeAny(OUString(pUser->GetValue())), PropertyState_DIRECT_VALUE));
// check if the connection type requires a password
if (hasAuthentication(*m_pItemSetHelper->getOutputSet()))
{
// password: DSID_PASSWORD -> "password"
SFX_ITEMSET_GET(*m_pItemSetHelper->getOutputSet(), pPassword, SfxStringItem, DSID_PASSWORD, sal_True);
- String sPassword = pPassword ? pPassword->GetValue() : String();
+ OUString sPassword = pPassword ? pPassword->GetValue() : OUString();
SFX_ITEMSET_GET(*m_pItemSetHelper->getOutputSet(), pPasswordRequired, SfxBoolItem, DSID_PASSWORDREQUIRED, sal_True);
// if the set does not contain a password, but the item set says it requires one, ask the user
- if ((!pPassword || !pPassword->GetValue().Len()) && (pPasswordRequired && pPasswordRequired->GetValue()))
+ if ((!pPassword || !pPassword->GetValue().getLength()) && (pPasswordRequired && pPasswordRequired->GetValue()))
{
SFX_ITEMSET_GET(*m_pItemSetHelper->getOutputSet(), pName, SfxStringItem, DSID_NAME, sal_True);
@@ -255,16 +255,16 @@ sal_Bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< Propert
xHandler = Reference< XInteractionHandler >( task::InteractionHandler::createWithParent(m_xContext, 0), UNO_QUERY );
}
- String sName = pName ? pName->GetValue() : String();
- String sLoginRequest(ModuleRes(STR_ENTER_CONNECTION_PASSWORD));
- ::rtl::OUString sTemp = sName;
+ OUString sName = pName ? pName->GetValue() : OUString();
+ OUString sLoginRequest(ModuleRes(STR_ENTER_CONNECTION_PASSWORD));
+ OUString sTemp = sName;
sName = ::dbaui::getStrippedDatabaseName(NULL,sTemp);
- if ( sName.Len() )
- sLoginRequest.SearchAndReplaceAscii("$name$", sName);
+ if ( sName.getLength() )
+ sLoginRequest.replaceAll("$name$", sName);
else
{
- sLoginRequest.SearchAndReplaceAscii("\"$name$\"", String());
- sLoginRequest.SearchAndReplaceAscii("$name$", String()); // just to be sure that in other languages the string will be deleted
+ sLoginRequest.replaceAll("\"$name$\"", OUString());
+ sLoginRequest.replaceAll("$name$", OUString()); // just to be sure that in other languages the string will be deleted
}
// the request
@@ -274,7 +274,7 @@ sal_Bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< Propert
aRequest.HasRealm = aRequest.HasAccount = sal_False;
// aRequest.Realm
aRequest.HasUserName = pUser != 0;
- aRequest.UserName = pUser ? rtl::OUString(pUser->GetValue()) : ::rtl::OUString();
+ aRequest.UserName = pUser ? OUString(pUser->GetValue()) : OUString();
aRequest.HasPassword = sal_True;
//aRequest.Password
aRequest.HasAccount = sal_False;
@@ -313,10 +313,10 @@ sal_Bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< Propert
m_pItemSetHelper->getWriteOutputSet()->Put(SfxStringItem(DSID_PASSWORD, sPassword));
}
- if (sPassword.Len())
+ if (sPassword.getLength())
aReturn.push_back(
- PropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("password")), 0,
- makeAny(::rtl::OUString(sPassword)), PropertyState_DIRECT_VALUE));
+ PropertyValue( OUString("password"), 0,
+ makeAny(OUString(sPassword)), PropertyState_DIRECT_VALUE));
}
if ( !aReturn.empty() )
@@ -337,9 +337,9 @@ void ODbDataSourceAdministrationHelper::successfullyConnected()
if (hasAuthentication(*m_pItemSetHelper->getOutputSet()))
{
SFX_ITEMSET_GET(*m_pItemSetHelper->getOutputSet(), pPassword, SfxStringItem, DSID_PASSWORD, sal_True);
- if (pPassword && (0 != pPassword->GetValue().Len()))
+ if (pPassword && (0 != pPassword->GetValue().getLength()))
{
- ::rtl::OUString sPassword = pPassword->GetValue();
+ OUString sPassword = pPassword->GetValue();
Reference< XPropertySet > xCurrentDatasource = getCurrentDataSource();
lcl_putProperty(xCurrentDatasource,m_aDirectPropTranslator[DSID_PASSWORD], makeAny(sPassword));
@@ -386,7 +386,7 @@ Reference< XDriver > ODbDataSourceAdministrationHelper::getDriver()
return getDriver(getConnectionURL());
}
// -----------------------------------------------------------------------------
-Reference< XDriver > ODbDataSourceAdministrationHelper::getDriver(const ::rtl::OUString& _sURL)
+Reference< XDriver > ODbDataSourceAdministrationHelper::getDriver(const OUString& _sURL)
{
// get the global DriverManager
Reference< XConnectionPool > xDriverManager;
@@ -401,8 +401,8 @@ Reference< XDriver > ODbDataSourceAdministrationHelper::getDriver(const ::rtl::O
catch (const Exception& e)
{
// wrap the exception into an SQLException
- SQLException aSQLWrapper(e.Message, getORB(), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("S1000")), 0, Any());
- throw SQLException(sCurrentActionError, getORB(), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("S1000")), 0, makeAny(aSQLWrapper));
+ SQLException aSQLWrapper(e.Message, getORB(), OUString("S1000"), 0, Any());
+ throw SQLException(sCurrentActionError, getORB(), OUString("S1000"), 0, makeAny(aSQLWrapper));
}
@@ -412,7 +412,7 @@ Reference< XDriver > ODbDataSourceAdministrationHelper::getDriver(const ::rtl::O
sCurrentActionError = String(ModuleRes(STR_NOREGISTEREDDRIVER));
sCurrentActionError.SearchAndReplaceAscii("#connurl#", _sURL);
// will be caught and translated into an SQLContext exception
- throw SQLException(sCurrentActionError, getORB(), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("S1000")), 0, Any());
+ throw SQLException(sCurrentActionError, getORB(), OUString("S1000"), 0, Any());
}
return xDriver;
}
@@ -425,7 +425,7 @@ Reference< XPropertySet > ODbDataSourceAdministrationHelper::getCurrentDataSourc
Reference<XInterface> xIn(m_aDataSourceOrName,UNO_QUERY);
if ( !xIn.is() )
{
- ::rtl::OUString sCurrentDatasource;
+ OUString sCurrentDatasource;
m_aDataSourceOrName >>= sCurrentDatasource;
OSL_ENSURE(!sCurrentDatasource.isEmpty(),"No datasource name given!");
try
@@ -453,7 +453,7 @@ Reference< XPropertySet > ODbDataSourceAdministrationHelper::getCurrentDataSourc
return m_xDatasource;
}
//-------------------------------------------------------------------------
-::rtl::OUString ODbDataSourceAdministrationHelper::getDatasourceType( const SfxItemSet& _rSet )
+OUString ODbDataSourceAdministrationHelper::getDatasourceType( const SfxItemSet& _rSet )
{
SFX_ITEMSET_GET( _rSet, pConnectURL, SfxStringItem, DSID_CONNECTURL, sal_True );
OSL_ENSURE( pConnectURL , "ODbDataSourceAdministrationHelper::getDatasourceType: invalid items in the source set!" );
@@ -473,7 +473,7 @@ String ODbDataSourceAdministrationHelper::getConnectionURL() const
{
String sNewUrl;
- ::rtl::OUString eType = getDatasourceType(*m_pItemSetHelper->getOutputSet());
+ OUString eType = getDatasourceType(*m_pItemSetHelper->getOutputSet());
SFX_ITEMSET_GET(*m_pItemSetHelper->getOutputSet(), pUrlItem, SfxStringItem, DSID_CONNECTURL, sal_True);
SFX_ITEMSET_GET(*m_pItemSetHelper->getOutputSet(), pTypeCollection, DbuTypeCollectionItem, DSID_TYPECOLLECTION, sal_True);
@@ -492,8 +492,8 @@ String ODbDataSourceAdministrationHelper::getConnectionURL() const
case ::dbaccess::DST_MSACCESS:
case ::dbaccess::DST_MSACCESS_2007:
{
- ::rtl::OUString sFileName = pCollection->cutPrefix(pUrlItem->GetValue());
- ::rtl::OUString sNewFileName;
+ OUString sFileName = pCollection->cutPrefix(pUrlItem->GetValue());
+ OUString sNewFileName;
if ( ::osl::FileBase::getSystemPathFromFileURL( sFileName, sNewFileName ) == ::osl::FileBase::E_None )
{
sNewUrl += String(sNewFileName);
@@ -507,17 +507,16 @@ String ODbDataSourceAdministrationHelper::getConnectionURL() const
SFX_ITEMSET_GET(*m_pItemSetHelper->getOutputSet(), pPortNumber, SfxInt32Item, DSID_MYSQL_PORTNUMBER, sal_True);
SFX_ITEMSET_GET(*m_pItemSetHelper->getOutputSet(), pDatabaseName, SfxStringItem, DSID_DATABASENAME, sal_True);
sNewUrl = lcl_createHostWithPort(pHostName,pPortNumber);
- String sDatabaseName = pDatabaseName ? pDatabaseName->GetValue() : String();
- if ( !sDatabaseName.Len() && pUrlItem )
+ OUString sDatabaseName = pDatabaseName ? pDatabaseName->GetValue() : OUString();
+ if ( !sDatabaseName.getLength() && pUrlItem )
sDatabaseName = pCollection->cutPrefix( pUrlItem->GetValue() );
// TODO: what's that? Why is the database name transported via the URL Item?
// Huh? Anybody there?
// OJ: It is needed when the connection properties are changed. There the URL is used for every type.
- if ( sDatabaseName.Len() )
+ if ( sDatabaseName.getLength() )
{
- sNewUrl += rtl::OUString::createFromAscii("/");
- sNewUrl += sDatabaseName;
+ sNewUrl += OUString::createFromAscii("/") + sDatabaseName;
}
}
break;
@@ -526,17 +525,15 @@ String ODbDataSourceAdministrationHelper::getConnectionURL() const
SFX_ITEMSET_GET(*m_pItemSetHelper->getOutputSet(), pHostName, SfxStringItem, DSID_CONN_HOSTNAME, sal_True);
SFX_ITEMSET_GET(*m_pItemSetHelper->getOutputSet(), pPortNumber, SfxInt32Item, DSID_ORACLE_PORTNUMBER, sal_True);
SFX_ITEMSET_GET(*m_pItemSetHelper->getOutputSet(), pDatabaseName, SfxStringItem, DSID_DATABASENAME, sal_True);
- if ( pHostName && pHostName->GetValue().Len() )
+ if ( pHostName && pHostName->GetValue().getLength() )
{
- sNewUrl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("@"));
- sNewUrl += lcl_createHostWithPort(pHostName,pPortNumber);
- String sDatabaseName = pDatabaseName ? pDatabaseName->GetValue() : String();
- if ( !sDatabaseName.Len() && pUrlItem )
+ sNewUrl = OUString("@") + lcl_createHostWithPort(pHostName,pPortNumber);
+ OUString sDatabaseName = pDatabaseName ? pDatabaseName->GetValue() : OUString();
+ if ( !sDatabaseName.getLength() && pUrlItem )
sDatabaseName = pCollection->cutPrefix( pUrlItem->GetValue() );
- if ( sDatabaseName.Len() )
+ if ( sDatabaseName.getLength() )
{
- sNewUrl += rtl::OUString::createFromAscii(":");
- sNewUrl += sDatabaseName;
+ sNewUrl += OUString::createFromAscii(":") + sDatabaseName;
}
}
else
@@ -579,7 +576,7 @@ DECLARE_STL_SET( PropertyValue, PropertyValueLess, PropertyValueSet);
//........................................................................
void ODbDataSourceAdministrationHelper::translateProperties(const Reference< XPropertySet >& _rxSource, SfxItemSet& _rDest)
{
- Sequence< ::rtl::OUString > aTableFitler;
+ Sequence< OUString > aTableFitler;
if (_rxSource.is())
{
@@ -623,7 +620,7 @@ void ODbDataSourceAdministrationHelper::translateProperties(const Reference< XPr
if (0 == pAdditionalInfo->Name.compareToAscii("JDBCDRV"))
{ // compatibility
PropertyValue aCompatibility(*pAdditionalInfo);
- aCompatibility.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JavaDriverClass"));
+ aCompatibility.Name = OUString("JavaDriverClass");
aInfos.insert(aCompatibility);
}
else
@@ -675,7 +672,7 @@ void ODbDataSourceAdministrationHelper::translateProperties(const SfxItemSet& _r
try { xInfo = _rxDest->getPropertySetInfo(); }
catch(Exception&) { }
- const ::rtl::OUString sUrlProp(RTL_CONSTASCII_USTRINGPARAM("URL"));
+ const OUString sUrlProp("URL");
// -----------------------------
// transfer the direct properties
for ( ConstMapInt2StringIterator aDirect = m_aDirectPropTranslator.begin();
@@ -696,8 +693,8 @@ void ODbDataSourceAdministrationHelper::translateProperties(const SfxItemSet& _r
{
if ( sUrlProp == aDirect->second )
{
- Any aValue(makeAny(::rtl::OUString(getConnectionURL())));
- // aValue <<= ::rtl::OUString();
+ Any aValue(makeAny(OUString(getConnectionURL())));
+ // aValue <<= OUString();
lcl_putProperty(_rxDest, aDirect->second,aValue);
}
else
@@ -732,7 +729,7 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS
// us)
// first determine which of all the items are relevant for the data source (depends on the connection url)
- ::rtl::OUString eType = getDatasourceType(_rSource);
+ OUString eType = getDatasourceType(_rSource);
::std::vector< sal_Int32> aDetailIds;
ODriversSettings::getSupportedIndirectSettings(eType, getORB(), aDetailIds);
@@ -748,7 +745,7 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS
{
if ( aTranslation->second == INFO_CHARSET )
{
- ::rtl::OUString sCharSet;
+ OUString sCharSet;
implTranslateProperty(pCurrent) >>= sCharSet;
if ( !sCharSet.isEmpty() )
aRelevantSettings.insert(PropertyValue(aTranslation->second, 0, makeAny(sCharSet), PropertyState_DIRECT_VALUE));
@@ -812,7 +809,7 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS
if (aIndirectProps.end() != aIndirectProps.find(aPreserved->second))
{
#if OSL_DEBUG_LEVEL > 0
- const ::rtl::OUString sName = aPreserved->second;
+ const OUString sName = aPreserved->second;
#endif
aRemoveIndexes.push_back(aPreserved->first - nPositionCorrector);
++nPositionCorrector;
@@ -830,7 +827,7 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS
const PropertyValue* pWhatsLeftEnd = pWhatsLeft + _rInfo.getLength();
for (; pWhatsLeft != pWhatsLeftEnd; ++pWhatsLeft)
{
- ::rtl::OUString sLookAtIt = pWhatsLeft->Name;
+ OUString sLookAtIt = pWhatsLeft->Name;
}
#endif
}
@@ -842,7 +839,7 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS
// here we have a special entry for types from oracle
if ( aTypeSettings.getLength() )
{
- aRelevantSettings.insert(PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TypeInfoSettings")), 0, makeAny(aTypeSettings), PropertyState_DIRECT_VALUE));
+ aRelevantSettings.insert(PropertyValue(OUString("TypeInfoSettings"), 0, makeAny(aTypeSettings), PropertyState_DIRECT_VALUE));
}
// check which values are still left ('cause they were not present in the original sequence, but are to be set)
@@ -859,7 +856,7 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS
{
if ( aLoop->Name == INFO_CHARSET )
{
- ::rtl::OUString sCharSet;
+ OUString sCharSet;
aLoop->Value >>= sCharSet;
if ( !sCharSet.isEmpty() )
*pAppendValues = *aLoop;
@@ -883,7 +880,7 @@ Any ODbDataSourceAdministrationHelper::implTranslateProperty(const SfxPoolItem*
if ( pStringItem )
{
- aValue <<= ::rtl::OUString( pStringItem->GetValue().GetBuffer() );
+ aValue <<= OUString( pStringItem->GetValue().getStr() );
}
else if ( pBoolItem )
{
@@ -913,7 +910,7 @@ Any ODbDataSourceAdministrationHelper::implTranslateProperty(const SfxPoolItem*
return aValue;
}
//-------------------------------------------------------------------------
-void ODbDataSourceAdministrationHelper::implTranslateProperty(const Reference< XPropertySet >& _rxSet, const ::rtl::OUString& _rName, const SfxPoolItem* _pItem)
+void ODbDataSourceAdministrationHelper::implTranslateProperty(const Reference< XPropertySet >& _rxSet, const OUString& _rName, const SfxPoolItem* _pItem)
{
Any aValue = implTranslateProperty(_pItem);
lcl_putProperty(_rxSet, _rName,aValue);
@@ -923,7 +920,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty(const Reference< X
//-------------------------------------------------------------------------
::rtl::OString ODbDataSourceAdministrationHelper::translatePropertyId( sal_Int32 _nId )
{
- ::rtl::OUString aString;
+ OUString aString;
MapInt2String::const_iterator aPos = m_aDirectPropTranslator.find( _nId );
if ( m_aDirectPropTranslator.end() != aPos )
@@ -950,7 +947,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet
case TypeClass_STRING:
if ( implCheckItemType( _rSet, _nId, SfxStringItem::StaticType() ) )
{
- ::rtl::OUString sValue;
+ OUString sValue;
_rValue >>= sValue;
_rSet.Put(SfxStringItem(_nId, sValue));
}
@@ -1025,7 +1022,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet
{
case TypeClass_STRING:
{
- Sequence< ::rtl::OUString > aStringList;
+ Sequence< OUString > aStringList;
_rValue >>= aStringList;
_rSet.Put(OStringListItem(_nId, aStringList));
}
@@ -1065,7 +1062,7 @@ String ODbDataSourceAdministrationHelper::getDocumentUrl(SfxItemSet& _rDest)
// -----------------------------------------------------------------------------
void ODbDataSourceAdministrationHelper::convertUrl(SfxItemSet& _rDest)
{
- ::rtl::OUString eType = getDatasourceType(_rDest);
+ OUString eType = getDatasourceType(_rDest);
SFX_ITEMSET_GET(_rDest, pUrlItem, SfxStringItem, DSID_CONNECTURL, sal_True);
SFX_ITEMSET_GET(_rDest, pTypeCollection, DbuTypeCollectionItem, DSID_TYPECOLLECTION, sal_True);
@@ -1077,8 +1074,8 @@ void ODbDataSourceAdministrationHelper::convertUrl(SfxItemSet& _rDest)
sal_uInt16 nPortNumberId = 0;
sal_Int32 nPortNumber = -1;
- String sNewHostName;
- String sUrlPart;
+ OUString sNewHostName;
+ OUString sUrlPart;
pCollection->extractHostNamePort(pUrlItem->GetValue(),sUrlPart,sNewHostName,nPortNumber);
const ::dbaccess::DATASOURCE_TYPE eTy = pCollection->determineType(eType);
@@ -1099,7 +1096,7 @@ void ODbDataSourceAdministrationHelper::convertUrl(SfxItemSet& _rDest)
break;
}
- if ( sUrlPart.Len() )
+ if ( sUrlPart.getLength() )
{
if ( eTy == ::dbaccess::DST_MYSQL_NATIVE )
{
@@ -1107,13 +1104,13 @@ void ODbDataSourceAdministrationHelper::convertUrl(SfxItemSet& _rDest)
}
else
{
- String sNewUrl = pCollection->getPrefix(eType);
+ OUString sNewUrl = pCollection->getPrefix(eType);
sNewUrl += sUrlPart;
_rDest.Put( SfxStringItem( DSID_CONNECTURL, sNewUrl ) );
}
}
- if ( sNewHostName.Len() )
+ if ( sNewHostName.getLength() )
_rDest.Put(SfxStringItem(DSID_CONN_HOSTNAME, sNewHostName));
if ( nPortNumber != -1 && nPortNumberId != 0 )
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.hxx b/dbaccess/source/ui/dlg/DbAdminImpl.hxx
index 2fe1bfd98a6b..983878c1c3ba 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.hxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.hxx
@@ -41,8 +41,8 @@ namespace dbaui
{
void convert(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> & xContext,
const ::dbaccess::ODsnTypeCollection* _pCollection,
- const ::rtl::OUString& _sOldURLPrefix,
- const ::rtl::OUString& _sNewURLPrefix,
+ const OUString& _sOldURLPrefix,
+ const OUString& _sNewURLPrefix,
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _xDatasource);
};
class IItemSetHelper;
@@ -52,7 +52,7 @@ namespace dbaui
class ODbDataSourceAdministrationHelper
{
public:
- DECLARE_STL_MAP(sal_Int32, ::rtl::OUString, ::std::less< sal_Int32 >, MapInt2String);
+ DECLARE_STL_MAP(sal_Int32, OUString, ::std::less< sal_Int32 >, MapInt2String);
private:
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
@@ -63,7 +63,7 @@ namespace dbaui
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xModel;
::com::sun::star::uno::Any m_aDataSourceOrName;
- typedef ::std::set< ::rtl::OUString > StringSet;
+ typedef ::std::set< OUString > StringSet;
typedef StringSet::const_iterator ConstStringSetIterator;
@@ -101,7 +101,7 @@ namespace dbaui
/** return the corresponding driver for the selected URL
*/
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver > getDriver();
- ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver > getDriver(const ::rtl::OUString& _sURL);
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver > getDriver(const OUString& _sURL);
/** returns the data source the dialog is currently working with
*/
@@ -114,7 +114,7 @@ namespace dbaui
/** extracts the connection type from the given set<p/>
The connection type is determined by the value of the DSN item, analyzed by the TypeCollection item.
*/
- static ::rtl::OUString getDatasourceType( const SfxItemSet& _rSet );
+ static OUString getDatasourceType( const SfxItemSet& _rSet );
/** returns the connection URL
@return
@@ -160,7 +160,7 @@ namespace dbaui
::com::sun::star::uno::Any implTranslateProperty(const SfxPoolItem* _pItem);
/// translate the given SfxPoolItem into an <type scope="com.sun.star.Any">uno</type>, set it (under the given name) on the given property set
- void implTranslateProperty(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxSet, const ::rtl::OUString& _rName, const SfxPoolItem* _pItem);
+ void implTranslateProperty(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxSet, const OUString& _rName, const SfxPoolItem* _pItem);
/** check if the data source described by the given set needs authentication<p/>
The return value depends on the data source type only.
diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx
index 0c62704e41c4..56780f8c0a19 100644
--- a/dbaccess/source/ui/dlg/detailpages.cxx
+++ b/dbaccess/source/ui/dlg/detailpages.cxx
@@ -272,7 +272,7 @@ namespace dbaui
SFX_ITEMSET_GET(_rSet, pUrlItem, SfxStringItem, DSID_CONNECTURL, sal_True);
SFX_ITEMSET_GET(_rSet, pTypesItem, DbuTypeCollectionItem, DSID_TYPECOLLECTION, sal_True);
::dbaccess::ODsnTypeCollection* pTypeCollection = pTypesItem ? pTypesItem->getCollection() : NULL;
- if (pTypeCollection && pUrlItem && pUrlItem->GetValue().Len())
+ if (pTypeCollection && pUrlItem && pUrlItem->GetValue().getLength())
m_sDsn = pTypeCollection->cutPrefix(pUrlItem->GetValue());
// get the other relevant items
@@ -505,11 +505,11 @@ namespace dbaui
SFX_ITEMSET_GET(_rCoreAttrs, pUrlItem, SfxStringItem, DSID_CONNECTURL, sal_True);
SFX_ITEMSET_GET(_rCoreAttrs, pTypesItem, DbuTypeCollectionItem, DSID_TYPECOLLECTION, sal_True);
::dbaccess::ODsnTypeCollection* pTypeCollection = pTypesItem ? pTypesItem->getCollection() : NULL;
- if (pTypeCollection && pUrlItem && pUrlItem->GetValue().Len() )
+ if (pTypeCollection && pUrlItem && pUrlItem->GetValue().getLength() )
{
m_sDefaultJdbcDriverName = pTypeCollection->getJavaDriverClass(pUrlItem->GetValue());
}
- if ( m_sDefaultJdbcDriverName.Len() )
+ if ( m_sDefaultJdbcDriverName.getLength() )
{
m_aEDDriverClass.SetModifyHdl(getControlModifiedLink());
m_aEDDriverClass.SetModifyHdl(LINK(this, OGeneralSpecialJDBCDetailsPage, OnEditModified));
@@ -935,7 +935,7 @@ namespace dbaui
//------------------------------------------------------------------------
SfxTabPage* ODriversSettings::CreateSpecialSettingsPage( Window* _pParent, const SfxItemSet& _rAttrSet )
{
- ::rtl::OUString eType = ODbDataSourceAdministrationHelper::getDatasourceType( _rAttrSet );
+ OUString eType = ODbDataSourceAdministrationHelper::getDatasourceType( _rAttrSet );
DataSourceMetaData aMetaData( eType );
return new SpecialSettingsPage( _pParent, _rAttrSet, aMetaData );
}
diff --git a/dbaccess/source/ui/dlg/detailpages.hxx b/dbaccess/source/ui/dlg/detailpages.hxx
index c4d7f52874e4..9e1a3e792e7a 100644
--- a/dbaccess/source/ui/dlg/detailpages.hxx
+++ b/dbaccess/source/ui/dlg/detailpages.hxx
@@ -217,7 +217,7 @@ namespace dbaui
Edit m_aEDDriverClass;
PushButton m_aTestJavaDriver;
- String m_sDefaultJdbcDriverName;
+ OUString m_sDefaultJdbcDriverName;
sal_uInt16 m_nPortId;
bool m_bUseClass;
};
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx
index 29d725282472..38f807dcd6a2 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -96,13 +96,13 @@ namespace dbaui
// If no driver for embedded DBs is installed, and no dBase driver, then hide the "Create new database" option
sal_Int32 nCreateNewDBIndex = m_pCollection->getIndexOf( m_pCollection->getEmbeddedDatabase() );
if ( nCreateNewDBIndex == -1 )
- nCreateNewDBIndex = m_pCollection->getIndexOf( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:dbase:")) );
+ nCreateNewDBIndex = m_pCollection->getIndexOf( OUString("sdbc:dbase:") );
bool bHideCreateNew = ( nCreateNewDBIndex == -1 );
// also, if our application policies tell us to hide the option, do it
::utl::OConfigurationTreeRoot aConfig( ::utl::OConfigurationTreeRoot::createWithComponentContext(
::comphelper::getProcessComponentContext(),
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.DataAccess/Policies/Features/Base" ) )
+ OUString("/org.openoffice.Office.DataAccess/Policies/Features/Base")
) );
sal_Bool bAllowCreateLocalDatabase( sal_True );
OSL_VERIFY( aConfig.getNodeValue( "CreateLocalDatabase" ) >>= bAllowCreateLocalDatabase );
@@ -152,10 +152,10 @@ namespace dbaui
{
struct DisplayedType
{
- ::rtl::OUString eType;
+ OUString eType;
String sDisplayName;
- DisplayedType( const ::rtl::OUString& _eType, const String& _rDisplayName ) : eType( _eType ), sDisplayName( _rDisplayName ) { }
+ DisplayedType( const OUString& _eType, const String& _rDisplayName ) : eType( _eType ), sDisplayName( _rDisplayName ) { }
};
typedef ::std::vector< DisplayedType > DisplayedTypes;
@@ -186,10 +186,10 @@ namespace dbaui
++aTypeLoop
)
{
- const ::rtl::OUString sURLPrefix = aTypeLoop.getURLPrefix();
+ const OUString sURLPrefix = aTypeLoop.getURLPrefix();
if ( !sURLPrefix.isEmpty() )
{
- String sDisplayName = aTypeLoop.getDisplayName();
+ OUString sDisplayName = aTypeLoop.getDisplayName();
if ( m_pDatasourceType->GetEntryPos( sDisplayName ) == LISTBOX_ENTRY_NOTFOUND
&& approveDataSourceType( sURLPrefix, sDisplayName ) )
{
@@ -211,17 +211,16 @@ namespace dbaui
//-------------------------------------------------------------------------
- void OGeneralPage::setParentTitle(const ::rtl::OUString& _sURLPrefix)
+ void OGeneralPage::setParentTitle(const OUString& _sURLPrefix)
{
if (!m_DBWizardMode)
{
- const String sName = m_pCollection->getTypeDisplayName(_sURLPrefix);
+ const OUString sName = m_pCollection->getTypeDisplayName(_sURLPrefix);
if ( m_pAdminDialog )
{
LocalResourceAccess aStringResAccess( PAGE_GENERAL, RSC_TABPAGE );
- String sMessage = String(ModuleRes(STR_PARENTTITLE));
- sMessage.SearchAndReplaceAscii("#",sName);
- m_pAdminDialog->setTitle(sMessage);
+ OUString sMessage = OUString(ModuleRes(STR_PARENTTITLE));
+ m_pAdminDialog->setTitle(sMessage.replaceAll("#",sName));
}
}
}
@@ -247,7 +246,7 @@ namespace dbaui
}
//-------------------------------------------------------------------------
- void OGeneralPage::switchMessage(const ::rtl::OUString& _sURLPrefix)
+ void OGeneralPage::switchMessage(const OUString& _sURLPrefix)
{
SPECIAL_MESSAGE eMessage = smNone;
if ( _sURLPrefix.isEmpty()/*_eType == m_eNotSupportedKnownType*/ )
@@ -274,7 +273,7 @@ namespace dbaui
}
//-------------------------------------------------------------------------
- void OGeneralPage::onTypeSelected(const ::rtl::OUString& _sURLPrefix)
+ void OGeneralPage::onTypeSelected(const OUString& _sURLPrefix)
{
// the new URL text as indicated by the selection history
implSetCurrentType( _sURLPrefix );
@@ -357,12 +356,12 @@ namespace dbaui
sConnectURL = pUrlItem->GetValue();
}
- ::rtl::OUString eOldSelection = m_eCurrentSelection;
+ OUString eOldSelection = m_eCurrentSelection;
m_eNotSupportedKnownType = ::dbaccess::DST_UNKNOWN;
- implSetCurrentType( ::rtl::OUString() );
+ implSetCurrentType( OUString() );
// compare the DSN prefix with the registered ones
- String sDisplayName;
+ OUString sDisplayName;
if (m_pCollection && bValid)
{
@@ -384,7 +383,7 @@ namespace dbaui
}
if (m_aRB_CreateDatabase.IsChecked() && m_DBWizardMode)
- sDisplayName = m_pCollection->getTypeDisplayName( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("jdbc:")));
+ sDisplayName = m_pCollection->getTypeDisplayName( OUString("jdbc:"));
m_pDatasourceType->SelectEntry(sDisplayName);
// notify our listener that our type selection has changed (if so)
@@ -407,7 +406,7 @@ namespace dbaui
// representative for all MySQl databases)
// Also, embedded databases (embedded HSQL, at the moment), are not to appear in the list of
// databases to connect to.
- bool OGeneralPage::approveDataSourceType( const ::rtl::OUString& _sURLPrefix, String& _inout_rDisplayName )
+ bool OGeneralPage::approveDataSourceType( const OUString& _sURLPrefix, OUString& _inout_rDisplayName )
{
const ::dbaccess::DATASOURCE_TYPE eType = m_pCollection->determineType(_sURLPrefix);
@@ -440,12 +439,12 @@ namespace dbaui
if ( eType == ::dbaccess::DST_EMBEDDED_HSQLDB )
_inout_rDisplayName = String();
- return _inout_rDisplayName.Len() > 0;
+ return _inout_rDisplayName.getLength() > 0;
}
// -----------------------------------------------------------------------
- void OGeneralPage::insertDatasourceTypeEntryData(const ::rtl::OUString& _sType, String sDisplayName)
+ void OGeneralPage::insertDatasourceTypeEntryData(const OUString& _sType, String sDisplayName)
{
// insert a (temporary) entry
sal_uInt16 nPos = m_pDatasourceType->InsertEntry(sDisplayName);
@@ -476,7 +475,7 @@ namespace dbaui
}
//-------------------------------------------------------------------------
- void OGeneralPage::implSetCurrentType( const ::rtl::OUString& _eType )
+ void OGeneralPage::implSetCurrentType( const OUString& _eType )
{
if ( _eType == m_eCurrentSelection )
return;
@@ -488,7 +487,7 @@ namespace dbaui
void OGeneralPage::Reset(const SfxItemSet& _rCoreAttrs)
{
// reset all locale data
- implSetCurrentType( ::rtl::OUString() );
+ implSetCurrentType( OUString() );
// this ensures that our type selection link will be called, even if the new is is the same as the
// current one
OGenericAdministrationPage::Reset(_rCoreAttrs);
@@ -504,7 +503,7 @@ namespace dbaui
{
if ( m_aRB_CreateDatabase.IsChecked() )
{
- _rCoreAttrs.Put(SfxStringItem(DSID_CONNECTURL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:dbase:"))));
+ _rCoreAttrs.Put(SfxStringItem(DSID_CONNECTURL, OUString("sdbc:dbase:")));
bChangedSomething = sal_True;
bCommitTypeSelection = false;
}
@@ -521,7 +520,7 @@ namespace dbaui
if ( bCommitTypeSelection )
{
sal_uInt16 nEntry = m_pDatasourceType->GetSelectEntryPos();
- ::rtl::OUString sURLPrefix = m_aURLPrefixes[nEntry];
+ OUString sURLPrefix = m_aURLPrefixes[nEntry];
if (m_DBWizardMode)
{
if ( ( m_pDatasourceType->GetSavedValue() != nEntry )
@@ -551,7 +550,7 @@ namespace dbaui
{
// get the type from the entry data
sal_Int16 nSelected = _pBox->GetSelectEntryPos();
- const ::rtl::OUString sURLPrefix = m_aURLPrefixes[nSelected];
+ const OUString sURLPrefix = m_aURLPrefixes[nSelected];
setParentTitle(sURLPrefix);
// let the impl method do all the stuff
@@ -596,7 +595,7 @@ namespace dbaui
{
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
- 0, rtl::OUString::createFromAscii("sdatabase") );
+ 0, OUString::createFromAscii("sdatabase") );
const SfxFilter* pFilter = getStandardDatabaseFilter();
if ( pFilter )
{
diff --git a/dbaccess/source/ui/dlg/generalpage.hxx b/dbaccess/source/ui/dlg/generalpage.hxx
index 684c5a36c4ec..13ca0a82dc5a 100644
--- a/dbaccess/source/ui/dlg/generalpage.hxx
+++ b/dbaccess/source/ui/dlg/generalpage.hxx
@@ -80,12 +80,12 @@ namespace dbaui
::svt::ControlDependencyManager
m_aControlDependencies;
- ::std::vector< ::rtl::OUString> m_aURLPrefixes;
+ ::std::vector< OUString> m_aURLPrefixes;
::dbaccess::ODsnTypeCollection*
m_pCollection; /// the DSN type collection instance
- ::rtl::OUString m_eCurrentSelection; /// currently selected type
+ OUString m_eCurrentSelection; /// currently selected type
::dbaccess::DATASOURCE_TYPE m_eNotSupportedKnownType; /// if a data source of an unsupported, but known type is encountered ....
enum SPECIAL_MESSAGE
@@ -101,8 +101,8 @@ namespace dbaui
Link m_aChooseDocumentHandler; /// to be called when a recent document has been definately chosen
sal_Bool m_bDisplayingInvalid : 1; // the currently displayed data source is deleted
bool m_bInitTypeList : 1;
- bool approveDataSourceType( const ::rtl::OUString& _sURLPrefix, String& _inout_rDisplayName );
- void insertDatasourceTypeEntryData(const ::rtl::OUString& _sType, String sDisplayName);
+ bool approveDataSourceType( const OUString& _sURLPrefix, OUString& _inout_rDisplayName );
+ void insertDatasourceTypeEntryData(const OUString& _sType, String sDisplayName);
public:
static SfxTabPage* Create(Window* pParent, const SfxItemSet& _rAttrSet, sal_Bool _bDBWizardMode = sal_False);
@@ -117,7 +117,7 @@ namespace dbaui
DocumentDescriptor GetSelectedDocument() const;
/// get the currently selected datasource type
- ::rtl::OUString GetSelectedType() const { return m_eCurrentSelection; }
+ OUString GetSelectedType() const { return m_eCurrentSelection; }
protected:
// SfxTabPage overridables
@@ -135,15 +135,15 @@ namespace dbaui
protected:
- void onTypeSelected(const ::rtl::OUString& _sURLPrefix);
+ void onTypeSelected(const OUString& _sURLPrefix);
void initializeTypeList();
- void implSetCurrentType( const ::rtl::OUString& _eType );
+ void implSetCurrentType( const OUString& _eType );
- void switchMessage(const ::rtl::OUString& _sURLPrefix);
+ void switchMessage(const OUString& _sURLPrefix);
/// sets the title of the parent dialog
- void setParentTitle(const ::rtl::OUString& _sURLPrefix);
+ void setParentTitle(const OUString& _sURLPrefix);
DECL_LINK(OnDatasourceTypeSelected, ListBox*);
DECL_LINK(OnSetupModeSelected, RadioButton*);