DOCX import: fix vertical position of inline images

(regression of commit ab81e3bff2)

Change-Id: Ie78f8be059b18cdd81c83a8d01f2d865ac3fec2b
This commit is contained in:
László Németh
2015-05-26 12:07:31 +02:00
parent 0394b69cf0
commit 2cc3adf3a5

View File

@@ -1220,6 +1220,8 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
uno::makeAny(true));
sal_Int32 nWidth = m_pImpl->nRightPosition - m_pImpl->nLeftPosition;
if (m_pImpl->eGraphicImportType == IMPORT_AS_DETECTED_ANCHOR)
{
//adjust margins
if( (m_pImpl->nHoriOrient == text::HoriOrientation::LEFT &&
(m_pImpl->nHoriRelation == text::RelOrientation::PAGE_PRINT_AREA ||
@@ -1245,7 +1247,6 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
if( m_pImpl->nVertOrient == text::VertOrientation::BOTTOM &&
m_pImpl->nVertRelation == text::RelOrientation::PAGE_PRINT_AREA )
m_pImpl->nBottomMargin = 0;
//adjust alignment
if( m_pImpl->nHoriOrient == text::HoriOrientation::INSIDE &&
m_pImpl->nHoriRelation == text::RelOrientation::PAGE_FRAME )
@@ -1283,6 +1284,7 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_CONTOUR_OUTSIDE ),
uno::makeAny(m_pImpl->bContourOutside));
m_pImpl->applyMargins(xGraphicObjectProperties);
}
if( m_pImpl->eColorMode == drawing::ColorMode_STANDARD &&
m_pImpl->nContrast == -70 &&