cui/source/tabpages/numpages.cxx     |    6 +++++-
 sw/source/ui/misc/num.cxx            |   11 +----------
 vcl/inc/jsdialog/jsdialogbuilder.hxx |    1 +
 vcl/jsdialog/enabled.cxx             |    1 +
 vcl/jsdialog/jsdialogbuilder.cxx     |    6 ++++++
 5 files changed, 14 insertions(+), 11 deletions(-)

New commits:
commit 6b9415005fee130e9d9b4b005a56975794a47934
Author:     Skyler Grey <skyler.g...@collabora.com>
AuthorDate: Wed Aug 2 08:31:56 2023 +0000
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Wed Aug 9 13:18:43 2023 +0200

    Re-enable Bullets and Numbering → Customize
    
    - Revert change If0f7b953a40ca1d5f469087cb8f362a949c39b37
    - Enable jsdialog for the customize page
    - Fix numbering not being selected when switching level
    - Fix start at field not having a default when changing level type to one 
that can use it
    - Disable types that rely on supporting graphics in LOK as we cannot
      provide them
    
    Change-Id: I2517289b553b8a3e9ed62c64b6514c6aab3702b6
    Signed-off-by: Skyler Grey <skyler.g...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153806
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>

diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 9b97d19460b5..1f5de3dc387b 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -52,6 +52,7 @@
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/propertyvalue.hxx>
+#include <comphelper/lok.hxx>
 #include <svx/svxids.hrc>
 #include <o3tl/string_view.hxx>
 
@@ -1089,7 +1090,9 @@ 
SvxNumOptionsTabPage::SvxNumOptionsTabPage(weld::Container* pPage, weld::DialogC
     sal_uInt32 nCount = SvxNumberingTypeTable::Count();
     for (sal_uInt32 i = 0; i < nCount; ++i)
     {
-        m_xFmtLB->append(OUString::number(SvxNumberingTypeTable::GetValue(i)), 
SvxNumberingTypeTable::GetString(i));
+        int nValue = SvxNumberingTypeTable::GetValue(i);
+        if (comphelper::LibreOfficeKit::isActive() && (nValue & 
SVX_NUM_BITMAP)) continue;
+        m_xFmtLB->append(OUString::number(nValue), 
SvxNumberingTypeTable::GetString(i));
     }
 
     // Get advanced numbering types from the component.
@@ -1464,6 +1467,7 @@ void SvxNumOptionsTabPage::InitControls()
         else
             m_xBulColLB->SetNoSelection();
     }
+    m_xStartED->set_value(1); // If this isn't set then changing the bullet 
type to a numbered type doesn't reset the start level
     switch(nBullet)
     {
         case SHOW_NUMBERING:
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index 137b6db9f015..a5caff53a0c8 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -873,16 +873,7 @@ 
SwSvxNumBulletTabDialog::SwSvxNumBulletTabDialog(weld::Window* pParent,
     AddTabPage("bullets", RID_SVXPAGE_PICK_BULLET );
     AddTabPage("outlinenum", RID_SVXPAGE_PICK_NUM );
     AddTabPage("graphics", RID_SVXPAGE_PICK_BMP );
-
-    if (comphelper::LibreOfficeKit::isActive())
-    {
-        RemoveTabPage("customize");
-    }
-    else
-    {
-        AddTabPage("customize", RID_SVXPAGE_NUM_OPTIONS );
-    }
-
+    AddTabPage("customize", RID_SVXPAGE_NUM_OPTIONS );
     AddTabPage("position", RID_SVXPAGE_NUM_POSITION );
 }
 
diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx 
b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index 060a3e1bb72a..8ed7743c96dd 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -623,6 +623,7 @@ public:
     virtual void set_entry_text_without_notify(const OUString& rText);
     virtual void set_entry_text(const OUString& rText) override;
     virtual void set_active(int pos) override;
+    virtual void set_active_id(const OUString& rText) override;
     virtual bool changed_by_direct_pick() const override;
 };
 
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 647cec05602b..4db6b0da9113 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -53,6 +53,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
         || rUIFile == u"cui/ui/linetabpage.ui"
         || rUIFile == u"cui/ui/macroselectordialog.ui"
         || rUIFile == u"cui/ui/numberingformatpage.ui"
+        || rUIFile == u"cui/ui/numberingoptionspage.ui"
         || rUIFile == u"cui/ui/numberingpositionpage.ui"
         || rUIFile == u"cui/ui/optlingupage.ui"
         || rUIFile == u"cui/ui/pageformatpage.ui"
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 5740e300ae9a..9d1bc1774165 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -1665,6 +1665,12 @@ void JSComboBox::set_active(int pos)
     sendUpdate();
 }
 
+void JSComboBox::set_active_id(const OUString& rStr)
+{
+    sal_uInt16 nPos = find_id(rStr);
+    set_active(nPos);
+}
+
 bool JSComboBox::changed_by_direct_pick() const { return true; }
 
 JSNotebook::JSNotebook(JSDialogSender* pSender, ::TabControl* pControl,

Reply via email to