[Libreoffice-commits] core.git: extras/source include/svx solenv/bin svx/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu Jan 2 13:54:03 UTC 2020


 extras/source/glade/libreoffice-catalog.xml.in |    4 -
 include/svx/pagenumberlistbox.hxx              |   11 -----
 solenv/bin/native-code.py                      |    1 
 svx/source/dialog/pagenumberlistbox.cxx        |   51 -------------------------
 4 files changed, 67 deletions(-)

New commits:
commit 50c845f60cfd8541a004dbeecc85cb696452b4f4
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jan 1 17:43:10 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Jan 2 14:53:32 2020 +0100

    PageNumberListBox is now unused
    
    Change-Id: I2d1c070cb54ca3596eb7f5b07b46f5aa98565633
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86082
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index 0a8b70ca4357..c9bcb3b9b73a 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -126,10 +126,6 @@
                         generic-name="Page Size ListBox" parent="GtkComboBox"
                         icon-name="widget-gtk-combobox"/>
 
-    <glade-widget-class title="Page Numbering ListBox" name="svxcorelo-PageNumberListBox"
-                        generic-name="Page Numbering ListBox" parent="GtkComboBox"
-                        icon-name="widget-gtk-combobox"/>
-
     <glade-widget-class title="Sidebar ToolBox" name="sfxlo-SidebarToolBox"
                         generic-name="Sidebar ToolBox" parent="GtkToolbar"
                         icon-name="widget-gtk-toolbar">
diff --git a/include/svx/pagenumberlistbox.hxx b/include/svx/pagenumberlistbox.hxx
index e416fcb8d507..08bb19220ccd 100644
--- a/include/svx/pagenumberlistbox.hxx
+++ b/include/svx/pagenumberlistbox.hxx
@@ -22,19 +22,8 @@
 
 #include <editeng/svxenum.hxx>
 #include <svx/svxdllapi.h>
-#include <vcl/lstbox.hxx>
 #include <vcl/weld.hxx>
 
-class SVX_DLLPUBLIC PageNumberListBox final : public ListBox
-{
-public:
-    PageNumberListBox( vcl::Window* pParent );
-
-    void SetSelection( sal_uInt16 );
-
-    Size GetOptimalSize() const override;
-};
-
 class SVX_DLLPUBLIC SvxPageNumberListBox
 {
 private:
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index adb71e6e3bc3..d99370c3c18f 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -502,7 +502,6 @@ custom_widgets = [
     'IndexBox',
     'ManagedMenuButton',
     'OptionalBox',
-    'PageNumberListBox',
     'PaperSizeListBox',
     'PriorityHBox',
     'PriorityMergedHBox',
diff --git a/svx/source/dialog/pagenumberlistbox.cxx b/svx/source/dialog/pagenumberlistbox.cxx
index b67a088fd750..9b9b2b8724af 100644
--- a/svx/source/dialog/pagenumberlistbox.cxx
+++ b/svx/source/dialog/pagenumberlistbox.cxx
@@ -20,60 +20,9 @@
 #include <svx/dialmgr.hxx>
 #include <svx/pagenumberlistbox.hxx>
 #include <editeng/numitem.hxx>
-#include <vcl/builderfactory.hxx>
 #include <com/sun/star/style/NumberingType.hpp>
 #include <numberingtype.hrc>
 
-PageNumberListBox::PageNumberListBox(vcl::Window* pParent)
-    : ListBox( pParent, WB_BORDER | WB_DROPDOWN)
-{
-    for (size_t i = 0; i < SAL_N_ELEMENTS(RID_SVXSTRARY_NUMBERINGTYPE); ++i)
-    {
-        sal_uInt16 nData = RID_SVXSTRARY_NUMBERINGTYPE[i].second;
-        switch (nData)
-        {
-            // String list array is also used in Writer and contains strings
-            // for Bullet and Graphics, ignore those here.
-            case css::style::NumberingType::CHAR_SPECIAL:
-            case css::style::NumberingType::BITMAP:
-            case css::style::NumberingType::BITMAP | LINK_TOKEN:
-            break;
-            default:
-                {
-                    OUString aStr = SvxResId(RID_SVXSTRARY_NUMBERINGTYPE[i].first);
-                    sal_Int32 nPos = InsertEntry( aStr );
-                    SetEntryData( nPos, reinterpret_cast<void*>(static_cast<sal_uLong>(nData)) );
-                }
-        }
-    }
-    SetDropDownLineCount(6);
-}
-
-VCL_BUILDER_FACTORY(PageNumberListBox);
-
-void PageNumberListBox::SetSelection( sal_uInt16 nPos )
-{
-    sal_Int32 nEntryCount = GetEntryCount();
-    sal_Int32 nSelPos = LISTBOX_ENTRY_NOTFOUND;
-
-    for (sal_Int32 i = 0; i < nEntryCount; ++i )
-    {
-        sal_uInt16 nTmp = static_cast<sal_uInt16>(reinterpret_cast<sal_uLong>(GetEntryData(i)));
-
-        if ( nTmp == nPos )
-        {
-            nSelPos = i;
-            break;
-        }
-    }
-    SelectEntryPos( ( nSelPos != LISTBOX_ENTRY_NOTFOUND ) ? nSelPos : LISTBOX_ENTRY_NOTFOUND );
-}
-
-Size PageNumberListBox::GetOptimalSize() const
-{
-    return Size(150, ListBox::GetOptimalSize().Height());
-}
-
 SvxPageNumberListBox::SvxPageNumberListBox(std::unique_ptr<weld::ComboBox> pControl)
     : m_xControl(std::move(pControl))
 {


More information about the Libreoffice-commits mailing list