diff options
Diffstat (limited to 'xmlhelp')
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/content.cxx | 24 | ||||
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/databases.cxx | 140 | ||||
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/provider.cxx | 44 | ||||
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/resultsetbase.cxx | 20 | ||||
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx | 16 | ||||
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx | 12 | ||||
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/urlparameter.cxx | 18 | ||||
-rw-r--r-- | xmlhelp/source/cxxhelp/test/searchdemo.cxx | 12 | ||||
-rw-r--r-- | xmlhelp/source/treeview/tvfactory.cxx | 10 | ||||
-rw-r--r-- | xmlhelp/source/treeview/tvread.cxx | 76 |
10 files changed, 186 insertions, 186 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/content.cxx b/xmlhelp/source/cxxhelp/provider/content.cxx index cc0522740ce6..55ceac639727 100644 --- a/xmlhelp/source/cxxhelp/provider/content.cxx +++ b/xmlhelp/source/cxxhelp/provider/content.cxx @@ -163,7 +163,7 @@ uno::Sequence< uno::Type > SAL_CALL Content::getTypes() rtl::OUString SAL_CALL Content::getImplementationName() throw( uno::RuntimeException ) { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "CHelpContent" )); + return rtl::OUString( "CHelpContent" ); } //========================================================================= @@ -173,7 +173,7 @@ uno::Sequence< rtl::OUString > SAL_CALL Content::getSupportedServiceNames() { uno::Sequence< rtl::OUString > aSNS( 1 ); aSNS.getArray()[ 0 ] - = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( MYUCP_CONTENT_SERVICE_NAME )); + = rtl::OUString( MYUCP_CONTENT_SERVICE_NAME ); return aSNS; } @@ -187,7 +187,7 @@ uno::Sequence< rtl::OUString > SAL_CALL Content::getSupportedServiceNames() rtl::OUString SAL_CALL Content::getContentType() throw( uno::RuntimeException ) { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( MYUCP_CONTENT_TYPE )); + return rtl::OUString( MYUCP_CONTENT_TYPE ); } //========================================================================= @@ -460,8 +460,8 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( if ( rProp.Name == "ContentType" ) xRow->appendString( rProp, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "application/vnd.sun.star.help" )) ); + rtl::OUString( + "application/vnd.sun.star.help" ) ); else if ( rProp.Name == "Title" ) xRow->appendString ( rProp,m_aURLParameter.get_title() ); else if ( rProp.Name == "IsReadOnly" ) @@ -480,18 +480,18 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( if( m_aURLParameter.isPicture() ) xRow->appendString( rProp, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "image/gif" )) ); + rtl::OUString( "image/gif" ) ); else if( m_aURLParameter.isActive() ) xRow->appendString( rProp, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "text/plain" )) ); + rtl::OUString( "text/plain" ) ); else if( m_aURLParameter.isFile() ) xRow->appendString( - rProp,rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "text/html" )) ); + rProp,rtl::OUString( "text/html" ) ); else if( m_aURLParameter.isRoot() ) xRow->appendString( rProp, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "text/css" )) ); + rtl::OUString( "text/css" ) ); else xRow->appendVoid( rProp ); else if( m_aURLParameter.isModule() ) @@ -542,8 +542,8 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( else if ( rProp.Name == "SearchScopes" ) { uno::Sequence< rtl::OUString > seq( 2 ); - seq[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Heading" )); - seq[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FullText" )); + seq[0] = rtl::OUString( "Heading" ); + seq[1] = rtl::OUString( "FullText" ); uno::Any aAny; aAny <<= seq; xRow->appendObject( rProp,aAny ); @@ -562,7 +562,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( } else xRow->appendVoid( rProp ); - else if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("AnchorName")) && + else if( "AnchorName" == rProp.Name && m_aURLParameter.isFile() ) xRow->appendString( rProp,m_aURLParameter.get_tag() ); else diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx index 0af076bb2b24..7d9c7e50334f 100644 --- a/xmlhelp/source/cxxhelp/provider/databases.cxx +++ b/xmlhelp/source/cxxhelp/provider/databases.cxx @@ -82,7 +82,7 @@ using namespace com::sun::star::deployment; using namespace com::sun::star::beans; -static rtl::OUString aSlash(RTL_CONSTASCII_USTRINGPARAM("/")); +static rtl::OUString aSlash("/"); rtl::OUString Databases::expandURL( const rtl::OUString& aURL ) { @@ -104,18 +104,18 @@ rtl::OUString Databases::expandURL( const rtl::OUString& aURL, Reference< uno::X Reference< XMultiComponentFactory > xSMgr( xContext->getServiceManager(), UNO_QUERY ); xFac = Reference< uri::XUriReferenceFactory >( - xSMgr->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.uri.UriReferenceFactory")), xContext ) , UNO_QUERY ); + xSMgr->createInstanceWithContext( rtl::OUString( + "com.sun.star.uri.UriReferenceFactory"), xContext ) , UNO_QUERY ); if( !xFac.is() ) { throw RuntimeException( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Databases::expand(), could not instatiate UriReferenceFactory." )), + ::rtl::OUString( "Databases::expand(), could not instatiate UriReferenceFactory." ), Reference< XInterface >() ); } xMacroExpander = Reference< util::XMacroExpander >( xContext->getValueByName( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/singletons/com.sun.star.util.theMacroExpander" )) ), + ::rtl::OUString( "/singletons/com.sun.star.util.theMacroExpander" ) ), UNO_QUERY_THROW ); } @@ -153,13 +153,13 @@ Databases::Databases( sal_Bool showBasic, m_nCustomCSSDocLength( 0 ), m_pCustomCSSDoc( 0 ), m_aCSS(styleSheet.toAsciiLowerCase()), - newProdName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "$[officename]" )) ), - newProdVersion(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "$[officeversion]" )) ), - prodName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "%PRODUCTNAME" )) ), - prodVersion( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "%PRODUCTVERSION" )) ), - vendName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "%VENDORNAME" )) ), - vendVersion( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "%VENDORVERSION" )) ), - vendShort( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "%VENDORSHORT" )) ), + newProdName(rtl::OUString( "$[officename]" ) ), + newProdVersion(rtl::OUString( "$[officeversion]" ) ), + prodName( rtl::OUString( "%PRODUCTNAME" ) ), + prodVersion( rtl::OUString( "%PRODUCTVERSION" ) ), + vendName( rtl::OUString( "%VENDORNAME" ) ), + vendVersion( rtl::OUString( "%VENDORVERSION" ) ), + vendShort( rtl::OUString( "%VENDORSHORT" ) ), m_aImagesZipPaths( imagesZipPaths ), m_nSymbolsStyle( 0 ) { @@ -182,7 +182,7 @@ Databases::Databases( sal_Bool showBasic, setInstallPath( instPath ); m_xSFA = Reference< ucb::XSimpleFileAccess >( - m_xSMgr->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" )), + m_xSMgr->createInstanceWithContext( rtl::OUString( "com.sun.star.ucb.SimpleFileAccess" ), m_xContext ), UNO_QUERY_THROW ); } @@ -248,7 +248,7 @@ static bool impl_getZipFile( { if ( 1 + aFileName.lastIndexOf( '/' ) != aFileName.getLength() ) { - aFileName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" )); + aFileName += rtl::OUString( "/" ); } aFileName += rZipName; // the icons are not read when the URL is a symlink @@ -270,23 +270,23 @@ rtl::OString Databases::getImagesZipFileURL() try { uno::Reference< lang::XMultiServiceFactory > xConfigProvider( - m_xSMgr ->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider")), m_xContext), uno::UNO_QUERY_THROW); + m_xSMgr ->createInstanceWithContext(::rtl::OUString("com.sun.star.configuration.ConfigurationProvider"), m_xContext), uno::UNO_QUERY_THROW); // set root path uno::Sequence < uno::Any > lParams(1); beans::PropertyValue aParam ; - aParam.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath")); - aParam.Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Common")); + aParam.Name = ::rtl::OUString("nodepath"); + aParam.Value <<= ::rtl::OUString("org.openoffice.Office.Common"); lParams[0] = uno::makeAny(aParam); // open it uno::Reference< uno::XInterface > xCFG( xConfigProvider->createInstanceWithArguments( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess")), + ::rtl::OUString("com.sun.star.configuration.ConfigurationAccess"), lParams) ); bool bChanged = false; uno::Reference< container::XHierarchicalNameAccess > xAccess(xCFG, uno::UNO_QUERY_THROW); - uno::Any aResult = xAccess->getByHierarchicalName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Misc/SymbolSet"))); + uno::Any aResult = xAccess->getByHierarchicalName(::rtl::OUString("Misc/SymbolSet")); if ( (aResult >>= nSymbolsStyle) && m_nSymbolsStyle != nSymbolsStyle ) { m_nSymbolsStyle = nSymbolsStyle; @@ -296,21 +296,21 @@ rtl::OString Databases::getImagesZipFileURL() if ( m_aImagesZipFileURL.isEmpty() || bChanged ) { rtl::OUString aImageZip, aSymbolsStyleName; - aResult = xAccess->getByHierarchicalName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Misc/SymbolStyle"))); + aResult = xAccess->getByHierarchicalName(::rtl::OUString("Misc/SymbolStyle")); aResult >>= aSymbolsStyleName; bool bFound = false; if ( !aSymbolsStyleName.isEmpty() ) { - rtl::OUString aZipName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "images_" )); + rtl::OUString aZipName = rtl::OUString( "images_" ); aZipName += aSymbolsStyleName; - aZipName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ".zip" )); + aZipName += rtl::OUString( ".zip" ); bFound = impl_getZipFile( m_aImagesZipPaths, aZipName, aImageZip ); } if ( ! bFound ) - bFound = impl_getZipFile( m_aImagesZipPaths, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "images.zip" )), aImageZip ); + bFound = impl_getZipFile( m_aImagesZipPaths, rtl::OUString( "images.zip" ), aImageZip ); if ( ! bFound ) aImageZip = rtl::OUString(); @@ -455,7 +455,7 @@ StaticModuleInformation* Databases::getStaticInformationForModule( const rtl::OU { osl::MutexGuard aGuard( m_aMutex ); - rtl::OUString key = processLang(Language) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" )) + Module; + rtl::OUString key = processLang(Language) + rtl::OUString( "/" ) + Module; std::pair< ModInfoTable::iterator,bool > aPair = m_aModInfo.insert( ModInfoTable::value_type( key,0 ) ); @@ -466,7 +466,7 @@ StaticModuleInformation* Databases::getStaticInformationForModule( const rtl::OU { osl::File cfgFile( getInstallPathAsURL() + key + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ".cfg" )) ); + rtl::OUString( ".cfg" ) ); if( osl::FileBase::E_None != cfgFile.open( osl_File_OpenFlag_Read ) ) it->second = 0; @@ -485,7 +485,7 @@ StaticModuleInformation* Databases::getStaticInformationForModule( const rtl::OU const sal_Unicode* str = fileContent.getStr(); rtl::OUString current,lang_,program,startid,title,heading,fulltext; - rtl::OUString order(RTL_CONSTASCII_USTRINGPARAM( "1" )); + rtl::OUString order( "1" ); for( sal_Int32 i = 0;i < fileContent.getLength();i++ ) { @@ -601,7 +601,7 @@ Db* Databases::getBerkeley( const rtl::OUString& Database, osl::MutexGuard aGuard( m_aMutex ); - rtl::OUString aFileExt( helpText ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".ht")) : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".db" )) ); + rtl::OUString aFileExt( helpText ? rtl::OUString(".ht") : rtl::OUString(".db") ); rtl::OUString dbFileName = aSlash + Database + aFileExt; rtl::OUString key; if( pExtensionPath == NULL ) @@ -627,7 +627,7 @@ Db* Databases::getBerkeley( const rtl::OUString& Database, rtl::OUString fileNameDBHelp( fileURL ); //Extensions always use the new format if( pExtensionPath != NULL ) - fileNameDBHelp += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "_" )); + fileNameDBHelp += rtl::OUString( "_" ); //SimpleFileAccess takes file URLs as arguments!!! Using filenames works accidentally but //fails for example when using long path names on Windows (starting with \\?\) if( m_xSFA->exists( fileNameDBHelp ) ) @@ -665,28 +665,28 @@ Databases::getCollator( const rtl::OUString& Language, { it->second = Reference< XCollator > ( - m_xSMgr->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.i18n.Collator" )), + m_xSMgr->createInstanceWithContext( rtl::OUString( "com.sun.star.i18n.Collator" ), m_xContext ), UNO_QUERY ); rtl::OUString langStr = processLang(Language); rtl::OUString countryStr = country(Language); if( countryStr.isEmpty() ) { if( langStr.compareToAscii("de") == 0 ) - countryStr = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DE")); + countryStr = rtl::OUString("DE"); else if( langStr.compareToAscii("en") == 0 ) - countryStr = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("US")); + countryStr = rtl::OUString("US"); else if( langStr.compareToAscii("es") == 0 ) - countryStr = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ES")); + countryStr = rtl::OUString("ES"); else if( langStr.compareToAscii("it") == 0 ) - countryStr = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IT")); + countryStr = rtl::OUString("IT"); else if( langStr.compareToAscii("fr") == 0 ) - countryStr = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FR")); + countryStr = rtl::OUString("FR"); else if( langStr.compareToAscii("sv") == 0 ) - countryStr = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SE")); + countryStr = rtl::OUString("SE"); else if( langStr.compareToAscii("ja") == 0 ) - countryStr = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JP")); + countryStr = rtl::OUString("JP"); else if( langStr.compareToAscii("ko") == 0 ) - countryStr = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KR")); + countryStr = rtl::OUString("KR"); } it->second->loadDefaultCollator( Locale( langStr, countryStr, @@ -901,7 +901,7 @@ KeywordInfo* Databases::getKeyword( const rtl::OUString& Database, { osl::MutexGuard aGuard( m_aMutex ); - rtl::OUString key = processLang(Language) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" )) + Database; + rtl::OUString key = processLang(Language) + rtl::OUString( "/" ) + Database; std::pair< KeywordInfoTable::iterator,bool > aPair = m_aKeywordInfo.insert( KeywordInfoTable::value_type( key,0 ) ); @@ -921,7 +921,7 @@ KeywordInfo* Databases::getKeyword( const rtl::OUString& Database, rtl::OUString fileNameDBHelp( fileURL ); if( bExtension ) - fileNameDBHelp += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "_" )); + fileNameDBHelp += rtl::OUString( "_" ); if( m_xSFA->exists( fileNameDBHelp ) ) { DBHelp aDBHelp( fileNameDBHelp, m_xSFA ); @@ -1077,14 +1077,14 @@ Reference< XHierarchicalNameAccess > Databases::jarFile( const rtl::OUString& ja // let ZipPackage be used ( no manifest.xml is required ) beans::NamedValue aArg; - aArg.Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StorageFormat" ) ); + aArg.Name = ::rtl::OUString( "StorageFormat" ); aArg.Value <<= ZIP_STORAGE_FORMAT_STRING; aArguments[ 1 ] <<= aArg; Reference< XInterface > xIfc = m_xSMgr->createInstanceWithArgumentsAndContext( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.packages.comp.ZipPackage" )), + rtl::OUString( + "com.sun.star.packages.comp.ZipPackage" ), aArguments, m_xContext ); if ( xIfc.is() ) @@ -1231,7 +1231,7 @@ void Databases::cascadingStylesheet( const rtl::OUString& Language, { // #i50760: "default" needs to adapt HC mode uno::Reference< awt::XToolkit > xToolkit = uno::Reference< awt::XToolkit >( - ::comphelper::getProcessServiceFactory()->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.Toolkit" ) ) ), uno::UNO_QUERY ); + ::comphelper::getProcessServiceFactory()->createInstance( rtl::OUString( "com.sun.star.awt.Toolkit" ) ), uno::UNO_QUERY ); if ( xToolkit.is() ) { uno::Reference< awt::XExtendedToolkit > xExtToolkit( xToolkit, uno::UNO_QUERY ); @@ -1243,9 +1243,9 @@ void Databases::cascadingStylesheet( const rtl::OUString& Language, uno::Reference< awt::XVclWindowPeer > xVclWindowPeer( xTopWindow, uno::UNO_QUERY ); if ( xVclWindowPeer.is() ) { - uno::Any aHCMode = xVclWindowPeer->getProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HighContrastMode" )) ); + uno::Any aHCMode = xVclWindowPeer->getProperty( rtl::OUString( "HighContrastMode" ) ); if ( ( aHCMode >>= bHighContrastMode ) && bHighContrastMode ) - aCSS = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "highcontrastblack" )); + aCSS = rtl::OUString( "highcontrastblack" ); } } } @@ -1259,14 +1259,14 @@ void Databases::cascadingStylesheet( const rtl::OUString& Language, fileURL = getInstallPathAsURL() + processLang( Language ) + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" )) + + rtl::OUString( "/" ) + aCSS + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ".css" )); + rtl::OUString( ".css" ); else if( retry == 1 ) fileURL = getInstallPathAsURL() + aCSS + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ".css" )); + rtl::OUString( ".css" ); osl::DirectoryItem aDirItem; osl::File aFile( fileURL ); @@ -1291,7 +1291,7 @@ void Databases::cascadingStylesheet( const rtl::OUString& Language, if ( !retry && error && bHighContrastMode ) { // fall back to default css - aCSS = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "default" )); + aCSS = rtl::OUString( "default" ); retry = 2; bHighContrastMode = sal_False; } @@ -1398,7 +1398,7 @@ void Databases::setInstallPath( const rtl::OUString& aInstDir ) //TODO: check returned error code if( m_aInstallDirectory.lastIndexOf( sal_Unicode( '/' ) ) != m_aInstallDirectory.getLength() - 1 ) - m_aInstallDirectory += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" )); + m_aInstallDirectory += rtl::OUString( "/" ); } @@ -1438,20 +1438,20 @@ void ExtensionIteratorBase::init() if (xProps.is()) { xProps->getPropertyValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ) ) >>= m_xContext; + ::rtl::OUString( "DefaultContext" ) ) >>= m_xContext; OSL_ASSERT( m_xContext.is() ); } } if( !m_xContext.is() ) { throw RuntimeException( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ExtensionIteratorBase::init(), no XComponentContext" )), + ::rtl::OUString( "ExtensionIteratorBase::init(), no XComponentContext" ), Reference< XInterface >() ); } Reference< XMultiComponentFactory > xSMgr( m_xContext->getServiceManager(), UNO_QUERY ); m_xSFA = Reference< ucb::XSimpleFileAccess >( - xSMgr->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" )), + xSMgr->createInstanceWithContext( rtl::OUString( "com.sun.star.ucb.SimpleFileAccess" ), m_xContext ), UNO_QUERY_THROW ); m_bUserPackagesLoaded = false; @@ -1491,7 +1491,7 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetHelpPackageFromP } if( bRegistered ) { - rtl::OUString aHelpMediaType( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.sun.star.help" ) ); + rtl::OUString aHelpMediaType( "application/vnd.sun.star.help" ); if( xPackage->isBundle() ) { Sequence< Reference< deployment::XPackage > > aPkgSeq = xPackage->getBundle @@ -1535,7 +1535,7 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextUserHelpPack { Reference< XExtensionManager > xExtensionManager = ExtensionManager::get(m_xContext); m_aUserPackagesSeq = xExtensionManager->getDeployedExtensions - ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("user")), Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() ); + ( rtl::OUString("user"), Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() ); m_bUserPackagesLoaded = true; } @@ -1563,7 +1563,7 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextSharedHelpPa { Reference< XExtensionManager > xExtensionManager = ExtensionManager::get(m_xContext); m_aSharedPackagesSeq = xExtensionManager->getDeployedExtensions - ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("shared")), Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() ); + ( rtl::OUString("shared"), Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() ); m_bSharedPackagesLoaded = true; } @@ -1591,7 +1591,7 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextBundledHelpP { Reference< XExtensionManager > xExtensionManager = ExtensionManager::get(m_xContext); m_aBundledPackagesSeq = xExtensionManager->getDeployedExtensions - ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("bundled")), Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() ); + ( rtl::OUString("bundled"), Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() ); m_bBundledPackagesLoaded = true; } @@ -1826,7 +1826,7 @@ rtl::OUString KeyDataBaseFileIterator::nextDbFile( bool& o_rbExtension ) aRetFile = m_rDatabases.getInstallPathAsURL() + m_rDatabases.processLang( m_aLanguage ) + aSlash + m_aInitialModule + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ".key" )); + rtl::OUString( ".key" ); o_rbExtension = false; @@ -1887,7 +1887,7 @@ rtl::OUString KeyDataBaseFileIterator::implGetDbFileFromPackage ( Reference< deployment::XPackage > xPackage ) { rtl::OUString aExpandedURL = - implGetFileFromPackage( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ".key" )), xPackage ); + implGetFileFromPackage( rtl::OUString( ".key" ), xPackage ); return aExpandedURL; } @@ -1960,7 +1960,7 @@ Reference< XHierarchicalNameAccess > JarFileIterator::implGetJarFromPackage Reference< XHierarchicalNameAccess > xNA; rtl::OUString zipFile = - implGetFileFromPackage( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ".jar" )), xPackage ); + implGetFileFromPackage( rtl::OUString( ".jar" ), xPackage ); try { @@ -1969,15 +1969,15 @@ Reference< XHierarchicalNameAccess > JarFileIterator::implGetJarFromPackage // let ZipPackage be used ( no manifest.xml is required ) beans::NamedValue aArg; - aArg.Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StorageFormat" ) ); + aArg.Name = ::rtl::OUString( "StorageFormat" ); aArg.Value <<= ZIP_STORAGE_FORMAT_STRING; aArguments[ 1 ] <<= aArg; Reference< XMultiComponentFactory >xSMgr( m_xContext->getServiceManager(), UNO_QUERY ); Reference< XInterface > xIfc = xSMgr->createInstanceWithArgumentsAndContext( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.packages.comp.ZipPackage" )), + rtl::OUString( + "com.sun.star.packages.comp.ZipPackage" ), aArguments, m_xContext ); if ( xIfc.is() ) @@ -2030,7 +2030,7 @@ rtl::OUString IndexFolderIterator::nextIndexFolder( bool& o_rbExtension, bool& o aIndexFolder = m_rDatabases.getInstallPathAsURL() + m_rDatabases.processLang( m_aLanguage ) + aSlash + m_aInitialModule + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ".idxl" )); + rtl::OUString( ".idxl" ); o_rbTemporary = false; o_rbExtension = false; @@ -2090,7 +2090,7 @@ rtl::OUString IndexFolderIterator::nextIndexFolder( bool& o_rbExtension, bool& o rtl::OUString IndexFolderIterator::implGetIndexFolderFromPackage( bool& o_rbTemporary, Reference< deployment::XPackage > xPackage ) { rtl::OUString aIndexFolder = - implGetFileFromPackage( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ".idxl" )), xPackage ); + implGetFileFromPackage( rtl::OUString( ".idxl" ), xPackage ); o_rbTemporary = false; if( !m_xSFA->isFolder( aIndexFolder ) ) @@ -2103,7 +2103,7 @@ rtl::OUString IndexFolderIterator::implGetIndexFolderFromPackage( bool& o_rbTemp bool bIsWriteAccess = false; try { - rtl::OUString aCreateTestFolder = aLangURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "CreateTestFolder" )); + rtl::OUString aCreateTestFolder = aLangURL + rtl::OUString( "CreateTestFolder" ); m_xSFA->createFolder( aCreateTestFolder ); if( m_xSFA->isFolder( aCreateTestFolder ) ) bIsWriteAccess = true; @@ -2124,9 +2124,9 @@ rtl::OUString IndexFolderIterator::implGetIndexFolderFromPackage( bool& o_rbTemp if( nLastSlash != -1 ) aLang = aLangURL.copy( nLastSlash + 1 ); else - aLang = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "en" )); + aLang = rtl::OUString( "en" ); - rtl::OUString aMod(RTL_CONSTASCII_USTRINGPARAM("help")); + rtl::OUString aMod("help"); rtl::OUString aZipDir = aLangURL; if( !bIsWriteAccess ) @@ -2154,9 +2154,9 @@ rtl::OUString IndexFolderIterator::implGetIndexFolderFromPackage( bool& o_rbTemp aIndexer.indexDocuments(); if( bIsWriteAccess ) - aIndexFolder = implGetFileFromPackage( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ".idxl" )), xPackage ); + aIndexFolder = implGetFileFromPackage( rtl::OUString( ".idxl" ), xPackage ); else - aIndexFolder = aZipDir + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/help.idxl" )); + aIndexFolder = aZipDir + rtl::OUString( "/help.idxl" ); } catch (const Exception &) { diff --git a/xmlhelp/source/cxxhelp/provider/provider.cxx b/xmlhelp/source/cxxhelp/provider/provider.cxx index 5a65314478a3..79e4c0a1e5bb 100644 --- a/xmlhelp/source/cxxhelp/provider/provider.cxx +++ b/xmlhelp/source/cxxhelp/provider/provider.cxx @@ -67,7 +67,7 @@ ContentProvider::ContentProvider( const uno::Reference< lang::XMultiServiceFactory >& rSMgr ) : ::ucbhelper::ContentProviderImplHelper( rSMgr ), isInitialized( false ), - m_aScheme(RTL_CONSTASCII_USTRINGPARAM(MYUCP_URL_SCHEME)), + m_aScheme(MYUCP_URL_SCHEME), m_pDatabases( 0 ) { } @@ -120,7 +120,7 @@ rtl::OUString SAL_CALL ContentProvider::getImplementationName() rtl::OUString ContentProvider::getImplementationName_Static() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CHelpContentProvider" )); + return rtl::OUString("CHelpContentProvider" ); } sal_Bool SAL_CALL @@ -160,11 +160,11 @@ ContentProvider::getSupportedServiceNames_Static() { uno::Sequence< rtl::OUString > aSNS( 2 ); aSNS.getArray()[ 0 ] = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - MYUCP_CONTENT_PROVIDER_SERVICE_NAME1 )); + rtl::OUString( + MYUCP_CONTENT_PROVIDER_SERVICE_NAME1 ); aSNS.getArray()[ 1 ] = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - MYUCP_CONTENT_PROVIDER_SERVICE_NAME2 )); + rtl::OUString( + MYUCP_CONTENT_PROVIDER_SERVICE_NAME2 ); return aSNS; } @@ -275,7 +275,7 @@ void ContentProvider::init() rtl::OUString instPath( getKey( xHierAccess,"Path/Current/Help" ) ); if( instPath.isEmpty() ) // try to determine path from default - instPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "$(instpath)/help" )); + instPath = rtl::OUString( "$(instpath)/help" ); // replace anything like $(instpath); subst( instPath ); @@ -288,7 +288,7 @@ void ContentProvider::init() if( xAccess.is() ) { uno::Any aAny = - xAccess->getByName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Help" )) ); + xAccess->getByName( rtl::OUString( "Help" ) ); aAny >>= m_xContainer; if( m_xContainer.is() ) m_xContainer->addContainerListener( this ); @@ -307,21 +307,21 @@ void ContentProvider::init() try { uno::Reference< lang::XMultiServiceFactory > xConfigProvider( - m_xSMgr ->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider"))), uno::UNO_QUERY_THROW); + m_xSMgr ->createInstance(::rtl::OUString("com.sun.star.configuration.ConfigurationProvider")), uno::UNO_QUERY_THROW); uno::Sequence < uno::Any > lParams(1); beans::PropertyValue aParam ; - aParam.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath")); - aParam.Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Setup/Product")); + aParam.Name = ::rtl::OUString("nodepath"); + aParam.Value <<= ::rtl::OUString("/org.openoffice.Setup/Product"); lParams[0] = uno::makeAny(aParam); // open it uno::Reference< uno::XInterface > xCFG( xConfigProvider->createInstanceWithArguments( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess")), + ::rtl::OUString("com.sun.star.configuration.ConfigurationAccess"), lParams) ); uno::Reference< container::XNameAccess > xDirectAccess(xCFG, uno::UNO_QUERY); - uno::Any aRet = xDirectAccess->getByName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooSetupExtension"))); + uno::Any aRet = xDirectAccess->getByName(::rtl::OUString("ooSetupExtension")); aRet >>= setupextension; } @@ -331,7 +331,7 @@ void ContentProvider::init() rtl::OUString productversion( setupversion + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( " " )) + + rtl::OUString( " " ) + setupextension ); uno::Sequence< rtl::OUString > aImagesZipPaths( 2 ); @@ -341,7 +341,7 @@ void ContentProvider::init() subst( aPath ); aImagesZipPaths[ 0 ] = aPath; - aPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$BRAND_BASE_DIR/share/config")); + aPath = rtl::OUString("$BRAND_BASE_DIR/share/config"); rtl::Bootstrap::expandMacros(aPath); aImagesZipPaths[ 1 ] = aPath; @@ -351,7 +351,7 @@ void ContentProvider::init() if (xProps.is()) { xProps->getPropertyValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ) ) >>= xContext; + ::rtl::OUString( "DefaultContext" ) ) >>= xContext; OSL_ASSERT( xContext.is() ); } @@ -374,8 +374,8 @@ ContentProvider::getConfiguration() const try { rtl::OUString sProviderService = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.configuration.ConfigurationProvider" )); + rtl::OUString( + "com.sun.star.configuration.ConfigurationProvider" ); sProvider = uno::Reference< lang::XMultiServiceFactory >( m_xSMgr->createInstance( sProviderService ), @@ -401,8 +401,8 @@ ContentProvider::getHierAccess( { uno::Sequence< uno::Any > seq( 1 ); rtl::OUString sReaderService( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.configuration.ConfigurationAccess" )) ); + rtl::OUString( + "com.sun.star.configuration.ConfigurationAccess" ) ); seq[ 0 ] <<= rtl::OUString::createFromAscii( file ); @@ -479,8 +479,8 @@ void ContentProvider::subst( rtl::OUString& instpath ) const xCfgMgr = uno::Reference< frame::XConfigManager >( m_xSMgr->createInstance( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.config.SpecialConfigManager" )) ), + rtl::OUString( + "com.sun.star.config.SpecialConfigManager" ) ), uno::UNO_QUERY ); } catch( const uno::Exception&) diff --git a/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx b/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx index d209bb63d5f3..5319a58ca34b 100644 --- a/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx +++ b/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx @@ -503,12 +503,12 @@ ResultSetBase::getPropertySetInfo() throw( uno::RuntimeException) { uno::Sequence< beans::Property > seq(2); - seq[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowCount" )); + seq[0].Name = rtl::OUString( "RowCount" ); seq[0].Handle = -1; seq[0].Type = getCppuType( static_cast< sal_Int32* >(0) ); seq[0].Attributes = beans::PropertyAttribute::READONLY; - seq[1].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "IsRowCountFinal" )); + seq[1].Name = rtl::OUString( "IsRowCountFinal" ); seq[1].Handle = -1; seq[1].Type = getCppuType( static_cast< sal_Bool* >(0) ); seq[1].Attributes = beans::PropertyAttribute::READONLY; @@ -529,8 +529,8 @@ void SAL_CALL ResultSetBase::setPropertyValue( { (void)aValue; - if( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "IsRowCountFinal" )) || - aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowCount" )) ) + if( aPropertyName == rtl::OUString( "IsRowCountFinal" ) || + aPropertyName == rtl::OUString( "RowCount" ) ) return; throw beans::UnknownPropertyException(); @@ -543,13 +543,13 @@ uno::Any SAL_CALL ResultSetBase::getPropertyValue( lang::WrappedTargetException, uno::RuntimeException) { - if( PropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "IsRowCountFinal" )) ) + if( PropertyName == rtl::OUString( "IsRowCountFinal" ) ) { uno::Any aAny; aAny <<= m_bRowCountFinal; return aAny; } - else if ( PropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowCount" )) ) + else if ( PropertyName == rtl::OUString( "RowCount" ) ) { uno::Any aAny; sal_Int32 count = m_aItems.size(); @@ -568,7 +568,7 @@ void SAL_CALL ResultSetBase::addPropertyChangeListener( lang::WrappedTargetException, uno::RuntimeException) { - if( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "IsRowCountFinal" )) ) + if( aPropertyName == rtl::OUString( "IsRowCountFinal" ) ) { osl::MutexGuard aGuard( m_aMutex ); if ( ! m_pIsFinalListeners ) @@ -577,7 +577,7 @@ void SAL_CALL ResultSetBase::addPropertyChangeListener( m_pIsFinalListeners->addInterface( xListener ); } - else if ( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowCount" )) ) + else if ( aPropertyName == rtl::OUString( "RowCount" ) ) { osl::MutexGuard aGuard( m_aMutex ); if ( ! m_pRowCountListeners ) @@ -597,13 +597,13 @@ void SAL_CALL ResultSetBase::removePropertyChangeListener( lang::WrappedTargetException, uno::RuntimeException) { - if( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "IsRowCountFinal" )) && + if( aPropertyName == rtl::OUString( "IsRowCountFinal" ) && m_pIsFinalListeners ) { osl::MutexGuard aGuard( m_aMutex ); m_pIsFinalListeners->removeInterface( aListener ); } - else if ( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowCount" )) && + else if ( aPropertyName == rtl::OUString( "RowCount" ) && m_pRowCountListeners ) { osl::MutexGuard aGuard( m_aMutex ); diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx index 61340307e9d7..240edffdba20 100644 --- a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx +++ b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx @@ -94,7 +94,7 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< lang::XMultiServiceF m_aURLParameter( aURLParameter ) { Reference< XTransliteration > xTrans( - xMSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.i18n.Transliteration" )) ), + xMSF->createInstance( rtl::OUString( "com.sun.star.i18n.Transliteration" ) ), UNO_QUERY ); Locale aLocale( aURLParameter.get_language(), rtl::OUString(), @@ -323,8 +323,8 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< lang::XMultiServiceF delete pIndexFolderVector; } - sal_Int32 replIdx = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "#HLP#" )).getLength(); - rtl::OUString replWith = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.help://" )); + sal_Int32 replIdx = rtl::OUString( "#HLP#" ).getLength(); + rtl::OUString replWith = rtl::OUString( "vnd.sun.star.help://" ); int nResultCount = aCompleteResultVector.size(); for( int r = 0 ; r < nResultCount ; ++r ) @@ -338,16 +338,16 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< lang::XMultiServiceF m_aIdents.resize( m_aPath.size() ); Command aCommand; - aCommand.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" )); + aCommand.Name = rtl::OUString( "getPropertyValues" ); aCommand.Argument <<= m_sProperty; for( m_nRow = 0; sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aPath.size(); ++m_nRow ) { m_aPath[m_nRow] = - m_aPath[m_nRow] + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "?Language=" )) + - m_aURLParameter.get_language() + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "&System=" )) + + m_aPath[m_nRow] + + rtl::OUString( "?Language=" ) + + m_aURLParameter.get_language() + + rtl::OUString( "&System=" ) + m_aURLParameter.get_system(); uno::Reference< XContent > content = queryContent(); diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx b/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx index 1fe0425a631d..f5702566a410 100644 --- a/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx +++ b/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx @@ -55,17 +55,17 @@ ResultSetForRoot::ResultSetForRoot( const uno::Reference< lang::XMultiServiceFac m_aIdents.resize( m_aPath.size() ); Command aCommand; - aCommand.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" )); + aCommand.Name = rtl::OUString( "getPropertyValues" ); aCommand.Argument <<= m_sProperty; for( sal_uInt32 i = 0; i < m_aPath.size(); ++i ) { m_aPath[i] = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.help://" )) + - m_aPath[i] + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "?Language=" )) + - m_aURLParameter.get_language() + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "&System=" )) + + rtl::OUString( "vnd.sun.star.help://" ) + + m_aPath[i] + + rtl::OUString( "?Language=" ) + + m_aURLParameter.get_language() + + rtl::OUString( "&System=" ) + m_aURLParameter.get_system(); m_nRow = sal_Int32( i ); diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx index 6cc30b7e59d1..e4f483d24d26 100644 --- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx +++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx @@ -179,7 +179,7 @@ rtl::OUString URLParameter::get_title() m_aTitle = inf->get_title(); } else // This must be the root - m_aTitle = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("root")); + m_aTitle = rtl::OUString("root"); return m_aTitle; } @@ -274,7 +274,7 @@ rtl::OUString URLParameter::get_the_jar() return m_aJar; } else - return get_module() + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".jar")); + return get_module() + rtl::OUString(".jar"); } @@ -282,7 +282,7 @@ rtl::OUString URLParameter::get_the_jar() void URLParameter::readBerkeley() { - static rtl::OUString aQuestionMark(RTL_CONSTASCII_USTRINGPARAM("?")); + static rtl::OUString aQuestionMark("?"); if( get_id().compareToAscii("") == 0 ) return; @@ -444,7 +444,7 @@ void URLParameter::open( const Reference< XMultiServiceFactory >& rxSMgr, { Reference< XInputStream > xStream; Reference< XHierarchicalNameAccess > xNA = - m_pDatabases->jarFile( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "picture.jar" )), + m_pDatabases->jarFile( rtl::OUString( "picture.jar" ), get_language() ); rtl::OUString path = get_path(); @@ -514,7 +514,7 @@ void URLParameter::open( const Reference< XMultiServiceFactory >& rxSMgr, { Reference< XInputStream > xStream; Reference< XHierarchicalNameAccess > xNA = - m_pDatabases->jarFile( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "picture.jar" )), + m_pDatabases->jarFile( rtl::OUString( "picture.jar" ), get_language() ); rtl::OUString path = get_path(); @@ -568,7 +568,7 @@ bool URLParameter::scheme() if( aLastStr.compareToAscii( "DbPAR=" ) == 0 ) { rtl::OUString aNewExpr = m_aExpr.copy( 0, 20 ); - rtl::OUString aSharedStr(RTL_CONSTASCII_USTRINGPARAM("shared")); + rtl::OUString aSharedStr("shared"); aNewExpr += aSharedStr; aNewExpr += m_aExpr.copy( 20 ); aNewExpr += aSharedStr; @@ -681,7 +681,7 @@ bool URLParameter::query() if( m_aQuery.isEmpty() ) m_aQuery = value; else - m_aQuery += ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( " " )) + value ); + m_aQuery += ( rtl::OUString( " " ) + value ); } else if( parameter.compareToAscii( "Scope" ) == 0 ) m_aScope = value; @@ -1006,12 +1006,12 @@ InputStreamTransformer::InputStreamTransformer( URLParameter* urlParam, if (xProps.is()) { xProps->getPropertyValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ) ) >>= xContext; + ::rtl::OUString( "DefaultContext" ) ) >>= xContext; } if( !xContext.is() ) { throw RuntimeException( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "InputStreamTransformer::InputStreamTransformer(), no XComponentContext" )), + ::rtl::OUString( "InputStreamTransformer::InputStreamTransformer(), no XComponentContext" ), Reference< XInterface >() ); } diff --git a/xmlhelp/source/cxxhelp/test/searchdemo.cxx b/xmlhelp/source/cxxhelp/test/searchdemo.cxx index 3abc080f0737..4908cfe1182b 100644 --- a/xmlhelp/source/cxxhelp/test/searchdemo.cxx +++ b/xmlhelp/source/cxxhelp/test/searchdemo.cxx @@ -76,21 +76,21 @@ int main( int argc,char* argv[] ) try { - rtl::OUString installDir(RTL_CONSTASCII_USTRINGPARAM("//./e|/index/")); + rtl::OUString installDir("//./e|/index/"); QueryProcessor queryProcessor( installDir ); std::vector<rtl::OUString> Query(2); - Query[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "text*" )); - Query[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "abbildung" )); - rtl::OUString Scope = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "headingheading" )); + Query[0] = rtl::OUString( "text*" ); + Query[1] = rtl::OUString( "abbildung" ); + rtl::OUString Scope = rtl::OUString( "headingheading" ); int HitCount = 40; QueryStatement queryStatement( HitCount,Query,Scope ); queryResults = queryProcessor.processQuery( queryStatement ); rtl::OUString translations[2]; - translations[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "#HLP#" )); - translations[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.help://" )); + translations[0] = rtl::OUString( "#HLP#" ); + translations[1] = rtl::OUString( "vnd.sun.star.help://" ); PrefixTranslator* translator = PrefixTranslator::makePrefixTranslator( translations,2 ); diff --git a/xmlhelp/source/treeview/tvfactory.cxx b/xmlhelp/source/treeview/tvfactory.cxx index ffebbd1434c5..936d7b75b14a 100644 --- a/xmlhelp/source/treeview/tvfactory.cxx +++ b/xmlhelp/source/treeview/tvfactory.cxx @@ -145,7 +145,7 @@ TVFactory::createInstance( aAny <<= rtl::OUString(); Sequence< Any > seq( 1 ); seq[0] <<= PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "nodepath" )), + rtl::OUString( "nodepath" ), -1, aAny, PropertyState_DIRECT_VALUE ); @@ -206,7 +206,7 @@ TVFactory::getAvailableServiceNames( ) throw( RuntimeException ) { Sequence< rtl::OUString > seq( 1 ); - seq[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.HierarchyDataReadAccess" )); + seq[0] = rtl::OUString( "com.sun.star.ucb.HierarchyDataReadAccess" ); return seq; } @@ -218,7 +218,7 @@ TVFactory::getAvailableServiceNames( ) rtl::OUString SAL_CALL TVFactory::getImplementationName_static() { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.help.TreeViewImpl" )); + return rtl::OUString( "com.sun.star.help.TreeViewImpl" ); } @@ -226,8 +226,8 @@ Sequence< rtl::OUString > SAL_CALL TVFactory::getSupportedServiceNames_static() { Sequence< rtl::OUString > seq( 2 ); - seq[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.help.TreeView" )); - seq[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.HiearchyDataSource" )); + seq[0] = rtl::OUString( "com.sun.star.help.TreeView" ); + seq[1] = rtl::OUString( "com.sun.star.ucb.HiearchyDataSource" ); return seq; } diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx index af4be054b32e..8679fa520abe 100644 --- a/xmlhelp/source/treeview/tvread.cxx +++ b/xmlhelp/source/treeview/tvread.cxx @@ -185,11 +185,11 @@ using namespace com::sun::star::deployment; ConfigData::ConfigData() - : prodName(RTL_CONSTASCII_USTRINGPARAM("%PRODUCTNAME")), - prodVersion(RTL_CONSTASCII_USTRINGPARAM("%PRODUCTVERSION")), - vendName(RTL_CONSTASCII_USTRINGPARAM("%VENDORNAME")), - vendVersion(RTL_CONSTASCII_USTRINGPARAM("%VENDORVERSION")), - vendShort(RTL_CONSTASCII_USTRINGPARAM("%VENDORSHORT")) + : prodName("%PRODUCTNAME"), + prodVersion("%PRODUCTVERSION"), + vendName("%VENDORNAME"), + vendVersion("%VENDORVERSION"), + vendShort("%VENDORSHORT") { } @@ -308,7 +308,7 @@ TVRead::TVRead( const ConfigData& configData,TVDom* tvDom ) { TargetURL = ( tvDom->getTargetURL() + configData.appendix ); if( !tvDom->anchor.isEmpty() ) - TargetURL += ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "#" )) + + TargetURL += ( rtl::OUString( "#" ) + tvDom->anchor ); } else @@ -363,9 +363,9 @@ TVRead::getElementNames( ) { Sequence< rtl::OUString > seq( 3 ); - seq[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Title" )); - seq[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "TargetURL" )); - seq[2] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Children" )); + seq[0] = rtl::OUString( "Title" ); + seq[1] = rtl::OUString( "TargetURL" ); + seq[2] = rtl::OUString( "Children" ); return seq; } @@ -666,7 +666,7 @@ ConfigData TVChildTarget::init( const Reference< XMultiServiceFactory >& xSMgr ) rtl::OUString instPath( getKey( xHierAccess,"Path/Current/Help" ) ); if( instPath.isEmpty() ) // try to determine path from default - instPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "$(instpath)/help" )); + instPath = rtl::OUString( "$(instpath)/help" ); // replace anything like $(instpath); subst( xSMgr,instPath ); @@ -684,21 +684,21 @@ ConfigData TVChildTarget::init( const Reference< XMultiServiceFactory >& xSMgr ) try { uno::Reference< lang::XMultiServiceFactory > xConfigProvider( - xSMgr ->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider"))), uno::UNO_QUERY_THROW); + xSMgr ->createInstance(::rtl::OUString("com.sun.star.configuration.ConfigurationProvider")), uno::UNO_QUERY_THROW); uno::Sequence < uno::Any > lParams(1); beans::PropertyValue aParam ; - aParam.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath")); - aParam.Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Setup/Product")); + aParam.Name = ::rtl::OUString("nodepath"); + aParam.Value <<= ::rtl::OUString("/org.openoffice.Setup/Product"); lParams[0] = uno::makeAny(aParam); // open it uno::Reference< uno::XInterface > xCFG( xConfigProvider->createInstanceWithArguments( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess")), + ::rtl::OUString("com.sun.star.configuration.ConfigurationAccess"), lParams) ); uno::Reference< container::XNameAccess > xDirectAccess(xCFG, uno::UNO_QUERY); - uno::Any aRet = xDirectAccess->getByName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooSetupExtension"))); + uno::Any aRet = xDirectAccess->getByName(::rtl::OUString("ooSetupExtension")); aRet >>= setupextension; } @@ -707,7 +707,7 @@ ConfigData TVChildTarget::init( const Reference< XMultiServiceFactory >& xSMgr ) } rtl::OUString productVersion( setupversion + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( " " )) + + rtl::OUString( " " ) + setupextension ); rtl::OUString locale( getKey( xHierAccess,"L10N/ooLocale" ) ); @@ -717,7 +717,7 @@ ConfigData TVChildTarget::init( const Reference< XMultiServiceFactory >& xSMgr ) osl::FileBase::RC errFile = osl::FileBase::getFileURLFromSystemPath( instPath,url ); if( errFile != osl::FileBase::E_None ) return configData; if( url.lastIndexOf( sal_Unicode( '/' ) ) != url.getLength() - 1 ) - url += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" )); + url += rtl::OUString( "/" ); rtl::OUString ret; sal_Int32 idx; osl::DirectoryItem aDirItem; @@ -730,8 +730,8 @@ ConfigData TVChildTarget::init( const Reference< XMultiServiceFactory >& xSMgr ) ret = locale.copy( 0,idx ); else { - locale = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "en-US" )); - ret = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en")); + locale = rtl::OUString( "en-US" ); + ret = rtl::OUString("en"); } url = url + ret; @@ -804,11 +804,11 @@ ConfigData TVChildTarget::init( const Reference< XMultiServiceFactory >& xSMgr ) configData.system = system; configData.locale = locale; configData.appendix = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "?Language=" )) + + rtl::OUString( "?Language=" ) + configData.locale + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "&System=" )) + + rtl::OUString( "&System=" ) + configData.system + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "&UseDB=no" )) ; + rtl::OUString( "&UseDB=no" ) ; return configData; } @@ -830,7 +830,7 @@ TVChildTarget::getConfiguration(const Reference< XMultiServiceFactory >& m_xSMgr try { rtl::OUString sProviderService = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationProvider" )); + rtl::OUString( "com.sun.star.configuration.ConfigurationProvider" ); sProvider = Reference< XMultiServiceFactory >( m_xSMgr->createInstance( sProviderService ), @@ -857,7 +857,7 @@ TVChildTarget::getHierAccess( const Reference< XMultiServiceFactory >& sProvider { Sequence< Any > seq(1); rtl::OUString sReaderService = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationAccess" )); + rtl::OUString( "com.sun.star.configuration.ConfigurationAccess" ); seq[0] <<= rtl::OUString::createFromAscii( file ); @@ -934,7 +934,7 @@ void TVChildTarget::subst( const Reference< XMultiServiceFactory >& m_xSMgr, { xCfgMgr = Reference< XConfigManager >( - m_xSMgr->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.config.SpecialConfigManager" )) ), + m_xSMgr->createInstance( rtl::OUString( "com.sun.star.config.SpecialConfigManager" ) ), UNO_QUERY ); } catch( const com::sun::star::uno::Exception& ) @@ -953,9 +953,9 @@ void TVChildTarget::subst( const Reference< XMultiServiceFactory >& m_xSMgr, //=================================================================== // class ExtensionIteratorBase -static rtl::OUString aSlash(RTL_CONSTASCII_USTRINGPARAM("/")); -static rtl::OUString aHelpFilesBaseName(RTL_CONSTASCII_USTRINGPARAM("help")); -static rtl::OUString aHelpMediaType(RTL_CONSTASCII_USTRINGPARAM( "application/vnd.sun.star.help")); +static rtl::OUString aSlash("/"); +static rtl::OUString aHelpFilesBaseName("help"); +static rtl::OUString aHelpMediaType("application/vnd.sun.star.help"); ExtensionIteratorBase::ExtensionIteratorBase( const rtl::OUString& aLanguage ) : m_eState( USER_EXTENSIONS ) @@ -972,19 +972,19 @@ void ExtensionIteratorBase::init() if (xProps.is()) { xProps->getPropertyValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ) ) >>= m_xContext; + ::rtl::OUString( "DefaultContext" ) ) >>= m_xContext; OSL_ASSERT( m_xContext.is() ); } if( !m_xContext.is() ) { throw RuntimeException( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ExtensionIteratorBase::init(), no XComponentContext" )), + ::rtl::OUString( "ExtensionIteratorBase::init(), no XComponentContext" ), Reference< XInterface >() ); } Reference< XMultiComponentFactory > xSMgr( m_xContext->getServiceManager(), UNO_QUERY ); m_xSFA = Reference< ucb::XSimpleFileAccess >( - xSMgr->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" )), + xSMgr->createInstanceWithContext( rtl::OUString( "com.sun.star.ucb.SimpleFileAccess" ), m_xContext ), UNO_QUERY_THROW ); m_bUserPackagesLoaded = false; @@ -1055,7 +1055,7 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextUserHelpPack if( !m_bUserPackagesLoaded ) { Reference< XPackageManager > xUserManager = - thePackageManagerFactory::get( m_xContext )->getPackageManager( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("user")) ); + thePackageManagerFactory::get( m_xContext )->getPackageManager( rtl::OUString("user") ); m_aUserPackagesSeq = xUserManager->getDeployedPackages ( Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() ); @@ -1085,7 +1085,7 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextSharedHelpPa if( !m_bSharedPackagesLoaded ) { Reference< XPackageManager > xSharedManager = - thePackageManagerFactory::get( m_xContext )->getPackageManager( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("shared")) ); + thePackageManagerFactory::get( m_xContext )->getPackageManager( rtl::OUString("shared") ); m_aSharedPackagesSeq = xSharedManager->getDeployedPackages ( Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() ); @@ -1115,7 +1115,7 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextBundledHelpP if( !m_bBundledPackagesLoaded ) { Reference< XPackageManager > xBundledManager = - thePackageManagerFactory::get( m_xContext )->getPackageManager( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("bundled")) ); + thePackageManagerFactory::get( m_xContext )->getPackageManager( rtl::OUString("bundled") ); m_aBundledPackagesSeq = xBundledManager->getDeployedPackages ( Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() ); @@ -1239,18 +1239,18 @@ rtl::OUString TreeFileIterator::expandURL( const rtl::OUString& aURL ) Reference< XMultiComponentFactory > xSMgr( m_xContext->getServiceManager(), UNO_QUERY ); xFac = Reference< uri::XUriReferenceFactory >( - xSMgr->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.uri.UriReferenceFactory")), m_xContext ) , UNO_QUERY ); + xSMgr->createInstanceWithContext( rtl::OUString( + "com.sun.star.uri.UriReferenceFactory"), m_xContext ) , UNO_QUERY ); if( !xFac.is() ) { throw RuntimeException( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Databases::expand(), could not instatiate UriReferenceFactory." )), + ::rtl::OUString( "Databases::expand(), could not instatiate UriReferenceFactory." ), Reference< XInterface >() ); } xMacroExpander = Reference< util::XMacroExpander >( m_xContext->getValueByName( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/singletons/com.sun.star.util.theMacroExpander" )) ), + ::rtl::OUString( "/singletons/com.sun.star.util.theMacroExpander" ) ), UNO_QUERY_THROW ); } |