summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-04-20 09:45:24 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-04-20 09:47:40 +0200
commite4509eea8fc7c07ddff48edf0d4c015c2663d896 (patch)
treeed471574ffea9b1a884a93023b48a8cbaa557d4b
parent071c4d56517c43d3160c4c529abc534851066060 (diff)
n#751313 SwCallLink: avoid redrawing complete rows without nested tables
-rw-r--r--sw/source/core/crsr/callnk.cxx17
1 files changed, 15 insertions, 2 deletions
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index 642b3eabf7a3..79aac3329dd7 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -100,8 +100,21 @@ void lcl_notifyRow(const SwCntntNode* pNode, SwCrsrShell& rShell)
if ( pRow )
{
const SwTableLine* pLine = pRow->GetTabLine( );
- SwFmtFrmSize pSize = pLine->GetFrmFmt( )->GetFrmSize( );
- pRow->ModifyNotification( NULL, &pSize );
+ // Avoid redrawing the complete row if there are no nested tables
+ bool bHasTable = false;
+ SwFrm *pCell = pRow->GetLower();
+ for (; pCell && !bHasTable; pCell = pCell->GetNext())
+ {
+ SwFrm *pContent = pCell->GetLower();
+ for (; pContent && !bHasTable; pContent = pContent->GetNext())
+ if (pContent->GetType() == FRM_TAB)
+ bHasTable = true;
+ }
+ if (bHasTable)
+ {
+ SwFmtFrmSize pSize = pLine->GetFrmFmt()->GetFrmSize();
+ pRow->ModifyNotification(NULL, &pSize);
+ }
}
}
}