summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-05-29 15:30:25 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-05-29 17:13:30 +0200
commit682849828330f959d3a6cd63a45e1e979a1bd24c (patch)
tree93c187d0c580c3b1941e2e599c9ebe7c5b1964ec
parentb81cd3d1162f70b548b619fa92ce81275679bdbd (diff)
SwXShape::getPropertyStates(): handle textboxes
Change-Id: I5286a48e5e5dcb0140f1dcf5a5ae733e3881d2b2
-rw-r--r--sw/source/core/unocore/unodraw.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index a81ff0938a96..e3f787cd00ed 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -1778,6 +1778,14 @@ uno::Sequence< beans::PropertyState > SwXShape::getPropertyStates(
(pEntry->nMemberId == MID_FRMSIZE_REL_HEIGHT_RELATION ||
pEntry->nMemberId == MID_FRMSIZE_REL_WIDTH_RELATION))
pRet[nProperty] = beans::PropertyState_DIRECT_VALUE;
+ else if (pEntry->nWID == FN_TEXT_BOX)
+ {
+ // The TextBox property is set, if we can find a textbox for this shape.
+ if (pFmt && SwTextBoxHelper::findTextBox(pFmt))
+ pRet[nProperty] = beans::PropertyState_DIRECT_VALUE;
+ else
+ pRet[nProperty] = beans::PropertyState_DEFAULT_VALUE;
+ }
else if(pFmt)
{
const SwAttrSet& rSet = pFmt->GetAttrSet();