diff options
author | abdulmajeed ahmed <aalabdulrazzaq@kacst.edu.sa> | 2013-08-05 03:13:54 +0300 |
---|---|---|
committer | abdulmajeed ahmed <aalabdulrazzaq@kacst.edu.sa> | 2013-08-05 03:37:19 +0300 |
commit | 2ef249134e8696a15d2caf2eab5f2e5e211e01a7 (patch) | |
tree | 0dcc26df2502f4b44e7c45af049e79219f289bd0 /sc | |
parent | 087a610fcd5c0c354a9ed6bfccd3451b667d62a3 (diff) |
Convert statistics tab page for calc to .ui
Change-Id: I950cf893875ec75668e17bd20bbe19369c132184
Diffstat (limited to 'sc')
-rw-r--r-- | sc/AllLangResTarget_sc.mk | 1 | ||||
-rw-r--r-- | sc/UIConfig_scalc.mk | 1 | ||||
-rw-r--r-- | sc/source/ui/docshell/tpstat.cxx | 25 | ||||
-rw-r--r-- | sc/source/ui/docshell/tpstat.hrc | 30 | ||||
-rw-r--r-- | sc/source/ui/docshell/tpstat.src | 73 | ||||
-rw-r--r-- | sc/source/ui/inc/tpstat.hxx | 11 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/statisticsinfopage.ui | 156 |
7 files changed, 171 insertions, 126 deletions
diff --git a/sc/AllLangResTarget_sc.mk b/sc/AllLangResTarget_sc.mk index 5f43eb35ab05..55ad9d2727b6 100644 --- a/sc/AllLangResTarget_sc.mk +++ b/sc/AllLangResTarget_sc.mk @@ -59,7 +59,6 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\ sc/source/ui/src/xmlsourcedlg.src \ sc/source/ui/cctrl/checklistmenu.src \ sc/source/ui/navipi/navipi.src \ - sc/source/ui/docshell/tpstat.src \ sc/source/ui/pagedlg/pagedlg.src \ sc/source/ui/styleui/scstyles.src \ sc/source/ui/styleui/styledlg.src \ diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk index f180a53873c3..43dee8422468 100644 --- a/sc/UIConfig_scalc.mk +++ b/sc/UIConfig_scalc.mk @@ -119,6 +119,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\ sc/uiconfig/scalc/ui/sortoptionspage \ sc/uiconfig/scalc/ui/sortwarning \ sc/uiconfig/scalc/ui/subtotaloptionspage \ + sc/uiconfig/scalc/ui/statisticsinfopage \ sc/uiconfig/scalc/ui/textimportoptions \ sc/uiconfig/scalc/ui/textimportcsv \ sc/uiconfig/scalc/ui/tpviewpage \ diff --git a/sc/source/ui/docshell/tpstat.cxx b/sc/source/ui/docshell/tpstat.cxx index 86f73fb712dc..af7b636ae5f2 100644 --- a/sc/source/ui/docshell/tpstat.cxx +++ b/sc/source/ui/docshell/tpstat.cxx @@ -25,7 +25,6 @@ #include "document.hxx" #include "docsh.hxx" #include "scresid.hxx" -#include "tpstat.hrc" #include "tpstat.hxx" @@ -42,29 +41,25 @@ SfxTabPage* ScDocStatPage::Create( Window *pParent, const SfxItemSet& rSet ) //------------------------------------------------------------------------ ScDocStatPage::ScDocStatPage( Window *pParent, const SfxItemSet& rSet ) - : SfxTabPage( pParent, ScResId(RID_SCPAGE_STAT), 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 ) ) + : SfxTabPage( pParent, "StatisticsInfopage", "modules/scalc/ui/statisticsinfopage.ui", rSet ) { + get(m_pFlInfo,"document"); + get(m_pFtTables,"nosheets"); + get(m_pFtCells,"nocells"); + get(m_pFtPages,"nopages"); ScDocShell* pDocSh = PTR_CAST( ScDocShell, SfxObjectShell::Current() ); ScDocStat aDocStat; if ( pDocSh ) pDocSh->GetDocStat( aDocStat ); - String aInfo = aFlInfo.GetText(); + String aInfo = m_pFlInfo->GetText(); aInfo += aDocStat.aDocName; - aFlInfo .SetText( aInfo ); - aFtTables .SetText( OUString::number( aDocStat.nTableCount ) ); - aFtCells .SetText( OUString::number( aDocStat.nCellCount ) ); - aFtPages .SetText( OUString::number( aDocStat.nPageCount ) ); + m_pFlInfo ->SetText( aInfo ); + m_pFtTables ->SetText( OUString::number( aDocStat.nTableCount ) ); + m_pFtCells ->SetText( OUString::number( aDocStat.nCellCount ) ); + m_pFtPages ->SetText( OUString::number( aDocStat.nPageCount ) ); - FreeResource(); } //------------------------------------------------------------------------ diff --git a/sc/source/ui/docshell/tpstat.hrc b/sc/source/ui/docshell/tpstat.hrc deleted file mode 100644 index b5fd05fb5e8e..000000000000 --- a/sc/source/ui/docshell/tpstat.hrc +++ /dev/null @@ -1,30 +0,0 @@ -/* -*- 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: */ diff --git a/sc/source/ui/docshell/tpstat.src b/sc/source/ui/docshell/tpstat.src deleted file mode 100644 index 81a1b4ef78fc..000000000000 --- a/sc/source/ui/docshell/tpstat.src +++ /dev/null @@ -1,73 +0,0 @@ -/* -*- 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: */ diff --git a/sc/source/ui/inc/tpstat.hxx b/sc/source/ui/inc/tpstat.hxx index d90fab42c801..66a2ea26f984 100644 --- a/sc/source/ui/inc/tpstat.hxx +++ b/sc/source/ui/inc/tpstat.hxx @@ -43,13 +43,10 @@ protected: virtual void Reset ( const SfxItemSet& rSet ); private: - FixedLine aFlInfo; - FixedText aFtTablesLbl; - FixedInfo aFtTables; - FixedText aFtCellsLbl; - FixedInfo aFtCells; - FixedText aFtPagesLbl; - FixedInfo aFtPages; + FixedText* m_pFlInfo; + FixedText* m_pFtTables; + FixedText* m_pFtCells; + FixedText* m_pFtPages; }; diff --git a/sc/uiconfig/scalc/ui/statisticsinfopage.ui b/sc/uiconfig/scalc/ui/statisticsinfopage.ui new file mode 100644 index 000000000000..456ded42bed9 --- /dev/null +++ b/sc/uiconfig/scalc/ui/statisticsinfopage.ui @@ -0,0 +1,156 @@ +<?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> |