Kaydet (Commit) b642999b authored tarafından Justin Luth's avatar Justin Luth Kaydeden (comit) Miklos Vajna

tdf#112446 ooxmlimport: Orient=NONE when distance is given

Prior to commit 9920a0bf
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/42499Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 2f066d6a
......@@ -586,6 +586,11 @@ DECLARE_OOXMLEXPORT_TEST(testTdf37153, "tdf37153_considerWrapOnObjPos.docx")
CPPUNIT_ASSERT_MESSAGE("TextTop should be 3856", nTextTop > 3000);
}
DECLARE_OOXMLEXPORT_TEST(testTdf112446_frameStyle, "tdf112446_frameStyle.docx")
{
CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::NONE, getProperty<sal_Int16>(getShape(1), "HoriOrient"));
}
DECLARE_OOXMLEXPORT_TEST(testTdf82173_footnoteStyle, "tdf82173_footnoteStyle.docx")
{
uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
......
......@@ -765,6 +765,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 )
......@@ -780,6 +781,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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment