diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-09-14 15:07:17 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-09-17 15:11:47 +0200 |
commit | 76c7cabc42a239dbaf9e72122d36fb213e5a3555 (patch) | |
tree | 94eac2ae99855b7410168ad4f7be9ea9a8a02d60 /starmath | |
parent | 60a23d5d5f0963cd9bea7711ff4336418e3d6392 (diff) |
rename to weld::ComboBox are they are not text only now
Change-Id: Ice26d1fd2ad97a6959c6916fef428777efea9c2d
Reviewed-on: https://gerrit.libreoffice.org/60500
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/inc/dialog.hxx | 42 | ||||
-rw-r--r-- | starmath/inc/utility.hxx | 6 | ||||
-rw-r--r-- | starmath/source/dialog.cxx | 58 | ||||
-rw-r--r-- | starmath/source/utility.cxx | 4 |
4 files changed, 55 insertions, 55 deletions
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx index 847f65783ed4..68b56efdb4d9 100644 --- a/starmath/inc/dialog.hxx +++ b/starmath/inc/dialog.hxx @@ -342,7 +342,7 @@ class SmSymbolDialog : public weld::GenericDialogController SmShowSymbol m_aSymbolDisplay; - std::unique_ptr<weld::ComboBoxText> m_xSymbolSets; + std::unique_ptr<weld::ComboBox> m_xSymbolSets; std::unique_ptr<SmShowSymbolSet> m_xSymbolSetDisplay; std::unique_ptr<weld::CustomWeld> m_xSymbolSetDisplayArea; std::unique_ptr<weld::Label> m_xSymbolName; @@ -350,7 +350,7 @@ class SmSymbolDialog : public weld::GenericDialogController std::unique_ptr<weld::Button> m_xGetBtn; std::unique_ptr<weld::Button> m_xEditBtn; - DECL_LINK(SymbolSetChangeHdl, weld::ComboBoxText&, void); + DECL_LINK(SymbolSetChangeHdl, weld::ComboBox&, void); DECL_LINK(SymbolChangeHdl, SmShowSymbolSet&, void); DECL_LINK(SymbolDblClickHdl, SmShowSymbol&, void); DECL_LINK(SymbolDblClickHdl2, SmShowSymbolSet&, void); @@ -409,13 +409,13 @@ class SmSymDefineDialog : public weld::GenericDialogController std::unique_ptr<SmSym> m_xOrigSymbol; std::unique_ptr<SubsetMap> m_xSubsetMap; std::unique_ptr<FontList> m_xFontList; - std::unique_ptr<weld::ComboBoxText> m_xOldSymbols; - std::unique_ptr<weld::ComboBoxText> m_xOldSymbolSets; - std::unique_ptr<weld::ComboBoxText> m_xSymbols; - std::unique_ptr<weld::ComboBoxText> m_xSymbolSets; - std::unique_ptr<weld::ComboBoxText> m_xFonts; - std::unique_ptr<weld::ComboBoxText> m_xFontsSubsetLB; - std::unique_ptr<weld::ComboBoxText> m_xStyles; + std::unique_ptr<weld::ComboBox> m_xOldSymbols; + std::unique_ptr<weld::ComboBox> m_xOldSymbolSets; + std::unique_ptr<weld::ComboBox> m_xSymbols; + std::unique_ptr<weld::ComboBox> m_xSymbolSets; + std::unique_ptr<weld::ComboBox> m_xFonts; + std::unique_ptr<weld::ComboBox> m_xFontsSubsetLB; + std::unique_ptr<weld::ComboBox> m_xStyles; std::unique_ptr<weld::Label> m_xOldSymbolName; std::unique_ptr<weld::Label> m_xOldSymbolSetName; std::unique_ptr<weld::Label> m_xSymbolName; @@ -428,19 +428,19 @@ class SmSymDefineDialog : public weld::GenericDialogController std::unique_ptr<SvxShowCharSet> m_xCharsetDisplay; std::unique_ptr<weld::CustomWeld> m_xCharsetDisplayArea; - DECL_LINK(OldSymbolChangeHdl, weld::ComboBoxText&, void); - DECL_LINK(OldSymbolSetChangeHdl, weld::ComboBoxText&, void); - DECL_LINK(ModifyHdl, weld::ComboBoxText&, void); - DECL_LINK(FontChangeHdl, weld::ComboBoxText&, void); - DECL_LINK(SubsetChangeHdl, weld::ComboBoxText&, void); - DECL_LINK(StyleChangeHdl, weld::ComboBoxText&, void); + DECL_LINK(OldSymbolChangeHdl, weld::ComboBox&, void); + DECL_LINK(OldSymbolSetChangeHdl, weld::ComboBox&, void); + DECL_LINK(ModifyHdl, weld::ComboBox&, void); + DECL_LINK(FontChangeHdl, weld::ComboBox&, void); + DECL_LINK(SubsetChangeHdl, weld::ComboBox&, void); + DECL_LINK(StyleChangeHdl, weld::ComboBox&, void); DECL_LINK(CharHighlightHdl, SvxShowCharSet*, void); DECL_LINK(AddClickHdl, weld::Button&, void); DECL_LINK(ChangeClickHdl, weld::Button&, void); DECL_LINK(DeleteClickHdl, weld::Button&, void); - void FillSymbols(weld::ComboBoxText& rComboBox, bool bDeleteText = true); - void FillSymbolSets(weld::ComboBoxText& rComboBox, bool bDeleteText = true); + void FillSymbols(weld::ComboBox& rComboBox, bool bDeleteText = true); + void FillSymbolSets(weld::ComboBox& rComboBox, bool bDeleteText = true); void FillFonts(); void FillStyles(); @@ -449,15 +449,15 @@ class SmSymDefineDialog : public weld::GenericDialogController void SetOrigSymbol(const SmSym *pSymbol, const OUString &rSymbolSetName); void UpdateButtons(); - bool SelectSymbolSet(weld::ComboBoxText &rComboBox, const OUString &rSymbolSetName, + bool SelectSymbolSet(weld::ComboBox &rComboBox, const OUString &rSymbolSetName, bool bDeleteText); - bool SelectSymbol(weld::ComboBoxText& rComboBox, const OUString &rSymbolName, + bool SelectSymbol(weld::ComboBox& rComboBox, const OUString &rSymbolName, bool bDeleteText); bool SelectFont(const OUString &rFontName, bool bApplyFont); bool SelectStyle(const OUString &rStyleName, bool bApplyFont); - SmSym* GetSymbol(const weld::ComboBoxText& rComboBox); - const SmSym* GetSymbol(const weld::ComboBoxText& rComboBox) const + SmSym* GetSymbol(const weld::ComboBox& rComboBox); + const SmSym* GetSymbol(const weld::ComboBox& rComboBox) const { return const_cast<SmSymDefineDialog *>(this)->GetSymbol(rComboBox); } diff --git a/starmath/inc/utility.hxx b/starmath/inc/utility.hxx index 9f9e0b0cefb4..e6346d4dc6e4 100644 --- a/starmath/inc/utility.hxx +++ b/starmath/inc/utility.hxx @@ -137,12 +137,12 @@ public: class SmFontPickListBox final : public SmFontPickList { private: - std::unique_ptr<weld::ComboBoxText> m_xWidget; + std::unique_ptr<weld::ComboBox> m_xWidget; - DECL_LINK(SelectHdl, weld::ComboBoxText&, void); + DECL_LINK(SelectHdl, weld::ComboBox&, void); public: - SmFontPickListBox(std::unique_ptr<weld::ComboBoxText> pWidget); + SmFontPickListBox(std::unique_ptr<weld::ComboBox> pWidget); SmFontPickListBox& operator = (const SmFontPickList& rList); virtual void Insert(const vcl::Font &rFont) override; }; diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 279f99a5e734..7c46a234edb6 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -499,13 +499,13 @@ IMPL_LINK_NOARG(SmFontTypeDialog, DefaultButtonClickHdl, weld::Button&, void) SmFontTypeDialog::SmFontTypeDialog(weld::Window* pParent, OutputDevice *pFntListDevice) : GenericDialogController(pParent, "modules/smath/ui/fonttypedialog.ui", "FontsDialog") , pFontListDev(pFntListDevice) - , m_xVariableFont(new SmFontPickListBox(m_xBuilder->weld_combo_box_text("variableCB"))) - , m_xFunctionFont(new SmFontPickListBox(m_xBuilder->weld_combo_box_text("functionCB"))) - , m_xNumberFont(new SmFontPickListBox(m_xBuilder->weld_combo_box_text("numberCB"))) - , m_xTextFont(new SmFontPickListBox(m_xBuilder->weld_combo_box_text("textCB"))) - , m_xSerifFont(new SmFontPickListBox(m_xBuilder->weld_combo_box_text("serifCB"))) - , m_xSansFont(new SmFontPickListBox(m_xBuilder->weld_combo_box_text("sansCB"))) - , m_xFixedFont(new SmFontPickListBox(m_xBuilder->weld_combo_box_text("fixedCB"))) + , m_xVariableFont(new SmFontPickListBox(m_xBuilder->weld_combo_box("variableCB"))) + , m_xFunctionFont(new SmFontPickListBox(m_xBuilder->weld_combo_box("functionCB"))) + , m_xNumberFont(new SmFontPickListBox(m_xBuilder->weld_combo_box("numberCB"))) + , m_xTextFont(new SmFontPickListBox(m_xBuilder->weld_combo_box("textCB"))) + , m_xSerifFont(new SmFontPickListBox(m_xBuilder->weld_combo_box("serifCB"))) + , m_xSansFont(new SmFontPickListBox(m_xBuilder->weld_combo_box("sansCB"))) + , m_xFixedFont(new SmFontPickListBox(m_xBuilder->weld_combo_box("fixedCB"))) , m_xMenuButton(m_xBuilder->weld_menu_button("modify")) , m_xDefaultButton(m_xBuilder->weld_button("default")) { @@ -1231,7 +1231,7 @@ void SmSymbolDialog::FillSymbolSets() m_xSymbolSets->append_text(*aIt); } -IMPL_LINK_NOARG( SmSymbolDialog, SymbolSetChangeHdl, weld::ComboBoxText&, void ) +IMPL_LINK_NOARG( SmSymbolDialog, SymbolSetChangeHdl, weld::ComboBox&, void ) { SelectSymbolSet(m_xSymbolSets->get_active_text()); } @@ -1316,7 +1316,7 @@ SmSymbolDialog::SmSymbolDialog(weld::Window *pParent, OutputDevice *pFntListDevi , rViewSh(rViewShell) , rSymbolMgr(rMgr) , pFontListDev(pFntListDevice) - , m_xSymbolSets(m_xBuilder->weld_combo_box_text("symbolset")) + , m_xSymbolSets(m_xBuilder->weld_combo_box("symbolset")) , m_xSymbolSetDisplay(new SmShowSymbolSet(m_xBuilder->weld_scrolled_window("scrolledwindow"))) , m_xSymbolSetDisplayArea(new weld::CustomWeld(*m_xBuilder, "symbolsetdisplay", *m_xSymbolSetDisplay)) , m_xSymbolName(m_xBuilder->weld_label("symbolname")) @@ -1457,7 +1457,7 @@ void SmShowChar::SetSymbol( sal_UCS4 cChar, const vcl::Font &rFont ) Invalidate(); } -void SmSymDefineDialog::FillSymbols(weld::ComboBoxText& rComboBox, bool bDeleteText) +void SmSymDefineDialog::FillSymbols(weld::ComboBox& rComboBox, bool bDeleteText) { assert((&rComboBox == m_xOldSymbols.get() || &rComboBox == m_xSymbols.get()) && "Sm : wrong ComboBox"); @@ -1465,13 +1465,13 @@ void SmSymDefineDialog::FillSymbols(weld::ComboBoxText& rComboBox, bool bDeleteT if (bDeleteText) rComboBox.set_entry_text(OUString()); - weld::ComboBoxText& rBox = &rComboBox == m_xOldSymbols.get() ? *m_xOldSymbolSets : *m_xSymbolSets; + weld::ComboBox& rBox = &rComboBox == m_xOldSymbols.get() ? *m_xOldSymbolSets : *m_xSymbolSets; SymbolPtrVec_t aSymSet(m_aSymbolMgrCopy.GetSymbolSet(rBox.get_active_text())); for (const SmSym* i : aSymSet) rComboBox.append_text(i->GetName()); } -void SmSymDefineDialog::FillSymbolSets(weld::ComboBoxText& rComboBox, bool bDeleteText) +void SmSymDefineDialog::FillSymbolSets(weld::ComboBox& rComboBox, bool bDeleteText) { assert((&rComboBox == m_xOldSymbolSets.get() || &rComboBox == m_xSymbolSets.get()) && "Sm : wrong ComboBox"); @@ -1519,27 +1519,27 @@ void SmSymDefineDialog::FillStyles() } } -SmSym* SmSymDefineDialog::GetSymbol(const weld::ComboBoxText& rComboBox) +SmSym* SmSymDefineDialog::GetSymbol(const weld::ComboBox& rComboBox) { assert((&rComboBox == m_xOldSymbols.get() || &rComboBox == m_xSymbols.get()) && "Sm : wrong combobox"); return m_aSymbolMgrCopy.GetSymbolByName(rComboBox.get_active_text()); } -IMPL_LINK(SmSymDefineDialog, OldSymbolChangeHdl, weld::ComboBoxText&, rComboBox, void) +IMPL_LINK(SmSymDefineDialog, OldSymbolChangeHdl, weld::ComboBox&, rComboBox, void) { (void) rComboBox; assert(&rComboBox == m_xOldSymbols.get() && "Sm : wrong argument"); SelectSymbol(*m_xOldSymbols, m_xOldSymbols->get_active_text(), false); } -IMPL_LINK( SmSymDefineDialog, OldSymbolSetChangeHdl, weld::ComboBoxText&, rComboBox, void ) +IMPL_LINK( SmSymDefineDialog, OldSymbolSetChangeHdl, weld::ComboBox&, rComboBox, void ) { (void) rComboBox; assert(&rComboBox == m_xOldSymbolSets.get() && "Sm : wrong argument"); SelectSymbolSet(*m_xOldSymbolSets, m_xOldSymbolSets->get_active_text(), false); } -IMPL_LINK(SmSymDefineDialog, ModifyHdl, weld::ComboBoxText&, rComboBox, void) +IMPL_LINK(SmSymDefineDialog, ModifyHdl, weld::ComboBox&, rComboBox, void) { // remember cursor position for later restoring of it int nStartPos, nEndPos; @@ -1566,7 +1566,7 @@ IMPL_LINK(SmSymDefineDialog, ModifyHdl, weld::ComboBoxText&, rComboBox, void) UpdateButtons(); } -IMPL_LINK(SmSymDefineDialog, FontChangeHdl, weld::ComboBoxText&, rListBox, void) +IMPL_LINK(SmSymDefineDialog, FontChangeHdl, weld::ComboBox&, rListBox, void) { (void) rListBox; assert(&rListBox == m_xFonts.get() && "Sm : wrong argument"); @@ -1574,7 +1574,7 @@ IMPL_LINK(SmSymDefineDialog, FontChangeHdl, weld::ComboBoxText&, rListBox, void) SelectFont(m_xFonts->get_active_text()); } -IMPL_LINK_NOARG(SmSymDefineDialog, SubsetChangeHdl, weld::ComboBoxText&, void) +IMPL_LINK_NOARG(SmSymDefineDialog, SubsetChangeHdl, weld::ComboBox&, void) { int nPos = m_xFontsSubsetLB->get_active(); if (nPos != -1) @@ -1587,7 +1587,7 @@ IMPL_LINK_NOARG(SmSymDefineDialog, SubsetChangeHdl, weld::ComboBoxText&, void) } } -IMPL_LINK( SmSymDefineDialog, StyleChangeHdl, weld::ComboBoxText&, rComboBox, void ) +IMPL_LINK( SmSymDefineDialog, StyleChangeHdl, weld::ComboBox&, rComboBox, void ) { (void) rComboBox; assert(&rComboBox == m_xStyles.get() && "Sm : wrong argument"); @@ -1747,13 +1747,13 @@ SmSymDefineDialog::SmSymDefineDialog(weld::Window* pParent, OutputDevice *pFntLi , m_xVirDev(VclPtr<VirtualDevice>::Create()) , m_rSymbolMgr(rMgr) , m_xFontList(new FontList(pFntListDevice)) - , m_xOldSymbols(m_xBuilder->weld_combo_box_text("oldSymbols")) - , m_xOldSymbolSets(m_xBuilder->weld_combo_box_text("oldSymbolSets")) - , m_xSymbols(m_xBuilder->weld_combo_box_text("symbols")) - , m_xSymbolSets(m_xBuilder->weld_combo_box_text("symbolSets")) - , m_xFonts(m_xBuilder->weld_combo_box_text("fonts")) - , m_xFontsSubsetLB(m_xBuilder->weld_combo_box_text("fontsSubsetLB")) - , m_xStyles(m_xBuilder->weld_combo_box_text("styles")) + , m_xOldSymbols(m_xBuilder->weld_combo_box("oldSymbols")) + , m_xOldSymbolSets(m_xBuilder->weld_combo_box("oldSymbolSets")) + , m_xSymbols(m_xBuilder->weld_combo_box("symbols")) + , m_xSymbolSets(m_xBuilder->weld_combo_box("symbolSets")) + , m_xFonts(m_xBuilder->weld_combo_box("fonts")) + , m_xFontsSubsetLB(m_xBuilder->weld_combo_box("fontsSubsetLB")) + , m_xStyles(m_xBuilder->weld_combo_box("styles")) , m_xOldSymbolName(m_xBuilder->weld_label("oldSymbolName")) , m_xOldSymbolSetName(m_xBuilder->weld_label("oldSymbolSetName")) , m_xSymbolName(m_xBuilder->weld_label("symbolName")) @@ -1832,7 +1832,7 @@ void SmSymDefineDialog::SetSymbolSetManager(const SmSymbolManager &rMgr) UpdateButtons(); } -bool SmSymDefineDialog::SelectSymbolSet(weld::ComboBoxText& rComboBox, +bool SmSymDefineDialog::SelectSymbolSet(weld::ComboBox& rComboBox, const OUString &rSymbolSetName, bool bDeleteText) { assert((&rComboBox == m_xOldSymbolSets.get() || &rComboBox == m_xSymbolSets.get()) && "Sm : wrong ComboBox"); @@ -1862,7 +1862,7 @@ bool SmSymDefineDialog::SelectSymbolSet(weld::ComboBoxText& rComboBox, rFT.set_label(rComboBox.get_active_text()); // set the symbol name which belongs to the SymbolSet at the associated combobox - weld::ComboBoxText& rCB = bIsOld ? *m_xOldSymbols : *m_xSymbols; + weld::ComboBox& rCB = bIsOld ? *m_xOldSymbols : *m_xSymbols; FillSymbols(rCB, false); // display a valid respectively no symbol when changing the SymbolSets @@ -1906,7 +1906,7 @@ void SmSymDefineDialog::SetOrigSymbol(const SmSym *pSymbol, } -bool SmSymDefineDialog::SelectSymbol(weld::ComboBoxText& rComboBox, +bool SmSymDefineDialog::SelectSymbol(weld::ComboBox& rComboBox, const OUString &rSymbolName, bool bDeleteText) { assert((&rComboBox == m_xOldSymbols.get() || &rComboBox == m_xSymbols.get()) && "Sm : wrong ComboBox"); diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx index 4214e609e3da..1018bad60c04 100644 --- a/starmath/source/utility.cxx +++ b/starmath/source/utility.cxx @@ -120,14 +120,14 @@ void SmFontPickList::WriteTo(SmFontDialog& rDialog) const /**************************************************************************/ -SmFontPickListBox::SmFontPickListBox(std::unique_ptr<weld::ComboBoxText> pWidget) +SmFontPickListBox::SmFontPickListBox(std::unique_ptr<weld::ComboBox> pWidget) : SmFontPickList(4) , m_xWidget(std::move(pWidget)) { m_xWidget->connect_changed(LINK(this, SmFontPickListBox, SelectHdl)); } -IMPL_LINK_NOARG(SmFontPickListBox, SelectHdl, weld::ComboBoxText&, void) +IMPL_LINK_NOARG(SmFontPickListBox, SelectHdl, weld::ComboBox&, void) { OUString aString; |