diff options
-rw-r--r-- | cui/source/dialogs/tipofthedaydlg.cxx | 11 | ||||
-rw-r--r-- | cui/source/inc/tipofthedaydlg.hxx | 2 |
2 files changed, 3 insertions, 10 deletions
diff --git a/cui/source/dialogs/tipofthedaydlg.cxx b/cui/source/dialogs/tipofthedaydlg.cxx index b88369890529..ac6a4b9e6138 100644 --- a/cui/source/dialogs/tipofthedaydlg.cxx +++ b/cui/source/dialogs/tipofthedaydlg.cxx @@ -60,8 +60,6 @@ TipOfTheDayDialog::TipOfTheDayDialog(weld::Window* pParent) if (m_nDay > officecfg::Office::Common::Misc::LastTipOfTheDayShown::get()) m_nCurrentTip++; - m_aPreview.init(&m_aGraphic, LINK(this, TipOfTheDayDialog, ImplModifyHdl)); - UpdateTip(); } @@ -176,12 +174,9 @@ void TipOfTheDayDialog::UpdateTip() // use default image if none is available with the number if (aImageName.isEmpty() || !file_exists(aURL + aImageName)) aImageName = "tipoftheday.png"; - GraphicFilter::LoadGraphic(aURL + aImageName, OUString(), m_aGraphic); -} - -IMPL_LINK_NOARG(TipOfTheDayDialog, ImplModifyHdl, LinkParamNone*, void) -{ - m_aPreview.SetPreview(m_aGraphic); + Graphic aGraphic; + GraphicFilter::LoadGraphic(aURL + aImageName, OUString(), aGraphic); + m_aPreview.SetPreview(aGraphic); } IMPL_LINK(TipOfTheDayDialog, OnLinkClick, weld::LinkButton&, rButton, bool) diff --git a/cui/source/inc/tipofthedaydlg.hxx b/cui/source/inc/tipofthedaydlg.hxx index a63ac3cc44e5..44ea0134fe01 100644 --- a/cui/source/inc/tipofthedaydlg.hxx +++ b/cui/source/inc/tipofthedaydlg.hxx @@ -32,13 +32,11 @@ private: std::unique_ptr<weld::LinkButton> m_pLink; std::unique_ptr<weld::CustomWeld> m_pPreview; - Graphic m_aGraphic; sal_Int32 m_nCurrentTip; sal_Int32 m_nDay; void UpdateTip(); DECL_LINK(OnNextClick, weld::Button&, void); DECL_LINK(OnLinkClick, weld::LinkButton&, bool); - DECL_LINK(ImplModifyHdl, LinkParamNone*, void); public: TipOfTheDayDialog(weld::Window* pWindow); |