summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells/drawsh.cxx
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2021-01-27 14:34:19 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2021-04-01 10:56:17 +0200
commit903902f826129705f1fafc5583a13be645e145b5 (patch)
tree2a4a1878be129d4cf6548cc03d75d4156c868c49 /sw/source/uibase/shells/drawsh.cxx
parentac8a456d7a6c1bf5b1574eeda8ea2ac41a9b32bc (diff)
Introduce Fontwork context
Change-Id: I61512e4da13514d3e5a199ccb46468ba199b808f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110023 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112274 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sw/source/uibase/shells/drawsh.cxx')
-rw-r--r--sw/source/uibase/shells/drawsh.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx
index 7589507511a9..3cf059b05929 100644
--- a/sw/source/uibase/shells/drawsh.cxx
+++ b/sw/source/uibase/shells/drawsh.cxx
@@ -32,6 +32,7 @@
#include <textboxhelper.hxx>
#include <wview.hxx>
#include <swmodule.hxx>
+#include <svx/fontworkbar.hxx>
#include <svx/svdoashp.hxx>
#include <svx/xfillit0.hxx>
@@ -531,7 +532,15 @@ SwDrawShell::SwDrawShell(SwView &_rView) :
{
SetName("Draw");
- SfxShell::SetContextName(vcl::EnumContext::GetContextName(vcl::EnumContext::Context::Draw));
+ vcl::EnumContext::Context eContext = vcl::EnumContext::Context::Draw;
+
+ SwWrtShell &rSh = GetShell();
+ SdrView* pDrView = rSh.GetDrawView();
+ sal_uInt32 nCheckStatus = 0;
+ if (pDrView && svx::checkForSelectedFontWork(pDrView, nCheckStatus))
+ eContext = vcl::EnumContext::Context::DrawFontwork;
+
+ SfxShell::SetContextName(vcl::EnumContext::GetContextName(eContext));
}
// Edit SfxRequests for FontWork