/src/libreoffice/sw/source/uibase/dialog/wordcountwrapper.cxx
Line | Count | Source |
1 | | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
2 | | /* |
3 | | * This file is part of the LibreOffice project. |
4 | | * |
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 | | */ |
9 | | |
10 | | #include <wordcountdialog.hxx> |
11 | | #include <docstat.hxx> |
12 | | #include <cmdid.h> |
13 | | |
14 | | SFX_IMPL_CHILDWINDOW_WITHID(SwWordCountWrapper, FN_WORDCOUNT_DIALOG) |
15 | | |
16 | | SwWordCountWrapper::SwWordCountWrapper(vcl::Window *pParentWindow, |
17 | | sal_uInt16 nId, |
18 | | SfxBindings* pBindings, |
19 | | SfxChildWinInfo* pInfo ) |
20 | 0 | : SfxChildWindow(pParentWindow, nId) |
21 | 0 | { |
22 | 0 | SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); |
23 | 0 | m_xAbstDlg.reset(pFact->CreateSwWordCountDialog(pBindings, this, pParentWindow->GetFrameWeld(), pInfo)); |
24 | 0 | SetController(m_xAbstDlg->GetController()); |
25 | 0 | } |
26 | | |
27 | | SwWordCountWrapper::~SwWordCountWrapper() |
28 | 0 | { |
29 | 0 | m_xAbstDlg.disposeAndClear(); |
30 | 0 | } |
31 | | |
32 | | SfxChildWinInfo SwWordCountWrapper::GetInfo() const |
33 | 0 | { |
34 | 0 | SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); |
35 | 0 | return aInfo; |
36 | 0 | } |
37 | | |
38 | | void SwWordCountWrapper::UpdateCounts() |
39 | 0 | { |
40 | 0 | m_xAbstDlg->UpdateCounts(); |
41 | 0 | } |
42 | | |
43 | | void SwWordCountWrapper::SetCounts(const SwDocStat &rCurrCnt, const SwDocStat &rDocStat) |
44 | 0 | { |
45 | 0 | m_xAbstDlg->SetCounts(rCurrCnt, rDocStat); |
46 | 0 | } |
47 | | |
48 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |