Kaydet (Commit) d88bf2aa authored tarafından Caolán McNamara's avatar Caolán McNamara

convert edit duration to .ui

Change-Id: Ifb1ae6b96a42642c05f294cccfe0c4bd4e65dd8c
üst d197a079
...@@ -18,6 +18,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\ ...@@ -18,6 +18,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\
sfx2/uiconfig/ui/documentfontspage \ sfx2/uiconfig/ui/documentfontspage \
sfx2/uiconfig/ui/documentinfopage \ sfx2/uiconfig/ui/documentinfopage \
sfx2/uiconfig/ui/documentpropertiesdialog \ sfx2/uiconfig/ui/documentpropertiesdialog \
sfx2/uiconfig/ui/editdurationdialog \
sfx2/uiconfig/ui/errorfindemaildialog \ sfx2/uiconfig/ui/errorfindemaildialog \
sfx2/uiconfig/ui/inputdialog \ sfx2/uiconfig/ui/inputdialog \
sfx2/uiconfig/ui/licensedialog \ sfx2/uiconfig/ui/licensedialog \
......
...@@ -60,7 +60,6 @@ ...@@ -60,7 +60,6 @@
#define STR_PDF_EXPORT_SEND ( RC_DIALOG_BEGIN + 120 ) #define STR_PDF_EXPORT_SEND ( RC_DIALOG_BEGIN + 120 )
#define IMG_INFO ( RC_DIALOG_BEGIN + 122 ) #define IMG_INFO ( RC_DIALOG_BEGIN + 122 )
#define RID_EDIT_DURATIONS ( RC_DIALOG_BEGIN + 123 )
#define SFX_PB_EDIT ( RC_DIALOG_BEGIN + 124 ) #define SFX_PB_EDIT ( RC_DIALOG_BEGIN + 124 )
#define STR_STYLE_ELEMTLIST ( RC_DIALOG_BEGIN + 125 ) #define STR_STYLE_ELEMTLIST ( RC_DIALOG_BEGIN + 125 )
......
...@@ -1199,87 +1199,60 @@ CustomPropertiesYesNoButton::CustomPropertiesYesNoButton( Window* pParent, const ...@@ -1199,87 +1199,60 @@ CustomPropertiesYesNoButton::CustomPropertiesYesNoButton( Window* pParent, const
m_aYesButton.SetBackground( aWall ); m_aYesButton.SetBackground( aWall );
m_aNoButton.SetBackground( aWall ); m_aNoButton.SetBackground( aWall );
} }
class DurationDialog_Impl : public ModalDialog class DurationDialog_Impl : public ModalDialog
{ {
FixedLine aDurationFL; CheckBox* m_pNegativeCB;
NumericField* m_pYearNF;
OKButton aOKPB; NumericField* m_pMonthNF;
CancelButton aCancelPB; NumericField* m_pDayNF;
HelpButton aHelpPB; NumericField* m_pHourNF;
NumericField* m_pMinuteNF;
CheckBox aNegativeCB; NumericField* m_pSecondNF;
FixedText aYearFT; NumericField* m_pMSecondNF;
NumericField aYearNF;
FixedText aMonthFT;
NumericField aMonthNF;
FixedText aDayFT;
NumericField aDayNF;
FixedText aHourFT;
NumericField aHourNF;
FixedText aMinuteFT;
NumericField aMinuteNF;
FixedText aSecondFT;
NumericField aSecondNF;
FixedText aMSecondFT;
NumericField aMSecondNF;
public: public:
DurationDialog_Impl( Window* pParent, const util::Duration& rDuration ); DurationDialog_Impl( Window* pParent, const util::Duration& rDuration );
~DurationDialog_Impl();
util::Duration GetDuration() const; util::Duration GetDuration() const;
}; };
DurationDialog_Impl::DurationDialog_Impl( DurationDialog_Impl::DurationDialog_Impl(Window* pParent,
Window* pParent, const util::Duration& rDuration) const util::Duration& rDuration)
: ModalDialog( pParent, SfxResId( RID_EDIT_DURATIONS ) ), : ModalDialog(pParent, "EditDurationDialog",
aDurationFL(this, SfxResId( FL_DURATION )), "sfx/ui/editdurationdialog.ui")
aOKPB( this, SfxResId( PB_OK )), {
aCancelPB( this, SfxResId( PB_CANCEL )), get(m_pNegativeCB, "negative");
aHelpPB( this, SfxResId( PB_HELP )), get(m_pYearNF, "years");
aNegativeCB(this, SfxResId( CB_NEGATIVE )), get(m_pMonthNF, "months");
aYearFT( this, SfxResId( FT_YEAR )), get(m_pDayNF, "days");
aYearNF( this, SfxResId( ED_YEAR )), get(m_pHourNF, "hours");
aMonthFT( this, SfxResId( FT_MONTH )), get(m_pMinuteNF, "minutes");
aMonthNF( this, SfxResId( ED_MONTH )), get(m_pSecondNF, "seconds");
aDayFT( this, SfxResId( FT_DAY )), get(m_pMSecondNF, "milliseconds");
aDayNF( this, SfxResId( ED_DAY )),
aHourFT( this, SfxResId( FT_HOUR )), m_pNegativeCB->Check(rDuration.Negative);
aHourNF( this, SfxResId( ED_HOUR )), m_pYearNF->SetValue(rDuration.Years);
aMinuteFT( this, SfxResId( FT_MINUTE )), m_pMonthNF->SetValue(rDuration.Months);
aMinuteNF( this, SfxResId( ED_MINUTE )), m_pDayNF->SetValue(rDuration.Days);
aSecondFT( this, SfxResId( FT_SECOND )), m_pHourNF->SetValue(rDuration.Hours);
aSecondNF( this, SfxResId( ED_SECOND )), m_pMinuteNF->SetValue(rDuration.Minutes);
aMSecondFT( this, SfxResId( FT_MSECOND )), m_pSecondNF->SetValue(rDuration.Seconds);
aMSecondNF( this, SfxResId( ED_MSECOND )) m_pMSecondNF->SetValue(rDuration.NanoSeconds);
{
FreeResource();
aNegativeCB.Check(rDuration.Negative);
aYearNF.SetValue(rDuration.Years);
aMonthNF.SetValue(rDuration.Months );
aDayNF.SetValue(rDuration.Days );
aHourNF.SetValue(rDuration.Hours );
aMinuteNF.SetValue(rDuration.Minutes);
aSecondNF.SetValue(rDuration.Seconds);
aMSecondNF.SetValue(rDuration.NanoSeconds);
}
DurationDialog_Impl::~DurationDialog_Impl()
{
} }
util::Duration DurationDialog_Impl::GetDuration() const util::Duration DurationDialog_Impl::GetDuration() const
{ {
util::Duration aRet; util::Duration aRet;
aRet.Negative = aNegativeCB.IsChecked(); aRet.Negative = m_pNegativeCB->IsChecked();
aRet.Years = aYearNF.GetValue(); aRet.Years = m_pYearNF->GetValue();
aRet.Months = aMonthNF.GetValue( ); aRet.Months = m_pMonthNF->GetValue( );
aRet.Days = aDayNF.GetValue( ); aRet.Days = m_pDayNF->GetValue( );
aRet.Hours = aHourNF.GetValue( ); aRet.Hours = m_pHourNF->GetValue( );
aRet.Minutes = aMinuteNF.GetValue(); aRet.Minutes = m_pMinuteNF->GetValue();
aRet.Seconds = aSecondNF.GetValue(); aRet.Seconds = m_pSecondNF->GetValue();
aRet.NanoSeconds = aMSecondNF.GetValue(); aRet.NanoSeconds = m_pMSecondNF->GetValue();
return aRet; return aRet;
} }
......
...@@ -180,189 +180,4 @@ QueryBox SFX_QB_WRONG_TYPE ...@@ -180,189 +180,4 @@ QueryBox SFX_QB_WRONG_TYPE
Message [ en-US ] = "The value entered does not match the specified type.\nThe value will be stored as text." ; Message [ en-US ] = "The value entered does not match the specified type.\nThe value will be stored as text." ;
}; };
ModalDialog RID_EDIT_DURATIONS
{
HelpId = HID_DLG_CUSTOMPROPS_DURATION;
OutputSize = TRUE ;
Size = MAP_APPFONT ( 176 , 140 ) ;
Text [ en-US ] = "Edit Duration" ;
Moveable = TRUE ;
OKButton PB_OK
{
Pos = MAP_APPFONT ( 120 , 7 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
DefButton = TRUE;
};
CancelButton PB_CANCEL
{
Pos = MAP_APPFONT ( 120 , 24 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
HelpButton PB_HELP
{
Pos = MAP_APPFONT ( 120 , 48 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
FixedLine FL_DURATION
{
Pos = MAP_APPFONT ( 6 , 8 ) ;
Size = MAP_APPFONT ( 108 , 8 ) ;
Text [ en-US ] = "Duration" ;
};
CheckBox CB_NEGATIVE
{
HelpID = "sfx2:CheckBox:RID_EDIT_DURATIONS:CB_NEGATIVE";
Pos = MAP_APPFONT ( 6 , 21 ) ;
Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
Text [ en-US ] = "~Negative" ;
};
FixedText FT_YEAR
{
Pos = MAP_APPFONT ( 6 , 38 ) ;
Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
Left = TRUE ;
Text [ en-US ] = "~Years" ;
};
NumericField ED_YEAR
{
HelpID = "sfx2:NumericField:RID_EDIT_DURATIONS:ED_YEAR";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 36 ) ;
Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 0 ;
First = 1 ;
Last = 100 ;
SpinSize = 1 ;
Value = 0 ;
};
FixedText FT_MONTH
{
Pos = MAP_APPFONT ( 6 , 52 ) ;
Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
Left = TRUE ;
Text [ en-US ] = "~Months" ;
};
NumericField ED_MONTH
{
HelpID = "sfx2:NumericField:RID_EDIT_DURATIONS:ED_MONTH";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 50 ) ;
Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 0 ;
First = 1 ;
Last = 100 ;
SpinSize = 1 ;
Value = 0 ;
};
FixedText FT_DAY
{
Pos = MAP_APPFONT ( 6 , 66 ) ;
Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
Left = TRUE ;
Text [ en-US ] = "~Days" ;
};
NumericField ED_DAY
{
HelpID = "sfx2:NumericField:RID_EDIT_DURATIONS:ED_DAY";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 64 ) ;
Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 0 ;
First = 1 ;
Last = 100 ;
SpinSize = 1 ;
Value = 0 ;
};
FixedText FT_HOUR
{
Pos = MAP_APPFONT ( 6 , 80 ) ;
Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
Left = TRUE ;
Text [ en-US ] = "H~ours" ;
};
NumericField ED_HOUR
{
HelpID = "sfx2:NumericField:RID_EDIT_DURATIONS:ED_HOUR";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 78 ) ;
Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 0 ;
First = 1 ;
Last = 100 ;
SpinSize = 1 ;
Value = 0 ;
};
FixedText FT_MINUTE
{
Pos = MAP_APPFONT ( 6 , 94 ) ;
Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
Left = TRUE ;
Text [ en-US ] = "Min~utes" ;
};
NumericField ED_MINUTE
{
HelpID = "sfx2:NumericField:RID_EDIT_DURATIONS:ED_MINUTE";
Border = TRUE ;
Pos = MAP_APPFONT ( 70, 92) ;
Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 0 ;
First = 1 ;
Last = 100 ;
SpinSize = 1 ;
Value = 0 ;
};
FixedText FT_SECOND
{
Pos = MAP_APPFONT ( 6, 108 ) ;
Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
Left = TRUE ;
Text [ en-US ] = "~Seconds" ;
};
NumericField ED_SECOND
{
HelpID = "sfx2:NumericField:RID_EDIT_DURATIONS:ED_SECOND";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 106 ) ;
Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 0 ;
First = 1 ;
Last = 100 ;
SpinSize = 1 ;
Value = 0 ;
};
FixedText FT_MSECOND
{
Pos = MAP_APPFONT ( 6 , 122 ) ;
Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
Left = TRUE ;
Text [ en-US ] = "Millise~conds" ;
};
NumericField ED_MSECOND
{
HelpID = "sfx2:NumericField:RID_EDIT_DURATIONS:ED_MSECOND";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 120 ) ;
Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 0 ;
First = 1 ;
Last = 1000 ;
SpinSize = 1 ;
Value = 0 ;
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -129,7 +129,6 @@ ...@@ -129,7 +129,6 @@
#define HID_HELP_ONSTARTUP_BOX "SFX2_HID_HELP_ONSTARTUP_BOX" #define HID_HELP_ONSTARTUP_BOX "SFX2_HID_HELP_ONSTARTUP_BOX"
#define HID_DLG_CHECKFORONLINEUPDATE "SFX2_HID_DLG_CHECKFORONLINEUPDATE" #define HID_DLG_CHECKFORONLINEUPDATE "SFX2_HID_DLG_CHECKFORONLINEUPDATE"
#define HID_CTRL_CUSTOMPROPS_YES_NO "SFX2_HID_CTRL_CUSTOMPROPS_YES_NO" #define HID_CTRL_CUSTOMPROPS_YES_NO "SFX2_HID_CTRL_CUSTOMPROPS_YES_NO"
#define HID_DLG_CUSTOMPROPS_DURATION "SFX2_HID_DLG_CUSTOMPROPS_DURATION"
#define HID_HELP_ONHELP "SFX2_HID_HELP_ONHELP" #define HID_HELP_ONHELP "SFX2_HID_HELP_ONHELP"
......
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