diff options
author | Eike Rathke <erack@redhat.com> | 2016-03-02 14:35:35 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-03-02 15:11:09 +0100 |
commit | 63e914719e7f8a0b75810ef6fa98c43a9bffe085 (patch) | |
tree | cea3956783cdc5516d9b87a047911c52c01281f1 /sc | |
parent | ddc363b2b2496dfe72775650d8929901ca8be5a2 (diff) |
replace wildcard/regex checkboxes with radio button group, tdf#72196
Change-Id: I505a0de789190dc7345a703ac50008276d0ed195
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/inc/tpcalc.hxx | 5 | ||||
-rw-r--r-- | sc/source/ui/optdlg/tpcalc.cxx | 19 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/optcalculatepage.ui | 30 |
3 files changed, 34 insertions, 20 deletions
diff --git a/sc/source/ui/inc/tpcalc.hxx b/sc/source/ui/inc/tpcalc.hxx index 1d99e1ea110d..806035cab52d 100644 --- a/sc/source/ui/inc/tpcalc.hxx +++ b/sc/source/ui/inc/tpcalc.hxx @@ -60,8 +60,9 @@ private: VclPtr<CheckBox> m_pBtnCase; VclPtr<CheckBox> m_pBtnCalc; VclPtr<CheckBox> m_pBtnMatch; - VclPtr<CheckBox> m_pBtnWildcards; - VclPtr<CheckBox> m_pBtnRegex; + VclPtr<RadioButton> m_pBtnWildcards; + VclPtr<RadioButton> m_pBtnRegex; + VclPtr<RadioButton> m_pBtnLiteral; VclPtr<CheckBox> m_pBtnLookUp; VclPtr<CheckBox> m_pBtnGeneralPrec; diff --git a/sc/source/ui/optdlg/tpcalc.cxx b/sc/source/ui/optdlg/tpcalc.cxx index b3fcfb707f12..74c1606b4d4a 100644 --- a/sc/source/ui/optdlg/tpcalc.cxx +++ b/sc/source/ui/optdlg/tpcalc.cxx @@ -55,8 +55,9 @@ ScTpCalcOptions::ScTpCalcOptions(vcl::Window* pParent, const SfxItemSet& rCoreAt get(m_pBtnCase, "case"); get(m_pBtnCalc, "calc"); get(m_pBtnMatch, "match"); - get(m_pBtnWildcards, "wildcards"); - get(m_pBtnRegex, "regex"); + get(m_pBtnWildcards, "formulawildcards"); + get(m_pBtnRegex, "formularegex"); + get(m_pBtnLiteral, "formulaliteral"); get(m_pBtnLookUp, "lookup"); get(m_pBtnGeneralPrec, "generalprec"); get(m_pFtPrec, "precft"); @@ -87,6 +88,7 @@ void ScTpCalcOptions::dispose() m_pBtnMatch.clear(); m_pBtnWildcards.clear(); m_pBtnRegex.clear(); + m_pBtnLiteral.clear(); m_pBtnLookUp.clear(); m_pBtnGeneralPrec.clear(); m_pFtPrec.clear(); @@ -101,8 +103,6 @@ void ScTpCalcOptions::Init() m_pBtnDateStd->SetClickHdl( LINK( this, ScTpCalcOptions, RadioClickHdl ) ); m_pBtnDateSc10->SetClickHdl( LINK( this, ScTpCalcOptions, RadioClickHdl ) ); m_pBtnDate1904->SetClickHdl( LINK( this, ScTpCalcOptions, RadioClickHdl ) ); - m_pBtnWildcards->SetClickHdl( LINK( this, ScTpCalcOptions, CheckClickHdl ) ); - m_pBtnRegex->SetClickHdl( LINK( this, ScTpCalcOptions, CheckClickHdl ) ); } VclPtr<SfxTabPage> ScTpCalcOptions::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ) @@ -125,6 +125,7 @@ void ScTpCalcOptions::Reset( const SfxItemSet* /* rCoreAttrs */ ) bRegex = false; m_pBtnWildcards->Check( bWildcards ); m_pBtnRegex->Check( bRegex ); + m_pBtnLiteral->Check( !bWildcards && !bRegex ); m_pBtnLookUp->Check( pLocalOptions->IsLookUpColRowNames() ); m_pBtnIterate->Check( pLocalOptions->IsIter() ); m_pEdSteps->SetValue( pLocalOptions->GetIterCount() ); @@ -263,16 +264,6 @@ IMPL_LINK_TYPED( ScTpCalcOptions, CheckClickHdl, Button*, p, void ) m_pFtEps->Disable(); m_pEdEps->Disable(); } } - else if (pBtn == m_pBtnWildcards) - { - if ( pBtn->IsChecked() ) - m_pBtnRegex->Check( false ); - } - else if (pBtn == m_pBtnRegex) - { - if ( pBtn->IsChecked() ) - m_pBtnWildcards->Check( false ); - } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/uiconfig/scalc/ui/optcalculatepage.ui b/sc/uiconfig/scalc/ui/optcalculatepage.ui index 6b0e1c024a79..c3b6d569e0db 100644 --- a/sc/uiconfig/scalc/ui/optcalculatepage.ui +++ b/sc/uiconfig/scalc/ui/optcalculatepage.ui @@ -92,14 +92,16 @@ </packing> </child> <child> - <object class="GtkCheckButton" id="wildcards"> + <object class="GtkRadioButton" id="formulawildcards"> <property name="label" translatable="yes">Enable w_ildcards in formulas</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> <property name="use_underline">True</property> <property name="xalign">0</property> + <property name="active">True</property> <property name="draw_indicator">True</property> + <property name="group">formularegex</property> </object> <packing> <property name="left_attach">0</property> @@ -108,14 +110,16 @@ </packing> </child> <child> - <object class="GtkCheckButton" id="regex"> + <object class="GtkRadioButton" id="formularegex"> <property name="label" translatable="yes">Enable r_egular expressions in formulas</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> <property name="use_underline">True</property> <property name="xalign">0</property> + <property name="active">True</property> <property name="draw_indicator">True</property> + <property name="group">formulaliteral</property> </object> <packing> <property name="left_attach">0</property> @@ -124,6 +128,24 @@ </packing> </child> <child> + <object class="GtkRadioButton" id="formulaliteral"> + <property name="label" translatable="yes">No wildcards or regular expressions in formulas</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <property name="group">formulawildcard</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">5</property> + <property name="width">2</property> + </packing> + </child> + <child> <object class="GtkCheckButton" id="lookup"> <property name="label" translatable="yes">_Automatically find column and row labels</property> <property name="visible">True</property> @@ -135,7 +157,7 @@ </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">5</property> + <property name="top_attach">6</property> <property name="width">2</property> </packing> </child> @@ -151,7 +173,7 @@ </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">6</property> + <property name="top_attach">7</property> </packing> </child> <child> |