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