Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * Version: MPL 1.1 / GPLv3+ / LGPLv3+
4 : : *
5 : : * The contents of this file are subject to the Mozilla Public License Version
6 : : * 1.1 (the "License"); you may not use this file except in compliance with
7 : : * the License. You may obtain a copy of the License at
8 : : * http://www.mozilla.org/MPL/
9 : : *
10 : : * Software distributed under the License is distributed on an "AS IS" basis,
11 : : * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 : : * for the specific language governing rights and limitations under the
13 : : * License.
14 : : *
15 : : * The Initial Developer of the Original Code is
16 : : * Matt Pratt <mattpratt.au@gmail.com>
17 : : * Portions created by the Initial Developer are Copyright (C) 2011 the
18 : : * Initial Developer. All Rights Reserved.
19 : : *
20 : : * Alternatively, the contents of this file may be used under the terms of
21 : : * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
22 : : * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
23 : : * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
24 : : * instead of those above.
25 : : */
26 : :
27 : : #include <swtypes.hxx>
28 : : #include <wordcountdialog.hxx>
29 : : #include <docstat.hxx>
30 : : #include <dialog.hrc>
31 : : #include <wordcountdialog.hrc>
32 : : #include <cmdid.h>
33 : :
34 [ + - ][ # # ]: 224 : SFX_IMPL_CHILDWINDOW_WITHID(SwWordCountWrapper, FN_WORDCOUNT_DIALOG)
35 : :
36 : 0 : SwWordCountWrapper::SwWordCountWrapper( Window *pParentWindow,
37 : : sal_uInt16 nId,
38 : : SfxBindings* pBindings,
39 : : SfxChildWinInfo* pInfo ) :
40 : 0 : SfxChildWindow(pParentWindow, nId)
41 : : {
42 [ # # ]: 0 : SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
43 : : OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
44 [ # # ]: 0 : pAbstDlg = pFact->CreateSwWordCountDialog( DLG_WORDCOUNT, pBindings, this, pParentWindow, pInfo );
45 : : OSL_ENSURE(pAbstDlg, "Dialog construction failed!");
46 [ # # ]: 0 : pWindow = pAbstDlg->GetWindow();
47 : :
48 : 0 : eChildAlignment = SFX_ALIGN_NOALIGNMENT;
49 : 0 : }
50 : :
51 : 0 : SfxChildWinInfo SwWordCountWrapper::GetInfo() const
52 : : {
53 : 0 : SfxChildWinInfo aInfo = SfxChildWindow::GetInfo();
54 : 0 : return aInfo;
55 : : }
56 : :
57 : 0 : void SwWordCountWrapper::UpdateCounts()
58 : : {
59 : 0 : pAbstDlg->UpdateCounts();
60 : 0 : }
|