diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-01-01 17:43:10 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-01-02 14:53:32 +0100 |
commit | 50c845f60cfd8541a004dbeecc85cb696452b4f4 (patch) | |
tree | 0d1c9a0895802000f2bd52d331707c7dffbdbc0e | |
parent | 66516930ce3d23e073a9d7fea43fed239a0ea8a4 (diff) |
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@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | extras/source/glade/libreoffice-catalog.xml.in | 4 | ||||
-rw-r--r-- | include/svx/pagenumberlistbox.hxx | 11 | ||||
-rwxr-xr-x | solenv/bin/native-code.py | 1 | ||||
-rw-r--r-- | svx/source/dialog/pagenumberlistbox.cxx | 51 |
4 files changed, 0 insertions, 67 deletions
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)) { |