Kaydet (Commit) 4d2f32d7 authored tarafından Michael Stahl's avatar Michael Stahl

sw_redlinehide: SwTextFrame::LeftMargin()/RightMargin():

The callers apparently pass in only pams that point to the node already,
so just assert the precondition instead of this nonsense of assigning
nNode but not nContent.

Change-Id: I78f6d425ebe156a9ac89ffa134d71c0bec7fc9cb
üst 14bb2048
......@@ -670,8 +670,7 @@ bool SwTextFrame::GetCursorOfst(SwPosition* pPos, Point& rPoint,
bool SwTextFrame::LeftMargin(SwPaM *pPam) const
{
if( &pPam->GetNode() != GetNode() )
pPam->GetPoint()->nNode = *const_cast<SwTextFrame*>(this)->GetTextNode();
assert(&pPam->GetNode() == GetNode() || GetMergedPara());
SwTextFrame *pFrame = GetAdjFrameAtPos( const_cast<SwTextFrame*>(this), *pPam->GetPoint(),
SwTextCursor::IsRightMargin() );
......@@ -705,8 +704,7 @@ bool SwTextFrame::LeftMargin(SwPaM *pPam) const
bool SwTextFrame::RightMargin(SwPaM *pPam, bool bAPI) const
{
if( &pPam->GetNode() != GetNode() )
pPam->GetPoint()->nNode = *const_cast<SwTextFrame*>(this)->GetTextNode();
assert(&pPam->GetNode() == GetNode() || GetMergedPara());
SwTextFrame *pFrame = GetAdjFrameAtPos( const_cast<SwTextFrame*>(this), *pPam->GetPoint(),
SwTextCursor::IsRightMargin() );
......
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