summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorSzabolcs Dezsi <dezsiszabi@hotmail.com>2012-04-06 15:05:52 +0200
committerJan Holesovsky <kendy@suse.cz>2012-04-06 15:07:41 +0200
commit743f22045c4ec08c46c259fc0ba240194a391457 (patch)
treefaed42bb31c4ee767619eb5c3ebd4dec0a41fa03 /desktop
parent0c6ebe5d225d6a655f078977455cec6d0a3afa6e (diff)
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Pattern used: find . -name "*.cxx" -exec sed -i 's/\( *\)\(else if\|if\) *( *\([^!()|&]*\)\.equalsAsciiL( *RTL_CONSTASCII_STRINGPARAM *( *\([^)]*\)) *) *)$/\1\2 ( \3 == \4 )/' \{\} \;
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/configinit.cxx2
-rw-r--r--desktop/source/app/desktopcontext.cxx2
-rw-r--r--desktop/source/deployment/manager/dp_managerfac.cxx6
-rw-r--r--desktop/source/deployment/registry/dp_backend.cxx10
-rw-r--r--desktop/source/migration/migration.cxx16
-rw-r--r--desktop/source/migration/services/jvmfwk.cxx10
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_app.cxx8
7 files changed, 27 insertions, 27 deletions
diff --git a/desktop/source/app/configinit.cxx b/desktop/source/app/configinit.cxx
index f4e1044acea9..a51dd36ffef1 100644
--- a/desktop/source/app/configinit.cxx
+++ b/desktop/source/app/configinit.cxx
@@ -124,7 +124,7 @@ private:
uno::Any SAL_CALL ConfigurationErrorHandler::Context::getValueByName( OUString const & aName)
throw (uno::RuntimeException)
{
- if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CONFIG_ERROR_HANDLER)) )
+ if ( aName == CONFIG_ERROR_HANDLER )
{
if ( !m_xHandler.is() )
m_xHandler = ConfigurationErrorHandler::getDefaultInteractionHandler();
diff --git a/desktop/source/app/desktopcontext.cxx b/desktop/source/app/desktopcontext.cxx
index 82338f3d504f..0627da3cc778 100644
--- a/desktop/source/app/desktopcontext.cxx
+++ b/desktop/source/app/desktopcontext.cxx
@@ -48,7 +48,7 @@ Any SAL_CALL DesktopContext::getValueByName( const OUString& Name) throw (Runtim
{
Any retVal;
- if (Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(JAVA_INTERACTION_HANDLER_NAME)))
+ if ( Name == JAVA_INTERACTION_HANDLER_NAME )
{
retVal = makeAny( Reference< XInteractionHandler >( new svt::JavaInteractionHandler()) );
}
diff --git a/desktop/source/deployment/manager/dp_managerfac.cxx b/desktop/source/deployment/manager/dp_managerfac.cxx
index 9061f044f8e8..5312923cbb68 100644
--- a/desktop/source/deployment/manager/dp_managerfac.cxx
+++ b/desktop/source/deployment/manager/dp_managerfac.cxx
@@ -148,11 +148,11 @@ PackageManagerFactoryImpl::getPackageManager( OUString const & context )
{
OSL_ASSERT( insertion.first->second.get() == xRet );
// hold user, shared mgrs for whole process: live deployment
- if (context.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("user") ))
+ if ( context == "user" )
m_xUserMgr = xRet;
- else if (context.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("shared") ))
+ else if ( context == "shared" )
m_xSharedMgr = xRet;
- else if (context.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("bundled") ))
+ else if ( context == "bundled" )
m_xBundledMgr = xRet;
}
else
diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx
index 8b84ec5d565c..fef95a8215ce 100644
--- a/desktop/source/deployment/registry/dp_backend.cxx
+++ b/desktop/source/deployment/registry/dp_backend.cxx
@@ -94,15 +94,15 @@ PackageRegistryBackend::PackageRegistryBackend(
if (readOnly)
m_readOnly = *readOnly;
- if (m_context.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("user") ))
+ if ( m_context == "user" )
m_eContext = CONTEXT_USER;
- else if (m_context.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("shared") ))
+ else if ( m_context == "shared" )
m_eContext = CONTEXT_SHARED;
- else if (m_context.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("bundled") ))
+ else if ( m_context == "bundled" )
m_eContext = CONTEXT_BUNDLED;
- else if (m_context.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("tmp") ))
+ else if ( m_context == "tmp" )
m_eContext = CONTEXT_TMP;
- else if (m_context.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("bundled_prereg") ))
+ else if ( m_context == "bundled_prereg" )
m_eContext = CONTEXT_BUNDLED_PREREG;
else if (m_context.matchIgnoreAsciiCaseAsciiL(
RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.tdoc:/") ))
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index d0efd587ad81..eca75099bd58 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -1080,9 +1080,9 @@ void MigrationImpl::compareOldAndNewConfig(const ::rtl::OUString& sParent,
{
for(int i=0; i<aProp.getLength(); ++i)
{
- if (aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_COMMANDURL)))
+ if ( aProp[i].Name == ITEM_DESCRIPTOR_COMMANDURL )
aProp[i].Value >>= aMigrationItem.m_sCommandURL;
- else if (aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_CONTAINER)))
+ else if ( aProp[i].Name == ITEM_DESCRIPTOR_CONTAINER )
aProp[i].Value >>= aMigrationItem.m_xPopupMenu;
}
@@ -1098,9 +1098,9 @@ void MigrationImpl::compareOldAndNewConfig(const ::rtl::OUString& sParent,
{
for(int i=0; i<aProp.getLength(); ++i)
{
- if (aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_COMMANDURL)))
+ if ( aProp[i].Name == ITEM_DESCRIPTOR_COMMANDURL )
aProp[i].Value >>= aMigrationItem.m_sCommandURL;
- else if (aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_CONTAINER)))
+ else if ( aProp[i].Name == ITEM_DESCRIPTOR_CONTAINER )
aProp[i].Value >>= aMigrationItem.m_xPopupMenu;
}
@@ -1209,11 +1209,11 @@ void MigrationImpl::mergeOldToNewVersion(const uno::Reference< ui::XUIConfigurat
for (sal_Int32 j=0; j<aPropSeq.getLength(); ++j)
{
::rtl::OUString sPropName = aPropSeq[j].Name;
- if (sPropName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_COMMANDURL)))
+ if ( sPropName == ITEM_DESCRIPTOR_COMMANDURL )
aPropSeq[j].Value >>= sCommandURL;
- else if (sPropName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_LABEL)))
+ else if ( sPropName == ITEM_DESCRIPTOR_LABEL )
aPropSeq[j].Value >>= sLabel;
- else if (sPropName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_CONTAINER)))
+ else if ( sPropName == ITEM_DESCRIPTOR_CONTAINER )
aPropSeq[j].Value >>= xChild;
}
@@ -1250,7 +1250,7 @@ void MigrationImpl::mergeOldToNewVersion(const uno::Reference< ui::XUIConfigurat
xTemp->getByIndex(i) >>= aTempPropSeq;
for (sal_Int32 j=0; j<aTempPropSeq.getLength(); ++j)
{
- if (aTempPropSeq[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_COMMANDURL)))
+ if ( aTempPropSeq[j].Name == ITEM_DESCRIPTOR_COMMANDURL )
{
aTempPropSeq[j].Value >>= sCmd;
break;
diff --git a/desktop/source/migration/services/jvmfwk.cxx b/desktop/source/migration/services/jvmfwk.cxx
index b2946aff500e..e997736417c3 100644
--- a/desktop/source/migration/services/jvmfwk.cxx
+++ b/desktop/source/migration/services/jvmfwk.cxx
@@ -276,7 +276,7 @@ void SAL_CALL JavaMigration::initialize( const css::uno::Sequence< css::uno::Any
for(;pIter != pEnd;++pIter)
{
*pIter >>= aValue;
- if (aValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("OldConfiguration")))
+ if ( aValue.Name == "OldConfiguration" )
{
sal_Bool bSuccess = aValue.Value >>= aOldConfigValues;
OSL_ENSURE(bSuccess == sal_True, "[Service implementation " IMPL_NAME
@@ -287,7 +287,7 @@ void SAL_CALL JavaMigration::initialize( const css::uno::Sequence< css::uno::Any
const css::beans::NamedValue* pEnd2 = pIter2 + aOldConfigValues.getLength();
for(;pIter2 != pEnd2;++pIter2)
{
- if ( pIter2->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("org.openoffice.Office.Java")) )
+ if ( pIter2->Name == "org.openoffice.Office.Java" )
{
pIter2->Value >>= m_xLayer;
break;
@@ -295,7 +295,7 @@ void SAL_CALL JavaMigration::initialize( const css::uno::Sequence< css::uno::Any
}
}
}
- else if (aValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("UserData")))
+ else if ( aValue.Name == "UserData" )
{
if ( !(aValue.Value >>= m_sUserDir) )
{
@@ -418,9 +418,9 @@ void SAL_CALL JavaMigration::overrideProperty(
MalformedDataException,
WrappedTargetException )
{
- if (aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Enable")))
+ if ( aName == "Enable" )
m_aStack.push(TElementStack::value_type(aName,ENABLE_JAVA));
- else if (aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("UserClassPath")))
+ else if ( aName == "UserClassPath" )
m_aStack.push(TElementStack::value_type(aName, USER_CLASS_PATH));
}
// -----------------------------------------------------------------------------
diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index 7b48403cdb12..bc2fda67839c 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
@@ -483,7 +483,7 @@ extern "C" DESKTOP_DLLPUBLIC int unopkg_main()
xExtensionManager->reinstallDeployedExtensions(
repository, Reference<task::XAbortChannel>(), xCmdEnv);
}
- else if (subCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("list") ))
+ else if ( subCommand == "list" )
{
::std::vector<Reference<deployment::XPackage> > vecExtUnaccepted;
::comphelper::sequenceToContainer(vecExtUnaccepted,
@@ -572,7 +572,7 @@ extern "C" DESKTOP_DLLPUBLIC int unopkg_main()
printf_packages(allExtensions, vecUnaccepted, xCmdEnv );
}
- else if (subCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("validate") ))
+ else if ( subCommand == "validate" )
{
::std::vector<Reference<deployment::XPackage> > vecExtUnaccepted;
::comphelper::sequenceToContainer(
@@ -610,7 +610,7 @@ extern "C" DESKTOP_DLLPUBLIC int unopkg_main()
extension, Reference<task::XAbortChannel>(), xCmdEnv);
}
}
- else if (subCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("gui") ))
+ else if ( subCommand == "gui" )
{
Reference<ui::dialogs::XAsynchronousExecutableDialog> xDialog(
deployment::ui::PackageManagerDialog::createAndInstall(
@@ -626,7 +626,7 @@ extern "C" DESKTOP_DLLPUBLIC int unopkg_main()
xDialog->startExecuteModal(xListener);
dialogEnded.wait();
}
- else if (subCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("sync")))
+ else if ( subCommand == "sync" )
{
if (! dp_misc::office_is_running())
{