Only call GetViewBindings once

Change-Id: I172937f7f2dd6a9a5b128777ea95271c565f3ae5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173437
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
Mike Kaganski
2024-09-16 16:15:40 +05:00
parent 5eab23392c
commit a462c46b2c

View File

@@ -2276,9 +2276,9 @@ void ScDocShell::GetState( SfxItemSet &rSet )
case SID_NOTEBOOKBAR:
{
if (GetViewBindings())
if (SfxBindings* pBindings = GetViewBindings())
{
bool bVisible = sfx2::SfxNotebookBar::StateMethod(*GetViewBindings(),
bool bVisible = sfx2::SfxNotebookBar::StateMethod(*pBindings,
u"modules/scalc/ui/");
rSet.Put( SfxBoolItem( SID_NOTEBOOKBAR, bVisible ) );
}