summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2016-09-02 14:39:04 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2016-09-04 11:42:05 +0300
commit3317b1f7eec887f4ed1303ef0ab8b43acd200f60 (patch)
treedb42acf0d3ef83993965e4321c14ea1e75458e4e /sc
parenta57f8cb0709f7f2ff0aaf6f5be06f59c4d859074 (diff)
Restore the toggle state of the currency button
Change-Id: Ibe7d8b183038c4a925282ccab1b637342a714712
Diffstat (limited to 'sc')
-rw-r--r--sc/sdi/scalc.sdi2
-rw-r--r--sc/source/ui/view/formatsh.cxx12
2 files changed, 2 insertions, 12 deletions
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 77add5ae1996..c371c283bb35 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -3773,7 +3773,7 @@ SfxVoidItem NumberFormatCurrency SID_NUMBER_CURRENCY
Container = FALSE,
RecordAbsolute = FALSE,
RecordPerSet;
- SlotType = SfxUInt32Item
+ SlotType = SfxBoolItem
AccelConfig = TRUE,
MenuConfig = TRUE,
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 2fcce12b0741..8794ba12b2a0 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -2584,17 +2584,7 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet )
}
break;
case SID_NUMBER_CURRENCY:
- {
- const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet();
- if( SfxItemState::DONTCARE != rAttrSet.GetItemState( ATTR_VALUE_FORMAT ) )
- {
- sal_uInt32 nNumberFormat = static_cast<const SfxUInt32Item&>(
- rAttrSet.Get( ATTR_VALUE_FORMAT ) ).GetValue();
- rSet.Put( SfxUInt32Item( nWhich, nNumberFormat ) );
- }
- else
- rSet.InvalidateItem( nWhich );
- }
+ rSet.Put( SfxBoolItem(nWhich, (nType & css::util::NumberFormat::CURRENCY)) );
break;
case SID_NUMBER_SCIENTIFIC:
rSet.Put( SfxBoolItem(nWhich, (nType & css::util::NumberFormat::SCIENTIFIC)) );