diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-29 11:56:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-29 11:29:16 +0000 |
commit | ef0e1c05c32a5a69502e0f0d1d97789c125345a2 (patch) | |
tree | dd8ec62b94863b5401b10a41d1e2eedffb295470 /sw/source/ui | |
parent | df6e163850361535afc411777e306994c64408f5 (diff) |
convert SwTOIOptions to o3tl::typed_flags
Change-Id: I8f2996c0f0e40778877cddc4368c80f8a7f52a95
Reviewed-on: https://gerrit.libreoffice.org/31352
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/ui')
-rw-r--r-- | sw/source/ui/index/cntex.cxx | 18 | ||||
-rw-r--r-- | sw/source/ui/index/cnttab.cxx | 34 |
2 files changed, 26 insertions, 26 deletions
diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx index 4794db831d84..81b027d104da 100644 --- a/sw/source/ui/index/cntex.cxx +++ b/sw/source/ui/index/cntex.cxx @@ -195,7 +195,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample( uno::Reference< beans::XPropertySet > xIdxProps(pxIndexSectionsArr[nTOXIndex]->xDocumentIndex, uno::UNO_QUERY); uno::Reference< beans::XPropertySetInfo > xInfo = xIdxProps->getPropertySetInfo(); SwTOXDescription& rDesc = GetTOXDescription(eCurrentTOXType); - sal_uInt16 nIdxOptions = rDesc.GetIndexOptions(); + SwTOIOptions nIdxOptions = rDesc.GetIndexOptions(); if(bInitialCreate || !nPage || nPage == TOX_PAGE_SELECT) { //title @@ -242,13 +242,13 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample( lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_CREATE_FROM_CHAPTER, rDesc.IsFromChapter()); lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_IS_PROTECTED, rDesc.IsReadonly()); - lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_USE_COMBINED_ENTRIES, 0 != (nIdxOptions&nsSwTOIOptions::TOI_SAME_ENTRY )); - lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_USE_P_P, 0 != (nIdxOptions&nsSwTOIOptions::TOI_FF )); - lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_IS_CASE_SENSITIVE, 0 != (nIdxOptions&nsSwTOIOptions::TOI_CASE_SENSITIVE )); - lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_USE_KEY_AS_ENTRY, 0 != (nIdxOptions&nsSwTOIOptions::TOI_KEY_AS_ENTRY )); - lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_USE_ALPHABETICAL_SEPARATORS, 0 != (nIdxOptions&nsSwTOIOptions::TOI_ALPHA_DELIMITTER)); - lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_USE_DASH, 0 != (nIdxOptions&nsSwTOIOptions::TOI_DASH )); - lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_USE_UPPER_CASE, 0 != (nIdxOptions&nsSwTOIOptions::TOI_INITIAL_CAPS )); + lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_USE_COMBINED_ENTRIES, bool(nIdxOptions & SwTOIOptions::SameEntry )); + lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_USE_P_P, bool(nIdxOptions & SwTOIOptions::FF )); + lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_IS_CASE_SENSITIVE, bool(nIdxOptions & SwTOIOptions::CaseSensitive )); + lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_USE_KEY_AS_ENTRY, bool(nIdxOptions & SwTOIOptions::KeyAsEntry )); + lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_USE_ALPHABETICAL_SEPARATORS, bool(nIdxOptions & SwTOIOptions::AlphaDelimiter)); + lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_USE_DASH, bool(nIdxOptions & SwTOIOptions::Dash )); + lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_USE_UPPER_CASE, bool(nIdxOptions & SwTOIOptions::InitialCaps )); OUString aTmpName( SwStyleNameMapper::GetSpecialExtraProgName( rDesc.GetSequenceName() ) ); lcl_SetProp(xInfo, xIdxProps, UNO_NAME_LABEL_CATEGORY, aTmpName ); @@ -274,7 +274,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample( if(bInitialCreate || !nPage || nPage == TOX_PAGE_ENTRY) { lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_IS_COMMA_SEPARATED, pForm->IsCommaSeparated()); - lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_USE_ALPHABETICAL_SEPARATORS, 0 != (nIdxOptions&nsSwTOIOptions::TOI_ALPHA_DELIMITTER)); + lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_USE_ALPHABETICAL_SEPARATORS, bool(nIdxOptions&SwTOIOptions::AlphaDelimiter)); const bool bUseCurrent = nCurrentLevel < pForm->GetFormMax(); const sal_uInt16 nStartLevel = bUseCurrent ? nCurrentLevel : 0; const sal_uInt16 nEndLevel = bUseCurrent ? nCurrentLevel : pForm->GetFormMax() - 1; diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index a8c3ef357f95..1ba8da31965d 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -1082,18 +1082,18 @@ void SwTOXSelectTabPage::ApplyTOXDescription() //index only else if(TOX_INDEX == aCurType.eType) { - const sal_uInt16 nIndexOptions = rDesc.GetIndexOptions(); - m_pCollectSameCB-> Check( 0 != (nIndexOptions & nsSwTOIOptions::TOI_SAME_ENTRY) ); - m_pUseFFCB-> Check( 0 != (nIndexOptions & nsSwTOIOptions::TOI_FF) ); - m_pUseDashCB-> Check( 0 != (nIndexOptions & nsSwTOIOptions::TOI_DASH) ); + const SwTOIOptions nIndexOptions = rDesc.GetIndexOptions(); + m_pCollectSameCB-> Check( bool(nIndexOptions & SwTOIOptions::SameEntry) ); + m_pUseFFCB-> Check( bool(nIndexOptions & SwTOIOptions::FF) ); + m_pUseDashCB-> Check( bool(nIndexOptions & SwTOIOptions::Dash) ); if(m_pUseFFCB->IsChecked()) m_pUseDashCB->Enable(false); else if(m_pUseDashCB->IsChecked()) m_pUseFFCB->Enable(false); - m_pCaseSensitiveCB-> Check( 0 != (nIndexOptions & nsSwTOIOptions::TOI_CASE_SENSITIVE) ); - m_pInitialCapsCB-> Check( 0 != (nIndexOptions & nsSwTOIOptions::TOI_INITIAL_CAPS) ); - m_pKeyAsEntryCB-> Check( 0 != (nIndexOptions & nsSwTOIOptions::TOI_KEY_AS_ENTRY) ); + m_pCaseSensitiveCB-> Check( bool(nIndexOptions & SwTOIOptions::CaseSensitive) ); + m_pInitialCapsCB-> Check( bool(nIndexOptions & SwTOIOptions::InitialCaps) ); + m_pKeyAsEntryCB-> Check( bool(nIndexOptions & SwTOIOptions::KeyAsEntry) ); } else if(TOX_ILLUSTRATIONS == aCurType.eType || TOX_TABLES == aCurType.eType) @@ -1153,7 +1153,7 @@ void SwTOXSelectTabPage::FillTOXDescription() if(m_pTOXMarksCB->IsVisible() && m_pTOXMarksCB->IsChecked()) nContentOptions |= SwTOXElement::Mark; - sal_uInt16 nIndexOptions = rDesc.GetIndexOptions()&nsSwTOIOptions::TOI_ALPHA_DELIMITTER; + SwTOIOptions nIndexOptions = rDesc.GetIndexOptions()&SwTOIOptions::AlphaDelimiter; switch(rDesc.GetTOXType()) { case TOX_CONTENT: @@ -1179,17 +1179,17 @@ void SwTOXSelectTabPage::FillTOXDescription() nContentOptions = SwTOXElement::Mark; if(m_pCollectSameCB->IsChecked()) - nIndexOptions |= nsSwTOIOptions::TOI_SAME_ENTRY; + nIndexOptions |= SwTOIOptions::SameEntry; if(m_pUseFFCB->IsChecked()) - nIndexOptions |= nsSwTOIOptions::TOI_FF; + nIndexOptions |= SwTOIOptions::FF; if(m_pUseDashCB->IsChecked()) - nIndexOptions |= nsSwTOIOptions::TOI_DASH; + nIndexOptions |= SwTOIOptions::Dash; if(m_pCaseSensitiveCB->IsChecked()) - nIndexOptions |= nsSwTOIOptions::TOI_CASE_SENSITIVE; + nIndexOptions |= SwTOIOptions::CaseSensitive; if(m_pInitialCapsCB->IsChecked()) - nIndexOptions |= nsSwTOIOptions::TOI_INITIAL_CAPS; + nIndexOptions |= SwTOIOptions::InitialCaps; if(m_pKeyAsEntryCB->IsChecked()) - nIndexOptions |= nsSwTOIOptions::TOI_KEY_AS_ENTRY; + nIndexOptions |= SwTOIOptions::KeyAsEntry; if(m_pFromFileCB->IsChecked()) rDesc.SetAutoMarkURL(sAutoMarkURL); else @@ -2056,7 +2056,7 @@ void SwTOXEntryTabPage::Reset( const SfxItemSet* ) } else m_pMainEntryStyleLB->SelectEntry(sNoCharStyle); - m_pAlphaDelimCB->Check( 0 != (rDesc.GetIndexOptions() & nsSwTOIOptions::TOI_ALPHA_DELIMITTER) ); + m_pAlphaDelimCB->Check( bool(rDesc.GetIndexOptions() & SwTOIOptions::AlphaDelimiter) ); } m_pRelToStyleCB->Check(m_pCurrentForm->IsRelTabPos()); m_pCommaSeparatedCB->Check(m_pCurrentForm->IsCommaSeparated()); @@ -2178,9 +2178,9 @@ void SwTOXEntryTabPage::UpdateDescriptor() { const OUString sTemp(m_pMainEntryStyleLB->GetSelectEntry()); rDesc.SetMainEntryCharStyle(sNoCharStyle == sTemp ? aEmptyOUStr : sTemp); - sal_uInt16 nIdxOptions = rDesc.GetIndexOptions() & ~nsSwTOIOptions::TOI_ALPHA_DELIMITTER; + SwTOIOptions nIdxOptions = rDesc.GetIndexOptions() & ~SwTOIOptions::AlphaDelimiter; if(m_pAlphaDelimCB->IsChecked()) - nIdxOptions |= nsSwTOIOptions::TOI_ALPHA_DELIMITTER; + nIdxOptions |= SwTOIOptions::AlphaDelimiter; rDesc.SetIndexOptions(nIdxOptions); } else if(TOX_AUTHORITIES == aLastTOXType.eType) |