oox/source/vml/vmltextboxcontext.cxx                   |    1 +
 sw/qa/extras/ooxmlimport/data/groupshape-smarttag.docx |binary
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx               |    7 +++++++
 3 files changed, 8 insertions(+)

New commits:
commit f2d1e5ef1cbae5959e818577bc6c94bed746dc90
Author: Miklos Vajna <vmik...@collabora.co.uk>
Date:   Wed Jan 22 11:17:02 2014 +0100

    VML import: parse shape text run inside w:smartTag
    
    Change-Id: I26c2f9e3f5e560f22d3de0a7378c5cd7d0413184

diff --git a/oox/source/vml/vmltextboxcontext.cxx 
b/oox/source/vml/vmltextboxcontext.cxx
index fe53d78..80cfd37 100644
--- a/oox/source/vml/vmltextboxcontext.cxx
+++ b/oox/source/vml/vmltextboxcontext.cxx
@@ -239,6 +239,7 @@ ContextHandlerRef TextBoxContext::onCreateContext( 
sal_Int32 nElement, const Att
         break;
         case OOX_TOKEN(doc, p):
         case OOX_TOKEN(doc, sdtContent):
+        case OOX_TOKEN(doc, smartTag):
             if (nElement == OOX_TOKEN(doc, r))
                 return new TextPortionContext( *this, mrTextBox, maParagraph, 
TextFontModel(), nElement, rAttribs );
             else
diff --git a/sw/qa/extras/ooxmlimport/data/groupshape-smarttag.docx 
b/sw/qa/extras/ooxmlimport/data/groupshape-smarttag.docx
new file mode 100755
index 0000000..6fc1cb2
Binary files /dev/null and 
b/sw/qa/extras/ooxmlimport/data/groupshape-smarttag.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx 
b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index cde673b..bf17257 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -981,6 +981,13 @@ DECLARE_OOXMLIMPORT_TEST(testGroupshapeChildRotation, 
"groupshape-child-rotation
     CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.TextShape"), 
xShapeDescriptor->getShapeType());
 }
 
+DECLARE_OOXMLIMPORT_TEST(testGroupshapeSmarttag, "groupshape-smarttag.docx")
+{
+    uno::Reference<drawing::XShapes> xGroupShape(getShape(1), uno::UNO_QUERY);
+    // First run of shape text was missing due to the w:smartTag wrapper 
around it.
+    CPPUNIT_ASSERT_EQUAL(OUString("Box 2"), 
uno::Reference<text::XTextRange>(xGroupShape->getByIndex(0), 
uno::UNO_QUERY)->getString());
+}
+
 DECLARE_OOXMLIMPORT_TEST(testN793262, "n793262.docx")
 {
     uno::Reference<container::XEnumerationAccess> xHeaderText = getProperty< 
uno::Reference<container::XEnumerationAccess> 
>(getStyles("PageStyles")->getByName(DEFAULT_STYLE), "HeaderText");
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to