From 63e914719e7f8a0b75810ef6fa98c43a9bffe085 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Wed, 2 Mar 2016 14:35:35 +0100 Subject: [PATCH] replace wildcard/regex checkboxes with radio button group, tdf#72196 Change-Id: I505a0de789190dc7345a703ac50008276d0ed195 --- sc/source/ui/inc/tpcalc.hxx | 5 ++-- sc/source/ui/optdlg/tpcalc.cxx | 19 ++++----------- 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 m_pBtnCase; VclPtr m_pBtnCalc; VclPtr m_pBtnMatch; - VclPtr m_pBtnWildcards; - VclPtr m_pBtnRegex; + VclPtr m_pBtnWildcards; + VclPtr m_pBtnRegex; + VclPtr m_pBtnLiteral; VclPtr m_pBtnLookUp; VclPtr 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 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 @@ - + Enable w_ildcards in formulas True True False True 0 + True True + formularegex 0 @@ -108,14 +110,16 @@ - + Enable r_egular expressions in formulas True True False True 0 + True True + formulaliteral 0 @@ -123,6 +127,24 @@ 2 + + + No wildcards or regular expressions in formulas + True + True + False + True + 0 + True + True + formulawildcard + + + 0 + 5 + 2 + + _Automatically find column and row labels @@ -135,7 +157,7 @@ 0 - 5 + 6 2 @@ -151,7 +173,7 @@ 0 - 6 + 7