summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-12-12 17:53:23 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-12-12 17:53:23 +0100
commitfbcb2556be11225d14e62fb1849930f5953588dc (patch)
tree4426e8ad8878ef17e6341d90f4d3f65c41c23f86 /ucb
parent34a903796c97601c4f686c8f4fc0bfca1426d8ce (diff)
ucb: Use appropriate OUString functions on string constants
Change-Id: I6839e032c981fcff472f29c51c84503d6370fd1c
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/core/ucbcmds.cxx4
-rw-r--r--ucb/source/sorter/sortresult.cxx15
-rw-r--r--ucb/source/ucp/file/filrset.cxx2
-rw-r--r--ucb/source/ucp/file/prov.cxx14
-rw-r--r--ucb/source/ucp/ftp/ftpcontent.cxx32
-rw-r--r--ucb/source/ucp/ftp/ftpresultsetI.cxx16
-rw-r--r--ucb/source/ucp/webdav-neon/DateTimeHelper.cxx24
7 files changed, 53 insertions, 54 deletions
diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx
index 3fcff9601205..5c309af31b35 100644
--- a/ucb/source/core/ucbcmds.cxx
+++ b/ucb/source/core/ucbcmds.cxx
@@ -820,7 +820,7 @@ void transferProperties(
uno::Any aValue;
- if ( rCurrProp.Name.equalsAscii( "Title" ) )
+ if ( rCurrProp.Name == "Title" )
{
// Supply new title, if given.
if ( !bHasTitle )
@@ -829,7 +829,7 @@ void transferProperties(
aValue <<= rContext.aArg.NewTitle;
}
}
- else if ( rCurrProp.Name.equalsAscii( "TargetURL" ) )
+ else if ( rCurrProp.Name == "TargetURL" )
{
// Supply source URL as link target for the new link to create.
if ( !bHasTargetURL )
diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx
index 5bef2377c064..daadc8b3d33b 100644
--- a/ucb/source/sorter/sortresult.cxx
+++ b/ucb/source/sorter/sortresult.cxx
@@ -859,8 +859,7 @@ void SAL_CALL SortedResultSet::setPropertyValue(
{
osl::Guard< osl::Mutex > aGuard( maMutex );
- if ( PropertyName.equalsAscii( "RowCount" ) ||
- PropertyName.equalsAscii( "IsRowCountFinal" ) )
+ if ( PropertyName == "RowCount" || PropertyName == "IsRowCountFinal" )
throw IllegalArgumentException();
else
throw UnknownPropertyException();
@@ -876,11 +875,11 @@ Any SAL_CALL SortedResultSet::getPropertyValue( const OUString& PropertyName )
Any aRet;
- if ( PropertyName.equalsAscii( "RowCount" ) )
+ if ( PropertyName == "RowCount" )
{
aRet <<= maS2O.Count();
}
- else if ( PropertyName.equalsAscii( "IsRowCountFinal" ) )
+ else if ( PropertyName == "IsRowCountFinal" )
{
bool bOrgFinal = false;
Any aOrgRet;
@@ -1981,9 +1980,9 @@ Property SAL_CALL
SRSPropertySetInfo::getPropertyByName( const OUString& Name )
throw( UnknownPropertyException, RuntimeException, std::exception )
{
- if ( Name.equalsAscii( "RowCount" ) )
+ if ( Name == "RowCount" )
return maProps[0];
- else if ( Name.equalsAscii( "IsRowCountFinal" ) )
+ else if ( Name == "IsRowCountFinal" )
return maProps[1];
else
throw UnknownPropertyException();
@@ -1994,9 +1993,9 @@ sal_Bool SAL_CALL
SRSPropertySetInfo::hasPropertyByName( const OUString& Name )
throw( RuntimeException, std::exception )
{
- if ( Name.equalsAscii( "RowCount" ) )
+ if ( Name == "RowCount" )
return sal_True;
- else if ( Name.equalsAscii( "IsRowCountFinal" ) )
+ else if ( Name == "IsRowCountFinal" )
return sal_True;
else
return sal_False;
diff --git a/ucb/source/ucp/file/filrset.cxx b/ucb/source/ucp/file/filrset.cxx
index 386218254f21..5413b0832471 100644
--- a/ucb/source/ucp/file/filrset.cxx
+++ b/ucb/source/ucp/file/filrset.cxx
@@ -700,7 +700,7 @@ XResultSet_impl::getMetaData(
{
for ( sal_Int32 n = 0; n < m_sProperty.getLength(); ++n )
{
- if ( m_sProperty.getConstArray()[ n ].Name.equalsAscii( "Title" ) )
+ if ( m_sProperty.getConstArray()[ n ].Name == "Title" )
{
// @@@ #82177# - Determine correct value!
bool bCaseSensitiveChildren = false;
diff --git a/ucb/source/ucp/file/prov.cxx b/ucb/source/ucp/file/prov.cxx
index 95400bdc577a..526c19a35226 100644
--- a/ucb/source/ucp/file/prov.cxx
+++ b/ucb/source/ucp/file/prov.cxx
@@ -114,7 +114,7 @@ FileProvider::initialize(
OUString config;
if( aArguments.getLength() > 0 &&
(aArguments[0] >>= config) &&
- config.equalsAscii("NoConfig") )
+ config == "NoConfig" )
m_pMyShell = new shell( m_xContext, this, false );
else
m_pMyShell = new shell( m_xContext, this, true );
@@ -473,9 +473,9 @@ FileProvider::setPropertyValue( const OUString& aPropertyName,
WrappedTargetException,
RuntimeException, std::exception )
{
- if( aPropertyName.equalsAscii( "FileSystemNotation" ) ||
- aPropertyName.equalsAscii( "HomeDirectory" ) ||
- aPropertyName.equalsAscii( "HostName" ) )
+ if( aPropertyName == "FileSystemNotation" ||
+ aPropertyName == "HomeDirectory" ||
+ aPropertyName == "HostName" )
return;
else
throw UnknownPropertyException( THROW_WHERE );
@@ -491,19 +491,19 @@ FileProvider::getPropertyValue(
RuntimeException, std::exception )
{
initProperties();
- if( aPropertyName.equalsAscii( "FileSystemNotation" ) )
+ if( aPropertyName == "FileSystemNotation" )
{
Any aAny;
aAny <<= m_FileSystemNotation;
return aAny;
}
- else if( aPropertyName.equalsAscii( "HomeDirectory" ) )
+ else if( aPropertyName == "HomeDirectory" )
{
Any aAny;
aAny <<= m_HomeDirectory;
return aAny;
}
- else if( aPropertyName.equalsAscii( "HostName" ) )
+ else if( aPropertyName == "HostName" )
{
Any aAny;
aAny <<= m_HostName;
diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx
index d903516d528a..04f3bf725876 100644
--- a/ucb/source/ucp/ftp/ftpcontent.cxx
+++ b/ucb/source/ucp/ftp/ftpcontent.cxx
@@ -435,7 +435,7 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
break;
}
- if(aCommand.Name.equalsAscii("getPropertyValues")) {
+ if(aCommand.Name == "getPropertyValues") {
Sequence<Property> Properties;
if(!(aCommand.Argument >>= Properties))
{
@@ -448,7 +448,7 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
aRet <<= getPropertyValues(Properties,Environment);
}
- else if(aCommand.Name.equalsAscii("setPropertyValues") )
+ else if(aCommand.Name == "setPropertyValues")
{
Sequence<PropertyValue> propertyValues;
@@ -462,15 +462,15 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
aRet <<= setPropertyValues(propertyValues);
}
- else if(aCommand.Name.equalsAscii("getCommandInfo")) {
+ else if(aCommand.Name == "getCommandInfo") {
// Note: Implemented by base class.
aRet <<= getCommandInfo(Environment);
}
- else if(aCommand.Name.equalsAscii("getPropertySetInfo")) {
+ else if(aCommand.Name == "getPropertySetInfo") {
// Note: Implemented by base class.
aRet <<= getPropertySetInfo(Environment);
}
- else if(aCommand.Name.equalsAscii( "insert" ))
+ else if(aCommand.Name == "insert")
{
InsertCommandArgument aInsertArgument;
if ( ! ( aCommand.Argument >>= aInsertArgument ) ) {
@@ -482,11 +482,11 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
}
insert(aInsertArgument,Environment);
}
- else if(aCommand.Name.equalsAscii("delete")) {
+ else if(aCommand.Name == "delete") {
m_aFTPURL.del();
deleted();
}
- else if(aCommand.Name.equalsAscii( "open" )) {
+ else if(aCommand.Name == "open") {
OpenCommandArgument2 aOpenCommand;
if ( !( aCommand.Argument >>= aOpenCommand ) ) {
aRet <<= IllegalArgumentException(
@@ -590,7 +590,7 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
ucbhelper::cancelCommandExecution(aRet,Environment);
}
- } else if(aCommand.Name.equalsAscii("createNewContent")) {
+ } else if(aCommand.Name == "createNewContent") {
ContentInfo aArg;
if (!(aCommand.Argument >>= aArg)) {
ucbhelper::cancelCommandExecution(
@@ -837,35 +837,35 @@ Reference< XRow > FTPContent::getPropertyValues(
for(sal_Int32 i = 0; i < seqProp.getLength(); ++i) {
const OUString& Name = seqProp[i].Name;
- if(Name.equalsAscii("Title"))
+ if(Name == "Title")
xRow->appendString(seqProp[i],aDirEntry.m_aName);
- else if(Name.equalsAscii("CreatableContentsInfo"))
+ else if(Name == "CreatableContentsInfo")
xRow->appendObject(seqProp[i],
makeAny(queryCreatableContentsInfo()));
else if(aDirEntry.m_nMode != INETCOREFTP_FILEMODE_UNKNOWN) {
- if(Name.equalsAscii("ContentType"))
+ if(Name == "ContentType")
xRow->appendString(seqProp[i],
aDirEntry.m_nMode&INETCOREFTP_FILEMODE_ISDIR
? FTP_FOLDER
: FTP_FILE );
- else if(Name.equalsAscii("IsReadOnly"))
+ else if(Name == "IsReadOnly")
xRow->appendBoolean(seqProp[i],
aDirEntry.m_nMode
& INETCOREFTP_FILEMODE_WRITE
? 0
: 1 );
- else if(Name.equalsAscii("IsDocument"))
+ else if(Name == "IsDocument")
xRow->appendBoolean(seqProp[i],
(aDirEntry.m_nMode &
INETCOREFTP_FILEMODE_ISDIR) != INETCOREFTP_FILEMODE_ISDIR);
- else if(Name.equalsAscii("IsFolder"))
+ else if(Name == "IsFolder")
xRow->appendBoolean(seqProp[i],
(aDirEntry.m_nMode &
INETCOREFTP_FILEMODE_ISDIR) == INETCOREFTP_FILEMODE_ISDIR);
- else if(Name.equalsAscii("Size"))
+ else if(Name == "Size")
xRow->appendLong(seqProp[i],
aDirEntry.m_nSize);
- else if(Name.equalsAscii("DateCreated"))
+ else if(Name == "DateCreated")
xRow->appendTimestamp(seqProp[i],
aDirEntry.m_aDate);
else
diff --git a/ucb/source/ucp/ftp/ftpresultsetI.cxx b/ucb/source/ucp/ftp/ftpresultsetI.cxx
index 7e6dc3710afa..1bfcddc3a3e5 100644
--- a/ucb/source/ucp/ftp/ftpresultsetI.cxx
+++ b/ucb/source/ucp/ftp/ftpresultsetI.cxx
@@ -60,30 +60,30 @@ ResultSetI::ResultSetI(const Reference<XComponentContext>& rxContext,
for( int i = 0; i < seqProp.getLength(); ++i) {
const OUString& Name = seqProp[i].Name;
- if(Name.equalsAscii("ContentType") )
+ if(Name == "ContentType")
xRow->appendString(seqProp[i],
OUString( "application/ftp" ));
- else if(Name.equalsAscii("Title"))
+ else if(Name == "Title")
xRow->appendString(seqProp[i],dirvec[n].m_aName);
- else if(Name.equalsAscii("IsReadOnly"))
+ else if(Name == "IsReadOnly")
xRow->appendBoolean(seqProp[i],
(dirvec[n].m_nMode &
INETCOREFTP_FILEMODE_WRITE) == INETCOREFTP_FILEMODE_WRITE);
- else if(Name.equalsAscii("IsDocument"))
+ else if(Name == "IsDocument")
xRow->appendBoolean(seqProp[i],
(dirvec[n].m_nMode &
INETCOREFTP_FILEMODE_ISDIR) != INETCOREFTP_FILEMODE_ISDIR);
- else if(Name.equalsAscii("IsFolder"))
+ else if(Name == "IsFolder")
xRow->appendBoolean(seqProp[i],
( dirvec[n].m_nMode &
INETCOREFTP_FILEMODE_ISDIR) == INETCOREFTP_FILEMODE_ISDIR);
- else if(Name.equalsAscii("Size"))
+ else if(Name == "Size")
xRow->appendLong(seqProp[i],
dirvec[n].m_nSize);
- else if(Name.equalsAscii("DateCreated"))
+ else if(Name == "DateCreated")
xRow->appendTimestamp(seqProp[i],
dirvec[n].m_aDate);
- else if(Name.equalsAscii("CreatableContentsInfo"))
+ else if(Name == "CreatableContentsInfo")
xRow->appendObject(
seqProp[i],
makeAny(FTPContent::queryCreatableContentsInfo_Static()));
diff --git a/ucb/source/ucp/webdav-neon/DateTimeHelper.cxx b/ucb/source/ucp/webdav-neon/DateTimeHelper.cxx
index 41adf1a7ceee..af39ae99c3f3 100644
--- a/ucb/source/ucp/webdav-neon/DateTimeHelper.cxx
+++ b/ucb/source/ucp/webdav-neon/DateTimeHelper.cxx
@@ -117,29 +117,29 @@ bool DateTimeHelper::ISO8601_To_DateTime (const OUString& s,
sal_Int32 DateTimeHelper::convertMonthToInt (const OUString& month)
{
- if (month.equalsAscii("Jan"))
+ if (month == "Jan")
return 1;
- else if (month.equalsAscii("Feb"))
+ else if (month == "Feb")
return 2;
- else if (month.equalsAscii("Mar"))
+ else if (month == "Mar")
return 3;
- else if (month.equalsAscii("Apr"))
+ else if (month == "Apr")
return 4;
- else if (month.equalsAscii("May"))
+ else if (month == "May")
return 5;
- else if (month.equalsAscii("Jun"))
+ else if (month == "Jun")
return 6;
- else if (month.equalsAscii("Jul"))
+ else if (month == "Jul")
return 7;
- else if (month.equalsAscii("Aug"))
+ else if (month == "Aug")
return 8;
- else if (month.equalsAscii("Sep"))
+ else if (month == "Sep")
return 9;
- else if (month.equalsAscii("Oct"))
+ else if (month == "Oct")
return 10;
- else if (month.equalsAscii("Nov"))
+ else if (month == "Nov")
return 11;
- else if (month.equalsAscii("Dec"))
+ else if (month == "Dec")
return 12;
else
return 0;