From 6c292d3150f414e9e16c84caba7c6b106355bf7e Mon Sep 17 00:00:00 2001 From: Matteo Casalin Date: Tue, 8 Sep 2015 01:27:54 +0200 Subject: Simplify: use getToken and just store converted integers Change-Id: I11e640307ba868b02823a7f7fa4475bc71721b23 --- sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx | 33 +++++++--------------- 1 file changed, 10 insertions(+), 23 deletions(-) (limited to 'sc') diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx index f45971160958..31a4a0671190 100644 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx @@ -249,31 +249,18 @@ void NumberFormatPropertyPanel::NotifyItemUpdate( { const SfxStringItem* pItem = static_cast(pState); OUString aCode = pItem->GetValue(); - sal_uInt16 aLen = aCode.getLength(); - OUString* sFormat = new OUString[4]; - OUString sTmpStr = ""; - sal_uInt16 nCount = 0; - sal_uInt16 nStrCount = 0; - while( nCount < aLen ) + sal_Int32 nIndex = 0; + sal_Int32 aFormat[4] = {0}; + for (size_t i=0; i(aFormat[0]); + bNegRed = static_cast(aFormat[1]); + nPrecision = static_cast(aFormat[2]); + nLeadZeroes = static_cast(aFormat[3]); } else { -- cgit