diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-20 10:26:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-20 13:08:07 +0200 |
commit | cf66fd32ed8a31d4ca6f031a13e90caf19f40682 (patch) | |
tree | 7456bfbccc3bcadbc958b4b204e515655bb3d9b4 /sfx2 | |
parent | 58a5bd793a2ed57077fc598281cc74e16373b877 (diff) |
loplugin:unusedmethods
Change-Id: I9ce1ae787b735200cd57b0f470a6e5e3146657fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120777
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/StyleList.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 42 | ||||
-rw-r--r-- | sfx2/source/inc/StyleList.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/inc/templdgi.hxx | 1 |
4 files changed, 0 insertions, 51 deletions
diff --git a/sfx2/source/dialog/StyleList.cxx b/sfx2/source/dialog/StyleList.cxx index b9d943cf519d..88f251046d09 100644 --- a/sfx2/source/dialog/StyleList.cxx +++ b/sfx2/source/dialog/StyleList.cxx @@ -1805,10 +1805,4 @@ IMPL_LINK(StyleList, PopupTreeMenuHdl, const CommandEvent&, rCEvt, bool) return true; } -void StyleList::setVisible(bool b) -{ - m_xTreeBox->set_visible(b && m_bHierarchical); - m_xFmtLb->set_visible(b && !m_bHierarchical); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index bb27c5e51fb3..c592306546c8 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -375,48 +375,6 @@ void SfxCommonTemplateDialog_Impl::EnableTreeDrag(bool bEnable) m_aStyleListEnableTreeDrag.Call(bEnable); } -static OUString lcl_GetStyleFamilyName( SfxStyleFamily nFamily ) -{ - if(nFamily == SfxStyleFamily::Char) - return "CharacterStyles" ; - if(nFamily == SfxStyleFamily::Para) - return "ParagraphStyles"; - if(nFamily == SfxStyleFamily::Page) - return "PageStyles"; - if(nFamily == SfxStyleFamily::Table) - return "TableStyles"; - if (nFamily == SfxStyleFamily::Pseudo) - return "NumberingStyles"; - return OUString(); -} - -OUString SfxCommonTemplateDialog_Impl::getDefaultStyleName( const SfxStyleFamily eFam, const StyleList& rStyleList ) -{ - OUString sDefaultStyle; - OUString aFamilyName = lcl_GetStyleFamilyName(eFam); - if( aFamilyName == "TableStyles" ) - sDefaultStyle = "Default Style"; - else if(aFamilyName == "NumberingStyles") - sDefaultStyle = "No List"; - else - sDefaultStyle = "Standard"; - uno::Reference<style::XStyleFamiliesSupplier> xModel(rStyleList.GetObjectShell()->GetModel(), uno::UNO_QUERY); - OUString aUIName; - try - { - uno::Reference< container::XNameAccess > xStyles; - uno::Reference< container::XNameAccess > xCont = xModel->getStyleFamilies(); - xCont->getByName( aFamilyName ) >>= xStyles; - uno::Reference< beans::XPropertySet > xInfo; - xStyles->getByName( sDefaultStyle ) >>= xInfo; - xInfo->getPropertyValue("DisplayName") >>= aUIName; - } - catch (const uno::Exception&) - { - } - return aUIName; -} - // Updated display: Watering the house void SfxCommonTemplateDialog_Impl::SetWaterCanState(const SfxBoolItem *pItem) { diff --git a/sfx2/source/inc/StyleList.hxx b/sfx2/source/inc/StyleList.hxx index ed228f869c1e..d933d8df9e07 100644 --- a/sfx2/source/inc/StyleList.hxx +++ b/sfx2/source/inc/StyleList.hxx @@ -121,8 +121,6 @@ public: void FamilySelect(sal_uInt16 nEntry); void FilterSelect(sal_uInt16 nActFilter, bool bsetFilter); - void setVisible(bool b); - private: void FillTreeBox(SfxStyleFamily eFam); diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx index 0b9753cccce1..8575bdb49205 100644 --- a/sfx2/source/inc/templdgi.hxx +++ b/sfx2/source/inc/templdgi.hxx @@ -63,7 +63,6 @@ private: friend class DeletionWatcher; DeletionWatcher* impl_setDeletionWatcher(DeletionWatcher* pNewWatcher); - static OUString getDefaultStyleName( const SfxStyleFamily eFam, const StyleList& rStyleList ); protected: #define MAX_FAMILIES 6 |