diff options
author | Justin Luth <justin_luth@sil.org> | 2017-09-19 14:53:41 -0400 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-09-29 09:31:11 +0200 |
commit | faea923e9c2de658dd040ce6f99c3d0207aee988 (patch) | |
tree | d94fd1df40f3068a6ff71ab8159fb0414d763424 | |
parent | 8d6dd32d58494cc21c32bc3c4798fdd4593bde08 (diff) |
tdf#112446 ooxmlimport: Orient=NONE when distance is given
Prior to commit 9920a0bf9d783978cd6f7b97f7528d8aa2571143
the style could only contain the default of NONE. So when
a position was specified, it was always paired with
HoriOrient == NONE. So it never caused problems until
that commit when the Frame's style orientation started
overriding the unset paragraph default.
When a position is specified, that needs to be paired with an
orientation of NONE in order to take effect.
Change-Id: Iab0057810270ba708a8855c2ec6db291cef17cfb
Reviewed-on: https://gerrit.libreoffice.org/42499
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Reviewed-on: https://gerrit.libreoffice.org/42837
Reviewed-by: Justin Luth <justin_luth@sil.org>
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf112446_frameStyle.docx | bin | 0 -> 18766 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 5 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 2 |
3 files changed, 7 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf112446_frameStyle.docx b/sw/qa/extras/ooxmlexport/data/tdf112446_frameStyle.docx Binary files differnew file mode 100644 index 000000000000..7c92ae36f411 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf112446_frameStyle.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx index c964aba9d43b..c37439f9410d 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx @@ -464,6 +464,11 @@ DECLARE_OOXMLEXPORT_TEST(testTdf99227, "tdf99227.docx") assertXPath(pXmlDoc, "//w:footnote[3]/w:p/w:r[5]/w:drawing", 1); } +DECLARE_OOXMLEXPORT_TEST(testTdf112446_frameStyle, "tdf112446_frameStyle.docx") +{ + CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::NONE, getProperty<sal_Int16>(getShape(1), "HoriOrient")); +} + DECLARE_OOXMLEXPORT_TEST(testTdf104162, "tdf104162.docx") { // This crashed: the comment field contained a table with a <w:hideMark/>. diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 44460d7e8fac..95ff12ec8ae7 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -764,6 +764,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val) break; case NS_ooxml::LN_CT_FramePr_x: pParaProperties->Setx( ConversionHelper::convertTwipToMM100(nIntValue )); + pParaProperties->SetxAlign( text::HoriOrientation::NONE ); break; case NS_ooxml::LN_CT_FramePr_xAlign: switch( nIntValue ) @@ -779,6 +780,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val) break; case NS_ooxml::LN_CT_FramePr_y: pParaProperties->Sety( ConversionHelper::convertTwipToMM100(nIntValue )); + pParaProperties->SetyAlign( text::VertOrientation::NONE ); break; case NS_ooxml::LN_CT_FramePr_yAlign: switch( nIntValue ) |