diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-01-18 17:07:43 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2018-01-30 12:57:49 +0100 |
commit | f839ea98181a1c6970fe25a82cf798dc151ed332 (patch) | |
tree | 6b52b5bb035b55fc9ec377b675c00163708bdac3 /sw/source/core/layout/paintfrm.cxx | |
parent | 9e7344ae5776117e94684713767fae1b0afbb6b9 (diff) |
fix tdf#114934 borderline feature regressions
squashing some master commits, fixes the following bugs:
- tdf#114934 which contains:
- tdf#115169: Calc: Rotated Cells not shown rotated when using
Print/PDF/PrintPreview
- tdf#113751: Borders for Merged Cells are Partially Shown
- tdf#114625: Calc can not print right border of merged cells
from LO 6.0
- tdf#114824: Export to PDF and Printing: Borders of Merged Cells
Flow to Page Footer
BorderlineFix: Need to redesign Borderline paint for Calc
To fix some errors, need to change svx::frame::Array conversion
to Primitives, especially regarding handling of merged cells.
These make problems in the currtent form where the full extended
merged cell tries to be converted. This is bad for cropped stuff
and also wrong for double-line stuff attaching to a merged cell.
The solution is to handle cells single and merge created primitives
which is more expensive but will work. This will involve special
handling for X-Ed (crossed) and 'roated' Cells. Also need to be
very careful since all this is used in the meantime for all
visualizations of Tables in multiple apps/situations.
Change-Id: If0652a3ba97a6f27dd5d782ea22b1514303f3710
BorderlineFix: Corrected missing borders in print
In Print/PDF/PrintPreview border lines were missing, this
happened for merged cells. It has to do with access to the
involved Styles and/or 'Clip' set (to avoid creating everything).
Thus a 'mixed' usage of cell and merged-cell stuff was needed.
As it turns out support for this is already there, need to use
it.
Change-Id: Ic16085b97eef5c79a4501279432f43491bca350e
BorderlineFix: Avoid BorderLines to be too prolonged
For MergedCells there was an effect that the BorderLines
were painted too far in PrintPreview/Print/PDF visualization,
found reason and changed. Checked (hopefully) all usages,
looks good.
Change-Id: I0acf8dcb20548a98533f3ab317ac72c0d0f0a947
BorderlineFix: Corrected handling for 'rotated' CellBorders
CellBorders can be rotated (including their Text) and need special
visualization that is based on an own sheared/rotated coordinate
system. Currently only possible for single cells (not merged ones)
and needs to handle all borders (also bottom-right directly in the
rotated cell, not in the neighboured ones to have the geometry,
plus avoiding these in the non-rotated neighbour cells.
Also corrected adding CellRotation data to svx::frame::Array
in calc using SetCellRotations() which now gets called in the
ScOutputData constructor to ensure it gets called in all places
where it is used.
Change-Id: I47bdfc29ba5ca76bbc07d98cb64733f867b1ee20
BorderlineFix: Fixed visual updates when scrolling
For Cells with DoubleLine the connections to perpendicular
DoubleLine-Styles may have to be displayed in a Cell which
is 'around' the orig cell in a Cell-Border of one. To represent
that and to avoid repaint errors when scrolling in, the preparation
of Primitives has to take accordingly more neighbour cells into
account. Tested this change with the usages in Calc, UI (Dialogs)
and Calc exports Print/PrintPreview/PDF. This does not affect
Tables in Writer and/or Draw/Impress.
Change-Id: I3bcc68cdf7b4fc1825a87a9773892c359421024e
BorderlineFix: Fix WriterPaint if scrolling CellTableBorders
Similar to CalcBorders in Writer the overlap regions for
FrameBorders have to be taken into account when repainting the
CellBordes of WriterTables
Change-Id: I488ba158e1de579bfb06b9c8353adaa2cac706c6
BorderlineFix: Corrected Draw/Impress TableStyle accesses
In Draw/Impress the indices for accessing the correct
neighbouring TableStyles were wrong and thus created wrong
visualizations, corrected that.
Change-Id: Iebc5f294adb62fa4c6358e2f8c27d29cc3163fbc
BorderlineFix: Use svx::frame::Array tooling in Draw/Impress
For creating the needed BorderPrimitives for TableCells for the
Tables used in Draw/Impress, adapt the ViewContactOfTableObj doing
this to use svx::frame::Array tooling now. This will correct the
error for not taking the neighboured connects for merged cells
into account and unify one more space to the same tooling.
Change-Id: I2e6f732985e9b963359f156628bd29ddfec1a80c
BorderlineFix: Corrected wrong indexing in Array initialization
Change-Id: I4222ef1c82620a05cea9f6db1a0664196cfb3bd4
Reviewed-on: https://gerrit.libreoffice.org/48891
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sw/source/core/layout/paintfrm.cxx')
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 4024f341defc..9d15ac754622 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -2489,11 +2489,33 @@ void SwTabFramePainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) cons { aRepaintRect.Height( 2 * nRepaintRectSize ); aRepaintRect.Pos().Y() -= nRepaintRectSize; + + // To decide on visibility it is also necessary to expand the RepaintRect + // to left/right according existing BorderLine overlap matchings, else there + // will be repaint errors when scrolling in e.t TripleLine BorderLines. + // aStyles[1] == aLFromT, aStyles[3] == aLFromB, aStyles[4] == aRFromT, aStyles[6] == aRFromB + if(aStyles[1].IsUsed() || aStyles[3].IsUsed() || aStyles[4].IsUsed() || aStyles[6].IsUsed()) + { + const double fLineWidthMaxLeft(std::max(aStyles[1].GetWidth(), aStyles[3].GetWidth())); + const double fLineWidthMaxRight(std::max(aStyles[4].GetWidth(), aStyles[6].GetWidth())); + aRepaintRect.Width(aRepaintRect.Width() + (fLineWidthMaxLeft + fLineWidthMaxRight)); + aRepaintRect.Pos().X() -= fLineWidthMaxLeft; + } } else { aRepaintRect.Width( 2 * nRepaintRectSize ); aRepaintRect.Pos().X() -= nRepaintRectSize; + + // Accordingly to horizontal case, but for top/bottom + // aStyles[3] == aTFromR, aStyles[1] == aTFromL, aStyles[6] == aBFromR, aStyles[4] == aBFromL + if(aStyles[3].IsUsed() || aStyles[1].IsUsed() || aStyles[6].IsUsed() || aStyles[4].IsUsed()) + { + const double fLineWidthMaxTop(std::max(aStyles[3].GetWidth(), aStyles[1].GetWidth())); + const double fLineWidthMaxBottom(std::max(aStyles[6].GetWidth(), aStyles[4].GetWidth())); + aRepaintRect.Height(aRepaintRect.Height() + (fLineWidthMaxTop + fLineWidthMaxBottom)); + aRepaintRect.Pos().Y() -= fLineWidthMaxTop; + } } if (!rRect.IsOver(aRepaintRect)) |