summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-01 20:00:12 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-02 10:00:13 +0200
commit374d9af32aab5fcf56445fe1a9e474e2720c7e0c (patch)
tree6e17e8f56cff7a671712ccd54bfc5c6858b499f5 /svx
parentb7240fe13dbc78c224a3883a5463691a72a571c1 (diff)
drop unused SvxPresetListBox
Change-Id: I9efd96e42c7c1a7e8f9f08ddf1edf7c74b30c7ca Reviewed-on: https://gerrit.libreoffice.org/61216 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/tbxctrls/SvxPresetListBox.cxx66
1 files changed, 0 insertions, 66 deletions
diff --git a/svx/source/tbxctrls/SvxPresetListBox.cxx b/svx/source/tbxctrls/SvxPresetListBox.cxx
index 6d136e8170d7..71f8e6514458 100644
--- a/svx/source/tbxctrls/SvxPresetListBox.cxx
+++ b/svx/source/tbxctrls/SvxPresetListBox.cxx
@@ -26,72 +26,6 @@
#include <vcl/menu.hxx>
#include <vcl/popupmenuwindow.hxx>
-SvxPresetListBox::SvxPresetListBox(vcl::Window* pParent, WinBits nWinStyle)
- : ValueSet(pParent, nWinStyle),
- nColCount(3)
-{
- SetEdgeBlending(true);
- SetExtraSpacing(4);
-}
-
-
-VCL_BUILDER_FACTORY_CONSTRUCTOR(SvxPresetListBox, WB_ITEMBORDER| WB_3DLOOK|WB_OWNERDRAWDECORATION|WB_TABSTOP)
-
-void SvxPresetListBox::Resize()
-{
- DrawLayout();
- WinBits aWinBits(GetStyle());
- aWinBits |= WB_VSCROLL;
- SetStyle(aWinBits);
- ValueSet::Resize();
-}
-
-void SvxPresetListBox::Command( const CommandEvent& rEvent )
-{
- switch(rEvent.GetCommand())
- {
- case CommandEventId::ContextMenu:
- {
- const sal_uInt16 nIndex = GetSelectedItemId();
- if(nIndex > 0)
- {
- Point aPos(rEvent.GetMousePosPixel());
- VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "svx/ui/presetmenu.ui", "");
- VclPtr<PopupMenu> pMenu(aBuilder.get_menu("menu"));
- FloatingWindow* pMenuWindow = dynamic_cast<FloatingWindow*>(pMenu->GetWindow());
- if(pMenuWindow != nullptr)
- {
- pMenuWindow->SetPopupModeFlags(
- pMenuWindow->GetPopupModeFlags() | FloatWinPopupFlags::NoMouseUpClose);
- }
- pMenu->SetSelectHdl( LINK(this, SvxPresetListBox, OnMenuItemSelected) );
- pMenu->Execute(this,tools::Rectangle(aPos,Size(1,1)),PopupMenuFlags::ExecuteDown);
- }
- }
- break;
- default:
- ValueSet::Command( rEvent );
- break;
- }
-}
-
-void SvxPresetListBox::DrawLayout()
-{
- SetColCount(getColumnCount());
- SetLineCount(5);
-}
-
-IMPL_LINK(SvxPresetListBox, OnMenuItemSelected, Menu*, pMenu, bool)
-{
- if( pMenu == nullptr )
- {
- OSL_ENSURE( pMenu != nullptr, "SvxPresetListBox::OnMenuItemSelected : illegal menu!" );
- return false;
- }
- pMenu->Deactivate();
- return false;
-}
-
PresetListBox::PresetListBox(std::unique_ptr<weld::ScrolledWindow> pWindow)
: SvtValueSet(std::move(pWindow))
, nColCount(3)