bump product version to 4.1.6.2
[LibreOffice.git] / sc / source / ui / docshell / tpstat.cxx
blob86f73fb712dcb7f2718117f1f5c5375675cedb35
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #undef SC_DLLIMPLEMENTATION
25 #include "document.hxx"
26 #include "docsh.hxx"
27 #include "scresid.hxx"
28 #include "tpstat.hrc"
30 #include "tpstat.hxx"
33 //========================================================================
34 // Dokumentinfo-Tabpage:
35 //========================================================================
37 SfxTabPage* ScDocStatPage::Create( Window *pParent, const SfxItemSet& rSet )
39 return new ScDocStatPage( pParent, rSet );
42 //------------------------------------------------------------------------
44 ScDocStatPage::ScDocStatPage( Window *pParent, const SfxItemSet& rSet )
45 : SfxTabPage( pParent, ScResId(RID_SCPAGE_STAT), rSet ),
46 aFlInfo ( this, ScResId( FL_INFO ) ),
47 aFtTablesLbl ( this, ScResId( FT_TABLES_LBL ) ),
48 aFtTables ( this, ScResId( FT_TABLES ) ),
49 aFtCellsLbl ( this, ScResId( FT_CELLS_LBL ) ),
50 aFtCells ( this, ScResId( FT_CELLS ) ),
51 aFtPagesLbl ( this, ScResId( FT_PAGES_LBL ) ),
52 aFtPages ( this, ScResId( FT_PAGES ) )
54 ScDocShell* pDocSh = PTR_CAST( ScDocShell, SfxObjectShell::Current() );
55 ScDocStat aDocStat;
57 if ( pDocSh )
58 pDocSh->GetDocStat( aDocStat );
60 String aInfo = aFlInfo.GetText();
61 aInfo += aDocStat.aDocName;
62 aFlInfo .SetText( aInfo );
63 aFtTables .SetText( OUString::number( aDocStat.nTableCount ) );
64 aFtCells .SetText( OUString::number( aDocStat.nCellCount ) );
65 aFtPages .SetText( OUString::number( aDocStat.nPageCount ) );
67 FreeResource();
70 //------------------------------------------------------------------------
72 ScDocStatPage::~ScDocStatPage()
76 //------------------------------------------------------------------------
78 sal_Bool ScDocStatPage::FillItemSet( SfxItemSet& /* rSet */ )
80 return false;
83 //------------------------------------------------------------------------
85 void ScDocStatPage::Reset( const SfxItemSet& /* rSet */ )
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */