[Libreoffice-commits] core.git: cui/source
Caolán McNamara
caolanm at redhat.com
Tue Sep 12 14:45:32 UTC 2017
cui/source/options/optgdlg.cxx | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
New commits:
commit c8aedac356326745c69d6a458b23ca45ab25f28a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Sep 12 15:44:28 2017 +0100
disable thousand separator for this year spinfield
and then the manual removal of ,|. is unnecessary
Change-Id: I40d96beb895f815bb7aad9c0f36c3722b614f9a2
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 += "????";
More information about the Libreoffice-commits
mailing list