diff options
-rw-r--r-- | svx/source/dialog/framelinkarray.cxx | 12 | ||||
-rw-r--r-- | svx/source/table/viewcontactoftableobj.cxx | 4 |
2 files changed, 12 insertions, 4 deletions
diff --git a/svx/source/dialog/framelinkarray.cxx b/svx/source/dialog/framelinkarray.cxx index 16f6c09e8d91..62967b620387 100644 --- a/svx/source/dialog/framelinkarray.cxx +++ b/svx/source/dialog/framelinkarray.cxx @@ -260,6 +260,7 @@ struct ArrayImpl size_t GetMergedLastRow( size_t nCol, size_t nRow ) const; const Cell& GetMergedOriginCell( size_t nCol, size_t nRow ) const; + const Cell& GetMergedLastCell( size_t nCol, size_t nRow ) const; bool IsMergedOverlappedLeft( size_t nCol, size_t nRow ) const; bool IsMergedOverlappedRight( size_t nCol, size_t nRow ) const; @@ -343,6 +344,11 @@ const Cell& ArrayImpl::GetMergedOriginCell( size_t nCol, size_t nRow ) const return GetCell( GetMergedFirstCol( nCol, nRow ), GetMergedFirstRow( nCol, nRow ) ); } +const Cell& ArrayImpl::GetMergedLastCell( size_t nCol, size_t nRow ) const +{ + return GetCell( GetMergedLastCol( nCol, nRow ), GetMergedLastRow( nCol, nRow ) ); +} + bool ArrayImpl::IsMergedOverlappedLeft( size_t nCol, size_t nRow ) const { const Cell& rCell = GetCell( nCol, nRow ); @@ -486,6 +492,7 @@ MergedCellIterator& MergedCellIterator::operator++() #define CELL( col, row ) mxImpl->GetCell( col, row ) #define CELLACC( col, row ) mxImpl->GetCellAcc( col, row ) #define ORIGCELL( col, row ) mxImpl->GetMergedOriginCell( col, row ) +#define LASTCELL( col, row ) mxImpl->GetMergedLastCell( col, row ) Array::Array() @@ -653,7 +660,7 @@ const Style& Array::GetCellStyleRight( size_t nCol, size_t nRow ) const return ORIGCELL( nCol + 1, nRow ).GetStyleLeft(); // right clipping border: always own right style if( nCol == mxImpl->mnLastClipCol ) - return ORIGCELL( nCol, nRow ).GetStyleRight(); + return LASTCELL( nCol, nRow ).GetStyleRight(); // outside clipping columns: invisible if( !mxImpl->IsColInClipRange( nCol ) ) return OBJ_STYLE_NONE; @@ -689,7 +696,7 @@ const Style& Array::GetCellStyleBottom( size_t nCol, size_t nRow ) const return ORIGCELL( nCol, nRow + 1 ).GetStyleTop(); // bottom clipping border: always own bottom style if( nRow == mxImpl->mnLastClipRow ) - return ORIGCELL( nCol, nRow ).GetStyleBottom(); + return LASTCELL( nCol, nRow ).GetStyleBottom(); // outside clipping rows: invisible if( !mxImpl->IsRowInClipRange( nRow ) ) return OBJ_STYLE_NONE; @@ -1519,6 +1526,7 @@ drawinglayer::primitive2d::Primitive2DContainer Array::CreateB2DPrimitiveArray() } #undef ORIGCELL +#undef LASTCELL #undef CELLACC #undef CELL #undef DBG_FRAME_CHECK_ROW_1 diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx index cb2398585c63..a79882e03a52 100644 --- a/svx/source/table/viewcontactoftableobj.cxx +++ b/svx/source/table/viewcontactoftableobj.cxx @@ -259,9 +259,9 @@ namespace sdr::contact { // copy styles for current cell to CellBorderArray for primitive creation aArray.SetCellStyleLeft(aCellPos.mnCol, aCellPos.mnRow, impGetLineStyle(rTableLayouter, aCellPos.mnCol, aCellPos.mnRow, false, nColCount, nRowCount, bIsRTL)); - aArray.SetCellStyleRight(aCellPos.mnCol, aCellPos.mnRow, impGetLineStyle(rTableLayouter, aCellPos.mnCol, aCellPos.mnRow, false, nColCount, nRowCount, bIsRTL)); + aArray.SetCellStyleRight(aCellPos.mnCol, aCellPos.mnRow, impGetLineStyle(rTableLayouter, aCellPos.mnCol + 1, aCellPos.mnRow, false, nColCount, nRowCount, bIsRTL)); aArray.SetCellStyleTop(aCellPos.mnCol, aCellPos.mnRow, impGetLineStyle(rTableLayouter, aCellPos.mnCol, aCellPos.mnRow, true, nColCount, nRowCount, bIsRTL)); - aArray.SetCellStyleBottom(aCellPos.mnCol, aCellPos.mnRow, impGetLineStyle(rTableLayouter, aCellPos.mnCol, aCellPos.mnRow, true, nColCount, nRowCount, bIsRTL)); + aArray.SetCellStyleBottom(aCellPos.mnCol, aCellPos.mnRow, impGetLineStyle(rTableLayouter, aCellPos.mnCol, aCellPos.mnRow + 1, true, nColCount, nRowCount, bIsRTL)); // ignore merged cells (all except the top-left of a merged cell) if(!xCurrentCell->isMerged()) |