summaryrefslogtreecommitdiffstats
path: root/sw/source/core/view/vprint.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/view/vprint.cxx')
-rw-r--r--sw/source/core/view/vprint.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 3f5bd890d2ad..c792773cd765 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -368,7 +368,9 @@ void SwViewShell::FillPrtDoc( SwDoc& rPrtDoc, const SfxPrinter* pPrt)
SwNodeIndex aNodeIdx( *rPrtDoc.GetNodes().GetEndOfContent().StartOfSectionNode() );
SwTextNode* pTextNd = rPrtDoc.GetNodes().GoNext( &aNodeIdx )->GetTextNode();
SwContentNode *pLastNd =
- pActCursor->GetContentNode( (*pActCursor->GetMark()) <= (*pActCursor->GetPoint()) );
+ (*pActCursor->GetMark()) <= (*pActCursor->GetPoint())
+ ? pActCursor->GetPointContentNode()
+ : pActCursor->GetMarkContentNode();
// copy the paragraph attributes of the first paragraph
if( pLastNd && pLastNd->IsTextNode() )
static_cast<SwTextNode*>(pLastNd)->CopyCollFormat( *pTextNd );
@@ -396,7 +398,9 @@ void SwViewShell::FillPrtDoc( SwDoc& rPrtDoc, const SfxPrinter* pPrt)
if( pTextNd )
{
SwContentNode *pFirstNd =
- pFirstCursor->GetContentNode( (*pFirstCursor->GetMark()) > (*pFirstCursor->GetPoint()) );
+ (*pFirstCursor->GetMark()) > (*pFirstCursor->GetPoint())
+ ? pFirstCursor->GetPointContentNode()
+ : pFirstCursor->GetMarkContentNode();
// copy paragraph attributes of the first paragraph
if( pFirstNd && pFirstNd->IsTextNode() )
static_cast<SwTextNode*>(pFirstNd)->CopyCollFormat( *pTextNd );