1 diff --git sw/inc/doc.hxx sw/inc/doc.hxx
2 index 0831e56..c2e7a26 100644
5 @@ -1737,6 +1737,7 @@ public:
6 void ChkBoxNumFmt( SwTableBox& rAktBox, sal_Bool bCallUpdate );
7 void SetTblBoxFormulaAttrs( SwTableBox& rBox, const SfxItemSet& rSet );
8 void ClearBoxNumAttrs( const SwNodeIndex& rNode );
9 + void ClearLineNumAttrs( SwPosition & rPos );
11 sal_Bool InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
12 const SwTable* pCpyTbl = 0, sal_Bool bCpyName = sal_False,
13 diff --git sw/source/core/docnode/ndtbl.cxx sw/source/core/docnode/ndtbl.cxx
14 index 14aedd0..53df862 100644
15 --- sw/source/core/docnode/ndtbl.cxx
16 +++ sw/source/core/docnode/ndtbl.cxx
18 #include <svx/brkitem.hxx>
19 #include <svx/protitem.hxx>
20 #include <svx/boxitem.hxx>
21 +#include <svtools/stritem.hxx>
22 // OD 06.08.2003 #i17174#
23 #include <svx/shaditem.hxx>
24 #include <fmtfsize.hxx>
25 @@ -4210,6 +4211,48 @@ void SwDoc::SetTblBoxFormulaAttrs( SwTableBox& rBox, const SfxItemSet& rSet )
29 +void SwDoc::ClearLineNumAttrs( SwPosition & rPos )
32 + aPam.Move(fnMoveBackward);
33 + SwCntntNode *pNode = aPam.GetCntntNode();
36 + if( pNode->IsTxtNode() )
38 + SwTxtNode * pTxtNode = pNode->GetTxtNode();
39 + if ( pTxtNode && pTxtNode->IsNumbered() && pTxtNode->GetTxt().Len()==0 )
41 + const SfxPoolItem* pFmtItem = 0;
42 + SfxItemSet rSet( const_cast<SwAttrPool&>(pTxtNode->GetDoc()->GetAttrPool()),
43 + RES_PARATR_BEGIN, RES_PARATR_END - 1,
45 + pTxtNode->SwCntntNode::GetAttr( rSet );
46 + if ( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE , FALSE , &pFmtItem ) )
48 + SwUndoDelNum * pUndo;
52 + AppendUndo( pUndo = new SwUndoDelNum( aPam ) );
56 + SwRegHistory aRegH( pUndo ? pUndo->GetHistory() : 0 );
57 + aRegH.RegisterInModify( pTxtNode , *pTxtNode );
59 + pUndo->AddNode( *pTxtNode , FALSE );
60 + String aStyle = String::CreateFromAscii("");
61 + SfxStringItem * pNewItem = (SfxStringItem*)pFmtItem->Clone();
62 + pNewItem->SetValue( aStyle );
63 + rSet.Put( *pNewItem );
64 + pTxtNode->SetAttr( rSet );
71 void SwDoc::ClearBoxNumAttrs( const SwNodeIndex& rNode )
74 diff --git sw/source/ui/wrtsh/wrtsh1.cxx sw/source/ui/wrtsh/wrtsh1.cxx
75 index 1fb80ff..0a4f55a 100644
76 --- sw/source/ui/wrtsh/wrtsh1.cxx
77 +++ sw/source/ui/wrtsh/wrtsh1.cxx
78 @@ -929,6 +929,8 @@ void SwWrtShell::InsertPageBreak(const String *pPageDesc, USHORT nPgNum )
81 SwFEShell::SplitNode();
82 + // delete the numbered attribute of the last line if the last line is empty
83 + GetDoc()->ClearLineNumAttrs( *GetCrsr()->GetPoint() );
86 const SwPageDesc *pDesc = pPageDesc