summaryrefslogtreecommitdiff
path: root/sw/source/ui/chrdlg
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-18 12:14:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-19 08:35:42 +0200
commit0035573ee7798cdf54ef44a54306a0515eeb90a7 (patch)
tree29f89470e725120dbb6378a64ab0bf01970ecf89 /sw/source/ui/chrdlg
parent694f3ed0825d75bf855a74b2294ba0ff370afbb6 (diff)
convert SFXSTYLEBIT to scoped enum
drop SFXSTYLEBIT_HIERARCHY because it has no overlap with these values, it's used an extra bit in SfxCommonTemplateDialog_Impl::LoadFactoryStyleFilter Change-Id: I8ee5ecb9b5f8d2087d8eedd1f5526260ec1e4018 Reviewed-on: https://gerrit.libreoffice.org/53089 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/ui/chrdlg')
-rw-r--r--sw/source/ui/chrdlg/swuiccoll.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index 2e58a68dfccc..c3d9eb1535c1 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -107,8 +107,7 @@ SwCondCollPage::SwCondCollPage(vcl::Window *pParent, const SfxItemSet &rSet)
for (size_t i = 0; i < rFilterList.size(); ++i)
{
m_pFilterLB->InsertEntry(rFilterList[i].aName);
- sal_uInt16* pFilter = new sal_uInt16(rFilterList[i].nFlags);
- m_pFilterLB->SetEntryData(i, pFilter);
+ m_pFilterLB->SetEntryData(i, reinterpret_cast<void*>(sal_uInt16(rFilterList[i].nFlags)));
}
break;
}
@@ -127,9 +126,6 @@ SwCondCollPage::~SwCondCollPage()
void SwCondCollPage::dispose()
{
- for(sal_Int32 i = 0; i < m_pFilterLB->GetEntryCount(); ++i)
- delete static_cast<sal_uInt16*>(m_pFilterLB->GetEntryData(i));
-
m_pConditionCB.clear();
m_pContextFT.clear();
m_pUsedFT.clear();
@@ -282,7 +278,7 @@ void SwCondCollPage::SelectHdl(void const * pBox)
{
m_pStyleLB->Clear();
const sal_Int32 nSelPos = static_cast<ListBox const *>(pBox)->GetSelectedEntryPos();
- const sal_uInt16 nSearchFlags = *static_cast<sal_uInt16*>(m_pFilterLB->GetEntryData(nSelPos));
+ const SfxStyleSearchBits nSearchFlags = static_cast<SfxStyleSearchBits>(reinterpret_cast<sal_IntPtr>(m_pFilterLB->GetEntryData(nSelPos)));
SfxStyleSheetBasePool* pPool = m_rSh.GetView().GetDocShell()->GetStyleSheetPool();
pPool->SetSearchMask(SfxStyleFamily::Para, nSearchFlags);
const SfxStyleSheetBase* pBase = pPool->First();