diff options
author | Mark Hung <marklm9@gmail.com> | 2022-09-09 16:09:47 +0800 |
---|---|---|
committer | Mark Hung <marklh9@gmail.com> | 2022-09-20 18:47:53 +0200 |
commit | 11ec622b8405dcaabc359e3d6e38c8a9142dad6b (patch) | |
tree | 4cae3913734d3f92faeaed13f174801484deab1d /sw | |
parent | 424595a5997d1cbbf5ab0e3601e329efac9c2fd0 (diff) |
tdf#150642 fix table layout with vertical writing.
Revert part of 1bf82b26ae3.
N | V | WAS | 1bf82b26aea3 | WAS | 1bf82b26aea3 |
-------------------------------------------------------------------------------
F | F | fnRectHori | fnRectHori | fnAddRight/fnSubLeft | |
F | T | fnRectVert | fnRectVert | fnAddRight/fnSubLeft | |
T | F | fnRectVert | fnRectHori | fnAddRight/fnSubLeft | fnAddBottom |
T | T | fnRectHori | fnRectVert | fnAddRight/fnSubLeft | fnAddBottom | *
*: the case fixed in this patch.
Ref:
commit 1bf82b26aea3a403920a64cdfcb4671c947c7a01
Author: Mark Hung <marklm9@gmail.com>
Date: Sun Aug 14 15:23:14 2022 +0800
tdf#135991 fix unexpected hidden RTL sections.
Change-Id: I1e30c277dd03369bef0a6930b3d3534b7d57a640
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139777
Tested-by: Jenkins
Reviewed-by: Mark Hung <marklh9@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/layout/data/tdf150642.odt | bin | 0 -> 9487 bytes | |||
-rw-r--r-- | sw/qa/extras/layout/layout2.cxx | 9 | ||||
-rw-r--r-- | sw/source/core/layout/calcmove.cxx | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/sw/qa/extras/layout/data/tdf150642.odt b/sw/qa/extras/layout/data/tdf150642.odt Binary files differnew file mode 100644 index 000000000000..5e316424a289 --- /dev/null +++ b/sw/qa/extras/layout/data/tdf150642.odt diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx index 208bdf908d19..ac783be344fd 100644 --- a/sw/qa/extras/layout/layout2.cxx +++ b/sw/qa/extras/layout/layout2.cxx @@ -2382,6 +2382,15 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf135991) assertXPath(pDump, "//bounds[@top<0]", 0); } +CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf150642) +{ + createSwDoc(DATA_DIRECTORY, "tdf150642.odt"); + auto pDump = parseLayoutDump(); + // There used to be negative values that made the cell frame invisible. + assertXPath(pDump, "//bounds[@left<0]", 0); + assertXPath(pDump, "//bounds[@right<0]", 0); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index 1869794300f6..e40e1dab6ef3 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -977,7 +977,7 @@ void SwLayoutFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/) setFramePrintAreaValid(false); SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this); - if (IsNeighbourFrame()) + if (IsNeighbourFrame() && !bVert) { SwTwips nPrtHeight = (GetUpper()->getFramePrintArea().*fnRect->fnGetHeight)(); const tools::Long nDiff = nPrtHeight - (getFrameArea().*fnRect->fnGetHeight)(); |