summaryrefslogtreecommitdiffstats
path: root/writerfilter
diff options
context:
space:
mode:
authorRavindra Vidhate <ravindra.vidhate@synerzip.com>2014-04-16 15:32:43 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-04-17 10:10:37 +0200
commit2496eaa5c4535b88b44e4ac034aae6af0c08de0e (patch)
treead85d6763a1dabf1316de727c223db49dddfd11c /writerfilter
parentcoverity#1202822 Dereference null return value (diff)
downloadcore-2496eaa5c4535b88b44e4ac034aae6af0c08de0e.tar.gz
core-2496eaa5c4535b88b44e4ac034aae6af0c08de0e.zip
fdo#77219 Image property Z-index [behindDoc] not preserved after RT
Problem description: For the images who has the "Text wrapping" property set as Behind Text is not preserved after saving the file in DOCX format using LO. Reviewed on: https://gerrit.libreoffice.org/9065 Change-Id: Ic8555103909c0f1ed1cb58fba4dc2ef2f84cc9dd
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx31
1 files changed, 25 insertions, 6 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 51810b34ad86..3a6dfef31389 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1742,11 +1742,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
#endif
text::TextContentAnchorType nAnchorType(text::TextContentAnchorType_AT_PARAGRAPH);
xProps->getPropertyValue(rPropNameSupplier.GetName( PROP_ANCHOR_TYPE )) >>= nAnchorType;
-
- if (!m_bInHeaderFooterImport)
- xProps->setPropertyValue(
- rPropNameSupplier.GetName( PROP_OPAQUE ),
- uno::makeAny( true ) );
+ bool checkZOredrStatus = false;
if (xSInfo->supportsService("com.sun.star.text.TextFrame"))
{
// Extract the special "btLr text frame" mode, requested by oox, if needed.
@@ -1754,7 +1750,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
uno::Reference<beans::XPropertySet> xShapePropertySet(xShape, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aGrabBag;
xShapePropertySet->getPropertyValue("FrameInteropGrabBag") >>= aGrabBag;
- bool checkBtLrStatus = false;bool checkZOredrStatus = false;
+ bool checkBtLrStatus = false;
for (int i = 0; i < aGrabBag.getLength(); ++i)
{
@@ -1793,6 +1789,29 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
if( pos != paragraphContext->end())
xProps->setPropertyValue( rPropNameSupplier.GetName( PROP_BOTTOM_MARGIN ), (*pos).second.getValue() );
}
+ else
+ {
+ uno::Reference<beans::XPropertySet> xShapePropertySet(xShape, uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aGrabBag;
+ xShapePropertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag;
+ for (int i = 0; i < aGrabBag.getLength(); ++i)
+ {
+ if (aGrabBag[i].Name == "VML-Z-ORDER")
+ {
+ GraphicZOrderHelper* pZOrderHelper = m_rDMapper.graphicZOrderHelper();
+ sal_Int32 zOrder(0);
+ aGrabBag[i].Value >>= zOrder;
+ xShapePropertySet->setPropertyValue( "ZOrder", uno::makeAny(pZOrderHelper->findZOrder(zOrder)));
+ pZOrderHelper->addItem(xShapePropertySet, zOrder);
+ xShapePropertySet->setPropertyValue(rPropNameSupplier.GetName( PROP_OPAQUE ), uno::makeAny( false ) );
+ checkZOredrStatus = true;
+ }
+ }
+ }
+ if (!m_bInHeaderFooterImport && !checkZOredrStatus)
+ xProps->setPropertyValue(
+ rPropNameSupplier.GetName( PROP_OPAQUE ),
+ uno::makeAny( true ) );
}
}
catch ( const uno::Exception& e )