ooo-build r14914 - in trunk: . patches/dev300



Author: ameliaw
Date: Tue Dec 23 02:43:03 2008
New Revision: 14914
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14914&view=rev

Log:
add two patches. 
sw-insert-pagebreak-in-numbered-paragraph.diff, one of pagebreak
enhancements
sw-outline-numbering-broken-fix.diff, fix the problem with outline
numbering broken in master document


Added:
   trunk/patches/dev300/sw-insert-pagebreak-in-numbered-paragraph.diff
   trunk/patches/dev300/sw-outline-numbering-broken-fix.diff
Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Tue Dec 23 02:43:03 2008
@@ -2797,6 +2797,10 @@
 
 [ Fixes ]
 cws-impressfontsize.diff, i#8824, cl
+# fix problem with outline numbering broken in master document
+sw-outline-numbering-broken-fix.diff, i96092, n#445536, Amelia Wang
+# one of pagebreak enhancements
+sw-insert-pagebreak-in-numbered-paragraph.diff, n#396648, Amelia Wang
 
 # Drop the lame and misleading tooltips for the icon on the desktop
 # and in the Start Menu on Windows

Added: trunk/patches/dev300/sw-insert-pagebreak-in-numbered-paragraph.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/sw-insert-pagebreak-in-numbered-paragraph.diff	Tue Dec 23 02:43:03 2008
@@ -0,0 +1,86 @@
+diff --git sw/inc/doc.hxx sw/inc/doc.hxx
+index 0831e56..c2e7a26 100644
+--- sw/inc/doc.hxx
++++ sw/inc/doc.hxx
+@@ -1737,6 +1737,7 @@ public:
+ 	void ChkBoxNumFmt( SwTableBox& rAktBox, sal_Bool bCallUpdate );
+ 	void SetTblBoxFormulaAttrs( SwTableBox& rBox, const SfxItemSet& rSet );
+ 	void ClearBoxNumAttrs( const SwNodeIndex& rNode );
++	void ClearLineNumAttrs( SwPosition & rPos );
+ 
+ 	sal_Bool InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
+ 						const SwTable* pCpyTbl = 0, sal_Bool bCpyName = sal_False,
+diff --git sw/source/core/docnode/ndtbl.cxx sw/source/core/docnode/ndtbl.cxx
+index 14aedd0..53df862 100644
+--- sw/source/core/docnode/ndtbl.cxx
++++ sw/source/core/docnode/ndtbl.cxx
+@@ -43,6 +43,7 @@
+ #include <svx/brkitem.hxx>
+ #include <svx/protitem.hxx>
+ #include <svx/boxitem.hxx>
++#include <svtools/stritem.hxx>
+ // OD 06.08.2003 #i17174#
+ #include <svx/shaditem.hxx>
+ #include <fmtfsize.hxx>
+@@ -4210,6 +4211,48 @@ void SwDoc::SetTblBoxFormulaAttrs( SwTableBox& rBox, const SfxItemSet& rSet )
+ 	SetModified();
+ }
+ 
++void SwDoc::ClearLineNumAttrs( SwPosition & rPos )
++{
++	SwPaM aPam(rPos);
++	aPam.Move(fnMoveBackward);
++	SwCntntNode *pNode = aPam.GetCntntNode();
++	if ( 0 == pNode )
++		return ;
++	if( pNode->IsTxtNode() )
++	{
++		SwTxtNode * pTxtNode = pNode->GetTxtNode();
++		if ( pTxtNode && pTxtNode->IsNumbered() && pTxtNode->GetTxt().Len()==0 )
++		{
++			const SfxPoolItem* pFmtItem = 0;
++			SfxItemSet rSet( const_cast<SwAttrPool&>(pTxtNode->GetDoc()->GetAttrPool()),
++						RES_PARATR_BEGIN, RES_PARATR_END - 1,
++						0);
++			pTxtNode->SwCntntNode::GetAttr( rSet );
++			if ( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE , FALSE , &pFmtItem ) )
++			{
++				SwUndoDelNum * pUndo;
++				if( DoesUndo() )
++				{
++					ClearRedo();
++					AppendUndo( pUndo = new SwUndoDelNum( aPam ) );
++				}
++				else
++					pUndo = 0;
++				SwRegHistory aRegH( pUndo ? pUndo->GetHistory() : 0 );
++				aRegH.RegisterInModify( pTxtNode , *pTxtNode );
++				if ( pUndo )
++					pUndo->AddNode( *pTxtNode , FALSE );
++				String aStyle = String::CreateFromAscii("");
++				SfxStringItem * pNewItem = (SfxStringItem*)pFmtItem->Clone();
++				pNewItem->SetValue( aStyle );
++				rSet.Put( *pNewItem );
++				pTxtNode->SetAttr( rSet );
++				delete pNewItem;
++			}
++		}
++	}
++}
++
+ void SwDoc::ClearBoxNumAttrs( const SwNodeIndex& rNode )
+ {
+ 	SwStartNode* pSttNd;
+diff --git sw/source/ui/wrtsh/wrtsh1.cxx sw/source/ui/wrtsh/wrtsh1.cxx
+index 1fb80ff..0a4f55a 100644
+--- sw/source/ui/wrtsh/wrtsh1.cxx
++++ sw/source/ui/wrtsh/wrtsh1.cxx
+@@ -929,6 +929,8 @@ void SwWrtShell::InsertPageBreak(const String *pPageDesc, USHORT nPgNum )
+ 			if(HasSelection())
+ 				DelRight();
+ 			SwFEShell::SplitNode();
++			// delete the numbered attribute of the last line if the last line is empty
++			GetDoc()->ClearLineNumAttrs( *GetCrsr()->GetPoint() );
+ 		}
+ 
+ 		const SwPageDesc *pDesc = pPageDesc

Added: trunk/patches/dev300/sw-outline-numbering-broken-fix.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/sw-outline-numbering-broken-fix.diff	Tue Dec 23 02:43:03 2008
@@ -0,0 +1,13 @@
+diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx
+index 4f62703..05d073e 100644
+--- sw/source/core/docnode/ndcopy.cxx
++++ sw/source/core/docnode/ndcopy.cxx
+@@ -112,7 +112,7 @@ SwCntntNode* SwTxtNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
+ 	// kopiere Attribute/Text
+     if( !pCpyAttrNd->HasSwAttrSet() )
+ 		// wurde ein AttrSet fuer die Numerierung angelegt, so loesche diesen!
+-		pTxtNd->ResetAllAttr();
++		pCpyAttrNd->ResetAllAttr();
+ 
+ 	// if Copy-Textnode unequal to Copy-Attrnode, then copy first
+ 	// the attributes into the new Node.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]