include/vcl/weld.hxx          |   10 ++++++++++
 vcl/source/app/salvtables.cxx |   26 --------------------------
 vcl/unx/gtk3/gtkinst.cxx      |   25 -------------------------
 3 files changed, 10 insertions(+), 51 deletions(-)

New commits:
commit 9851924a4d7648886d7e2d075119a72e77625089
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Mon Apr 14 23:01:44 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Tue Apr 15 08:08:39 2025 +0200

    tdf#130857 Move weld::EntryTreeView::{g,s}et_entry_font impls to base
    
    The VCL and GTK implementations are equivalent, so move the
    implementation to the base class.
    
    Change-Id: Icbf135411d7d67c68103d8d2caf6edaf3beb8d6b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184185
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 9844c07358e3..aa82380e9b66 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -2156,6 +2156,10 @@ public:
 
     virtual void paste_entry_clipboard() override { 
m_xEntry->paste_clipboard(); }
 
+    virtual void set_entry_font(const vcl::Font& rFont) override { 
m_xEntry->set_font(rFont); }
+
+    virtual vcl::Font get_entry_font() override { return m_xEntry->get_font(); 
}
+
     void connect_row_activated(const Link<TreeView&, bool>& rLink)
     {
         m_xTreeView->connect_row_activated(rLink);
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index ba9713b33c5c..491db4a0e82d 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -6958,14 +6958,6 @@ public:
         rEntry.SetAutocompleteHdl(Link<Edit&, void>());
     }
 
-    virtual void set_entry_font(const vcl::Font& rFont) override { 
m_pEntry->set_font(rFont); }
-
-    virtual vcl::Font get_entry_font() override
-    {
-        Edit& rEntry = m_pEntry->getEntry();
-        return rEntry.GetPointFont(*rEntry.GetOutDev());
-    }
-
     virtual void grab_focus() override { m_xEntry->grab_focus(); }
 
     virtual void connect_focus_in(const Link<Widget&, void>& rLink) override
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 658d1f4809b4..f8b15b5cd0c6 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -23406,16 +23406,6 @@ public:
         m_bAutoCompleteCaseSensitive = bCaseSensitive;
     }
 
-    virtual void set_entry_font(const vcl::Font& rFont) override
-    {
-        m_xEntry->set_font(rFont);
-    }
-
-    virtual vcl::Font get_entry_font() override
-    {
-        return m_xEntry->get_font();
-    }
-
     virtual void grab_focus() override { m_xEntry->grab_focus(); }
 
     virtual void connect_focus_in(const Link<Widget&, void>& rLink) override
commit 21e64a1095fd3f50358e7727e92c1b1187528bad
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Mon Apr 14 22:50:25 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Tue Apr 15 08:08:34 2025 +0200

    tdf#130857 Move weld::EntryTreeView copy/paste method impls to base
    
    For the SalInstanceEntryTreeView::cut_entry_clipboard and
    SalInstanceEntryTreeview::paste_entry_clipboard implementations,
    this means that Entry::Modify now gets called for the entry/edit
    in addition, as this was added to the corresponding SalInstanceEntry
    methods (but not the SalInstanceEntryTreeView ones) in
    
        commit 097257d5e5ccf5026db42b8bb459dc78390dc9e5
        Date:   Thu Sep 30 16:08:25 2021 +0100
    
            Resolves: tdf#140992 Paste/Cut should mark Edit as modified
    
    However, I see no reason to not have that for SalInstanceEntryTreeView
    as well.
    
    (Should there be any reason, then SalInstanceEntryTreeView could
    still override the base class implementation again, while
    GtkInstanceEntryTreeView - and most likely an upcoming
    QtInstanceEntryTreeView - can continue to use the base
    class implementation.)
    
    Change-Id: Ib2890ad26f717bf81930191251422b86d8bf5e15
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184184
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    Tested-by: Jenkins

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 254fcc352f7d..9844c07358e3 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -2150,6 +2150,12 @@ public:
 
     virtual void set_entry_editable(bool bEditable) override { 
m_xEntry->set_editable(bEditable); }
 
+    virtual void cut_entry_clipboard() override { m_xEntry->cut_clipboard(); }
+
+    virtual void copy_entry_clipboard() override { m_xEntry->copy_clipboard(); 
}
+
+    virtual void paste_entry_clipboard() override { 
m_xEntry->paste_clipboard(); }
+
     void connect_row_activated(const Link<TreeView&, bool>& rLink)
     {
         m_xTreeView->connect_row_activated(rLink);
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 6d93fe2bea45..ba9713b33c5c 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -6966,24 +6966,6 @@ public:
         return rEntry.GetPointFont(*rEntry.GetOutDev());
     }
 
-    virtual void cut_entry_clipboard() override
-    {
-        Edit& rEntry = m_pEntry->getEntry();
-        rEntry.Cut();
-    }
-
-    virtual void copy_entry_clipboard() override
-    {
-        Edit& rEntry = m_pEntry->getEntry();
-        rEntry.Copy();
-    }
-
-    virtual void paste_entry_clipboard() override
-    {
-        Edit& rEntry = m_pEntry->getEntry();
-        rEntry.Paste();
-    }
-
     virtual void grab_focus() override { m_xEntry->grab_focus(); }
 
     virtual void connect_focus_in(const Link<Widget&, void>& rLink) override
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 947ea6ae7ceb..658d1f4809b4 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -23406,21 +23406,6 @@ public:
         m_bAutoCompleteCaseSensitive = bCaseSensitive;
     }
 
-    virtual void cut_entry_clipboard() override
-    {
-        m_xEntry->cut_clipboard();
-    }
-
-    virtual void copy_entry_clipboard() override
-    {
-        m_xEntry->copy_clipboard();
-    }
-
-    virtual void paste_entry_clipboard() override
-    {
-        m_xEntry->paste_clipboard();
-    }
-
     virtual void set_entry_font(const vcl::Font& rFont) override
     {
         m_xEntry->set_font(rFont);

Reply via email to