diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-18 15:05:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-20 08:19:48 +0200 |
commit | 0f34e96a5ce68a3039f65cd0f896b33f2d20af5f (patch) | |
tree | 2ea420b96865e6fe69bbbbc1915d3b1ac4c1e808 /starmath | |
parent | f05b0a6aaf8af5d78f9cad8bb953228cb0ce09f1 (diff) |
return weld widgets by std::unique_ptr from builder
Change-Id: I20c007b13dae2d1155034711ad1ad48bfdfd0ba8
Reviewed-on: https://gerrit.libreoffice.org/59288
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/inc/dialog.hxx | 2 | ||||
-rw-r--r-- | starmath/inc/utility.hxx | 2 | ||||
-rw-r--r-- | starmath/source/dialog.cxx | 6 | ||||
-rw-r--r-- | starmath/source/utility.cxx | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx index 81f043c59fde..37dcbd5bd45a 100644 --- a/starmath/inc/dialog.hxx +++ b/starmath/inc/dialog.hxx @@ -280,7 +280,7 @@ class SmShowSymbolSet : public weld::CustomWidgetController DECL_LINK(ScrollHdl, weld::ScrolledWindow&, void); public: - SmShowSymbolSet(weld::ScrolledWindow* pScrolledWindow); + SmShowSymbolSet(std::unique_ptr<weld::ScrolledWindow> pScrolledWindow); virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override { diff --git a/starmath/inc/utility.hxx b/starmath/inc/utility.hxx index 63871c3877e7..9f9e0b0cefb4 100644 --- a/starmath/inc/utility.hxx +++ b/starmath/inc/utility.hxx @@ -142,7 +142,7 @@ private: DECL_LINK(SelectHdl, weld::ComboBoxText&, void); public: - SmFontPickListBox(weld::ComboBoxText* pWidget); + SmFontPickListBox(std::unique_ptr<weld::ComboBoxText> 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 27860ce1ec65..eea95ab3c490 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -610,7 +610,7 @@ SmCategoryDesc::SmCategoryDesc(weld::Builder& rBuilder, sal_uInt16 nCategoryIdx) if (xLabel) { Strings[i] = xLabel->get_label(); - Graphics[i].reset(rBuilder.weld_widget(OString::number(nCategoryIdx)+"image"+OString::number(i+1))); + Graphics[i] = rBuilder.weld_widget(OString::number(nCategoryIdx)+"image"+OString::number(i+1)); } else { @@ -959,14 +959,14 @@ void SmAlignDialog::WriteTo(SmFormat &rFormat) const rFormat.RequestApplyChanges(); } -SmShowSymbolSet::SmShowSymbolSet(weld::ScrolledWindow* pScrolledWindow) +SmShowSymbolSet::SmShowSymbolSet(std::unique_ptr<weld::ScrolledWindow> pScrolledWindow) : nLen(0) , nRows(0) , nColumns(0) , nXOffset(0) , nYOffset(0) , nSelectSymbol(SYMBOL_NONE) - , m_xScrolledWindow(pScrolledWindow) + , m_xScrolledWindow(std::move(pScrolledWindow)) { m_xScrolledWindow->set_user_managed_scrolling(); m_xScrolledWindow->connect_vadjustment_changed(LINK(this, SmShowSymbolSet, ScrollHdl)); diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx index 015257bc3527..4214e609e3da 100644 --- a/starmath/source/utility.cxx +++ b/starmath/source/utility.cxx @@ -120,9 +120,9 @@ void SmFontPickList::WriteTo(SmFontDialog& rDialog) const /**************************************************************************/ -SmFontPickListBox::SmFontPickListBox(weld::ComboBoxText* pWidget) +SmFontPickListBox::SmFontPickListBox(std::unique_ptr<weld::ComboBoxText> pWidget) : SmFontPickList(4) - , m_xWidget(pWidget) + , m_xWidget(std::move(pWidget)) { m_xWidget->connect_changed(LINK(this, SmFontPickListBox, SelectHdl)); } |