[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - oox/source sw/qa

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Tue Jan 28 09:51:14 UTC 2020


 oox/source/vml/vmlshape.cxx              |    3 +++
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx |    5 +++--
 2 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 3fffc33d2569446a1e4d43d30bcf71a4e89c1ef9
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Jan 20 21:21:17 2020 +0100
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Tue Jan 28 10:50:19 2020 +0100

    tdf#103983 VML import: handle <v:textbox style="mso-fit-shape-to-text:t">
    
    We used to always always set TextAutoGrowHeight to true, only do that
    when the matching VML attribute is detected, default to false.
    
    This helps the exporter, so it writes the correct markup on save of the
    bugdoc.
    
    Also adapt testGroupshapeChildRotation, which in practice tested the
    automatic height of the shape. The point of "auto" is that it changes as
    needed, hardcoding that value in a test is not a great idea. Rather test
    that the height is no longer automatic (there is no explicit markup in
    the file, and the default is false).
    
    (cherry picked from commit b92293b3943423324064a8513c2e114d18817179)
    
    Conflicts:
            sw/qa/extras/ooxmlimport/ooxmlimport.cxx
    
    Change-Id: Ie39408b7da53f4923a2ade503e520c704a86bcf4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87120
    Tested-by: Jenkins
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 1078fd330a64..0771d9ecda61 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -793,6 +793,9 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes
                 xShape->setSize(aSize);
             }
         }
+
+        PropertySet(xShape).setAnyProperty(PROP_TextAutoGrowHeight,
+                                           makeAny(maTypeModel.mbAutoHeight));
     }
 
     // Import Legacy Fragments (if any)
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 26b0b56eacae..877bc929c4b2 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -568,8 +568,9 @@ DECLARE_OOXMLIMPORT_TEST(testGroupshapeChildRotation, "groupshape-child-rotation
 
 #if HAVE_MORE_FONTS
     xShape.set(xGroupShape->getByIndex(4), uno::UNO_QUERY);
-    // This was 887, i.e. border distances were included in the height.
-    CPPUNIT_ASSERT_EQUAL(sal_Int32(686), xShape->getSize().Height);
+    // This was true, a VML textbox without <v:textbox style="mso-fit-shape-to-text:t"> had
+    // auto-grow on.
+    CPPUNIT_ASSERT(!getProperty<bool>(xShape, "TextAutoGrowHeight"));
 #endif
 
     uno::Reference<drawing::XShapeDescriptor> xShapeDescriptor(xGroupShape->getByIndex(5), uno::UNO_QUERY);


More information about the Libreoffice-commits mailing list