summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/frmedt/fetab.cxx4
-rw-r--r--sw/source/core/table/swnewtable.cxx9
2 files changed, 10 insertions, 3 deletions
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index 79f5eb6b5e58..33b9c9327b6d 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -2116,8 +2116,8 @@ SwTab SwFEShell::WhichMouseTabCol( const Point &rPt ) const
{
while( pFrame && pFrame->Lower() && pFrame->Lower()->IsRowFrame() )
pFrame = static_cast<const SwCellFrame*>(static_cast<const SwLayoutFrame*>(pFrame->Lower())->Lower());
- if( pFrame && pFrame->GetTabBox()->GetSttNd() &&
- pFrame->GetTabBox()->GetSttNd()->IsInProtectSect() )
+ if( pFrame && ((pFrame->GetTabBox()->GetSttNd() &&
+ pFrame->GetTabBox()->GetSttNd()->IsInProtectSect()) || (pFrame->GetTabBox()->getRowSpan() < 0)))
pFrame = nullptr;
}
diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx
index ac057a7ae938..a8b7e0e0d233 100644
--- a/sw/source/core/table/swnewtable.cxx
+++ b/sw/source/core/table/swnewtable.cxx
@@ -1739,7 +1739,11 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
rBoxes.insert( pBox );
if( nFound )
{
- nBottom = nRow;
+ //if box is hiding cells bottom needs to be moved
+ if (pBox->getRowSpan() > 1)
+ nBottom = std::max(nBottom, size_t(nRow + pBox->getRowSpan() - 1));
+ else
+ nBottom = std::max(nRow, nBottom);
lcl_CheckMinMax( nLowerMin, nLowerMax, *pLine, nCol, true );
++nFound;
break;
@@ -1747,6 +1751,9 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
else
{
nTop = nRow;
+ //if box is hiding cells bottom needs to be moved
+ if (pBox->getRowSpan() > 1)
+ nBottom = nRow + pBox->getRowSpan() - 1;
lcl_CheckMinMax( nUpperMin, nUpperMax, *pLine, nCol, true );
++nFound;
// If start and end node are identical, we're nearly done...