Kaydet (Commit) e9d6d410 authored tarafından Manal Alhassoun's avatar Manal Alhassoun Kaydeden (comit) Caolán McNamara

Convert Fill Series to Widget UI

Change-Id: I42d2adcb36e863c5da09ca2e2230b0f30d85a795
Reviewed-on: https://gerrit.libreoffice.org/5022Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 753bff8e
......@@ -70,6 +70,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/deletecontents \
sc/uiconfig/scalc/ui/descriptivestatisticsdialog \
sc/uiconfig/scalc/ui/externaldata \
sc/uiconfig/scalc/ui/filldlg \
sc/uiconfig/scalc/ui/footerdialog \
sc/uiconfig/scalc/ui/formatcellsdialog \
sc/uiconfig/scalc/ui/formulacalculationoptions \
......
......@@ -985,7 +985,6 @@
#define RID_SCDLG_STRINPUT (SC_DIALOGS_START + 16)
#define RID_SCDLG_MTRINPUT (SC_DIALOGS_START + 17)
#define RID_SCDLG_SELENTRY (SC_DIALOGS_START + 18)
#define RID_SCDLG_FILLSERIES (SC_DIALOGS_START + 19)
#define RID_SCDLG_AUTOFORMAT (SC_DIALOGS_START + 20)
#define RID_SCDLG_NAMES (SC_DIALOGS_START + 22)
#define RID_SCDLG_DBNAMES (SC_DIALOGS_START + 23)
......
......@@ -381,8 +381,7 @@ public:
String aStartStr,
double fStep,
double fMax,
sal_uInt16 nPossDir,
int nId) = 0;
sal_uInt16 nPossDir) = 0;
virtual AbstractScGroupDlg * CreateAbstractScGroupDlg( Window* pParent, //add for ScGroupDlg
bool bUnGroup = false,
......
......@@ -834,22 +834,10 @@ AbstractScFillSeriesDlg* ScAbstractDialogFactory_Impl::CreateScFillSeriesDlg( Wi
String aStartStr,
double fStep,
double fMax,
sal_uInt16 nPossDir,
int nId)
sal_uInt16 nPossDir)
{
ScFillSeriesDlg * pDlg=NULL;
switch ( nId )
{
case RID_SCDLG_FILLSERIES :
pDlg = new ScFillSeriesDlg( pParent, rDocument,eFillDir, eFillCmd,eFillDateCmd, aStartStr,fStep,fMax,nPossDir);
break;
default:
break;
}
if ( pDlg )
ScFillSeriesDlg * pDlg = new ScFillSeriesDlg( pParent, rDocument,eFillDir, eFillCmd,eFillDateCmd, aStartStr,fStep,fMax,nPossDir);
return new AbstractScFillSeriesDlg_Impl( pDlg );
return 0;
}
AbstractScGroupDlg* ScAbstractDialogFactory_Impl::CreateAbstractScGroupDlg( Window* pParent,
......
......@@ -449,8 +449,7 @@ public:
String aStartStr,
double fStep,
double fMax,
sal_uInt16 nPossDir,
int nId);
sal_uInt16 nPossDir);
virtual AbstractScGroupDlg * CreateAbstractScGroupDlg( Window* pParent, //add for ScGroupDlg
bool bUnGroup = false,
bool bRows = true);
......
......@@ -54,43 +54,37 @@ public:
double GetStep() const { return fIncrement; }
double GetMax() const { return fEndVal; }
OUString GetStartStr() const { return aEdStartVal.GetText(); }
OUString GetStartStr() const { return m_pEdStartVal->GetText(); }
void SetEdStartValEnabled(bool bFlag = false);
private:
FixedText aFtStartVal;
Edit aEdStartVal;
FixedText* m_pFtStartVal;
Edit* m_pEdStartVal;
const OUString aStartStrVal;
FixedText aFtEndVal;
Edit aEdEndVal;
FixedText aFtIncrement;
Edit aEdIncrement;
FixedLine aFlDirection;
RadioButton aBtnDown;
RadioButton aBtnRight;
RadioButton aBtnUp;
RadioButton aBtnLeft;
FixedLine aFlSep1;
FixedLine aFlType;
RadioButton aBtnArithmetic;
RadioButton aBtnGeometric;
RadioButton aBtnDate;
RadioButton aBtnAutoFill;
FixedLine aFlSep2;
FixedLine aFlTimeUnit;
RadioButton aBtnDay;
RadioButton aBtnDayOfWeek;
RadioButton aBtnMonth;
RadioButton aBtnYear;
OKButton aBtnOk;
CancelButton aBtnCancel;
HelpButton aBtnHelp;
FixedText* m_pFtEndVal;
Edit* m_pEdEndVal;
FixedText* m_pFtIncrement;
Edit* m_pEdIncrement;
RadioButton* m_pBtnDown;
RadioButton* m_pBtnRight;
RadioButton* m_pBtnUp;
RadioButton* m_pBtnLeft;
RadioButton* m_pBtnArithmetic;
RadioButton* m_pBtnGeometric;
RadioButton* m_pBtnDate;
RadioButton* m_pBtnAutoFill;
FixedText* m_pFtTimeUnit;
RadioButton* m_pBtnDay;
RadioButton* m_pBtnDayOfWeek;
RadioButton* m_pBtnMonth;
RadioButton* m_pBtnYear;
OKButton* m_pBtnOk;
const OUString aErrMsgInvalidVal;
......
......@@ -76,28 +76,7 @@
#define LB_ENTRYLIST 11
// Row fillers
#define FL_DIRECTION 1
#define BTN_LEFT 2
#define BTN_RIGHT 3
#define BTN_TOP 4
#define BTN_BOTTOM 5
#define FL_TYPE 11
#define BTN_ARITHMETIC 12
#define BTN_GEOMETRIC 13
#define BTN_DATE 14
#define BTN_AUTOFILL 15
#define FL_TIME_UNIT 21
#define BTN_DAY 22
#define BTN_DAY_OF_WEEK 23
#define BTN_MONTH 24
#define BTN_YEAR 25
#define FT_INCREMENT 30
#define ED_INCREMENT 39
#define FT_END_VALUE 40
#define ED_END_VALUES 49
#define STR_VALERR 50
#define FT_START_VALUE 51
#define ED_START_VALUES 52
// Auto format
#define LB_FORMAT 1
......
......@@ -585,204 +585,9 @@ ModalDialog RID_SCDLG_SHOW_TAB
};
ModalDialog RID_SCDLG_FILLSERIES
String STR_VALERR
{
OutputSize = TRUE ;
HelpId = CMD_FID_FILL_SERIES ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 290 , 122 ) ;
Text [ en-US ] = "Fill Series" ;
Moveable = TRUE ;
Closeable = FALSE ;
RadioButton BTN_DAY
{
HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_DAY";
Pos = MAP_APPFONT ( 159 , 14 ) ;
Size = MAP_APPFONT ( 66 , 10 ) ;
Text [ en-US ] = "Da~y" ;
TabStop = TRUE ;
};
RadioButton BTN_DAY_OF_WEEK
{
HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_DAY_OF_WEEK";
Pos = MAP_APPFONT ( 159 , 28 ) ;
Size = MAP_APPFONT ( 66 , 10 ) ;
Text [ en-US ] = "~Weekday" ;
TabStop = TRUE ;
};
RadioButton BTN_MONTH
{
HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_MONTH";
Pos = MAP_APPFONT ( 159 , 42 ) ;
Size = MAP_APPFONT ( 66 , 10 ) ;
Text [ en-US ] = "~Month" ;
TabStop = TRUE ;
};
RadioButton BTN_YEAR
{
HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_YEAR";
Pos = MAP_APPFONT ( 159 , 56 ) ;
Size = MAP_APPFONT ( 66 , 10 ) ;
Text [ en-US ] = "Y~ear" ;
TabStop = TRUE ;
};
FixedLine FL_TIME_UNIT
{
Pos = MAP_APPFONT ( 153 , 3 ) ;
Size = MAP_APPFONT ( 75 , 8 ) ;
Text [ en-US ] = "Time unit" ;
};
RadioButton BTN_RIGHT
{
HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_RIGHT";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 51 , 10 ) ;
Text [ en-US ] = "~Right" ;
TabStop = TRUE ;
};
RadioButton BTN_LEFT
{
HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_LEFT";
Pos = MAP_APPFONT ( 12 , 56 ) ;
Size = MAP_APPFONT ( 51 , 10 ) ;
Text [ en-US ] = "~Left" ;
TabStop = TRUE ;
};
RadioButton BTN_TOP
{
HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_TOP";
Pos = MAP_APPFONT ( 12 , 42 ) ;
Size = MAP_APPFONT ( 51 , 10 ) ;
Text [ en-US ] = "~Up" ;
TabStop = TRUE ;
};
RadioButton BTN_BOTTOM
{
HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_BOTTOM";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 51 , 10 ) ;
Text [ en-US ] = "~Down" ;
TabStop = TRUE ;
};
FixedLine FL_DIRECTION
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 60 , 8 ) ;
Text [ en-US ] = "Direction" ;
};
RadioButton BTN_ARITHMETIC
{
HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_ARITHMETIC";
Pos = MAP_APPFONT ( 78 , 14 ) ;
Size = MAP_APPFONT ( 69 , 10 ) ;
Text [ en-US ] = "Li~near" ;
TabStop = TRUE ;
};
RadioButton BTN_GEOMETRIC
{
HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_GEOMETRIC";
Pos = MAP_APPFONT ( 78 , 28 ) ;
Size = MAP_APPFONT ( 69 , 10 ) ;
Text [ en-US ] = "~Growth" ;
TabStop = TRUE ;
};
RadioButton BTN_DATE
{
HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_DATE";
Pos = MAP_APPFONT ( 78 , 42 ) ;
Size = MAP_APPFONT ( 69 , 10 ) ;
Text [ en-US ] = "Da~te" ;
TabStop = TRUE ;
};
RadioButton BTN_AUTOFILL
{
HelpID = "sc:RadioButton:RID_SCDLG_FILLSERIES:BTN_AUTOFILL";
Pos = MAP_APPFONT ( 78 , 56 ) ;
Size = MAP_APPFONT ( 69 , 10 ) ;
Text [ en-US ] = "~AutoFill" ;
TabStop = TRUE ;
};
FixedLine FL_TYPE
{
Pos = MAP_APPFONT ( 72 , 3 ) ;
Size = MAP_APPFONT ( 75 , 8 ) ;
Text [ en-US ] = "Series type" ;
};
FixedLine FL_SEP1
{
Pos = MAP_APPFONT( 69 , 14 ) ;
Size = MAP_APPFONT ( 1 , 52 ) ;
};
FixedLine FL_SEP2
{
Pos = MAP_APPFONT( 150 , 14 ) ;
Size = MAP_APPFONT ( 1 , 52 ) ;
};
FixedText FT_START_VALUE
{
Pos = MAP_APPFONT ( 6 , 74 ) ;
Size = MAP_APPFONT ( 45 , 8 ) ;
Text [ en-US ] = "~Start value" ;
};
Edit ED_START_VALUES
{
HelpID = "sc:Edit:RID_SCDLG_FILLSERIES:ED_START_VALUES";
Border = TRUE ;
Pos = MAP_APPFONT ( 55 , 72 ) ;
Size = MAP_APPFONT ( 58 , 12 ) ;
TabStop = TRUE ;
};
FixedText FT_END_VALUE
{
Pos = MAP_APPFONT ( 6 , 90 ) ;
Size = MAP_APPFONT ( 45 , 8 ) ;
Text [ en-US ] = "End ~value" ;
};
Edit ED_END_VALUES
{
HelpID = "sc:Edit:RID_SCDLG_FILLSERIES:ED_END_VALUES";
Border = TRUE ;
Pos = MAP_APPFONT ( 55 , 88 ) ;
Size = MAP_APPFONT ( 58 , 12 ) ;
TabStop = TRUE ;
};
FixedText FT_INCREMENT
{
Pos = MAP_APPFONT ( 6 , 106 ) ;
Size = MAP_APPFONT ( 45 , 8 ) ;
Text [ en-US ] = "In~crement" ;
};
Edit ED_INCREMENT
{
HelpID = "sc:Edit:RID_SCDLG_FILLSERIES:ED_INCREMENT";
Border = TRUE ;
Pos = MAP_APPFONT ( 55 , 104 ) ;
Size = MAP_APPFONT ( 58 , 12 ) ;
TabStop = TRUE ;
};
String STR_VALERR
{
Text [ en-US ] = "Invalid value" ;
};
OKButton BTN_OK
{
Pos = MAP_APPFONT ( 234 , 6 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
DefButton = TRUE ;
};
CancelButton BTN_CANCEL
{
Pos = MAP_APPFONT ( 234 , 23 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
HelpButton BTN_HELP
{
Pos = MAP_APPFONT ( 234 , 43 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
};
#define TXT_COLS \
......
......@@ -706,8 +706,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
*pDoc,
eFillDir, eFillCmd, eFillDateCmd,
aStartStr, fIncVal, fMaxVal,
nPossDir,
RID_SCDLG_FILLSERIES);
nPossDir);
OSL_ENSURE(pDlg, "Dialog create fail!");
if ( nStartCol != nEndCol && nStartRow != nEndRow )
......
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