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

Miklos Vajna vmiklos at collabora.co.uk
Thu Jun 26 07:44:54 PDT 2014


 sw/source/core/doc/textboxhelper.cxx |   14 ++++++++++++--
 sw/source/core/docnode/nodedump.cxx  |    3 +++
 2 files changed, 15 insertions(+), 2 deletions(-)

New commits:
commit 63da79385ad858f5040f8d0a8898d3b5be5e4f93
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Jun 26 15:51:50 2014 +0200

    SwTextBoxHelper::syncProperty: handle TextAutoGrowHeight
    
    This propagates the "to shape to text" property of the shape to the
    textbox, and the textbox is already layouted accordingly, but not the
    shape yet. (As the shape thinks it has no text.)
    
    Change-Id: I1fdf0d5743bcb201f112a4c5db18924210858cea

diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index e0fbd5d..e93aae7 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -320,6 +320,8 @@ void SwTextBoxHelper::syncProperty(SwFrmFmt* pShape, const OUString& rPropertyNa
     }
     else if (rPropertyName == UNO_NAME_TEXT_VERT_ADJUST)
         syncProperty(pShape, RES_TEXT_VERT_ADJUST, 0, rValue);
+    else if (rPropertyName == UNO_NAME_TEXT_AUTOGROWHEIGHT)
+        syncProperty(pShape, RES_FRM_SIZE, MID_FRMSIZE_IS_AUTO_HEIGHT, rValue);
 }
 
 void SwTextBoxHelper::getProperty(SwFrmFmt* pShape, sal_uInt16 nWID, sal_uInt8 nMemberId, css::uno::Any& rValue)
@@ -398,8 +400,16 @@ void SwTextBoxHelper::syncProperty(SwFrmFmt* pShape, sal_uInt16 nWID, sal_uInt8
             }
             break;
         case RES_FRM_SIZE:
-            aPropertyName = UNO_NAME_SIZE;
-            bAdjustSize = true;
+            switch (nMemberId)
+            {
+            case MID_FRMSIZE_IS_AUTO_HEIGHT:
+                aPropertyName = UNO_NAME_FRAME_ISAUTOMATIC_HEIGHT;
+                break;
+            default:
+                aPropertyName = UNO_NAME_SIZE;
+                bAdjustSize = true;
+                break;
+            }
             break;
         case RES_ANCHOR:
             switch (nMemberId)
commit d89d8169716a748c098108eaada789206bb722c3
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Jun 26 15:50:41 2014 +0200

    sw doc model xml dump: handle SwFmtFrmSize
    
    Change-Id: Ie1a8dbc86c9725f3d238226c166ec657722c1770

diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index df9a8fb..248aa06 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -21,6 +21,7 @@
 #include "fmtautofmt.hxx"
 #include "fmtcntnt.hxx"
 #include "fmtornt.hxx"
+#include "fmtfsize.hxx"
 #include "charfmt.hxx"
 #include "frmfmt.hxx"
 #include "fmtanchr.hxx"
@@ -413,6 +414,8 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
             case RES_FRM_SIZE:
             {
                 pWhich = "frame size";
+                const SwFmtFrmSize* pSize = static_cast<const SwFmtFrmSize*>(pItem);
+                oValue = "height size type: " + OString::number(pSize->GetHeightSizeType()) + ", width size type: " + OString::number(pSize->GetWidthSizeType());
                 break;
             }
             case RES_VERT_ORIENT:


More information about the Libreoffice-commits mailing list