[Libreoffice-commits] core.git: sc/AllLangResTarget_sc.mk sc/inc sc/source sc/uiconfig sc/UI_scalc.mk sfx2/inc sfx2/source

Caolán McNamara caolanm at redhat.com
Wed Apr 3 12:10:29 PDT 2013


 sc/AllLangResTarget_sc.mk                 |    1 
 sc/UI_scalc.mk                            |    1 
 sc/inc/sc.hrc                             |    1 
 sc/inc/scabstdlg.hxx                      |    3 
 sc/source/ui/attrdlg/attrdlg.cxx          |   63 +++-----
 sc/source/ui/attrdlg/scdlgfact.cxx        |   22 ---
 sc/source/ui/attrdlg/scdlgfact.hxx        |    3 
 sc/source/ui/attrdlg/tabpages.cxx         |    1 
 sc/source/ui/inc/attrdlg.hrc              |   31 ----
 sc/source/ui/inc/attrdlg.hxx              |    2 
 sc/source/ui/inc/tabvwsh.hxx              |    2 
 sc/source/ui/src/attrdlg.src              |   92 ------------
 sc/source/ui/view/cellsh3.cxx             |    3 
 sc/source/ui/view/formatsh.cxx            |    3 
 sc/source/ui/view/tabvwsha.cxx            |    8 -
 sc/uiconfig/scalc/ui/formatcellsdialog.ui |  217 ++++++++++++++++++++++++++++++
 sfx2/inc/sfx2/tabdlg.hxx                  |    1 
 sfx2/source/dialog/tabdlg.cxx             |    5 
 18 files changed, 262 insertions(+), 197 deletions(-)

New commits:
commit e61d41ea3510a9abf40f2cb6a7b8c6009d2513db
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Apr 3 16:53:57 2013 +0100

    convert calc format cells dialog to .ui format
    
    Change-Id: Ic134909f3e65bcb1aa440f60a156f293225d3edc

diff --git a/sc/AllLangResTarget_sc.mk b/sc/AllLangResTarget_sc.mk
index b58eba4..16529b2 100644
--- a/sc/AllLangResTarget_sc.mk
+++ b/sc/AllLangResTarget_sc.mk
@@ -77,7 +77,6 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\
     sc/source/ui/src/dbnamdlg.src \
     sc/source/ui/src/opredlin.src \
     sc/source/ui/src/sortdlg.src \
-    sc/source/ui/src/attrdlg.src \
     sc/source/ui/src/filter.src \
     sc/source/ui/src/colorformat.src \
     sc/source/ui/src/condformatdlg.src \
diff --git a/sc/UI_scalc.mk b/sc/UI_scalc.mk
index 46afc89..678bb46 100644
--- a/sc/UI_scalc.mk
+++ b/sc/UI_scalc.mk
@@ -12,6 +12,7 @@ $(eval $(call gb_UI_UI,modules/scalc))
 $(eval $(call gb_UI_add_uifiles,modules/scalc,\
 	sc/uiconfig/scalc/ui/cellprotectionpage \
 	sc/uiconfig/scalc/ui/definename \
+	sc/uiconfig/scalc/ui/formatcellsdialog \
 	sc/uiconfig/scalc/ui/insertname \
 	sc/uiconfig/scalc/ui/insertsheet \
 	sc/uiconfig/scalc/ui/printeroptions \
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 0044fc4..ad9ee12 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -946,7 +946,6 @@
 #define BMP_END                 (BMP_START + 100)
 
 #define SC_DIALOGS_START        (BMP_END)
-#define RID_SCDLG_ATTR          (SC_DIALOGS_START)
 #define RID_SCDLG_SORT          (SC_DIALOGS_START + 5)
 #define RID_SCPAGE_SORT_FIELDS  (SC_DIALOGS_START + 6)
 
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 1683d3d..8003cda 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -481,8 +481,7 @@ public:
 
     virtual SfxAbstractTabDialog * CreateScAttrDlg( SfxViewFrame*    pFrame, //add for ScAttrDlg
                                                     Window*          pParent,
-                                                    const SfxItemSet* pCellAttrs,
-                                                    int nId) = 0;
+                                                    const SfxItemSet* pCellAttrs ) = 0;
 
     virtual SfxAbstractTabDialog * CreateScHFEditDlg( SfxViewFrame*     pFrame, //add for ScHFEditDlg
                                                     Window*         pParent,
diff --git a/sc/source/ui/attrdlg/attrdlg.cxx b/sc/source/ui/attrdlg/attrdlg.cxx
index c3e570c..fcd0da3 100644
--- a/sc/source/ui/attrdlg/attrdlg.cxx
+++ b/sc/source/ui/attrdlg/attrdlg.cxx
@@ -31,7 +31,6 @@
 #include "tabpages.hxx"
 #include "attrdlg.hxx"
 #include "scresid.hxx"
-#include "attrdlg.hrc"
 #include <svx/svxdlg.hxx>
 #include <svx/dialogs.hrc>
 #include <svx/flagsdef.hxx>
@@ -40,41 +39,34 @@
 
 //==================================================================
 
-ScAttrDlg::ScAttrDlg( SfxViewFrame*     pFrameP,
-                      Window*           pParent,
-                      const SfxItemSet* pCellAttrs )
-
-    :   SfxTabDialog( pFrameP,
-                      pParent,
-                      ScResId( RID_SCDLG_ATTR ),
-                      pCellAttrs )
+ScAttrDlg::ScAttrDlg(SfxViewFrame* pFrameP, Window* pParent, const SfxItemSet* pCellAttrs)
+    : SfxTabDialog(pFrameP, pParent, "FormatCellsDialog", "modules/scalc/ui/formatcellsdialog.ui", pCellAttrs)
 {
     SvtCJKOptions aCJKOptions;
     SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
     OSL_ENSURE(pFact, "Dialogdiet fail!");
 
     OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ), "GetTabPageCreatorFunc fail!");
-    AddTabPage( TP_NUMBER, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ), 0 );
+    m_nNumberPageId = AddTabPage( "numbers", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ), 0 );
     OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageCreatorFunc fail!");
-    AddTabPage( TP_FONT, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), 0 );
+    m_nFontPageId = AddTabPage( "font", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), 0 );
     OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), "GetTabPageCreatorFunc fail!");
-    AddTabPage( TP_FONTEFF, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), 0 );
+    AddTabPage( "fonteffects", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), 0 );
     OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGNMENT ), "GetTabPageCreatorFunc fail!");
-    AddTabPage( TP_ALIGNMENT, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGNMENT ),    0 );
+    AddTabPage( "alignment", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGNMENT ),    0 );
 
     if ( aCJKOptions.IsAsianTypographyEnabled() )
     {
         OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), "GetTabPageCreatorFunc fail!");
-        AddTabPage( TP_ASIAN,   pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN),       0 );
+        AddTabPage( "asiantypography",   pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN),       0 );
     }
     else
-        RemoveTabPage( TP_ASIAN );
+        RemoveTabPage( "asiantypography" );
     OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
-    AddTabPage( TP_BORDER,      pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ),     0 );
+    AddTabPage( "borders",      pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ),     0 );
     OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!");
-    AddTabPage( TP_BACKGROUND,  pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 );
-    AddTabPage( TP_PROTECTION,  ScTabPageProtection::Create,    0 );
-    FreeResource();
+    AddTabPage( "background",  pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 );
+    AddTabPage( "cellprotection" ,  ScTabPageProtection::Create,    0 );
 }
 
 // -----------------------------------------------------------------------
@@ -89,28 +81,19 @@ void ScAttrDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage )
 {
     SfxObjectShell* pDocSh = SfxObjectShell::Current();
     SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
-    switch ( nPageId )
+    if (nPageId == m_nNumberPageId)
+    {
+        aSet.Put (SfxLinkItem( SID_LINK_TYPE, LINK( this, ScAttrDlg, OkHandler )));
+        rTabPage.PageCreated(aSet);
+    }
+    else if (nPageId == m_nFontPageId)
     {
-        case TP_NUMBER:
-        {
-            aSet.Put (SfxLinkItem( SID_LINK_TYPE, LINK( this, ScAttrDlg, OkHandler )));
-            rTabPage.PageCreated(aSet);
-        }
-        break;
-
-        case TP_FONT:
-        {
-            const SfxPoolItem* pInfoItem = pDocSh->GetItem( SID_ATTR_CHAR_FONTLIST );
-
-            OSL_ENSURE( pInfoItem, "FontListItem  not found :-(" );
-
-            aSet.Put (SvxFontListItem(((const SvxFontListItem*)pInfoItem)->GetFontList(), SID_ATTR_CHAR_FONTLIST ));
-            rTabPage.PageCreated(aSet);
-        }
-        break;
-
-        default:
-        break;
+        const SfxPoolItem* pInfoItem = pDocSh->GetItem( SID_ATTR_CHAR_FONTLIST );
+
+        OSL_ENSURE( pInfoItem, "FontListItem  not found :-(" );
+
+        aSet.Put (SvxFontListItem(((const SvxFontListItem*)pInfoItem)->GetFontList(), SID_ATTR_CHAR_FONTLIST ));
+        rTabPage.PageCreated(aSet);
     }
 }
 
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index ca1bfd4..e511c7b 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -1338,25 +1338,11 @@ AbstractScImportOptionsDlg * ScAbstractDialogFactory_Impl::CreateScImportOptions
 }
 
 
-SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScAttrDlg( SfxViewFrame*  pFrame,
-                                                                        Window*          pParent,
-                                                                        const SfxItemSet* pCellAttrs,
-                                                                        int nId)
+SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScAttrDlg(SfxViewFrame* pFrame,
+    Window* pParent, const SfxItemSet* pCellAttrs)
 {
-    SfxTabDialog* pDlg=NULL;
-    switch ( nId )
-    {
-        case RID_SCDLG_ATTR :
-            pDlg = new ScAttrDlg( pFrame, pParent, pCellAttrs );
-            break;
-        default:
-            break;
-    }
-
-    if ( pDlg )
-        return new ScAbstractTabDialog_Impl( pDlg );
-    return 0;
-
+    SfxTabDialog* pDlg = new ScAttrDlg(pFrame, pParent, pCellAttrs);
+    return new ScAbstractTabDialog_Impl(pDlg);
 }
 
 #undef SfxTabDialog
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index f0cca3d..5720c69 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -549,8 +549,7 @@ public:
                                                                     sal_Bool                    bImport = sal_True );
     virtual SfxAbstractTabDialog * CreateScAttrDlg( SfxViewFrame*    pFrame, //add for ScAttrDlg
                                                     Window*          pParent,
-                                                    const SfxItemSet* pCellAttrs,
-                                                    int nId);
+                                                    const SfxItemSet* pCellAttrs );
 
     virtual SfxAbstractTabDialog * CreateScHFEditDlg( SfxViewFrame*     pFrame, //add for ScHFEditDlg
                                                     Window*         pParent,
diff --git a/sc/source/ui/attrdlg/tabpages.cxx b/sc/source/ui/attrdlg/tabpages.cxx
index f16897a..94ecdc0 100644
--- a/sc/source/ui/attrdlg/tabpages.cxx
+++ b/sc/source/ui/attrdlg/tabpages.cxx
@@ -27,7 +27,6 @@
 #include "scresid.hxx"
 #include "sc.hrc"
 
-#include "attrdlg.hrc"
 #include "tabpages.hxx"
 
 // STATIC DATA -----------------------------------------------------------
diff --git a/sc/source/ui/inc/attrdlg.hrc b/sc/source/ui/inc/attrdlg.hrc
deleted file mode 100644
index c45f29d..0000000
--- a/sc/source/ui/inc/attrdlg.hrc
+++ /dev/null
@@ -1,31 +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"   // -> SC_DLG_ATTR
-
-#define TP_NUMBER       1
-#define TP_FONT         2
-#define TP_ALIGNMENT    3
-#define TP_BORDER       4
-#define TP_BACKGROUND   5
-#define TP_PROTECTION   6
-#define TP_FONTEFF      7
-#define TP_ASIAN        8
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/attrdlg.hxx b/sc/source/ui/inc/attrdlg.hxx
index 18a80a1..111190d 100644
--- a/sc/source/ui/inc/attrdlg.hxx
+++ b/sc/source/ui/inc/attrdlg.hxx
@@ -41,6 +41,8 @@ protected:
 
 private:
     DECL_LINK( OkHandler, void* ); // for closing by double clicking in TabPages
+    sal_uInt16 m_nNumberPageId;
+    sal_uInt16 m_nFontPageId;
 };
 
 #endif // SC_ATTRDLG_HXX
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 9ca9868..eb3550a 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -391,7 +391,7 @@ public:
 
     void    UpdateNumberFormatter   ( const SvxNumberInfoItem&  rInfoItem );
 
-    void    ExecuteCellFormatDlg    ( SfxRequest& rReq, sal_uInt16 nTabPage = 0xffff );
+    void    ExecuteCellFormatDlg    ( SfxRequest& rReq, const OString &rTabPage = OString());
 
     sal_Bool    GetFunction( String& rFuncStr, sal_uInt16 nErrCode = 0 );
 
diff --git a/sc/source/ui/src/attrdlg.src b/sc/source/ui/src/attrdlg.src
deleted file mode 100644
index c976106..0000000
--- a/sc/source/ui/src/attrdlg.src
+++ /dev/null
@@ -1,92 +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 <svx/dialogs.hrc>
-#include "attrdlg.hrc"
-
- //================================================
- // Attributdialog:
-
-TabDialog RID_SCDLG_ATTR
-{
-    OutputSize = TRUE ;
-    SVLook = TRUE ;
-    Size = MAP_APPFONT ( 280 , 165 ) ;
-    Text [ en-US ] = "Format Cells" ;
-    Moveable = TRUE ;
-    Closeable = FALSE ;
-    TabControl 1
-    {
-        OutputSize = TRUE ;
-        Pos = MAP_APPFONT ( 23 , 0 ) ;
-        Size = MAP_APPFONT ( 260 , 135 ) ;
-        PageList =
-        {
-            PageItem
-            {
-                Identifier = TP_NUMBER ;
-                PageResID = 256 ;
-                Text [ en-US ] = "Numbers" ;
-            };
-            PageItem
-            {
-                Identifier = TP_FONT ;
-                PageResID = 257 ;
-                Text [ en-US ] = "Font" ;
-            };
-            PageItem
-            {
-                Identifier = TP_FONTEFF ;
-                PageResID = 262 ;
-                Text [ en-US ] = "Font Effects";
-            };
-            PageItem
-            {
-                Identifier = TP_ALIGNMENT ;
-                PageResID = 258 ;
-                Text [ en-US ] = "Alignment" ;
-            };
-            PageItem
-            {
-                Identifier = TP_ASIAN ;
-                PageResID = 263 ;
-                Text [ en-US ] = "Asian Typography";
-            };
-            PageItem
-            {
-                Identifier = TP_BORDER ;
-                PageResID = 259 ;
-                Text [ en-US ] = "Borders" ;
-            };
-            PageItem
-            {
-                Identifier = TP_BACKGROUND ;
-                PageResID = 260 ;
-                Text [ en-US ] = "Background" ;
-            };
-            PageItem
-            {
-                Identifier = TP_PROTECTION ;
-                PageResID = 261 ;
-                Text [ en-US ] = "Cell Protection" ;
-            };
-        };
-    };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 4e40e4f..6a17bdd 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -37,7 +37,6 @@
 #include "autoform.hxx"
 #include "autofmt.hxx"
 #include "cellsh.hxx"
-#include "attrdlg.hrc"      // TP_ALIGNMENT
 #include "inputhdl.hxx"
 #include "editable.hxx"
 #include "markdata.hxx"
@@ -355,7 +354,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
             break;
 
         case SID_ENABLE_HYPHENATION:
-            pTabViewShell->ExecuteCellFormatDlg( rReq, TP_ALIGNMENT );
+            pTabViewShell->ExecuteCellFormatDlg(rReq, "alignment");
             break;
 
         case SID_OPENDLG_SOLVE:
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index d35c0f3..8a09081 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -61,7 +61,6 @@
 #include "docsh.hxx"
 #include "patattr.hxx"
 #include "scmod.hxx"
-#include "attrdlg.hrc"
 #include "stlpool.hxx"
 #include "stlsheet.hxx"
 #include "printfun.hxx"
@@ -1420,7 +1419,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
             case SID_ATTR_CHAR_COLOR:
             case SID_ATTR_CHAR_FONT:
             case SID_ATTR_CHAR_FONTHEIGHT:
-                pTabViewShell->ExecuteCellFormatDlg( rReq, TP_FONT );       // wenn ToolBar vertikal
+                pTabViewShell->ExecuteCellFormatDlg(rReq, "font");       // wenn ToolBar vertikal
                 break;
 
             case SID_BACKGROUND_COLOR:
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 20b3d39..e9a5e6b 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -466,7 +466,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
 }
 
 //------------------------------------------------------------------
-void ScTabViewShell::ExecuteCellFormatDlg( SfxRequest& rReq, sal_uInt16 nTabPage )
+void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& rReq, const OString &rName)
 {
     SfxAbstractTabDialog * pDlg = NULL;
     ScDocument*             pDoc    = GetViewData()->GetDocument();
@@ -516,10 +516,10 @@ void ScTabViewShell::ExecuteCellFormatDlg( SfxRequest& rReq, sal_uInt16 nTabPage
     ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
     OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
 
-    pDlg = pFact->CreateScAttrDlg( GetViewFrame(), GetDialogParent(), pOldSet, RID_SCDLG_ATTR);
+    pDlg = pFact->CreateScAttrDlg(GetViewFrame(), GetDialogParent(), pOldSet);
     OSL_ENSURE(pDlg, "Dialog create fail!");
-    if ( nTabPage != 0xffff )
-        pDlg->SetCurPageId( nTabPage );
+    if (!rName.isEmpty())
+        pDlg->SetCurPageId(rName);
     short nResult = pDlg->Execute();
     bInFormatDialog = false;
 
diff --git a/sc/uiconfig/scalc/ui/formatcellsdialog.ui b/sc/uiconfig/scalc/ui/formatcellsdialog.ui
new file mode 100644
index 0000000..4e6b57d
--- /dev/null
+++ b/sc/uiconfig/scalc/ui/formatcellsdialog.ui
@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkDialog" id="FormatCellsDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Format Cells</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_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">3</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">4</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="numbers">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Numbers</property>
+              </object>
+              <packing>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="font">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Font</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="fonteffects">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Font Effects</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="alignment">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Alignment</property>
+              </object>
+              <packing>
+                <property name="position">3</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="asiantypography">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Asian Typography</property>
+              </object>
+              <packing>
+                <property name="position">4</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="borders">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Borders</property>
+              </object>
+              <packing>
+                <property name="position">5</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">6</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="cellprotection">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Cell Protection</property>
+              </object>
+              <packing>
+                <property name="position">7</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>
diff --git a/sfx2/inc/sfx2/tabdlg.hxx b/sfx2/inc/sfx2/tabdlg.hxx
index e637187..435a415 100644
--- a/sfx2/inc/sfx2/tabdlg.hxx
+++ b/sfx2/inc/sfx2/tabdlg.hxx
@@ -183,6 +183,7 @@ public:
                                     sal_Bool bItemsOnDemand = sal_False,
                                     sal_uInt16 nPos = TAB_APPEND);
 
+    void                RemoveTabPage( const OString& rName ); // Name of the label for the page in the notebook .ui
     void                RemoveTabPage( sal_uInt16 nId );
 
     void                SetCurPageId(sal_uInt16 nId)
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 41b16d6..bec9cc1 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -987,6 +987,11 @@ void SfxTabDialog::RemoveTabPage( sal_uInt16 nId )
     }
 }
 
+void SfxTabDialog::RemoveTabPage(const OString &rName)
+{
+    RemoveTabPage(m_pTabCtrl->GetPageId(rName));
+}
+
 // -----------------------------------------------------------------------
 
 void SfxTabDialog::PageCreated


More information about the Libreoffice-commits mailing list