fdo#63685 wp:inline's distT/B/L/R is in EMU's, not twips
Regression from 3d7e168a2a43c2414b0633379102ddb29437e75b. Change-Id: I9ab3f9f41316a01d5a74f3e500bad7a83c8d2dca
This commit is contained in:
parent
5df981a2a2
commit
a88ac70840
BIN
sw/qa/extras/ooxmlimport/data/fdo63685.docx
Normal file
BIN
sw/qa/extras/ooxmlimport/data/fdo63685.docx
Normal file
Binary file not shown.
@ -125,6 +125,7 @@ public:
|
||||
void testFdo59273();
|
||||
void testTableWidth();
|
||||
void testConditionalstylesTbllook();
|
||||
void testFdo63685();
|
||||
|
||||
CPPUNIT_TEST_SUITE(Test);
|
||||
#if !defined(MACOSX) && !defined(WNT)
|
||||
@ -201,6 +202,7 @@ void Test::run()
|
||||
{"fdo59273.docx", &Test::testFdo59273},
|
||||
{"table_width.docx", &Test::testTableWidth},
|
||||
{"conditionalstyles-tbllook.docx", &Test::testConditionalstylesTbllook},
|
||||
{"fdo63685.docx", &Test::testFdo63685},
|
||||
};
|
||||
header();
|
||||
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
|
||||
@ -1324,6 +1326,14 @@ void Test::testConditionalstylesTbllook()
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(0x7F7F7F), getProperty<sal_Int32>(xTable->getCellByName("A1"), "BackColor"));
|
||||
}
|
||||
|
||||
void Test::testFdo63685()
|
||||
{
|
||||
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY);
|
||||
// Was 85697, i.e. original 114120 was converted to mm100 from twips, not from EMUs.
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(318), getProperty<sal_Int32>(xDraws->getByIndex(0), "TopMargin"));
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
|
||||
|
||||
CPPUNIT_PLUGIN_IMPLEMENT();
|
||||
|
@ -991,16 +991,16 @@ void GraphicImport::lcl_attribute(Id nName, Value & val)
|
||||
}
|
||||
break;
|
||||
case NS_ooxml::LN_CT_Inline_distT:
|
||||
m_pImpl->nTopMargin = ConversionHelper::convertTwipToMM100(nIntValue);
|
||||
m_pImpl->nTopMargin = ConversionHelper::convertEMUToMM100(nIntValue);
|
||||
break;
|
||||
case NS_ooxml::LN_CT_Inline_distB:
|
||||
m_pImpl->nBottomMargin = ConversionHelper::convertTwipToMM100(nIntValue);
|
||||
m_pImpl->nBottomMargin = ConversionHelper::convertEMUToMM100(nIntValue);
|
||||
break;
|
||||
case NS_ooxml::LN_CT_Inline_distL:
|
||||
m_pImpl->nLeftMargin = ConversionHelper::convertTwipToMM100(nIntValue);
|
||||
m_pImpl->nLeftMargin = ConversionHelper::convertEMUToMM100(nIntValue);
|
||||
break;
|
||||
case NS_ooxml::LN_CT_Inline_distR:
|
||||
m_pImpl->nRightMargin = ConversionHelper::convertTwipToMM100(nIntValue);
|
||||
m_pImpl->nRightMargin = ConversionHelper::convertEMUToMM100(nIntValue);
|
||||
break;
|
||||
case NS_ooxml::LN_CT_GraphicalObjectData_uri:
|
||||
val.getString();
|
||||
|
Loading…
x
Reference in New Issue
Block a user