diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-12-28 17:56:40 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-12-29 16:42:33 +0100 |
commit | 042033f1e6da22616cb76c8d950c20c9efecbad5 (patch) | |
tree | 26b3f1f42d067506f44550b410f3fb9640616a5b /desktop/source/deployment/gui | |
parent | ccfd8e9d09f9ac0a0ea92d0f378391006faaf934 (diff) |
loplugin:stringviewparam: operator +
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'desktop/source/deployment/gui')
3 files changed, 12 insertions, 8 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx index bf15f687f0dd..5983313de51b 100644 --- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx @@ -52,6 +52,7 @@ #include <com/sun/star/uno/Sequence.h> #include <comphelper/anytostring.hxx> +#include <string_view> #include <vector> using dp_misc::StrTitle; @@ -233,7 +234,7 @@ void UpdateInstallDialog::updateDone() // make sure the solar mutex is locked before calling //sets an error message in the text area void UpdateInstallDialog::setError(INSTALL_ERROR err, std::u16string_view sExtension, - OUString const & exceptionMessage) + std::u16string_view exceptionMessage) { OUString sError; m_bError = true; @@ -264,7 +265,7 @@ void UpdateInstallDialog::setError(INSTALL_ERROR err, std::u16string_view sExten sMsg += "\n"; sMsg += sError; //Insert more information about the error - if (!exceptionMessage.isEmpty()) + if (!exceptionMessage.empty()) sMsg += m_sThisErrorOccurred + exceptionMessage + "\n"; sMsg += m_sNoInstall + "\n"; @@ -272,7 +273,7 @@ void UpdateInstallDialog::setError(INSTALL_ERROR err, std::u16string_view sExten m_xMle_info->set_text(sMsg); } -void UpdateInstallDialog::setError(OUString const & exceptionMessage) +void UpdateInstallDialog::setError(std::u16string_view exceptionMessage) { m_bError = true; m_xMle_info->set_text(m_xMle_info->get_text() + exceptionMessage + "\n"); @@ -493,7 +494,7 @@ void UpdateInstallDialog::Thread::installExtensions() return; } m_dialog.setError(UpdateInstallDialog::ERROR_LICENSE_DECLINED, - updateData.aInstalledPackage->getDisplayName(), OUString()); + updateData.aInstalledPackage->getDisplayName(), std::u16string_view()); } else if (!xExtension.is() || bError) { diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx index 7e970f7b346c..224307f71b30 100644 --- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx +++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx @@ -22,6 +22,8 @@ #include <sal/config.h> #include <vcl/weld.hxx> #include <rtl/ref.hxx> + +#include <string_view> #include <vector> /// @HTML @@ -78,8 +80,8 @@ private: ERROR_INSTALLATION, ERROR_LICENSE_DECLINED }; - void setError(INSTALL_ERROR err, std::u16string_view sExtension, OUString const & exceptionMessage); - void setError(OUString const & exceptionMessage); + void setError(INSTALL_ERROR err, std::u16string_view sExtension, std::u16string_view exceptionMessage); + void setError(std::u16string_view exceptionMessage); const css::uno::Reference< css::deployment::XExtensionManager >& getExtensionManager() const { return m_xExtensionManager; } diff --git a/desktop/source/deployment/gui/license_dialog.cxx b/desktop/source/deployment/gui/license_dialog.cxx index ef2b64b91101..34fa924b8128 100644 --- a/desktop/source/deployment/gui/license_dialog.cxx +++ b/desktop/source/deployment/gui/license_dialog.cxx @@ -29,6 +29,7 @@ #include "license_dialog.hxx" #include <functional> +#include <string_view> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -64,7 +65,7 @@ struct LicenseDialogImpl : public weld::GenericDialogController DECL_LINK(SizeAllocHdl, const Size&, void); LicenseDialogImpl(weld::Window * pParent, - const OUString & sExtensionName, + std::u16string_view sExtensionName, const OUString & sLicenseText); bool IsEndReached() const; @@ -74,7 +75,7 @@ struct LicenseDialogImpl : public weld::GenericDialogController LicenseDialogImpl::LicenseDialogImpl( weld::Window * pParent, - const OUString & sExtensionName, + std::u16string_view sExtensionName, const OUString & sLicenseText) : GenericDialogController(pParent, "desktop/ui/licensedialog.ui", "LicenseDialog") , m_bLicenseRead(false) |