diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-08-02 10:10:32 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-08-02 10:18:47 +0200 |
commit | 4f950ffb896ce3fb8af6f422a53ea132bc055e1c (patch) | |
tree | 59ad6c9c3711e7fdad09c7a00712e228a14d9307 /reportdesign | |
parent | 1f0da38c7d132cfc64e977454ebc2eab35f18ba0 (diff) |
small expand tweak
+
a) use default dropdown count
b) SAL_N_ELEMENTS
Change-Id: I67f12137eedb19bcaf79309fc64bf5c29a70e64d
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/inc/helpids.hrc | 1 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/DateTime.cxx | 20 | ||||
-rw-r--r-- | reportdesign/uiconfig/dbreport/ui/datetimedialog.ui | 3 |
3 files changed, 11 insertions, 13 deletions
diff --git a/reportdesign/inc/helpids.hrc b/reportdesign/inc/helpids.hrc index ec0d16360749..69a581a147bb 100644 --- a/reportdesign/inc/helpids.hrc +++ b/reportdesign/inc/helpids.hrc @@ -41,7 +41,6 @@ #define HID_RPT_SORTORDER "REPORTDESIGN_HID_RPT_SORTORDER" #define HID_RPT_GROUPSBRW "REPORTDESIGN_HID_RPT_GROUPSBRW" #define HID_RPT_GROUPSSORTING_DLG "REPORTDESIGN_HID_RPT_GROUPSSORTING_DLG" -#define HID_RPT_DATETIME_DLG "REPORTDESIGN_HID_RPT_DATETIME_DLG" #define HID_RPT_CONDFORMAT_DLG "REPORTDESIGN_HID_RPT_CONDFORMAT_DLG" #define HID_RPT_CONDFORMAT_TB "REPORTDESIGN_HID_RPT_CONDFORMAT_TB" #define HID_RPT_CRTL_FORMAT_PREVIEW "REPORTDESIGN_HID_RPT_CRTL_FORMAT_PREVIEW" diff --git a/reportdesign/source/ui/dlg/DateTime.cxx b/reportdesign/source/ui/dlg/DateTime.cxx index fecfb0b6c3af..2740fdbe64fb 100644 --- a/reportdesign/source/ui/dlg/DateTime.cxx +++ b/reportdesign/source/ui/dlg/DateTime.cxx @@ -53,10 +53,10 @@ ODateTimeDialog::ODateTimeDialog( Window* _pParent ,OReportController* _pController) : ModalDialog( _pParent, "DateTimeDialog" , "modules/dbreport/ui/datetimedialog.ui" ) - ,m_aDateControlling() - ,m_aTimeControlling() - ,m_pController(_pController) - ,m_xHoldAlive(_xHoldAlive) + , m_aDateControlling() + , m_aTimeControlling() + , m_pController(_pController) + , m_xHoldAlive(_xHoldAlive) { get(m_pDate,"date"); get(m_pFTDateFormat,"datelistbox_label"); @@ -76,23 +76,21 @@ ODateTimeDialog::ODateTimeDialog( Window* _pParent InsertEntry(util::NumberFormat::DATE); InsertEntry(util::NumberFormat::TIME); } - catch(uno::Exception&) + catch (const uno::Exception&) { } - m_pDateListBox->SetDropDownLineCount(20); m_pDateListBox->SelectEntryPos(0); - m_pTimeListBox->SetDropDownLineCount(20); m_pTimeListBox->SelectEntryPos(0); // use nice enhancement, to toggle enable/disable if a checkbox is checked or not m_aDateControlling.enableOnCheckMark( *m_pDate, *m_pFTDateFormat, *m_pDateListBox); m_aTimeControlling.enableOnCheckMark( *m_pTime, *m_pFTTimeFormat, *m_pTimeListBox); - CheckBox* pCheckBoxes[] = { m_pDate,m_pTime}; - for ( size_t i = 0 ; i < sizeof(pCheckBoxes)/sizeof(pCheckBoxes[0]); ++i) - pCheckBoxes[i]->SetClickHdl(LINK(this,ODateTimeDialog,CBClickHdl)); + CheckBox* aCheckBoxes[] = { m_pDate,m_pTime}; + for ( size_t i = 0 ; i < SAL_N_ELEMENTS(aCheckBoxes); ++i) + aCheckBoxes[i]->SetClickHdl(LINK(this,ODateTimeDialog,CBClickHdl)); } // ----------------------------------------------------------------------------- @@ -165,7 +163,7 @@ short ODateTimeDialog::Execute() m_pController->executeChecked(SID_DATETIME,aValues); } - catch(uno::Exception&) + catch (const uno::Exception&) { nRet = RET_NO; } diff --git a/reportdesign/uiconfig/dbreport/ui/datetimedialog.ui b/reportdesign/uiconfig/dbreport/ui/datetimedialog.ui index 2bf61bdf331b..e8d45ffa6c9e 100644 --- a/reportdesign/uiconfig/dbreport/ui/datetimedialog.ui +++ b/reportdesign/uiconfig/dbreport/ui/datetimedialog.ui @@ -75,7 +75,8 @@ <object class="GtkGrid" id="grid2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="hexpand">True</property> + <property name="halign">start</property> + <property name="valign">start</property> <property name="vexpand">True</property> <property name="row_spacing">6</property> <property name="column_spacing">12</property> |