diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-06-01 20:38:13 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-06-08 21:51:35 +0200 |
commit | dfbb954a4e15e10807cce49cfb918edfe5d37368 (patch) | |
tree | 8c3babc56508c3fbc3fe8dc75151f4db7fad1160 /sw | |
parent | 2c350b0caa5f152cae38f8aaf7af45a997a738fd (diff) |
sw_redlinehide: trivial GetNode() in PageBreakWin.cxx
Change-Id: I7bdf58d1f2233ab77a1b774a99aa068fe9438ae8
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/docvw/PageBreakWin.cxx | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx index 1580fc4eb756..366c204f9dc8 100644 --- a/sw/source/uibase/docvw/PageBreakWin.cxx +++ b/sw/source/uibase/docvw/PageBreakWin.cxx @@ -12,6 +12,8 @@ #include <cmdid.h> #include <cntfrm.hxx> +#include <txtfrm.hxx> +#include <notxtfrm.hxx> #include <DashedLine.hxx> #include <doc.hxx> #include <edtwin.hxx> @@ -240,7 +242,9 @@ void SwPageBreakWin::Select() rSh.ClearMark(); SwContentFrame *pCnt = const_cast< SwContentFrame* >( pBodyFrame->ContainsContent() ); - SwContentNode* pNd = pCnt->GetNode(); + SwContentNode* pNd = pCnt->IsTextFrame() + ? static_cast<SwTextFrame*>(pCnt)->GetTextNodeFirst() + : static_cast<SwNoTextFrame*>(pCnt)->GetNode(); rSh.SetSelection( *pNd ); SfxStringItem aItem(pEditWin->GetView().GetPool().GetWhich(FN_FORMAT_TABLE_DLG), "textflow"); @@ -254,7 +258,9 @@ void SwPageBreakWin::Select() else { SwContentFrame *pCnt = const_cast< SwContentFrame* >( pBodyFrame->ContainsContent() ); - SwContentNode* pNd = pCnt->GetNode(); + SwContentNode* pNd = pCnt->IsTextFrame() + ? static_cast<SwTextFrame*>(pCnt)->GetTextNodeFirst() + : static_cast<SwNoTextFrame*>(pCnt)->GetNode(); SwPaM aPaM( *pNd ); SwPaMItem aPaMItem( pEditWin->GetView().GetPool( ).GetWhich( FN_PARAM_PAM ), &aPaM ); @@ -276,8 +282,11 @@ void SwPageBreakWin::Select() if ( pBodyFrame ) { + SwContentFrame *pCnt = const_cast< SwContentFrame* >( pBodyFrame->ContainsContent() ); - SwContentNode* pNd = pCnt->GetNode(); + SwContentNode* pNd = pCnt->IsTextFrame() + ? static_cast<SwTextFrame*>(pCnt)->GetTextNodeFirst() + : static_cast<SwNoTextFrame*>(pCnt)->GetNode(); pNd->GetDoc()->GetIDocumentUndoRedo( ).StartUndo( SwUndoId::UI_DELETE_PAGE_BREAK, nullptr ); |