[Libreoffice-commits] core.git: sw/qa sw/source
Justin Luth
justin_luth at sil.org
Fri Oct 20 11:21:16 UTC 2017
sw/qa/extras/ww8export/ww8export2.cxx | 1 -
sw/source/filter/ww8/wrtww8.cxx | 9 +++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
New commits:
commit 889547390ceeb8b5474f4a6245c07120e513da3f
Author: Justin Luth <justin_luth at sil.org>
Date: Thu Sep 28 18:34:31 2017 +0300
tdf#55528 ww8export: export table width percent
Confirmed in MSO 2003 and MSO2013.
Change-Id: I91362571294c3869ecd7c5fd37d2f781e2655fe6
Reviewed-on: https://gerrit.libreoffice.org/42919
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Justin Luth <justin_luth at sil.org>
diff --git a/sw/qa/extras/ww8export/ww8export2.cxx b/sw/qa/extras/ww8export/ww8export2.cxx
index 88509caf81d6..94039067e58d 100644
--- a/sw/qa/extras/ww8export/ww8export2.cxx
+++ b/sw/qa/extras/ww8export/ww8export2.cxx
@@ -59,7 +59,6 @@ DECLARE_WW8EXPORT_TEST(testTdf55528_relativeTableWidth, "tdf55528_relativeTableW
uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
-if ( !mbExported )
CPPUNIT_ASSERT_EQUAL_MESSAGE("Table relative width percent", sal_Int16(98), getProperty<sal_Int16>(xTable, "RelativeWidth"));
}
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index ea0152abefdd..6781ac5576f5 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -2414,6 +2414,15 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
SAL_INFO( "sw.ww8.level2", "<tclength>" << ( m_rWW8Export.pO->size() - npOCount ) << "</tclength>" );
}
+
+ int nWidthPercent = pFormat->GetFrameSize().GetWidthPercent();
+ // Width is in fiftieths of a percent. For sprmTTableWidth, must be non-negative and 600% max
+ if ( nWidthPercent > 0 && nWidthPercent <= 600 )
+ {
+ m_rWW8Export.InsUInt16( NS_sprm::sprmTTableWidth );
+ m_rWW8Export.pO->push_back( (sal_uInt8) /*ftsPercent*/ 2 );
+ m_rWW8Export.InsUInt16( (sal_uInt16) nWidthPercent * 50 );
+ }
}
ww8::GridColsPtr AttributeOutputBase::GetGridCols( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner )
More information about the Libreoffice-commits
mailing list