diff options
Diffstat (limited to 'sc/source/ui/view/formatsh.cxx')
-rw-r--r-- | sc/source/ui/view/formatsh.cxx | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index 3ed5a2a48208..a83db735127c 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -1169,19 +1169,17 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq ) //Just use eType to judge whether the command is fired for NUMBER/PERCENT/CURRENCY/SCIENTIFIC/FRACTION //In sidebar, users can fire SID_NUMBER_FORMAT command by operating the related UI controls before they are disable - if(eType == SvNumFormatType::ALL - || eType == SvNumFormatType::NUMBER - || eType == (SvNumFormatType::NUMBER | SvNumFormatType::DEFINED) - || eType == SvNumFormatType::PERCENT - || eType == (SvNumFormatType::PERCENT | SvNumFormatType::DEFINED) - || eType == SvNumFormatType::CURRENCY - || eType == (SvNumFormatType::CURRENCY | SvNumFormatType::DEFINED) - || eType == SvNumFormatType::SCIENTIFIC - || eType == (SvNumFormatType::SCIENTIFIC | SvNumFormatType::DEFINED) - || eType == SvNumFormatType::FRACTION - || eType == (SvNumFormatType::FRACTION | SvNumFormatType::DEFINED)) - eType = SvNumFormatType::ALL; - else + if(!(eType == SvNumFormatType::ALL + || eType == SvNumFormatType::NUMBER + || eType == (SvNumFormatType::NUMBER | SvNumFormatType::DEFINED) + || eType == SvNumFormatType::PERCENT + || eType == (SvNumFormatType::PERCENT | SvNumFormatType::DEFINED) + || eType == SvNumFormatType::CURRENCY + || eType == (SvNumFormatType::CURRENCY | SvNumFormatType::DEFINED) + || eType == SvNumFormatType::SCIENTIFIC + || eType == (SvNumFormatType::SCIENTIFIC | SvNumFormatType::DEFINED) + || eType == SvNumFormatType::FRACTION + || eType == (SvNumFormatType::FRACTION | SvNumFormatType::DEFINED))) pEntry = nullptr; if(SfxItemState::SET == pReqArgs->GetItemState(nSlot, true, &pItem) && pEntry) |