diff options
author | Mark Hung <marklm9@gmail.com> | 2022-09-09 16:09:47 +0800 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2022-09-21 12:54:07 +0200 |
commit | 5e3abdf6ecded4f69bc7e1bdfb9dc8300f30685d (patch) | |
tree | 05413f1ebfee0be75f5742790d03669607012cd7 | |
parent | 55900a5afdd2d5a51557712ee7f9e9e051f58301 (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>
(cherry picked from commit 11ec622b8405dcaabc359e3d6e38c8a9142dad6b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140172
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
-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 00d7a8e65a48..6bbda55706a4 100644 --- a/sw/qa/extras/layout/layout2.cxx +++ b/sw/qa/extras/layout/layout2.cxx @@ -2173,6 +2173,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)(); |