desktop/source/deployment/gui/dp_gui_dialog2.cxx | 22 ++--- desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx | 18 ++-- desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 27 +++--- desktop/source/deployment/gui/dp_gui_service.cxx | 6 - desktop/source/deployment/gui/dp_gui_updatedialog.cxx | 42 +++++----- desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx | 44 +++++------ 6 files changed, 75 insertions(+), 84 deletions(-)
New commits: commit 8b1c57d474db0dec61e6e6445f883f93143c9ad7 Author: Chr. Rossmanith <chrrossman...@gmx.de> Date: Sat Dec 29 21:39:36 2012 +0100 RTL_CONSTASCII_(U)STRINGPARAM removed in desktop/source/deployment/gui Removed OUSTR() as well and replaced .equals() with == Change-Id: Ie12ac42a76beb35ff2570d92584fc415e6e061cf diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index 656ea5e..696e5e7 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -73,8 +73,6 @@ #include <vector> #include <boost/shared_ptr.hpp> -#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) ) - using namespace ::com::sun::star; using namespace ::com::sun::star::system; @@ -88,9 +86,9 @@ namespace dp_gui { #define PROGRESS_WIDTH 60 #define PROGRESS_HEIGHT 14 -#define USER_PACKAGE_MANAGER OUSTR("user") -#define SHARED_PACKAGE_MANAGER OUSTR("shared") -#define BUNDLED_PACKAGE_MANAGER OUSTR("bundled") +#define USER_PACKAGE_MANAGER "user" +#define SHARED_PACKAGE_MANAGER "shared" +#define BUNDLED_PACKAGE_MANAGER "bundled" //------------------------------------------------------------------------------ struct StrAllFiles : public rtl::StaticWithInit< OUString, StrAllFiles > @@ -582,7 +580,7 @@ String DialogHelper::getResourceString( sal_uInt16 id ) //------------------------------------------------------------------------------ bool DialogHelper::IsSharedPkgMgr( const uno::Reference< deployment::XPackage > &xPackage ) { - if ( xPackage->getRepositoryName().equals( SHARED_PACKAGE_MANAGER ) ) + if ( xPackage->getRepositoryName() == SHARED_PACKAGE_MANAGER ) return true; else return false; @@ -765,15 +763,15 @@ long ExtMgrDialog::addPackageToList( const uno::Reference< deployment::XPackage m_pExtensionBox->removeEntry(xPackage); - if (m_pBundledCbx->IsChecked() && xPackage->getRepositoryName().equals( BUNDLED_PACKAGE_MANAGER )) + if (m_pBundledCbx->IsChecked() && (xPackage->getRepositoryName() == BUNDLED_PACKAGE_MANAGER) ) { return m_pExtensionBox->addEntry( xPackage, bLicenseMissing ); } - else if (m_pSharedCbx->IsChecked() && xPackage->getRepositoryName().equals( SHARED_PACKAGE_MANAGER )) + else if (m_pSharedCbx->IsChecked() && (xPackage->getRepositoryName() == SHARED_PACKAGE_MANAGER) ) { return m_pExtensionBox->addEntry( xPackage, bLicenseMissing ); } - else if (m_pUserCbx->IsChecked() && xPackage->getRepositoryName().equals( USER_PACKAGE_MANAGER )) + else if (m_pUserCbx->IsChecked() && (xPackage->getRepositoryName() == USER_PACKAGE_MANAGER )) { return m_pExtensionBox->addEntry( xPackage, bLicenseMissing ); } @@ -892,7 +890,7 @@ uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker() const uno::Reference< uno::XComponentContext > xContext( m_pManager->getContext() ); const uno::Reference< ui::dialogs::XFilePicker > xFilePicker( xContext->getServiceManager()->createInstanceWithArgumentsAndContext( - OUSTR("com.sun.star.ui.dialogs.FilePicker"), + "com.sun.star.ui.dialogs.FilePicker", uno::Sequence< uno::Any >( &mode, 1 ), xContext ), uno::UNO_QUERY_THROW ); xFilePicker->setTitle( m_sAddPackages ); @@ -924,14 +922,14 @@ uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker() buf.append( filter ); insertion.first->second = buf.makeStringAndClear(); } - if ( xPackageType->getMediaType() == OUSTR( "application/vnd.sun.star.package-bundle" ) ) + if ( xPackageType->getMediaType() == "application/vnd.sun.star.package-bundle" ) sDefaultFilter = title; } } const uno::Reference< ui::dialogs::XFilterManager > xFilterManager( xFilePicker, uno::UNO_QUERY_THROW ); // All files at top: - xFilterManager->appendFilter( StrAllFiles::get(), OUSTR("*.*") ); + xFilterManager->appendFilter( StrAllFiles::get(), "*.*" ); // then supported ones: t_string2string::const_iterator iPos( title2filter.begin() ); const t_string2string::const_iterator iEnd( title2filter.end() ); diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx index 36af071..160b56d 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx @@ -108,7 +108,7 @@ namespace { OUString getVersion( OUString const & sVersion ) { - return ( sVersion.isEmpty() ) ? OUString( RTL_CONSTASCII_USTRINGPARAM( "0" ) ) : sVersion; + return ( sVersion.isEmpty() ) ? OUString( "0" ) : sVersion; } OUString getVersion( const uno::Reference< deployment::XPackage > &rPackage ) @@ -358,8 +358,8 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const & { uno::Any request( xRequest->getRequest() ); OSL_ASSERT( request.getValueTypeClass() == uno::TypeClass_EXCEPTION ); - dp_misc::TRACE( OUSTR("[dp_gui_cmdenv.cxx] incoming request:\n") - + ::comphelper::anyToString(request) + OUSTR("\n")); + dp_misc::TRACE( "[dp_gui_cmdenv.cxx] incoming request:\n" + + ::comphelper::anyToString(request) + "\n"); lang::WrappedTargetException wtExc; deployment::DependencyException depExc; @@ -399,10 +399,8 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const & if (xPackageType.is()) { approve = ( xPackage->isBundle() && - xPackageType->getMediaType().matchAsciiL( - RTL_CONSTASCII_STRINGPARAM( - "application/" - "vnd.sun.star.legacy-package-bundle") )); + xPackageType->getMediaType().match( + "application/vnd.sun.star.legacy-package-bundle" )); } } abort = !approve; @@ -862,7 +860,7 @@ void ExtensionCmdQueue::Thread::_addExtension( ::rtl::Reference< ProgressCmdEnv uno::Any anyTitle; try { - anyTitle = ::ucbhelper::Content( rPackageURL, rCmdEnv.get(), m_xContext ).getPropertyValue( OUSTR("Title") ); + anyTitle = ::ucbhelper::Content( rPackageURL, rCmdEnv.get(), m_xContext ).getPropertyValue( "Title" ); } catch ( const uno::Exception & ) { @@ -1111,7 +1109,7 @@ void ExtensionCmdQueue::acceptLicense( const uno::Reference< deployment::XPackag void ExtensionCmdQueue::syncRepositories( const uno::Reference< uno::XComponentContext > &xContext ) { - dp_misc::syncRepositories( false, new ProgressCmdEnv( xContext, NULL, OUSTR("Extension Manager") ) ); + dp_misc::syncRepositories( false, new ProgressCmdEnv( xContext, NULL, "Extension Manager" ) ); } void ExtensionCmdQueue::stop() @@ -1127,7 +1125,7 @@ bool ExtensionCmdQueue::isBusy() void handleInteractionRequest( const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< task::XInteractionRequest > & xRequest ) { - ::rtl::Reference< ProgressCmdEnv > xCmdEnv( new ProgressCmdEnv( xContext, NULL, OUSTR("Extension Manager") ) ); + ::rtl::Reference< ProgressCmdEnv > xCmdEnv( new ProgressCmdEnv( xContext, NULL, "Extension Manager" ) ); xCmdEnv->handle( xRequest ); } diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index 4cc6fcf..b050c06 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -31,11 +31,9 @@ #include "com/sun/star/deployment/DeploymentException.hpp" #include "cppuhelper/weakref.hxx" -#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) ) - -#define USER_PACKAGE_MANAGER OUSTR("user") -#define SHARED_PACKAGE_MANAGER OUSTR("shared") -#define BUNDLED_PACKAGE_MANAGER OUSTR("bundled") +#define USER_PACKAGE_MANAGER "user" +#define SHARED_PACKAGE_MANAGER "shared" +#define BUNDLED_PACKAGE_MANAGER "bundled" using namespace ::com::sun::star; @@ -147,10 +145,10 @@ void Entry_Impl::checkDependencies() rtl::OUString aMissingDep( DialogHelper::getResourceString( RID_STR_ERROR_MISSING_DEPENDENCIES ) ); for ( sal_Int32 i = 0; i < depExc.UnsatisfiedDependencies.getLength(); ++i ) { - aMissingDep += OUSTR("\n"); + aMissingDep += "\n"; aMissingDep += dp_misc::Dependencies::getErrorText( depExc.UnsatisfiedDependencies[i]); } - aMissingDep += OUSTR("\n"); + aMissingDep += "\n"; m_sErrorText = aMissingDep; m_bMissingDeps = true; } @@ -313,10 +311,9 @@ sal_Int32 ExtensionBox_Impl::getSelIndex() const void ExtensionBox_Impl::checkIndex( sal_Int32 nIndex ) const { if ( nIndex < 0 ) - throw lang::IllegalArgumentException( OUSTR("The list index starts with 0"),0, 0 ); + throw lang::IllegalArgumentException( "The list index starts with 0",0, 0 ); if ( static_cast< sal_uInt32 >( nIndex ) >= m_vEntries.size()) - throw lang::IllegalArgumentException( OUSTR("There is no element at the provided position." - "The position exceeds the number of available list entries"),0, 0 ); + throw lang::IllegalArgumentException( "There is no element at the provided position. The position exceeds the number of available list entries",0, 0 ); } //------------------------------------------------------------------------------ @@ -375,7 +372,7 @@ void ExtensionBox_Impl::select( const rtl::OUString & sName ) for ( It iIter = m_vEntries.begin(); iIter != m_vEntries.end(); ++iIter ) { - if ( sName.equals( (*iIter)->m_sTitle ) ) + if ( sName.equals( (*iIter)->m_sTitle )) { long nPos = iIter - m_vEntries.begin(); selectEntry( nPos ); @@ -409,7 +406,7 @@ void ExtensionBox_Impl::CalcActiveHeight( const long nPos ) rtl::OUString aText( m_vEntries[ nPos ]->m_sErrorText ); if ( !aText.isEmpty() ) - aText += OUSTR("\n"); + aText += "\n"; aText += m_vEntries[ nPos ]->m_sDescription; Rectangle aRect = GetTextRect( Rectangle( Point(), aSize ), aText, @@ -629,7 +626,7 @@ void ExtensionBox_Impl::DrawRow( const Rectangle& rRect, const TEntry_Impl pEntr if ( pEntry->m_sErrorText.Len() ) { if ( pEntry->m_bActive ) - sDescription = pEntry->m_sErrorText + OUSTR("\n") + pEntry->m_sDescription; + sDescription = pEntry->m_sErrorText + OUString("\n") + pEntry->m_sDescription; else sDescription = pEntry->m_sErrorText; } @@ -1054,8 +1051,8 @@ long ExtensionBox_Impl::addEntry( const uno::Reference< deployment::XPackage > & } pEntry->m_bHasOptions = m_pManager->supportsOptions( xPackage ); - pEntry->m_bUser = xPackage->getRepositoryName().equals( USER_PACKAGE_MANAGER ); - pEntry->m_bShared = xPackage->getRepositoryName().equals( SHARED_PACKAGE_MANAGER ); + pEntry->m_bUser = (xPackage->getRepositoryName() == USER_PACKAGE_MANAGER); + pEntry->m_bShared = (xPackage->getRepositoryName() == SHARED_PACKAGE_MANAGER); pEntry->m_bNew = m_bInCheckMode; pEntry->m_bMissingLic = bLicenseMissing; diff --git a/desktop/source/deployment/gui/dp_gui_service.cxx b/desktop/source/deployment/gui/dp_gui_service.cxx index c287391..f81bf57 100644 --- a/desktop/source/deployment/gui/dp_gui_service.cxx +++ b/desktop/source/deployment/gui/dp_gui_service.cxx @@ -235,14 +235,14 @@ void ServiceImpl::startExecuteModal( OSL_ASSERT( ! bAppUp ); app.reset( new MyApp ); if (! InitVCL() ) - throw RuntimeException( OUSTR("Cannot initialize VCL!"), + throw RuntimeException( "Cannot initialize VCL!", static_cast<OWeakObject *>(this) ); AllSettings as = app->GetSettings(); as.SetUILanguageTag( LanguageTag( utl::ConfigManager::getLocale() ) ); app->SetSettings( as ); app->SetDisplayName( utl::ConfigManager::getProductName() + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")) + + rtl::OUString(" ") + utl::ConfigManager::getProductVersion()); ExtensionCmdQueue::syncRepositories( m_xComponentContext ); } @@ -299,7 +299,7 @@ void ServiceImpl::startExecuteModal( //______________________________________________________________________________ void ServiceImpl::trigger( OUString const &rEvent ) throw (RuntimeException) { - if ( rEvent == OUSTR("SHOW_UPDATE_DIALOG") ) + if ( rEvent == "SHOW_UPDATE_DIALOG" ) m_bShowUpdateOnly = true; else m_bShowUpdateOnly = false; diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index 0664071..6b79f1d 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -133,10 +133,8 @@ static const sal_uInt16 CMD_ENABLE_UPDATE = 1; static const sal_uInt16 CMD_IGNORE_UPDATE = 2; static const sal_uInt16 CMD_IGNORE_ALL_UPDATES = 3; -#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) ) - -#define IGNORED_UPDATES OUSTR("/org.openoffice.Office.ExtensionManager/ExtensionUpdateData/IgnoredUpdates") -#define PROPERTY_VERSION OUSTR("Version") +#define IGNORED_UPDATES OUString("/org.openoffice.Office.ExtensionManager/ExtensionUpdateData/IgnoredUpdates") +#define PROPERTY_VERSION "Version" enum Kind { ENABLED_UPDATE, DISABLED_UPDATE, SPECIFIC_ERROR }; @@ -346,7 +344,7 @@ void UpdateDialog::Thread::execute() if (extensions[2].is() ) sVersionBundled = extensions[2]->getVersion(); - bool bSharedReadOnly = extMgr->isReadOnlyRepository(OUSTR("shared")); + bool bSharedReadOnly = extMgr->isReadOnlyRepository("shared"); dp_misc::UPDATE_SOURCE sourceUser = dp_misc::isUpdateUserExtension( bSharedReadOnly, sVersionUser, sVersionShared, sVersionBundled, sOnlineVersion); @@ -823,19 +821,19 @@ void UpdateDialog::createNotifyJob( bool bPrepareOnly, comphelper::getProcessComponentContext())); beans::PropertyValue aProperty; - aProperty.Name = OUSTR( "nodepath" ); - aProperty.Value = uno::makeAny( OUSTR("org.openoffice.Office.Addons/AddonUI/OfficeHelp/UpdateCheckJob") ); + aProperty.Name = "nodepath"; + aProperty.Value = uno::makeAny( OUString("org.openoffice.Office.Addons/AddonUI/OfficeHelp/UpdateCheckJob") ); uno::Sequence< uno::Any > aArgumentList( 1 ); aArgumentList[0] = uno::makeAny( aProperty ); uno::Reference< container::XNameAccess > xNameAccess( xConfigProvider->createInstanceWithArguments( - OUSTR("com.sun.star.configuration.ConfigurationAccess"), aArgumentList ), + "com.sun.star.configuration.ConfigurationAccess", aArgumentList ), uno::UNO_QUERY_THROW ); util::URL aURL; - xNameAccess->getByName(OUSTR("URL")) >>= aURL.Complete; + xNameAccess->getByName("URL") >>= aURL.Complete; uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); uno::Reference < util::XURLTransformer > xTransformer = util::URLTransformer::create(xContext); @@ -850,10 +848,10 @@ void UpdateDialog::createNotifyJob( bool bPrepareOnly, if( xDispatch.is() ) { uno::Sequence< beans::PropertyValue > aPropList(2); - aProperty.Name = OUSTR( "updateList" ); + aProperty.Name = "updateList"; aProperty.Value = uno::makeAny( rItemList ); aPropList[0] = aProperty; - aProperty.Name = OUSTR( "prepareOnly" ); + aProperty.Name = "prepareOnly"; aProperty.Value = uno::makeAny( bPrepareOnly ); aPropList[1] = aProperty; @@ -862,8 +860,8 @@ void UpdateDialog::createNotifyJob( bool bPrepareOnly, } catch( const uno::Exception& e ) { - dp_misc::TRACE( OUSTR("Caught exception: ") - + e.Message + OUSTR("\n thread terminated.\n\n")); + dp_misc::TRACE( "Caught exception: " + + e.Message + "\n thread terminated.\n\n"); } } @@ -987,7 +985,7 @@ bool UpdateDialog::showDescription(uno::Reference< deployment::XPackage > const OSL_ASSERT(aExtension.is()); beans::StringPair pubInfo = aExtension->getPublisherInfo(); return showDescription(std::make_pair(pubInfo.First, pubInfo.Second), - OUSTR("")); + ""); } bool UpdateDialog::showDescription(std::pair< rtl::OUString, rtl::OUString > const & pairPublisher, @@ -1053,11 +1051,11 @@ void UpdateDialog::getIgnoredUpdates() { uno::Reference< lang::XMultiServiceFactory > xConfig( configuration::theDefaultProvider::get(m_context)); - beans::NamedValue aValue( OUSTR("nodepath"), uno::Any( IGNORED_UPDATES ) ); + beans::NamedValue aValue( "nodepath", uno::Any( IGNORED_UPDATES ) ); uno::Sequence< uno::Any > args(1); args[0] <<= aValue; - uno::Reference< container::XNameAccess > xNameAccess( xConfig->createInstanceWithArguments( OUSTR("com.sun.star.configuration.ConfigurationAccess"), args), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xNameAccess( xConfig->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess", args), uno::UNO_QUERY_THROW ); uno::Sequence< rtl::OUString > aElementNames = xNameAccess->getElementNames(); for ( sal_Int32 i = 0; i < aElementNames.getLength(); i++ ) @@ -1079,12 +1077,12 @@ void UpdateDialog::storeIgnoredUpdates() { uno::Reference< lang::XMultiServiceFactory > xConfig( configuration::theDefaultProvider::get(m_context)); - beans::NamedValue aValue( OUSTR("nodepath"), uno::Any( IGNORED_UPDATES ) ); + beans::NamedValue aValue( "nodepath", uno::Any( IGNORED_UPDATES ) ); uno::Sequence< uno::Any > args(1); args[0] <<= aValue; uno::Reference< container::XNameContainer > xNameContainer( xConfig->createInstanceWithArguments( - OUSTR("com.sun.star.configuration.ConfigurationUpdateAccess"), args ), uno::UNO_QUERY_THROW ); + "com.sun.star.configuration.ConfigurationUpdateAccess", args ), uno::UNO_QUERY_THROW ); for ( std::vector< UpdateDialog::IgnoredUpdate* >::iterator i( m_ignoredUpdates.begin() ); i != m_ignoredUpdates.end(); ++i ) { @@ -1246,8 +1244,8 @@ IMPL_LINK_NOARG(UpdateDialog, selectionHandler) if (data.unsatisfiedDependencies.getLength() != 0) { // create error string for version mismatch - ::rtl::OUString sVersion( RTL_CONSTASCII_USTRINGPARAM("%VERSION") ); - ::rtl::OUString sProductName( RTL_CONSTASCII_USTRINGPARAM("%PRODUCTNAME") ); + ::rtl::OUString sVersion( "%VERSION" ); + ::rtl::OUString sProductName( "%PRODUCTNAME" ); sal_Int32 nPos = m_noDependencyCurVer.indexOf( sVersion ); if ( nPos >= 0 ) { @@ -1271,7 +1269,7 @@ IMPL_LINK_NOARG(UpdateDialog, selectionHandler) i < data.unsatisfiedDependencies.getLength(); ++i) { b.append(LF); - b.appendAscii(RTL_CONSTASCII_STRINGPARAM(" ")); + b.appendAscii(" "); // U+2003 EM SPACE would be better than two spaces, // but some fonts do not contain it b.append( @@ -1279,7 +1277,7 @@ IMPL_LINK_NOARG(UpdateDialog, selectionHandler) data.unsatisfiedDependencies[i])); } b.append(LF); - b.appendAscii(RTL_CONSTASCII_STRINGPARAM(" ")); + b.appendAscii(" "); b.append(m_noDependencyCurVer); } break; diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx index d123cec..dac9ec8 100644 --- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx @@ -295,26 +295,26 @@ void UpdateInstallDialog::setError(INSTALL_ERROR err, ::rtl::OUString const & sE OSL_ASSERT(0); } - sError.SearchAndReplace(String(OUSTR("%NAME")), String(sExtension), 0); + sError.SearchAndReplace(String("%NAME"), String(sExtension), 0); //We want to have an empty line between the error messages. However, //there shall be no empty line after the last entry. if (m_bNoEntry) m_bNoEntry = false; else - m_mle_info.InsertText(OUSTR("\n")); + m_mle_info.InsertText(OUString("\n")); m_mle_info.InsertText(sError); //Insert more information about the error if (!exceptionMessage.isEmpty()) - m_mle_info.InsertText(m_sThisErrorOccurred + exceptionMessage + OUSTR("\n")); + m_mle_info.InsertText(m_sThisErrorOccurred + exceptionMessage + "\n"); m_mle_info.InsertText(m_sNoInstall); - m_mle_info.InsertText(OUSTR("\n")); + m_mle_info.InsertText(OUString("\n")); } void UpdateInstallDialog::setError(OUString const & exceptionMessage) { m_bError = true; - m_mle_info.InsertText(exceptionMessage + OUSTR("\n")); + m_mle_info.InsertText(exceptionMessage + "\n"); } IMPL_LINK_NOARG(UpdateInstallDialog, cancelHandler) @@ -333,25 +333,25 @@ void UpdateInstallDialog::Thread::downloadExtensions() //create the download directory in the temp folder OUString sTempDir; if (::osl::FileBase::getTempDirURL(sTempDir) != ::osl::FileBase::E_None) - throw cssu::Exception(OUSTR("Could not get URL for the temp directory. No extensions will be installed."), 0); + throw cssu::Exception("Could not get URL for the temp directory. No extensions will be installed.", 0); //create a unique name for the directory OUString tempEntry, destFolder; if (::osl::File::createTempFile(&sTempDir, 0, &tempEntry ) != ::osl::File::E_None) - throw cssu::Exception(OUSTR("Could not create a temporary file in ") + sTempDir + - OUSTR(". No extensions will be installed"), 0 ); + throw cssu::Exception("Could not create a temporary file in " + sTempDir + + ". No extensions will be installed", 0 ); tempEntry = tempEntry.copy( tempEntry.lastIndexOf( '/' ) + 1 ); destFolder = dp_misc::makeURL( sTempDir, tempEntry ); - destFolder += OUSTR("_"); + destFolder += "_"; m_sDownloadFolder = destFolder; try { dp_misc::create_folder(0, destFolder, m_updateCmdEnv.get(), true ); } catch (const cssu::Exception & e) { - throw cssu::Exception(e.Message + OUSTR(" No extensions will be installed."), 0); + throw cssu::Exception(e.Message + " No extensions will be installed.", 0); } @@ -416,7 +416,7 @@ void UpdateInstallDialog::Thread::downloadExtensions() { if (j != vecExceptions.begin()) buf.appendAscii("\n"); - buf.append(OUSTR("Could not download ")); + buf.append("Could not download "); buf.append(j->first); buf.appendAscii(". "); buf.append(j->second.Message); @@ -485,15 +485,15 @@ void UpdateInstallDialog::Thread::installExtensions() } if (!curData.aUpdateSource.is() && !curData.sLocalURL.isEmpty()) { - css::beans::NamedValue prop(OUSTR("EXTENSION_UPDATE"), css::uno::makeAny(OUSTR("1"))); + css::beans::NamedValue prop("EXTENSION_UPDATE", css::uno::makeAny(OUString("1"))); if (!curData.bIsShared) xExtension = m_dialog.getExtensionManager()->addExtension( curData.sLocalURL, css::uno::Sequence<css::beans::NamedValue>(&prop, 1), - OUSTR("user"), xAbortChannel, m_updateCmdEnv.get()); + "user", xAbortChannel, m_updateCmdEnv.get()); else xExtension = m_dialog.getExtensionManager()->addExtension( curData.sLocalURL, css::uno::Sequence<css::beans::NamedValue>(&prop, 1), - OUSTR("shared"), xAbortChannel, m_updateCmdEnv.get()); + "shared", xAbortChannel, m_updateCmdEnv.get()); } else if (curData.aUpdateSource.is()) { @@ -502,15 +502,15 @@ void UpdateInstallDialog::Thread::installExtensions() //add extension. Currently it contains only "SUPPRESS_LICENSE". So it it could happen //that a license is displayed when updating from the shared repository, although the //shared extension was installed using "SUPPRESS_LICENSE". - css::beans::NamedValue prop(OUSTR("EXTENSION_UPDATE"), css::uno::makeAny(OUSTR("1"))); + css::beans::NamedValue prop("EXTENSION_UPDATE", css::uno::makeAny(OUString("1"))); if (!curData.bIsShared) xExtension = m_dialog.getExtensionManager()->addExtension( curData.aUpdateSource->getURL(), css::uno::Sequence<css::beans::NamedValue>(&prop, 1), - OUSTR("user"), xAbortChannel, m_updateCmdEnv.get()); + "user", xAbortChannel, m_updateCmdEnv.get()); else xExtension = m_dialog.getExtensionManager()->addExtension( curData.aUpdateSource->getURL(), css::uno::Sequence<css::beans::NamedValue>(&prop, 1), - OUSTR("shared"), xAbortChannel, m_updateCmdEnv.get()); + "shared", xAbortChannel, m_updateCmdEnv.get()); } } catch (css::deployment::DeploymentException & de) @@ -591,12 +591,12 @@ void UpdateInstallDialog::Thread::download(OUString const & sDownloadURL, Update 0, &tempEntry ) != ::osl::File::E_None) { //ToDo feedback in window that download of this component failed - throw cssu::Exception(OUSTR("Could not create temporary file in folder ") + destFolder + OUSTR("."), 0); + throw cssu::Exception("Could not create temporary file in folder " + destFolder + ".", 0); } tempEntry = tempEntry.copy( tempEntry.lastIndexOf( '/' ) + 1 ); destFolder = dp_misc::makeURL( m_sDownloadFolder, tempEntry ); - destFolder += OUSTR("_"); + destFolder += "_"; ::ucbhelper::Content destFolderContent; dp_misc::create_folder( &destFolderContent, destFolder, m_updateCmdEnv.get() ); @@ -617,7 +617,7 @@ void UpdateInstallDialog::Thread::download(OUString const & sDownloadURL, Update return; } //all errors should be handeld by the command environment. - aUpdateData.sLocalURL = destFolder + OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) ) + sTitle; + aUpdateData.sLocalURL = destFolder + "/" + sTitle; } } } @@ -659,8 +659,8 @@ void UpdateCommandEnv::handle( { cssu::Any request( xRequest->getRequest() ); OSL_ASSERT( request.getValueTypeClass() == cssu::TypeClass_EXCEPTION ); - dp_misc::TRACE(OUSTR("[dp_gui_cmdenv.cxx] incoming request:\n") - + ::comphelper::anyToString(request) + OUSTR("\n\n")); + dp_misc::TRACE("[dp_gui_cmdenv.cxx] incoming request:\n" + + ::comphelper::anyToString(request) + "\n\n"); css::deployment::VersionException verExc; bool approve = false; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits