diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-04-20 09:45:24 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-04-20 09:47:40 +0200 |
commit | e4509eea8fc7c07ddff48edf0d4c015c2663d896 (patch) | |
tree | ed471574ffea9b1a884a93023b48a8cbaa557d4b | |
parent | 071c4d56517c43d3160c4c529abc534851066060 (diff) |
n#751313 SwCallLink: avoid redrawing complete rows without nested tables
-rw-r--r-- | sw/source/core/crsr/callnk.cxx | 17 |
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); + } } } } |