tdf#161411 - UI: Add Better wording for ASCII-only characters
[LibreOffice.git] / sw / source / uibase / dialog / wordcountwrapper.cxx
blobd7d4a14515ce9c4e42c44d3df559002ed891be7f
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 <wordcountdialog.hxx>
11 #include <docstat.hxx>
12 #include <cmdid.h>
14 SFX_IMPL_CHILDWINDOW_WITHID(SwWordCountWrapper, FN_WORDCOUNT_DIALOG)
16 SwWordCountWrapper::SwWordCountWrapper(vcl::Window *pParentWindow,
17 sal_uInt16 nId,
18 SfxBindings* pBindings,
19 SfxChildWinInfo* pInfo )
20 : SfxChildWindow(pParentWindow, nId)
22 SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
23 m_xAbstDlg.reset(pFact->CreateSwWordCountDialog(pBindings, this, pParentWindow->GetFrameWeld(), pInfo));
24 SetController(m_xAbstDlg->GetController());
27 SwWordCountWrapper::~SwWordCountWrapper()
29 m_xAbstDlg.disposeAndClear();
32 SfxChildWinInfo SwWordCountWrapper::GetInfo() const
34 SfxChildWinInfo aInfo = SfxChildWindow::GetInfo();
35 return aInfo;
38 void SwWordCountWrapper::UpdateCounts()
40 m_xAbstDlg->UpdateCounts();
43 void SwWordCountWrapper::SetCounts(const SwDocStat &rCurrCnt, const SwDocStat &rDocStat)
45 m_xAbstDlg->SetCounts(rCurrCnt, rDocStat);
48 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */