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/source/dialog/templdlg.cxx | |
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/source/dialog/templdlg.cxx')
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 42 |
1 files changed, 0 insertions, 42 deletions
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) { |