summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-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