Kaydet (Commit) 8b1c57d4 authored tarafından Chr. Rossmanith's avatar Chr. Rossmanith

RTL_CONSTASCII_(U)STRINGPARAM removed in desktop/source/deployment/gui

Removed OUSTR() as well and replaced .equals() with ==

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