Kaydet (Commit) c2a28a73 authored tarafından oger000's avatar oger000 Kaydeden (comit) Caolán McNamara

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/5006Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 045a7c67
......@@ -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:
......@@ -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)
......
......@@ -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;
......
......@@ -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)
......
......@@ -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);
......
......@@ -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
......
......@@ -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;
......
......@@ -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";
......
......@@ -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();
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment