summaryrefslogtreecommitdiffstats
path: root/sc/source/ui/view
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view')
-rw-r--r--sc/source/ui/view/formatsh.cxx24
-rw-r--r--sc/source/ui/view/output2.cxx6
2 files changed, 14 insertions, 16 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)
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 7f38fe353561..c50c3c06df94 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -2958,8 +2958,8 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
for ( long nRepeat = 1; nRepeat < nRepeatCount; nRepeat++ )
aRepeated.append(aCellStr);
- nEngineWidth = SetEngineTextAndGetWidth( rParam, aRepeated.makeStringAndClear(),
- nNeededPixel, (nLeftM + nRightM ) );
+ SetEngineTextAndGetWidth( rParam, aRepeated.makeStringAndClear(),
+ nNeededPixel, (nLeftM + nRightM ) );
nEngineHeight = rParam.mpEngine->GetTextHeight();
}
@@ -2970,7 +2970,7 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
if ( rParam.mbCellIsValue && ( aAreaParam.mbLeftClip || aAreaParam.mbRightClip ) )
{
- nEngineWidth = SetEngineTextAndGetWidth( rParam, "###", nNeededPixel, ( nLeftM + nRightM ) );
+ SetEngineTextAndGetWidth( rParam, "###", nNeededPixel, ( nLeftM + nRightM ) );
// No clip marks if "###" doesn't fit (same as in DrawStrings)
}