1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #include <swtypes.hxx>
11 #include <wordcountdialog.hxx>
12 #include <docstat.hxx>
16 SFX_IMPL_CHILDWINDOW_WITHID(SwWordCountWrapper
, FN_WORDCOUNT_DIALOG
)
18 SwWordCountWrapper::SwWordCountWrapper( Window
*pParentWindow
,
20 SfxBindings
* pBindings
,
21 SfxChildWinInfo
* pInfo
) :
22 SfxChildWindow(pParentWindow
, nId
)
24 SwAbstractDialogFactory
* pFact
= SwAbstractDialogFactory::Create();
25 OSL_ENSURE(pFact
, "SwAbstractDialogFactory fail!");
26 pAbstDlg
= pFact
->CreateSwWordCountDialog(pBindings
, this, pParentWindow
, pInfo
);
27 OSL_ENSURE(pAbstDlg
, "Dialog construction failed!");
28 pWindow
= pAbstDlg
->GetWindow();
30 eChildAlignment
= SFX_ALIGN_NOALIGNMENT
;
33 SfxChildWinInfo
SwWordCountWrapper::GetInfo() const
35 SfxChildWinInfo aInfo
= SfxChildWindow::GetInfo();
39 void SwWordCountWrapper::UpdateCounts()
41 pAbstDlg
->UpdateCounts();
44 void SwWordCountWrapper::SetCounts(const SwDocStat
&rCurrCnt
, const SwDocStat
&rDocStat
)
46 pAbstDlg
->SetCounts(rCurrCnt
, rDocStat
);