cui/inc/dlgname.hxx | 4 ++-- cui/source/options/optjava.cxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
New commits: commit f4d98621bf0bb93874bb433cb01cbce12de5c439 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Thu May 15 23:09:17 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Fri May 16 08:06:09 2025 +0200 cui SvxNameDialog: Pass string by const ref Change-Id: I610c4e93f35f6b3456c0b1b6663e002693f5fd11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185374 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/cui/inc/dlgname.hxx b/cui/inc/dlgname.hxx index 366f57454917..531f2e0f9de9 100644 --- a/cui/inc/dlgname.hxx +++ b/cui/inc/dlgname.hxx @@ -29,7 +29,7 @@ private: std::unique_ptr<weld::Entry> m_xEdtName; std::unique_ptr<weld::Label> m_xFtDescription; std::unique_ptr<weld::Button> m_xBtnOK; - std::function<bool(OUString)> m_aCheckName; + std::function<bool(const OUString&)> m_aCheckName; Link<SvxNameDialog&, bool> m_aCheckNameHdl; Link<SvxNameDialog&, OUString> m_aCheckNameTooltipHdl; @@ -42,7 +42,7 @@ public: OUString GetName() const { return m_xEdtName->get_text(); } - void SetCheckName(const std::function<bool(OUString)>& rFunc) { m_aCheckName = rFunc; } + void SetCheckName(const std::function<bool(const OUString&)>& rFunc) { m_aCheckName = rFunc; } /** add a callback Link that is called whenever the content of the edit field is changed. The Link result determines whether the OK diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index 94991497575f..99612969b4ba 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -748,8 +748,8 @@ void SvxJavaParameterDlg::EditParameter() SvxNameDialog aNameDialog(m_xDialog.get(), editableClassPath, OUString(), CuiResId(RID_CUISTR_JAVA_START_PARAM)); - aNameDialog.SetCheckName([](OUString sNewName) -> bool { - return !o3tl::trim(sNewName).empty(); + aNameDialog.SetCheckName([](const OUString& rNewName) -> bool { + return !o3tl::trim(rNewName).empty(); }); if (!aNameDialog.run())