From 0bb0299b29960c3a27427eba5d5fc34e5e913a8b Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Sat, 9 Dec 2017 00:09:00 +0100 Subject: Name it what it is, the format category for the sidebar Change-Id: Ice6bbfc5f9412ba2d7bce7fb63782a12b48304a1 --- sc/source/ui/view/formatsh.cxx | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'sc') diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index dda99fc78495..0716ff89a815 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -2604,7 +2604,7 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet ) case SID_NUMBER_TYPE_FORMAT: { - sal_Int16 aFormatCode = -1; + sal_Int16 nFormatCategory = -1; if ( eItemState >= SfxItemState::DEFAULT ) //Modify for more robust { switch(nType) @@ -2612,43 +2612,43 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet ) case css::util::NumberFormat::NUMBER: // Determine if General format. if ((nNumberFormat % SV_COUNTRY_LANGUAGE_OFFSET) == 0) - aFormatCode = 0; + nFormatCategory = 0; else - aFormatCode = 1; + nFormatCategory = 1; break; case css::util::NumberFormat::PERCENT: - aFormatCode = 2; + nFormatCategory = 2; break; case css::util::NumberFormat::CURRENCY: - aFormatCode = 3; + nFormatCategory = 3; break; case css::util::NumberFormat::DATE: //Add case css::util::NumberFormat::DATETIME: - aFormatCode = 4; + nFormatCategory = 4; break; case css::util::NumberFormat::TIME: - aFormatCode = 5; + nFormatCategory = 5; break; case css::util::NumberFormat::SCIENTIFIC: - aFormatCode = 6; + nFormatCategory = 6; break; case css::util::NumberFormat::FRACTION: - aFormatCode = 7; + nFormatCategory = 7; break; case css::util::NumberFormat::LOGICAL: - aFormatCode = 8; + nFormatCategory = 8; break; case css::util::NumberFormat::TEXT: - aFormatCode = 9; + nFormatCategory = 9; break; default: - aFormatCode = -1; //for more robust + nFormatCategory = -1; //for more robust } - if( aFormatCode == -1 ) + if( nFormatCategory == -1 ) rSet.InvalidateItem( nWhich ); else - rSet.Put( SfxInt16Item( nWhich, aFormatCode ) ); + rSet.Put( SfxInt16Item( nWhich, nFormatCategory ) ); } else { -- cgit