1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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"
27 #include "scresid.hxx"
32 //========================================================================
33 // Dokumentinfo-Tabpage:
34 //========================================================================
36 SfxTabPage
* ScDocStatPage::Create( Window
*pParent
, const SfxItemSet
& rSet
)
38 return new ScDocStatPage( pParent
, rSet
);
41 //------------------------------------------------------------------------
43 ScDocStatPage::ScDocStatPage( Window
*pParent
, const SfxItemSet
& rSet
)
44 : SfxTabPage( pParent
, "StatisticsInfoPage", "modules/scalc/ui/statisticsinfopage.ui", rSet
)
46 get(m_pFtTables
,"nosheets");
47 get(m_pFtCells
,"nocells");
48 get(m_pFtPages
,"nopages");
49 ScDocShell
* pDocSh
= PTR_CAST( ScDocShell
, SfxObjectShell::Current() );
53 pDocSh
->GetDocStat( aDocStat
);
55 VclFrame
*pFrame
= get
<VclFrame
>("StatisticsInfoPage");
56 OUString aInfo
= pFrame
->get_label();
57 aInfo
+= aDocStat
.aDocName
;
58 pFrame
->set_label(aInfo
);
59 m_pFtTables
->SetText( OUString::number( aDocStat
.nTableCount
) );
60 m_pFtCells
->SetText( OUString::number( aDocStat
.nCellCount
) );
61 m_pFtPages
->SetText( OUString::number( aDocStat
.nPageCount
) );
65 //------------------------------------------------------------------------
67 ScDocStatPage::~ScDocStatPage()
71 //------------------------------------------------------------------------
73 sal_Bool
ScDocStatPage::FillItemSet( SfxItemSet
& /* rSet */ )
78 //------------------------------------------------------------------------
80 void ScDocStatPage::Reset( const SfxItemSet
& /* rSet */ )
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */