ooo-build r14766 - in branches/ooo-build-3-0: . patches/dev300
- From: ameliaw svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r14766 - in branches/ooo-build-3-0: . patches/dev300
- Date: Sun, 7 Dec 2008 10:02:25 +0000 (UTC)
Author: ameliaw
Date: Sun Dec 7 10:02:25 2008
New Revision: 14766
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14766&view=rev
Log:
change the behavior that a pagebreak has been inserted after a single number of a
numbering line
Added:
branches/ooo-build-3-0/patches/dev300/sw-insert-pagebreak-in-numbered-paragraph.diff
Modified:
branches/ooo-build-3-0/ChangeLog
branches/ooo-build-3-0/patches/dev300/apply
Modified: branches/ooo-build-3-0/patches/dev300/apply
==============================================================================
--- branches/ooo-build-3-0/patches/dev300/apply (original)
+++ branches/ooo-build-3-0/patches/dev300/apply Sun Dec 7 10:02:25 2008
@@ -2754,6 +2754,7 @@
# Make tooltips for the icon on the desktop and in the Start Menu on
# Windows less lame
win32-tooltips.diff, tml
+sw-insert-pagebreak-in-numbered-paragraph.diff, n#396648, amelia
[ OxygenOfficeDefaultSettings ]
#Create langpack and full installers
Added: branches/ooo-build-3-0/patches/dev300/sw-insert-pagebreak-in-numbered-paragraph.diff
==============================================================================
--- (empty file)
+++ branches/ooo-build-3-0/patches/dev300/sw-insert-pagebreak-in-numbered-paragraph.diff Sun Dec 7 10:02:25 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]