diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-05-31 14:19:39 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-05-31 14:39:35 +0100 |
commit | a7feb6f570f75c63c3fd0be4d0e9808a6b52292f (patch) | |
tree | a2dff901c5b12115e2f34b65573ca666b08b0927 | |
parent | a20b8dce7985e0b78201c4d7adb207d167117b08 (diff) |
post .ui conversion old mad manual placement code can go
with pleasing knock on effects of then unused class
members
also add an adjustment to keep the original 1-1024
range for number of worksheets
Change-Id: I9cfdff60a763b81cb0632ea5d4ccf382334da24c
-rw-r--r-- | sc/source/ui/inc/tpdefaults.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/optdlg/tpdefaults.cxx | 20 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/optdefaultpage.ui | 10 |
3 files changed, 9 insertions, 23 deletions
diff --git a/sc/source/ui/inc/tpdefaults.hxx b/sc/source/ui/inc/tpdefaults.hxx index 850ecda968c5..dce6fc18652f 100644 --- a/sc/source/ui/inc/tpdefaults.hxx +++ b/sc/source/ui/inc/tpdefaults.hxx @@ -38,9 +38,7 @@ private: DECL_LINK( PrefixEditOnFocusHdl, Edit* ); private: - FixedText* m_pFtNSheets; NumericField* m_pEdNSheets; - FixedText* m_pFtSheetPrefix; Edit* m_pEdSheetPrefix; // Stores old Sheet Prefix diff --git a/sc/source/ui/optdlg/tpdefaults.cxx b/sc/source/ui/optdlg/tpdefaults.cxx index 06a75cd3625b..1d91d5c00e21 100644 --- a/sc/source/ui/optdlg/tpdefaults.cxx +++ b/sc/source/ui/optdlg/tpdefaults.cxx @@ -22,29 +22,9 @@ ScTpDefaultsOptions::ScTpDefaultsOptions(Window *pParent, const SfxItemSet &rCor SfxTabPage(pParent, "OptDefaultPage", "modules/scalc/ui/optdefaultpage.ui", rCoreSet) { - get( m_pFtNSheets, "textsheetsnumber"); get( m_pEdNSheets, "sheetsnumber"); - get( m_pFtSheetPrefix, "textsheetprefix"); get( m_pEdSheetPrefix, "sheetprefix"); - // the following computation must be modified accordingly if a third line is added to this dialog - long nTxtW1 = m_pFtNSheets->GetCtrlTextWidth( m_pFtNSheets->GetText() ); - long nCtrlW1 = m_pFtNSheets->GetSizePixel().Width(); - long nTxtW2 = m_pFtSheetPrefix->GetCtrlTextWidth(m_pFtSheetPrefix->GetText() ); - long nCtrlW2 = m_pFtSheetPrefix->GetSizePixel().Width(); - if ( nTxtW1 >= nCtrlW1 || nTxtW2 >= nCtrlW2) - { - long nTxtW = std::max(nTxtW1,nTxtW2); - Size aNewSize = m_pFtNSheets->GetSizePixel(); - aNewSize.Width() = nTxtW; - m_pFtNSheets->SetSizePixel( aNewSize ); - m_pFtSheetPrefix->SetSizePixel( aNewSize ); - Point aNewPoint = m_pEdNSheets->GetPosPixel(); - aNewPoint.X() += (nTxtW - nCtrlW1); - m_pEdNSheets->SetPosPixel( aNewPoint ); - aNewPoint.Y() = m_pEdSheetPrefix->GetPosPixel().Y(); - m_pEdSheetPrefix->SetPosPixel( aNewPoint ); - } m_pEdNSheets->SetModifyHdl( LINK(this, ScTpDefaultsOptions, NumModifiedHdl) ); m_pEdSheetPrefix->SetModifyHdl( LINK(this, ScTpDefaultsOptions, PrefixModifiedHdl) ); m_pEdSheetPrefix->SetGetFocusHdl( LINK(this, ScTpDefaultsOptions, PrefixEditOnFocusHdl) ); diff --git a/sc/uiconfig/scalc/ui/optdefaultpage.ui b/sc/uiconfig/scalc/ui/optdefaultpage.ui index ac0b8ad86cdc..34416057ef3c 100644 --- a/sc/uiconfig/scalc/ui/optdefaultpage.ui +++ b/sc/uiconfig/scalc/ui/optdefaultpage.ui @@ -1,12 +1,18 @@ <?xml version="1.0" encoding="UTF-8"?> <interface> <!-- interface-requires gtk+ 3.0 --> + <object class="GtkAdjustment" id="adjustment1"> + <property name="lower">1</property> + <property name="upper">32000</property> + <property name="value">1</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> <object class="GtkBox" id="OptDefaultPage"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="border_width">6</property> <property name="orientation">vertical</property> - <property name="spacing">12</property> <child> <object class="GtkFrame" id="frame1"> <property name="visible">True</property> @@ -74,8 +80,10 @@ <object class="GtkSpinButton" id="sheetsnumber"> <property name="visible">True</property> <property name="can_focus">True</property> + <property name="halign">start</property> <property name="invisible_char">●</property> <property name="invisible_char_set">True</property> + <property name="adjustment">adjustment1</property> <property name="climb_rate">1</property> <property name="update_policy">if-valid</property> </object> |