summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/docshell/tpstat.cxx39
-rw-r--r--sc/source/ui/inc/tpstat.hxx13
2 files changed, 20 insertions, 32 deletions
diff --git a/sc/source/ui/docshell/tpstat.cxx b/sc/source/ui/docshell/tpstat.cxx
index 7e35a7a016c9..7e73874e83ed 100644
--- a/sc/source/ui/docshell/tpstat.cxx
+++ b/sc/source/ui/docshell/tpstat.cxx
@@ -30,48 +30,37 @@
VclPtr<SfxTabPage> ScDocStatPage::Create( TabPageParent pParent, const SfxItemSet* rSet )
{
- return VclPtr<ScDocStatPage>::Create( pParent.pParent, *rSet );
+ return VclPtr<ScDocStatPage>::Create( pParent, *rSet );
}
-ScDocStatPage::ScDocStatPage( vcl::Window *pParent, const SfxItemSet& rSet )
- : SfxTabPage( pParent, "StatisticsInfoPage", "modules/scalc/ui/statisticsinfopage.ui", &rSet )
+ScDocStatPage::ScDocStatPage(TabPageParent pParent, const SfxItemSet& rSet)
+ : SfxTabPage(pParent, "modules/scalc/ui/statisticsinfopage.ui", "StatisticsInfoPage", &rSet)
+ , m_xFtTables(m_xBuilder->weld_label("nosheets"))
+ , m_xFtCells(m_xBuilder->weld_label("nocells"))
+ , m_xFtPages(m_xBuilder->weld_label("nopages"))
+ , m_xFtFormula(m_xBuilder->weld_label("noformula"))
+ , m_xFrame(m_xBuilder->weld_frame("StatisticsInfoPage"))
{
- get(m_pFtTables,"nosheets");
- get(m_pFtCells,"nocells");
- get(m_pFtPages,"nopages");
- get(m_pFtFormula,"noformula");
ScDocShell* pDocSh = dynamic_cast<ScDocShell*>( SfxObjectShell::Current() );
ScDocStat aDocStat;
if ( pDocSh )
pDocSh->GetDocStat( aDocStat );
- VclFrame *pFrame = get<VclFrame>("StatisticsInfoPage");
- OUString aInfo = pFrame->get_label();
+ OUString aInfo = m_xFrame->get_label();
aInfo += aDocStat.aDocName;
- pFrame->set_label(aInfo);
- m_pFtTables ->SetText( OUString::number( aDocStat.nTableCount ) );
- m_pFtCells ->SetText( OUString::number( aDocStat.nCellCount ) );
- m_pFtPages ->SetText( OUString::number( aDocStat.nPageCount ) );
- m_pFtFormula ->SetText( OUString::number( aDocStat.nFormulaCount ) );
+ m_xFrame->set_label(aInfo);
+ m_xFtTables->set_label( OUString::number( aDocStat.nTableCount ) );
+ m_xFtCells->set_label( OUString::number( aDocStat.nCellCount ) );
+ m_xFtPages->set_label( OUString::number( aDocStat.nPageCount ) );
+ m_xFtFormula->set_label( OUString::number( aDocStat.nFormulaCount ) );
}
ScDocStatPage::~ScDocStatPage()
{
- disposeOnce();
}
-void ScDocStatPage::dispose()
-{
- m_pFtTables.clear();
- m_pFtCells.clear();
- m_pFtPages.clear();
- m_pFtFormula.clear();
- SfxTabPage::dispose();
-}
-
-
bool ScDocStatPage::FillItemSet( SfxItemSet* /* rSet */ )
{
return false;
diff --git a/sc/source/ui/inc/tpstat.hxx b/sc/source/ui/inc/tpstat.hxx
index 299b703fcf11..a24bc18fa88b 100644
--- a/sc/source/ui/inc/tpstat.hxx
+++ b/sc/source/ui/inc/tpstat.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_SC_SOURCE_UI_INC_TPSTAT_HXX
#include <sfx2/tabdlg.hxx>
-#include <vcl/fixed.hxx>
class ScDocStatPage: public SfxTabPage
{
@@ -29,19 +28,19 @@ class ScDocStatPage: public SfxTabPage
public:
static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rSet );
virtual ~ScDocStatPage() override;
- virtual void dispose() override;
private:
- ScDocStatPage( vcl::Window *pParent, const SfxItemSet& rSet );
+ ScDocStatPage(TabPageParent pParent, const SfxItemSet& rSet);
protected:
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset ( const SfxItemSet* rSet ) override;
private:
- VclPtr<FixedText> m_pFtTables;
- VclPtr<FixedText> m_pFtCells;
- VclPtr<FixedText> m_pFtPages;
- VclPtr<FixedText> m_pFtFormula;
+ std::unique_ptr<weld::Label> m_xFtTables;
+ std::unique_ptr<weld::Label> m_xFtCells;
+ std::unique_ptr<weld::Label> m_xFtPages;
+ std::unique_ptr<weld::Label> m_xFtFormula;
+ std::unique_ptr<weld::Frame> m_xFrame;
};
#endif