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: tpstat.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 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_sc.hxx"
34 #undef SC_DLLIMPLEMENTATION
38 #include "document.hxx"
40 #include "scresid.hxx"
46 //========================================================================
47 // Dokumentinfo-Tabpage:
48 //========================================================================
50 SfxTabPage
* __EXPORT
ScDocStatPage::Create( Window
*pParent
, const SfxItemSet
& rSet
)
52 return new ScDocStatPage( pParent
, rSet
);
55 //------------------------------------------------------------------------
57 ScDocStatPage::ScDocStatPage( Window
*pParent
, const SfxItemSet
& rSet
)
58 : SfxTabPage( pParent
, ScResId(RID_SCPAGE_STAT
), rSet
),
59 aFlInfo ( this, ScResId( FL_INFO
) ),
60 aFtTablesLbl ( this, ScResId( FT_TABLES_LBL
) ),
61 aFtTables ( this, ScResId( FT_TABLES
) ),
62 aFtCellsLbl ( this, ScResId( FT_CELLS_LBL
) ),
63 aFtCells ( this, ScResId( FT_CELLS
) ),
64 aFtPagesLbl ( this, ScResId( FT_PAGES_LBL
) ),
65 aFtPages ( this, ScResId( FT_PAGES
) )
67 ScDocShell
* pDocSh
= PTR_CAST( ScDocShell
, SfxObjectShell::Current() );
71 pDocSh
->GetDocStat( aDocStat
);
73 String aInfo
= aFlInfo
.GetText();
74 aInfo
+= aDocStat
.aDocName
;
75 aFlInfo
.SetText( aInfo
);
76 aFtTables
.SetText( String::CreateFromInt32( aDocStat
.nTableCount
) );
77 aFtCells
.SetText( String::CreateFromInt32( aDocStat
.nCellCount
) );
78 aFtPages
.SetText( String::CreateFromInt32( aDocStat
.nPageCount
) );
83 //------------------------------------------------------------------------
85 __EXPORT
ScDocStatPage::~ScDocStatPage()
89 //------------------------------------------------------------------------
91 BOOL __EXPORT
ScDocStatPage::FillItemSet( SfxItemSet
& /* rSet */ )
96 //------------------------------------------------------------------------
98 void __EXPORT
ScDocStatPage::Reset( const SfxItemSet
& /* rSet */ )