summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/GraphicImport.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 1d5bcbf97e74..97cc3c78fe92 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -970,7 +970,6 @@ void GraphicImport::ProcessShapeOptions(Value const & rValue)
switch( m_pImpl->nShapeOptionType )
{
case NS_ooxml::LN_CT_Anchor_distL:
- //todo: changes have to be applied depending on the orientation, see SwWW8ImplReader::AdjustLRWrapForWordMargins()
m_pImpl->nLeftMargin = nIntValue / 360;
break;
case NS_ooxml::LN_CT_Anchor_distT:
@@ -1065,6 +1064,16 @@ void GraphicImport::lcl_sprm(Sprm& rSprm)
m_pImpl->nHoriRelation = pHandler->relation();
m_pImpl->nHoriOrient = pHandler->orientation();
m_pImpl->nLeftPosition = pHandler->position();
+
+ // Left adjustments: if horizontally aligned to left of margin, then remove the
+ // left wrapping.
+ if (m_pImpl->nHoriOrient == text::HoriOrientation::LEFT)
+ {
+ if (m_pImpl->nHoriRelation == text::RelOrientation::PAGE_PRINT_AREA)
+ {
+ m_pImpl->nLeftMargin = 0;
+ }
+ }
}
}
}