[Libreoffice-commits] core.git: 2 commits - sc/source sc/uiconfig sw/inc sw/source sw/uiconfig sw/UIConfig_swriter.mk

Caolán McNamara caolanm at redhat.com
Mon Aug 5 06:24:47 PDT 2013


 sc/source/ui/docshell/tpstat.cxx              |    8 -
 sc/source/ui/inc/tpstat.hxx                   |    1 
 sc/uiconfig/scalc/ui/statisticsinfopage.ui    |   49 +------
 sw/UIConfig_swriter.mk                        |    1 
 sw/inc/globals.hrc                            |    4 
 sw/inc/helpid.h                               |    1 
 sw/source/ui/dialog/regionsw.src              |   40 ------
 sw/source/ui/dialog/uiregionsw.cxx            |   28 ++--
 sw/source/ui/inc/regionsw.hxx                 |    6 
 sw/uiconfig/swriter/ui/formatsectiondialog.ui |  162 ++++++++++++++++++++++++++
 10 files changed, 196 insertions(+), 104 deletions(-)

New commits:
commit c22f9b16ae6ffcbad84ec6115533332250b846ec
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 5 15:23:17 2013 +0200

    munge filename prop back into frame title
    
    Change-Id: I7f541dca151b3e755f1e21de05ee29abd15daebb

diff --git a/sc/source/ui/docshell/tpstat.cxx b/sc/source/ui/docshell/tpstat.cxx
index af7b636..186defc 100644
--- a/sc/source/ui/docshell/tpstat.cxx
+++ b/sc/source/ui/docshell/tpstat.cxx
@@ -41,9 +41,8 @@ SfxTabPage* ScDocStatPage::Create( Window *pParent, const SfxItemSet& rSet )
 //------------------------------------------------------------------------
 
 ScDocStatPage::ScDocStatPage( Window *pParent, const SfxItemSet& rSet )
-    :   SfxTabPage( pParent, "StatisticsInfopage", "modules/scalc/ui/statisticsinfopage.ui", rSet )
+    :   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");
@@ -53,9 +52,10 @@ ScDocStatPage::ScDocStatPage( Window *pParent, const SfxItemSet& rSet )
     if ( pDocSh )
         pDocSh->GetDocStat( aDocStat );
 
-    String aInfo = m_pFlInfo->GetText();
+    VclFrame *pFrame = get<VclFrame>("StatisticsInfoPage");
+    String aInfo = pFrame->get_label();
     aInfo += aDocStat.aDocName;
-    m_pFlInfo     ->SetText( aInfo );
+    pFrame->set_label(aInfo);
     m_pFtTables   ->SetText( OUString::number( aDocStat.nTableCount ) );
     m_pFtCells    ->SetText( OUString::number( aDocStat.nCellCount ) );
     m_pFtPages    ->SetText( OUString::number( aDocStat.nPageCount ) );
diff --git a/sc/source/ui/inc/tpstat.hxx b/sc/source/ui/inc/tpstat.hxx
index 66a2ea2..081399a 100644
--- a/sc/source/ui/inc/tpstat.hxx
+++ b/sc/source/ui/inc/tpstat.hxx
@@ -43,7 +43,6 @@ protected:
     virtual void    Reset      ( const SfxItemSet& rSet );
 
 private:
-    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
index 3a273f2..14955b4 100644
--- a/sc/uiconfig/scalc/ui/statisticsinfopage.ui
+++ b/sc/uiconfig/scalc/ui/statisticsinfopage.ui
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
-  <object class="GtkFrame" id="StatisticsInfopage">
+  <object class="GtkFrame" id="StatisticsInfoPage">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
@@ -14,44 +14,12 @@
         <property name="top_padding">6</property>
         <property name="left_padding">12</property>
         <child>
-          <object class="GtkGrid" id="StatisticsInfoPage">
+          <object class="GtkGrid" id="grid1">
             <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>
@@ -62,7 +30,7 @@
               </object>
               <packing>
                 <property name="left_attach">0</property>
-                <property name="top_attach">3</property>
+                <property name="top_attach">2</property>
                 <property name="width">1</property>
                 <property name="height">1</property>
               </packing>
@@ -77,7 +45,7 @@
               </object>
               <packing>
                 <property name="left_attach">1</property>
-                <property name="top_attach">3</property>
+                <property name="top_attach">2</property>
                 <property name="width">1</property>
                 <property name="height">1</property>
               </packing>
@@ -93,7 +61,7 @@
               </object>
               <packing>
                 <property name="left_attach">0</property>
-                <property name="top_attach">2</property>
+                <property name="top_attach">1</property>
                 <property name="width">1</property>
                 <property name="height">1</property>
               </packing>
@@ -108,7 +76,7 @@
               </object>
               <packing>
                 <property name="left_attach">1</property>
-                <property name="top_attach">2</property>
+                <property name="top_attach">1</property>
                 <property name="width">1</property>
                 <property name="height">1</property>
               </packing>
@@ -124,7 +92,7 @@
               </object>
               <packing>
                 <property name="left_attach">0</property>
-                <property name="top_attach">1</property>
+                <property name="top_attach">0</property>
                 <property name="width">1</property>
                 <property name="height">1</property>
               </packing>
@@ -140,7 +108,7 @@
               </object>
               <packing>
                 <property name="left_attach">1</property>
-                <property name="top_attach">1</property>
+                <property name="top_attach">0</property>
                 <property name="width">1</property>
                 <property name="height">1</property>
               </packing>
@@ -153,6 +121,7 @@
       <object class="GtkLabel" id="label1">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
+        <property name="label" translatable="yes">Document: </property>
         <attributes>
           <attribute name="weight" value="bold"/>
         </attributes>
commit b989b2b5837145d5df15a686de3c845585d93307
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 5 14:50:14 2013 +0200

    convert format section dialog to .ui
    
    Change-Id: I126a4a03618060f8fe8dbe0f1a8caa6d7e891c73

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 4db60f5..6e2b96c 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -83,6 +83,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
 	sw/uiconfig/swriter/ui/editcategories \
 	sw/uiconfig/swriter/ui/editsectiondialog \
 	sw/uiconfig/swriter/ui/exchangedatabases \
+	sw/uiconfig/swriter/ui/formatsectiondialog \
 	sw/uiconfig/swriter/ui/formattablepage \
 	sw/uiconfig/swriter/ui/footendnotedialog \
 	sw/uiconfig/swriter/ui/footnotepage \
diff --git a/sw/inc/globals.hrc b/sw/inc/globals.hrc
index 8fbc97e..a68ef4e 100644
--- a/sw/inc/globals.hrc
+++ b/sw/inc/globals.hrc
@@ -190,8 +190,6 @@
 #define TP_OPTCAPTION_PAGE          (RC_GLOBALS_BEGIN +  78)
 #define DLG_SVXTEST_NUM_BULLET      (RC_GLOBALS_BEGIN +  79)
 
-#define DLG_SECTION_PROPERTIES      (RC_GLOBALS_BEGIN +  87)
-
 #define DLG_MULTI_TOX               (RC_GLOBALS_BEGIN +  89)
 #define TP_TOX_SELECT               (RC_GLOBALS_BEGIN +  90)
 #define TP_TOX_ENTRY                (RC_GLOBALS_BEGIN +  91)
@@ -200,12 +198,10 @@
 #define DLG_ADD_IDX_STYLES          (RC_GLOBALS_BEGIN +  94)
 #define TP_PRIVATE_DATA             (RC_GLOBALS_BEGIN +  95)
 #define TP_BUSINESS_DATA            (RC_GLOBALS_BEGIN +  96)
-#define TP_SECTION_FTNENDNOTES      (RC_GLOBALS_BEGIN +  97)
 #define TP_CHAR_POS                 (RC_GLOBALS_BEGIN +  98)
 #define TP_CHAR_TWOLN               (RC_GLOBALS_BEGIN +  99)
 #define TP_PARA_ASIAN               (RC_GLOBALS_BEGIN +  100)
 #define TP_TEXTGRID_PAGE            (RC_GLOBALS_BEGIN +  101)
-#define TP_SECTION_INDENTS          (RC_GLOBALS_BEGIN +  102)
 #define TP_OPTCOMPATIBILITY_PAGE    (RC_GLOBALS_BEGIN +  103)
 #define TP_MAILCONFIG               (RC_GLOBALS_BEGIN +  104)
 //maximum: RC_GLOBALS_BEGIN +  120
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index b1d8f7b..6127920 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -167,7 +167,6 @@
 #define HID_EDIT_FLD_REF                                        "SW_HID_EDIT_FLD_REF"
 #define HID_REDLINE_CTRL                                        "SW_HID_REDLINE_CTRL"
 #define HID_OPTCAPTION_PAGE                                     "SW_HID_OPTCAPTION_PAGE"
-#define HID_SECTION_PROPERTIES_DLG                              "SW_HID_SECTION_PROPERTIES_DLG"
 #define HID_TP_TOX_SELECT                                       "SW_HID_TP_TOX_SELECT"
 #define HID_TP_TOX_ENTRY                                        "SW_HID_TP_TOX_ENTRY"
 #define HID_TOX_STYLES_PAGE                                     "SW_HID_TOX_STYLES_PAGE"
diff --git a/sw/source/ui/dialog/regionsw.src b/sw/source/ui/dialog/regionsw.src
index e65cc6f..fa1e976 100644
--- a/sw/source/ui/dialog/regionsw.src
+++ b/sw/source/ui/dialog/regionsw.src
@@ -116,44 +116,4 @@ InfoBox REG_WRONG_PASSWD_REPEAT
     Message [ en-US ] = "The password has not been set." ;
 };
 
-TabDialog DLG_SECTION_PROPERTIES
-{
-    HelpId = HID_SECTION_PROPERTIES_DLG;
-    OutputSize = TRUE ;
-    SVLook = TRUE ;
-    Moveable = TRUE ;
-    TabControl 1
-    {
-        OutputSize = TRUE ;
-        PageList =
-        {
-            PageItem
-            {
-                Identifier = TP_COLUMN ;
-                PageResID = TP_COLUMN ;
-                Text [ en-US ] = "Columns" ;
-            };
-            PageItem
-            {
-                Identifier = TP_SECTION_INDENTS;
-                PageResID = TP_SECTION_INDENTS;
-                Text [ en-US ] = "Indents" ;
-            };
-            PageItem
-            {
-                Identifier = TP_BACKGROUND ;
-                PageResID = TP_BACKGROUND ;
-                Text [ en-US ] = "Background" ;
-            };
-            PageItem
-            {
-                Identifier = TP_SECTION_FTNENDNOTES ;
-                PageResID = TP_SECTION_FTNENDNOTES ;
-                Text [ en-US ] = "Footnotes/Endnotes";
-            };
-        };
-    };
-    Text [ en-US ] = "Options";
-};
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 225669a..3f5e438 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -2103,27 +2103,27 @@ IMPL_LINK( SwSectionFtnEndTabPage, FootEndHdl, CheckBox *, pBox )
 }
 
 SwSectionPropertyTabDialog::SwSectionPropertyTabDialog(
-    Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh) :
-    SfxTabDialog(pParent, SW_RES(DLG_SECTION_PROPERTIES), &rSet),
-    rWrtSh(rSh)
+    Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh)
+    : SfxTabDialog(pParent, "FormatSectionDialog",
+        "modules/swriter/ui/formatsectiondialog.ui", &rSet)
+    , rWrtSh(rSh)
 {
-    FreeResource();
     SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
     OSL_ENSURE(pFact, "Dialogdiet fail!");
-    AddTabPage(TP_COLUMN,   SwColumnPage::Create,    0);
-    AddTabPage(TP_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 );
-    AddTabPage(TP_SECTION_FTNENDNOTES, SwSectionFtnEndTabPage::Create, 0);
-    AddTabPage(TP_SECTION_INDENTS, SwSectionIndentTabPage::Create, 0);
+    m_nColumnPageId = AddTabPage("columns",   SwColumnPage::Create,    0);
+    m_nBackPageId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 );
+    m_nNotePageId = AddTabPage("notes", SwSectionFtnEndTabPage::Create, 0);
+    m_nIndentPage = AddTabPage("indents", SwSectionIndentTabPage::Create, 0);
 
     SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
     long nHtmlMode = rHtmlOpt.GetExportMode();
     bool bWeb = 0 != PTR_CAST( SwWebDocShell, rSh.GetView().GetDocShell() );
     if(bWeb)
     {
-        RemoveTabPage(TP_SECTION_FTNENDNOTES);
-        RemoveTabPage(TP_SECTION_INDENTS);
+        RemoveTabPage(m_nNotePageId);
+        RemoveTabPage(m_nIndentPage);
         if( HTML_CFG_NS40 != nHtmlMode && HTML_CFG_WRITER != nHtmlMode)
-            RemoveTabPage(TP_COLUMN);
+            RemoveTabPage(m_nColumnPageId);
     }
 }
 
@@ -2133,18 +2133,18 @@ SwSectionPropertyTabDialog::~SwSectionPropertyTabDialog()
 
 void SwSectionPropertyTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
 {
-    if( TP_BACKGROUND == nId  )
+    if (nId == m_nBackPageId)
     {
             SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
             aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, SVX_SHOW_SELECTOR));
             rPage.PageCreated(aSet);
     }
-    else if( TP_COLUMN == nId )
+    else if (nId == m_nColumnPageId)
     {
         ((SwColumnPage&)rPage).ShowBalance(sal_True);
         ((SwColumnPage&)rPage).SetInSection(sal_True);
     }
-    else if(TP_SECTION_INDENTS == nId)
+    else if (nId == m_nIndentPage)
         ((SwSectionIndentTabPage&)rPage).SetWrtShell(rWrtSh);
 }
 
diff --git a/sw/source/ui/inc/regionsw.hxx b/sw/source/ui/inc/regionsw.hxx
index b00ec02..5912f28 100644
--- a/sw/source/ui/inc/regionsw.hxx
+++ b/sw/source/ui/inc/regionsw.hxx
@@ -287,6 +287,12 @@ public:
 class SwSectionPropertyTabDialog : public SfxTabDialog
 {
     SwWrtShell& rWrtSh;
+
+    sal_uInt16 m_nColumnPageId;
+    sal_uInt16 m_nBackPageId;
+    sal_uInt16 m_nNotePageId;
+    sal_uInt16 m_nIndentPage;
+
 protected:
     virtual void    PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
 public:
diff --git a/sw/uiconfig/swriter/ui/formatsectiondialog.ui b/sw/uiconfig/swriter/ui/formatsectiondialog.ui
new file mode 100644
index 0000000..9631013
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/formatsectiondialog.ui
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkDialog" id="FormatSectionDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Options</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox1">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="ok">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_underline">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="help">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="reset">
+                <property name="label">gtk-revert-to-saved</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkNotebook" id="tabcontrol">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
+            <child>
+              <placeholder/>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="columns">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Columns</property>
+              </object>
+              <packing>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="indents">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Indents</property>
+              </object>
+              <packing>
+                <property name="position">1</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="background">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Background</property>
+              </object>
+              <packing>
+                <property name="position">2</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="notes">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Footnotes/Endnotes</property>
+              </object>
+              <packing>
+                <property name="position">3</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">ok</action-widget>
+      <action-widget response="0">cancel</action-widget>
+      <action-widget response="0">help</action-widget>
+      <action-widget response="0">reset</action-widget>
+    </action-widgets>
+  </object>
+</interface>


More information about the Libreoffice-commits mailing list