32#include <osl/diagnose.h>
36 return std::make_unique<SwDocStatPage>(pPage, pController, *
rSet);
40 :
SfxTabPage(pPage, pController,
"modules/swriter/ui/statisticsinfopage.ui",
"StatisticsInfoPage", &
rSet)
41 , m_xPageNo(m_xBuilder->weld_label(
"nopages"))
42 , m_xTableNo(m_xBuilder->weld_label(
"notables"))
43 , m_xGrfNo(m_xBuilder->weld_label(
"nogrfs"))
44 , m_xOLENo(m_xBuilder->weld_label(
"nooles"))
45 , m_xParaNo(m_xBuilder->weld_label(
"noparas"))
46 , m_xWordNo(m_xBuilder->weld_label(
"nowords"))
47 , m_xCharNo(m_xBuilder->weld_label(
"nochars"))
48 , m_xCharExclSpacesNo(m_xBuilder->weld_label(
"nocharsexspaces"))
49 , m_xLineLbl(m_xBuilder->weld_label(
"lineft"))
50 , m_xLineNo(m_xBuilder->weld_label(
"nolines"))
51 , m_xUpdatePB(m_xBuilder->weld_button(
"update"))
99 if (
auto pSwView =
dynamic_cast<SwView *
>( pVSh ) )
100 pSh = pSwView->GetWrtShellPtr();
101 else if (
auto pPagePreview =
dynamic_cast<SwPagePreview *
>( pVSh ) )
102 pSh = pPagePreview->GetViewShell();
104 OSL_ENSURE( pSh,
"Shell not found" );
123 m_xLineNo->set_label(OUString::number(pFEShell->
GetLineCount()));
const LocaleDataWrapper & GetUILocaleDataWrapper() const
static const AllSettings & GetSettings()
virtual const SwDocStat & GetUpdatedDocStat(bool bCompleteAsync, bool bFields)=0
Updates the document statistics if the document has been modified and returns a reference to the resu...
OUString getNum(sal_Int64 nNumber, sal_uInt16 nDecimals, bool bUseThousandSep=true, bool bTrailingZeros=true) const
static SAL_WARN_UNUSED_RESULT SfxObjectShell * Current()
static SAL_WARN_UNUSED_RESULT SfxViewShell * Current()
SwFEShell * GetFEShell()
For Core - it knows the DocShell but not the WrtShell!
std::unique_ptr< weld::Label > m_xWordNo
SwDocStatPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
std::unique_ptr< weld::Label > m_xParaNo
void SetData(const SwDocStat &rStat)
std::unique_ptr< weld::Label > m_xPageNo
std::unique_ptr< weld::Label > m_xOLENo
std::unique_ptr< weld::Button > m_xUpdatePB
std::unique_ptr< weld::Label > m_xGrfNo
std::unique_ptr< weld::Label > m_xTableNo
std::unique_ptr< weld::Label > m_xLineLbl
std::unique_ptr< weld::Label > m_xCharExclSpacesNo
virtual bool FillItemSet(SfxItemSet *rSet) override
std::unique_ptr< weld::Label > m_xLineNo
std::unique_ptr< weld::Label > m_xCharNo
virtual void Reset(const SfxItemSet *rSet) override
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
virtual ~SwDocStatPage() override
SwDocShell * GetDocShell()
IDocumentStatistics const & getIDocumentStatistics() const
void EndAction(const bool bIdleEnd=false)
IMPL_LINK_NOARG(SwDocStatPage, UpdateHdl, weld::Button &, void)
#define LINK(Instance, Class, Member)
sal_uLong nCharExcludingSpaces
sal_uLong nPara
paragraphs for document statistic: non-empty and non-hidden ones