From 73e6a7975b3508c5cfccb3df7c35b0303f87d9bb Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 29 Mar 2018 09:35:22 +0200 Subject: loplugin:unusedmethods Change-Id: I7805ac9bc6f8c0aa5ba4804777e7d7c2c29a78f3 Reviewed-on: https://gerrit.libreoffice.org/52066 Tested-by: Jenkins Reviewed-by: Noel Grandin --- toolkit/inc/helper/btndlg.hxx | 4 ---- toolkit/source/helper/btndlg.cxx | 39 --------------------------------------- 2 files changed, 43 deletions(-) (limited to 'toolkit') diff --git a/toolkit/inc/helper/btndlg.hxx b/toolkit/inc/helper/btndlg.hxx index eb278846d5f1..afc26c828357 100644 --- a/toolkit/inc/helper/btndlg.hxx +++ b/toolkit/inc/helper/btndlg.hxx @@ -58,13 +58,9 @@ public: void SetPageSizePixel( const Size& rSize ) { maPageSize = rSize; } - void AddButton( const OUString& rText, sal_uInt16 nId, ButtonDialogFlags nBtnFlags = ButtonDialogFlags::NONE, long nSepPixel = 0 ); void AddButton( StandardButtonType eType, sal_uInt16 nId, ButtonDialogFlags nBtnFlags = ButtonDialogFlags::NONE, long nSepPixel = 0 ); void RemoveButton( sal_uInt16 nId ); - sal_uInt16 GetButtonId( sal_uInt16 nButton ) const; - PushButton* GetPushButton( sal_uInt16 nId ) const; - protected: ButtonDialog( WindowType nType ); long ImplGetButtonSize(); diff --git a/toolkit/source/helper/btndlg.cxx b/toolkit/source/helper/btndlg.cxx index 28d63b2c3f3e..4e3e89944308 100644 --- a/toolkit/source/helper/btndlg.cxx +++ b/toolkit/source/helper/btndlg.cxx @@ -259,27 +259,6 @@ void ButtonDialog::StateChanged( StateChangedType nType ) Dialog::StateChanged( nType ); } -void ButtonDialog::AddButton( const OUString& rText, sal_uInt16 nId, - ButtonDialogFlags nBtnFlags, long nSepPixel ) -{ - // PageItem anlegen - std::unique_ptr pItem(new ImplBtnDlgItem); - pItem->mnId = nId; - pItem->mbOwnButton = true; - pItem->mnSepSize = nSepPixel; - pItem->mpPushButton = ImplCreatePushButton( nBtnFlags ); - - if (!rText.isEmpty()) - pItem->mpPushButton->SetText( rText ); - - m_ItemList.push_back(std::move(pItem)); - - if ( nBtnFlags & ButtonDialogFlags::Focus ) - mnFocusButtonId = nId; - - mbFormat = true; -} - void ButtonDialog::AddButton( StandardButtonType eType, sal_uInt16 nId, ButtonDialogFlags nBtnFlags, long nSepPixel ) { @@ -341,22 +320,4 @@ void ButtonDialog::RemoveButton( sal_uInt16 nId ) SAL_WARN( "vcl.window", "ButtonDialog::RemoveButton(): ButtonId invalid" ); } -sal_uInt16 ButtonDialog::GetButtonId( sal_uInt16 nButton ) const -{ - if ( nButton < m_ItemList.size() ) - return m_ItemList[nButton]->mnId; - else - return BUTTONDIALOG_BUTTON_NOTFOUND; -} - -PushButton* ButtonDialog::GetPushButton( sal_uInt16 nId ) const -{ - ImplBtnDlgItem* pItem = ImplGetItem( nId ); - - if ( pItem ) - return pItem->mpPushButton; - else - return nullptr; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit