summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-03-22 10:34:24 +0100
committerMiklos Vajna <vmiklos@suse.cz>2012-03-22 11:03:26 +0100
commit51cfbf0cfaec395a99a00f2c20fcba96de9a4427 (patch)
treee4255430ae83bea9f123c10074be8bd72822294f /writerfilter
parenta75fd2d50e8c0ad82bcd0bbfeafd6a7f0153b7ba (diff)
n#751054 fix VML import of absolutely positioned pictures
There were multiple issues here: - convertEmuToHmm() not handling negative values - position:absolute style property being ignored - mso-position-vertical-relative is not converted to text::RelOrientation - SwAnchoredDrawObject::_SetPositioningAttr() re-positioning already positioned objects - DomainMapper_Impl::PushShapeContext() inserting positioned objects as character
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 2f0dd2bcf7f1..8d8187381645 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1513,6 +1513,13 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
uno::Reference< lang::XServiceInfo > xSInfo( xShape, uno::UNO_QUERY_THROW );
bool bIsGraphic = xSInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.GraphicObjectShape" ) ) );
+ // If there are position properties, the shape should not be inserted "as character".
+ sal_Int32 nHoriPosition = 0, nVertPosition = 0;
+ xProps->getPropertyValue(rPropNameSupplier.GetName(PROP_HORI_ORIENT_POSITION)) >>= nHoriPosition;
+ xProps->getPropertyValue(rPropNameSupplier.GetName(PROP_VERT_ORIENT_POSITION)) >>= nVertPosition;
+ if (nHoriPosition != 0 || nVertPosition != 0)
+ bIsGraphic = false;
+
xProps->setPropertyValue(
rPropNameSupplier.GetName( PROP_OPAQUE ),
uno::makeAny( true ) );