diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-26 11:42:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-26 13:16:39 +0200 |
commit | 9370c07101bbca313f8e69518b0988b07eb21888 (patch) | |
tree | 4ab8f5731978ad121187856e3ea493d30b7bca1e /sw/source/ui/table | |
parent | 60db3d2cc3bc4f124bd4d819fbd0285e7f19c8c4 (diff) |
convert tabopts to scoped enum
Change-Id: I6c9290e3319d2afd1bd71847091c7ab77b8ea6e6
Reviewed-on: https://gerrit.libreoffice.org/53497
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/ui/table')
-rw-r--r-- | sw/source/ui/table/convert.cxx | 12 | ||||
-rw-r--r-- | sw/source/ui/table/instable.cxx | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx index e5c8f9ffdefe..066ad5f51a99 100644 --- a/sw/source/ui/table/convert.cxx +++ b/sw/source/ui/table/convert.cxx @@ -74,15 +74,15 @@ void SwConvertTableDlg::GetValues( sal_Unicode& rDelim, } } - sal_uInt16 nInsMode = 0; + SwInsertTableFlags nInsMode = SwInsertTableFlags::NONE; if (m_xHeaderCB->get_active()) - nInsMode |= tabopts::HEADLINE; + nInsMode |= SwInsertTableFlags::Headline; if (m_xRepeatHeaderCB->get_sensitive() && m_xRepeatHeaderCB->get_active()) rInsTableOpts.mnRowsToRepeat = m_xRepeatHeaderNF->get_value(); else rInsTableOpts.mnRowsToRepeat = 0; if (!m_xDontSplitCB->get_active()) - nInsMode |= tabopts::SPLIT_LAYOUT; + nInsMode |= SwInsertTableFlags::SplitLayout; if (mxTAutoFormat) prTAFormat = new SwTableAutoFormat(*mxTAutoFormat); @@ -158,11 +158,11 @@ SwConvertTableDlg::SwConvertTableDlg(SwView& rView, bool bToTable) bool bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON); SwInsertTableOptions aInsOpts = pModOpt->GetInsTableFlags(bHTMLMode); - sal_uInt16 nInsTableFlags = aInsOpts.mnInsMode; + SwInsertTableFlags nInsTableFlags = aInsOpts.mnInsMode; - m_xHeaderCB->set_active(0 != (nInsTableFlags & tabopts::HEADLINE)); + m_xHeaderCB->set_active(bool(nInsTableFlags & SwInsertTableFlags::Headline)); m_xRepeatHeaderCB->set_active(aInsOpts.mnRowsToRepeat > 0); - m_xDontSplitCB->set_active(0 == (nInsTableFlags & tabopts::SPLIT_LAYOUT)); + m_xDontSplitCB->set_active(!(nInsTableFlags & SwInsertTableFlags::SplitLayout)); m_xHeaderCB->connect_clicked(LINK(this, SwConvertTableDlg, CheckBoxHdl)); m_xRepeatHeaderCB->connect_clicked(LINK(this, SwConvertTableDlg, ReapeatHeaderCheckBoxHdl)); diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx index 958d3fde05de..51a9315b1760 100644 --- a/sw/source/ui/table/instable.cxx +++ b/sw/source/ui/table/instable.cxx @@ -31,19 +31,19 @@ void SwInsTableDlg::GetValues( OUString& rName, sal_uInt16& rRow, sal_uInt16& rC SwInsertTableOptions& rInsTableOpts, OUString& rAutoName, SwTableAutoFormat *& prTAFormat ) { - sal_uInt16 nInsMode = 0; + SwInsertTableFlags nInsMode = SwInsertTableFlags::NONE; rName = m_xNameEdit->get_text(); rRow = m_xRowNF->get_value(); rCol = m_xColNF->get_value(); if (m_xHeaderCB->get_active()) - nInsMode |= tabopts::HEADLINE; + nInsMode |= SwInsertTableFlags::Headline; if (m_xRepeatHeaderCB->get_sensitive() && m_xRepeatHeaderCB->get_active()) rInsTableOpts.mnRowsToRepeat = m_xRepeatHeaderNF->get_value(); else rInsTableOpts.mnRowsToRepeat = 0; if (!m_xDontSplitCB->get_active()) - nInsMode |= tabopts::SPLIT_LAYOUT; + nInsMode |= SwInsertTableFlags::SplitLayout; if( pTAutoFormat ) { prTAFormat = new SwTableAutoFormat( *pTAutoFormat ); @@ -97,14 +97,14 @@ SwInsTableDlg::SwInsTableDlg(SwView& rView) const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); SwInsertTableOptions aInsOpts = pModOpt->GetInsTableFlags(bHTMLMode); - sal_uInt16 nInsTableFlags = aInsOpts.mnInsMode; + SwInsertTableFlags nInsTableFlags = aInsOpts.mnInsMode; - m_xHeaderCB->set_active(0 != (nInsTableFlags & tabopts::HEADLINE)); + m_xHeaderCB->set_active(bool(nInsTableFlags & SwInsertTableFlags::Headline)); m_xRepeatHeaderCB->set_active(aInsOpts.mnRowsToRepeat > 0); if (bHTMLMode) m_xDontSplitCB->hide(); else - m_xDontSplitCB->set_active(0 == (nInsTableFlags & tabopts::SPLIT_LAYOUT)); + m_xDontSplitCB->set_active(!(nInsTableFlags & SwInsertTableFlags::SplitLayout)); m_xRepeatHeaderNF->connect_value_changed( LINK( this, SwInsTableDlg, ModifyRepeatHeaderNF_Hdl ) ); m_xHeaderCB->connect_toggled( LINK( this, SwInsTableDlg, CheckBoxHdl ) ); |