Resolves: tdf#125168 label mnemonic appearing in database url

Change-Id: I39531ae2a656c16c7355d73b76cb918d3535f7b0
Reviewed-on: https://gerrit.libreoffice.org/74604
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
diff --git a/dbaccess/source/ui/control/curledit.cxx b/dbaccess/source/ui/control/curledit.cxx
index 7c8df5e..bca982b 100644
--- a/dbaccess/source/ui/control/curledit.cxx
+++ b/dbaccess/source/ui/control/curledit.cxx
@@ -79,7 +79,7 @@

OUString OConnectionURLEdit::GetText() const
{
    return m_xForcedPrefix->get_label() + m_xEntry->get_text();
    return m_xForcedPrefix->strip_mnemonic(m_xForcedPrefix->get_label()) + m_xEntry->get_text();
}

void OConnectionURLEdit::ShowPrefix(bool _bShowPrefix)
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index a124cd09..af862d4 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -147,6 +147,8 @@
    //parents
    virtual void help_hierarchy_foreach(const std::function<bool(const OString&)>& func) = 0;

    virtual OUString strip_mnemonic(const OUString& rLabel) const = 0;

    virtual ~Widget() {}
};

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index afb51ee..88e1b1d 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -556,6 +556,11 @@

    virtual void help_hierarchy_foreach(const std::function<bool(const OString&)>& func) override;

    virtual OUString strip_mnemonic(const OUString &rLabel) const override
    {
        return rLabel.replaceFirst("~", "");
    }

    SystemWindow* getSystemWindow()
    {
        return m_xWidget->GetSystemWindow();
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 5123db7..9831762 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1668,6 +1668,11 @@
    }

    virtual void help_hierarchy_foreach(const std::function<bool(const OString&)>& func) override;

    virtual OUString strip_mnemonic(const OUString &rLabel) const override
    {
        return rLabel.replaceFirst("_", "");
    }
};

namespace