sc/source/ui/navipi/navipi.cxx           |    6 ++++++
 sc/uiconfig/scalc/ui/navigatorpanel.ui   |    2 +-
 sd/source/ui/dlg/navigatr.cxx            |    6 ++++++
 sw/source/uibase/utlui/navipi.cxx        |   29 ++++++++++++++++++++++++-----
 sw/uiconfig/swriter/ui/navigatorpanel.ui |    2 +-
 5 files changed, 38 insertions(+), 7 deletions(-)

New commits:
commit fa93ddc87b86432ab68e43353cd872439895898f
Author:     Attila Szűcs <attila.sz...@collabora.com>
AuthorDate: Thu May 4 16:59:54 2023 +0200
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Fri May 5 10:01:10 2023 +0200

    LOK: Navi-10 hide not needed controls
    
    Hide controls we dont need in navigator now.
    
    Change-Id: Ibf6843be2976bcd4d90e67130dd0cc08d0988c0b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151397
    Tested-by: Szymon Kłos <szymon.k...@collabora.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>

diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index 6340c1a80f33..1934b14ca374 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -423,6 +423,12 @@ ScNavigatorDlg::ScNavigatorDlg(SfxBindings* pB, 
weld::Widget* pParent, SfxNaviga
     else
         eNavMode = NAV_LMODE_AREAS;
     SetListMode(eNavMode);
+
+    if(comphelper::LibreOfficeKit::isActive())
+    {
+        m_xBuilder->weld_container("gridbuttons")->hide();
+        m_xLbDocuments->hide();
+    }
 }
 
 weld::Window* ScNavigatorDlg::GetFrameWeld() const
diff --git a/sc/uiconfig/scalc/ui/navigatorpanel.ui 
b/sc/uiconfig/scalc/ui/navigatorpanel.ui
index 9e02f0ba5588..a5b9b3038be6 100644
--- a/sc/uiconfig/scalc/ui/navigatorpanel.ui
+++ b/sc/uiconfig/scalc/ui/navigatorpanel.ui
@@ -101,7 +101,7 @@
         <property name="column_spacing">12</property>
         <child>
           <!-- n-columns=1 n-rows=1 -->
-          <object class="GtkGrid">
+          <object class="GtkGrid" id="gridbuttons">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="hexpand">True</property>
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index cdc2db1f5a81..459051b9aed4 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -48,6 +48,7 @@
 #include <utility>
 
 #include <vcl/commandevent.hxx>
+#include <comphelper/lok.hxx>
 
 /**
  * SdNavigatorWin - FloatingWindow
@@ -93,6 +94,11 @@ SdNavigatorWin::SdNavigatorWin(weld::Widget* pParent, 
SfxBindings* pInBindings,
     mxToolbox->connect_key_press(LINK(this, SdNavigatorWin, KeyInputHdl));
     mxTlbObjects->connect_key_press(LINK(this, SdNavigatorWin, KeyInputHdl));
     mxLbDocs->connect_key_press(LINK(this, SdNavigatorWin, KeyInputHdl));
+    if(comphelper::LibreOfficeKit::isActive())
+    {
+        mxToolbox->hide();
+        mxLbDocs->hide();
+    }
 }
 
 void SdNavigatorWin::FirstFocus()
diff --git a/sw/source/uibase/utlui/navipi.cxx 
b/sw/source/uibase/utlui/navipi.cxx
index fc92d2d6edda..4f60ba96e874 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -49,6 +49,8 @@
 
 #include <workctrl.hxx>
 
+#include <comphelper/lok.hxx>
+
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::frame;
 
@@ -682,6 +684,14 @@ SwNavigationPI::SwNavigationPI(weld::Widget* pParent,
     m_xDocListBox->set_accessible_name(m_aStatusArr[3]);
 
     m_aExpandedSize = m_xContainer->get_preferred_size();
+
+    if(comphelper::LibreOfficeKit::isActive())
+    {
+        m_xBuilder->weld_container("gridcontent16")->hide();
+        m_xDocListBox->hide();
+        m_xGlobalBox->hide();
+        m_xGlobalToolBox->hide();
+    }
 }
 
 weld::Window* SwNavigationPI::GetFrameWeld() const
@@ -765,12 +775,15 @@ void SwNavigationPI::NotifyItemUpdate(sal_uInt16 nSID, 
SfxItemState /*eState*/,
     }
     else if (nSID == FN_STAT_PAGE)
     {
-        SwView *pActView = GetCreateView();
-        if(pActView)
+        if(!comphelper::LibreOfficeKit::isActive())
         {
-            SwWrtShell &rSh = pActView->GetWrtShell();
-            m_xEdit->set_max(rSh.GetPageCnt());
-            m_xEdit->set_width_chars(3);
+            SwView *pActView = GetCreateView();
+            if(pActView)
+            {
+                SwWrtShell &rSh = pActView->GetWrtShell();
+                m_xEdit->set_max(rSh.GetPageCnt());
+                m_xEdit->set_width_chars(3);
+            }
         }
     }
 }
@@ -1045,6 +1058,12 @@ void SwNavigationPI::SetRegionDropMode(RegionMode 
nNewMode)
 
 void SwNavigationPI::ToggleTree()
 {
+    if (comphelper::LibreOfficeKit::isActive())
+    {
+        m_xGlobalTree->HideTree();
+        return;
+    }
+
     bool bGlobalDoc = IsGlobalDoc();
     if (!IsGlobalMode() && bGlobalDoc)
     {
diff --git a/sw/uiconfig/swriter/ui/navigatorpanel.ui 
b/sw/uiconfig/swriter/ui/navigatorpanel.ui
index f38518649c9a..71718d71d572 100644
--- a/sw/uiconfig/swriter/ui/navigatorpanel.ui
+++ b/sw/uiconfig/swriter/ui/navigatorpanel.ui
@@ -244,7 +244,7 @@
             <property name="row-spacing">6</property>
             <property name="column-spacing">12</property>
             <child>
-              <object class="GtkBox">
+              <object class="GtkBox" id="gridcontent16">
                 <property name="visible">True</property>
                 <property name="can-focus">False</property>
                 <property name="hexpand">True</property>

Reply via email to