Kaydet (Commit) 57450afb authored tarafından Miklos Vajna's avatar Miklos Vajna

DOCX import: declare wps as a supported feature

This means in case we hit an mc:AlternateContent element, we will read
the mc:Choice branch of it, in case wps is the required feature, not the
mc:Fallback one, which contains the information in VML format (after a
lossy conversion).

Change-Id: I476156bd1a39927dda903d14540155d1e62a211e
üst ddbeaada
...@@ -2034,6 +2034,12 @@ DECLARE_OOXMLEXPORT_TEST(testOoxmlTriangle, "ooxml-triangle.docx") ...@@ -2034,6 +2034,12 @@ DECLARE_OOXMLEXPORT_TEST(testOoxmlTriangle, "ooxml-triangle.docx")
getShape(1); getShape(1);
} }
DECLARE_OOXMLEXPORT_TEST(testMce, "mce.docx")
{
// The shape is red in Word2007, green in Word2010. Check that our import follows the later.
CPPUNIT_ASSERT_EQUAL(sal_Int32(0x9bbb59), getProperty<sal_Int32>(getShape(1), "FillColor"));
}
#endif #endif
CPPUNIT_PLUGIN_IMPLEMENT(); CPPUNIT_PLUGIN_IMPLEMENT();
......
...@@ -186,7 +186,6 @@ bool OOXMLFastContextHandler::prepareMceContext(Token_t nElement, const uno::Ref ...@@ -186,7 +186,6 @@ bool OOXMLFastContextHandler::prepareMceContext(Token_t nElement, const uno::Ref
break; break;
case OOXML_Choice: case OOXML_Choice:
{ {
#if 0 // Disabled for now: enabling "wps" would introduce regressions, and SAL_N_ELEMENTS() needs at least one element.
OUString aRequires = rAttribs->getOptionalValue(OOXML_Requires); OUString aRequires = rAttribs->getOptionalValue(OOXML_Requires);
static const char* aFeatures[] = { static const char* aFeatures[] = {
"wps", "wps",
...@@ -199,9 +198,6 @@ bool OOXMLFastContextHandler::prepareMceContext(Token_t nElement, const uno::Ref ...@@ -199,9 +198,6 @@ bool OOXMLFastContextHandler::prepareMceContext(Token_t nElement, const uno::Ref
return false; return false;
} }
} }
#else
(void) rAttribs;
#endif
return true; return true;
} }
break; break;
......
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