diff options
author | Ilhan Yesil <ilhanyesil@gmx.de> | 2018-11-13 11:20:15 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2019-01-29 12:44:51 +0100 |
commit | 49fbb60d32a7e6ebfce4a6f4754f1bc51c6bf264 (patch) | |
tree | ce049bf0d001f1f0cae7d84775d0b3bee0aec250 /svx | |
parent | 3e4478103ee1ba912d650ab447ed246f5f1cc196 (diff) |
tdf#116051 Right border visible after hiding neighbour column
Added an else statement to take into account that a hidden column
has a neighboured left column with a right border.
Change-Id: Ia415d422dd2fa305604e48cce55661408b835ea6
Reviewed-on: https://gerrit.libreoffice.org/63326
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
(cherry picked from commit 392729c735bb82eecf29bae5527ec786ca293f34)
Reviewed-on: https://gerrit.libreoffice.org/67058
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/framelinkarray.cxx | 47 |
1 files changed, 32 insertions, 15 deletions
diff --git a/svx/source/dialog/framelinkarray.cxx b/svx/source/dialog/framelinkarray.cxx index 0281c0300bfd..30f611927341 100644 --- a/svx/source/dialog/framelinkarray.cxx +++ b/svx/source/dialog/framelinkarray.cxx @@ -1060,28 +1060,30 @@ drawinglayer::primitive2d::Primitive2DContainer Array::CreateB2DPrimitiveRange( basegfx::B2DVector aX(basegfx::utils::getColumn(aCoordinateSystem, 0)); basegfx::B2DVector aY(basegfx::utils::getColumn(aCoordinateSystem, 1)); + // get needed local values + basegfx::B2DPoint aOrigin(basegfx::utils::getColumn(aCoordinateSystem, 2)); + const bool bOverlapX(rCell.mbOverlapX); + const bool bFirstCol(nCol == nFirstCol); + + // handle rotation: If cell is rotated, handle lower/right edge inside + // this local geometry due to the created CoordinateSystem already representing + // the needed transformations. + const bool bRotated(rCell.IsRotated()); + + // Additionally avoid double-handling by suppressing handling when self not rotated, + // but above/left is rotated and thus already handled. Two directly connected + // rotated will paint/create both edges, they might be rotated differently. + const bool bSupressLeft(!bRotated && nCol > nFirstCol && CELL(nCol - 1, nRow).IsRotated()); + const bool bSuppressAbove(!bRotated && nRow > nFirstRow && CELL(nCol, nRow - 1).IsRotated()); + if(!aX.equalZero() && !aY.equalZero()) { - // get needed local values - basegfx::B2DPoint aOrigin(basegfx::utils::getColumn(aCoordinateSystem, 2)); - const bool bOverlapX(rCell.mbOverlapX); + // additionally needed local values const bool bOverlapY(rCell.mbOverlapY); - const bool bFirstCol(nCol == nFirstCol); const bool bLastCol(nCol == nLastCol); const bool bFirstRow(nRow == nFirstRow); const bool bLastRow(nRow == nLastRow); - // handle rotation: If cell is rotated, handle lower/right edge inside - // this local geometry due to the created CoordinateSystem already representing - // the needed transformations. - const bool bRotated(rCell.IsRotated()); - - // Additionally avoid double-handling by suppressing handling when self not rotated, - // but above/left is rotated and thus already handled. Two directly connected - // rotated will paint/create both edges, they might be rotated differently. - const bool bSuppressAbove(!bRotated && nRow > nFirstRow && CELL(nCol, nRow - 1).IsRotated()); - const bool bSupressLeft(!bRotated && nCol > nFirstCol && CELL(nCol - 1, nRow).IsRotated()); - // create upper line for this Cell if ((!bOverlapY // true for first line in merged cells or cells || bFirstRow) // true for non_Calc usages of this tooling @@ -1220,6 +1222,21 @@ drawinglayer::primitive2d::Primitive2DContainer Array::CreateB2DPrimitiveRange( } } } + else + { + // create left line for this Cell + if ((!bOverlapX // true for first column in merged cells or cells + || bFirstCol) // true for non_Calc usages of this tooling + && !bSupressLeft) // true when left is not rotated, so edge is already handled (see bRotated) + { + const Style& rLeft(GetCellStyleLeft(nCol, nRow)); + + if (rLeft.IsUsed()) + { + HelperCreateVerticalEntry(*this, rLeft, nCol, nRow, aOrigin, aX, aY, *aData.get(), true, pForceColor); + } + } + } } } |