diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-09-12 15:44:28 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-09-12 15:45:05 +0100 |
commit | c8aedac356326745c69d6a458b23ca45ab25f28a (patch) | |
tree | b934793086d66e4a34eb6a12f2b766fd7b831ea8 | |
parent | 55a43f30a54816e13eb6704a8ec5952a63b01a64 (diff) |
disable thousand separator for this year spinfield
and then the manual removal of ,|. is unnecessary
Change-Id: I40d96beb895f815bb7aad9c0f36c3722b614f9a2
-rw-r--r-- | cui/source/options/optgdlg.cxx | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index a9b74a538b33..9592e852b633 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -286,6 +286,7 @@ OfaMiscTabPage::OfaMiscTabPage(vcl::Window* pParent, const SfxItemSet& rSet) } m_aStrDateInfo = m_pToYearFT->GetText(); + m_pYearValueField->SetUseThousandSep(false); m_pYearValueField->SetModifyHdl( LINK( this, OfaMiscTabPage, TwoFigureHdl ) ); Link<SpinField&,void> aLink = LINK( this, OfaMiscTabPage, TwoFigureConfigHdl ); m_pYearValueField->SetDownHdl( aLink ); @@ -406,10 +407,6 @@ IMPL_LINK_NOARG( OfaMiscTabPage, TwoFigureHdl, Edit&, void ) { OUString aOutput( m_aStrDateInfo ); OUString aStr( m_pYearValueField->GetText() ); - OUString sSep( SvtSysLocale().GetLocaleData().getNumThousandSep() ); - sal_Int32 nIndex = 0; - while ((nIndex = aStr.indexOf( sSep, nIndex)) != -1) - aStr = aStr.replaceAt( nIndex, sSep.getLength(), ""); sal_Int32 nNum = aStr.toInt32(); if ( aStr.getLength() != 4 || nNum < m_pYearValueField->GetMin() || nNum > m_pYearValueField->GetMax() ) aOutput += "????"; |