This patch also fixes tdf#119951 and perhaps tdf#148039.
WARNING: This patch will likely resize the text line height
in every table imported from PPTX.
Someone must have figured out that Microsoft just ignores
the font metrics, and simply adds 20% to the font height
to achieve a "single spacing" line height.
In LO, that is either termed FontIndependentLineSpacing
(a misnomer because it DOES depend on the font ascent/descent)
or FixedCellHeight
(also a misnomer because it so far hasn't applied to cells/tables
and certainly is not restricted to cells/tables
since it was implemented for customShapes).
With this patch, my particular document
now has the right "text/table height" according to a PDF overlay.
The theory is that this change is needed for every document.
The reason this patch is needed is because
svx/source/table/viewcontactoftableobj.cxx's
createPrimitive2DSequenceImpl
passes rCellItemSet as the ItemSet
that will eventually be checked for
rSet.Get(SDRATTR_TEXT_USEFIXEDCELLHEIGHT),
which creates attribute::SdrTextAttribute(bFixedCellHeight)
which is used by SdrTextObj::impDecomposeBlockTextPrimitive
to set SdrOutliner (and thus EditDoc) with
SetFixedCellHeight(rSdrBlockTextPrimitive.isFixedCellHeight());
With FixedCellHeight, impedit3.cxx calculates text/line height
using ImplCalculateFontIndependentLineSpacing.
make CppunitTest_svx_unit \
CPPUNIT_TEST_NAME=testTdf165521_fixedCellHeight
I modified testTdf144092TableHeight,
and attached PDF overlay images to tdf#144092 as proof
the the table should be taller than originally stated.
Change-Id: Ibb4af395b77a3f4d30b5c2e8a08429b701f1ae95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183130
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>