summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-09-08 09:30:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-09-21 20:10:06 +0200
commitaf90b8089405d6f042207f5639e750f08798ae92 (patch)
tree0af8401f534cbce9a11e64c1819ef84413ddd912 /sc/source
parent416c11d189a18a08c28135b8aa5e0f12cd51dcd6 (diff)
weld infobars
note: "pushed" status listener case dropped. Doesn't seem to be an expectation for it to something in infobars, and there doesn't seem to be a working case anyway. Change-Id: I7869cc05de9918f0dd70e28b0087205db6c9506c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101945 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/docshell/docsh4.cxx10
-rw-r--r--sc/source/ui/inc/docsh.hxx2
2 files changed, 5 insertions, 7 deletions
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index ecce1c5da91f..a63a8b49619b 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -135,7 +135,7 @@ void ScDocShell::ReloadAllLinks()
m_aDocument.UpdateAreaLinks();
}
-IMPL_LINK_NOARG( ScDocShell, ReloadAllLinksHdl, Button*, void )
+IMPL_LINK_NOARG( ScDocShell, ReloadAllLinksHdl, weld::Button&, void )
{
ReloadAllLinks();
@@ -500,11 +500,9 @@ void ScDocShell::Execute( SfxRequest& rReq )
auto pInfoBar = pViewFrame->AppendInfoBar("enablecontent", "", ScResId(STR_RELOAD_TABLES), InfobarType::WARNING);
if (pInfoBar)
{
- VclPtrInstance<PushButton> xBtn(&pViewFrame->GetWindow());
- xBtn->SetText(ScResId(STR_ENABLE_CONTENT));
- xBtn->SetSizePixel(xBtn->GetOptimalSize());
- xBtn->SetClickHdl(LINK(this, ScDocShell, ReloadAllLinksHdl));
- pInfoBar->addButton(xBtn);
+ weld::Button& rBtn = pInfoBar->addButton();
+ rBtn.set_label(ScResId(STR_ENABLE_CONTENT));
+ rBtn.connect_clicked(LINK(this, ScDocShell, ReloadAllLinksHdl));
}
}
rReq.Done();
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index e23067503bae..8a7fc31c1364 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -337,7 +337,7 @@ public:
void UnlockDocument();
DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper*, void );
- DECL_LINK( ReloadAllLinksHdl, Button*, void );
+ DECL_LINK( ReloadAllLinksHdl, weld::Button&, void );
virtual SfxStyleSheetBasePool* GetStyleSheetPool() override;