diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-04-04 14:30:03 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-04-06 19:53:00 +0200 |
commit | 5c32ba63163d9556ff89782a8074924cdf9dc554 (patch) | |
tree | 66acbb3b4c298c9f0cbff75f9e36bf3d759b7a0f /cui | |
parent | 6f31c63e35abef03e6f938bbddc8778b70a62d43 (diff) |
weld OTableSubscriptionPage
Change-Id: I55c23448480384c9a7d78cd55550bb4812ebde72
Reviewed-on: https://gerrit.libreoffice.org/70314
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/customize/SvxToolbarConfigPage.cxx | 14 | ||||
-rw-r--r-- | cui/source/dialogs/hangulhanjadlg.cxx | 4 | ||||
-rw-r--r-- | cui/source/dialogs/multipat.cxx | 14 | ||||
-rw-r--r-- | cui/source/dialogs/srchxtra.cxx | 4 | ||||
-rw-r--r-- | cui/source/inc/cfg.hxx | 2 | ||||
-rw-r--r-- | cui/source/options/certpath.cxx | 12 | ||||
-rw-r--r-- | cui/source/options/optlingu.cxx | 28 | ||||
-rw-r--r-- | cui/source/tabpages/autocdlg.cxx | 174 | ||||
-rw-r--r-- | cui/uiconfig/ui/accelconfigpage.ui | 8 | ||||
-rw-r--r-- | cui/uiconfig/ui/acoroptionspage.ui | 2 | ||||
-rw-r--r-- | cui/uiconfig/ui/applyautofmtpage.ui | 4 | ||||
-rw-r--r-- | cui/uiconfig/ui/applylocalizedpage.ui | 6 | ||||
-rw-r--r-- | cui/uiconfig/ui/certdialog.ui | 2 | ||||
-rw-r--r-- | cui/uiconfig/ui/hangulhanjaoptdialog.ui | 2 | ||||
-rw-r--r-- | cui/uiconfig/ui/menuassignpage.ui | 2 | ||||
-rw-r--r-- | cui/uiconfig/ui/multipathdialog.ui | 2 | ||||
-rw-r--r-- | cui/uiconfig/ui/optlingupage.ui | 6 | ||||
-rw-r--r-- | cui/uiconfig/ui/searchattrdialog.ui | 2 | ||||
-rw-r--r-- | cui/uiconfig/ui/smarttagoptionspage.ui | 2 |
19 files changed, 162 insertions, 128 deletions
diff --git a/cui/source/customize/SvxToolbarConfigPage.cxx b/cui/source/customize/SvxToolbarConfigPage.cxx index 66a4d7278264..bd7a3333a4e7 100644 --- a/cui/source/customize/SvxToolbarConfigPage.cxx +++ b/cui/source/customize/SvxToolbarConfigPage.cxx @@ -605,7 +605,7 @@ IMPL_LINK(SvxToolbarConfigPage, ModifyItemHdl, const OString&, rIdent, void) OUString sId(OUString::number(reinterpret_cast<sal_Int64>(pEntry))); m_xContentsListBox->insert(nActEntry, sId); - m_xContentsListBox->set_toggle(nActEntry, pEntry->IsVisible(), 0); + m_xContentsListBox->set_toggle(nActEntry, pEntry->IsVisible() ? TRISTATE_TRUE : TRISTATE_FALSE, 0); InsertEntryIntoUI(pEntry, nActEntry, 1); m_xContentsListBox->select(nActEntry); @@ -645,7 +645,7 @@ IMPL_LINK(SvxToolbarConfigPage, ModifyItemHdl, const OString&, rIdent, void) OUString sId(OUString::number(reinterpret_cast<sal_Int64>(pEntry))); m_xContentsListBox->insert(nActEntry, sId); - m_xContentsListBox->set_toggle(nActEntry, pEntry->IsVisible(), 0); + m_xContentsListBox->set_toggle(nActEntry, pEntry->IsVisible() ? TRISTATE_TRUE : TRISTATE_FALSE, 0); InsertEntryIntoUI(pEntry, nActEntry, 1); m_xContentsListBox->select(nActEntry); @@ -702,7 +702,7 @@ IMPL_LINK(SvxToolbarConfigPage, ModifyItemHdl, const OString&, rIdent, void) OUString sId(OUString::number(reinterpret_cast<sal_Int64>(pEntry))); m_xContentsListBox->insert(nActEntry, sId); m_xContentsListBox->set_toggle(nActEntry, - pEntry->IsVisible(), 0); + pEntry->IsVisible() ? TRISTATE_TRUE : TRISTATE_FALSE, 0); InsertEntryIntoUI(pEntry, nActEntry, 1); m_xContentsListBox->select(nActEntry); @@ -834,7 +834,7 @@ void SvxToolbarConfigPage::SelectElement() OUString sId(OUString::number(reinterpret_cast<sal_Int64>(entry))); m_xContentsListBox->insert(i, sId); if (entry->IsBinding() && !entry->IsSeparator()) - m_xContentsListBox->set_toggle(i, entry->IsVisible(), 0); + m_xContentsListBox->set_toggle(i, entry->IsVisible() ? TRISTATE_TRUE : TRISTATE_FALSE, 0); InsertEntryIntoUI(entry, i, 1); ++i; } @@ -861,7 +861,7 @@ void SvxToolbarConfigPage::AddFunction(int nTarget, bool bFront) if ( pEntry->IsBinding() ) //TODO sep ? { pEntry->SetVisible(true); - m_xContentsListBox->set_toggle(nNewLBEntry, true, 0); + m_xContentsListBox->set_toggle(nNewLBEntry, TRISTATE_TRUE, 0); } InsertEntryIntoUI(pEntry, nNewLBEntry, 1); @@ -895,7 +895,7 @@ void SvxToolbarEntriesListBox::ChangedVisibility(int nRow) if (pEntryData->IsBinding()) { - pEntryData->SetVisible(m_xControl->get_toggle(nRow, 0)); + pEntryData->SetVisible(m_xControl->get_toggle(nRow, 0) == TRISTATE_TRUE); SvxConfigEntry* pToolbar = pPage->GetTopLevelSelection(); @@ -920,7 +920,7 @@ IMPL_LINK(SvxToolbarEntriesListBox, KeyInputHdl, const KeyEvent&, rKeyEvent, boo SvxConfigEntry* pEntryData = reinterpret_cast<SvxConfigEntry*>(m_xControl->get_id(nRow).toInt64()); if (pEntryData->IsBinding() && !pEntryData->IsSeparator()) { - m_xControl->set_toggle(nRow, !m_xControl->get_toggle(nRow, 0), 0); + m_xControl->set_toggle(nRow, m_xControl->get_toggle(nRow, 0) == TRISTATE_TRUE ? TRISTATE_FALSE : TRISTATE_TRUE, 0); ChangedVisibility(nRow); } return true; diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index 0ff836f6d4f9..342b35352782 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -782,7 +782,7 @@ namespace svx DBG_ASSERT( xDict.is(), "-HangulHanjaOptionsDialog::OkHdl(): someone is evaporated..." ); - bool bActive = m_xDictsLB->get_toggle(n, 0); + bool bActive = m_xDictsLB->get_toggle(n, 0) == TRISTATE_TRUE; xDict->setActive( bActive ); Reference< util::XFlushable > xFlush( xDict, uno::UNO_QUERY ); if( xFlush.is() ) @@ -948,7 +948,7 @@ namespace svx { m_xDictsLB->append(); int nRow = m_xDictsLB->n_children() - 1; - m_xDictsLB->set_toggle(nRow, bChecked, 0); + m_xDictsLB->set_toggle(nRow, bChecked ? TRISTATE_TRUE : TRISTATE_FALSE, 0); m_xDictsLB->set_text(nRow, rName, 1); m_xDictsLB->set_id(nRow, rName); } diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx index 6adbb9464a84..45fe4cf4bec7 100644 --- a/cui/source/dialogs/multipat.cxx +++ b/cui/source/dialogs/multipat.cxx @@ -60,7 +60,7 @@ IMPL_LINK_NOARG(SvxPathSelectDialog, SelectHdl_Impl, weld::TreeView&, void) void SvxMultiPathDialog::HandleEntryChecked(int nRow) { m_xRadioLB->select(nRow); - bool bChecked = m_xRadioLB->get_toggle(nRow, 0); + bool bChecked = m_xRadioLB->get_toggle(nRow, 0) == TRISTATE_TRUE; if (bChecked) { // we have radio button behavior -> so uncheck the other entries @@ -68,7 +68,7 @@ void SvxMultiPathDialog::HandleEntryChecked(int nRow) for (int i = 0; i < nCount; ++i) { if (i != nRow) - m_xRadioLB->set_toggle(i, false, 0); + m_xRadioLB->set_toggle(i, TRISTATE_TRUE, 0); } } } @@ -82,7 +82,7 @@ void SvxMultiPathDialog::AppendEntry(const OUString& rText, const OUString& rId) { m_xRadioLB->append(); const int nRow = m_xRadioLB->n_children() - 1; - m_xRadioLB->set_toggle(nRow, false, 0); + m_xRadioLB->set_toggle(nRow, TRISTATE_FALSE, 0); m_xRadioLB->set_text(nRow, rText, 1); m_xRadioLB->set_id(nRow, rId); } @@ -150,7 +150,7 @@ IMPL_LINK_NOARG(SvxPathSelectDialog, AddHdl_Impl, weld::Button&, void) IMPL_LINK_NOARG(SvxMultiPathDialog, DelHdl_Impl, weld::Button&, void) { int nPos = m_xRadioLB->get_selected_index(); - bool bChecked = m_xRadioLB->get_toggle(nPos, 0); + bool bChecked = m_xRadioLB->get_toggle(nPos, 0) == TRISTATE_TRUE; m_xRadioLB->remove(nPos); int nCnt = m_xRadioLB->n_children(); if (nCnt) @@ -161,7 +161,7 @@ IMPL_LINK_NOARG(SvxMultiPathDialog, DelHdl_Impl, weld::Button&, void) nPos = nCnt; if (bChecked) { - m_xRadioLB->set_toggle(nPos, true, 0); + m_xRadioLB->set_toggle(nPos, TRISTATE_TRUE, 0); HandleEntryChecked(nPos); } m_xRadioLB->select(nPos); @@ -240,7 +240,7 @@ OUString SvxMultiPathDialog::GetPath() const OUString sWritable; for (int i = 0, nCount = m_xRadioLB->n_children(); i < nCount; ++i) { - if (m_xRadioLB->get_toggle(i, 0)) + if (m_xRadioLB->get_toggle(i, 0) == TRISTATE_TRUE) sWritable = m_xRadioLB->get_id(i); else { @@ -292,7 +292,7 @@ void SvxMultiPathDialog::SetPath( const OUString& rPath ) if (nCount) { - m_xRadioLB->set_toggle(nCount - 1, true, 0); + m_xRadioLB->set_toggle(nCount - 1, TRISTATE_TRUE, 0); HandleEntryChecked(nCount - 1); } } diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx index e1f0a869096d..ac6b4f1e711b 100644 --- a/cui/source/dialogs/srchxtra.cxx +++ b/cui/source/dialogs/srchxtra.cxx @@ -148,7 +148,7 @@ SvxSearchAttributeDialog::SvxSearchAttributeDialog(weld::Window* pParent, { m_xAttrLB->append(); const int nRow = m_xAttrLB->n_children() - 1; - m_xAttrLB->set_toggle(nRow, bChecked, 0); + m_xAttrLB->set_toggle(nRow, bChecked ? TRISTATE_TRUE : TRISTATE_FALSE, 0); m_xAttrLB->set_text(nRow, SvxAttrNameTable::GetString(nId), 1); m_xAttrLB->set_id(nRow, OUString::number(nSlot)); } @@ -174,7 +174,7 @@ IMPL_LINK_NOARG(SvxSearchAttributeDialog, OKHdl, weld::Button&, void) for (int i = 0, nCount = m_xAttrLB->n_children(); i < nCount; ++i) { sal_uInt16 nSlot = m_xAttrLB->get_id(i).toUInt32(); - bool bChecked = m_xAttrLB->get_toggle(i, 0); + bool bChecked = m_xAttrLB->get_toggle(i, 0) == TRISTATE_TRUE; sal_uInt16 j; for ( j = rList.Count(); j; ) diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx index fbbd96214145..c82512187a29 100644 --- a/cui/source/inc/cfg.hxx +++ b/cui/source/inc/cfg.hxx @@ -343,7 +343,7 @@ public: void set_dropdown(int row, int col) { m_xControl->set_image(row, *m_xDropDown, col); } void set_id(int row, const OUString& rId) { m_xControl->set_id(row, rId); } void clear() { m_xControl->clear(); } //need frees ? - void set_toggle(int row, bool bOn, int col) { m_xControl->set_toggle(row, bOn, col); } + void set_toggle(int row, TriState eState, int col) { m_xControl->set_toggle(row, eState, col); } void scroll_to_row(int pos) { m_xControl->scroll_to_row(pos); } void select(int pos) { m_xControl->select(pos); } diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx index 2eff6841eb60..c830b6e68631 100644 --- a/cui/source/options/certpath.cxx +++ b/cui/source/options/certpath.cxx @@ -71,7 +71,7 @@ CertPathDialog::CertPathDialog(weld::Window* pParent) { m_xCertPathList->append(); const int nRow = m_xCertPathList->n_children() - 1; - m_xCertPathList->set_toggle(nRow, false, 0); + m_xCertPathList->set_toggle(nRow, TRISTATE_FALSE, 0); OUString sEntry = OUString::createFromAscii(productNames[i]) + ":" + profile; m_xCertPathList->set_text(nRow, sEntry, 1); OUString sProfilePath = xMozillaBootstrap->getProfilePath( productTypes[i], profile ); @@ -103,7 +103,7 @@ CertPathDialog::CertPathDialog(weld::Window* pParent) if (m_xCertPathList->n_children()) { - m_xCertPathList->set_toggle(0, true, 0); + m_xCertPathList->set_toggle(0, TRISTATE_TRUE, 0); HandleEntryChecked(0); } } @@ -146,7 +146,7 @@ IMPL_LINK(CertPathDialog, CheckHdl_Impl, const row_col&, rRowCol, void) void CertPathDialog::HandleEntryChecked(int nRow) { m_xCertPathList->select(nRow); - bool bChecked = m_xCertPathList->get_toggle(nRow, 0); + bool bChecked = m_xCertPathList->get_toggle(nRow, 0) == TRISTATE_TRUE; if (bChecked) { // we have radio button behavior -> so uncheck the other entries @@ -154,7 +154,7 @@ void CertPathDialog::HandleEntryChecked(int nRow) for (int i = 0; i < nCount; ++i) { if (i != nRow) - m_xCertPathList->set_toggle(i, false, 0); + m_xCertPathList->set_toggle(i, TRISTATE_FALSE, 0); } } } @@ -167,7 +167,7 @@ void CertPathDialog::AddCertPath(const OUString &rProfile, const OUString &rPath //already exists, just select the original one if (sCertPath == rPath) { - m_xCertPathList->set_toggle(i, true, 0); + m_xCertPathList->set_toggle(i, TRISTATE_TRUE, 0); HandleEntryChecked(i); return; } @@ -175,7 +175,7 @@ void CertPathDialog::AddCertPath(const OUString &rProfile, const OUString &rPath m_xCertPathList->append(); const int nRow = m_xCertPathList->n_children() - 1; - m_xCertPathList->set_toggle(nRow, true, 0); + m_xCertPathList->set_toggle(nRow, TRISTATE_TRUE, 0); m_xCertPathList->set_text(nRow, rProfile, 1); m_xCertPathList->set_text(nRow, rPath, 2); m_xCertPathList->set_id(nRow, rPath); diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index ce46b3c4f1d7..e9134ef81e2b 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -1069,7 +1069,7 @@ bool SvxLinguTabPage::FillItemSet( SfxItemSet* rCoreSet ) DicUserData aData(m_xLinguDicsCLB->get_id(i).toUInt32()); if (aData.GetEntryId() < nDics) { - bool bChecked = m_xLinguDicsCLB->get_toggle(i, 0); + bool bChecked = m_xLinguDicsCLB->get_toggle(i, 0) == TRISTATE_TRUE; uno::Reference< XDictionary > xDic( aDics.getConstArray()[ i ] ); if (xDic.is()) { @@ -1102,7 +1102,7 @@ bool SvxLinguTabPage::FillItemSet( SfxItemSet* rCoreSet ) Any aAny; if (aData.IsCheckable()) { - bool bChecked = m_xLinguOptionsCLB->get_toggle(j, 0); + bool bChecked = m_xLinguOptionsCLB->get_toggle(j, 0) == TRISTATE_TRUE; aAny <<= bChecked; } else if (aData.HasNumericValue()) @@ -1127,7 +1127,7 @@ bool SvxLinguTabPage::FillItemSet( SfxItemSet* rCoreSet ) } // automatic spell checking - bool bNewAutoCheck = m_xLinguOptionsCLB->get_toggle(EID_SPELL_AUTO, 0); + bool bNewAutoCheck = m_xLinguOptionsCLB->get_toggle(EID_SPELL_AUTO, 0) == TRISTATE_TRUE; const SfxPoolItem* pOld = GetOldItem( *rCoreSet, SID_AUTOSPELL_CHECK ); if ( !pOld || static_cast<const SfxBoolItem*>(pOld)->GetValue() != bNewAutoCheck ) { @@ -1171,7 +1171,7 @@ void SvxLinguTabPage::AddDicBoxEntry( int nEntry = m_xLinguDicsCLB->n_children() - 1; DicUserData aData( GetDicUserData( rxDic, nIdx ) ); m_xLinguDicsCLB->set_id(nEntry, OUString::number(aData.GetUserData())); - m_xLinguDicsCLB->set_toggle(nEntry, aData.IsChecked(), 0); + m_xLinguDicsCLB->set_toggle(nEntry, aData.IsChecked() ? TRISTATE_TRUE : TRISTATE_FALSE, 0); m_xLinguDicsCLB->set_text(nEntry, aTxt, 1); // append at end m_xLinguDicsCLB->thaw(); @@ -1213,7 +1213,7 @@ void SvxLinguTabPage::UpdateModulesBox_Impl() const ServiceInfo_Impl &rInfo = rAllDispSrvcArr[i]; m_xLinguModulesCLB->append(); m_xLinguModulesCLB->set_id(i, OUString::number(reinterpret_cast<sal_Int64>(&rInfo))); - m_xLinguModulesCLB->set_toggle(i, rInfo.bConfigured, 0); + m_xLinguModulesCLB->set_toggle(i, rInfo.bConfigured ? TRISTATE_TRUE : TRISTATE_FALSE, 0); m_xLinguModulesCLB->set_text(i, rInfo.sDisplayName, 1); } if (nDispSrvcCount) @@ -1254,7 +1254,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet ) if (pItem) bVal = static_cast<const SfxBoolItem *>(pItem)->GetValue(); nUserData = OptionsUserData( EID_SPELL_AUTO, false, 0, true, bVal).GetUserData(); - m_xLinguOptionsCLB->set_toggle(nEntry, bVal, 0); + m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : TRISTATE_FALSE, 0); m_xLinguOptionsCLB->set_text(nEntry, sSpellAuto, 1); m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData)); @@ -1263,7 +1263,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet ) aLngCfg.GetProperty( UPN_IS_GRAMMAR_AUTO ) >>= bVal; nUserData = OptionsUserData( EID_GRAMMAR_AUTO, false, 0, true, bVal).GetUserData(); - m_xLinguOptionsCLB->set_toggle(nEntry, bVal, 0); + m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : TRISTATE_FALSE, 0); m_xLinguOptionsCLB->set_text(nEntry, sGrammarAuto, 1); m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData)); @@ -1272,7 +1272,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet ) aLngCfg.GetProperty( UPN_IS_SPELL_UPPER_CASE ) >>= bVal; nUserData = OptionsUserData( EID_CAPITAL_WORDS, false, 0, true, bVal).GetUserData(); - m_xLinguOptionsCLB->set_toggle(nEntry, bVal, 0); + m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : TRISTATE_FALSE, 0); m_xLinguOptionsCLB->set_text(nEntry, sCapitalWords, 1); m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData)); @@ -1281,7 +1281,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet ) aLngCfg.GetProperty( UPN_IS_SPELL_WITH_DIGITS ) >>= bVal; nUserData = OptionsUserData( EID_WORDS_WITH_DIGITS, false, 0, true, bVal).GetUserData(); - m_xLinguOptionsCLB->set_toggle(nEntry, bVal, 0); + m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : TRISTATE_FALSE, 0); m_xLinguOptionsCLB->set_text(nEntry, sWordsWithDigits, 1); m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData)); @@ -1290,7 +1290,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet ) aLngCfg.GetProperty( UPN_IS_SPELL_SPECIAL ) >>= bVal; nUserData = OptionsUserData( EID_SPELL_SPECIAL, false, 0, true, bVal).GetUserData(); - m_xLinguOptionsCLB->set_toggle(nEntry, bVal, 0); + m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : TRISTATE_FALSE, 0); m_xLinguOptionsCLB->set_text(nEntry, sSpellSpecial, 1); m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData)); @@ -1335,7 +1335,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet ) aLngCfg.GetProperty( UPN_IS_HYPH_AUTO ) >>= bVal; nUserData = OptionsUserData( EID_HYPH_AUTO, false, 0, true, bVal).GetUserData(); - m_xLinguOptionsCLB->set_toggle(nEntry, bVal, 0); + m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : TRISTATE_FALSE, 0); m_xLinguOptionsCLB->set_text(nEntry, sHyphAuto, 1); m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData)); @@ -1344,7 +1344,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet* rSet ) aLngCfg.GetProperty( UPN_IS_HYPH_SPECIAL ) >>= bVal; nUserData = OptionsUserData( EID_HYPH_SPECIAL, false, 0, true, bVal).GetUserData(); - m_xLinguOptionsCLB->set_toggle(nEntry, bVal, 0); + m_xLinguOptionsCLB->set_toggle(nEntry, bVal ? TRISTATE_TRUE : TRISTATE_FALSE, 0); m_xLinguOptionsCLB->set_text(nEntry, sHyphSpecial, 1); m_xLinguOptionsCLB->set_id(nEntry, OUString::number(nUserData)); @@ -1388,7 +1388,7 @@ IMPL_LINK(SvxLinguTabPage, ModulesBoxCheckButtonHdl_Impl, const row_col&, rRowCo return; auto nPos = rRowCol.first; pLinguData->Reconfigure(m_xLinguModulesCLB->get_text(nPos, 1), - m_xLinguModulesCLB->get_toggle(nPos, 0)); + m_xLinguModulesCLB->get_toggle(nPos, 0) == TRISTATE_TRUE); } IMPL_LINK(SvxLinguTabPage, DicsBoxCheckButtonHdl_Impl, const row_col&, rRowCol, void) @@ -1396,7 +1396,7 @@ IMPL_LINK(SvxLinguTabPage, DicsBoxCheckButtonHdl_Impl, const row_col&, rRowCol, auto nPos = rRowCol.first; const uno::Reference<XDictionary> &rDic = aDics.getConstArray()[ nPos ]; if (LinguMgr::GetIgnoreAllList() == rDic) - m_xLinguDicsCLB->set_toggle(nPos, true, 0); + m_xLinguDicsCLB->set_toggle(nPos, TRISTATE_TRUE, 0); } IMPL_LINK(SvxLinguTabPage, ClickHdl_Impl, weld::Button&, rBtn, void) diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 0438cdadddfe..e8d23d237f69 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -216,14 +216,14 @@ bool OfaAutocorrOptionsPage::FillItemSet( SfxItemSet* ) ACFlags nFlags = pAutoCorrect->GetFlags(); int nPos = 0; - pAutoCorrect->SetAutoCorrFlag(ACFlags::Autocorrect, m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST)); - pAutoCorrect->SetAutoCorrFlag(ACFlags::CapitalStartWord, m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST)); - pAutoCorrect->SetAutoCorrFlag(ACFlags::CapitalStartSentence, m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST)); - pAutoCorrect->SetAutoCorrFlag(ACFlags::ChgWeightUnderl, m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST)); - pAutoCorrect->SetAutoCorrFlag(ACFlags::SetINetAttr, m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST)); - pAutoCorrect->SetAutoCorrFlag(ACFlags::ChgToEnEmDash, m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST)); - pAutoCorrect->SetAutoCorrFlag(ACFlags::IgnoreDoubleSpace, m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST)); - pAutoCorrect->SetAutoCorrFlag(ACFlags::CorrectCapsLock, m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST)); + pAutoCorrect->SetAutoCorrFlag(ACFlags::Autocorrect, m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST) == TRISTATE_TRUE); + pAutoCorrect->SetAutoCorrFlag(ACFlags::CapitalStartWord, m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST) == TRISTATE_TRUE); + pAutoCorrect->SetAutoCorrFlag(ACFlags::CapitalStartSentence, m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST) == TRISTATE_TRUE); + pAutoCorrect->SetAutoCorrFlag(ACFlags::ChgWeightUnderl, m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST) == TRISTATE_TRUE); + pAutoCorrect->SetAutoCorrFlag(ACFlags::SetINetAttr, m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST) == TRISTATE_TRUE); + pAutoCorrect->SetAutoCorrFlag(ACFlags::ChgToEnEmDash, m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST) == TRISTATE_TRUE); + pAutoCorrect->SetAutoCorrFlag(ACFlags::IgnoreDoubleSpace, m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST) == TRISTATE_TRUE); + pAutoCorrect->SetAutoCorrFlag(ACFlags::CorrectCapsLock, m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST) == TRISTATE_TRUE); bool bReturn = nFlags != pAutoCorrect->GetFlags(); if(bReturn ) @@ -244,7 +244,7 @@ void OfaAutocorrOptionsPage::InsertEntry(const OUString& rTxt) { m_xCheckLB->append(); const int nRow = m_xCheckLB->n_children() - 1; - m_xCheckLB->set_toggle(nRow, false, CBCOL_FIRST); + m_xCheckLB->set_toggle(nRow, TRISTATE_FALSE, CBCOL_FIRST); m_xCheckLB->set_text(nRow, rTxt, 1); } @@ -266,14 +266,14 @@ void OfaAutocorrOptionsPage::Reset( const SfxItemSet* ) InsertEntry(m_sAccidentalCaps); int nPos = 0; - m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::Autocorrect), CBCOL_FIRST ); - m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::CapitalStartWord), CBCOL_FIRST ); - m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::CapitalStartSentence), CBCOL_FIRST ); - m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::ChgWeightUnderl), CBCOL_FIRST ); - m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::SetINetAttr), CBCOL_FIRST ); - m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::ChgToEnEmDash), CBCOL_FIRST ); - m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::IgnoreDoubleSpace), CBCOL_FIRST ); - m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::CorrectCapsLock), CBCOL_FIRST ); + m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::Autocorrect) ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_FIRST ); + m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::CapitalStartWord) ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_FIRST ); + m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::CapitalStartSentence) ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_FIRST ); + m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::ChgWeightUnderl) ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_FIRST ); + m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::SetINetAttr) ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_FIRST ); + m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::ChgToEnEmDash) ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_FIRST ); + m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::IgnoreDoubleSpace) ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_FIRST ); + m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::CorrectCapsLock) ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_FIRST ); m_xCheckLB->thaw(); } @@ -385,9 +385,9 @@ void OfaSwAutoFmtOptionsPage::CreateEntry(const OUString& rTxt, sal_uInt16 nCol) m_xCheckLB->append(); const int nRow = m_xCheckLB->n_children() - 1; if (nCol == CBCOL_FIRST || nCol == CBCOL_BOTH) - m_xCheckLB->set_toggle(nRow, false, CBCOL_FIRST); + m_xCheckLB->set_toggle(nRow, TRISTATE_FALSE, CBCOL_FIRST); if (nCol == CBCOL_SECOND || nCol == CBCOL_BOTH) - m_xCheckLB->set_toggle(nRow, false, CBCOL_SECOND); + m_xCheckLB->set_toggle(nRow, TRISTATE_FALSE, CBCOL_SECOND); m_xCheckLB->set_text(nRow, rTxt, 2); } @@ -409,51 +409,51 @@ bool OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet* ) SvxSwAutoFormatFlags *pOpt = &pAutoCorrect->GetSwFlags(); ACFlags nFlags = pAutoCorrect->GetFlags(); - bool bCheck = m_xCheckLB->get_toggle(USE_REPLACE_TABLE, CBCOL_FIRST); + bool bCheck = m_xCheckLB->get_toggle(USE_REPLACE_TABLE, CBCOL_FIRST) == TRISTATE_TRUE; bModified |= pOpt->bAutoCorrect != bCheck; pOpt->bAutoCorrect = bCheck; pAutoCorrect->SetAutoCorrFlag(ACFlags::Autocorrect, - m_xCheckLB->get_toggle(USE_REPLACE_TABLE, CBCOL_SECOND)); + m_xCheckLB->get_toggle(USE_REPLACE_TABLE, CBCOL_SECOND) == TRISTATE_TRUE); - bCheck = m_xCheckLB->get_toggle(CORR_UPPER, CBCOL_FIRST); + bCheck = m_xCheckLB->get_toggle(CORR_UPPER, CBCOL_FIRST) == TRISTATE_TRUE; bModified |= pOpt->bCapitalStartWord != bCheck; pOpt->bCapitalStartWord = bCheck; pAutoCorrect->SetAutoCorrFlag(ACFlags::CapitalStartWord, - m_xCheckLB->get_toggle(CORR_UPPER, CBCOL_SECOND)); + m_xCheckLB->get_toggle(CORR_UPPER, CBCOL_SECOND) == TRISTATE_TRUE); - bCheck = m_xCheckLB->get_toggle(BEGIN_UPPER, CBCOL_FIRST); + bCheck = m_xCheckLB->get_toggle(BEGIN_UPPER, CBCOL_FIRST) == TRISTATE_TRUE; bModified |= pOpt->bCapitalStartSentence != bCheck; pOpt->bCapitalStartSentence = bCheck; pAutoCorrect->SetAutoCorrFlag(ACFlags::CapitalStartSentence, - m_xCheckLB->get_toggle(BEGIN_UPPER, CBCOL_SECOND)); + m_xCheckLB->get_toggle(BEGIN_UPPER, CBCOL_SECOND) == TRISTATE_TRUE); - bCheck = m_xCheckLB->get_toggle(BOLD_UNDERLINE, CBCOL_FIRST); + bCheck = m_xCheckLB->get_toggle(BOLD_UNDERLINE, CBCOL_FIRST) == TRISTATE_TRUE; bModified |= pOpt->bChgWeightUnderl != bCheck; pOpt->bChgWeightUnderl = bCheck; pAutoCorrect->SetAutoCorrFlag(ACFlags::ChgWeightUnderl, - m_xCheckLB->get_toggle(BOLD_UNDERLINE, CBCOL_SECOND)); + m_xCheckLB->get_toggle(BOLD_UNDERLINE, CBCOL_SECOND) == TRISTATE_TRUE); pAutoCorrect->SetAutoCorrFlag(ACFlags::IgnoreDoubleSpace, - m_xCheckLB->get_toggle(IGNORE_DBLSPACE, CBCOL_SECOND)); + m_xCheckLB->get_toggle(IGNORE_DBLSPACE, CBCOL_SECOND) == TRISTATE_TRUE); pAutoCorrect->SetAutoCorrFlag(ACFlags::CorrectCapsLock, - m_xCheckLB->get_toggle(CORRECT_CAPS_LOCK, CBCOL_SECOND)); + m_xCheckLB->get_toggle(CORRECT_CAPS_LOCK, CBCOL_SECOND) == TRISTATE_TRUE); - bCheck = m_xCheckLB->get_toggle(DETECT_URL, CBCOL_FIRST); + bCheck = m_xCheckLB->get_toggle(DETECT_URL, CBCOL_FIRST) == TRISTATE_TRUE; bModified |= pOpt->bSetINetAttr != bCheck; pOpt->bSetINetAttr = bCheck; pAutoCorrect->SetAutoCorrFlag(ACFlags::SetINetAttr, - m_xCheckLB->get_toggle(DETECT_URL, CBCOL_SECOND)); + m_xCheckLB->get_toggle(DETECT_URL, CBCOL_SECOND) == TRISTATE_TRUE); - bCheck = m_xCheckLB->get_toggle(DEL_EMPTY_NODE, CBCOL_FIRST); + bCheck = m_xCheckLB->get_toggle(DEL_EMPTY_NODE, CBCOL_FIRST) == TRISTATE_TRUE; bModified |= pOpt->bDelEmptyNode != bCheck; pOpt->bDelEmptyNode = bCheck; - bCheck = m_xCheckLB->get_toggle(REPLACE_USER_COLL, CBCOL_FIRST); + bCheck = m_xCheckLB->get_toggle(REPLACE_USER_COLL, CBCOL_FIRST) == TRISTATE_TRUE; bModified |= pOpt->bChgUserColl != bCheck; pOpt->bChgUserColl = bCheck; - bCheck = m_xCheckLB->get_toggle(REPLACE_BULLETS, CBCOL_FIRST); + bCheck = m_xCheckLB->get_toggle(REPLACE_BULLETS, CBCOL_FIRST) == TRISTATE_TRUE; bModified |= pOpt->bChgEnumNum != bCheck; pOpt->bChgEnumNum = bCheck; bModified |= aBulletFont != pOpt->aBulletFont; @@ -466,45 +466,45 @@ bool OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet* ) pOpt->aByInputBulletFont = aByInputBulletFont; pOpt->cByInputBullet = sByInputBulletChar[0]; - bCheck = m_xCheckLB->get_toggle(MERGE_SINGLE_LINE_PARA, CBCOL_FIRST); + bCheck = m_xCheckLB->get_toggle(MERGE_SINGLE_LINE_PARA, CBCOL_FIRST) == TRISTATE_TRUE; bModified |= pOpt->bRightMargin != bCheck; pOpt->bRightMargin = bCheck; bModified |= nPercent != pOpt->nRightMargin; pOpt->nRightMargin = static_cast<sal_uInt8>(nPercent); - bCheck = m_xCheckLB->get_toggle(APPLY_NUMBERING, CBCOL_SECOND); + bCheck = m_xCheckLB->get_toggle(APPLY_NUMBERING, CBCOL_SECOND) == TRISTATE_TRUE; bModified |= pOpt->bSetNumRule != bCheck; pOpt->bSetNumRule = bCheck; - bCheck = m_xCheckLB->get_toggle(INSERT_BORDER, CBCOL_SECOND); + bCheck = m_xCheckLB->get_toggle(INSERT_BORDER, CBCOL_SECOND) == TRISTATE_TRUE; bModified |= pOpt->bSetBorder != bCheck; pOpt->bSetBorder = bCheck; - bCheck = m_xCheckLB->get_toggle(CREATE_TABLE, CBCOL_SECOND); + bCheck = m_xCheckLB->get_toggle(CREATE_TABLE, CBCOL_SECOND) == TRISTATE_TRUE; bModified |= pOpt->bCreateTable != bCheck; pOpt->bCreateTable = bCheck; - bCheck = m_xCheckLB->get_toggle(REPLACE_STYLES, CBCOL_SECOND); + bCheck = m_xCheckLB->get_toggle(REPLACE_STYLES, CBCOL_SECOND) == TRISTATE_TRUE; bModified |= pOpt->bReplaceStyles != bCheck; pOpt->bReplaceStyles = bCheck; - bCheck = m_xCheckLB->get_toggle(REPLACE_DASHES, CBCOL_FIRST); + bCheck = m_xCheckLB->get_toggle(REPLACE_DASHES, CBCOL_FIRST) == TRISTATE_TRUE; bModified |= pOpt->bChgToEnEmDash != bCheck; pOpt->bChgToEnEmDash = bCheck; pAutoCorrect->SetAutoCorrFlag(ACFlags::ChgToEnEmDash, - m_xCheckLB->get_toggle(REPLACE_DASHES, CBCOL_SECOND)); + m_xCheckLB->get_toggle(REPLACE_DASHES, CBCOL_SECOND) == TRISTATE_TRUE); - bCheck = m_xCheckLB->get_toggle(DEL_SPACES_AT_STT_END, CBCOL_FIRST); + bCheck = m_xCheckLB->get_toggle(DEL_SPACES_AT_STT_END, CBCOL_FIRST) == TRISTATE_TRUE; bModified |= pOpt->bAFormatDelSpacesAtSttEnd != bCheck; pOpt->bAFormatDelSpacesAtSttEnd = bCheck; - bCheck = m_xCheckLB->get_toggle(DEL_SPACES_AT_STT_END, CBCOL_SECOND); + bCheck = m_xCheckLB->get_toggle(DEL_SPACES_AT_STT_END, CBCOL_SECOND) == TRISTATE_TRUE; bModified |= pOpt->bAFormatByInpDelSpacesAtSttEnd != bCheck; pOpt->bAFormatByInpDelSpacesAtSttEnd = bCheck; - bCheck = m_xCheckLB->get_toggle(DEL_SPACES_BETWEEN_LINES, CBCOL_FIRST); + bCheck = m_xCheckLB->get_toggle(DEL_SPACES_BETWEEN_LINES, CBCOL_FIRST) == TRISTATE_TRUE; bModified |= pOpt->bAFormatDelSpacesBetweenLines != bCheck; pOpt->bAFormatDelSpacesBetweenLines = bCheck; - bCheck = m_xCheckLB->get_toggle(DEL_SPACES_BETWEEN_LINES, CBCOL_SECOND); + bCheck = m_xCheckLB->get_toggle(DEL_SPACES_BETWEEN_LINES, CBCOL_SECOND) == TRISTATE_TRUE; bModified |= pOpt->bAFormatByInpDelSpacesBetweenLines != bCheck; pOpt->bAFormatByInpDelSpacesBetweenLines = bCheck; @@ -563,32 +563,32 @@ void OfaSwAutoFmtOptionsPage::Reset( const SfxItemSet* ) CreateEntry(sBullet.replaceFirst("%1", sByInputBulletChar), CBCOL_FIRST); CreateEntry(sRightMargin.replaceFirst("%1", sMargin), CBCOL_FIRST); - m_xCheckLB->set_toggle(USE_REPLACE_TABLE, pOpt->bAutoCorrect, CBCOL_FIRST); - m_xCheckLB->set_toggle(USE_REPLACE_TABLE, bool(nFlags & ACFlags::Autocorrect), CBCOL_SECOND); - m_xCheckLB->set_toggle(CORR_UPPER, pOpt->bCapitalStartWord, CBCOL_FIRST); - m_xCheckLB->set_toggle(CORR_UPPER, bool(nFlags & ACFlags::CapitalStartWord), CBCOL_SECOND); - m_xCheckLB->set_toggle(BEGIN_UPPER, pOpt->bCapitalStartSentence, CBCOL_FIRST); - m_xCheckLB->set_toggle(BEGIN_UPPER, bool(nFlags & ACFlags::CapitalStartSentence), CBCOL_SECOND); - m_xCheckLB->set_toggle(BOLD_UNDERLINE, pOpt->bChgWeightUnderl, CBCOL_FIRST); - m_xCheckLB->set_toggle(BOLD_UNDERLINE, bool(nFlags & ACFlags::ChgWeightUnderl), CBCOL_SECOND); - m_xCheckLB->set_toggle(DETECT_URL, pOpt->bSetINetAttr, CBCOL_FIRST); - m_xCheckLB->set_toggle(DETECT_URL, bool(nFlags & ACFlags::SetINetAttr), CBCOL_SECOND); - m_xCheckLB->set_toggle(REPLACE_DASHES, pOpt->bChgToEnEmDash, CBCOL_FIRST); - m_xCheckLB->set_toggle(REPLACE_DASHES, bool(nFlags & ACFlags::ChgToEnEmDash), CBCOL_SECOND); - m_xCheckLB->set_toggle(DEL_SPACES_AT_STT_END, pOpt->bAFormatDelSpacesAtSttEnd, CBCOL_FIRST); - m_xCheckLB->set_toggle(DEL_SPACES_AT_STT_END, pOpt->bAFormatByInpDelSpacesAtSttEnd, CBCOL_SECOND); - m_xCheckLB->set_toggle(DEL_SPACES_BETWEEN_LINES, pOpt->bAFormatDelSpacesBetweenLines, CBCOL_FIRST); - m_xCheckLB->set_toggle(DEL_SPACES_BETWEEN_LINES, pOpt->bAFormatByInpDelSpacesBetweenLines, CBCOL_SECOND); - m_xCheckLB->set_toggle(IGNORE_DBLSPACE, bool(nFlags & ACFlags::IgnoreDoubleSpace), CBCOL_SECOND); - m_xCheckLB->set_toggle(CORRECT_CAPS_LOCK, bool(nFlags & ACFlags::CorrectCapsLock), CBCOL_SECOND); - m_xCheckLB->set_toggle(APPLY_NUMBERING, pOpt->bSetNumRule, CBCOL_SECOND); - m_xCheckLB->set_toggle(INSERT_BORDER, pOpt->bSetBorder, CBCOL_SECOND); - m_xCheckLB->set_toggle(CREATE_TABLE, pOpt->bCreateTable, CBCOL_SECOND); - m_xCheckLB->set_toggle(REPLACE_STYLES, pOpt->bReplaceStyles, CBCOL_SECOND); - m_xCheckLB->set_toggle(DEL_EMPTY_NODE, pOpt->bDelEmptyNode, CBCOL_FIRST); - m_xCheckLB->set_toggle(REPLACE_USER_COLL, pOpt->bChgUserColl, CBCOL_FIRST); - m_xCheckLB->set_toggle(REPLACE_BULLETS, pOpt->bChgEnumNum, CBCOL_FIRST); - m_xCheckLB->set_toggle(MERGE_SINGLE_LINE_PARA, pOpt->bRightMargin, CBCOL_FIRST); + m_xCheckLB->set_toggle(USE_REPLACE_TABLE, pOpt->bAutoCorrect ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_FIRST); + m_xCheckLB->set_toggle(USE_REPLACE_TABLE, bool(nFlags & ACFlags::Autocorrect) ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_SECOND); + m_xCheckLB->set_toggle(CORR_UPPER, pOpt->bCapitalStartWord ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_FIRST); + m_xCheckLB->set_toggle(CORR_UPPER, bool(nFlags & ACFlags::CapitalStartWord) ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_SECOND); + m_xCheckLB->set_toggle(BEGIN_UPPER, pOpt->bCapitalStartSentence ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_FIRST); + m_xCheckLB->set_toggle(BEGIN_UPPER, bool(nFlags & ACFlags::CapitalStartSentence) ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_SECOND); + m_xCheckLB->set_toggle(BOLD_UNDERLINE, pOpt->bChgWeightUnderl ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_FIRST); + m_xCheckLB->set_toggle(BOLD_UNDERLINE, bool(nFlags & ACFlags::ChgWeightUnderl) ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_SECOND); + m_xCheckLB->set_toggle(DETECT_URL, pOpt->bSetINetAttr ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_FIRST); + m_xCheckLB->set_toggle(DETECT_URL, bool(nFlags & ACFlags::SetINetAttr) ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_SECOND); + m_xCheckLB->set_toggle(REPLACE_DASHES, pOpt->bChgToEnEmDash ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_FIRST); + m_xCheckLB->set_toggle(REPLACE_DASHES, bool(nFlags & ACFlags::ChgToEnEmDash) ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_SECOND); + m_xCheckLB->set_toggle(DEL_SPACES_AT_STT_END, pOpt->bAFormatDelSpacesAtSttEnd ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_FIRST); + m_xCheckLB->set_toggle(DEL_SPACES_AT_STT_END, pOpt->bAFormatByInpDelSpacesAtSttEnd ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_SECOND); + m_xCheckLB->set_toggle(DEL_SPACES_BETWEEN_LINES, pOpt->bAFormatDelSpacesBetweenLines ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_FIRST); + m_xCheckLB->set_toggle(DEL_SPACES_BETWEEN_LINES, pOpt->bAFormatByInpDelSpacesBetweenLines ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_SECOND); + m_xCheckLB->set_toggle(IGNORE_DBLSPACE, bool(nFlags & ACFlags::IgnoreDoubleSpace) ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_SECOND); + m_xCheckLB->set_toggle(CORRECT_CAPS_LOCK, bool(nFlags & ACFlags::CorrectCapsLock) ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_SECOND); + m_xCheckLB->set_toggle(APPLY_NUMBERING, pOpt->bSetNumRule ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_SECOND); + m_xCheckLB->set_toggle(INSERT_BORDER, pOpt->bSetBorder ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_SECOND); + m_xCheckLB->set_toggle(CREATE_TABLE, pOpt->bCreateTable ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_SECOND); + m_xCheckLB->set_toggle(REPLACE_STYLES, pOpt->bReplaceStyles ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_SECOND); + m_xCheckLB->set_toggle(DEL_EMPTY_NODE, pOpt->bDelEmptyNode ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_FIRST); + m_xCheckLB->set_toggle(REPLACE_USER_COLL, pOpt->bChgUserColl ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_FIRST); + m_xCheckLB->set_toggle(REPLACE_BULLETS, pOpt->bChgEnumNum ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_FIRST); + m_xCheckLB->set_toggle(MERGE_SINGLE_LINE_PARA, pOpt->bRightMargin ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_FIRST); ImpUserData* pUserData = new ImpUserData(&sBulletChar, &aBulletFont); OUString sId(OUString::number(reinterpret_cast<sal_Int64>(pUserData))); @@ -1532,9 +1532,9 @@ void OfaQuoteTabPage::CreateEntry(weld::TreeView& rCheckLB, const OUString& rTxt rCheckLB.append(); const int nRow = rCheckLB.n_children() - 1; if (nCol == CBCOL_FIRST || nCol == CBCOL_BOTH) - rCheckLB.set_toggle(nRow, false, CBCOL_FIRST); + rCheckLB.set_toggle(nRow, TRISTATE_FALSE, CBCOL_FIRST); if (nCol == CBCOL_SECOND || nCol == CBCOL_BOTH) - rCheckLB.set_toggle(nRow, false, CBCOL_SECOND); + rCheckLB.set_toggle(nRow, TRISTATE_FALSE, CBCOL_SECOND); rCheckLB.set_text(nRow, rTxt, nTextCol); } @@ -1615,8 +1615,8 @@ bool OfaQuoteTabPage::FillItemSet( SfxItemSet* ) if (m_xCheckLB->get_visible()) { int nPos = 0; - pAutoCorrect->SetAutoCorrFlag(ACFlags::AddNonBrkSpace, m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST)); - pAutoCorrect->SetAutoCorrFlag(ACFlags::ChgOrdinalNumber, m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST)); + pAutoCorrect->SetAutoCorrFlag(ACFlags::AddNonBrkSpace, m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST) == TRISTATE_TRUE); + pAutoCorrect->SetAutoCorrFlag(ACFlags::ChgOrdinalNumber, m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST) == TRISTATE_TRUE); } bool bModified = false; @@ -1624,17 +1624,17 @@ bool OfaQuoteTabPage::FillItemSet( SfxItemSet* ) { SvxSwAutoFormatFlags *pOpt = &pAutoCorrect->GetSwFlags(); - bool bCheck = m_xSwCheckLB->get_toggle(ADD_NONBRK_SPACE, CBCOL_FIRST); + bool bCheck = m_xSwCheckLB->get_toggle(ADD_NONBRK_SPACE, CBCOL_FIRST) == TRISTATE_TRUE; bModified |= pOpt->bAddNonBrkSpace != bCheck; pOpt->bAddNonBrkSpace = bCheck; pAutoCorrect->SetAutoCorrFlag(ACFlags::AddNonBrkSpace, - m_xSwCheckLB->get_toggle(ADD_NONBRK_SPACE, CBCOL_SECOND)); + m_xSwCheckLB->get_toggle(ADD_NONBRK_SPACE, CBCOL_SECOND) == TRISTATE_TRUE); - bCheck = m_xSwCheckLB->get_toggle(REPLACE_1ST, CBCOL_FIRST); + bCheck = m_xSwCheckLB->get_toggle(REPLACE_1ST, CBCOL_FIRST) == TRISTATE_TRUE; bModified |= pOpt->bChgOrdinalNumber != bCheck; pOpt->bChgOrdinalNumber = bCheck; pAutoCorrect->SetAutoCorrFlag(ACFlags::ChgOrdinalNumber, - m_xSwCheckLB->get_toggle(REPLACE_1ST, CBCOL_SECOND)); + m_xSwCheckLB->get_toggle(REPLACE_1ST, CBCOL_SECOND) == TRISTATE_TRUE); } pAutoCorrect->SetAutoCorrFlag(ACFlags::ChgQuotes, m_xDoubleTypoCB->get_active()); @@ -1695,10 +1695,10 @@ void OfaQuoteTabPage::Reset( const SfxItemSet* ) CreateEntry(*m_xSwCheckLB, sNonBrkSpace, CBCOL_BOTH, 2); CreateEntry(*m_xSwCheckLB, sOrdinal, CBCOL_BOTH, 2); - m_xSwCheckLB->set_toggle(ADD_NONBRK_SPACE, pOpt->bAddNonBrkSpace, CBCOL_FIRST); - m_xSwCheckLB->set_toggle(ADD_NONBRK_SPACE, bool(nFlags & ACFlags::AddNonBrkSpace), CBCOL_SECOND); - m_xSwCheckLB->set_toggle(REPLACE_1ST, pOpt->bChgOrdinalNumber, CBCOL_FIRST); - m_xSwCheckLB->set_toggle(REPLACE_1ST, bool(nFlags & ACFlags::ChgOrdinalNumber), CBCOL_SECOND); + m_xSwCheckLB->set_toggle(ADD_NONBRK_SPACE, pOpt->bAddNonBrkSpace ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_FIRST); + m_xSwCheckLB->set_toggle(ADD_NONBRK_SPACE, bool(nFlags & ACFlags::AddNonBrkSpace) ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_SECOND); + m_xSwCheckLB->set_toggle(REPLACE_1ST, pOpt->bChgOrdinalNumber ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_FIRST); + m_xSwCheckLB->set_toggle(REPLACE_1ST, bool(nFlags & ACFlags::ChgOrdinalNumber) ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_SECOND); m_xSwCheckLB->thaw(); } @@ -1713,8 +1713,8 @@ void OfaQuoteTabPage::Reset( const SfxItemSet* ) CreateEntry(*m_xCheckLB, sOrdinal, CBCOL_FIRST, 1); int nPos = 0; - m_xCheckLB->set_toggle(nPos++, bool(nFlags & ACFlags::AddNonBrkSpace), CBCOL_FIRST); - m_xCheckLB->set_toggle(nPos++, bool(nFlags & ACFlags::ChgOrdinalNumber), CBCOL_FIRST); + m_xCheckLB->set_toggle(nPos++, bool(nFlags & ACFlags::AddNonBrkSpace) ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_FIRST); + m_xCheckLB->set_toggle(nPos++, bool(nFlags & ACFlags::ChgOrdinalNumber) ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_FIRST); m_xCheckLB->thaw(); } @@ -2208,7 +2208,7 @@ void OfaSmartTagOptionsTabPage::FillListBox( const SmartTagMgr& rSmartTagMgr ) m_xSmartTagTypesLB->append(); const int nRow = m_xSmartTagTypesLB->n_children() - 1; const bool bCheck = rSmartTagMgr.IsSmartTagTypeEnabled( aSmartTagType ); - m_xSmartTagTypesLB->set_toggle(nRow, bCheck, CBCOL_FIRST); + m_xSmartTagTypesLB->set_toggle(nRow, bCheck ? TRISTATE_TRUE : TRISTATE_FALSE, CBCOL_FIRST); m_xSmartTagTypesLB->set_text(nRow, aLBEntry, 1); m_xSmartTagTypesLB->set_id(nRow, OUString::number(reinterpret_cast<sal_Int64>(new ImplSmartTagLBUserData(aSmartTagType, xRec, j)))); } @@ -2283,7 +2283,7 @@ bool OfaSmartTagOptionsTabPage::FillItemSet( SfxItemSet* ) for (int i = 0; i < nCount; ++i) { const ImplSmartTagLBUserData* pUserData = reinterpret_cast<ImplSmartTagLBUserData*>(m_xSmartTagTypesLB->get_id(i).toInt64()); - const bool bChecked = m_xSmartTagTypesLB->get_toggle(i, CBCOL_FIRST); + const bool bChecked = m_xSmartTagTypesLB->get_toggle(i, CBCOL_FIRST) == TRISTATE_TRUE; const bool bIsCurrentlyEnabled = pSmartTagMgr->IsSmartTagTypeEnabled( pUserData->maSmartTagType ); bModifiedSmartTagTypes = bModifiedSmartTagTypes || ( !bChecked != !bIsCurrentlyEnabled ); diff --git a/cui/uiconfig/ui/accelconfigpage.ui b/cui/uiconfig/ui/accelconfigpage.ui index 6f248588023a..8d058c61bfda 100644 --- a/cui/uiconfig/ui/accelconfigpage.ui +++ b/cui/uiconfig/ui/accelconfigpage.ui @@ -26,7 +26,11 @@ <column type="gchararray"/> <!-- column-name id --> <column type="gchararray"/> - <!-- column-name sensitive --> + <!-- column-name weight1 --> + <column type="gint"/> + <!-- column-name weight1 --> + <column type="gint"/> + <!-- column-name sensitive1 --> <column type="gboolean"/> </columns> </object> @@ -97,7 +101,7 @@ <child> <object class="GtkCellRendererText" id="cellrenderer1"/> <attributes> - <attribute name="sensitive">3</attribute> + <attribute name="sensitive">5</attribute> <attribute name="text">0</attribute> </attributes> </child> diff --git a/cui/uiconfig/ui/acoroptionspage.ui b/cui/uiconfig/ui/acoroptionspage.ui index 2bdc0bf3492d..045f394b16d3 100644 --- a/cui/uiconfig/ui/acoroptionspage.ui +++ b/cui/uiconfig/ui/acoroptionspage.ui @@ -12,6 +12,8 @@ <column type="gchararray"/> <!-- column-name checkvis1 --> <column type="gboolean"/> + <!-- column-name checktri1 --> + <column type="gboolean"/> </columns> </object> <object class="GtkBox" id="AutocorrectOptionsPage"> diff --git a/cui/uiconfig/ui/applyautofmtpage.ui b/cui/uiconfig/ui/applyautofmtpage.ui index 98528c5d13c1..45ca15dd7788 100644 --- a/cui/uiconfig/ui/applyautofmtpage.ui +++ b/cui/uiconfig/ui/applyautofmtpage.ui @@ -16,6 +16,10 @@ <column type="gboolean"/> <!-- column-name checkvis2 --> <column type="gboolean"/> + <!-- column-name checktri1 --> + <column type="gboolean"/> + <!-- column-name checktri2 --> + <column type="gboolean"/> </columns> </object> <object class="GtkBox" id="ApplyAutoFmtPage"> diff --git a/cui/uiconfig/ui/applylocalizedpage.ui b/cui/uiconfig/ui/applylocalizedpage.ui index 705a810f58db..6fec332aee47 100644 --- a/cui/uiconfig/ui/applylocalizedpage.ui +++ b/cui/uiconfig/ui/applylocalizedpage.ui @@ -16,6 +16,10 @@ <column type="gboolean"/> <!-- column-name checkvis2 --> <column type="gboolean"/> + <!-- column-name checktri1 --> + <column type="gboolean"/> + <!-- column-name checktri2 --> + <column type="gboolean"/> </columns> </object> <object class="GtkTreeStore" id="liststore2"> @@ -28,6 +32,8 @@ <column type="gchararray"/> <!-- column-name checkvis1 --> <column type="gboolean"/> + <!-- column-name checktri1 --> + <column type="gboolean"/> </columns> </object> <object class="GtkBox" id="ApplyLocalizedPage"> diff --git a/cui/uiconfig/ui/certdialog.ui b/cui/uiconfig/ui/certdialog.ui index 8a90f1d32862..348e346856b5 100644 --- a/cui/uiconfig/ui/certdialog.ui +++ b/cui/uiconfig/ui/certdialog.ui @@ -14,6 +14,8 @@ <column type="gchararray"/> <!-- column-name checkvis1 --> <column type="gboolean"/> + <!-- column-name checktri1 --> + <column type="gboolean"/> </columns> </object> <object class="GtkDialog" id="CertDialog"> diff --git a/cui/uiconfig/ui/hangulhanjaoptdialog.ui b/cui/uiconfig/ui/hangulhanjaoptdialog.ui index 1fef474a30c1..c771f050903a 100644 --- a/cui/uiconfig/ui/hangulhanjaoptdialog.ui +++ b/cui/uiconfig/ui/hangulhanjaoptdialog.ui @@ -12,6 +12,8 @@ <column type="gchararray"/> <!-- column-name checkvis1 --> <column type="gboolean"/> + <!-- column-name checktri1 --> + <column type="gboolean"/> </columns> </object> <object class="GtkDialog" id="HangulHanjaOptDialog"> diff --git a/cui/uiconfig/ui/menuassignpage.ui b/cui/uiconfig/ui/menuassignpage.ui index 63c74abab271..e69080d09fe4 100644 --- a/cui/uiconfig/ui/menuassignpage.ui +++ b/cui/uiconfig/ui/menuassignpage.ui @@ -76,6 +76,8 @@ <column type="gchararray"/> <!-- column-name checkvis1 --> <column type="gboolean"/> + <!-- column-name checktri1 --> + <column type="gboolean"/> </columns> </object> <object class="GtkTreeStore" id="liststore3"> diff --git a/cui/uiconfig/ui/multipathdialog.ui b/cui/uiconfig/ui/multipathdialog.ui index 9275c13e4a34..0f1e73094e20 100644 --- a/cui/uiconfig/ui/multipathdialog.ui +++ b/cui/uiconfig/ui/multipathdialog.ui @@ -12,6 +12,8 @@ <column type="gchararray"/> <!-- column-name checkvis1 --> <column type="gboolean"/> + <!-- column-name checktri1 --> + <column type="gboolean"/> </columns> </object> <object class="GtkDialog" id="MultiPathDialog"> diff --git a/cui/uiconfig/ui/optlingupage.ui b/cui/uiconfig/ui/optlingupage.ui index f2331ecb58d9..215c8f67549c 100644 --- a/cui/uiconfig/ui/optlingupage.ui +++ b/cui/uiconfig/ui/optlingupage.ui @@ -12,6 +12,8 @@ <column type="gchararray"/> <!-- column-name checkvis1 --> <column type="gboolean"/> + <!-- column-name checktri1 --> + <column type="gboolean"/> </columns> </object> <object class="GtkTreeStore" id="liststore3"> @@ -24,6 +26,8 @@ <column type="gchararray"/> <!-- column-name checkvis1 --> <column type="gboolean"/> + <!-- column-name checktri1 --> + <column type="gboolean"/> </columns> </object> <object class="GtkTreeStore" id="liststore4"> @@ -36,6 +40,8 @@ <column type="gchararray"/> <!-- column-name checkvis1 --> <column type="gboolean"/> + <!-- column-name checktri1 --> + <column type="gboolean"/> </columns> </object> <object class="GtkGrid" id="OptLinguPage"> diff --git a/cui/uiconfig/ui/searchattrdialog.ui b/cui/uiconfig/ui/searchattrdialog.ui index f543ba732c8e..d67f41fe008b 100644 --- a/cui/uiconfig/ui/searchattrdialog.ui +++ b/cui/uiconfig/ui/searchattrdialog.ui @@ -12,6 +12,8 @@ <column type="gchararray"/> <!-- column-name checkvis1 --> <column type="gboolean"/> + <!-- column-name checktri1 --> + <column type="gboolean"/> </columns> </object> <object class="GtkDialog" id="SearchAttrDialog"> diff --git a/cui/uiconfig/ui/smarttagoptionspage.ui b/cui/uiconfig/ui/smarttagoptionspage.ui index b4e00e16a8a7..08cbb87ae8e6 100644 --- a/cui/uiconfig/ui/smarttagoptionspage.ui +++ b/cui/uiconfig/ui/smarttagoptionspage.ui @@ -12,6 +12,8 @@ <column type="gchararray"/> <!-- column-name checkvis1 --> <column type="gboolean"/> + <!-- column-name checktri1 --> + <column type="gboolean"/> </columns> </object> <object class="GtkGrid" id="SmartTagOptionsPage"> |