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

oger000 lodev at ogersoft.at
Wed Jul 24 08:35:46 PDT 2013


 sc/UIConfig_scalc.mk                  |    1 
 sc/inc/sc.hrc                         |    2 
 sc/inc/scabstdlg.hxx                  |    5 
 sc/source/ui/attrdlg/scdlgfact.cxx    |   20 -
 sc/source/ui/attrdlg/scdlgfact.hxx    |    5 
 sc/source/ui/inc/miscdlgs.hrc         |   13 -
 sc/source/ui/inc/mvtabdlg.hxx         |   22 --
 sc/source/ui/miscdlgs/mvtabdlg.cxx    |  162 +++++++--------
 sc/source/ui/src/miscdlgs.src         |  136 ------------
 sc/source/ui/view/tabvwshf.cxx        |    5 
 sc/uiconfig/scalc/ui/movecopysheet.ui |  363 ++++++++++++++++++++++++++++++++++
 11 files changed, 459 insertions(+), 275 deletions(-)

New commits:
commit c2a28a731f7068baf66f3ba9e4139e573d23d707
Author: oger000 <lodev at ogersoft.at>
Date:   Sun Jul 21 18:52:52 2013 +0200

    convert move table dialog to .ui format
    
    Help needed:
    I did not find a way to get the height of the warning area
    included in the automatic calculated dialog height. So it
    stays behind the action buttons if an error occurs.
    (I am new to glade)
    
    Code adaption should be complete - build and move-sheet-test ok.
    helpcontent2 is done and I will try to upload.
    
    Change-Id: Id987ac799b17787c35302890a95af2bd99456589
    Reviewed-on: https://gerrit.libreoffice.org/5006
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index 06588d8..208f97c 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/textimportcsv \
 	sc/uiconfig/scalc/ui/tpviewpage \
 	sc/uiconfig/scalc/ui/ungroupdialog \
+	sc/uiconfig/scalc/ui/movecopysheet \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index b552fa0..5b0ec00 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -981,7 +981,7 @@
 #define RID_SCDLG_INSCELL       (SC_DIALOGS_START + 12)
 
 #define RID_SCDLG_INSCONT       (SC_DIALOGS_START + 14)
-#define RID_SCDLG_MOVETAB       (SC_DIALOGS_START + 15)
+
 #define RID_SCDLG_STRINPUT      (SC_DIALOGS_START + 16)
 #define RID_SCDLG_MTRINPUT      (SC_DIALOGS_START + 17)
 #define RID_SCDLG_SELENTRY      (SC_DIALOGS_START + 18)
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index ce45799..a1966f5 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -416,9 +416,8 @@ public:
                                                                 long            nFirst    = 1,
                                                                 long          nLast     = 100 ) = 0;
 
-    virtual AbstractScMoveTableDlg * CreateScMoveTableDlg(  Window* pParent,  //add for ScMoveTableDlg
-                                                            const String& rDefault,
-                                                            int nId ) = 0;
+    virtual AbstractScMoveTableDlg * CreateScMoveTableDlg(Window * pParent,
+        const String& rDefault) = 0;
 
     virtual AbstractScNameCreateDlg * CreateScNameCreateDlg(Window * pParent,
         sal_uInt16 nFlags) = 0;
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index bc6db22..fe7dd50 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -958,23 +958,11 @@ AbstractScMetricInputDlg * ScAbstractDialogFactory_Impl::CreateScMetricInputDlg
 
 
 
-AbstractScMoveTableDlg * ScAbstractDialogFactory_Impl::CreateScMoveTableDlg(  Window* pParent,
-                                                                              const String& rDefault,
-                                                                              int nId )
+AbstractScMoveTableDlg * ScAbstractDialogFactory_Impl::CreateScMoveTableDlg(Window* pParent,
+    const String& rDefault)
 {
-    ScMoveTableDlg * pDlg=NULL;
-    switch ( nId )
-    {
-        case RID_SCDLG_MOVETAB :
-            pDlg = new ScMoveTableDlg( pParent, rDefault );
-            break;
-        default:
-            break;
-    }
-
-    if ( pDlg )
-        return new AbstractScMoveTableDlg_Impl( pDlg );
-    return 0;
+    ScMoveTableDlg * pDlg = new ScMoveTableDlg( pParent, rDefault );
+    return new AbstractScMoveTableDlg_Impl( pDlg );
 }
 
 AbstractScNameCreateDlg * ScAbstractDialogFactory_Impl::CreateScNameCreateDlg(Window * pParent, sal_uInt16 nFlags)
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 107c238..349d518 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -484,9 +484,8 @@ public:
                                                                 long            nFirst    = 1,
                                                                 long          nLast     = 100 );
 
-    virtual AbstractScMoveTableDlg * CreateScMoveTableDlg(  Window* pParent,  //add for ScMoveTableDlg
-                                                            const String& rDefault,
-                                                            int nId );
+    virtual AbstractScMoveTableDlg * CreateScMoveTableDlg(Window * pParent,
+        const String& rDefault);
 
     virtual AbstractScNameCreateDlg * CreateScNameCreateDlg(Window * pParent,
         sal_uInt16 nFlags);
diff --git a/sc/source/ui/inc/miscdlgs.hrc b/sc/source/ui/inc/miscdlgs.hrc
index c65428a..944c8ce17 100644
--- a/sc/source/ui/inc/miscdlgs.hrc
+++ b/sc/source/ui/inc/miscdlgs.hrc
@@ -64,19 +64,8 @@
 #define FL_SEP1         51
 #define FL_SEP2         52
 
-// Insert/Delete Sheet
-#define FT_DEST         1
-#define LB_DEST         2
-#define FT_INSERT       3
-#define LB_INSERT       4
-#define BTN_COPY        5
+// Insert/Delete/Move/Copy Sheet
 #define STR_NEWDOC      6
-#define BTN_MOVE        7
-#define FL_ACTION       8
-#define FL_LOCATION     9
-#define FL_NAME         11
-#define FT_TABNAME      12
-#define FT_TABNAME_WARN 13
 #define STR_CURRENTDOC  14
 #define STR_TABNAME_WARN_USED    15
 #define STR_TABNAME_WARN_EMPTY   16
diff --git a/sc/source/ui/inc/mvtabdlg.hxx b/sc/source/ui/inc/mvtabdlg.hxx
index 42db627..4b5fa64 100644
--- a/sc/source/ui/inc/mvtabdlg.hxx
+++ b/sc/source/ui/inc/mvtabdlg.hxx
@@ -52,21 +52,13 @@ private:
     bool IsCurrentDocSelected() const;
 
 private:
-    FixedLine       aFlAction;
-    RadioButton     aBtnMove;
-    RadioButton     aBtnCopy;
-    FixedLine       aFlLocation;
-    FixedText       aFtDoc;
-    ListBox         aLbDoc;
-    FixedText       aFtTable;
-    ListBox         aLbTable;
-    FixedLine       aFlName;
-    FixedText       aFtTabName;
-    Edit            aEdTabName;
-    FixedText       aFtWarn;
-    OKButton        aBtnOk;
-    CancelButton    aBtnCancel;
-    HelpButton      aBtnHelp;
+    RadioButton*     pBtnMove;
+    RadioButton*     pBtnCopy;
+    ListBox*         pLbDoc;
+    ListBox*         pLbTable;
+    Edit*            pEdTabName;
+    FixedText*       pFtWarn;
+    OKButton*        pBtnOk;
 
     OUString   maStrTabNameUsed;
     OUString   maStrTabNameEmpty;
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index 65a1c91..d7a032c 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -38,24 +38,8 @@
 
 ScMoveTableDlg::ScMoveTableDlg(Window* pParent, const OUString& rDefault)
 
-    :   ModalDialog ( pParent, ScResId( RID_SCDLG_MOVETAB ) ),
+    :   ModalDialog ( pParent, "MoveCopySheetDialog", "modules/scalc/ui/movecopysheet.ui" ),
         //
-        aFlAction   ( this, ScResId( FL_ACTION ) ),
-        aBtnMove    ( this, ScResId( BTN_MOVE ) ),
-        aBtnCopy    ( this, ScResId( BTN_COPY ) ),
-        aFlLocation ( this, ScResId( FL_LOCATION ) ),
-        aFtDoc      ( this, ScResId( FT_DEST ) ),
-        aLbDoc      ( this, ScResId( LB_DEST ) ),
-        aFtTable    ( this, ScResId( FT_INSERT ) ),
-        aLbTable    ( this, ScResId( LB_INSERT ) ),
-        aFlName     ( this, ScResId( FL_NAME ) ),
-        aFtTabName  ( this, ScResId( FT_TABNAME ) ),
-        aEdTabName  ( this, ScResId( ED_INPUT ) ),
-        aFtWarn     ( this, ScResId( FT_TABNAME_WARN ) ),
-        aBtnOk      ( this, ScResId( BTN_OK ) ),
-        aBtnCancel  ( this, ScResId( BTN_CANCEL ) ),
-        aBtnHelp    ( this, ScResId( BTN_HELP ) ),
-
         maStrTabNameUsed( SC_RESSTR(STR_TABNAME_WARN_USED) ),
         maStrTabNameEmpty( SC_RESSTR(STR_TABNAME_WARN_EMPTY) ),
         maStrTabNameInvalid( SC_RESSTR(STR_TABNAME_WARN_INVALID) ),
@@ -68,8 +52,15 @@ ScMoveTableDlg::ScMoveTableDlg(Window* pParent, const OUString& rDefault)
         bRenameTable( false ),
         mbEverEdited( false )
 {
+    get(pBtnMove, "move");
+    get(pBtnCopy, "copy");
+    get(pLbDoc, "toDocument");
+    get(pLbTable, "insertBefore");
+    get(pEdTabName, "newName");
+    get(pFtWarn, "newNameWarn");
+    get(pBtnOk, "ok");
+
     Init();
-    FreeResource();
 }
 
 //------------------------------------------------------------------------
@@ -90,29 +81,28 @@ bool   ScMoveTableDlg::GetRenameTable        () const { return bRenameTable; }
 
 void ScMoveTableDlg::GetTabNameString( OUString& rString ) const
 {
-    rString = aEdTabName.GetText();
+    rString = pEdTabName->GetText();
 }
 
 void ScMoveTableDlg::SetForceCopyTable()
 {
-    aBtnCopy.Check(true);
-    aBtnMove.Disable();
-    aBtnCopy.Disable();
+    pBtnCopy->Check(true);
+    pBtnMove->Disable();
+    pBtnCopy->Disable();
 }
 
 void ScMoveTableDlg::EnableCopyTable(sal_Bool bFlag)
 {
     if(bFlag)
-        aBtnCopy.Enable();
+        pBtnCopy->Enable();
     else
-        aBtnCopy.Disable();
+        pBtnCopy->Disable();
 }
 
 void ScMoveTableDlg::EnableRenameTable(sal_Bool bFlag)
 {
     bRenameTable = bFlag;
-    aEdTabName.Enable(bFlag);
-    aFtTabName.Enable(bFlag);
+    pEdTabName->Enable(bFlag);
     ResetRenameInput();
 }
 
@@ -127,13 +117,13 @@ void ScMoveTableDlg::ResetRenameInput()
         return;
     }
 
-    if (!aEdTabName.IsEnabled())
+    if (!pEdTabName->IsEnabled())
     {
-        aEdTabName.SetText(String());
+        pEdTabName->SetText(String());
         return;
     }
 
-    bool bVal = aBtnCopy.IsChecked();
+    bool bVal = pBtnCopy->IsChecked();
     if (bVal)
     {
         // copy
@@ -142,91 +132,91 @@ void ScMoveTableDlg::ResetRenameInput()
         {
             OUString aStr = maDefaultName;
             pDoc->CreateValidTabName(aStr);
-            aEdTabName.SetText(aStr);
+            pEdTabName->SetText(aStr);
         }
         else
-            aEdTabName.SetText(maDefaultName);
+            pEdTabName->SetText(maDefaultName);
     }
     else
         // move
-        aEdTabName.SetText(maDefaultName);
+        pEdTabName->SetText(maDefaultName);
 
     CheckNewTabName();
 }
 
 void ScMoveTableDlg::CheckNewTabName()
 {
-    const OUString aNewName = aEdTabName.GetText();
+    const OUString aNewName = pEdTabName->GetText();
     if (aNewName.isEmpty())
     {
         // New sheet name is empty.  This is not good.
-        aFtWarn.SetText(maStrTabNameEmpty);
-        aFtWarn.Show();
-        aBtnOk.Disable();
+        pFtWarn->SetText(maStrTabNameEmpty);
+        pFtWarn->Show();
+        pBtnOk->Disable();
         return;
     }
 
     if (!ScDocument::ValidTabName(aNewName))
     {
         // New sheet name contains invalid characters.
-        aFtWarn.SetText(maStrTabNameInvalid);
-        aFtWarn.Show();
-        aBtnOk.Disable();
+        pFtWarn->SetText(maStrTabNameInvalid);
+        pFtWarn->Show();
+        pBtnOk->Disable();
         return;
     }
 
-    bool bMoveInCurrentDoc = (aBtnMove.IsChecked() && IsCurrentDocSelected());
+    bool bMoveInCurrentDoc = (pBtnMove->IsChecked() && IsCurrentDocSelected());
     bool bFound = false;
-    sal_uInt16 nLast  = aLbTable.GetEntryCount() - 1;
+    sal_uInt16 nLast  = pLbTable->GetEntryCount() - 1;
     for ( sal_uInt16 i=0; i<=nLast && !bFound; ++i )
     {
-        if ( aNewName.equals(aLbTable.GetEntry(i)) )
+        if ( aNewName.equals(pLbTable->GetEntry(i)) )
         {
             // Only for move within same document the same name is allowed.
-            if (!bMoveInCurrentDoc || !maDefaultName.equals( aEdTabName.GetText()))
+            if (!bMoveInCurrentDoc || !maDefaultName.equals( pEdTabName->GetText()))
                 bFound = true;
         }
     }
 
     if ( bFound )
     {
-        aFtWarn.SetText(maStrTabNameUsed);
-        aFtWarn.Show();
-        aBtnOk.Disable();
+        pFtWarn->SetText(maStrTabNameUsed);
+        pFtWarn->Show();
+        pBtnOk->Disable();
     }
     else
     {
-        aFtWarn.Hide();
-        aBtnOk.Enable();
+        pFtWarn->Hide();
+        pBtnOk->Enable();
     }
 }
 
 ScDocument* ScMoveTableDlg::GetSelectedDoc()
 {
-    sal_uInt16 nPos = aLbDoc.GetSelectEntryPos();
-    return static_cast<ScDocument*>(aLbDoc.GetEntryData(nPos));
+    sal_uInt16 nPos = pLbDoc->GetSelectEntryPos();
+    return static_cast<ScDocument*>(pLbDoc->GetEntryData(nPos));
 }
 
 bool ScMoveTableDlg::IsCurrentDocSelected() const
 {
-    return aLbDoc.GetSelectEntryPos() == mnCurrentDocPos;
+    return pLbDoc->GetSelectEntryPos() == mnCurrentDocPos;
 }
 
 //------------------------------------------------------------------------
 
 void ScMoveTableDlg::Init()
 {
-    aBtnOk.SetClickHdl   ( LINK( this, ScMoveTableDlg, OkHdl ) );
-    aLbDoc.SetSelectHdl  ( LINK( this, ScMoveTableDlg, SelHdl ) );
-    aBtnCopy.SetToggleHdl( LINK( this, ScMoveTableDlg, CheckBtnHdl ) );
-    aEdTabName.SetModifyHdl( LINK( this, ScMoveTableDlg, CheckNameHdl ) );
-    aBtnMove.Check( true );
-    aBtnCopy.Check( false );
-    aEdTabName.Enable(false);
-    aFtWarn.SetControlBackground( Color( COL_YELLOW ) );
-    aFtWarn.Hide();
+    pBtnOk->SetClickHdl   ( LINK( this, ScMoveTableDlg, OkHdl ) );
+    pLbDoc->SetSelectHdl  ( LINK( this, ScMoveTableDlg, SelHdl ) );
+    pBtnCopy->SetToggleHdl( LINK( this, ScMoveTableDlg, CheckBtnHdl ) );
+    pEdTabName->SetModifyHdl( LINK( this, ScMoveTableDlg, CheckNameHdl ) );
+    pBtnMove->Check( true );
+    pBtnCopy->Check( false );
+    pEdTabName->Enable(false);
+    pFtWarn->SetControlBackground( Color( COL_YELLOW ) );
+    pFtWarn->Hide();
     InitDocListBox();
-    SelHdl( &aLbDoc );
+    SelHdl( pLbDoc );
 }
 
 //------------------------------------------------------------------------
@@ -239,8 +229,8 @@ void ScMoveTableDlg::InitDocListBox()
     sal_uInt16          i       = 0;
     String          aEntryName;
 
-    aLbDoc.Clear();
-    aLbDoc.SetUpdateMode( false );
+    pLbDoc->Clear();
+    pLbDoc->SetUpdateMode( false );
 
     while ( pSh )
     {
@@ -257,17 +247,17 @@ void ScMoveTableDlg::InitDocListBox()
                 aEntryName += String( ScResId( STR_CURRENTDOC ) );
             }
 
-            aLbDoc.InsertEntry( aEntryName, i );
-            aLbDoc.SetEntryData( i, (void*)pScSh->GetDocument() );
+            pLbDoc->InsertEntry( aEntryName, i );
+            pLbDoc->SetEntryData( i, (void*)pScSh->GetDocument() );
 
             i++;
         }
         pSh = SfxObjectShell::GetNext( *pSh );
     }
 
-    aLbDoc.SetUpdateMode( sal_True );
-    aLbDoc.InsertEntry( String( ScResId( STR_NEWDOC ) ) );
-    aLbDoc.SelectEntryPos( nSelPos );
+    pLbDoc->SetUpdateMode( sal_True );
+    pLbDoc->InsertEntry( String( ScResId( STR_NEWDOC ) ) );
+    pLbDoc->SelectEntryPos( nSelPos );
 }
 
 //------------------------------------------------------------------------
@@ -275,7 +265,7 @@ void ScMoveTableDlg::InitDocListBox()
 
 IMPL_LINK( ScMoveTableDlg, CheckBtnHdl, void *, pBtn )
 {
-    if (pBtn == &aBtnCopy)
+    if (pBtn == pBtnCopy)
         ResetRenameInput();
 
     return 0;
@@ -283,14 +273,14 @@ IMPL_LINK( ScMoveTableDlg, CheckBtnHdl, void *, pBtn )
 
 IMPL_LINK_NOARG(ScMoveTableDlg, OkHdl)
 {
-    sal_uInt16  nDocSel     = aLbDoc.GetSelectEntryPos();
-    sal_uInt16  nDocLast    = aLbDoc.GetEntryCount()-1;
-    sal_uInt16  nTabSel     = aLbTable.GetSelectEntryPos();
-    sal_uInt16  nTabLast    = aLbTable.GetEntryCount()-1;
+    sal_uInt16  nDocSel     = pLbDoc->GetSelectEntryPos();
+    sal_uInt16  nDocLast    = pLbDoc->GetEntryCount()-1;
+    sal_uInt16  nTabSel     = pLbTable->GetSelectEntryPos();
+    sal_uInt16  nTabLast    = pLbTable->GetEntryCount()-1;
 
     nDocument   = (nDocSel != nDocLast) ? nDocSel : SC_DOC_NEW;
     nTable      = (nTabSel != nTabLast) ? static_cast<SCTAB>(nTabSel) : SC_TAB_APPEND;
-    bCopyTable  = aBtnCopy.IsChecked();
+    bCopyTable  = pBtnCopy->IsChecked();
 
     if (bCopyTable)
     {
@@ -300,15 +290,15 @@ IMPL_LINK_NOARG(ScMoveTableDlg, OkHdl)
         ScDocument* pDoc = GetSelectedDoc();
         if (pDoc)
             pDoc->CreateValidTabName(aCopyName);
-        if (aCopyName == OUString(aEdTabName.GetText()))
-            aEdTabName.SetText( OUString() );
+        if (aCopyName == OUString(pEdTabName->GetText()))
+            pEdTabName->SetText( OUString() );
     }
     else
     {
         // Return an empty string, when the new name is the same as the
         // original name.
-        if (maDefaultName.equals(aEdTabName.GetText()))
-            aEdTabName.SetText(OUString());
+        if (maDefaultName.equals(pEdTabName->GetText()))
+            pEdTabName->SetText(OUString());
     }
 
     EndDialog( RET_OK );
@@ -318,25 +308,25 @@ IMPL_LINK_NOARG(ScMoveTableDlg, OkHdl)
 
 IMPL_LINK( ScMoveTableDlg, SelHdl, ListBox *, pLb )
 {
-    if ( pLb == &aLbDoc )
+    if ( pLb == pLbDoc )
     {
         ScDocument* pDoc = GetSelectedDoc();
         OUString aName;
 
-        aLbTable.Clear();
-        aLbTable.SetUpdateMode( false );
+        pLbTable->Clear();
+        pLbTable->SetUpdateMode( false );
         if ( pDoc )
         {
             SCTAB nLast = pDoc->GetTableCount()-1;
             for ( SCTAB i=0; i<=nLast; i++ )
             {
                 pDoc->GetName( i, aName );
-                aLbTable.InsertEntry( aName, static_cast<sal_uInt16>(i) );
+                pLbTable->InsertEntry( aName, static_cast<sal_uInt16>(i) );
             }
         }
-        aLbTable.InsertEntry( ScGlobal::GetRscString(STR_MOVE_TO_END) );
-        aLbTable.SetUpdateMode( sal_True );
-        aLbTable.SelectEntryPos( 0 );
+        pLbTable->InsertEntry( ScGlobal::GetRscString(STR_MOVE_TO_END) );
+        pLbTable->SetUpdateMode( sal_True );
+        pLbTable->SelectEntryPos( 0 );
         ResetRenameInput();
     }
 
@@ -345,7 +335,7 @@ IMPL_LINK( ScMoveTableDlg, SelHdl, ListBox *, pLb )
 
 IMPL_LINK( ScMoveTableDlg, CheckNameHdl, Edit *, pEdt )
 {
-    if ( pEdt == &aEdTabName )
+    if ( pEdt == pEdTabName )
     {
         mbEverEdited = true;
         CheckNewTabName();
diff --git a/sc/source/ui/src/miscdlgs.src b/sc/source/ui/src/miscdlgs.src
index 391ebb7..569d3a0 100644
--- a/sc/source/ui/src/miscdlgs.src
+++ b/sc/source/ui/src/miscdlgs.src
@@ -224,142 +224,6 @@ ModalDialog RID_SCDLG_INSCONT
     };
 };
 
-ModalDialog RID_SCDLG_MOVETAB
-{
-    OutputSize = TRUE ;
-    HelpId = CMD_FID_TAB_MOVE ;
-    SVLook = TRUE ;
-    Size = MAP_APPFONT ( 158 , 236 ) ;
-    Text [ en-US ] = "Move/Copy Sheet" ;
-    Moveable = TRUE ;
-    Closeable = FALSE ;
-    OKButton BTN_OK
-    {
-        Pos = MAP_APPFONT ( 66 , 216 ) ;
-        Size = MAP_APPFONT ( 42 , 14 ) ;
-        TabStop = TRUE ;
-        DefButton = TRUE ;
-    };
-    CancelButton BTN_CANCEL
-    {
-        Pos = MAP_APPFONT ( 110 , 216 ) ;
-        Size = MAP_APPFONT ( 42 , 14 ) ;
-        TabStop = TRUE ;
-    };
-    HelpButton BTN_HELP
-    {
-        Pos = MAP_APPFONT ( 6 , 216 ) ;
-        Size = MAP_APPFONT ( 42 , 14 ) ;
-        TabStop = TRUE ;
-    };
-    FixedLine FL_SEP1
-    {
-        Pos = MAP_APPFONT ( 0 , 208 ) ;
-        Size = MAP_APPFONT (168 , 4 ) ;
-    };
-    FixedLine FL_ACTION
-    {
-        Pos = MAP_APPFONT ( 6 , 6 ) ;
-        Size = MAP_APPFONT ( 146 , 8 ) ;
-        Text [ en-US ] = "Action" ;
-    };
-    RadioButton BTN_MOVE
-    {
-        Pos = MAP_APPFONT ( 12 , 17 ) ;
-        Size = MAP_APPFONT ( 114 , 10 ) ;
-        Text [ en-US ] = "~Move" ;
-        TabStop = TRUE ;
-    };
-    RadioButton BTN_COPY
-    {
-        Pos = MAP_APPFONT ( 12 , 30 ) ;
-        Size = MAP_APPFONT ( 114 , 10 ) ;
-        Text [ en-US ] = "~Copy" ;
-        TabStop = TRUE ;
-    };
-    FixedLine FL_LOCATION
-    {
-        Pos = MAP_APPFONT ( 6 , 43 ) ;
-        Size = MAP_APPFONT ( 146 , 8 ) ;
-        Text [ en-US ] = "Location" ;
-    };
-    FixedText FT_DEST
-    {
-        Pos = MAP_APPFONT ( 12 , 54 ) ;
-        Size = MAP_APPFONT ( 100 , 8 ) ;
-        Text [ en-US ] = "To ~document" ;
-    };
-    ListBox LB_DEST
-    {
-        HelpID = "sc:ListBox:RID_SCDLG_MOVETAB:LB_DEST";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 12 , 65 ) ;
-        Size = MAP_APPFONT ( 134 , 60 ) ;
-        TabStop = TRUE ;
-        DropDown = TRUE ;
-    };
-    FixedText FT_INSERT
-    {
-        Pos = MAP_APPFONT ( 12 , 83 ) ;
-        Size = MAP_APPFONT ( 100 , 8 ) ;
-        Text [ en-US ] = "~Insert before" ;
-    };
-    ListBox LB_INSERT
-    {
-        HelpID = "sc:ListBox:RID_SCDLG_MOVETAB:LB_INSERT";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 12 , 93 ) ;
-        Size = MAP_APPFONT ( 134 , 62 ) ;
-        TabStop = TRUE ;
-    };
-    FixedLine FL_NAME
-    {
-        HelpID = "sc:CheckBox:RID_SCDLG_MOVETAB:BTN_COPY";
-        Pos = MAP_APPFONT ( 6 , 162 ) ;
-        Size = MAP_APPFONT ( 146 , 8 ) ;
-        Text [ en-US ] = "Name" ;
-    };
-    FixedText FT_TABNAME
-    {
-        Pos = MAP_APPFONT ( 12 , 173 ) ;
-        Size = MAP_APPFONT ( 100 , 8 ) ;
-        Text [ en-US ] = "New ~name" ;
-    };
-    Edit ED_INPUT
-    {
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 12 , 183 ) ;
-        Size = MAP_APPFONT ( 134 , 12 ) ;
-        TabStop = TRUE ;
-    };
-    FixedText FT_TABNAME_WARN
-    {
-        Pos = MAP_APPFONT ( 12 , 197 ) ;
-        Size = MAP_APPFONT ( 134 , 8 ) ;
-        Text [ en-US ] = "..." ;
-    };
-    String STR_CURRENTDOC
-    {
-        Text [ en-US ] = "(current document)" ;
-    };
-    String STR_NEWDOC
-    {
-        Text [ en-US ] = "- new document -" ;
-    };
-    String STR_TABNAME_WARN_USED
-    {
-        Text [ en-US ] = "This name is already used." ;
-    };
-    String STR_TABNAME_WARN_EMPTY
-    {
-        Text [ en-US ] = "Name is empty." ;
-    };
-    String STR_TABNAME_WARN_INVALID
-    {
-        Text [ en-US ] = "Name contains one or more invalid characters." ;
-    };
-};
-
 ModalDialog RID_SCDLG_STRINPUT
 {
     HelpID = "sc:ModalDialog:RID_SCDLG_STRINPUT";
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index f3db8bc..98392b9 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -502,9 +502,8 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
                     ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
                     OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
 
-                    AbstractScMoveTableDlg* pDlg = pFact->CreateScMoveTableDlg( GetDialogParent(),
-                                                                                aDefaultName,
-                                                                                RID_SCDLG_MOVETAB );
+                    AbstractScMoveTableDlg* pDlg = pFact->CreateScMoveTableDlg(GetDialogParent(),
+                        aDefaultName);
                     OSL_ENSURE(pDlg, "Dialog create fail!");
 
                     SCTAB nTableCount = pDoc->GetTableCount();
diff --git a/sc/uiconfig/scalc/ui/movecopysheet.ui b/sc/uiconfig/scalc/ui/movecopysheet.ui
new file mode 100644
index 0000000..3b047c3
--- /dev/null
+++ b/sc/uiconfig/scalc/ui/movecopysheet.ui
@@ -0,0 +1,363 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkDialog" id="MoveCopySheetDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">5</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">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="layout_style">spread</property>
+            <child>
+              <object class="GtkButton" id="help">
+                <property name="label">gtk-help</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</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="ok">
+                <property name="label">gtk-ok</property>
+                <property name="use_action_appearance">False</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_action_appearance">False</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="cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</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>
+          </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="GtkFrame" id="action">
+            <property name="visible">True</property>
+            <property name="can_focus">False</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="left_padding">12</property>
+                <child>
+                  <object class="GtkBox" id="box1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkRadioButton" id="move">
+                        <property name="label" translatable="yes">_Move</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="use_underline">True</property>
+                        <property name="xalign">0</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkRadioButton" id="copy">
+                        <property name="label" translatable="yes">C_opy</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="use_underline">True</property>
+                        <property name="xalign">0</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">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>
+                <property name="yalign">0.55000001192092896</property>
+                <property name="xpad">1</property>
+                <property name="label" translatable="yes">Action</property>
+                <property name="justify">center</property>
+                <attributes>
+                  <attribute name="weight" value="bold"/>
+                </attributes>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame" id="location">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="margin_top">5</property>
+            <property name="label_xalign">0</property>
+            <property name="shadow_type">none</property>
+            <child>
+              <object class="GtkAlignment" id="alignment2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <object class="GtkBox" id="box2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkBox" id="box3">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <object class="GtkLabel" id="toDocumentLabel">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="margin_top">5</property>
+                            <property name="margin_bottom">3</property>
+                            <property name="xalign">0</property>
+                            <property name="yalign">0</property>
+                            <property name="label" translatable="yes">To _document</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkComboBoxText" id="toDocument">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="entry_text_column">0</property>
+                            <property name="id_column">1</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkBox" id="box4">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <object class="GtkLabel" id="insertBeforeLabel">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="margin_top">8</property>
+                            <property name="margin_bottom">3</property>
+                            <property name="xalign">0</property>
+                            <property name="yalign">0.49000000953674316</property>
+                            <property name="label" translatable="yes">_Insert before</property>
+                            <property name="use_underline">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkScrolledWindow" id="scrolledwindow1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="shadow_type">in</property>
+                            <child>
+                              <object class="GtkTreeView" id="insertBefore">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="vexpand">True</property>
+                                <child internal-child="selection">
+                                  <object class="GtkTreeSelection" id="treeview-selection"/>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Location</property>
+                <attributes>
+                  <attribute name="weight" value="bold"/>
+                </attributes>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame" id="newNameFrame">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0</property>
+            <property name="shadow_type">none</property>
+            <child>
+              <object class="GtkBox" id="box5">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="orientation">vertical</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkEntry" id="newName">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="invisible_char">•</property>
+                        <property name="invisible_char_set">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="newNameWarn">
+                    <property name="height_request">30</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="valign">start</property>
+                    <property name="margin_left">12</property>
+                    <property name="margin_right">1</property>
+                    <property name="xalign">0</property>
+                    <property name="yalign">0.54000002145767212</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="newNameLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_top">5</property>
+                <property name="yalign">0.50999999046325684</property>
+                <property name="xpad">2</property>
+                <property name="label" translatable="yes">New _name</property>
+                <property name="use_underline">True</property>
+                <property name="ellipsize">start</property>
+                <attributes>
+                  <attribute name="weight" value="bold"/>
+                </attributes>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">5</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">help</action-widget>
+      <action-widget response="0">ok</action-widget>
+      <action-widget response="0">cancel</action-widget>
+    </action-widgets>
+  </object>
+</interface>


More information about the Libreoffice-commits mailing list