[Libreoffice-commits] core.git: sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Mar 5 13:47:13 UTC 2021
sc/source/ui/inc/content.hxx | 10 ----------
sc/source/ui/navipi/content.cxx | 5 +++++
sc/source/ui/navipi/navipi.cxx | 4 ----
3 files changed, 5 insertions(+), 14 deletions(-)
New commits:
commit 59f9e22c992118de9fe676cf3161c0eecd8b63dd
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Mar 5 10:16:54 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Mar 5 14:46:29 2021 +0100
don't use the vcl::Window parent to derive a treeview size
Change-Id: Idee74fbdf45574fbb7997498062aaac0fb11eb74
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111996
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx
index ca1e5a1c6e0c..a32aab9f48a2 100644
--- a/sc/source/ui/inc/content.hxx
+++ b/sc/source/ui/inc/content.hxx
@@ -127,16 +127,6 @@ public:
void ObjectFresh(ScContentId nType, const weld::TreeIter* pEntry = nullptr);
void SetNavigatorDlgFlag(bool isInNavigateDlg){ bisInNavigatoeDlg=isInNavigateDlg;};
- void set_selection_mode(SelectionMode eMode)
- {
- m_xTreeView->set_selection_mode(eMode);
- }
-
- void set_size_request(int nWidth, int nHeight)
- {
- m_xTreeView->set_size_request(nWidth, nHeight);
- }
-
void hide()
{
m_xTreeView->hide();
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 823ea306ae87..8a9b221ab8d0 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -146,6 +146,11 @@ ScContentTree::ScContentTree(std::unique_ptr<weld::TreeView> xTreeView, ScNaviga
m_xTreeView->enable_drag_source(xHelper, DND_ACTION_COPY | DND_ACTION_LINK);
m_xTreeView->connect_drag_begin(LINK(this, ScContentTree, DragBeginHdl));
+
+ m_xTreeView->set_selection_mode( SelectionMode::Single );
+
+ m_xTreeView->set_size_request(m_xTreeView->get_approximate_digit_width() * 30,
+ m_xTreeView->get_text_height() * 13);
}
ScContentTree::~ScContentTree()
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index 5d3e7366f6f6..99594e9113b5 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -383,10 +383,6 @@ ScNavigatorDlg::ScNavigatorDlg(SfxBindings* pB, vcl::Window* pParent)
StartListening( *(SfxGetpApp()) );
StartListening( rBindings );
- m_xLbEntries->set_selection_mode( SelectionMode::Single );
- Size aSize(LogicToPixel(Size(110, 100), MapMode(MapUnit::MapAppFont)));
- m_xLbEntries->set_size_request(aSize.Width(), aSize.Height());
-
// was a category chosen as root?
ScContentId nLastRoot = rCfg.GetRootType();
if ( nLastRoot != ScContentId::ROOT )
More information about the Libreoffice-commits
mailing list