Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : :
30 : : #undef SC_DLLIMPLEMENTATION
31 : :
32 : :
33 : :
34 : : #include "document.hxx"
35 : : #include "docsh.hxx"
36 : : #include "scresid.hxx"
37 : : #include "tpstat.hrc"
38 : :
39 : : #include "tpstat.hxx"
40 : :
41 : :
42 : : //========================================================================
43 : : // Dokumentinfo-Tabpage:
44 : : //========================================================================
45 : :
46 : 0 : SfxTabPage* ScDocStatPage::Create( Window *pParent, const SfxItemSet& rSet )
47 : : {
48 : 0 : return new ScDocStatPage( pParent, rSet );
49 : : }
50 : :
51 : : //------------------------------------------------------------------------
52 : :
53 : 0 : ScDocStatPage::ScDocStatPage( Window *pParent, const SfxItemSet& rSet )
54 : : : SfxTabPage( pParent, ScResId(RID_SCPAGE_STAT), rSet ),
55 : : aFlInfo ( this, ScResId( FL_INFO ) ),
56 : : aFtTablesLbl ( this, ScResId( FT_TABLES_LBL ) ),
57 : : aFtTables ( this, ScResId( FT_TABLES ) ),
58 : : aFtCellsLbl ( this, ScResId( FT_CELLS_LBL ) ),
59 : : aFtCells ( this, ScResId( FT_CELLS ) ),
60 : : aFtPagesLbl ( this, ScResId( FT_PAGES_LBL ) ),
61 : 0 : aFtPages ( this, ScResId( FT_PAGES ) )
62 : : {
63 : 0 : ScDocShell* pDocSh = PTR_CAST( ScDocShell, SfxObjectShell::Current() );
64 : 0 : ScDocStat aDocStat;
65 : :
66 : 0 : if ( pDocSh )
67 : 0 : pDocSh->GetDocStat( aDocStat );
68 : :
69 : 0 : String aInfo = aFlInfo.GetText();
70 : 0 : aInfo += aDocStat.aDocName;
71 : 0 : aFlInfo .SetText( aInfo );
72 : 0 : aFtTables .SetText( String::CreateFromInt32( aDocStat.nTableCount ) );
73 : 0 : aFtCells .SetText( String::CreateFromInt32( aDocStat.nCellCount ) );
74 : 0 : aFtPages .SetText( String::CreateFromInt32( aDocStat.nPageCount ) );
75 : :
76 : 0 : FreeResource();
77 : 0 : }
78 : :
79 : : //------------------------------------------------------------------------
80 : :
81 : 0 : ScDocStatPage::~ScDocStatPage()
82 : : {
83 : 0 : }
84 : :
85 : : //------------------------------------------------------------------------
86 : :
87 : 0 : sal_Bool ScDocStatPage::FillItemSet( SfxItemSet& /* rSet */ )
88 : : {
89 : 0 : return false;
90 : : }
91 : :
92 : : //------------------------------------------------------------------------
93 : :
94 : 0 : void ScDocStatPage::Reset( const SfxItemSet& /* rSet */ )
95 : : {
96 : 0 : }
97 : :
98 : :
99 : :
100 : :
101 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|