bump product version to 4.1.6.2
[LibreOffice.git] / sw / source / ui / dialog / wordcountwrapper.cxx
blobcf8734b6fb87353654f487f84793dfb9d6b34c0e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
10 #include <swtypes.hxx>
11 #include <wordcountdialog.hxx>
12 #include <docstat.hxx>
13 #include <dialog.hrc>
14 #include <cmdid.h>
16 SFX_IMPL_CHILDWINDOW_WITHID(SwWordCountWrapper, FN_WORDCOUNT_DIALOG)
18 SwWordCountWrapper::SwWordCountWrapper( Window *pParentWindow,
19 sal_uInt16 nId,
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();
36 return aInfo;
39 void SwWordCountWrapper::UpdateCounts()
41 pAbstDlg->UpdateCounts();
44 void SwWordCountWrapper::SetCounts(const SwDocStat &rCurrCnt, const SwDocStat &rDocStat)
46 pAbstDlg->SetCounts(rCurrCnt, rDocStat);