diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-07 12:55:53 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-07 14:41:40 +0200 |
commit | 9422879a5cf74120c1057b0f8150529e304f7c95 (patch) | |
tree | 00b6c549be8fea2980f0ee2e2fc621b8ca8920fd /desktop/source/migration/migration.cxx | |
parent | c87077f653739d00ed5237d54838c1a454d65c4f (diff) |
loplugin:ostr in desktop
Change-Id: Ib43d1c3a182badddd870bcb8e052ac7fd0a16fc5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167270
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop/source/migration/migration.cxx')
-rw-r--r-- | desktop/source/migration/migration.cxx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index d6b52c806367..76c769eba0bb 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -263,7 +263,7 @@ void MigrationImpl::setMigrationCompleted() { try { uno::Reference< XPropertySet > aPropertySet(getConfigAccess("org.openoffice.Setup/Office", true), uno::UNO_QUERY_THROW); - aPropertySet->setPropertyValue("MigrationCompleted", uno::Any(true)); + aPropertySet->setPropertyValue(u"MigrationCompleted"_ustr, uno::Any(true)); uno::Reference< XChangesBatch >(aPropertySet, uno::UNO_QUERY_THROW)->commitChanges(); } catch (...) { // fail silently @@ -276,7 +276,7 @@ bool MigrationImpl::checkMigrationCompleted() try { uno::Reference< XPropertySet > aPropertySet( getConfigAccess("org.openoffice.Setup/Office"), uno::UNO_QUERY_THROW); - aPropertySet->getPropertyValue("MigrationCompleted") >>= bMigrationCompleted; + aPropertySet->getPropertyValue(u"MigrationCompleted"_ustr) >>= bMigrationCompleted; if( !bMigrationCompleted && getenv("SAL_DISABLE_USERMIGRATION" ) ) { // migration prevented - fake its success @@ -335,7 +335,7 @@ migrations_vr MigrationImpl::readMigrationSteps(const OUString& rMigrationName) // get migration description from org.openoffice.Setup/Migration // and build vector of migration steps - uno::Reference< XNameAccess > theNameAccess(xMigrationData->getByName("MigrationSteps"), uno::UNO_QUERY_THROW); + uno::Reference< XNameAccess > theNameAccess(xMigrationData->getByName(u"MigrationSteps"_ustr), uno::UNO_QUERY_THROW); uno::Reference< XNameAccess > tmpAccess; uno::Sequence< OUString > tmpSeq; migrations_vr vrMigrations(new migrations_v); @@ -346,37 +346,37 @@ migrations_vr MigrationImpl::readMigrationSteps(const OUString& rMigrationName) migration_step tmpStep; // read included files from current step description - if (tmpAccess->getByName("IncludedFiles") >>= tmpSeq) { + if (tmpAccess->getByName(u"IncludedFiles"_ustr) >>= tmpSeq) { for (const OUString& rSeqEntry : tmpSeq) tmpStep.includeFiles.push_back(rSeqEntry); } // excluded files... - if (tmpAccess->getByName("ExcludedFiles") >>= tmpSeq) { + if (tmpAccess->getByName(u"ExcludedFiles"_ustr) >>= tmpSeq) { for (const OUString& rSeqEntry : tmpSeq) tmpStep.excludeFiles.push_back(rSeqEntry); } // included nodes... - if (tmpAccess->getByName("IncludedNodes") >>= tmpSeq) { + if (tmpAccess->getByName(u"IncludedNodes"_ustr) >>= tmpSeq) { for (const OUString& rSeqEntry : tmpSeq) tmpStep.includeConfig.push_back(rSeqEntry); } // excluded nodes... - if (tmpAccess->getByName("ExcludedNodes") >>= tmpSeq) { + if (tmpAccess->getByName(u"ExcludedNodes"_ustr) >>= tmpSeq) { for (const OUString& rSeqEntry : tmpSeq) tmpStep.excludeConfig.push_back(rSeqEntry); } // excluded extensions... - if (tmpAccess->getByName("ExcludedExtensions") >>= tmpSeq) { + if (tmpAccess->getByName(u"ExcludedExtensions"_ustr) >>= tmpSeq) { for (const OUString& rSeqEntry : tmpSeq) tmpStep.excludeExtensions.push_back(rSeqEntry); } // generic service - tmpAccess->getByName("MigrationService") >>= tmpStep.service; + tmpAccess->getByName(u"MigrationService"_ustr) >>= tmpStep.service; vrMigrations->push_back(tmpStep); } @@ -772,17 +772,17 @@ next: OUString sMigratedColorScheme; uno::Reference<XPropertySet> aPropertySet( getConfigAccess("org.openoffice.Office.UI/ColorScheme", true), uno::UNO_QUERY_THROW); - if (aPropertySet->getPropertyValue("CurrentColorScheme") >>= sMigratedColorScheme) + if (aPropertySet->getPropertyValue(u"CurrentColorScheme"_ustr) >>= sMigratedColorScheme) { if (sMigratedColorScheme.equals(sMigratedProductName)) { - aPropertySet->setPropertyValue("CurrentColorScheme", + aPropertySet->setPropertyValue(u"CurrentColorScheme"_ustr, uno::Any(sProductName)); uno::Reference<XChangesBatch>(aPropertySet, uno::UNO_QUERY_THROW)->commitChanges(); } else if (sMigratedColorScheme.equals(sMigratedProductNameDark)) { - aPropertySet->setPropertyValue("CurrentColorScheme", + aPropertySet->setPropertyValue(u"CurrentColorScheme"_ustr, uno::Any(sProductNameDark)); uno::Reference<XChangesBatch>(aPropertySet, uno::UNO_QUERY_THROW)->commitChanges(); } @@ -858,9 +858,9 @@ void MigrationImpl::runServices() // Build argument array uno::Sequence< uno::Any > seqArguments(3); auto pseqArguments = seqArguments.getArray(); - pseqArguments[0] <<= NamedValue("Productname", + pseqArguments[0] <<= NamedValue(u"Productname"_ustr, uno::Any(m_aInfo.productname)); - pseqArguments[1] <<= NamedValue("UserData", + pseqArguments[1] <<= NamedValue(u"UserData"_ustr, uno::Any(m_aInfo.userdata)); @@ -880,7 +880,7 @@ void MigrationImpl::runServices() if ( nSize > 0 ) seqExtDenyList = comphelper::arrayToSequence< OUString >( rMigration.excludeExtensions.data(), nSize ); - pseqArguments[2] <<= NamedValue("ExtensionDenyList", + pseqArguments[2] <<= NamedValue(u"ExtensionDenyList"_ustr, uno::Any( seqExtDenyList )); xMigrationJob.set( |