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