2000-09-18 16:07:07 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 21:17:26 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2008-04-10 21:17:26 +00:00
|
|
|
* Copyright 2008 by Sun Microsystems, Inc.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2008-04-10 21:17:26 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2008-04-10 21:17:26 +00:00
|
|
|
* $RCSfile: tpstat.cxx,v $
|
|
|
|
* $Revision: 1.7 $
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2008-04-10 21:17:26 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2008-04-10 21:17:26 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2008-04-10 21:17:26 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2008-04-10 21:17:26 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2006-07-21 12:46:19 +00:00
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_sc.hxx"
|
|
|
|
|
2004-08-23 08:32:50 +00:00
|
|
|
#undef SC_DLLIMPLEMENTATION
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
#include "document.hxx"
|
|
|
|
#include "docsh.hxx"
|
|
|
|
#include "scresid.hxx"
|
|
|
|
#include "tpstat.hrc"
|
|
|
|
|
|
|
|
#include "tpstat.hxx"
|
|
|
|
|
|
|
|
|
|
|
|
//========================================================================
|
|
|
|
// Dokumentinfo-Tabpage:
|
|
|
|
//========================================================================
|
|
|
|
|
|
|
|
SfxTabPage* __EXPORT ScDocStatPage::Create( Window *pParent, const SfxItemSet& rSet )
|
|
|
|
{
|
|
|
|
return new ScDocStatPage( pParent, rSet );
|
|
|
|
}
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------
|
|
|
|
|
|
|
|
ScDocStatPage::ScDocStatPage( Window *pParent, const SfxItemSet& rSet )
|
|
|
|
: SfxTabPage( pParent, ScResId(RID_SCPAGE_STAT), rSet ),
|
2007-02-27 12:10:06 +00:00
|
|
|
aFlInfo ( this, ScResId( FL_INFO ) ),
|
2000-09-18 16:07:07 +00:00
|
|
|
aFtTablesLbl ( this, ScResId( FT_TABLES_LBL ) ),
|
|
|
|
aFtTables ( this, ScResId( FT_TABLES ) ),
|
|
|
|
aFtCellsLbl ( this, ScResId( FT_CELLS_LBL ) ),
|
|
|
|
aFtCells ( this, ScResId( FT_CELLS ) ),
|
|
|
|
aFtPagesLbl ( this, ScResId( FT_PAGES_LBL ) ),
|
2007-02-27 12:10:06 +00:00
|
|
|
aFtPages ( this, ScResId( FT_PAGES ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
ScDocShell* pDocSh = PTR_CAST( ScDocShell, SfxObjectShell::Current() );
|
|
|
|
ScDocStat aDocStat;
|
|
|
|
|
|
|
|
if ( pDocSh )
|
|
|
|
pDocSh->GetDocStat( aDocStat );
|
|
|
|
|
2001-05-30 12:49:21 +00:00
|
|
|
String aInfo = aFlInfo.GetText();
|
2000-09-18 16:07:07 +00:00
|
|
|
aInfo += aDocStat.aDocName;
|
2001-05-30 12:49:21 +00:00
|
|
|
aFlInfo .SetText( aInfo );
|
2000-09-18 16:07:07 +00:00
|
|
|
aFtTables .SetText( String::CreateFromInt32( aDocStat.nTableCount ) );
|
|
|
|
aFtCells .SetText( String::CreateFromInt32( aDocStat.nCellCount ) );
|
|
|
|
aFtPages .SetText( String::CreateFromInt32( aDocStat.nPageCount ) );
|
|
|
|
|
|
|
|
FreeResource();
|
|
|
|
}
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------
|
|
|
|
|
|
|
|
__EXPORT ScDocStatPage::~ScDocStatPage()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------
|
|
|
|
|
2007-02-27 12:10:06 +00:00
|
|
|
BOOL __EXPORT ScDocStatPage::FillItemSet( SfxItemSet& /* rSet */ )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------
|
|
|
|
|
2007-02-27 12:10:06 +00:00
|
|
|
void __EXPORT ScDocStatPage::Reset( const SfxItemSet& /* rSet */ )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|