From 312cecf11c1ab8acef6ce08ccb90d5322836b08f Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 12 Dec 2017 09:18:39 +0100 Subject: tdf#113183 DOCX import: fix not independent text box alignments The alternative would be to clear them in writerfilter::dmapper::DomainMapper::getPositionOffset(), but that runs before writerfilter::dmapper::PositionHandler::lcl_sprm(), so it would be too early. Change-Id: I287b9a4025c4b1844ae467c48815b5d7ffe3f98e Reviewed-on: https://gerrit.libreoffice.org/46279 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- writerfilter/source/dmapper/GraphicHelpers.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'writerfilter') diff --git a/writerfilter/source/dmapper/GraphicHelpers.cxx b/writerfilter/source/dmapper/GraphicHelpers.cxx index 62579dbaa864..8108445d24fb 100644 --- a/writerfilter/source/dmapper/GraphicHelpers.cxx +++ b/writerfilter/source/dmapper/GraphicHelpers.cxx @@ -133,9 +133,11 @@ void PositionHandler::lcl_sprm(Sprm& rSprm) { case NS_ooxml::LN_CT_PosH_posOffset: m_nPosition = oox::drawingml::convertEmuToHmm(m_rPositionOffsets.first.toInt32()); + m_rPositionOffsets.first.clear(); break; case NS_ooxml::LN_CT_PosV_posOffset: m_nPosition = oox::drawingml::convertEmuToHmm(m_rPositionOffsets.second.toInt32()); + m_rPositionOffsets.second.clear(); break; case NS_ooxml::LN_CT_PosH_align: { @@ -150,6 +152,7 @@ void PositionHandler::lcl_sprm(Sprm& rSprm) m_nOrient = text::HoriOrientation::INSIDE; else if (rAlign == "outside") m_nOrient = text::HoriOrientation::OUTSIDE; + rAlign.clear(); break; } case NS_ooxml::LN_CT_PosV_align: @@ -165,6 +168,7 @@ void PositionHandler::lcl_sprm(Sprm& rSprm) m_nOrient = text::VertOrientation::NONE; else if (rAlign == "outside") m_nOrient = text::VertOrientation::NONE; + rAlign.clear(); break; } } -- cgit