[Libreoffice-commits] core.git: sw/source

Miklos Vajna vmiklos at collabora.co.uk
Thu May 29 08:13:56 PDT 2014


 sw/source/core/unocore/unodraw.cxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 682849828330f959d3a6cd63a45e1e979a1bd24c
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu May 29 15:30:25 2014 +0200

    SwXShape::getPropertyStates(): handle textboxes
    
    Change-Id: I5286a48e5e5dcb0140f1dcf5a5ae733e3881d2b2

diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index a81ff09..e3f787c 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();


More information about the Libreoffice-commits mailing list