oox/source/token/properties.txt | 1 + oox/source/vml/vmlshape.cxx | 1 + sw/qa/extras/ooxmltok/data/n764005.docx |binary sw/qa/extras/ooxmltok/ooxmltok.cxx | 19 +++++++++++++++++++ writerfilter/source/dmapper/DomainMapper_Impl.cxx | 11 ++++++++--- 5 files changed, 29 insertions(+), 3 deletions(-)
New commits: commit b54499c33323000cab5e779a512c69c8fc8af626 Author: Miklos Vajna <vmik...@suse.cz> Date: Thu May 31 14:43:02 2012 +0200 n#764005 testcase Change-Id: I76f7cb8aa5b15ac03786e7294ef03ad62741987c diff --git a/sw/qa/extras/ooxmltok/data/n764005.docx b/sw/qa/extras/ooxmltok/data/n764005.docx new file mode 100644 index 0000000..1c0dd9d Binary files /dev/null and b/sw/qa/extras/ooxmltok/data/n764005.docx differ diff --git a/sw/qa/extras/ooxmltok/ooxmltok.cxx b/sw/qa/extras/ooxmltok/ooxmltok.cxx index 67d18ce..6dd7927 100644 --- a/sw/qa/extras/ooxmltok/ooxmltok.cxx +++ b/sw/qa/extras/ooxmltok/ooxmltok.cxx @@ -62,6 +62,7 @@ public: void testN750255(); void testN652364(); void testN760764(); + void testN764005(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -78,6 +79,7 @@ public: CPPUNIT_TEST(testN750255); CPPUNIT_TEST(testN652364); CPPUNIT_TEST(testN760764); + CPPUNIT_TEST(testN764005); #endif CPPUNIT_TEST_SUITE_END(); @@ -424,6 +426,23 @@ void Test::testN760764() CPPUNIT_ASSERT_EQUAL(8.f, fValue); } +void Test::testN764005() +{ + load("n764005.docx"); + + uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xPropertySet(xDraws->getByIndex(0), uno::UNO_QUERY); + + // The picture in the header wasn't absolutely positioned and wasn't in the background. + text::TextContentAnchorType eValue; + xPropertySet->getPropertyValue("AnchorType") >>= eValue; + CPPUNIT_ASSERT(eValue != text::TextContentAnchorType_AS_CHARACTER); + sal_Bool bValue = sal_True; + xPropertySet->getPropertyValue("Opaque") >>= bValue; + CPPUNIT_ASSERT_EQUAL(sal_False, bValue); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); commit 6e770b161959e909edf600ee2a7f84ba138e6955 Author: Miklos Vajna <vmik...@suse.cz> Date: Thu May 31 12:24:12 2012 +0200 n#764005 VML import of absolutely positioned pictures should not be opaque Change-Id: I17a1a94ee92ce04ff6928a20c552b3a3408a0626 diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index c476fde..2af9c8e 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -308,6 +308,7 @@ NumberingLevel NumberingRules NumberingType Offset +Opaque OpCodeMap Orientation OutputPosition diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 0a10e07..91e3d63 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -591,6 +591,7 @@ Reference< XShape > ComplexShape::implConvertAndInsert( const Reference< XShapes { aPropSet.setProperty(PROP_HoriOrientPosition, rShapeRect.X); aPropSet.setProperty(PROP_VertOrientPosition, rShapeRect.Y); + aPropSet.setProperty(PROP_Opaque, sal_False); } if ( maTypeModel.maPositionVerticalRelative == "page" ) { diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 3faf817..5aa51ef 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1529,9 +1529,10 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape if (nAnchorType == text::TextContentAnchorType_AT_PAGE) bIsGraphic = false; - xProps->setPropertyValue( - rPropNameSupplier.GetName( PROP_OPAQUE ), - uno::makeAny( true ) ); + if (nAnchorType != text::TextContentAnchorType_AT_PAGE) + xProps->setPropertyValue( + rPropNameSupplier.GetName( PROP_OPAQUE ), + uno::makeAny( true ) ); if (xSInfo->supportsService(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextFrame")))) { uno::Reference<text::XTextContent> xTextContent(xShape, uno::UNO_QUERY_THROW); commit 0a412cc13edf0904524ee2cf1e38ccc36b713065 Author: Miklos Vajna <vmik...@suse.cz> Date: Thu May 31 11:23:50 2012 +0200 n#764005 dmapper: don't insert "at page" anchored graphics as "as character" Change-Id: Ibdde32014d2fc2fe43d59a5cc6ee7f722adcbfb6 diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 01d4b46..3faf817 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1524,6 +1524,10 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape xProps->getPropertyValue(rPropNameSupplier.GetName(PROP_VERT_ORIENT_POSITION)) >>= nVertPosition; if (nHoriPosition != 0 || nVertPosition != 0) bIsGraphic = false; + text::TextContentAnchorType nAnchorType(text::TextContentAnchorType_AT_PARAGRAPH); + xProps->getPropertyValue(rPropNameSupplier.GetName( PROP_ANCHOR_TYPE )) >>= nAnchorType; + if (nAnchorType == text::TextContentAnchorType_AT_PAGE) + bIsGraphic = false; xProps->setPropertyValue( rPropNameSupplier.GetName( PROP_OPAQUE ), _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits