diff options
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/app/appinit.cxx | 3 | ||||
-rw-r--r-- | desktop/source/app/cmdlineargs.cxx | 16 | ||||
-rw-r--r-- | desktop/source/deployment/manager/dp_manager.cxx | 9 | ||||
-rw-r--r-- | desktop/source/deployment/misc/dp_dependencies.cxx | 30 | ||||
-rw-r--r-- | desktop/source/deployment/misc/dp_ucb.cxx | 4 | ||||
-rw-r--r-- | desktop/source/deployment/registry/component/dp_component.cxx | 28 | ||||
-rw-r--r-- | desktop/source/deployment/registry/dp_registry.cxx | 5 | ||||
-rw-r--r-- | desktop/source/deployment/registry/package/dp_package.cxx | 10 | ||||
-rw-r--r-- | desktop/source/pkgchk/unopkg/unopkg_app.cxx | 13 | ||||
-rw-r--r-- | desktop/source/splash/splash.cxx | 4 |
10 files changed, 33 insertions, 89 deletions
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx index 92da668d101a..4c27e53ca983 100644 --- a/desktop/source/app/appinit.cxx +++ b/desktop/source/app/appinit.cxx @@ -136,8 +136,7 @@ static bool configureUcb(bool bServer, rtl::OUString const & rPortalConnect) "system.desktop-environment" ) ) ); rtl::OUString aDesktopEnvironment; - if ((aValue >>= aDesktopEnvironment) - && aDesktopEnvironment.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("GNOME"))) + if ( (aValue >>= aDesktopEnvironment) && aDesktopEnvironment == "GNOME" ) { Reference<XContentProviderManager> xCPM = cb->getContentProviderManagerInterface(); diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx index e62315b08780..60d40af145c1 100644 --- a/desktop/source/app/cmdlineargs.cxx +++ b/desktop/source/app/cmdlineargs.cxx @@ -596,56 +596,56 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString& { AddStringListParam_Impl( CMD_STRINGPARAM_LANGUAGE, oArg.copy(RTL_CONSTASCII_LENGTH("language=")) ); } - else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "writer" )) == sal_True ) + else if ( oArg == "writer" ) { sal_Bool bAlreadySet = CheckGroupMembers( CMD_GRPID_MODULE, CMD_BOOLPARAM_WRITER ); if ( !bAlreadySet ) SetBoolParam_Impl( CMD_BOOLPARAM_WRITER, sal_True ); m_bDocumentArgs = true; } - else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "calc" )) == sal_True ) + else if ( oArg == "calc" ) { sal_Bool bAlreadySet = CheckGroupMembers( CMD_GRPID_MODULE, CMD_BOOLPARAM_CALC ); if ( !bAlreadySet ) SetBoolParam_Impl( CMD_BOOLPARAM_CALC, sal_True ); m_bDocumentArgs = true; } - else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "draw" )) == sal_True ) + else if ( oArg == "draw" ) { sal_Bool bAlreadySet = CheckGroupMembers( CMD_GRPID_MODULE, CMD_BOOLPARAM_DRAW ); if ( !bAlreadySet ) SetBoolParam_Impl( CMD_BOOLPARAM_DRAW, sal_True ); m_bDocumentArgs = true; } - else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "impress" )) == sal_True ) + else if ( oArg == "impress" ) { sal_Bool bAlreadySet = CheckGroupMembers( CMD_GRPID_MODULE, CMD_BOOLPARAM_IMPRESS ); if ( !bAlreadySet ) SetBoolParam_Impl( CMD_BOOLPARAM_IMPRESS, sal_True ); m_bDocumentArgs = true; } - else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "base" )) == sal_True ) + else if ( oArg == "base" ) { sal_Bool bAlreadySet = CheckGroupMembers( CMD_GRPID_MODULE, CMD_BOOLPARAM_BASE ); if ( !bAlreadySet ) SetBoolParam_Impl( CMD_BOOLPARAM_BASE, sal_True ); m_bDocumentArgs = true; } - else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "global" )) == sal_True ) + else if ( oArg == "global" ) { sal_Bool bAlreadySet = CheckGroupMembers( CMD_GRPID_MODULE, CMD_BOOLPARAM_GLOBAL ); if ( !bAlreadySet ) SetBoolParam_Impl( CMD_BOOLPARAM_GLOBAL, sal_True ); m_bDocumentArgs = true; } - else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "math" )) == sal_True ) + else if ( oArg == "math" ) { sal_Bool bAlreadySet = CheckGroupMembers( CMD_GRPID_MODULE, CMD_BOOLPARAM_MATH ); if ( !bAlreadySet ) SetBoolParam_Impl( CMD_BOOLPARAM_MATH, sal_True ); m_bDocumentArgs = true; } - else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "web" )) == sal_True ) + else if ( oArg == "web" ) { sal_Bool bAlreadySet = CheckGroupMembers( CMD_GRPID_MODULE, CMD_BOOLPARAM_WEB ); if ( !bAlreadySet ) diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx index 572b91e884cf..ec2c40a61860 100644 --- a/desktop/source/deployment/manager/dp_manager.cxx +++ b/desktop/source/deployment/manager/dp_manager.cxx @@ -139,14 +139,9 @@ void PackageManagerImpl::initActivationLayer( Reference<sdbc::XRow> xRow( xResultSet, UNO_QUERY_THROW ); OUString title( xRow->getString( 1 /* Title */ ) ); // xxx todo: remove workaround for tdoc - if (title.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( - "this_is_a_dummy_stream_just_there_" - "as_a_workaround_for_a_" - "temporary_limitation_of_the_" - "storage_api_implementation") )) + if ( title == "this_is_a_dummy_stream_just_there_as_a_workaround_for_a_temporary_limitation_of_the_storage_api_implementation" ) continue; - if (title.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( - "META-INF") ) ) + if ( title == "META-INF" ) continue; ::ucbhelper::Content sourceContent( diff --git a/desktop/source/deployment/misc/dp_dependencies.cxx b/desktop/source/deployment/misc/dp_dependencies.cxx index 710eea88adf9..e7de531dd995 100644 --- a/desktop/source/deployment/misc/dp_dependencies.cxx +++ b/desktop/source/deployment/misc/dp_dependencies.cxx @@ -118,28 +118,19 @@ check(dp_misc::DescriptionInfoset const & infoset) { css::uno::Reference< css::xml::dom::XElement > e( deps->item(i), css::uno::UNO_QUERY_THROW); bool sat = false; - if (e->getNamespaceURI().equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM(namespaceOpenOfficeOrg)) - && e->getTagName().equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM(minimalVersionOpenOfficeOrg))) + if ( e->getNamespaceURI() == namespaceOpenOfficeOrg && e->getTagName() == minimalVersionOpenOfficeOrg ) { sat = satisfiesMinimalVersion( getReferenceOpenOfficeOrgMajorMinor(), e->getAttribute( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value")))); - } else if (e->getNamespaceURI().equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM(namespaceOpenOfficeOrg)) - && e->getTagName().equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM(maximalVersionOpenOfficeOrg))) + } else if ( e->getNamespaceURI() == namespaceOpenOfficeOrg && e->getTagName() == maximalVersionOpenOfficeOrg ) { sat = satisfiesMaximalVersion( getReferenceOpenOfficeOrgMajorMinor(), e->getAttribute( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value")))); - } else if (e->getNamespaceURI().equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM(namespaceLibreOffice)) - && e->getTagName().equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM(minimalVersionLibreOffice))) + } else if (e->getNamespaceURI() == namespaceLibreOffice && e->getTagName() == minimalVersionLibreOffice ) { sat = satisfiesMinimalVersion( getLibreOfficeMajorMinorMicro(), @@ -173,30 +164,21 @@ rtl::OUString getErrorText( css::uno::Reference< css::xml::dom::XElement > const & dependency) { OSL_ASSERT(dependency.is()); - if (dependency->getNamespaceURI().equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM(namespaceOpenOfficeOrg)) - && dependency->getTagName().equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM(minimalVersionOpenOfficeOrg))) + if ( dependency->getNamespaceURI() == namespaceOpenOfficeOrg && dependency->getTagName() == minimalVersionOpenOfficeOrg ) { return produceErrorText( ResId::toString( dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_OOO_MIN)), dependency->getAttribute( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value")))); - } else if (dependency->getNamespaceURI().equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM(namespaceOpenOfficeOrg)) - && dependency->getTagName().equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM(maximalVersionOpenOfficeOrg))) + } else if (dependency->getNamespaceURI() == namespaceOpenOfficeOrg && dependency->getTagName() == maximalVersionOpenOfficeOrg ) { return produceErrorText( ResId::toString( dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_OOO_MAX)), dependency->getAttribute( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value")))); - } else if (dependency->getNamespaceURI().equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM(namespaceLibreOffice)) - && dependency->getTagName().equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM(minimalVersionLibreOffice))) + } else if (dependency->getNamespaceURI() == namespaceLibreOffice && dependency->getTagName() == minimalVersionLibreOffice ) { return produceErrorText( ResId::toString( diff --git a/desktop/source/deployment/misc/dp_ucb.cxx b/desktop/source/deployment/misc/dp_ucb.cxx index 37957e560233..9ec87c0f123f 100644 --- a/desktop/source/deployment/misc/dp_ucb.cxx +++ b/desktop/source/deployment/misc/dp_ucb.cxx @@ -133,9 +133,7 @@ bool create_folder( { // make sure the only required bootstrap property is "Title": Sequence<beans::Property> const & rProps = info.Properties; - if (rProps.getLength() != 1 || - !rProps[ 0 ].Name.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("Title") )) + if ( rProps.getLength() != 1 || rProps[ 0 ].Name != "Title" ) continue; try { diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx index b28d0a0b5a5d..1d4b86ad9f87 100644 --- a/desktop/source/deployment/registry/component/dp_component.cxx +++ b/desktop/source/deployment/registry/component/dp_component.cxx @@ -407,8 +407,7 @@ BackendImpl::ComponentPackageImpl::getRDB() const that->initServiceRdbFiles(); } } - if (m_loader.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("com.sun.star.loader.SharedLibrary") )) + if ( m_loader == "com.sun.star.loader.SharedLibrary" ) return that->m_xNativeRDB; else return that->m_xCommonRDB; @@ -420,8 +419,7 @@ BackendImpl::ComponentPackageImpl::getRDB_RO() const { BackendImpl * that = getMyBackend(); - if (m_loader.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("com.sun.star.loader.SharedLibrary") )) + if ( m_loader == "com.sun.star.loader.SharedLibrary" ) return that->m_xNativeRDB_RO; else return that->m_xCommonRDB_RO; @@ -498,9 +496,7 @@ void BackendImpl::initServiceRdbFiles() &oldRDB, makeURL( getCachePath(), m_commonRDB_RO), xCmdEnv, false /* no throw */ ); } - m_commonRDB = m_commonRDB_RO.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("common.rdb") ) - ? OUSTR("common_.rdb") : OUSTR("common.rdb"); + m_commonRDB = m_commonRDB_RO == "common.rdb" ? OUSTR("common_.rdb") : OUSTR("common.rdb"); if (oldRDB.get().is()) { if (! cacheDir.transferContent( @@ -729,13 +725,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_( Reference<XCommandEnvironment> const & xCmdEnv ) { OUString mediaType(mediaType_); - if (mediaType.isEmpty() || - mediaType.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM( - "application/vnd.sun.star.uno-component") ) || - mediaType.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM( - "application/vnd.sun.star.uno-typelibrary") )) + if ( mediaType.isEmpty() || mediaType == "application/vnd.sun.star.uno-component" || mediaType == "application/vnd.sun.star.uno-typelibrary" ) { // detect exact media-type: ::ucbhelper::Content ucbContent; @@ -961,11 +951,7 @@ void BackendImpl::unorc_verify_init( RTL_CONSTASCII_LENGTH("?$ORIGIN/")); state = 2; } - else if (state <= 2 && - token.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM( - "${$ORIGIN/${_OS}_${_ARCH}rc:" - "UNO_SERVICES}"))) + else if ( state <= 2 && token == "${$ORIGIN/${_OS}_${_ARCH}rc:UNO_SERVICES}" ) { state = 3; } @@ -1605,9 +1591,7 @@ void BackendImpl::ComponentPackageImpl::processPackage_( m_loader, url, getRDB()); // Only write to unorc after successful registration; it may fail if // there is no suitable java - if (m_loader.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("com.sun.star.loader.Java2")) && - !jarManifestHeaderPresent(url, OUSTR("UNO-Type-Path"), xCmdEnv)) + if (m_loader == "com.sun.star.loader.Java2" && !jarManifestHeaderPresent(url, OUSTR("UNO-Type-Path"), xCmdEnv)) { that->addToUnoRc(RCITEM_JAR_TYPELIB, url, xCmdEnv); data.javaTypeLibrary = true; diff --git a/desktop/source/deployment/registry/dp_registry.cxx b/desktop/source/deployment/registry/dp_registry.cxx index 528c413806db..587946a69489 100644 --- a/desktop/source/deployment/registry/dp_registry.cxx +++ b/desktop/source/deployment/registry/dp_registry.cxx @@ -235,10 +235,7 @@ void PackageRegistryImpl::insertBackend( //The package backend shall also be called to determine the mediatype //(XPackageRegistry.bindPackage) when the URL points to a directory. const bool bExtension = mediaType.equals(OUSTR("application/vnd.sun.star.package-bundle")); - if (fileFilter.isEmpty() || - fileFilter.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("*.*") ) || - fileFilter.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("*") ) || - bExtension) + if (fileFilter.isEmpty() || fileFilter == "*.*" || fileFilter == "*" || bExtension) { m_ambiguousBackends.insert( xBackend ); } diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index 23f583e16823..81b88058b609 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -1458,17 +1458,13 @@ void BackendImpl::PackageImpl::scanBundle( { if (!(fullPath.isEmpty() || mediaType.isEmpty())) break; - if (attribs[i].Name.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("FullPath") )) + if ( attribs[i].Name == "FullPath" ) attribs[i].Value >>= fullPath; - else if (attribs[i].Name.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("MediaType") )) + else if ( attribs[i].Name == "MediaType" ) attribs[i].Value >>= mediaType; } - if (fullPath.isEmpty() || mediaType.isEmpty() || - mediaType.equalsAsciiL( // opt: exclude common text/xml - RTL_CONSTASCII_STRINGPARAM("text/xml") )) + if ( fullPath.isEmpty() || mediaType.isEmpty() || mediaType == "text/xml" )// opt: exclude common text/xml continue; String type, subType; diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx index bc2fda67839c..2bd4d1b99214 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx @@ -284,10 +284,8 @@ extern "C" DESKTOP_DLLPUBLIC int unopkg_main() osl_getCommandArg( nPos, &subCommand.pData ); ++nPos; subCommand = subCommand.trim(); - subcmd_add = subCommand.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("add") ); - subcmd_gui = subCommand.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("gui") ); + subcmd_add = subCommand == "add"; + subcmd_gui = subCommand == "gui"; // sun-command options and packages: while (nPos < nCount) @@ -345,8 +343,7 @@ extern "C" DESKTOP_DLLPUBLIC int unopkg_main() } else { - if (repository.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("shared") )) { + if ( repository == "shared" ) { option_shared = true; } else if (option_shared) { @@ -437,9 +434,7 @@ extern "C" DESKTOP_DLLPUBLIC int unopkg_main() && ! dp_misc::office_is_running()) dp_misc::syncRepositories(xCmdEnv); - if (subcmd_add || - subCommand.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("remove") )) + if ( subcmd_add || subCommand == "remove" ) { for ( ::std::size_t pos = 0; pos < cmdPackages.size(); ++pos ) { diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx index eaa6d07f66c1..0ef211a3cbeb 100644 --- a/desktop/source/splash/splash.cxx +++ b/desktop/source/splash/splash.cxx @@ -359,9 +359,7 @@ OUString implReadBootstrapKey( const OUString& _rKey ) void SplashScreen::loadConfig() { - _bShowLogo = !implReadBootstrapKey( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Logo"))). - equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("0")); + _bShowLogo = implReadBootstrapKey( "Logo" ) != "0"; OUString sProgressFrameColor = implReadBootstrapKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "ProgressFrameColor" ) ) ); |