Kaydet (Commit) 77768f58 authored tarafından Matteo Casalin's avatar Matteo Casalin

Bail out early

Change-Id: Ic0bb06e3d64933df4887ce1402f62c16e917fdbd
üst 9236d824
...@@ -74,32 +74,30 @@ SwCallLink::SwCallLink( SwCrsrShell & rSh ) ...@@ -74,32 +74,30 @@ SwCallLink::SwCallLink( SwCrsrShell & rSh )
static void lcl_notifyRow(const SwCntntNode* pNode, SwCrsrShell& rShell) static void lcl_notifyRow(const SwCntntNode* pNode, SwCrsrShell& rShell)
{ {
if ( pNode != NULL ) if ( !pNode )
{ return;
SwFrm *myFrm = pNode->getLayoutFrm( rShell.GetLayout() );
if (myFrm!=NULL) SwFrm *const pMyFrm = pNode->getLayoutFrm( rShell.GetLayout() );
{ if ( !pMyFrm )
return;
// We need to emulated a change of the row height in order // We need to emulated a change of the row height in order
// to have the complete row redrawn // to have the complete row redrawn
SwRowFrm* pRow = myFrm->FindRowFrm(); SwRowFrm *const pRow = pMyFrm->FindRowFrm();
if ( pRow ) if ( !pRow )
{ return;
const SwTableLine* pLine = pRow->GetTabLine( ); const SwTableLine* pLine = pRow->GetTabLine( );
// Avoid redrawing the complete row if there are no nested tables // Avoid redrawing the complete row if there are no nested tables
bool bHasTable = false; for (SwFrm *pCell = pRow->GetLower(); pCell; pCell = pCell->GetNext())
SwFrm *pCell = pRow->GetLower(); {
for (; pCell && !bHasTable; pCell = pCell->GetNext()) for (SwFrm *pContent = pCell->GetLower(); pContent; pContent = pContent->GetNext())
{ {
SwFrm *pContent = pCell->GetLower();
for (; pContent && !bHasTable; pContent = pContent->GetNext())
if (pContent->GetType() == FRM_TAB) if (pContent->GetType() == FRM_TAB)
bHasTable = true;
}
if (bHasTable)
{ {
SwFmtFrmSize pSize = pLine->GetFrmFmt()->GetFrmSize(); SwFmtFrmSize pSize = pLine->GetFrmFmt()->GetFrmSize();
pRow->ModifyNotification(NULL, &pSize); pRow->ModifyNotification(NULL, &pSize);
} return;
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment