sc/source/ui/view/formatsh.cxx |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

New commits:
commit 33a720ab802491f15b247e09755cd36205b6f435
Author:     Eike Rathke <er...@redhat.com>
AuthorDate: Mon Jun 15 19:45:56 2020 +0200
Commit:     Eike Rathke <er...@redhat.com>
CommitDate: Tue Jun 16 01:50:33 2020 +0200

    Use SvNumberformat::GetMaskedType()
    
    ... instead of testing SvNumFormatType::DEFINED for each type
    individually.
    
    Change-Id: I539ad1c9a6b17ed788c26b75b7e673aaae3a6a2f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96389
    Tested-by: Jenkins
    Reviewed-by: Eike Rathke <er...@redhat.com>

diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index dc685f4996e6..5f4f407d2485 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -1163,23 +1163,17 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
                     break;
 
                 LanguageType eLanguage = pEntry->GetLanguage();
-                SvNumFormatType eType = pEntry->GetType();
+                SvNumFormatType eType = pEntry->GetMaskedType();
 
                 //Just use eType to judge whether the command is fired for 
NUMBER/PERCENT/CURRENCY/SCIENTIFIC/FRACTION/TIME
                 //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::TIME
-                     || eType == (SvNumFormatType::TIME | 
SvNumFormatType::DEFINED)
-                     || eType == SvNumFormatType::FRACTION
-                     || eType == (SvNumFormatType::FRACTION | 
SvNumFormatType::DEFINED)))
+                     || eType == SvNumFormatType::FRACTION))
                     pEntry = nullptr;
 
                 if(SfxItemState::SET == pReqArgs->GetItemState(nSlot, true, 
&pItem) && pEntry)
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to