diff options
author | Chr. Rossmanith <ChrRossmanith@gmx.de> | 2012-12-30 11:10:48 +0100 |
---|---|---|
committer | Chr. Rossmanith <ChrRossmanith@gmx.de> | 2012-12-30 11:10:51 +0100 |
commit | 55bdbf3dac0bbcc0af4f7662e0cfaf99f668d9e9 (patch) | |
tree | 843a5f8538a273882e0ea74814b6bece2b53fd58 /desktop/source | |
parent | RTL_CONSTASCII_(U)STRINGPARAM removed in desktop/source/deployment (diff) | |
download | core-55bdbf3dac0bbcc0af4f7662e0cfaf99f668d9e9.tar.gz core-55bdbf3dac0bbcc0af4f7662e0cfaf99f668d9e9.zip |
RTL_CONSTASCII_(U)STRINGPARAM removed in desktop
subdirs registry and deployment
removed OUSTR() as well and replaced .equals() with ==
Change-Id: Ib4ca45ba7fdff2179d744dac5a034dc35558d92b
Diffstat (limited to 'desktop/source')
17 files changed, 371 insertions, 493 deletions
diff --git a/desktop/source/deployment/registry/component/dp_compbackenddb.cxx b/desktop/source/deployment/registry/component/dp_compbackenddb.cxx index 3e57d15fb2a5..fb871f629139 100644 --- a/desktop/source/deployment/registry/component/dp_compbackenddb.cxx +++ b/desktop/source/deployment/registry/component/dp_compbackenddb.cxx @@ -50,22 +50,22 @@ ComponentBackendDb::ComponentBackendDb( OUString ComponentBackendDb::getDbNSName() { - return OUSTR(EXTENSION_REG_NS); + return OUString(EXTENSION_REG_NS); } OUString ComponentBackendDb::getNSPrefix() { - return OUSTR(NS_PREFIX); + return OUString(NS_PREFIX); } OUString ComponentBackendDb::getRootElementName() { - return OUSTR(ROOT_ELEMENT_NAME); + return OUString(ROOT_ELEMENT_NAME); } OUString ComponentBackendDb::getKeyElementName() { - return OUSTR(KEY_ELEMENT_NAME); + return OUString(KEY_ELEMENT_NAME); } void ComponentBackendDb::addEntry(::rtl::OUString const & url, Data const & data) @@ -74,22 +74,22 @@ void ComponentBackendDb::addEntry(::rtl::OUString const & url, Data const & data if (!activateEntry(url)) { Reference<css::xml::dom::XNode> componentNode = writeKeyElement(url); - writeSimpleElement(OUSTR("java-type-library"), + writeSimpleElement("java-type-library", OUString::valueOf((sal_Bool) data.javaTypeLibrary), componentNode); writeSimpleList( data.implementationNames, - OUSTR("implementation-names"), - OUSTR("name"), + "implementation-names", + "name", componentNode); writeVectorOfPair( data.singletons, - OUSTR("singletons"), - OUSTR("item"), - OUSTR("key"), - OUSTR("value"), + "singletons", + "item", + "key", + "value", componentNode); save(); @@ -99,7 +99,7 @@ void ComponentBackendDb::addEntry(::rtl::OUString const & url, Data const & data { Any exc( ::cppu::getCaughtException() ); throw css::deployment::DeploymentException( - OUSTR("Extension Manager: failed to write data entry in backend db: ") + + "Extension Manager: failed to write data entry in backend db: " + m_urlDb, 0, exc); } } @@ -112,23 +112,15 @@ ComponentBackendDb::Data ComponentBackendDb::getEntry(::rtl::OUString const & ur Reference<css::xml::dom::XNode> aNode = getKeyElement(url); if (aNode.is()) { - bool bJava = readSimpleElement(OUSTR("java-type-library"), aNode) - .equals(OUSTR("true")) ? true : false; + bool bJava = (readSimpleElement("java-type-library", aNode) == + "true") ? true : false; retData.javaTypeLibrary = bJava; retData.implementationNames = - readList( - aNode, - OUSTR("implementation-names"), - OUSTR("name")); + readList( aNode, "implementation-names", "name"); retData.singletons = - readVectorOfPair( - aNode, - OUSTR("singletons"), - OUSTR("item"), - OUSTR("key"), - OUSTR("value")); + readVectorOfPair( aNode, "singletons", "item", "key", "value"); } return retData; } @@ -136,7 +128,7 @@ ComponentBackendDb::Data ComponentBackendDb::getEntry(::rtl::OUString const & ur { Any exc( ::cppu::getCaughtException() ); throw css::deployment::DeploymentException( - OUSTR("Extension Manager: failed to read data entry in backend db: ") + + "Extension Manager: failed to read data entry in backend db: " + m_urlDb, 0, exc); } } diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx index e974034d744d..42a09cbc7fe4 100644 --- a/desktop/source/deployment/registry/component/dp_component.cxx +++ b/desktop/source/deployment/registry/component/dp_component.cxx @@ -77,7 +77,7 @@ typedef ::std::vector< ::std::pair<OUString, OUString> > t_stringpairvec; { OUString arg; osl_getCommandArg(i, &arg.pData); - if (arg.matchAsciiL("-env:", 5)) + if (arg.match("-env:")) ret.push_back(arg); } return ret; @@ -88,12 +88,12 @@ bool jarManifestHeaderPresent( Reference<XCommandEnvironment> const & xCmdEnv ) { ::rtl::OUStringBuffer buf; - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.zip://") ); + buf.appendAscii( "vnd.sun.star.zip://" ); buf.append( ::rtl::Uri::encode( url, rtl_UriCharClassRegName, rtl_UriEncodeIgnoreEscapes, RTL_TEXTENCODING_UTF8 ) ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("/META-INF/MANIFEST.MF") ); + buf.appendAscii( "/META-INF/MANIFEST.MF" ); ::ucbhelper::Content manifestContent; OUString line; return @@ -385,7 +385,7 @@ BackendImpl * BackendImpl::ComponentPackageImpl::getMyBackend() const check(); //We should never get here... throw RuntimeException( - OUSTR("Failed to get the BackendImpl"), + "Failed to get the BackendImpl", static_cast<OWeakObject*>(const_cast<ComponentPackageImpl *>(this))); } return pBackend; @@ -428,7 +428,7 @@ void BackendImpl::disposing() catch (const Exception &) { Any exc( ::cppu::getCaughtException() ); throw lang::WrappedTargetRuntimeException( - OUSTR("caught unexpected exception while disposing..."), + "caught unexpected exception while disposing...", static_cast<OWeakObject *>(this), exc ); } } @@ -447,7 +447,7 @@ void BackendImpl::initServiceRdbFiles() &oldRDB, makeURL( getCachePath(), m_commonRDB_orig), xCmdEnv, false /* no throw */ ); } - m_commonRDB = m_commonRDB_orig == "common.rdb" ? OUSTR("common_.rdb") : OUSTR("common.rdb"); + m_commonRDB = m_commonRDB_orig == "common.rdb" ? OUString("common_.rdb") : OUString("common.rdb"); if (oldRDB.get().is()) { if (! cacheDir.transferContent( @@ -455,8 +455,7 @@ void BackendImpl::initServiceRdbFiles() m_commonRDB, NameClash::OVERWRITE )) { - throw RuntimeException( - OUSTR("UCB transferContent() failed!"), 0 ); + throw RuntimeException( "UCB transferContent() failed!", 0 ); } oldRDB = ::ucbhelper::Content(); } @@ -467,16 +466,15 @@ void BackendImpl::initServiceRdbFiles() &oldRDB, makeURL(getCachePath(), m_nativeRDB_orig), xCmdEnv, false /* no throw */ ); } - const OUString plt_rdb( getPlatformString() + OUSTR(".rdb") ); - const OUString plt_rdb_( getPlatformString() + OUSTR("_.rdb") ); - m_nativeRDB = m_nativeRDB_orig.equals( plt_rdb ) ? plt_rdb_ : plt_rdb; + const OUString plt_rdb( getPlatformString() + ".rdb" ); + const OUString plt_rdb_( getPlatformString() + "_.rdb" ); + m_nativeRDB = (m_nativeRDB_orig == plt_rdb ) ? plt_rdb_ : plt_rdb; if (oldRDB.get().is()) { if (! cacheDir.transferContent( oldRDB, ::ucbhelper::InsertOperation_COPY, m_nativeRDB, NameClash::OVERWRITE )) - throw RuntimeException( - OUSTR("UCB transferContent() failed!"), 0 ); + throw RuntimeException( "UCB transferContent() failed!", 0 ); } // UNO is bootstrapped, flush for next process start: @@ -489,7 +487,7 @@ void BackendImpl::initServiceRdbFiles() m_xCommonRDB.set( m_xComponentContext->getServiceManager() ->createInstanceWithContext( - OUSTR("com.sun.star.registry.SimpleRegistry"), + "com.sun.star.registry.SimpleRegistry", m_xComponentContext ), UNO_QUERY_THROW ); m_xCommonRDB->open( makeURL( expandUnoRcUrl(getCachePath()), m_commonRDB ), @@ -499,7 +497,7 @@ void BackendImpl::initServiceRdbFiles() m_xNativeRDB.set( m_xComponentContext->getServiceManager() ->createInstanceWithContext( - OUSTR("com.sun.star.registry.SimpleRegistry"), + "com.sun.star.registry.SimpleRegistry", m_xComponentContext ), UNO_QUERY_THROW ); m_xNativeRDB->open( makeURL( expandUnoRcUrl(getCachePath()), m_nativeRDB ), @@ -515,46 +513,35 @@ BackendImpl::BackendImpl( m_unorc_modified( false ), bSwitchedRdbFiles(false), m_xDynComponentTypeInfo( new Package::TypeInfo( - OUSTR("application/" - "vnd.sun.star.uno-component;" - "type=native;platform=") + + "application/vnd.sun.star.uno-component;type=native;platform=" + getPlatformString(), - OUSTR("*" SAL_DLLEXTENSION), + OUString("*") + OUString(SAL_DLLEXTENSION), getResourceString(RID_STR_DYN_COMPONENT), RID_IMG_COMPONENT) ), m_xJavaComponentTypeInfo( new Package::TypeInfo( - OUSTR("application/" - "vnd.sun.star.uno-component;" - "type=Java"), - OUSTR("*.jar"), + "application/vnd.sun.star.uno-component;type=Java", + "*.jar", getResourceString(RID_STR_JAVA_COMPONENT), RID_IMG_JAVA_COMPONENT) ), m_xPythonComponentTypeInfo( new Package::TypeInfo( - OUSTR("application/" - "vnd.sun.star.uno-component;" - "type=Python"), - OUSTR("*.py"), + "application/vnd.sun.star.uno-component;type=Python", + "*.py", getResourceString( RID_STR_PYTHON_COMPONENT), RID_IMG_COMPONENT ) ), m_xComponentsTypeInfo( new Package::TypeInfo( - OUSTR("application/" - "vnd.sun.star.uno-components"), - OUSTR("*.components"), + "application/vnd.sun.star.uno-components", + "*.components", getResourceString(RID_STR_COMPONENTS), RID_IMG_COMPONENT ) ), m_xRDBTypelibTypeInfo( new Package::TypeInfo( - OUSTR("application/" - "vnd.sun.star.uno-typelibrary;" - "type=RDB"), - OUSTR("*.rdb"), + "application/vnd.sun.star.uno-typelibrary;type=RDB", + "*.rdb", getResourceString(RID_STR_RDB_TYPELIB), RID_IMG_TYPELIB ) ), m_xJavaTypelibTypeInfo( new Package::TypeInfo( - OUSTR("application/" - "vnd.sun.star.uno-typelibrary;" - "type=Java"), - OUSTR("*.jar"), + "application/vnd.sun.star.uno-typelibrary;type=Java", + "*.jar", getResourceString(RID_STR_JAVA_TYPELIB), RID_IMG_JAVA_TYPELIB ) ), m_typeInfos( 6 ) @@ -574,13 +561,13 @@ BackendImpl::BackendImpl( // common rdb for java, native rdb for shared lib components m_xCommonRDB.set( xComponentContext->getServiceManager()->createInstanceWithContext( - OUSTR("com.sun.star.registry.SimpleRegistry"), + "com.sun.star.registry.SimpleRegistry", xComponentContext ), UNO_QUERY_THROW ); m_xCommonRDB->open( OUString() /* in-mem */, false /* ! read-only */, true /* create */ ); m_xNativeRDB.set( xComponentContext->getServiceManager()->createInstanceWithContext( - OUSTR("com.sun.star.registry.SimpleRegistry"), + "com.sun.star.registry.SimpleRegistry", xComponentContext ), UNO_QUERY_THROW ); m_xNativeRDB->open( OUString() /* in-mem */, false /* ! read-only */, true /* create */ ); @@ -588,7 +575,7 @@ BackendImpl::BackendImpl( else { unorc_verify_init( xCmdEnv ); - OUString dbFile = makeURL(getCachePath(), OUSTR("backenddb.xml")); + OUString dbFile = makeURL(getCachePath(), "backenddb.xml"); m_backendDb.reset( new ComponentBackendDb(getComponentContext(), dbFile)); } @@ -645,32 +632,23 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_( ::ucbhelper::Content ucbContent; if (create_ucb_content( &ucbContent, url, xCmdEnv )) { const OUString title( StrTitle::getTitle( ucbContent ) ); - if (title.endsWithIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM(SAL_DLLEXTENSION) )) + if (title.endsWithIgnoreAsciiCase(SAL_DLLEXTENSION)) { - mediaType = OUSTR("application/vnd.sun.star.uno-component;" - "type=native;platform=") + + mediaType = "application/vnd.sun.star.uno-component;type=native;platform=" + getPlatformString(); } - else if (title.endsWithIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM(".jar") )) + else if (title.endsWithIgnoreAsciiCase(".jar")) { if (jarManifestHeaderPresent( - url, OUSTR("RegistrationClassName"), xCmdEnv )) - mediaType = OUSTR( - "application/vnd.sun.star.uno-component;type=Java"); + url, "RegistrationClassName", xCmdEnv )) + mediaType = "application/vnd.sun.star.uno-component;type=Java"; if (mediaType.isEmpty()) - mediaType = OUSTR( - "application/vnd.sun.star.uno-typelibrary;type=Java"); + mediaType = "application/vnd.sun.star.uno-typelibrary;type=Java"; } - else if (title.endsWithIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM(".py") )) - mediaType = - OUSTR("application/vnd.sun.star.uno-component;type=Python"); - else if (title.endsWithIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM(".rdb") )) - mediaType = - OUSTR("application/vnd.sun.star.uno-typelibrary;type=RDB"); + else if (title.endsWithIgnoreAsciiCase(".py")) + mediaType = "application/vnd.sun.star.uno-component;type=Python"; + else if (title.endsWithIgnoreAsciiCase(".rdb")) + mediaType = "application/vnd.sun.star.uno-typelibrary;type=RDB"; } if (mediaType.isEmpty()) throw lang::IllegalArgumentException( @@ -695,8 +673,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_( { // xxx todo: probe and evaluate component xml description - INetContentTypeParameter const * param = params.find( - rtl::OString(RTL_CONSTASCII_STRINGPARAM("platform"))); + INetContentTypeParameter const * param = params.find(rtl::OString("platform")); bool bPlatformFits(param == 0); String aPlatform; if (!bPlatformFits) // platform is specified, we have to check @@ -707,7 +684,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_( // If the package is being removed, do not care whether // platform fits. We won't be using it anyway. if (bPlatformFits || bRemoved) { - param = params.find(rtl::OString(RTL_CONSTASCII_STRINGPARAM("type"))); + param = params.find(rtl::OString("type")); if (param != 0) { String const & value = param->m_sValue; @@ -715,7 +692,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_( if (bPlatformFits) return new BackendImpl::ComponentPackageImpl( this, url, name, m_xDynComponentTypeInfo, - OUSTR("com.sun.star.loader.SharedLibrary"), + "com.sun.star.loader.SharedLibrary", bRemoved, identifier); else return new BackendImpl::OtherPlatformPackageImpl( @@ -725,13 +702,13 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_( if (value.EqualsIgnoreCaseAscii("Java")) { return new BackendImpl::ComponentPackageImpl( this, url, name, m_xJavaComponentTypeInfo, - OUSTR("com.sun.star.loader.Java2"), + "com.sun.star.loader.Java2", bRemoved, identifier); } if (value.EqualsIgnoreCaseAscii("Python")) { return new BackendImpl::ComponentPackageImpl( this, url, name, m_xPythonComponentTypeInfo, - OUSTR("com.sun.star.loader.Python"), + "com.sun.star.loader.Python", bRemoved, identifier); } } @@ -739,8 +716,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_( } else if (subType.equalsIgnoreAsciiCaseAscii("vnd.sun.star.uno-components")) { - INetContentTypeParameter const * param = params.find( - rtl::OString(RTL_CONSTASCII_STRINGPARAM("platform"))); + INetContentTypeParameter const * param = params.find(rtl::OString("platform")); if (param == 0 || platform_fits( param->m_sValue )) { return new BackendImpl::ComponentsPackageImpl( this, url, name, m_xComponentsTypeInfo, bRemoved, @@ -749,8 +725,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_( } else if (subType.equalsIgnoreAsciiCaseAscii( "vnd.sun.star.uno-typelibrary")) { - INetContentTypeParameter const * param = params.find( - rtl::OString(RTL_CONSTASCII_STRINGPARAM("type"))); + INetContentTypeParameter const * param = params.find(rtl::OString("type")); if (param != 0) { String const & value = param->m_sValue; if (value.EqualsIgnoreCaseAscii("RDB")) @@ -788,11 +763,11 @@ void BackendImpl::unorc_verify_init( ::ucbhelper::Content ucb_content; if (create_ucb_content( &ucb_content, - makeURL( getCachePath(), OUSTR("unorc") ), + makeURL( getCachePath(), "unorc" ), xCmdEnv, false /* no throw */ )) { OUString line; - if (readLine( &line, OUSTR("UNO_JAVA_CLASSPATH="), ucb_content, + if (readLine( &line, "UNO_JAVA_CLASSPATH=", ucb_content, RTL_TEXTENCODING_UTF8 )) { sal_Int32 index = sizeof ("UNO_JAVA_CLASSPATH=") - 1; @@ -814,7 +789,7 @@ void BackendImpl::unorc_verify_init( } while (index >= 0); } - if (readLine( &line, OUSTR("UNO_TYPES="), ucb_content, + if (readLine( &line, "UNO_TYPES=", ucb_content, RTL_TEXTENCODING_UTF8 )) { sal_Int32 index = sizeof ("UNO_TYPES=") - 1; do { @@ -837,7 +812,7 @@ void BackendImpl::unorc_verify_init( } while (index >= 0); } - if (readLine( &line, OUSTR("UNO_SERVICES="), ucb_content, + if (readLine( &line, "UNO_SERVICES=", ucb_content, RTL_TEXTENCODING_UTF8 )) { // The UNO_SERVICES line always has the BNF form @@ -855,9 +830,7 @@ void BackendImpl::unorc_verify_init( rtl::OUString token(line.getToken(0, ' ', i)); if (!token.isEmpty()) { - if (state == 1 && - token.matchAsciiL( - RTL_CONSTASCII_STRINGPARAM("?$ORIGIN/"))) + if (state == 1 && token.match("?$ORIGIN/")) { m_commonRDB_orig = token.copy( RTL_CONSTASCII_LENGTH("?$ORIGIN/")); @@ -883,9 +856,9 @@ void BackendImpl::unorc_verify_init( // native rc: if (create_ucb_content( &ucb_content, - makeURL( getCachePath(), getPlatformString() + OUSTR("rc")), + makeURL( getCachePath(), getPlatformString() + "rc"), xCmdEnv, false /* no throw */ )) { - if (readLine( &line, OUSTR("UNO_SERVICES="), ucb_content, + if (readLine( &line, "UNO_SERVICES=", ucb_content, RTL_TEXTENCODING_UTF8 )) { m_nativeRDB_orig = line.copy( sizeof ("UNO_SERVICES=?$ORIGIN/") - 1 ); @@ -907,7 +880,7 @@ void BackendImpl::unorc_flush( Reference<XCommandEnvironment> const & xCmdEnv ) ::rtl::OStringBuffer buf; - buf.append(RTL_CONSTASCII_STRINGPARAM("ORIGIN=")); + buf.append("ORIGIN="); OUString sOrigin = dp_misc::makeRcTerm(m_cachePath); ::rtl::OString osOrigin = ::rtl::OUStringToOString(sOrigin, RTL_TEXTENCODING_UTF8); buf.append(osOrigin); @@ -917,7 +890,7 @@ void BackendImpl::unorc_flush( Reference<XCommandEnvironment> const & xCmdEnv ) { t_stringlist::const_iterator iPos( m_jar_typelibs.begin() ); t_stringlist::const_iterator const iEnd( m_jar_typelibs.end() ); - buf.append( RTL_CONSTASCII_STRINGPARAM("UNO_JAVA_CLASSPATH=") ); + buf.append( "UNO_JAVA_CLASSPATH=" ); while (iPos != iEnd) { // encoded ASCII file-urls: const ::rtl::OString item( @@ -933,7 +906,7 @@ void BackendImpl::unorc_flush( Reference<XCommandEnvironment> const & xCmdEnv ) { t_stringlist::const_iterator iPos( m_rdb_typelibs.begin() ); t_stringlist::const_iterator const iEnd( m_rdb_typelibs.end() ); - buf.append( RTL_CONSTASCII_STRINGPARAM("UNO_TYPES=") ); + buf.append( "UNO_TYPES=" ); while (iPos != iEnd) { buf.append( '?' ); // encoded ASCII file-urls: @@ -956,11 +929,11 @@ void BackendImpl::unorc_flush( Reference<XCommandEnvironment> const & xCmdEnv ) if (!sCommonRDB.isEmpty() || !sNativeRDB.isEmpty() || !m_components.empty()) { - buf.append( RTL_CONSTASCII_STRINGPARAM("UNO_SERVICES=") ); + buf.append( "UNO_SERVICES=" ); bool space = false; if (!sCommonRDB.isEmpty()) { - buf.append( RTL_CONSTASCII_STRINGPARAM("?$ORIGIN/") ); + buf.append( "?$ORIGIN/" ); buf.append( ::rtl::OUStringToOString( sCommonRDB, RTL_TEXTENCODING_ASCII_US ) ); space = true; @@ -971,16 +944,15 @@ void BackendImpl::unorc_flush( Reference<XCommandEnvironment> const & xCmdEnv ) { buf.append(' '); } - buf.append( RTL_CONSTASCII_STRINGPARAM( - "${$ORIGIN/${_OS}_${_ARCH}rc:UNO_SERVICES}") ); + buf.append( "${$ORIGIN/${_OS}_${_ARCH}rc:UNO_SERVICES}" ); space = true; // write native rc: ::rtl::OStringBuffer buf2; - buf2.append(RTL_CONSTASCII_STRINGPARAM("ORIGIN=")); + buf2.append("ORIGIN="); buf2.append(osOrigin); buf2.append(LF); - buf2.append( RTL_CONSTASCII_STRINGPARAM("UNO_SERVICES=?$ORIGIN/") ); + buf2.append( "UNO_SERVICES=?$ORIGIN/" ); buf2.append( ::rtl::OUStringToOString( sNativeRDB, RTL_TEXTENCODING_ASCII_US ) ); buf2.append(LF); @@ -991,7 +963,7 @@ void BackendImpl::unorc_flush( Reference<XCommandEnvironment> const & xCmdEnv ) reinterpret_cast<sal_Int8 const *>(buf2.getStr()), buf2.getLength() ) ) ); ::ucbhelper::Content ucb_content( - makeURL( getCachePath(), getPlatformString() + OUSTR("rc") ), + makeURL( getCachePath(), getPlatformString() + "rc" ), xCmdEnv, m_xComponentContext ); ucb_content.writeStream( xData, true /* replace existing */ ); } @@ -1016,7 +988,7 @@ void BackendImpl::unorc_flush( Reference<XCommandEnvironment> const & xCmdEnv ) reinterpret_cast<sal_Int8 const *>(buf.getStr()), buf.getLength() ) ) ); ::ucbhelper::Content ucb_content( - makeURL( getCachePath(), OUSTR("unorc") ), xCmdEnv, m_xComponentContext ); + makeURL( getCachePath(), "unorc" ), xCmdEnv, m_xComponentContext ); ucb_content.writeStream( xData, true /* replace existing */ ); m_unorc_modified = false; @@ -1070,8 +1042,7 @@ css::uno::Reference< css::uno::XComponentContext > BackendImpl::getRootContext() const { css::uno::Reference< css::uno::XComponentContext > rootContext( - getComponentContext()->getValueByName( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_root"))), + getComponentContext()->getValueByName("_root"), css::uno::UNO_QUERY); return rootContext.is() ? rootContext : getComponentContext(); } @@ -1114,17 +1085,15 @@ Reference<XComponentContext> raise_uno_process( ::rtl::OUString url( Reference<util::XMacroExpander>( - xContext->getValueByName( - OUSTR("/singletons/com.sun.star.util.theMacroExpander") ), + xContext->getValueByName( "/singletons/com.sun.star.util.theMacroExpander" ), UNO_QUERY_THROW )-> - expandMacros( OUSTR("$URE_BIN_DIR/uno") ) ); + expandMacros( "$URE_BIN_DIR/uno" ) ); ::rtl::OUStringBuffer buf; - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("uno:pipe,name=") ); + buf.appendAscii( "uno:pipe,name=" ); OUString pipeId( generateRandomPipeId() ); buf.append( pipeId ); - buf.appendAscii( - RTL_CONSTASCII_STRINGPARAM(";urp;uno.ComponentContext") ); + buf.appendAscii( ";urp;uno.ComponentContext" ); const OUString connectStr( buf.makeStringAndClear() ); // raise core UNO process to register/run a component, @@ -1133,13 +1102,13 @@ Reference<XComponentContext> raise_uno_process( ::std::vector<OUString> args; #if OSL_DEBUG_LEVEL == 0 - args.push_back( OUSTR("--quiet") ); + args.push_back( "--quiet" ); #endif - args.push_back( OUSTR("--singleaccept") ); - args.push_back( OUSTR("-u") ); + args.push_back( "--singleaccept" ); + args.push_back( "-u" ); args.push_back( connectStr ); // don't inherit from unorc: - args.push_back( OUSTR("-env:INIFILENAME=") ); + args.push_back( "-env:INIFILENAME=" ); //now add the bootstrap variables which were supplied on the command line ::std::vector<OUString> bootvars = getCmdBootstrapVariables(); @@ -1178,7 +1147,7 @@ void extractComponentData( context.is() && registry.is() && data != 0 && componentLoader.is()); rtl::OUString registryName(registry->getKeyName()); sal_Int32 prefix = registryName.getLength(); - if (!registryName.endsWithAsciiL(RTL_CONSTASCII_STRINGPARAM("/"))) { + if (!registryName.endsWith("/")) { prefix += RTL_CONSTASCII_LENGTH("/"); } css::uno::Sequence< css::uno::Reference< css::registry::XRegistryKey > > @@ -1189,8 +1158,7 @@ void extractComponentData( rtl::OUString name(keys[i]->getKeyName().copy(prefix)); data->implementationNames.push_back(name); css::uno::Reference< css::registry::XRegistryKey > singletons( - keys[i]->openKey( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UNO/SINGLETONS")))); + keys[i]->openKey("UNO/SINGLETONS")); if (singletons.is()) { sal_Int32 prefix2 = keys[i]->getKeyName().getLength() + RTL_CONSTASCII_LENGTH("/UNO/SINGLETONS/"); @@ -1224,9 +1192,7 @@ void BackendImpl::ComponentPackageImpl::getComponentInfo( if (! xLoader.is()) { throw css::deployment::DeploymentException( - (rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("cannot instantiate loader ")) + - m_loader), + "cannot instantiate loader " + m_loader, static_cast< OWeakObject * >(this), Any()); } @@ -1239,7 +1205,7 @@ void BackendImpl::ComponentPackageImpl::getComponentInfo( rtl::OUString url(getURL()); const Reference<registry::XSimpleRegistry> xMemReg( xContext->getServiceManager()->createInstanceWithContext( - OUSTR("com.sun.star.registry.SimpleRegistry"), xContext ), + "com.sun.star.registry.SimpleRegistry", xContext ), UNO_QUERY_THROW ); xMemReg->open( OUString() /* in mem */, false, true ); xLoader->writeRegistryInfo( xMemReg->getRootKey(), OUString(), url ); @@ -1275,25 +1241,15 @@ void BackendImpl::ComponentPackageImpl::componentLiveInsertion( for (t_stringpairvec::const_iterator i(data.singletons.begin()); i != data.singletons.end(); ++i) { - rtl::OUString name( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/singletons/")) + - i->first); + rtl::OUString name("/singletons/" + i->first); //TODO: Update should be atomic: try { - cont->removeByName( - name + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/arguments"))); + cont->removeByName( name + "/arguments"); } catch (const container::NoSuchElementException &) {} try { - cont->insertByName( - (name + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/service"))), - css::uno::Any(i->second)); + cont->insertByName( name + "/service", css::uno::Any(i->second)); } catch (const container::ElementExistException &) { - cont->replaceByName( - (name + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/service"))), - css::uno::Any(i->second)); + cont->replaceByName( name + "/service", css::uno::Any(i->second)); } try { cont->insertByName(name, css::uno::Any()); @@ -1330,22 +1286,16 @@ void BackendImpl::ComponentPackageImpl::componentLiveRemoval( for (t_stringpairvec::const_iterator i(data.singletons.begin()); i != data.singletons.end(); ++i) { - rtl::OUString name( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/singletons/")) + - i->first); + rtl::OUString name("/singletons/" + i->first); //TODO: Removal should be atomic: try { cont->removeByName(name); } catch (const container::NoSuchElementException &) {} try { - cont->removeByName( - name + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/service"))); + cont->removeByName( name + "/service" ); } catch (const container::NoSuchElementException &) {} try { - cont->removeByName( - name + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/arguments"))); + cont->removeByName( name + "/arguments" ); } catch (const container::NoSuchElementException &) {} } } @@ -1373,7 +1323,7 @@ BackendImpl::ComponentPackageImpl::isRegistered_( const Reference<registry::XRegistryKey> xRootKey( xRDB->getRootKey() ); const Reference<registry::XRegistryKey> xImplKey( - xRootKey->openKey( OUSTR("IMPLEMENTATIONS") ) ); + xRootKey->openKey( "IMPLEMENTATIONS" ) ); Sequence<OUString> implNames; if (xImplKey.is() && xImplKey->isValid()) implNames = xImplKey->getKeyNames(); @@ -1383,7 +1333,7 @@ BackendImpl::ComponentPackageImpl::isRegistered_( { checkAborted( abortChannel ); const OUString key( - pImplNames[ pos ] + OUSTR("/UNO/LOCATION") ); + pImplNames[ pos ] + "/UNO/LOCATION" ); const Reference<registry::XRegistryKey> xKey( xRootKey->openKey(key) ); if (xKey.is() && xKey->isValid()) @@ -1461,15 +1411,13 @@ void BackendImpl::ComponentPackageImpl::processPackage_( } css::uno::Reference< css::registry::XImplementationRegistration>( context->getServiceManager()->createInstanceWithContext( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.registry.ImplementationRegistration")), + "com.sun.star.registry.ImplementationRegistration", context), css::uno::UNO_QUERY_THROW)->registerImplementation( m_loader, url, getRDB()); // Only write to unorc after successful registration; it may fail if // there is no suitable java - if (m_loader == "com.sun.star.loader.Java2" && !jarManifestHeaderPresent(url, OUSTR("UNO-Type-Path"), xCmdEnv)) + if (m_loader == "com.sun.star.loader.Java2" && !jarManifestHeaderPresent(url, "UNO-Type-Path", xCmdEnv)) { that->addToUnoRc(RCITEM_JAR_TYPELIB, url, xCmdEnv); data.javaTypeLibrary = true; @@ -1495,9 +1443,7 @@ void BackendImpl::ComponentPackageImpl::processPackage_( } css::uno::Reference< css::registry::XImplementationRegistration >( context->getServiceManager()->createInstanceWithContext( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.registry.ImplementationRegistration")), + "com.sun.star.registry.ImplementationRegistration", context), css::uno::UNO_QUERY_THROW)->revokeImplementation(url, getRDB()); if (data.javaTypeLibrary) { @@ -1531,8 +1477,7 @@ BackendImpl * BackendImpl::TypelibraryPackageImpl::getMyBackend() const //May throw a DisposedException check(); //We should never get here... - throw RuntimeException( - OUSTR("Failed to get the BackendImpl"), + throw RuntimeException( "Failed to get the BackendImpl", static_cast<OWeakObject*>(const_cast<TypelibraryPackageImpl *>(this))); } return pBackend; @@ -1587,8 +1532,7 @@ void BackendImpl::TypelibraryPackageImpl::processPackage_( { const Reference<registry::XSimpleRegistry> xReg( xContext->getServiceManager() - ->createInstanceWithContext( - OUSTR("com.sun.star.registry.SimpleRegistry"), + ->createInstanceWithContext("com.sun.star.registry.SimpleRegistry", xContext ), UNO_QUERY_THROW ); xReg->open( expandUnoRcUrl(url), true /* read-only */, false /* ! create */ ); @@ -1596,8 +1540,7 @@ void BackendImpl::TypelibraryPackageImpl::processPackage_( Reference<container::XHierarchicalNameAccess> xTDprov( xContext->getServiceManager() ->createInstanceWithArgumentsAndContext( - OUSTR("com.sun.star.comp.stoc." - "RegistryTypeDescriptionProvider"), + "com.sun.star.comp.stoc.RegistryTypeDescriptionProvider", Sequence<Any>( &arg, 1 ), xContext ), UNO_QUERY ); OSL_ASSERT( xTDprov.is() ); if (xTDprov.is()) @@ -1607,9 +1550,7 @@ void BackendImpl::TypelibraryPackageImpl::processPackage_( } if (m_xTDprov.is()) { Reference<container::XSet> xSet( - xContext->getValueByName( - OUSTR("/singletons/com.sun.star." - "reflection.theTypeDescriptionManager") ), + xContext->getValueByName( "/singletons/com.sun.star.reflection.theTypeDescriptionManager" ), UNO_QUERY_THROW ); xSet->insert( Any(m_xTDprov) ); } @@ -1630,8 +1571,7 @@ void BackendImpl::TypelibraryPackageImpl::processPackage_( // remove live: const Reference<container::XSet> xSet( that->getComponentContext()->getValueByName( - OUSTR("/singletons/com.sun.star." - "reflection.theTypeDescriptionManager") ), + "/singletons/com.sun.star.reflection.theTypeDescriptionManager" ), UNO_QUERY_THROW ); xSet->remove( Any(m_xTDprov) ); @@ -1661,8 +1601,7 @@ BackendImpl::OtherPlatformPackageImpl::getMyBackend() const //Throws a DisposedException check(); //We should never get here... - throw RuntimeException( - OUSTR("Failed to get the BackendImpl"), + throw RuntimeException("Failed to get the BackendImpl", static_cast<OWeakObject*>(const_cast<OtherPlatformPackageImpl*>(this))); } return pBackend; @@ -1671,7 +1610,7 @@ BackendImpl::OtherPlatformPackageImpl::getMyBackend() const Reference<registry::XSimpleRegistry> const BackendImpl::OtherPlatformPackageImpl::impl_openRDB() const { - OUString const aRDB(m_aPlatform + OUString(RTL_CONSTASCII_USTRINGPARAM(".rdb"))); + OUString const aRDB(m_aPlatform + ".rdb"); OUString const aRDBPath(makeURL(getMyBackend()->getCachePath(), aRDB)); Reference<registry::XSimpleRegistry> xRegistry; @@ -1679,8 +1618,7 @@ BackendImpl::OtherPlatformPackageImpl::impl_openRDB() const try { xRegistry.set( - impl_createInstance( - OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.SimpleRegistry"))), + impl_createInstance("com.sun.star.registry.SimpleRegistry"), UNO_QUERY) ; if (xRegistry.is()) @@ -1733,8 +1671,7 @@ BackendImpl::OtherPlatformPackageImpl::processPackage_( Reference<registry::XSimpleRegistry> const xServicesRDB(impl_openRDB()); Reference<registry::XImplementationRegistration> const xImplReg( - impl_createInstance( - OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.ImplementationRegistration"))), + impl_createInstance("com.sun.star.registry.ImplementationRegistration"), UNO_QUERY) ; if (xImplReg.is() && xServicesRDB.is()) @@ -1753,8 +1690,7 @@ BackendImpl * BackendImpl::ComponentsPackageImpl::getMyBackend() const //Throws a DisposedException check(); //We should never get here... - throw RuntimeException( - OUSTR("Failed to get the BackendImpl"), + throw RuntimeException("Failed to get the BackendImpl", static_cast<OWeakObject*>(const_cast<ComponentsPackageImpl *>(this))); } return pBackend; @@ -1796,10 +1732,9 @@ void BackendImpl::ComponentsPackageImpl::processPackage_( // This relies on the root component context's service manager // supporting the extended XSet semantics: css::uno::Sequence< css::beans::NamedValue > args(2); - args[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("uri")); + args[0].Name = rtl::OUString("uri"); args[0].Value <<= expandUnoRcUrl(url); - args[1].Name = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("component-context")); + args[1].Name = rtl::OUString("component-context"); args[1].Value <<= context; css::uno::Reference< css::container::XSet > smgr( that->getRootContext()->getServiceManager(), @@ -1813,7 +1748,7 @@ void BackendImpl::ComponentsPackageImpl::processPackage_( // This relies on the root component context's service manager // supporting the extended XSet semantics: css::uno::Sequence< css::beans::NamedValue > args(1); - args[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("uri")); + args[0].Name = rtl::OUString("uri"); args[0].Value <<= expandUnoRcUrl(url); css::uno::Reference< css::container::XSet > smgr( that->getRootContext()->getServiceManager(), diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx index 4fa4763cce4e..79efef0e23c6 100644 --- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx @@ -167,7 +167,7 @@ void BackendImpl::disposing() catch (const Exception &) { Any exc( ::cppu::getCaughtException() ); throw lang::WrappedTargetRuntimeException( - OUSTR("caught unexpected exception while disposing..."), + "caught unexpected exception while disposing...", static_cast<OWeakObject *>(this), exc ); } } @@ -180,15 +180,13 @@ BackendImpl::BackendImpl( m_configmgrini_inited( false ), m_configmgrini_modified( false ), m_xConfDataTypeInfo( new Package::TypeInfo( - OUSTR("application/" - "vnd.sun.star.configuration-data"), - OUSTR("*.xcu"), + "application/vnd.sun.star.configuration-data", + "*.xcu", getResourceString(RID_STR_CONF_DATA), RID_IMG_CONF_XML ) ), m_xConfSchemaTypeInfo( new Package::TypeInfo( - OUSTR("application/" - "vnd.sun.star.configuration-schema"), - OUSTR("*.xcs"), + "application/vnd.sun.star.configuration-schema", + "*.xcs", getResourceString(RID_STR_CONF_SCHEMA), RID_IMG_CONF_XML ) ), m_typeInfos( 2 ) @@ -204,7 +202,7 @@ BackendImpl::BackendImpl( } else { - OUString dbFile = makeURL(getCachePath(), OUSTR("backenddb.xml")); + OUString dbFile = makeURL(getCachePath(), "backenddb.xml"); m_backendDb.reset( new ConfigurationBackendDb(getComponentContext(), dbFile)); //clean up data folders which are no longer used. @@ -221,7 +219,7 @@ BackendImpl::BackendImpl( SAL_WNODEPRECATED_DECLARATIONS_PUSH ::std::auto_ptr<PersistentMap> pMap; SAL_WNODEPRECATED_DECLARATIONS_POP - rtl::OUString aCompatURL( makeURL( getCachePath(), OUSTR("registered_packages.pmap") ) ); + rtl::OUString aCompatURL( makeURL( getCachePath(), "registered_packages.pmap" ) ); // Don't create it if it doesn't exist already if ( ::utl::UCBContentHelper::Exists( expandUnoRcUrl( aCompatURL ) ) ) @@ -313,15 +311,11 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_( if (create_ucb_content( &ucbContent, url, xCmdEnv )) { const OUString title( StrTitle::getTitle( ucbContent ) ); - if (title.endsWithIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM(".xcu") )) { - mediaType = OUSTR("application/" - "vnd.sun.star.configuration-data"); + if (title.endsWithIgnoreAsciiCase( ".xcu" )) { + mediaType = OUString("application/vnd.sun.star.configuration-data"); } - if (title.endsWithIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM(".xcs") )) { - mediaType = OUSTR("application/" - "vnd.sun.star.configuration-schema"); + if (title.endsWithIgnoreAsciiCase( ".xcs" )) { + mediaType = OUString("application/vnd.sun.star.configuration-schema"); } } if (mediaType.isEmpty()) @@ -377,11 +371,11 @@ void BackendImpl::configmgrini_verify_init( ::ucbhelper::Content ucb_content; if (create_ucb_content( &ucb_content, - makeURL( getCachePath(), OUSTR("configmgr.ini") ), + makeURL( getCachePath(), "configmgr.ini" ), xCmdEnv, false /* no throw */ )) { OUString line; - if (readLine( &line, OUSTR("SCHEMA="), ucb_content, + if (readLine( &line, "SCHEMA=", ucb_content, RTL_TEXTENCODING_UTF8 )) { sal_Int32 index = RTL_CONSTASCII_LENGTH("SCHEMA="); @@ -397,7 +391,7 @@ void BackendImpl::configmgrini_verify_init( } while (index >= 0); } - if (readLine( &line, OUSTR("DATA="), ucb_content, + if (readLine( &line, "DATA=", ucb_content, RTL_TEXTENCODING_UTF8 )) { sal_Int32 index = RTL_CONSTASCII_LENGTH("DATA="); do { @@ -435,7 +429,7 @@ void BackendImpl::configmgrini_flush( { t_stringlist::const_iterator iPos( m_xcs_files.begin() ); t_stringlist::const_iterator const iEnd( m_xcs_files.end() ); - buf.append( RTL_CONSTASCII_STRINGPARAM("SCHEMA=") ); + buf.append( "SCHEMA=" ); while (iPos != iEnd) { // encoded ASCII file-urls: const ::rtl::OString item( @@ -451,7 +445,7 @@ void BackendImpl::configmgrini_flush( { t_stringlist::const_iterator iPos( m_xcu_files.begin() ); t_stringlist::const_iterator const iEnd( m_xcu_files.end() ); - buf.append( RTL_CONSTASCII_STRINGPARAM("DATA=") ); + buf.append( "DATA=" ); while (iPos != iEnd) { // encoded ASCII file-urls: const ::rtl::OString item( @@ -471,7 +465,7 @@ void BackendImpl::configmgrini_flush( reinterpret_cast<sal_Int8 const *>(buf.getStr()), buf.getLength() ) ) ); ::ucbhelper::Content ucb_content( - makeURL( getCachePath(), OUSTR("configmgr.ini") ), xCmdEnv, m_xComponentContext ); + makeURL( getCachePath(), "configmgr.ini" ), xCmdEnv, m_xComponentContext ); ucb_content.writeStream( xData, true /* replace existing */ ); m_configmgrini_modified = false; @@ -539,7 +533,7 @@ BackendImpl * BackendImpl::PackageImpl::getMyBackend() const check(); //We should never get here... throw RuntimeException( - OUSTR("Failed to get the BackendImpl"), + "Failed to get the BackendImpl", static_cast<OWeakObject*>(const_cast<PackageImpl *>(this))); } return pBackend; @@ -580,19 +574,19 @@ OUString encodeForXml( OUString const & text ) sal_Unicode c = text[ pos ]; switch (c) { case '<': - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("<") ); + buf.appendAscii( "<" ); break; case '>': - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(">") ); + buf.appendAscii( ">" ); break; case '&': - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("&") ); + buf.appendAscii( "&" ); break; case '\'': - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("'") ); + buf.appendAscii( "'" ); break; case '\"': - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(""") ); + buf.appendAscii( """ ); break; default: buf.append( c ); @@ -649,7 +643,8 @@ OUString replaceOrigin( } else if (rtl_str_shortenedCompare_WithLength( pBytes, nBytes, - RTL_CONSTASCII_STRINGPARAM("origin%"), + "origin%", + RTL_CONSTASCII_LENGTH("origin%"), RTL_CONSTASCII_LENGTH("origin%")) == 0) { if (origin.isEmpty()) { @@ -786,9 +781,9 @@ void BackendImpl::PackageImpl::processPackage_( try { ::ucbhelper::Content( - makeURL( that->getCachePath(), OUSTR("registry") ), + makeURL( that->getCachePath(), "registry" ), xCmdEnv, that->getComponentContext() ).executeCommand( - OUSTR("delete"), Any( true /* delete physically */ ) ); + "delete", Any( true /* delete physically */ ) ); } catch(const Exception&) { diff --git a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx index 3d97ce2c484e..01a7bb8f36d2 100644 --- a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx @@ -50,22 +50,22 @@ ConfigurationBackendDb::ConfigurationBackendDb( OUString ConfigurationBackendDb::getDbNSName() { - return OUSTR(EXTENSION_REG_NS); + return OUString(EXTENSION_REG_NS); } OUString ConfigurationBackendDb::getNSPrefix() { - return OUSTR(NS_PREFIX); + return OUString(NS_PREFIX); } OUString ConfigurationBackendDb::getRootElementName() { - return OUSTR(ROOT_ELEMENT_NAME); + return OUString(ROOT_ELEMENT_NAME); } OUString ConfigurationBackendDb::getKeyElementName() { - return OUSTR(KEY_ELEMENT_NAME); + return OUString(KEY_ELEMENT_NAME); } @@ -77,8 +77,8 @@ void ConfigurationBackendDb::addEntry(::rtl::OUString const & url, Data const & Reference<css::xml::dom::XNode> helpNode = writeKeyElement(url); - writeSimpleElement(OUSTR("data-url"), data.dataUrl, helpNode); - writeSimpleElement(OUSTR("ini-entry"), data.iniEntry, helpNode); + writeSimpleElement("data-url", data.dataUrl, helpNode); + writeSimpleElement("ini-entry", data.iniEntry, helpNode); save(); } } @@ -90,7 +90,7 @@ void ConfigurationBackendDb::addEntry(::rtl::OUString const & url, Data const & { Any exc( ::cppu::getCaughtException() ); throw css::deployment::DeploymentException( - OUSTR("Extension Manager: failed to write data entry in configuration backend db: ") + + "Extension Manager: failed to write data entry in configuration backend db: " + m_urlDb, 0, exc); } } @@ -105,8 +105,8 @@ ConfigurationBackendDb::getEntry(::rtl::OUString const & url) Reference<css::xml::dom::XNode> aNode = getKeyElement(url); if (aNode.is()) { - retData.dataUrl = readSimpleElement(OUSTR("data-url"), aNode); - retData.iniEntry = readSimpleElement(OUSTR("ini-entry"), aNode); + retData.dataUrl = readSimpleElement("data-url", aNode); + retData.iniEntry = readSimpleElement("ini-entry", aNode); } else { @@ -122,7 +122,7 @@ ConfigurationBackendDb::getEntry(::rtl::OUString const & url) { Any exc( ::cppu::getCaughtException() ); throw css::deployment::DeploymentException( - OUSTR("Extension Manager: failed to read data entry in configuration backend db: ") + + "Extension Manager: failed to read data entry in configuration backend db: " + m_urlDb, 0, exc); } } @@ -138,7 +138,7 @@ ConfigurationBackendDb::getEntry(::rtl::OUString const & url) Reference<css::xml::xpath::XXPathAPI> xpathApi = getXPathAPI(); const OUString sPrefix = getNSPrefix(); OUString sExpression( - sPrefix + OUSTR(":configuration/") + sPrefix + OUSTR(":data-url/text()")); + sPrefix + ":configuration/" + sPrefix + ":data-url/text()"); Reference<css::xml::dom::XNodeList> nodes = xpathApi->selectNodeList(root, sExpression); if (nodes.is()) @@ -157,7 +157,7 @@ ConfigurationBackendDb::getEntry(::rtl::OUString const & url) { Any exc( ::cppu::getCaughtException() ); throw css::deployment::DeploymentException( - OUSTR("Extension Manager: failed to read data entry in configuration backend db: ") + + "Extension Manager: failed to read data entry in configuration backend db: " + m_urlDb, 0, exc); } } diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx index 955a5acd8897..429a6f71ce52 100644 --- a/desktop/source/deployment/registry/dp_backend.cxx +++ b/desktop/source/deployment/registry/dp_backend.cxx @@ -96,8 +96,7 @@ PackageRegistryBackend::PackageRegistryBackend( m_eContext = CONTEXT_BUNDLED; else if ( m_context == "tmp" ) m_eContext = CONTEXT_TMP; - else if (m_context.matchIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.tdoc:/") )) + else if (m_context.matchIgnoreAsciiCase("vnd.sun.star.tdoc:/")) m_eContext = CONTEXT_DOCUMENT; else m_eContext = CONTEXT_UNKNOWN; @@ -109,7 +108,7 @@ void PackageRegistryBackend::check() ::osl::MutexGuard guard( getMutex() ); if (rBHelper.bInDispose || rBHelper.bDisposed) { throw lang::DisposedException( - OUSTR("PackageRegistryBackend instance has already been disposed!"), + "PackageRegistryBackend instance has already been disposed!", static_cast<OWeakObject *>(this) ); } } @@ -130,7 +129,7 @@ void PackageRegistryBackend::disposing() catch (const Exception &) { Any exc( ::cppu::getCaughtException() ); throw lang::WrappedTargetRuntimeException( - OUSTR("caught unexpected exception while disposing!"), + "caught unexpected exception while disposing!", static_cast<OWeakObject *>(this), exc ); } } @@ -157,11 +156,11 @@ Reference<deployment::XPackage> PackageRegistryBackend::bindPackage( if (!mediaType.isEmpty() && mediaType != xPackage->getPackageType()->getMediaType()) throw lang::IllegalArgumentException - (OUSTR("XPackageRegistry::bindPackage: media type does not match"), + ("XPackageRegistry::bindPackage: media type does not match", static_cast<OWeakObject*>(this), 1); if (xPackage->isRemoved() != bRemoved) throw deployment::InvalidRemovedParameterException( - OUSTR("XPackageRegistry::bindPackage: bRemoved parameter does not match"), + "XPackageRegistry::bindPackage: bRemoved parameter does not match", static_cast<OWeakObject*>(this), xPackage->isRemoved(), xPackage); return xPackage; } @@ -186,7 +185,7 @@ Reference<deployment::XPackage> PackageRegistryBackend::bindPackage( catch (const Exception &) { Any exc( ::cppu::getCaughtException() ); throw deployment::DeploymentException( - OUSTR("Error binding package: ") + url, + "Error binding package: " + url, static_cast<OWeakObject *>(this), exc ); } @@ -278,7 +277,7 @@ void PackageRegistryBackend::deleteUnusedFolders( xResultSet, UNO_QUERY_THROW )->getString( 1 /* Title */ ) ); - if (title.endsWithAsciiL(RTL_CONSTASCII_STRINGPARAM(tmp))) + if (title.endsWith(tmp)) tempEntries.push_back( makeURLAppendSysPathSegment(sDataFolder, title)); } @@ -351,7 +350,7 @@ void Package::check() const ::osl::MutexGuard guard( getMutex() ); if (rBHelper.bInDispose || rBHelper.bDisposed) { throw lang::DisposedException( - OUSTR("Package instance has already been disposed!"), + "Package instance has already been disposed!", static_cast<OWeakObject *>(const_cast<Package *>(this))); } } @@ -408,7 +407,7 @@ void Package::checkAborted( { if (abortChannel.is() && abortChannel->isAborted()) { throw CommandAbortedException( - OUSTR("abort!"), static_cast<OWeakObject *>(this) ); + "abort!", static_cast<OWeakObject *>(this) ); } } @@ -577,7 +576,7 @@ void Package::exportTo( if (! destFolder.transferContent( sourceContent, ::ucbhelper::InsertOperation_COPY, newTitle, nameClashAction )) - throw RuntimeException( OUSTR("UCB transferContent() failed!"), 0 ); + throw RuntimeException( "UCB transferContent() failed!", 0 ); } //______________________________________________________________________________ @@ -629,7 +628,7 @@ beans::Optional< beans::Ambiguous<sal_Bool> > Package::isRegistered( catch (const Exception &) { Any exc( ::cppu::getCaughtException() ); throw deployment::DeploymentException( - OUSTR("unexpected exception occurred!"), + "unexpected exception occurred!", static_cast<OWeakObject *>(this), exc ); } } @@ -740,7 +739,7 @@ PackageRegistryBackend * Package::getMyBackend() const check(); //We should never get here... throw RuntimeException( - OUSTR("Failed to get the BackendImpl"), + "Failed to get the BackendImpl", static_cast<OWeakObject*>(const_cast<Package *>(this))); } return pBackend; diff --git a/desktop/source/deployment/registry/dp_backenddb.cxx b/desktop/source/deployment/registry/dp_backenddb.cxx index 40a15c93e540..140084457b3b 100644 --- a/desktop/source/deployment/registry/dp_backenddb.cxx +++ b/desktop/source/deployment/registry/dp_backenddb.cxx @@ -87,7 +87,7 @@ css::uno::Reference<css::xml::dom::XDocument> BackendDb::getDocument() m_doc = xDocBuilder->newDocument(); const Reference<css::xml::dom::XElement> rootNode = m_doc->createElementNS(getDbNSName(), getNSPrefix() + - OUSTR(":") + getRootElementName()); + ":" + getRootElementName()); m_doc->appendChild(Reference<css::xml::dom::XNode>( rootNode, UNO_QUERY_THROW)); @@ -95,12 +95,12 @@ css::uno::Reference<css::xml::dom::XDocument> BackendDb::getDocument() } else throw css::uno::RuntimeException( - OUSTR("Extension manager could not access database file:" ) + "Extension manager could not access database file:" + m_urlDb, 0); if (!m_doc.is()) throw css::uno::RuntimeException( - OUSTR("Extension manager could not get root node of data base file: ") + "Extension manager could not get root node of data base file: " + m_urlDb, 0); } @@ -113,12 +113,12 @@ Reference<css::xml::xpath::XXPathAPI> BackendDb::getXPathAPI() { m_xpathApi = Reference< css::xml::xpath::XXPathAPI >( m_xContext->getServiceManager()->createInstanceWithContext( - OUSTR("com.sun.star.xml.xpath.XPathAPI"), + "com.sun.star.xml.xpath.XPathAPI", m_xContext), css::uno::UNO_QUERY); if (!m_xpathApi.is()) throw css::uno::RuntimeException( - OUSTR(" Could not create service com.sun.star.xml.xpath.XPathAPI"), 0); + " Could not create service com.sun.star.xml.xpath.XPathAPI", 0); m_xpathApi->registerNS( getNSPrefix(), getDbNSName()); @@ -155,7 +155,7 @@ void BackendDb::removeElement(::rtl::OUString const & sXPathExpression) { Any exc( ::cppu::getCaughtException() ); throw css::deployment::DeploymentException( - OUSTR("Extension Manager: failed to write data entry in backend db: ") + + "Extension Manager: failed to write data entry in backend db: " + m_urlDb, 0, exc); } } @@ -168,7 +168,7 @@ void BackendDb::removeEntry(::rtl::OUString const & url) sExpression.append(sPrefix); sExpression.appendAscii(":"); sExpression.append(sKeyElement); - sExpression.append(OUSTR("[@url = \"")); + sExpression.append("[@url = \""); sExpression.append(url); sExpression.appendAscii("\"]"); @@ -182,7 +182,7 @@ void BackendDb::revokeEntry(::rtl::OUString const & url) Reference<css::xml::dom::XElement> entry = Reference<css::xml::dom::XElement>(getKeyElement(url), UNO_QUERY); if (entry.is()) { - entry->setAttribute(OUSTR("revoked"), OUSTR("true")); + entry->setAttribute("revoked", "true"); save(); } } @@ -190,7 +190,7 @@ void BackendDb::revokeEntry(::rtl::OUString const & url) { Any exc( ::cppu::getCaughtException() ); throw css::deployment::DeploymentException( - OUSTR("Extension Manager: failed to revoke data entry in backend db: ") + + "Extension Manager: failed to revoke data entry in backend db: " + m_urlDb, 0, exc); } } @@ -204,7 +204,7 @@ bool BackendDb::activateEntry(::rtl::OUString const & url) if (entry.is()) { //no attribute "active" means it is active, that is, registered. - entry->removeAttribute(OUSTR("revoked")); + entry->removeAttribute("revoked"); save(); ret = true; } @@ -214,7 +214,7 @@ bool BackendDb::activateEntry(::rtl::OUString const & url) { Any exc( ::cppu::getCaughtException() ); throw css::deployment::DeploymentException( - OUSTR("Extension Manager: failed to revoke data entry in backend db: ") + + "Extension Manager: failed to revoke data entry in backend db: " + m_urlDb, 0, exc); } } @@ -227,8 +227,8 @@ bool BackendDb::hasActiveEntry(::rtl::OUString const & url) Reference<css::xml::dom::XElement> entry = Reference<css::xml::dom::XElement>(getKeyElement(url), UNO_QUERY); if (entry.is()) { - OUString sActive = entry->getAttribute(OUSTR("revoked")); - if (!sActive.equals(OUSTR("true"))) + OUString sActive = entry->getAttribute("revoked"); + if (!(sActive == "true")) ret = true; } return ret; @@ -238,7 +238,7 @@ bool BackendDb::hasActiveEntry(::rtl::OUString const & url) { Any exc( ::cppu::getCaughtException() ); throw css::deployment::DeploymentException( - OUSTR("Extension Manager: failed to determine an active entry in backend db: ") + + "Extension Manager: failed to determine an active entry in backend db: " + m_urlDb, 0, exc); } } @@ -254,7 +254,7 @@ Reference<css::xml::dom::XNode> BackendDb::getKeyElement( sExpression.append(sPrefix); sExpression.appendAscii(":"); sExpression.append(sKeyElement); - sExpression.append(OUSTR("[@url = \"")); + sExpression.append("[@url = \""); sExpression.append(url); sExpression.appendAscii("\"]"); @@ -267,7 +267,7 @@ Reference<css::xml::dom::XNode> BackendDb::getKeyElement( { Any exc( ::cppu::getCaughtException() ); throw css::deployment::DeploymentException( - OUSTR("Extension Manager: failed to read key element in backend db: ") + + "Extension Manager: failed to read key element in backend db: " + m_urlDb, 0, exc); } } @@ -286,7 +286,7 @@ void BackendDb::writeVectorOfPair( return; const OUString sNameSpace = getDbNSName(); OSL_ASSERT(!sNameSpace.isEmpty()); - const OUString sPrefix(getNSPrefix() + OUSTR(":")); + const OUString sPrefix(getNSPrefix() + ":"); const Reference<css::xml::dom::XDocument> doc = getDocument(); const Reference<css::xml::dom::XNode> root = doc->getFirstChild(); @@ -339,7 +339,7 @@ void BackendDb::writeVectorOfPair( { Any exc( ::cppu::getCaughtException() ); throw css::deployment::DeploymentException( - OUSTR("Extension Manager: failed to write data entry in backend db: ") + + "Extension Manager: failed to write data entry in backend db: " + m_urlDb, 0, exc); } } @@ -355,10 +355,10 @@ BackendDb::readVectorOfPair( try { OSL_ASSERT(parent.is()); - const OUString sPrefix(getNSPrefix() + OUSTR(":")); + const OUString sPrefix(getNSPrefix() + ":"); const Reference<css::xml::xpath::XXPathAPI> xpathApi = getXPathAPI(); const OUString sExprPairs( - sPrefix + sListTagName + OUSTR("/") + sPrefix + sPairTagName); + sPrefix + sListTagName + "/" + sPrefix + sPairTagName); const Reference<css::xml::dom::XNodeList> listPairs = xpathApi->selectNodeList(parent, sExprPairs); @@ -367,11 +367,11 @@ BackendDb::readVectorOfPair( for (sal_Int32 i = 0; i < length; i++) { const Reference<css::xml::dom::XNode> aPair = listPairs->item(i); - const OUString sExprFirst(sPrefix + sFirstTagName + OUSTR("/text()")); + const OUString sExprFirst(sPrefix + sFirstTagName + "/text()"); const Reference<css::xml::dom::XNode> first = xpathApi->selectSingleNode(aPair, sExprFirst); - const OUString sExprSecond(sPrefix + sSecondTagName + OUSTR("/text()")); + const OUString sExprSecond(sPrefix + sSecondTagName + "/text()"); const Reference<css::xml::dom::XNode> second = xpathApi->selectSingleNode(aPair, sExprSecond); OSL_ASSERT(first.is() && second.is()); @@ -385,7 +385,7 @@ BackendDb::readVectorOfPair( { Any exc( ::cppu::getCaughtException() ); throw css::deployment::DeploymentException( - OUSTR("Extension Manager: failed to read data entry in backend db: ") + + "Extension Manager: failed to read data entry in backend db: " + m_urlDb, 0, exc); } } @@ -402,7 +402,7 @@ void BackendDb::writeSimpleList( if (list.empty()) return; const OUString sNameSpace = getDbNSName(); - const OUString sPrefix(getNSPrefix() + OUSTR(":")); + const OUString sPrefix(getNSPrefix() + ":"); const Reference<css::xml::dom::XDocument> doc = getDocument(); const Reference<css::xml::dom::XElement> listNode( @@ -430,7 +430,7 @@ void BackendDb::writeSimpleList( { Any exc( ::cppu::getCaughtException() ); throw css::deployment::DeploymentException( - OUSTR("Extension Manager: failed to write data entry in backend db: ") + + "Extension Manager: failed to write data entry in backend db: " + m_urlDb, 0, exc); } } @@ -449,7 +449,7 @@ void BackendDb::writeSimpleElement( const Reference<css::xml::dom::XDocument> doc = getDocument(); const OUString sNameSpace = getDbNSName(); const Reference<css::xml::dom::XNode> dataNode( - doc->createElementNS(sNameSpace, sPrefix + OUSTR(":") + sElementName), + doc->createElementNS(sNameSpace, sPrefix + ":" + sElementName), UNO_QUERY_THROW); xParent->appendChild(dataNode); @@ -461,7 +461,7 @@ void BackendDb::writeSimpleElement( { Any exc( ::cppu::getCaughtException() ); throw css::deployment::DeploymentException( - OUSTR("Extension Manager: failed to write data entry(writeSimpleElement) in backend db: ") + + "Extension Manager: failed to write data entry(writeSimpleElement) in backend db: " + m_urlDb, 0, exc); } @@ -489,7 +489,7 @@ Reference<css::xml::dom::XNode> BackendDb::writeKeyElement( //invalid after its successful registration, for example if a second extension with //the same service is installed. const OUString sExpression( - sPrefix + OUSTR(":") + sElementName + OUSTR("[@url = \"") + url + OUSTR("\"]")); + sPrefix + ":" + sElementName + "[@url = \"" + url + "\"]"); const Reference<css::xml::dom::XNode> existingNode = getXPathAPI()->selectSingleNode(root, sExpression); if (existingNode.is()) @@ -500,9 +500,9 @@ Reference<css::xml::dom::XNode> BackendDb::writeKeyElement( } const Reference<css::xml::dom::XElement> keyElement( - doc->createElementNS(sNameSpace, sPrefix + OUSTR(":") + sElementName)); + doc->createElementNS(sNameSpace, sPrefix + ":" + sElementName)); - keyElement->setAttribute(OUSTR("url"), url); + keyElement->setAttribute("url", url); const Reference<css::xml::dom::XNode> keyNode( keyElement, UNO_QUERY_THROW); @@ -513,7 +513,7 @@ Reference<css::xml::dom::XNode> BackendDb::writeKeyElement( { Any exc( ::cppu::getCaughtException() ); throw css::deployment::DeploymentException( - OUSTR("Extension Manager: failed to write key element in backend db: ") + + "Extension Manager: failed to write key element in backend db: " + m_urlDb, 0, exc); } } @@ -524,7 +524,7 @@ OUString BackendDb::readSimpleElement( try { const OUString sPrefix = getNSPrefix(); - const OUString sExpr(sPrefix + OUSTR(":") + sElementName + OUSTR("/text()")); + const OUString sExpr(sPrefix + ":" + sElementName + "/text()"); const Reference<css::xml::xpath::XXPathAPI> xpathApi = getXPathAPI(); const Reference<css::xml::dom::XNode> val = xpathApi->selectSingleNode(xParent, sExpr); @@ -536,7 +536,7 @@ OUString BackendDb::readSimpleElement( { Any exc( ::cppu::getCaughtException() ); throw css::deployment::DeploymentException( - OUSTR("Extension Manager: failed to read data (readSimpleElement) in backend db: ") + + "Extension Manager: failed to read data (readSimpleElement) in backend db: " + m_urlDb, 0, exc); } } @@ -550,10 +550,10 @@ OUString BackendDb::readSimpleElement( try { OSL_ASSERT(parent.is()); - const OUString sPrefix(getNSPrefix() + OUSTR(":")); + const OUString sPrefix(getNSPrefix() + ":"); const Reference<css::xml::xpath::XXPathAPI> xpathApi = getXPathAPI(); const OUString sExprList( - sPrefix + sListTagName + OUSTR("/") + sPrefix + sMemberTagName + OUSTR("/text()")); + sPrefix + sListTagName + "/" + sPrefix + sMemberTagName + "/text()"); const Reference<css::xml::dom::XNodeList> list = xpathApi->selectNodeList(parent, sExprList); @@ -570,7 +570,7 @@ OUString BackendDb::readSimpleElement( { Any exc( ::cppu::getCaughtException() ); throw css::deployment::DeploymentException( - OUSTR("Extension Manager: failed to read data entry in backend db: ") + + "Extension Manager: failed to read data entry in backend db: " + m_urlDb, 0, exc); } } @@ -595,7 +595,7 @@ OUString BackendDb::readSimpleElement( buf.append(sPrefix); buf.appendAscii(":"); buf.append(name); - buf.append(OUSTR("/text()")); + buf.append("/text()"); Reference<css::xml::dom::XNodeList> nodes = xpathApi->selectNodeList(root, buf.makeStringAndClear()); @@ -615,7 +615,7 @@ OUString BackendDb::readSimpleElement( { Any exc( ::cppu::getCaughtException() ); throw css::deployment::DeploymentException( - OUSTR("Extension Manager: failed to read data entry in backend db: ") + + "Extension Manager: failed to read data entry in backend db: " + m_urlDb, 0, exc); } } @@ -642,15 +642,15 @@ void RegisteredDb::addEntry(::rtl::OUString const & url) #if OSL_DEBUG_LEVEL > 0 //There must not be yet an entry with the same url OUString sExpression( - sPrefix + OUSTR(":") + sEntry + OUSTR("[@url = \"") + url + OUSTR("\"]")); + sPrefix + ":" + sEntry + "[@url = \"" + url + "\"]"); Reference<css::xml::dom::XNode> _extensionNode = getXPathAPI()->selectSingleNode(root, sExpression); OSL_ASSERT(! _extensionNode.is()); #endif Reference<css::xml::dom::XElement> helpElement( - doc->createElementNS(sNameSpace, sPrefix + OUSTR(":") + sEntry)); + doc->createElementNS(sNameSpace, sPrefix + ":" + sEntry)); - helpElement->setAttribute(OUSTR("url"), url); + helpElement->setAttribute("url", url); Reference<css::xml::dom::XNode> helpNode( helpElement, UNO_QUERY_THROW); @@ -663,7 +663,7 @@ void RegisteredDb::addEntry(::rtl::OUString const & url) { Any exc( ::cppu::getCaughtException() ); throw css::deployment::DeploymentException( - OUSTR("Extension Manager: failed to write data entry in backend db: ") + + "Extension Manager: failed to write data entry in backend db: " + m_urlDb, 0, exc); } } @@ -675,7 +675,7 @@ bool RegisteredDb::getEntry(::rtl::OUString const & url) const OUString sPrefix = getNSPrefix(); const OUString sEntry = getKeyElementName(); const OUString sExpression( - sPrefix + OUSTR(":") + sEntry + OUSTR("[@url = \"") + url + OUSTR("\"]")); + sPrefix + ":" + sEntry + "[@url = \"" + url + "\"]"); Reference<css::xml::dom::XDocument> doc = getDocument(); Reference<css::xml::dom::XNode> root = doc->getFirstChild(); @@ -689,7 +689,7 @@ bool RegisteredDb::getEntry(::rtl::OUString const & url) { Any exc( ::cppu::getCaughtException() ); throw css::deployment::DeploymentException( - OUSTR("Extension Manager: failed to read data entry in backend db: ") + + "Extension Manager: failed to read data entry in backend db: " + m_urlDb, 0, exc); } } diff --git a/desktop/source/deployment/registry/dp_registry.cxx b/desktop/source/deployment/registry/dp_registry.cxx index 972ab90e5166..742b59439a32 100644 --- a/desktop/source/deployment/registry/dp_registry.cxx +++ b/desktop/source/deployment/registry/dp_registry.cxx @@ -137,7 +137,7 @@ inline void PackageRegistryImpl::check() ::osl::MutexGuard guard( getMutex() ); if (rBHelper.bInDispose || rBHelper.bDisposed) { throw lang::DisposedException( - OUSTR("PackageRegistry instance has already been disposed!"), + "PackageRegistry instance has already been disposed!", static_cast<OWeakObject *>(this) ); } } @@ -225,7 +225,7 @@ void PackageRegistryImpl::insertBackend( const OUString fileFilter( xPackageType->getFileFilter() ); //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")); + const bool bExtension = (mediaType == "application/vnd.sun.star.package-bundle"); if (fileFilter.isEmpty() || fileFilter == "*.*" || fileFilter == "*" || bExtension) { m_ambiguousBackends.insert( xBackend ); @@ -235,7 +235,7 @@ void PackageRegistryImpl::insertBackend( sal_Int32 nIndex = 0; do { OUString token( fileFilter.getToken( 0, ';', nIndex ) ); - if (token.matchAsciiL( RTL_CONSTASCII_STRINGPARAM("*.") )) + if (token.match( "*." )) token = token.copy( 1 ); if (token.isEmpty()) continue; @@ -274,16 +274,13 @@ void PackageRegistryImpl::insertBackend( else { ::rtl::OUStringBuffer buf; - buf.appendAscii( - RTL_CONSTASCII_STRINGPARAM( - "more than one PackageRegistryBackend for " - "media-type=\"") ); + buf.appendAscii( "more than one PackageRegistryBackend for media-type=\"" ); buf.append( mediaType ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\" => ") ); + buf.appendAscii( "\" => " ); buf.append( Reference<lang::XServiceInfo>( xBackend, UNO_QUERY_THROW )-> getImplementationName() ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\"!") ); + buf.appendAscii( "\"!" ); OSL_FAIL( ::rtl::OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_UTF8).getStr() ); @@ -313,7 +310,7 @@ Reference<deployment::XPackageRegistry> PackageRegistryImpl::create( Reference<container::XContentEnumerationAccess>( xComponentContext->getServiceManager(), UNO_QUERY_THROW )->createContentEnumeration( - OUSTR("com.sun.star.deployment.PackageRegistryBackend") ) ); + "com.sun.star.deployment.PackageRegistryBackend" ) ); if (xEnum.is()) { while (xEnum->hasMoreElements()) @@ -355,7 +352,7 @@ Reference<deployment::XPackageRegistry> PackageRegistryImpl::create( } if (! xBackend.is()) { throw DeploymentException( - OUSTR("cannot instantiate PackageRegistryBackend service: ") + "cannot instantiate PackageRegistryBackend service: " + Reference<lang::XServiceInfo>( element, UNO_QUERY_THROW )->getImplementationName(), static_cast<OWeakObject *>(that) ); @@ -398,20 +395,18 @@ Reference<deployment::XPackageRegistry> PackageRegistryImpl::create( iPos != that->m_filter2mediaType.end(); ++iPos ) { ::rtl::OUStringBuffer buf; - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("extension \"") ); + buf.appendAscii( "extension \"" ); buf.append( iPos->first ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( - "\" maps to media-type \"") ); + buf.appendAscii( "\" maps to media-type \"" ); buf.append( iPos->second ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( - "\" maps to backend ") ); + buf.appendAscii( "\" maps to backend " ); const Reference<deployment::XPackageRegistry> xBackend( that->m_mediaType2backend.find( iPos->second )->second ); allBackends.insert( xBackend ); buf.append( Reference<lang::XServiceInfo>( xBackend, UNO_QUERY_THROW ) ->getImplementationName() ); - dp_misc::writeConsole( buf.makeStringAndClear() + OUSTR("\n")); + dp_misc::writeConsole( buf.makeStringAndClear() + "\n"); } dp_misc::TRACE( "> [dp_registry.cxx] ambiguous backends:\n\n" ); for ( t_registryset::const_iterator iPos( @@ -422,7 +417,7 @@ Reference<deployment::XPackageRegistry> PackageRegistryImpl::create( buf.append( Reference<lang::XServiceInfo>( *iPos, UNO_QUERY_THROW )->getImplementationName() ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(": ") ); + buf.appendAscii( ": " ); const Sequence< Reference<deployment::XPackageTypeInfo> > types( (*iPos)->getSupportedPackageTypes() ); for ( sal_Int32 pos = 0; pos < types.getLength(); ++pos ) { @@ -431,14 +426,14 @@ Reference<deployment::XPackageRegistry> PackageRegistryImpl::create( buf.append( xInfo->getMediaType() ); const OUString filter( xInfo->getFileFilter() ); if (!filter.isEmpty()) { - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(" (") ); + buf.appendAscii( " (" ); buf.append( filter ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(")") ); + buf.appendAscii( ")" ); } if (pos < (types.getLength() - 1)) - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(", ") ); + buf.appendAscii( ", " ); } - dp_misc::TRACE(buf.makeStringAndClear() + OUSTR("\n\n")); + dp_misc::TRACE(buf.makeStringAndClear() + "\n\n"); } allBackends.insert( that->m_ambiguousBackends.begin(), that->m_ambiguousBackends.end() ); diff --git a/desktop/source/deployment/registry/executable/dp_executable.cxx b/desktop/source/deployment/registry/executable/dp_executable.cxx index 18cf752e2333..9a4e42141446 100644 --- a/desktop/source/deployment/registry/executable/dp_executable.cxx +++ b/desktop/source/deployment/registry/executable/dp_executable.cxx @@ -108,14 +108,12 @@ BackendImpl::BackendImpl( Reference<XComponentContext> const & xComponentContext ) : PackageRegistryBackend( args, xComponentContext ), m_xExecutableTypeInfo(new Package::TypeInfo( - OUSTR("application/vnd.sun.star.executable"), - OUSTR(""), - OUSTR("Executable"), - RID_IMG_COMPONENT ) ) + "application/vnd.sun.star.executable", + "", "Executable", RID_IMG_COMPONENT ) ) { if (!transientMode()) { - OUString dbFile = makeURL(getCachePath(), OUSTR("backenddb.xml")); + OUString dbFile = makeURL(getCachePath(), "backenddb.xml"); m_backendDb.reset( new ExecutableBackendDb(getComponentContext(), dbFile)); } @@ -204,8 +202,7 @@ BackendImpl * BackendImpl::ExecutablePackageImpl::getMyBackend() const //May throw a DisposedException check(); //We should never get here... - throw RuntimeException( - OUSTR("Failed to get the BackendImpl"), + throw RuntimeException( "Failed to get the BackendImpl", static_cast<OWeakObject*>(const_cast<ExecutablePackageImpl *>(this))); } return pBackend; @@ -243,12 +240,12 @@ void BackendImpl::ExecutablePackageImpl::processPackage_( //Setting the executable attribut does not affect executables on Windows if (getFileAttributes(attributes)) { - if(getMyBackend()->m_context.equals(OUSTR("user"))) + if(getMyBackend()->m_context == "user") attributes |= osl_File_Attribute_OwnExe; - else if (getMyBackend()->m_context.equals(OUSTR("shared"))) + else if (getMyBackend()->m_context == "shared") attributes |= (osl_File_Attribute_OwnExe | osl_File_Attribute_GrpExe | osl_File_Attribute_OthExe); - else if (!getMyBackend()->m_context.equals(OUSTR("bundled"))) + else if (!(getMyBackend()->m_context == "bundled")) //Bundled extension are required to be in the properly //installed. That is an executable must have the right flags OSL_ASSERT(0); @@ -273,12 +270,12 @@ bool BackendImpl::ExecutablePackageImpl::isUrlTargetInExtension() { bool bSuccess = false; OUString sExtensionDir; - if(getMyBackend()->m_context.equals(OUSTR("user"))) - sExtensionDir = dp_misc::expandUnoRcTerm(OUSTR("$UNO_USER_PACKAGES_CACHE")); - else if (getMyBackend()->m_context.equals(OUSTR("shared"))) - sExtensionDir = dp_misc::expandUnoRcTerm(OUSTR("$UNO_SHARED_PACKAGES_CACHE")); - else if (getMyBackend()->m_context.equals(OUSTR("bundled"))) - sExtensionDir = dp_misc::expandUnoRcTerm(OUSTR("$BUNDLED_EXTENSIONS")); + if(getMyBackend()->m_context == "user") + sExtensionDir = dp_misc::expandUnoRcTerm("$UNO_USER_PACKAGES_CACHE"); + else if (getMyBackend()->m_context == "shared") + sExtensionDir = dp_misc::expandUnoRcTerm("$UNO_SHARED_PACKAGES_CACHE"); + else if (getMyBackend()->m_context == "bundled") + sExtensionDir = dp_misc::expandUnoRcTerm("$BUNDLED_EXTENSIONS"); else OSL_ASSERT(0); //remove file ellipses diff --git a/desktop/source/deployment/registry/executable/dp_executablebackenddb.cxx b/desktop/source/deployment/registry/executable/dp_executablebackenddb.cxx index 44073ac59448..25988f011f90 100644 --- a/desktop/source/deployment/registry/executable/dp_executablebackenddb.cxx +++ b/desktop/source/deployment/registry/executable/dp_executablebackenddb.cxx @@ -45,22 +45,22 @@ ExecutableBackendDb::ExecutableBackendDb( OUString ExecutableBackendDb::getDbNSName() { - return OUSTR(EXTENSION_REG_NS); + return OUString(EXTENSION_REG_NS); } OUString ExecutableBackendDb::getNSPrefix() { - return OUSTR(NS_PREFIX); + return OUString(NS_PREFIX); } OUString ExecutableBackendDb::getRootElementName() { - return OUSTR(ROOT_ELEMENT_NAME); + return OUString(ROOT_ELEMENT_NAME); } OUString ExecutableBackendDb::getKeyElementName() { - return OUSTR(ENTRY_NAME); + return OUString(ENTRY_NAME); } diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx index c31b1de3fcef..45083bdd5f3e 100644 --- a/desktop/source/deployment/registry/help/dp_help.cxx +++ b/desktop/source/deployment/registry/help/dp_help.cxx @@ -130,8 +130,7 @@ BackendImpl::BackendImpl( Sequence<Any> const & args, Reference<XComponentContext> const & xComponentContext ) : PackageRegistryBackend( args, xComponentContext ), - m_xHelpTypeInfo( new Package::TypeInfo( - OUSTR("application/vnd.sun.star.help"), + m_xHelpTypeInfo( new Package::TypeInfo("application/vnd.sun.star.help", rtl::OUString(), getResourceString(RID_STR_HELP), RID_IMG_HELP ) ), @@ -140,7 +139,7 @@ BackendImpl::BackendImpl( m_typeInfos[ 0 ] = m_xHelpTypeInfo; if (!transientMode()) { - OUString dbFile = makeURL(getCachePath(), OUSTR("backenddb.xml")); + OUString dbFile = makeURL(getCachePath(), "backenddb.xml"); m_backendDb.reset( new HelpBackendDb(getComponentContext(), dbFile)); @@ -267,8 +266,7 @@ BackendImpl * BackendImpl::PackageImpl::getMyBackend() const //May throw a DisposedException check(); //We should never get here... - throw RuntimeException( - OUSTR("Failed to get the BackendImpl"), + throw RuntimeException("Failed to get the BackendImpl", static_cast<OWeakObject*>(const_cast<PackageImpl *>(this))); } return pBackend; @@ -298,7 +296,7 @@ bool BackendImpl::PackageImpl::extensionContainsCompiledHelp() continue; //look if there is the folder help.idxl in the language folder - OUString compUrl(stat.getFileURL() + OUSTR("/help.idxl")); + OUString compUrl(stat.getFileURL() + "/help.idxl"); ::osl::Directory compiledFolder(compUrl); if (compiledFolder.open() != ::osl::File::E_None) { @@ -435,8 +433,7 @@ void BackendImpl::implProcessHelp( const OUString aSlash("/"); rtl::OUString aJarFile( - makeURL(sHelpFolder, langFolderURLSegment + aSlash + aHelpStr + - OUSTR(".jar"))); + makeURL(sHelpFolder, langFolderURLSegment + aSlash + aHelpStr + ".jar")); aJarFile = ::dp_misc::expandUnoRcUrl(aJarFile); rtl::OUString aEncodedJarFilePath = rtl::Uri::encode( diff --git a/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx b/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx index 24382f85ff45..af82956c4697 100644 --- a/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx +++ b/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx @@ -50,22 +50,22 @@ HelpBackendDb::HelpBackendDb( OUString HelpBackendDb::getDbNSName() { - return OUSTR(EXTENSION_REG_NS); + return OUString(EXTENSION_REG_NS); } OUString HelpBackendDb::getNSPrefix() { - return OUSTR(NS_PREFIX); + return OUString(NS_PREFIX); } OUString HelpBackendDb::getRootElementName() { - return OUSTR(ROOT_ELEMENT_NAME); + return OUString(ROOT_ELEMENT_NAME); } OUString HelpBackendDb::getKeyElementName() { - return OUSTR(KEY_ELEMENT_NAME); + return OUString(KEY_ELEMENT_NAME); } @@ -77,7 +77,7 @@ void HelpBackendDb::addEntry(::rtl::OUString const & url, Data const & data) Reference<css::xml::dom::XNode> helpNode = writeKeyElement(url); - writeSimpleElement(OUSTR("data-url"), data.dataUrl, helpNode); + writeSimpleElement("data-url", data.dataUrl, helpNode); save(); } } @@ -89,8 +89,7 @@ void HelpBackendDb::addEntry(::rtl::OUString const & url, Data const & data) { Any exc( ::cppu::getCaughtException() ); throw css::deployment::DeploymentException( - OUSTR("Extension Manager: failed to write data entry in help backend db: ") + - m_urlDb, 0, exc); + "Extension Manager: failed to write data entry in help backend db: " + m_urlDb, 0, exc); } } @@ -104,7 +103,7 @@ HelpBackendDb::getEntry(::rtl::OUString const & url) Reference<css::xml::dom::XNode> aNode = getKeyElement(url); if (aNode.is()) { - retData.dataUrl = readSimpleElement(OUSTR("data-url"), aNode); + retData.dataUrl = readSimpleElement("data-url", aNode); } else { @@ -120,14 +119,13 @@ HelpBackendDb::getEntry(::rtl::OUString const & url) { Any exc( ::cppu::getCaughtException() ); throw css::deployment::DeploymentException( - OUSTR("Extension Manager: failed to read data entry in help backend db: ") + - m_urlDb, 0, exc); + "Extension Manager: failed to read data entry in help backend db: " + m_urlDb, 0, exc); } } ::std::list<OUString> HelpBackendDb::getAllDataUrls() { - return getOneChildFromAllEntries(OUString(RTL_CONSTASCII_USTRINGPARAM("data-url"))); + return getOneChildFromAllEntries("data-url"); } } // namespace help diff --git a/desktop/source/deployment/registry/package/dp_extbackenddb.cxx b/desktop/source/deployment/registry/package/dp_extbackenddb.cxx index 7c8b6145918b..72e08aca0b03 100644 --- a/desktop/source/deployment/registry/package/dp_extbackenddb.cxx +++ b/desktop/source/deployment/registry/package/dp_extbackenddb.cxx @@ -49,22 +49,22 @@ ExtensionBackendDb::ExtensionBackendDb( OUString ExtensionBackendDb::getDbNSName() { - return OUSTR(EXTENSION_REG_NS); + return OUString(EXTENSION_REG_NS); } OUString ExtensionBackendDb::getNSPrefix() { - return OUSTR(NS_PREFIX); + return OUString(NS_PREFIX); } OUString ExtensionBackendDb::getRootElementName() { - return OUSTR(ROOT_ELEMENT_NAME); + return OUString(ROOT_ELEMENT_NAME); } OUString ExtensionBackendDb::getKeyElementName() { - return OUSTR(KEY_ELEMENT_NAME); + return OUString(KEY_ELEMENT_NAME); } void ExtensionBackendDb::addEntry(::rtl::OUString const & url, Data const & data) @@ -74,13 +74,8 @@ void ExtensionBackendDb::addEntry(::rtl::OUString const & url, Data const & data if (!activateEntry(url)) { Reference<css::xml::dom::XNode> extensionNodeNode = writeKeyElement(url); - writeVectorOfPair( - data.items, - OUSTR("extension-items"), - OUSTR("item"), - OUSTR("url"), - OUSTR("media-type"), - extensionNodeNode); + writeVectorOfPair( data.items, "extension-items", "item", + "url", "media-type", extensionNodeNode); save(); } } @@ -88,7 +83,7 @@ void ExtensionBackendDb::addEntry(::rtl::OUString const & url, Data const & data { Any exc( ::cppu::getCaughtException() ); throw css::deployment::DeploymentException( - OUSTR("Extension Manager: failed to write data entry in backend db: ") + + "Extension Manager: failed to write data entry in backend db: " + m_urlDb, 0, exc); } } @@ -103,12 +98,8 @@ ExtensionBackendDb::Data ExtensionBackendDb::getEntry(::rtl::OUString const & ur if (aNode.is()) { retData.items = - readVectorOfPair( - aNode, - OUSTR("extension-items"), - OUSTR("item"), - OUSTR("url"), - OUSTR("media-type")); + readVectorOfPair( aNode, "extension-items", "item", + "url", "media-type"); } return retData; } @@ -116,7 +107,7 @@ ExtensionBackendDb::Data ExtensionBackendDb::getEntry(::rtl::OUString const & ur { Any exc( ::cppu::getCaughtException() ); throw css::deployment::DeploymentException( - OUSTR("Extension Manager: failed to read data entry in backend db: ") + + "Extension Manager: failed to read data entry in backend db: " + m_urlDb, 0, exc); } } diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index 17629861213a..95ece1e7b574 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -293,14 +293,13 @@ BackendImpl::BackendImpl( : ImplBaseT( args, xComponentContext ), m_xRootRegistry( xRootRegistry ), m_xBundleTypeInfo( new Package::TypeInfo( - OUSTR("application/vnd.sun.star.package-bundle"), - OUSTR("*.oxt;*.uno.pkg"), + "application/vnd.sun.star.package-bundle", + "*.oxt;*.uno.pkg", getResourceString(RID_STR_PACKAGE_BUNDLE), RID_IMG_DEF_PACKAGE_BUNDLE ) ), m_xLegacyBundleTypeInfo( new Package::TypeInfo( - OUSTR("application/" - "vnd.sun.star.legacy-package-bundle"), - OUSTR("*.zip"), + "application/vnd.sun.star.legacy-package-bundle", + "*.zip", m_xBundleTypeInfo->getShortDescription(), RID_IMG_DEF_PACKAGE_BUNDLE ) ), m_typeInfos(2) @@ -311,7 +310,7 @@ BackendImpl::BackendImpl( if (!transientMode()) { OUString dbFile = makeURL(getCachePath(), getImplementationName()); - dbFile = makeURL(dbFile, OUSTR("backenddb.xml")); + dbFile = makeURL(dbFile, "backenddb.xml"); m_backendDb.reset( new ExtensionBackendDb(getComponentContext(), dbFile)); } @@ -327,7 +326,7 @@ void BackendImpl::disposing() // XServiceInfo OUString BackendImpl::getImplementationName() throw (RuntimeException) { - return OUSTR("com.sun.star.comp.deployment.bundle.PackageRegistryBackend"); + return OUString("com.sun.star.comp.deployment.bundle.PackageRegistryBackend"); } sal_Bool BackendImpl::supportsService( OUString const& name ) @@ -387,25 +386,22 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_( //Every .oxt, uno.pkg file must contain a META-INF folder ::ucbhelper::Content metaInfContent; if (create_ucb_content( - &metaInfContent, makeURL( url, OUSTR("META-INF") ), + &metaInfContent, makeURL( url, "META-INF" ), xCmdEnv, false /* no throw */ )) { - mediaType = OUSTR("application/vnd.sun.star.package-bundle"); + mediaType = OUString("application/vnd.sun.star.package-bundle"); } //No support of legacy bundles, because every folder could be one. } else { const OUString title( StrTitle::getTitle( ucbContent ) ); - if (title.endsWithIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM(".oxt") ) || - title.endsWithIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM(".uno.pkg") )) - mediaType = OUSTR("application/vnd.sun.star.package-bundle"); - else if (title.endsWithIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM(".zip") )) + if (title.endsWithIgnoreAsciiCase(".oxt") || + title.endsWithIgnoreAsciiCase(".uno.pkg")) + mediaType = OUString("application/vnd.sun.star.package-bundle"); + else if (title.endsWithIgnoreAsciiCase(".zip")) mediaType = - OUSTR("application/vnd.sun.star.legacy-package-bundle"); + OUString("application/vnd.sun.star.legacy-package-bundle"); } } if (mediaType.isEmpty()) @@ -498,8 +494,7 @@ BackendImpl * BackendImpl::PackageImpl::getMyBackend() const //May throw a DisposedException check(); //We should never get here... - throw RuntimeException( - OUSTR("Failed to get the BackendImpl"), + throw RuntimeException("Failed to get the BackendImpl", static_cast<OWeakObject*>(const_cast<PackageImpl *>(this))); } return pBackend; @@ -590,7 +585,7 @@ OUString BackendImpl::PackageImpl::getTextFromURL( { Any exc( ::cppu::getCaughtException() ); throw css::deployment::DeploymentException( - OUSTR("Could not read file ") + licenseUrl, 0, exc); + "Could not read file " + licenseUrl, 0, exc); } } @@ -676,14 +671,14 @@ bool BackendImpl::PackageImpl::checkDependencies( //license is available. if (sLic.isEmpty()) throw css::deployment::DeploymentException( - OUSTR("Could not obtain path to license. Possible error in description.xml"), 0, Any()); - OUString sHref = m_url_expanded + OUSTR("/") + sLic; + "Could not obtain path to license. Possible error in description.xml", 0, Any()); + OUString sHref = m_url_expanded + "/" + sLic; OUString sLicense = getTextFromURL(xCmdEnv, sHref); ////determine who has to agree to the license //check correct value for attribute - if ( ! (simplLicAttr->acceptBy.equals(OUSTR("user")) || simplLicAttr->acceptBy.equals(OUSTR("admin")))) + if ( ! (simplLicAttr->acceptBy == "user" || simplLicAttr->acceptBy == "admin")) throw css::deployment::DeploymentException( - OUSTR("Could not obtain attribute simple-lincense@accept-by or it has no valid value"), 0, Any()); + "Could not obtain attribute simple-lincense@accept-by or it has no valid value", 0, Any()); //Only use interaction if there is no version of this extension already installed @@ -705,7 +700,7 @@ bool BackendImpl::PackageImpl::checkDependencies( if (! interactContinuation( Any(licExc), task::XInteractionApprove::static_type(), xCmdEnv, &approve, &abort )) throw css::deployment::DeploymentException( - OUSTR("Could not interact with user."), 0, Any()); + "Could not interact with user.", 0, Any()); if (approve == true) return true; @@ -723,7 +718,7 @@ bool BackendImpl::PackageImpl::checkDependencies( throw; } catch (const css::uno::Exception&) { Any anyExc = cppu::getCaughtException(); - throw css::deployment::DeploymentException(OUSTR("Unexpected exception"), 0, anyExc); + throw css::deployment::DeploymentException("Unexpected exception", 0, anyExc); } } @@ -826,13 +821,13 @@ uno::Reference< graphic::XGraphic > BackendImpl::PackageImpl::getIcon( sal_Bool OUString aIconURL = getDescriptionInfoset().getIconURL( bHighContrast ); if ( !aIconURL.isEmpty() ) { - OUString aFullIconURL = m_url_expanded + OUSTR("/") + aIconURL; + OUString aFullIconURL = m_url_expanded + "/" + aIconURL; uno::Reference< XComponentContext > xContext( getMyBackend()->getComponentContext() ); uno::Reference< graphic::XGraphicProvider > xGraphProvider( graphic::GraphicProvider::create(xContext) ); uno::Sequence< beans::PropertyValue > aMediaProps( 1 ); - aMediaProps[0].Name = OUSTR( "URL" ); + aMediaProps[0].Name = "URL"; aMediaProps[0].Value <<= aFullIconURL; xGraphic = xGraphProvider->queryGraphic( aMediaProps ); @@ -875,7 +870,7 @@ void BackendImpl::PackageImpl::processPackage_( bool approve = false, abort = false; if (! interactContinuation( Any( lang::WrappedTargetException( - OUSTR("bundle item registration error!"), + "bundle item registration error!", static_cast<OWeakObject *>(this), exc ) ), task::XInteractionApprove::static_type(), xCmdEnv, &approve, &abort )) { @@ -891,8 +886,7 @@ void BackendImpl::PackageImpl::processPackage_( continue; { - ProgressLevel progress( - xCmdEnv, OUSTR("rollback...") ); + ProgressLevel progress( xCmdEnv, "rollback..." ); // try rollback for ( ; pos--; ) { @@ -909,7 +903,7 @@ void BackendImpl::PackageImpl::processPackage_( // ignore any errors of rollback } } - progress.update( OUSTR("rollback finished.") ); + progress.update( "rollback finished." ); } deployment::DeploymentException dpExc; @@ -955,7 +949,7 @@ void BackendImpl::PackageImpl::processPackage_( bool approve = false, abort = false; if (! interactContinuation( Any( lang::WrappedTargetException( - OUSTR("bundle item revocation error!"), + "bundle item revocation error!", static_cast<OWeakObject *>(this), exc ) ), task::XInteractionApprove::static_type(), xCmdEnv, &approve, &abort )) { @@ -986,7 +980,7 @@ OUString BackendImpl::PackageImpl::getDescription() OUString sDescription; if (!sRelativeURL.isEmpty()) { - OUString sURL = m_url_expanded + OUSTR("/") + sRelativeURL; + OUString sURL = m_url_expanded + "/" + sRelativeURL; try { @@ -1020,7 +1014,7 @@ OUString BackendImpl::PackageImpl::getLicenseText() if ( !aLicenseURL.isEmpty() ) { - OUString aFullURL = m_url_expanded + OUSTR("/") + aLicenseURL; + OUString aFullURL = m_url_expanded + "/" + aLicenseURL; sLicense = getTextFromURL( Reference< ucb::XCommandEnvironment >(), aFullURL); } } @@ -1043,7 +1037,7 @@ void BackendImpl::PackageImpl::exportTo( m_url_expanded, xCmdEnv, getMyBackend()->getComponentContext() ); OUString title(newTitle); if (title.isEmpty()) - sourceContent.getPropertyValue( OUSTR( "Title" ) ) >>= title; + sourceContent.getPropertyValue( "Title" ) >>= title; OUString destURL( makeURL( destFolderURL, ::rtl::Uri::encode( title, rtl_UriCharClassPchar, rtl_UriEncodeIgnoreEscapes, @@ -1056,7 +1050,7 @@ void BackendImpl::PackageImpl::exportTo( bool replace = false, abort = false; if (! interactContinuation( Any( ucb::NameClashResolveRequest( - OUSTR("file already exists: ") + title, + "file already exists: " + title, static_cast<OWeakObject *>(this), task::InteractionClassification_QUERY, destFolderURL, title, OUString() ) ), @@ -1067,14 +1061,13 @@ void BackendImpl::PackageImpl::exportTo( } } else if (nameClashAction != ucb::NameClash::OVERWRITE) { - throw ucb::CommandFailedException( - OUSTR("unsupported nameClashAction!"), + throw ucb::CommandFailedException("unsupported nameClashAction!", static_cast<OWeakObject *>(this), Any() ); } erase_path( destURL, xCmdEnv ); ::rtl::OUStringBuffer buf; - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.zip://") ); + buf.appendAscii( "vnd.sun.star.zip://" ); buf.append( ::rtl::Uri::encode( destURL, rtl_UriCharClassRegName, rtl_UriEncodeIgnoreEscapes, @@ -1100,7 +1093,7 @@ void BackendImpl::PackageImpl::exportTo( if (! destFolderContent.transferContent( subContent, ::ucbhelper::InsertOperation_COPY, OUString(), ucb::NameClash::OVERWRITE )) - throw RuntimeException( OUSTR("UCB transferContent() failed!"), + throw RuntimeException( "UCB transferContent() failed!", static_cast<OWeakObject *>(this) ); progress.update( Any() ); // animating progress bar } @@ -1109,7 +1102,7 @@ void BackendImpl::PackageImpl::exportTo( // assure META-INF folder: ::ucbhelper::Content metainfFolderContent; create_folder( &metainfFolderContent, - makeURL( destFolderContent.getURL(), OUSTR("META-INF") ), + makeURL( destFolderContent.getURL(), "META-INF" ), xCmdEnv ); if (m_legacyBundle) @@ -1140,9 +1133,9 @@ void BackendImpl::PackageImpl::exportTo( manifest.reserve( bundle.getLength() ); sal_Int32 baseURLlen = m_url_expanded.getLength(); Reference<deployment::XPackage> const *pbundle = bundle.getConstArray(); - const OUString strMediaType = OUSTR("MediaType"); - const OUString strFullPath = OUSTR("FullPath"); - const OUString strIsFolder = OUSTR("IsFolder"); + const OUString strMediaType( "MediaType" ); + const OUString strFullPath( "FullPath" ); + const OUString strIsFolder( "IsFolder" ); for ( sal_Int32 pos = bundle.getLength(); pos--; ) { Reference<deployment::XPackage> const & xPackage = pbundle[ pos ]; @@ -1154,7 +1147,7 @@ void BackendImpl::PackageImpl::exportTo( ::ucbhelper::Content ucbContent( url_, xCmdEnv, getMyBackend()->getComponentContext() ); if (ucbContent.getPropertyValue(strIsFolder).get<bool>()) - fullPath += OUSTR("/"); + fullPath += "/"; Sequence<beans::PropertyValue> attribs( 2 ); beans::PropertyValue * pattribs = attribs.getArray(); pattribs[ 0 ].Name = strFullPath; @@ -1167,7 +1160,7 @@ void BackendImpl::PackageImpl::exportTo( if (xPackageType.is()) mediaType = xPackageType->getMediaType(); else - mediaType = OUSTR("unknown"); + mediaType = "unknown"; pattribs[ 1 ].Value <<= mediaType; manifest.push_back( attribs ); } @@ -1183,7 +1176,7 @@ void BackendImpl::PackageImpl::exportTo( // write buffered pipe data to content: ::ucbhelper::Content manifestContent( - makeURL( metainfFolderContent.getURL(), OUSTR("manifest.xml") ), + makeURL( metainfFolderContent.getURL(), "manifest.xml" ), xCmdEnv, getMyBackend()->getComponentContext() ); manifestContent.writeStream( Reference<io::XInputStream>( xPipe, UNO_QUERY_THROW ), @@ -1195,7 +1188,7 @@ void BackendImpl::PackageImpl::exportTo( ::ucbhelper::Content manifestContent; if ( ! create_ucb_content( &manifestContent, - makeURL( m_url_expanded, OUSTR("META-INF/manifest.xml") ), + makeURL( m_url_expanded, "META-INF/manifest.xml" ), xCmdEnv, false ) ) { OSL_FAIL( "### missing META-INF/manifest.xml file!" ); @@ -1205,13 +1198,13 @@ void BackendImpl::PackageImpl::exportTo( if (! metainfFolderContent.transferContent( manifestContent, ::ucbhelper::InsertOperation_COPY, OUString(), ucb::NameClash::OVERWRITE )) - throw RuntimeException( OUSTR("UCB transferContent() failed!"), + throw RuntimeException( "UCB transferContent() failed!", static_cast<OWeakObject *>(this) ); } // xxx todo: maybe obsolete in the future try { - destFolderContent.executeCommand( OUSTR("flush"), Any() ); + destFolderContent.executeCommand( "flush", Any() ); } catch (const ucb::UnsupportedCommandException &) { } @@ -1249,16 +1242,15 @@ Sequence< Reference<deployment::XPackage> > BackendImpl::PackageImpl::getBundle( OUString mediaType; // probe for script.xlb: if (create_ucb_content( - 0, makeURL( m_url_expanded, OUSTR("script.xlb") ), + 0, makeURL( m_url_expanded, "script.xlb" ), xCmdEnv, false /* no throw */ )) { - mediaType = OUSTR("application/vnd.sun.star.basic-library"); + mediaType = "application/vnd.sun.star.basic-library"; } // probe for dialog.xlb: else if (create_ucb_content( - 0, makeURL( m_url_expanded, OUSTR("dialog.xlb") ), + 0, makeURL( m_url_expanded, "dialog.xlb" ), xCmdEnv, false /* no throw */ )) - mediaType = OUSTR("application/vnd.sun.star." - "dialog-library"); + mediaType = "application/vnd.sun.star.dialog-library"; if (!mediaType.isEmpty()) { const Reference<deployment::XPackage> xPackage( @@ -1293,7 +1285,7 @@ Sequence< Reference<deployment::XPackage> > BackendImpl::PackageImpl::getBundle( catch (const Exception &) { Any exc( ::cppu::getCaughtException() ); throw deployment::DeploymentException( - OUSTR("error scanning bundle: ") + getURL(), + "error scanning bundle: " + getURL(), static_cast<OWeakObject *>(this), exc ); } } @@ -1390,8 +1382,7 @@ Reference<deployment::XPackage> BackendImpl::PackageImpl::bindBundleItem( lang::IllegalArgumentException const *>(0) ) )) { interactContinuation( - Any( lang::WrappedTargetException( - OUSTR("bundle item error!"), + Any( lang::WrappedTargetException("bundle item error!", static_cast<OWeakObject *>(this), exc ) ), task::XInteractionApprove::static_type(), xCmdEnv, 0, 0 ); } @@ -1419,7 +1410,7 @@ void BackendImpl::PackageImpl::scanBundle( ::ucbhelper::Content manifestContent; if (! create_ucb_content( &manifestContent, - makeURL( m_url_expanded, OUSTR("META-INF/manifest.xml") ), + makeURL( m_url_expanded, "META-INF/manifest.xml" ), xCmdEnv, false /* no throw */ )) { OSL_FAIL( "### missing META-INF/manifest.xml file!" ); @@ -1460,8 +1451,7 @@ void BackendImpl::PackageImpl::scanBundle( if (! INetContentTypes::parse( mediaType, type, subType, ¶ms )) continue; - INetContentTypeParameter const * param = params.find( - rtl::OString(RTL_CONSTASCII_STRINGPARAM("platform"))); + INetContentTypeParameter const * param = params.find("platform"); if (param != 0 && !platform_fits( param->m_sValue )) continue; const OUString url( makeURL( packageRootURL, fullPath ) ); @@ -1471,7 +1461,7 @@ void BackendImpl::PackageImpl::scanBundle( subType.equalsIgnoreAsciiCaseAscii( "vnd.sun.star.package-bundle-description")) { // check locale: - param = params.find(rtl::OString(RTL_CONSTASCII_STRINGPARAM("locale"))); + param = params.find("locale"); if (param == 0) { if (descrFile.isEmpty()) descrFile = url; @@ -1549,16 +1539,14 @@ void BackendImpl::PackageImpl::scanLegacyBundle( // check for platform paths: const OUString title( StrTitle::getTitle( ucbContent ) ); - if (title.endsWithIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM(".plt") ) && + if (title.endsWithIgnoreAsciiCase( ".plt" ) && !platform_fits( title.copy( 0, title.getLength() - 4 ) )) { return; } - if (title.endsWithIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM("skip_registration") )) + if (title.endsWithIgnoreAsciiCase("skip_registration") ) skip_registration = true; - OUString ar [] = { OUSTR("Title"), OUSTR("IsFolder") }; + OUString ar [] = { "Title", "IsFolder" }; Reference<sdbc::XResultSet> xResultSet( ucbContent.createCursor( Sequence<OUString>( ar, ARLEN(ar) ), @@ -1588,9 +1576,7 @@ void BackendImpl::PackageImpl::scanLegacyBundle( if (skip_registration && // xxx todo: additional parsing? - mediaType.matchIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM( - "application/vnd.sun.star.uno-component") )) + mediaType.matchIgnoreAsciiCase("application/vnd.sun.star.uno-component")) continue; bundle.push_back( xPackage ); @@ -1598,12 +1584,8 @@ void BackendImpl::PackageImpl::scanLegacyBundle( if (mediaType.isEmpty() || // script.xlb, dialog.xlb can be met everywhere: - mediaType.matchIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM( - "application/vnd.sun.star.basic-library") ) || - mediaType.matchIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM( - "application/vnd.sun.star.dialog-library") )) + mediaType.matchIgnoreAsciiCase("application/vnd.sun.star.basic-library") || + mediaType.matchIgnoreAsciiCase("application/vnd.sun.star.dialog-library")) { if (xRow->getBoolean( 2 /* IsFolder */ )) { // recurse into folder: scanLegacyBundle( diff --git a/desktop/source/deployment/registry/script/dp_script.cxx b/desktop/source/deployment/registry/script/dp_script.cxx index 0791ef5045ff..70fc93d0c5fe 100644 --- a/desktop/source/deployment/registry/script/dp_script.cxx +++ b/desktop/source/deployment/registry/script/dp_script.cxx @@ -145,14 +145,12 @@ BackendImpl::BackendImpl( Reference<XComponentContext> const & xComponentContext ) : t_helper( args, xComponentContext ), m_xBasicLibTypeInfo( new Package::TypeInfo( - OUSTR("application/" - "vnd.sun.star.basic-library"), + "application/vnd.sun.star.basic-library", OUString() /* no file filter */, getResourceString(RID_STR_BASIC_LIB), RID_IMG_SCRIPTLIB) ), m_xDialogLibTypeInfo( new Package::TypeInfo( - OUSTR("application/" - "vnd.sun.star.dialog-library"), + "application/vnd.sun.star.dialog-library", OUString() /* no file filter */, getResourceString(RID_STR_DIALOG_LIB), RID_IMG_DIALOGLIB) ), @@ -165,7 +163,7 @@ BackendImpl::BackendImpl( if (!transientMode()) { - OUString dbFile = makeURL(getCachePath(), OUSTR("backenddb.xml")); + OUString dbFile = makeURL(getCachePath(), "backenddb.xml"); m_backendDb.reset( new ScriptBackendDb(getComponentContext(), dbFile)); } @@ -229,14 +227,14 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_( { // probe for script.xlb: if (create_ucb_content( - 0, makeURL( url, OUSTR("script.xlb") ), + 0, makeURL( url, "script.xlb" ), xCmdEnv, false /* no throw */ )) - mediaType = OUSTR("application/vnd.sun.star.basic-library"); + mediaType = OUString("application/vnd.sun.star.basic-library"); // probe for dialog.xlb: else if (create_ucb_content( - 0, makeURL( url, OUSTR("dialog.xlb") ), + 0, makeURL( url, "dialog.xlb" ), xCmdEnv, false /* no throw */ )) - mediaType = OUSTR("application/vnd.sun.star.dialog-library"); + mediaType = OUString("application/vnd.sun.star.dialog-library"); } if (mediaType.isEmpty()) throw lang::IllegalArgumentException( @@ -250,7 +248,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_( { if (type.equalsIgnoreAsciiCaseAscii("application")) { - OUString dialogURL( makeURL( url, OUSTR("dialog.xlb") ) ); + OUString dialogURL( makeURL( url, "dialog.xlb" ) ); if (! create_ucb_content( 0, dialogURL, xCmdEnv, false /* no throw */ )) { dialogURL = OUString(); @@ -258,7 +256,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_( if (subType.equalsIgnoreAsciiCaseAscii("vnd.sun.star.basic-library")) { - OUString scriptURL( makeURL( url, OUSTR("script.xlb"))); + OUString scriptURL( makeURL( url, "script.xlb")); if (! create_ucb_content( 0, scriptURL, xCmdEnv, false /* no throw */ )) { scriptURL = OUString(); @@ -295,7 +293,7 @@ BackendImpl * BackendImpl::PackageImpl::getMyBackend() const check(); //We should never get here... throw RuntimeException( - OUSTR("Failed to get the BackendImpl"), + "Failed to get the BackendImpl", static_cast<OWeakObject*>(const_cast<PackageImpl *>(this))); } return pBackend; @@ -326,7 +324,7 @@ lcl_maybeRemoveScript( if (bExists && xScriptLibs.is() && xScriptLibs->hasByName(rName)) { const OUString sScriptUrl = xScriptLibs->getOriginalLibraryLinkURL(rName); - if (sScriptUrl.equals(rScriptURL)) + if (sScriptUrl == rScriptURL) xScriptLibs->removeLibrary(rName); } } @@ -347,9 +345,9 @@ lcl_maybeAddScript( //We assume here that library names in extensions are unique, which may not be the case //ToDo: If the script exist in another extension, then both extensions must have the //same id - if (sOriginalUrl.match(OUSTR("vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE")) - || sOriginalUrl.match(OUSTR("vnd.sun.star.expand:$UNO_SHARED_PACKAGES_CACHE")) - || sOriginalUrl.match(OUSTR("vnd.sun.star.expand:$BUNDLED_EXTENSIONS"))) + if (sOriginalUrl.match("vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE") + || sOriginalUrl.match("vnd.sun.star.expand:$UNO_SHARED_PACKAGES_CACHE") + || sOriginalUrl.match("vnd.sun.star.expand:$BUNDLED_EXTENSIONS")) { xScriptLibs->removeLibrary(rName); bCanAdd = true; @@ -395,7 +393,7 @@ void BackendImpl::PackageImpl::processPackage_( { xScriptLibs.set( xComponentContext->getServiceManager()->createInstanceWithContext( - OUSTR("com.sun.star.script.ApplicationScriptLibraryContainer"), + "com.sun.star.script.ApplicationScriptLibraryContainer", xComponentContext ), UNO_QUERY_THROW ); } @@ -403,7 +401,7 @@ void BackendImpl::PackageImpl::processPackage_( { xDialogLibs.set( xComponentContext->getServiceManager()->createInstanceWithContext( - OUSTR("com.sun.star.script.ApplicationDialogLibraryContainer"), + "com.sun.star.script.ApplicationDialogLibraryContainer", xComponentContext ), UNO_QUERY_THROW ); } } diff --git a/desktop/source/deployment/registry/script/dp_scriptbackenddb.cxx b/desktop/source/deployment/registry/script/dp_scriptbackenddb.cxx index 485ac5227752..ccf65f104669 100644 --- a/desktop/source/deployment/registry/script/dp_scriptbackenddb.cxx +++ b/desktop/source/deployment/registry/script/dp_scriptbackenddb.cxx @@ -48,22 +48,22 @@ ScriptBackendDb::ScriptBackendDb( OUString ScriptBackendDb::getDbNSName() { - return OUSTR(EXTENSION_REG_NS); + return OUString(EXTENSION_REG_NS); } OUString ScriptBackendDb::getNSPrefix() { - return OUSTR(NS_PREFIX); + return OUString(NS_PREFIX); } OUString ScriptBackendDb::getRootElementName() { - return OUSTR(ROOT_ELEMENT_NAME); + return OUString(ROOT_ELEMENT_NAME); } OUString ScriptBackendDb::getKeyElementName() { - return OUSTR(KEY_ELEMENT_NAME); + return OUString(KEY_ELEMENT_NAME); } diff --git a/desktop/source/deployment/registry/sfwk/dp_parceldesc.cxx b/desktop/source/deployment/registry/sfwk/dp_parceldesc.cxx index 5e534ddd7c63..dc09f6e52c1f 100644 --- a/desktop/source/deployment/registry/sfwk/dp_parceldesc.cxx +++ b/desktop/source/deployment/registry/sfwk/dp_parceldesc.cxx @@ -83,20 +83,20 @@ ParcelDescDocHandler::startElement( const OUString& aName, RuntimeException ) { - dp_misc::TRACE(OUSTR("ParcelDescDocHandler::startElement() for ") + - aName + OUSTR("\n")); + dp_misc::TRACE("ParcelDescDocHandler::startElement() for " + + aName + "\n"); if ( !skipIndex ) { if ( aName == "parcel" ) { - m_sLang = xAttribs->getValueByName( OUString("language" ) ); + m_sLang = xAttribs->getValueByName( "language" ); } ++skipIndex; } else { - dp_misc::TRACE(OUSTR("ParcelDescDocHandler::startElement() skipping for ") - + aName + OUSTR("\n")); + dp_misc::TRACE("ParcelDescDocHandler::startElement() skipping for " + + aName + "\n"); } } @@ -107,8 +107,8 @@ void SAL_CALL ParcelDescDocHandler::endElement( const OUString & aName ) if ( skipIndex ) { --skipIndex; - dp_misc::TRACE(OUSTR("ParcelDescDocHandler::endElement() skipping for ") - + aName + OUSTR("\n")); + dp_misc::TRACE("ParcelDescDocHandler::endElement() skipping for " + + aName + "\n"); } } diff --git a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx index f28b12cad32f..e414e8558866 100644 --- a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx +++ b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx @@ -112,8 +112,7 @@ BackendImpl * BackendImpl::PackageImpl::getMyBackend() const //May throw a DisposedException check(); //We should never get here... - throw RuntimeException( - OUSTR("Failed to get the BackendImpl"), + throw RuntimeException("Failed to get the BackendImpl", static_cast<OWeakObject*>(const_cast<PackageImpl *>(this))); } return pBackend; @@ -156,7 +155,7 @@ BackendImpl::PackageImpl::PackageImpl( rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 ); m_name = m_displayName; - dp_misc::TRACE(OUSTR("PakageImpl displayName is ") + m_displayName); + dp_misc::TRACE("PakageImpl displayName is " + m_displayName); } //______________________________________________________________________________ @@ -165,9 +164,9 @@ BackendImpl::BackendImpl( Reference<XComponentContext> const & xComponentContext ) : PackageRegistryBackend( args, xComponentContext ), m_xTypeInfo( new Package::TypeInfo( - OUSTR("application/vnd.sun.star.framework-script"), + "application/vnd.sun.star.framework-script", OUString() /* no file filter */, - OUSTR("Scripting Framework Script Library"), + "Scripting Framework Script Library", RID_IMG_SCRIPTLIB ) ) { if (! transientMode()) @@ -207,10 +206,10 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_( { // probe for parcel-descriptor.xml: if (create_ucb_content( - 0, makeURL( url, OUSTR("parcel-descriptor.xml") ), + 0, makeURL( url, "parcel-descriptor.xml" ), xCmdEnv, false /* no throw */ )) { - mediaType = OUSTR("application/vnd.sun.star.framework-script"); + mediaType = OUString("application/vnd.sun.star.framework-script"); } } if (mediaType.isEmpty()) @@ -229,7 +228,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_( { OUString lang = OUString("Script"); OUString sParcelDescURL = makeURL( - url, OUSTR("parcel-descriptor.xml") ); + url, "parcel-descriptor.xml" ); ::ucbhelper::Content ucb_content; @@ -260,13 +259,13 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_( OUString sfwkLibType = getResourceString( RID_STR_SFWK_LIB ); // replace %MACRONAME placeholder with language name - OUString MACRONAME( OUSTR("%MACROLANG" ) ); + OUString MACRONAME( "%MACROLANG" ); sal_Int32 startOfReplace = sfwkLibType.indexOf( MACRONAME ); sal_Int32 charsToReplace = MACRONAME.getLength(); sfwkLibType = sfwkLibType.replaceAt( startOfReplace, charsToReplace, lang ); dp_misc::TRACE("******************************\n"); - dp_misc::TRACE(OUSTR(" BackEnd detected lang = ") + lang + OUSTR("\n")); - dp_misc::TRACE(OUSTR(" for url ") + sParcelDescURL + OUSTR("\n") ); + dp_misc::TRACE(" BackEnd detected lang = " + lang + "\n"); + dp_misc::TRACE(" for url " + sParcelDescURL + "\n"); dp_misc::TRACE("******************************\n"); return new PackageImpl( this, url, sfwkLibType, bRemoved, identifier); } @@ -289,15 +288,15 @@ void BackendImpl::PackageImpl:: initPackageHandler() if ( that->m_eContext == CONTEXT_USER ) { - aContext <<= OUSTR("user"); + aContext <<= OUString("user"); } else if ( that->m_eContext == CONTEXT_SHARED ) { - aContext <<= OUSTR("share"); + aContext <<= OUString("share"); } else if ( that->m_eContext == CONTEXT_BUNDLED ) { - aContext <<= OUSTR("bundled"); + aContext <<= OUString("bundled"); } else { @@ -307,7 +306,7 @@ void BackendImpl::PackageImpl:: initPackageHandler() Reference< provider::XScriptProviderFactory > xFac( that->getComponentContext()->getValueByName( - OUSTR( "/singletons/com.sun.star.script.provider.theMasterScriptProviderFactory") ), UNO_QUERY ); + "/singletons/com.sun.star.script.provider.theMasterScriptProviderFactory"), UNO_QUERY ); if ( xFac.is() ) { @@ -347,7 +346,7 @@ void BackendImpl::PackageImpl::processPackage_( if ( !m_xNameCntrPkgHandler.is() ) { dp_misc::TRACE("no package handler!!!!\n"); - throw RuntimeException( OUSTR("No package Handler " ), + throw RuntimeException( "No package Handler ", Reference< XInterface >() ); } |