diff options
-rw-r--r-- | sw/source/uibase/shells/drawsh.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx index e1384184f62d..80cb4c4b1c49 100644 --- a/sw/source/uibase/shells/drawsh.cxx +++ b/sw/source/uibase/shells/drawsh.cxx @@ -498,7 +498,15 @@ void SwDrawShell::GetState(SfxItemSet& rSet) SwFrmFmt* pFrmFmt = ::FindFrmFmt(pObj); // Allow creating a TextBox only in case this is a draw format without a TextBox so far. if (pFrmFmt && pFrmFmt->Which() == RES_DRAWFRMFMT && !SwTextBoxHelper::findTextBox(pFrmFmt)) - bDisable = false; + { + if (SdrObjCustomShape* pCustomShape = PTR_CAST(SdrObjCustomShape, pObj)) + { + const SdrCustomShapeGeometryItem& rGeometryItem = static_cast<const SdrCustomShapeGeometryItem&>(pCustomShape->GetMergedItem(SDRATTR_CUSTOMSHAPE_GEOMETRY)); + if (const uno::Any* pAny = rGeometryItem.GetPropertyValueByName("Type")) + // But still disallow fontwork shapes. + bDisable = pAny->get<OUString>().startsWith("fontwork-"); + } + } } if (bDisable) |