[Libreoffice-commits] core.git: sc/AllLangResTarget_sc.mk sc/source sc/uiconfig sc/UIConfig_scalc.mk

abdulmajeed ahmed aalabdulrazzaq at kacst.edu.sa
Sun Aug 4 17:38:46 PDT 2013


 sc/AllLangResTarget_sc.mk                  |    1 
 sc/UIConfig_scalc.mk                       |    1 
 sc/source/ui/docshell/tpstat.cxx           |   25 +---
 sc/source/ui/docshell/tpstat.hrc           |   30 -----
 sc/source/ui/docshell/tpstat.src           |   73 -------------
 sc/source/ui/inc/tpstat.hxx                |   11 --
 sc/uiconfig/scalc/ui/statisticsinfopage.ui |  156 +++++++++++++++++++++++++++++
 7 files changed, 171 insertions(+), 126 deletions(-)

New commits:
commit 2ef249134e8696a15d2caf2eab5f2e5e211e01a7
Author: abdulmajeed ahmed <aalabdulrazzaq at kacst.edu.sa>
Date:   Mon Aug 5 03:13:54 2013 +0300

    Convert statistics tab page for calc to .ui
    
    Change-Id: I950cf893875ec75668e17bd20bbe19369c132184

diff --git a/sc/AllLangResTarget_sc.mk b/sc/AllLangResTarget_sc.mk
index 5f43eb3..55ad9d2 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 f180a53..43dee84 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 86f73fb..af7b636 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 b5fd05f..0000000
--- 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 81a1b4e..0000000
--- 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 d90fab4..66a2ea2 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 0000000..456ded4
--- /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>


More information about the Libreoffice-commits mailing list