1*b0724fc6SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*b0724fc6SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*b0724fc6SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*b0724fc6SAndrew Rist  * distributed with this work for additional information
6*b0724fc6SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*b0724fc6SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*b0724fc6SAndrew Rist  * "License"); you may not use this file except in compliance
9*b0724fc6SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*b0724fc6SAndrew Rist  *
11*b0724fc6SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*b0724fc6SAndrew Rist  *
13*b0724fc6SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*b0724fc6SAndrew Rist  * software distributed under the License is distributed on an
15*b0724fc6SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b0724fc6SAndrew Rist  * KIND, either express or implied.  See the License for the
17*b0724fc6SAndrew Rist  * specific language governing permissions and limitations
18*b0724fc6SAndrew Rist  * under the License.
19*b0724fc6SAndrew Rist  *
20*b0724fc6SAndrew Rist  *************************************************************/
21*b0724fc6SAndrew Rist 
22*b0724fc6SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #if !TEST_LAYOUT
25cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
26cdf0e10cSrcweir #include "precompiled_sw.hxx"
27cdf0e10cSrcweir #ifdef SW_DLLIMPLEMENTATION
28cdf0e10cSrcweir #undef SW_DLLIMPLEMENTATION
29cdf0e10cSrcweir #endif
30cdf0e10cSrcweir #include <swtypes.hxx>
31cdf0e10cSrcweir #endif /* !TEST_LAYOUT */
32cdf0e10cSrcweir #include <wordcountdialog.hxx>
33cdf0e10cSrcweir #if !TEST_LAYOUT
34cdf0e10cSrcweir #include <docstat.hxx>
35cdf0e10cSrcweir 
36cdf0e10cSrcweir #include <dialog.hrc>
37cdf0e10cSrcweir #endif /* !TEST_LAYOUT */
38cdf0e10cSrcweir #include <layout/layout-pre.hxx>
39cdf0e10cSrcweir #if !TEST_LAYOUT
40cdf0e10cSrcweir #include <wordcountdialog.hrc>
41cdf0e10cSrcweir #endif /* !TEST_LAYOUT */
42cdf0e10cSrcweir 
43cdf0e10cSrcweir #if ENABLE_LAYOUT
44cdf0e10cSrcweir #undef SW_RES
45cdf0e10cSrcweir #define SW_RES(x) #x
46cdf0e10cSrcweir #undef SfxModalDialog
47cdf0e10cSrcweir #define SfxModalDialog( parent, id ) Dialog( parent, "wordcount.xml", id )
48cdf0e10cSrcweir #define SW_WORDCOUNTDIALOG_HRC
49cdf0e10cSrcweir #include <helpid.h>
50cdf0e10cSrcweir #endif /* ENABLE_LAYOUT */
51cdf0e10cSrcweir 
52cdf0e10cSrcweir /*-- 06.04.2004 16:05:55---------------------------------------------------
53cdf0e10cSrcweir 
54cdf0e10cSrcweir   -----------------------------------------------------------------------*/
SwWordCountDialog(Window * pParent)55cdf0e10cSrcweir SwWordCountDialog::SwWordCountDialog(Window* pParent) :
56cdf0e10cSrcweir     SfxModalDialog(pParent, SW_RES(DLG_WORDCOUNT)),
57cdf0e10cSrcweir #if defined _MSC_VER
58cdf0e10cSrcweir #pragma warning (disable : 4355)
59cdf0e10cSrcweir #endif
60cdf0e10cSrcweir     aCurrentFL( this, SW_RES(              FL_CURRENT            )),
61cdf0e10cSrcweir     aCurrentWordFT( this, SW_RES(          FT_CURRENTWORD        )),
62cdf0e10cSrcweir     aCurrentWordFI( this, SW_RES(          FI_CURRENTWORD        )),
63cdf0e10cSrcweir     aCurrentCharacterFT( this, SW_RES(     FT_CURRENTCHARACTER   )),
64cdf0e10cSrcweir     aCurrentCharacterFI( this, SW_RES(     FI_CURRENTCHARACTER   )),
65cdf0e10cSrcweir 
66cdf0e10cSrcweir     aDocFL( this, SW_RES(                  FL_DOC                )),
67cdf0e10cSrcweir     aDocWordFT( this, SW_RES(              FT_DOCWORD            )),
68cdf0e10cSrcweir     aDocWordFI( this, SW_RES(              FI_DOCWORD            )),
69cdf0e10cSrcweir     aDocCharacterFT( this, SW_RES(         FT_DOCCHARACTER       )),
70cdf0e10cSrcweir     aDocCharacterFI( this, SW_RES(         FI_DOCCHARACTER       )),
71cdf0e10cSrcweir     aBottomFL(this, SW_RES(                FL_BOTTOM             )),
72cdf0e10cSrcweir     aOK( this, SW_RES(                     PB_OK                 )),
73cdf0e10cSrcweir     aHelp( this, SW_RES(                   PB_HELP               ))
74cdf0e10cSrcweir #if defined _MSC_VER
75cdf0e10cSrcweir #pragma warning (default : 4355)
76cdf0e10cSrcweir #endif
77cdf0e10cSrcweir {
78cdf0e10cSrcweir #if ENABLE_LAYOUT
79cdf0e10cSrcweir     SetHelpId (HID_DLG_WORDCOUNT);
80cdf0e10cSrcweir #endif /* ENABLE_LAYOUT */
81cdf0e10cSrcweir     FreeResource();
82cdf0e10cSrcweir }
83cdf0e10cSrcweir /*-- 06.04.2004 16:05:56---------------------------------------------------
84cdf0e10cSrcweir 
85cdf0e10cSrcweir   -----------------------------------------------------------------------*/
~SwWordCountDialog()86cdf0e10cSrcweir SwWordCountDialog::~SwWordCountDialog()
87cdf0e10cSrcweir {
88cdf0e10cSrcweir }
89cdf0e10cSrcweir /*-- 06.04.2004 16:05:57---------------------------------------------------
90cdf0e10cSrcweir 
91cdf0e10cSrcweir   -----------------------------------------------------------------------*/
SetValues(const SwDocStat & rCurrent,const SwDocStat & rDoc)92cdf0e10cSrcweir void  SwWordCountDialog::SetValues(const SwDocStat& rCurrent, const SwDocStat& rDoc)
93cdf0e10cSrcweir {
94cdf0e10cSrcweir #if TEST_LAYOUT
95cdf0e10cSrcweir     (void) rCurrent;
96cdf0e10cSrcweir     (void) rDoc;
97cdf0e10cSrcweir #else /* !TEST_LAYOUT */
98cdf0e10cSrcweir     aCurrentWordFI.SetText(     String::CreateFromInt32(rCurrent.nWord ));
99cdf0e10cSrcweir     aCurrentCharacterFI.SetText(String::CreateFromInt32(rCurrent.nChar ));
100cdf0e10cSrcweir     aDocWordFI.SetText(         String::CreateFromInt32(rDoc.nWord ));
101cdf0e10cSrcweir     aDocCharacterFI.SetText(    String::CreateFromInt32(rDoc.nChar ));
102cdf0e10cSrcweir #endif /* !TEST_LAYOUT */
103cdf0e10cSrcweir }
104cdf0e10cSrcweir 
105cdf0e10cSrcweir 
106cdf0e10cSrcweir 
107