diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-09 15:47:45 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-10 12:56:14 +0100 |
commit | 32823280efffc02a250fc8d4749b8eb0f491ae77 (patch) | |
tree | d53b384498f6ba4c40b3449205eda96d45fc7c1e /cui | |
parent | 617fb9eed92711639e4e632132a649f23ac2f3eb (diff) |
loplugin:unusedmethods
Change-Id: I543b0943f0bc918d59debc8ee051f88c29d18454
Reviewed-on: https://gerrit.libreoffice.org/44553
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/customize/cfg.cxx | 78 | ||||
-rw-r--r-- | cui/source/inc/cfg.hxx | 10 | ||||
-rw-r--r-- | cui/source/inc/cfgutil.hxx | 2 |
3 files changed, 0 insertions, 90 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index d6aa0b1eabab..be2f26044a59 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -2092,20 +2092,6 @@ SvxConfigEntry* SvxMainMenuOrganizerDialog::GetSelectedEntry() return static_cast<SvxConfigEntry*>(m_pMenuListBox->FirstSelected()->GetUserData()); } -const OUString& -SvxConfigEntry::GetHelpText() -{ - if ( aHelpText.isEmpty() ) - { - if ( !aCommand.isEmpty() ) - { - aHelpText = Application::GetHelp()->GetHelpText( aCommand, nullptr ); - } - } - - return aHelpText; -} - SvxConfigEntry::SvxConfigEntry( const OUString& rDisplayName, const OUString& rCommandURL, bool bPopup, bool bParentData ) : nId( 1 ) @@ -2141,21 +2127,11 @@ SvxConfigEntry::~SvxConfigEntry() } } -bool SvxConfigEntry::IsMovable() -{ - return !IsPopup() || IsMain(); -} - bool SvxConfigEntry::IsDeletable() { return !IsMain() || IsUserDefined(); } -bool SvxConfigEntry::IsRenamable() -{ - return !IsMain() || IsUserDefined(); -} - ToolbarSaveInData::ToolbarSaveInData( const uno::Reference < css::ui::XUIConfigurationManager >& xCfgMgr, const uno::Reference < css::ui::XUIConfigurationManager >& xParentCfgMgr, @@ -2180,60 +2156,6 @@ ToolbarSaveInData::~ToolbarSaveInData() } void ToolbarSaveInData::SetSystemStyle( - const uno::Reference< frame::XFrame >& xFrame, - const OUString& rResourceURL, - sal_Int32 nStyle ) -{ - // change the style using the API - SetSystemStyle( rResourceURL, nStyle ); - - // this code is a temporary hack as the UI is not updating after - // changing the toolbar style via the API - uno::Reference< css::frame::XLayoutManager > xLayoutManager; - vcl::Window *window = nullptr; - - uno::Reference< beans::XPropertySet > xPropSet( xFrame, uno::UNO_QUERY ); - if ( xPropSet.is() ) - { - uno::Any a = xPropSet->getPropertyValue( "LayoutManager" ); - a >>= xLayoutManager; - } - - if ( xLayoutManager.is() ) - { - uno::Reference< css::ui::XUIElement > xUIElement = - xLayoutManager->getElement( rResourceURL ); - - // check reference before we call getRealInterface. The layout manager - // can only provide references for elements that have been created - // before. It's possible that the current element is not available. - uno::Reference< css::awt::XWindow > xWindow; - if ( xUIElement.is() ) - xWindow.set( xUIElement->getRealInterface(), uno::UNO_QUERY ); - - window = VCLUnoHelper::GetWindow( xWindow ).get(); - } - - if ( window != nullptr && window->GetType() == WindowType::TOOLBOX ) - { - ToolBox* toolbox = static_cast<ToolBox*>(window); - - if ( nStyle == 0 ) - { - toolbox->SetButtonType(); - } - else if ( nStyle == 1 ) - { - toolbox->SetButtonType( ButtonType::TEXT ); - } - if ( nStyle == 2 ) - { - toolbox->SetButtonType( ButtonType::SYMBOLTEXT ); - } - } -} - -void ToolbarSaveInData::SetSystemStyle( const OUString& rResourceURL, sal_Int32 nStyle ) { diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx index 81386ef877b2..836f13ccb32e 100644 --- a/cui/source/inc/cfg.hxx +++ b/cui/source/inc/cfg.hxx @@ -300,8 +300,6 @@ public: void SetName( const OUString& rStr ) { aLabel = rStr; bStrEdited = true; } bool HasChangedName() const { return bStrEdited; } - const OUString& GetHelpText(); - bool IsPopup() const { return bPopUp; } void SetUserDefined( bool bOn = true ) { bIsUserDefined = bOn; } @@ -322,9 +320,7 @@ public: void SetModified( bool bValue = true ) { bIsModified = bValue; } bool IsModified() { return bIsModified; } - bool IsMovable(); bool IsDeletable(); - bool IsRenamable(); void SetVisible( bool b ) { bIsVisible = b; } bool IsVisible() const { return bIsVisible; } @@ -335,8 +331,6 @@ public: const css::uno::Reference< css::graphic::XGraphic >& GetBackupGraphic() { return xBackupGraphic; } - bool IsIconModified() { return xBackupGraphic.is(); } - sal_Int32 GetStyle() { return nStyle; } void SetStyle( sal_Int32 style ) { nStyle = style; } }; @@ -567,10 +561,6 @@ public: void SetSystemStyle( const OUString& rResourceURL, sal_Int32 nStyle ); - void SetSystemStyle( - const css::uno::Reference< css::frame::XFrame >& xFrame, - const OUString& rResourceURL, sal_Int32 nStyle ); - SvxEntries* GetEntries() override; void SetEntries( SvxEntries* ) override; bool HasSettings() override; diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx index 3b2b190ed26e..4e7dd97cdcb7 100644 --- a/cui/source/inc/cfgutil.hxx +++ b/cui/source/inc/cfgutil.hxx @@ -173,8 +173,6 @@ public: bool bEventMode); void SetFunctionListBox( SfxConfigFunctionListBox *pBox ) { pFunctionListBox = pBox; } - void SetImageProvider( SaveInData* provider ) - { m_pImageProvider = provider; } void GroupSelected(); void SelectMacro( const SfxMacroInfoItem* ); void SelectMacro( const OUString&, const OUString& ); |