1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
29 // MARKER(update_precomp.py): autogen include statement, do not remove
30 #include "precompiled_sw.hxx"
31 #ifdef SW_DLLIMPLEMENTATION
32 #undef SW_DLLIMPLEMENTATION
34 #include <swtypes.hxx>
35 #endif /* !TEST_LAYOUT */
36 #include <wordcountdialog.hxx>
38 #include <docstat.hxx>
41 #endif /* !TEST_LAYOUT */
42 #include <layout/layout-pre.hxx>
44 #include <wordcountdialog.hrc>
45 #endif /* !TEST_LAYOUT */
51 #define SfxModalDialog( parent, id ) Dialog( parent, "wordcount.xml", id )
52 #define SW_WORDCOUNTDIALOG_HRC
54 #endif /* ENABLE_LAYOUT */
56 /*-- 06.04.2004 16:05:55---------------------------------------------------
58 -----------------------------------------------------------------------*/
59 SwWordCountDialog::SwWordCountDialog(Window
* pParent
) :
60 SfxModalDialog(pParent
, SW_RES(DLG_WORDCOUNT
)),
62 #pragma warning (disable : 4355)
64 aCurrentFL( this, SW_RES( FL_CURRENT
)),
65 aCurrentWordFT( this, SW_RES( FT_CURRENTWORD
)),
66 aCurrentWordFI( this, SW_RES( FI_CURRENTWORD
)),
67 aCurrentCharacterFT( this, SW_RES( FT_CURRENTCHARACTER
)),
68 aCurrentCharacterFI( this, SW_RES( FI_CURRENTCHARACTER
)),
70 aDocFL( this, SW_RES( FL_DOC
)),
71 aDocWordFT( this, SW_RES( FT_DOCWORD
)),
72 aDocWordFI( this, SW_RES( FI_DOCWORD
)),
73 aDocCharacterFT( this, SW_RES( FT_DOCCHARACTER
)),
74 aDocCharacterFI( this, SW_RES( FI_DOCCHARACTER
)),
75 aBottomFL(this, SW_RES( FL_BOTTOM
)),
76 aOK( this, SW_RES( PB_OK
)),
77 aHelp( this, SW_RES( PB_HELP
))
79 #pragma warning (default : 4355)
83 SetHelpId (HID_DLG_WORDCOUNT
);
84 #endif /* ENABLE_LAYOUT */
87 /*-- 06.04.2004 16:05:56---------------------------------------------------
89 -----------------------------------------------------------------------*/
90 SwWordCountDialog::~SwWordCountDialog()
93 /*-- 06.04.2004 16:05:57---------------------------------------------------
95 -----------------------------------------------------------------------*/
96 void SwWordCountDialog::SetValues(const SwDocStat
& rCurrent
, const SwDocStat
& rDoc
)
101 #else /* !TEST_LAYOUT */
102 aCurrentWordFI
.SetText( String::CreateFromInt32(rCurrent
.nWord
));
103 aCurrentCharacterFI
.SetText(String::CreateFromInt32(rCurrent
.nChar
));
104 aDocWordFI
.SetText( String::CreateFromInt32(rDoc
.nWord
));
105 aDocCharacterFI
.SetText( String::CreateFromInt32(rDoc
.nChar
));
106 #endif /* !TEST_LAYOUT */