diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-20 14:07:57 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-21 07:24:54 +0100 |
commit | eacc089ce8d352b6ed7ffa616d14557331ee4272 (patch) | |
tree | fa589439113e52207a9b6c5b6fc35e59e4dea03c /sw/source/uibase/utlui/uitool.cxx | |
parent | 3d9f9e7d16aae89ff9956bff54326a56d40b7866 (diff) |
loplugin:unusedmethods
Change-Id: I63f03bd1a0510bf411341e1a04a40eb7fce2d57e
Reviewed-on: https://gerrit.libreoffice.org/65495
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/utlui/uitool.cxx')
-rw-r--r-- | sw/source/uibase/utlui/uitool.cxx | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx index c3d2c69780f7..c08f3e3a3c2d 100644 --- a/sw/source/uibase/utlui/uitool.cxx +++ b/sw/source/uibase/utlui/uitool.cxx @@ -687,45 +687,6 @@ void InsertStringSorted(const OUString& rId, const OUString& rEntry, weld::Combo rToFill.insert(nOffset, rEntry, &rId, nullptr, nullptr); } -void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, bool bSorted, bool bWithDefault) -{ - const sal_Int32 nOffset = rToFill.GetEntryCount() > 0 ? 1 : 0; - SfxStyleSheetBasePool* pPool = pDocSh->GetStyleSheetPool(); - pPool->SetSearchMask(SfxStyleFamily::Char); - SwDoc* pDoc = pDocSh->GetDoc(); - const SfxStyleSheetBase* pBase = pPool->First(); - OUString sStandard; - SwStyleNameMapper::FillUIName( RES_POOLCOLL_STANDARD, sStandard ); - while(pBase) - { - if(bWithDefault || pBase->GetName() != sStandard) - { - const sal_Int32 nPos = bSorted - ? InsertStringSorted(pBase->GetName(), rToFill, nOffset ) - : rToFill.InsertEntry(pBase->GetName()); - sal_IntPtr nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( pBase->GetName(), SwGetPoolIdFromName::ChrFmt ); - rToFill.SetEntryData( nPos, reinterpret_cast<void*>(nPoolId)); - } - pBase = pPool->Next(); - } - // non-pool styles - const SwCharFormats* pFormats = pDoc->GetCharFormats(); - for(size_t i = 0; i < pFormats->size(); ++i) - { - const SwCharFormat* pFormat = (*pFormats)[i]; - if(pFormat->IsDefault()) - continue; - const OUString& rName = pFormat->GetName(); - if(rToFill.GetEntryPos(rName) == LISTBOX_ENTRY_NOTFOUND) - { - const sal_Int32 nPos = bSorted - ? InsertStringSorted(rName, rToFill, nOffset ) - : rToFill.InsertEntry(rName); - rToFill.SetEntryData( nPos, reinterpret_cast<void*>(USHRT_MAX)); - } - } -}; - void FillCharStyleListBox(weld::ComboBox& rToFill, SwDocShell* pDocSh, bool bSorted, bool bWithDefault) { const int nOffset = rToFill.get_count() > 0 ? 1 : 0; |