Kaydet (Commit) 826d133c authored tarafından Miklos Vajna's avatar Miklos Vajna

drawingml import: handle w:b (found in docx groupshape textboxes)

Change-Id: I105d068a6b8d454fac963cd30f6f812cf2b96170
üst f5b3a728
...@@ -114,6 +114,8 @@ ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 aElementToken, const ...@@ -114,6 +114,8 @@ ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 aElementToken, const
mpShapePtr->setTextBody( TextBodyPtr(new TextBody) ); mpShapePtr->setTextBody( TextBodyPtr(new TextBody) );
return new TextBodyPropertiesContext( *this, rAttribs, mpShapePtr->getTextBody()->getTextProperties() ); return new TextBodyPropertiesContext( *this, rAttribs, mpShapePtr->getTextBody()->getTextProperties() );
break; break;
case XML_txbx:
break;
default: default:
SAL_WARN("oox", "ShapeContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken)); SAL_WARN("oox", "ShapeContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken));
break; break;
......
...@@ -133,6 +133,7 @@ ContextHandlerRef TextCharacterPropertiesContext::onCreateContext( sal_Int32 aEl ...@@ -133,6 +133,7 @@ ContextHandlerRef TextCharacterPropertiesContext::onCreateContext( sal_Int32 aEl
case OOX_TOKEN( doc, rFonts ): case OOX_TOKEN( doc, rFonts ):
break; break;
case OOX_TOKEN( doc, b ): case OOX_TOKEN( doc, b ):
mrTextCharacterProperties.moBold = rAttribs.getBool(OOX_TOKEN( doc, val ), true);
break; break;
case OOX_TOKEN( doc, bCs ): case OOX_TOKEN( doc, bCs ):
break; break;
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#if !defined(WNT) #if !defined(WNT)
#include <com/sun/star/awt/XBitmap.hpp> #include <com/sun/star/awt/XBitmap.hpp>
#include <com/sun/star/awt/FontWeight.hpp>
#include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/document/XEmbeddedObjectSupplier2.hpp> #include <com/sun/star/document/XEmbeddedObjectSupplier2.hpp>
#include <com/sun/star/drawing/XControlShape.hpp> #include <com/sun/star/drawing/XControlShape.hpp>
...@@ -1614,6 +1615,7 @@ DECLARE_OOXMLIMPORT_TEST(testMceNested, "mce-nested.docx") ...@@ -1614,6 +1615,7 @@ DECLARE_OOXMLIMPORT_TEST(testMceNested, "mce-nested.docx")
uno::Reference<text::XTextRange> xParagraph = getParagraphOfText(1, xText, "[Year]"); uno::Reference<text::XTextRange> xParagraph = getParagraphOfText(1, xText, "[Year]");
CPPUNIT_ASSERT_EQUAL(48.f, getProperty<float>(getRun(xParagraph, 1), "CharHeight")); CPPUNIT_ASSERT_EQUAL(48.f, getProperty<float>(getRun(xParagraph, 1), "CharHeight"));
CPPUNIT_ASSERT_EQUAL(sal_Int32(0xffffff), getProperty<sal_Int32>(getRun(xParagraph, 1), "CharColor")); CPPUNIT_ASSERT_EQUAL(sal_Int32(0xffffff), getProperty<sal_Int32>(getRun(xParagraph, 1), "CharColor"));
CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(getRun(xParagraph, 1), "CharWeight"));
CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_BOTTOM, getProperty<drawing::TextVerticalAdjust>(xGroup->getByIndex(1), "TextVerticalAdjust")); CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_BOTTOM, getProperty<drawing::TextVerticalAdjust>(xGroup->getByIndex(1), "TextVerticalAdjust"));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment