Kaydet (Commit) 6996cddf authored tarafından Michael Stahl's avatar Michael Stahl

sw: fix assert in SwViewShell::FillPrtDoc()

The point node isn't necessarily the start node; this will assert in
SwTextFrame::MapModelToView: Assertion `SwFrame::GetDep() == pNode' failed
when selecting a table and then File->Print->Print Selection.

Thanks Samuel for the hint.

(regression from 067a53bb)

Change-Id: I7f58b79e068e8b7817261e81f999721ebfcfdcf1
Reviewed-on: https://gerrit.libreoffice.org/65421
Tested-by: Jenkins
Reviewed-by: 's avatarMichael Stahl <Michael.Stahl@cib.de>
üst 422b12bc
...@@ -358,7 +358,8 @@ void SwViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt) ...@@ -358,7 +358,8 @@ void SwViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
{ {
SwShellTableCursor* pShellTableCursor = pFESh->GetTableCursor(); SwShellTableCursor* pShellTableCursor = pFESh->GetTableCursor();
const SwContentNode* pContentNode = pShellTableCursor->GetNode().GetContentNode(); const SwContentNode *const pContentNode =
pShellTableCursor->Start()->nNode.GetNode().GetContentNode();
const SwContentFrame *const pContentFrame = pContentNode ? pContentNode->getLayoutFrame(GetLayout(), pShellTableCursor->Start()) : nullptr; const SwContentFrame *const pContentFrame = pContentNode ? pContentNode->getLayoutFrame(GetLayout(), pShellTableCursor->Start()) : nullptr;
if( pContentFrame ) if( pContentFrame )
{ {
......
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