diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-02-18 12:11:08 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-02-19 22:18:10 +0100 |
commit | 12a59a1f2948274c6a845ab4a0963bab8aff45b8 (patch) | |
tree | d7877f8e78aad8b53df428773947228e88a151f3 /cui | |
parent | read/written as 32bit integers (diff) | |
download | core-12a59a1f2948274c6a845ab4a0963bab8aff45b8.tar.gz core-12a59a1f2948274c6a845ab4a0963bab8aff45b8.zip |
weld ChineseDictionaryDialog
and ChineseTranslationDialog
Change-Id: I3b754c405c8379fc0c5fa94437cc0464a1dea999
Reviewed-on: https://gerrit.libreoffice.org/67991
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/cfgutil.cxx | 8 | ||||
-rw-r--r-- | cui/source/dialogs/hangulhanjadlg.cxx | 5 | ||||
-rw-r--r-- | cui/source/dialogs/linkdlg.cxx | 6 | ||||
-rw-r--r-- | cui/source/dialogs/multipat.cxx | 3 | ||||
-rw-r--r-- | cui/source/dialogs/srchxtra.cxx | 3 | ||||
-rw-r--r-- | cui/source/inc/cfgutil.hxx | 2 | ||||
-rw-r--r-- | cui/source/options/certpath.cxx | 6 | ||||
-rw-r--r-- | cui/source/tabpages/autocdlg.cxx | 12 | ||||
-rw-r--r-- | cui/uiconfig/ui/hangulhanjaoptdialog.ui | 8 |
9 files changed, 25 insertions, 28 deletions
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index 14367102b237..012b46818e55 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -1383,7 +1383,7 @@ void CuiConfigGroupListBox::FillScriptList(const css::uno::Reference< css::scrip 0, static_cast<void *>( theChild.get()))); OUString sId(OUString::number(reinterpret_cast<sal_Int64>(aArr.back().get()))); - m_xTreeView->insert(pParentEntry, -1, &uiName, &sId, nullptr, nullptr, &aImage, bChildOnDemand); + m_xTreeView->insert(pParentEntry, -1, &uiName, &sId, nullptr, nullptr, &aImage, bChildOnDemand, nullptr); } } } @@ -1453,7 +1453,7 @@ void CuiConfigGroupListBox::Init(const css::uno::Reference< css::uno::XComponent static_cast<void *>(rootNode.get()))); OUString aTitle(xImp->m_sDlgMacros); OUString sId(OUString::number(reinterpret_cast<sal_Int64>(aArr.back().get()))); - m_xTreeView->insert(nullptr, -1, &aTitle, &sId, nullptr, nullptr, nullptr, true); + m_xTreeView->insert(nullptr, -1, &aTitle, &sId, nullptr, nullptr, nullptr, true, nullptr); } else { @@ -1469,7 +1469,7 @@ void CuiConfigGroupListBox::Init(const css::uno::Reference< css::uno::XComponent aArr.push_back( std::make_unique<SfxGroupInfo_Impl>( SfxCfgKind::GROUP_STYLES, 0, nullptr ) ); // TODO last parameter should contain user data OUString sStyle(xImp->m_aStrGroupStyles); OUString sId(OUString::number(reinterpret_cast<sal_Int64>(aArr.back().get()))); - m_xTreeView->insert(nullptr, -1, &sStyle, &sId, nullptr, nullptr, nullptr, true); + m_xTreeView->insert(nullptr, -1, &sStyle, &sId, nullptr, nullptr, nullptr, true, nullptr); } m_xTreeView->thaw(); @@ -1761,7 +1761,7 @@ IMPL_LINK(CuiConfigGroupListBox, ExpandingHdl, weld::TreeIter&, rIter, bool) SfxStyleInfo_Impl* pFamily = new SfxStyleInfo_Impl(lStyleFamily); aArr.push_back( std::make_unique<SfxGroupInfo_Impl>( SfxCfgKind::GROUP_STYLES, 0, pFamily )); OUString sId(OUString::number(reinterpret_cast<sal_Int64>(aArr.back().get()))); - m_xTreeView->insert(&rIter, -1, &pFamily->sLabel, &sId, nullptr, nullptr, nullptr, false); + m_xTreeView->insert(&rIter, -1, &pFamily->sLabel, &sId, nullptr, nullptr, nullptr, false, nullptr); } } break; diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index 74f46d3d3647..01cc5ad80ecf 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -960,6 +960,8 @@ namespace svx } } } + if (m_xDictsLB->n_children()) + m_xDictsLB->select(0); } IMPL_LINK_NOARG(HangulHanjaOptionsDialog, OkHdl, weld::Button&, void) @@ -1142,8 +1144,7 @@ namespace svx void HangulHanjaOptionsDialog::AddDict(const OUString& rName, bool bChecked) { - m_xDictsLB->insert(nullptr, -1, nullptr, nullptr, - nullptr, nullptr, nullptr, false); + m_xDictsLB->append(); int nRow = m_xDictsLB->n_children() - 1; m_xDictsLB->set_toggle(nRow, bChecked, 0); m_xDictsLB->set_text(nRow, rName, 1); diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index b4b7410909df..7e4f0439e0e8 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -575,11 +575,9 @@ void SvBaseLinksDlg::InsertEntry(const SvBaseLink& rLink, int nPos, bool bSelect if (nPos == -1) nPos = m_xTbLinks->n_children(); - m_xTbLinks->insert(nullptr, nPos, nullptr, nullptr, nullptr, - nullptr, nullptr, false); - - m_xTbLinks->set_id(nPos, OUString::number(reinterpret_cast<sal_Int64>(&rLink))); + m_xTbLinks->insert(nPos); m_xTbLinks->set_text(nPos, aTxt, 0); + m_xTbLinks->set_id(nPos, OUString::number(reinterpret_cast<sal_Int64>(&rLink))); if( OBJECT_CLIENT_GRF == rLink.GetObjType() ) m_xTbLinks->set_text(nPos, sFilter, 1); else diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx index b6e409e5d011..6adbb9464a84 100644 --- a/cui/source/dialogs/multipat.cxx +++ b/cui/source/dialogs/multipat.cxx @@ -80,8 +80,7 @@ IMPL_LINK(SvxMultiPathDialog, CheckHdl_Impl, const row_col&, rRowCol, void) void SvxMultiPathDialog::AppendEntry(const OUString& rText, const OUString& rId) { - m_xRadioLB->insert(nullptr, -1, nullptr, nullptr, nullptr, - nullptr, nullptr, false); + m_xRadioLB->append(); const int nRow = m_xRadioLB->n_children() - 1; m_xRadioLB->set_toggle(nRow, false, 0); m_xRadioLB->set_text(nRow, rText, 1); diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx index 39161e40765a..e1f0a869096d 100644 --- a/cui/source/dialogs/srchxtra.cxx +++ b/cui/source/dialogs/srchxtra.cxx @@ -146,8 +146,7 @@ SvxSearchAttributeDialog::SvxSearchAttributeDialog(weld::Window* pParent, sal_uInt32 nId = SvxAttrNameTable::FindIndex(nSlot); if (RESARRAY_INDEX_NOTFOUND != nId) { - m_xAttrLB->insert(nullptr, -1, nullptr, nullptr, nullptr, - nullptr, nullptr, false); + m_xAttrLB->append(); const int nRow = m_xAttrLB->n_children() - 1; m_xAttrLB->set_toggle(nRow, bChecked, 0); m_xAttrLB->set_text(nRow, SvxAttrNameTable::GetString(nId), 1); diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx index ff9f4aa6f1b2..7557a30073a4 100644 --- a/cui/source/inc/cfgutil.hxx +++ b/cui/source/inc/cfgutil.hxx @@ -140,7 +140,7 @@ public: void append(const OUString& rId, const OUString& rStr) { m_xTreeView->append(rId, rStr); } void append(const OUString& rId, const OUString& rStr, const OUString& rImage) { - m_xTreeView->insert(nullptr, -1, &rStr, &rId, nullptr, nullptr, &rImage, false); + m_xTreeView->insert(nullptr, -1, &rStr, &rId, nullptr, nullptr, &rImage, false, nullptr); } int n_children() const { return m_xTreeView->n_children(); } void select(int pos) { m_xTreeView->select(pos); } diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx index 37eeadc07641..2eff6841eb60 100644 --- a/cui/source/options/certpath.cxx +++ b/cui/source/options/certpath.cxx @@ -69,8 +69,7 @@ CertPathDialog::CertPathDialog(weld::Window* pParent) if (!profile.isEmpty()) { - m_xCertPathList->insert(nullptr, -1, nullptr, nullptr, nullptr, - nullptr, nullptr, false); + m_xCertPathList->append(); const int nRow = m_xCertPathList->n_children() - 1; m_xCertPathList->set_toggle(nRow, false, 0); OUString sEntry = OUString::createFromAscii(productNames[i]) + ":" + profile; @@ -174,8 +173,7 @@ void CertPathDialog::AddCertPath(const OUString &rProfile, const OUString &rPath } } - m_xCertPathList->insert(nullptr, -1, nullptr, nullptr, nullptr, - nullptr, nullptr, false); + m_xCertPathList->append(); const int nRow = m_xCertPathList->n_children() - 1; m_xCertPathList->set_toggle(nRow, true, 0); m_xCertPathList->set_text(nRow, rProfile, 1); diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 3ca962d882ff..678b29bc503f 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -241,8 +241,7 @@ void OfaAutocorrOptionsPage::ActivatePage( const SfxItemSet& ) void OfaAutocorrOptionsPage::InsertEntry(const OUString& rTxt) { - m_xCheckLB->insert(nullptr, -1, nullptr, nullptr, nullptr, - nullptr, nullptr, false); + m_xCheckLB->append(); const int nRow = m_xCheckLB->n_children() - 1; m_xCheckLB->set_toggle(nRow, false, CBCOL_FIRST); m_xCheckLB->set_text(nRow, rTxt, 1); @@ -382,8 +381,7 @@ OfaSwAutoFmtOptionsPage::OfaSwAutoFmtOptionsPage(TabPageParent pParent, void OfaSwAutoFmtOptionsPage::CreateEntry(const OUString& rTxt, sal_uInt16 nCol) { - m_xCheckLB->insert(nullptr, -1, nullptr, nullptr, nullptr, - nullptr, nullptr, false); + 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); @@ -1530,8 +1528,7 @@ enum OfaQuoteOptions void OfaQuoteTabPage::CreateEntry(weld::TreeView& rCheckLB, const OUString& rTxt, sal_uInt16 nCol, sal_uInt16 nTextCol) { - rCheckLB.insert(nullptr, -1, nullptr, nullptr, nullptr, - nullptr, nullptr, false); + rCheckLB.append(); const int nRow = rCheckLB.n_children() - 1; if (nCol == CBCOL_FIRST || nCol == CBCOL_BOTH) rCheckLB.set_toggle(nRow, false, CBCOL_FIRST); @@ -2207,8 +2204,7 @@ void OfaSmartTagOptionsTabPage::FillListBox( const SmartTagMgr& rSmartTagMgr ) const OUString aLBEntry = aSmartTagCaption + " (" + aName + ")"; - m_xSmartTagTypesLB->insert(nullptr, -1, nullptr, nullptr, nullptr, - nullptr, nullptr, false); + 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); diff --git a/cui/uiconfig/ui/hangulhanjaoptdialog.ui b/cui/uiconfig/ui/hangulhanjaoptdialog.ui index 0464ba462567..1fef474a30c1 100644 --- a/cui/uiconfig/ui/hangulhanjaoptdialog.ui +++ b/cui/uiconfig/ui/hangulhanjaoptdialog.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.18.3 --> +<!-- Generated with glade 3.22.1 --> <interface domain="cui"> <requires lib="gtk+" version="3.18"/> <object class="GtkTreeStore" id="liststore2"> @@ -18,7 +18,13 @@ <property name="can_focus">False</property> <property name="border_width">6</property> <property name="title" translatable="yes" context="hangulhanjaoptdialog|HangulHanjaOptDialog">Hangul/Hanja Options</property> + <property name="modal">True</property> + <property name="default_width">0</property> + <property name="default_height">0</property> <property name="type_hint">dialog</property> + <child> + <placeholder/> + </child> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> <property name="can_focus">False</property> |