summaryrefslogtreecommitdiff
path: root/svl/source/passwordcontainer/passwordcontainer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svl/source/passwordcontainer/passwordcontainer.cxx')
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.cxx58
1 files changed, 29 insertions, 29 deletions
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index 1d315c2d264f..f01f7e3f96a7 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -150,7 +150,7 @@ static vector< ::rtl::OUString > getInfoFromInd( ::rtl::OUString aInd )
static sal_Bool shorterUrl( ::rtl::OUString& aURL )
{
sal_Int32 aInd = aURL.lastIndexOf( sal_Unicode( '/' ) );
- if( aInd > 0 && aURL.indexOf( ::rtl::OUString::createFromAscii( "://" ) ) != aInd-2 )
+ if( aInd > 0 && aURL.indexOf( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("://")) ) != aInd-2 )
{
aURL = aURL.copy( 0, aInd );
return sal_True;
@@ -222,16 +222,16 @@ PassMap StorageItem::getInfo()
{
PassMap aResult;
- Sequence< ::rtl::OUString > aNodeNames = ConfigItem::GetNodeNames( ::rtl::OUString::createFromAscii("Store") );
+ Sequence< ::rtl::OUString > aNodeNames = ConfigItem::GetNodeNames( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Store")) );
sal_Int32 aNodeCount = aNodeNames.getLength();
Sequence< ::rtl::OUString > aPropNames( aNodeCount );
sal_Int32 aNodeInd;
for( aNodeInd = 0; aNodeInd < aNodeCount; ++aNodeInd )
{
- aPropNames[aNodeInd] = ::rtl::OUString::createFromAscii( "Store/Passwordstorage['" );
+ aPropNames[aNodeInd] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Store/Passwordstorage['"));
aPropNames[aNodeInd] += aNodeNames[aNodeInd];
- aPropNames[aNodeInd] += ::rtl::OUString::createFromAscii( "']/Password" );
+ aPropNames[aNodeInd] += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("']/Password"));
}
Sequence< Any > aPropertyValues = ConfigItem::GetProperties( aPropNames );
@@ -279,7 +279,7 @@ void StorageItem::setUseStorage( sal_Bool bUse )
Sequence< ::rtl::OUString > sendNames(1);
Sequence< uno::Any > sendVals(1);
- sendNames[0] = ::rtl::OUString::createFromAscii( "UseStorage" );
+ sendNames[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UseStorage"));
sendVals[0] <<= bUse;
@@ -292,7 +292,7 @@ void StorageItem::setUseStorage( sal_Bool bUse )
sal_Bool StorageItem::useStorage()
{
Sequence< ::rtl::OUString > aNodeNames( 1 );
- aNodeNames[0] = ::rtl::OUString::createFromAscii( "UseStorage" );
+ aNodeNames[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UseStorage"));
Sequence< Any > aPropertyValues = ConfigItem::GetProperties( aNodeNames );
@@ -319,8 +319,8 @@ sal_Bool StorageItem::getEncodedMP( ::rtl::OUString& aResult )
}
Sequence< ::rtl::OUString > aNodeNames( 2 );
- aNodeNames[0] = ::rtl::OUString::createFromAscii( "HasMaster" );
- aNodeNames[1] = ::rtl::OUString::createFromAscii( "Master" );
+ aNodeNames[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasMaster"));
+ aNodeNames[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Master"));
Sequence< Any > aPropertyValues = ConfigItem::GetProperties( aNodeNames );
@@ -345,8 +345,8 @@ void StorageItem::setEncodedMP( const ::rtl::OUString& aEncoded, sal_Bool bAccep
Sequence< ::rtl::OUString > sendNames(2);
Sequence< uno::Any > sendVals(2);
- sendNames[0] = ::rtl::OUString::createFromAscii( "HasMaster" );
- sendNames[1] = ::rtl::OUString::createFromAscii( "Master" );
+ sendNames[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasMaster"));
+ sendNames[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Master"));
sal_Bool bHasMaster = ( aEncoded.getLength() > 0 || bAcceptEmpty );
sendVals[0] <<= bHasMaster;
@@ -370,11 +370,11 @@ void StorageItem::remove( const ::rtl::OUString& aURL, const ::rtl::OUString& aN
Sequence< ::rtl::OUString > sendSeq(1);
sendSeq[0] = createIndex( forIndex );
- // sendSeq[0] = ::rtl::OUString::createFromAscii( "Store/Passwordstorage['" );
+ // sendSeq[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Store/Passwordstorage['"));
// sendSeq[0] += createIndex( forIndex );
- // sendSeq[0] += ::rtl::OUString::createFromAscii( "']" );
+ // sendSeq[0] += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("']"));
- ConfigItem::ClearNodeElements( ::rtl::OUString::createFromAscii( "Store" ), sendSeq );
+ ConfigItem::ClearNodeElements( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Store")), sendSeq );
}
//-------------------------------------------------------------------------
@@ -383,7 +383,7 @@ void StorageItem::clear()
{
Sequence< ::rtl::OUString > sendSeq(1);
- ConfigItem::ClearNodeSet( ::rtl::OUString::createFromAscii( "Store" ) );
+ ConfigItem::ClearNodeSet( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Store")) );
}
//-------------------------------------------------------------------------
@@ -402,14 +402,14 @@ void StorageItem::update( const ::rtl::OUString& aURL, const NamePassRecord& aRe
Sequence< beans::PropertyValue > sendSeq(1);
- sendSeq[0].Name = ::rtl::OUString::createFromAscii( "Store/Passwordstorage['" );
+ sendSeq[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Store/Passwordstorage['"));
sendSeq[0].Name += createIndex( forIndex );
- sendSeq[0].Name += ::rtl::OUString::createFromAscii( "']/Password" );
+ sendSeq[0].Name += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("']/Password"));
sendSeq[0].Value <<= aRecord.GetPersPasswords();
ConfigItem::SetModified();
- ConfigItem::SetSetProperties( ::rtl::OUString::createFromAscii( "Store" ), sendSeq );
+ ConfigItem::SetSetProperties( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Store")), sendSeq );
}
//-------------------------------------------------------------------------
@@ -440,7 +440,7 @@ PasswordContainer::PasswordContainer( const Reference<XMultiServiceFactory>& xSe
mComponent = Reference< XComponent >( xServiceFactory, UNO_QUERY );
mComponent->addEventListener( this );
- m_pStorageFile = new StorageItem( this, ::rtl::OUString::createFromAscii( "Office.Common/Passwords" ) );
+ m_pStorageFile = new StorageItem( this, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Common/Passwords")) );
if( m_pStorageFile )
if( m_pStorageFile->useStorage() )
m_aContainer = m_pStorageFile->getInfo();
@@ -532,7 +532,7 @@ vector< ::rtl::OUString > PasswordContainer::DecodePasswords( const ::rtl::OUStr
// problems with decoding
OSL_ENSURE( sal_False, "Problem with decoding\n" );
- throw RuntimeException( ::rtl::OUString::createFromAscii( "Can't decode!" ), Reference< XInterface >() );
+ throw RuntimeException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Can't decode!")), Reference< XInterface >() );
}
@@ -612,7 +612,7 @@ vector< ::rtl::OUString > PasswordContainer::DecodePasswords( const ::rtl::OUStr
// problems with encoding
OSL_ENSURE( sal_False, "Problem with encoding\n" );
- throw RuntimeException( ::rtl::OUString::createFromAscii( "Can't encode!" ), Reference< XInterface >() );
+ throw RuntimeException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Can't encode!")), Reference< XInterface >() );
}
//-------------------------------------------------------------------------
@@ -843,7 +843,7 @@ UrlRecord PasswordContainer::find(
{
::rtl::OUString tmpUrl( aUrl );
if ( tmpUrl.getStr()[tmpUrl.getLength() - 1] != (sal_Unicode)'/' )
- tmpUrl += ::rtl::OUString::createFromAscii( "/" );
+ tmpUrl += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
aIter = m_aContainer.lower_bound( tmpUrl );
if( aIter != m_aContainer.end() && aIter->first.match( tmpUrl ) )
@@ -906,7 +906,7 @@ UrlRecord PasswordContainer::find(
{
PasswordRequestMode aRMode = PasswordRequestMode_PASSWORD_ENTER;
if( !m_pStorageFile || !m_pStorageFile->useStorage() )
- throw NoMasterException( ::rtl::OUString::createFromAscii( "Password storing is not active!" ), Reference< XInterface >(), aRMode );
+ throw NoMasterException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Password storing is not active!")), Reference< XInterface >(), aRMode );
if( !m_aMasterPasswd.getLength() && aHandler.is() )
{
@@ -955,7 +955,7 @@ UrlRecord PasswordContainer::find(
}
if ( !m_aMasterPasswd.getLength() )
- throw NoMasterException( ::rtl::OUString::createFromAscii( "No master password!" ), Reference< XInterface >(), aRMode );
+ throw NoMasterException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("No master password!")), Reference< XInterface >(), aRMode );
return m_aMasterPasswd;
}
@@ -977,7 +977,7 @@ void SAL_CALL PasswordContainer::remove( const ::rtl::OUString& aURL, const ::rt
if( aInd > 0 && aUrl.getLength()-1 == aInd )
aUrl = aUrl.copy( 0, aUrl.getLength() - 1 );
else
- aUrl += ::rtl::OUString::createFromAscii( "/" );
+ aUrl += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
aIter = m_aContainer.find( aUrl );
}
@@ -1019,7 +1019,7 @@ void SAL_CALL PasswordContainer::removePersistent( const ::rtl::OUString& aURL,
if( aInd > 0 && aUrl.getLength()-1 == aInd )
aUrl = aUrl.copy( 0, aUrl.getLength() - 1 );
else
- aUrl += ::rtl::OUString::createFromAscii( "/" );
+ aUrl += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
aIter = m_aContainer.find( aUrl );
}
@@ -1463,7 +1463,7 @@ Sequence< ::rtl::OUString > SAL_CALL PasswordContainer::getSupportedServiceNames
Sequence< ::rtl::OUString > SAL_CALL PasswordContainer::impl_getStaticSupportedServiceNames( ) throw(uno::RuntimeException)
{
Sequence< ::rtl::OUString > aRet(1);
- *aRet.getArray() = ::rtl::OUString::createFromAscii("com.sun.star.task.PasswordContainer");
+ *aRet.getArray() = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.PasswordContainer"));
return aRet;
}
@@ -1471,7 +1471,7 @@ Sequence< ::rtl::OUString > SAL_CALL PasswordContainer::impl_getStaticSupportedS
::rtl::OUString SAL_CALL PasswordContainer::impl_getStaticImplementationName() throw(uno::RuntimeException)
{
- return ::rtl::OUString::createFromAscii("stardiv.svl.PasswordContainer");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("stardiv.svl.PasswordContainer"));
}
//-------------------------------------------------------------------------
@@ -1554,8 +1554,8 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo (
Reference< XRegistryKey > xNewKey;
xNewKey = xRegistryKey->createKey(
- ::rtl::OUString::createFromAscii( "/stardiv.svl.PasswordContainer/UNO/SERVICES" ));
- xNewKey->createKey( ::rtl::OUString::createFromAscii("com.sun.star.task.PasswordContainer"));
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/stardiv.svl.PasswordContainer/UNO/SERVICES")));
+ xNewKey->createKey( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.PasswordContainer")));
return sal_True;
}