Kaydet (Commit) 2ef24913 authored tarafından abdulmajeed ahmed's avatar abdulmajeed ahmed

Convert statistics tab page for calc to .ui

Change-Id: I950cf893875ec75668e17bd20bbe19369c132184
üst 087a610f
...@@ -59,7 +59,6 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\ ...@@ -59,7 +59,6 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\
sc/source/ui/src/xmlsourcedlg.src \ sc/source/ui/src/xmlsourcedlg.src \
sc/source/ui/cctrl/checklistmenu.src \ sc/source/ui/cctrl/checklistmenu.src \
sc/source/ui/navipi/navipi.src \ sc/source/ui/navipi/navipi.src \
sc/source/ui/docshell/tpstat.src \
sc/source/ui/pagedlg/pagedlg.src \ sc/source/ui/pagedlg/pagedlg.src \
sc/source/ui/styleui/scstyles.src \ sc/source/ui/styleui/scstyles.src \
sc/source/ui/styleui/styledlg.src \ sc/source/ui/styleui/styledlg.src \
......
...@@ -119,6 +119,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\ ...@@ -119,6 +119,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/sortoptionspage \ sc/uiconfig/scalc/ui/sortoptionspage \
sc/uiconfig/scalc/ui/sortwarning \ sc/uiconfig/scalc/ui/sortwarning \
sc/uiconfig/scalc/ui/subtotaloptionspage \ sc/uiconfig/scalc/ui/subtotaloptionspage \
sc/uiconfig/scalc/ui/statisticsinfopage \
sc/uiconfig/scalc/ui/textimportoptions \ sc/uiconfig/scalc/ui/textimportoptions \
sc/uiconfig/scalc/ui/textimportcsv \ sc/uiconfig/scalc/ui/textimportcsv \
sc/uiconfig/scalc/ui/tpviewpage \ sc/uiconfig/scalc/ui/tpviewpage \
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include "document.hxx" #include "document.hxx"
#include "docsh.hxx" #include "docsh.hxx"
#include "scresid.hxx" #include "scresid.hxx"
#include "tpstat.hrc"
#include "tpstat.hxx" #include "tpstat.hxx"
...@@ -42,29 +41,25 @@ SfxTabPage* ScDocStatPage::Create( Window *pParent, const SfxItemSet& rSet ) ...@@ -42,29 +41,25 @@ SfxTabPage* ScDocStatPage::Create( Window *pParent, const SfxItemSet& rSet )
//------------------------------------------------------------------------ //------------------------------------------------------------------------
ScDocStatPage::ScDocStatPage( Window *pParent, const SfxItemSet& rSet ) ScDocStatPage::ScDocStatPage( Window *pParent, const SfxItemSet& rSet )
: SfxTabPage( pParent, ScResId(RID_SCPAGE_STAT), rSet ), : SfxTabPage( pParent, "StatisticsInfopage", "modules/scalc/ui/statisticsinfopage.ui", rSet )
aFlInfo ( this, ScResId( FL_INFO ) ),
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 ) ),
aFtPages ( this, ScResId( FT_PAGES ) )
{ {
get(m_pFlInfo,"document");
get(m_pFtTables,"nosheets");
get(m_pFtCells,"nocells");
get(m_pFtPages,"nopages");
ScDocShell* pDocSh = PTR_CAST( ScDocShell, SfxObjectShell::Current() ); ScDocShell* pDocSh = PTR_CAST( ScDocShell, SfxObjectShell::Current() );
ScDocStat aDocStat; ScDocStat aDocStat;
if ( pDocSh ) if ( pDocSh )
pDocSh->GetDocStat( aDocStat ); pDocSh->GetDocStat( aDocStat );
String aInfo = aFlInfo.GetText(); String aInfo = m_pFlInfo->GetText();
aInfo += aDocStat.aDocName; aInfo += aDocStat.aDocName;
aFlInfo .SetText( aInfo ); m_pFlInfo ->SetText( aInfo );
aFtTables .SetText( OUString::number( aDocStat.nTableCount ) ); m_pFtTables ->SetText( OUString::number( aDocStat.nTableCount ) );
aFtCells .SetText( OUString::number( aDocStat.nCellCount ) ); m_pFtCells ->SetText( OUString::number( aDocStat.nCellCount ) );
aFtPages .SetText( OUString::number( aDocStat.nPageCount ) ); m_pFtPages ->SetText( OUString::number( aDocStat.nPageCount ) );
FreeResource();
} }
//------------------------------------------------------------------------ //------------------------------------------------------------------------
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "sc.hrc"
#define FT_TABLES 1
#define FT_TABLES_LBL 2
#define FT_CELLS 3
#define FT_CELLS_LBL 4
#define FT_PAGES 5
#define FT_PAGES_LBL 6
#define FL_INFO 1
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "tpstat.hrc"
TabPage RID_SCPAGE_STAT
{
// HelpID = HID_DOC_STAT;
Hide = TRUE ;
Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
FixedText FT_TABLES_LBL
{
Pos = MAP_APPFONT ( 12 , 17 ) ;
Size = MAP_APPFONT ( 90 , 8 ) ;
Text [ en-US ] = "Number of sheets:" ;
Left = TRUE ;
};
FixedText FT_TABLES
{
Pos = MAP_APPFONT ( 108 , 17 ) ;
Size = MAP_APPFONT ( 27 , 8 ) ;
Left = TRUE ;
};
FixedText FT_CELLS_LBL
{
Pos = MAP_APPFONT ( 12 , 29 ) ;
Size = MAP_APPFONT ( 90 , 8 ) ;
Text [ en-US ] = "Number of cells:" ;
Left = TRUE ;
};
FixedText FT_CELLS
{
Pos = MAP_APPFONT ( 108 , 29 ) ;
Size = MAP_APPFONT ( 27 , 8 ) ;
Left = TRUE ;
};
FixedText FT_PAGES_LBL
{
Pos = MAP_APPFONT ( 12 , 41 ) ;
Size = MAP_APPFONT ( 90 , 8 ) ;
Text [ en-US ] = "Number of pages:" ;
Left = TRUE ;
};
FixedText FT_PAGES
{
Pos = MAP_APPFONT ( 108 , 41 ) ;
Size = MAP_APPFONT ( 27 , 8 ) ;
Left = TRUE ;
};
FixedLine FL_INFO
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text [ en-US ] = "Document: " ;
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -43,13 +43,10 @@ protected: ...@@ -43,13 +43,10 @@ protected:
virtual void Reset ( const SfxItemSet& rSet ); virtual void Reset ( const SfxItemSet& rSet );
private: private:
FixedLine aFlInfo; FixedText* m_pFlInfo;
FixedText aFtTablesLbl; FixedText* m_pFtTables;
FixedInfo aFtTables; FixedText* m_pFtCells;
FixedText aFtCellsLbl; FixedText* m_pFtPages;
FixedInfo aFtCells;
FixedText aFtPagesLbl;
FixedInfo aFtPages;
}; };
......
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkFrame" id="StatisticsInfopage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="StatisticsInfoPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="row_spacing">12</property>
<property name="column_spacing">18</property>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Document:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">document</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="document">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="width_chars">10</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Number of Pages:</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="nopages">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="width_chars">10</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">3</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Number of Cells:</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="nocells">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="width_chars">10</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Number of Sheets:</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="nosheets">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="use_underline">True</property>
<property name="width_chars">10</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
</interface>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment