diff options
-rw-r--r-- | desktop/source/app/check_ext_deps.cxx | 3 | ||||
-rw-r--r-- | desktop/source/deployment/misc/dp_descriptioninfoset.cxx | 15 | ||||
-rw-r--r-- | desktop/source/deployment/registry/help/dp_help.cxx | 3 | ||||
-rw-r--r-- | desktop/source/lib/init.cxx | 24 | ||||
-rw-r--r-- | desktop/source/migration/migration.cxx | 3 |
5 files changed, 16 insertions, 32 deletions
diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx index cb32e3b0387a..8eb39f4e0340 100644 --- a/desktop/source/app/check_ext_deps.cxx +++ b/desktop/source/app/check_ext_deps.cxx @@ -211,7 +211,6 @@ static const char aAccessSrvc[] = "com.sun.star.configuration.ConfigurationUpdat static sal_Int16 impl_showExtensionDialog( uno::Reference< uno::XComponentContext > const &xContext ) { - OUString sServiceName = "com.sun.star.deployment.ui.UpdateRequiredDialog"; uno::Reference< uno::XInterface > xService; sal_Int16 nRet = 0; @@ -220,7 +219,7 @@ static sal_Int16 impl_showExtensionDialog( uno::Reference< uno::XComponentContex throw uno::RuntimeException( "impl_showExtensionDialog(): unable to obtain service manager from component context", uno::Reference< uno::XInterface > () ); - xService = xServiceManager->createInstanceWithContext( sServiceName, xContext ); + xService = xServiceManager->createInstanceWithContext( "com.sun.star.deployment.ui.UpdateRequiredDialog", xContext ); uno::Reference< ui::dialogs::XExecutableDialog > xExecuteable( xService, uno::UNO_QUERY ); if ( xExecuteable.is() ) nRet = xExecuteable->execute(); diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx index 0caa69534820..549528aae042 100644 --- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx +++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx @@ -576,10 +576,9 @@ std::pair< OUString, OUString > DescriptionInfoset::getLocalizedPublisherNameAnd OUString sURL; if (node.is()) { - const OUString exp1("text()"); css::uno::Reference< css::xml::dom::XNode > xPathName; try { - xPathName = m_xpath->selectSingleNode(node, exp1); + xPathName = m_xpath->selectSingleNode(node, "text()"); } catch (const css::xml::xpath::XPathException &) { // ignore } @@ -587,10 +586,9 @@ std::pair< OUString, OUString > DescriptionInfoset::getLocalizedPublisherNameAnd if (xPathName.is()) sPublisherName = xPathName->getNodeValue(); - const OUString exp2("@xlink:href"); css::uno::Reference< css::xml::dom::XNode > xURL; try { - xURL = m_xpath->selectSingleNode(node, exp2); + xURL = m_xpath->selectSingleNode(node, "@xlink:href"); } catch (const css::xml::xpath::XPathException &) { // ignore } @@ -612,10 +610,9 @@ OUString DescriptionInfoset::getLocalizedDisplayName() const getLocalizedChild("desc:display-name"); if (node.is()) { - const OUString exp("text()"); css::uno::Reference< css::xml::dom::XNode > xtext; try { - xtext = m_xpath->selectSingleNode(node, exp); + xtext = m_xpath->selectSingleNode(node, "text()"); } catch (const css::xml::xpath::XPathException &) { // ignore } @@ -764,9 +761,8 @@ DescriptionInfoset::getChildWithDefaultLocale(css::uno::Reference< css::xml::dom } } - const OUString exp2("*[1]"); try { - return m_xpath->selectSingleNode(xParent, exp2); + return m_xpath->selectSingleNode(xParent, "*[1]"); } catch (const css::xml::xpath::XPathException &) { // ignore return nullptr; @@ -785,10 +781,9 @@ OUString DescriptionInfoset::getLocalizedHREFAttrFromChild( { if (out_bParentExists) *out_bParentExists = true; - const OUString exp("@xlink:href"); css::uno::Reference< css::xml::dom::XNode > xURL; try { - xURL = m_xpath->selectSingleNode(node, exp); + xURL = m_xpath->selectSingleNode(node, "@xlink:href"); } catch (const css::xml::xpath::XPathException &) { // ignore } diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx index eddb42b28a40..aca144b2bf9c 100644 --- a/desktop/source/deployment/registry/help/dp_help.cxx +++ b/desktop/source/deployment/registry/help/dp_help.cxx @@ -400,10 +400,9 @@ void BackendImpl::implProcessHelp( langFolderDest, xCmdEnv); const OUString aHelpStr("help"); - const OUString aSlash("/"); OUString aJarFile( - makeURL(sHelpFolder, langFolderURLSegment + aSlash + aHelpStr + ".jar")); + makeURL(sHelpFolder, langFolderURLSegment + "/" + aHelpStr + ".jar")); aJarFile = ::dp_misc::expandUnoRcUrl(aJarFile); OUString aEncodedJarFilePath = rtl::Uri::encode( diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 7f89463dc6aa..5a9bd8c94a85 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3564,13 +3564,7 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nWin } else if (aMap.find("id") != aMap.end()) { - const OUString sClickAction("CLICK"); const OUString sSelectAction("SELECT"); - const OUString sClearAction("CLEAR"); - const OUString sTypeAction("TYPE"); - const OUString sUpAction("UP"); - const OUString sDownAction("DOWN"); - const OUString sValue("VALUE"); try { @@ -3589,23 +3583,23 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nWin } else if (aMap["cmd"] == "plus") { - pUIWindow->execute(sUpAction, aMap); + pUIWindow->execute("UP", aMap); } else if (aMap["cmd"] == "minus") { - pUIWindow->execute(sDownAction, aMap); + pUIWindow->execute("DOWN", aMap); } else if (aMap["cmd"] == "set") { aMap["TEXT"] = aMap["data"]; - pUIWindow->execute(sClearAction, aMap); - pUIWindow->execute(sTypeAction, aMap); + pUIWindow->execute("CLEAR", aMap); + pUIWindow->execute("TYPE", aMap); } else if (aMap["cmd"] == "value") { aMap["VALUE"] = aMap["data"]; - pUIWindow->execute(sValue, aMap); + pUIWindow->execute("VALUE", aMap); } else if (aMap["cmd"] == "selecttab") { @@ -3620,7 +3614,7 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nWin bIsClickAction = true; if (bIsClickAction) - pUIWindow->execute(sClickAction, aMap); + pUIWindow->execute("CLICK", aMap); } } catch(...) {} @@ -5544,15 +5538,13 @@ static void lo_setDocumentPassword(LibreOfficeKit* pThis, static char* lo_getVersionInfo(SAL_UNUSED_PARAMETER LibreOfficeKit* /*pThis*/) { SetLastExceptionMsg(); - const OUString sVersionStrTemplate( + return convertOUString(ReplaceStringHookProc( "{ " "\"ProductName\": \"%PRODUCTNAME\", " "\"ProductVersion\": \"%PRODUCTVERSION\", " "\"ProductExtension\": \"%PRODUCTEXTENSION\", " "\"BuildId\": \"%BUILDID\" " - "}" - ); - return convertOUString(ReplaceStringHookProc(sVersionStrTemplate)); + "}")); } static void aBasicErrorFunc(const OUString& rError, const OUString& rAction) diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index 25964de3cb79..40729d7d9ffd 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -122,8 +122,7 @@ static OUString mapModuleShortNameToIdentifier(const OUString& sShortName) bool MigrationImpl::alreadyMigrated() { - OUString const MIGRATION_STAMP_NAME("/MIGRATED4"); - OUString aStr = m_aInfo.userdata + MIGRATION_STAMP_NAME; + OUString aStr = m_aInfo.userdata + "/MIGRATED4"; File aFile(aStr); // create migration stamp, and/or check its existence bool bRet = aFile.open (osl_File_OpenFlag_Write | osl_File_OpenFlag_Create | osl_File_OpenFlag_NoLock) == FileBase::E_EXIST; |