Line data Source code
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 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 : #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_WORDCOUNTDIALOG_HXX
20 : #define INCLUDED_SW_SOURCE_UIBASE_INC_WORDCOUNTDIALOG_HXX
21 : #include <sfx2/basedlgs.hxx>
22 : #include <svtools/stdctrl.hxx>
23 : #include <vcl/layout.hxx>
24 : #include <vcl/button.hxx>
25 : struct SwDocStat;
26 : #include <sfx2/childwin.hxx>
27 : #include "swabstdlg.hxx"
28 :
29 : class SwWordCountFloatDlg : public SfxModelessDialog
30 : {
31 : virtual void Activate() SAL_OVERRIDE;
32 : void SetValues(const SwDocStat& rCurrent, const SwDocStat& rDoc);
33 : void showCJK(bool bShowCJK);
34 : void showStandardizedPages(bool bShowStandardizedPages);
35 :
36 : VclPtr<FixedText> m_pCurrentWordFT;
37 : VclPtr<FixedText> m_pCurrentCharacterFT;
38 : VclPtr<FixedText> m_pCurrentCharacterExcludingSpacesFT;
39 : VclPtr<FixedText> m_pCurrentCjkcharsFT;
40 : VclPtr<FixedText> m_pCurrentStandardizedPagesFT;
41 :
42 : VclPtr<FixedText> m_pDocWordFT;
43 : VclPtr<FixedText> m_pDocCharacterFT;
44 : VclPtr<FixedText> m_pDocCharacterExcludingSpacesFT;
45 : VclPtr<FixedText> m_pDocCjkcharsFT;
46 : VclPtr<FixedText> m_pDocStandardizedPagesFT;
47 :
48 : VclPtr<FixedText> m_pCjkcharsLabelFT;
49 : VclPtr<FixedText> m_pStandardizedPagesLabelFT;
50 :
51 : VclPtr<CloseButton> m_pClosePB;
52 :
53 : DECL_STATIC_LINK( SwWordCountFloatDlg, CloseHdl, void* );
54 : public:
55 : SwWordCountFloatDlg( SfxBindings* pBindings,
56 : SfxChildWindow* pChild,
57 : vcl::Window *pParent,
58 : SfxChildWinInfo* pInfo);
59 : virtual ~SwWordCountFloatDlg();
60 : virtual void dispose() SAL_OVERRIDE;
61 : void UpdateCounts();
62 :
63 : void SetCounts(const SwDocStat &rCurrCnt, const SwDocStat &rDocStat);
64 : };
65 :
66 0 : class SwWordCountWrapper : public SfxChildWindow
67 : {
68 : AbstractSwWordCountFloatDlg* pAbstDlg;
69 : protected:
70 : SwWordCountWrapper( vcl::Window *pParentWindow,
71 : sal_uInt16 nId,
72 : SfxBindings* pBindings,
73 : SfxChildWinInfo* pInfo );
74 :
75 : SFX_DECL_CHILDWINDOW_WITHID(SwWordCountWrapper);
76 :
77 : public:
78 : void UpdateCounts();
79 : void SetCounts(const SwDocStat &rCurrCnt, const SwDocStat &rDocStat);
80 : };
81 :
82 : #endif
83 :
84 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|