Kaydet (Commit) 82beda52 authored tarafından Gulsah Kose's avatar Gulsah Kose Kaydeden (comit) Gülşah Köse

tdf#86119 Fix toggle behaviour of SID_NUMBER_STANDARD.

Change-Id: I718869c92a3a03c05b8db3fe665f5502202f434b
Signed-off-by: 's avatarGulsah Kose <gulsah.1004@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/38217Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst 4c5ce126
......@@ -110,7 +110,7 @@ interface FormatForSelection
SID_NUMBER_CURRENCY [ ExecMethod = ExecuteNumFormat; StateMethod = GetNumFormatState; ]
SID_NUMBER_PERCENT [ ExecMethod = ExecuteNumFormat; StateMethod = GetNumFormatState; ]
SID_NUMBER_TIME [ ExecMethod = ExecuteNumFormat; StateMethod = GetNumFormatState; ]
SID_NUMBER_STANDARD [ ExecMethod = ExecuteNumFormat;]
SID_NUMBER_STANDARD [ ExecMethod = ExecuteNumFormat; StateMethod = GetNumFormatState; ]
SID_NUMBER_INCDEC [ ExecMethod = ExecuteNumFormat;]
SID_NUMBER_DECDEC [ ExecMethod = ExecuteNumFormat;]
......
......@@ -1127,7 +1127,9 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
rReq.Done();
break;
case SID_NUMBER_STANDARD:
pTabViewShell->SetNumberFormat( css::util::NumberFormat::NUMBER );
if (!(nType & css::util::NumberFormat::NUMBER))
pTabViewShell->SetNumberFormat( css::util::NumberFormat::NUMBER );
rBindings.Invalidate( nSlot );
rReq.Done();
break;
case SID_NUMBER_INCDEC:
......@@ -2637,6 +2639,13 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet )
rSet.Put( SfxBoolItem(nWhich, (nType & css::util::NumberFormat::NUMBER) && nNumberFormat == 4 ) );
}
break;
case SID_NUMBER_STANDARD:
{
const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet();
sal_uInt32 nNumberFormat = static_cast<const SfxUInt32Item&>(rAttrSet.Get(ATTR_VALUE_FORMAT)).GetValue();
rSet.Put( SfxBoolItem(nWhich, (nType & css::util::NumberFormat::NUMBER) && nNumberFormat == 0 ) );
}
break;
}
nWhich = aIter.NextWhich();
}
......
......@@ -322,6 +322,7 @@ void ScTabView::InvalidateAttribs()
rBindings.Invalidate( SID_NUMBER_PERCENT );
rBindings.Invalidate( SID_NUMBER_TWODEC );
rBindings.Invalidate( SID_NUMBER_TIME );
rBindings.Invalidate( SID_NUMBER_STANDARD );
}
// SetCursor - Cursor, set, draw, update InputWin
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment