summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorArmin Le Grand (Allotropia) <armin.le.grand@me.com>2021-06-10 19:24:04 +0200
committerArmin Le Grand <Armin.Le.Grand@me.com>2021-06-11 09:40:45 +0200
commit552ceeb5c6ccf2573adfd092cc4b2ce214a9c2df (patch)
treee6f7f91789922c087ac5be9d108011b47d045f0e /sw/source/uibase
parent5c3ad59612697cf0afee0f836e9ee77f0920356b (diff)
tdf#130428 remove unnecessary usage of SfxItemState::UNKNOWN
FontworkBar::getState does not need to check for SfxItemState::UNKNOWN at all, actions solely depend on FontWork object being selected. This also greatly simplifies that method. Also, the optimization by passing in a variable to checkForSelectedFontWork and remember if already computed can be removed - also in other places where it had to be given, but was not re-used at all Change-Id: I35b1f36195feb1d645619665d2dd65a84b75b118 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117014 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/shells/drawsh.cxx4
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx
index bd1e50e26871..80b8c1eee379 100644
--- a/sw/source/uibase/shells/drawsh.cxx
+++ b/sw/source/uibase/shells/drawsh.cxx
@@ -545,8 +545,8 @@ SwDrawShell::SwDrawShell(SwView &_rView) :
SwWrtShell &rSh = GetShell();
SdrView* pDrView = rSh.GetDrawView();
- sal_uInt32 nCheckStatus = 0;
- if (pDrView && svx::checkForSelectedFontWork(pDrView, nCheckStatus))
+
+ if (pDrView && svx::checkForSelectedFontWork(pDrView))
eContext = vcl::EnumContext::Context::DrawFontwork;
SfxShell::SetContextName(vcl::EnumContext::GetContextName(eContext));
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index d32a6154146d..4eb96467fc80 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -1465,8 +1465,8 @@ SelectionType SwWrtShell::GetSelectionType() const
{
nCnt |= SelectionType::ExtrudedCustomShape;
}
- sal_uInt32 nCheckStatus = 0;
- if (svx::checkForSelectedFontWork( GetDrawView(), nCheckStatus ))
+
+ if (svx::checkForSelectedFontWork( GetDrawView() ))
{
nCnt |= SelectionType::FontWork;
}