[ooo-build-commit] .: 3 commits - sw/inc sw/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Tue Sep 14 07:25:59 PDT 2010


 sw/inc/doc.hxx                    |    1 
 sw/source/core/docnode/ndcopy.cxx |    2 -
 sw/source/core/docnode/ndtbl.cxx  |   43 ++++++++++++++++++++++++++++++++++++++
 sw/source/filter/ww8/ww8par.hxx   |    2 +
 sw/source/filter/ww8/ww8par3.cxx  |    8 +++++++
 sw/source/filter/ww8/ww8par5.cxx  |    2 -
 sw/source/ui/wrtsh/wrtsh1.cxx     |    2 +
 7 files changed, 58 insertions(+), 2 deletions(-)

New commits:
commit b7551ace7e57ba3a4dbacf5d8906000600a43467
Author: Amelia Wang <amwang at novell.com>
Date:   Tue Sep 14 16:23:16 2010 +0200

    sw-insert-pagebreak-in-numbered-paragraph.diff
    
    n#396648

diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index c6c27f4..f2f1be3 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -1751,6 +1751,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 a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 77d98ab..7029de9 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -39,6 +39,7 @@
 #include <editeng/brkitem.hxx>
 #include <editeng/protitem.hxx>
 #include <editeng/boxitem.hxx>
+#include <svl/stritem.hxx>
 // OD 06.08.2003 #i17174#
 #include <editeng/shaditem.hxx>
 #include <fmtfsize.hxx>
@@ -4267,6 +4268,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 a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx
index b3087f7..9f0b753 100644
--- a/sw/source/ui/wrtsh/wrtsh1.cxx
+++ b/sw/source/ui/wrtsh/wrtsh1.cxx
@@ -928,6 +928,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
commit edbd32ded9f6dddb75ebb57d03a10ac10d0fa107
Author: Amelia Wang <amwang at novell.com>
Date:   Tue Sep 14 16:20:45 2010 +0200

    sw-outline-numbering-broken-fix.diff: outline numbering fix in master docs
    
    i#96092, n#445536

diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx
index ef65d7d..6217ae6 100644
--- a/sw/source/core/docnode/ndcopy.cxx
+++ b/sw/source/core/docnode/ndcopy.cxx
@@ -258,7 +258,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.
commit 7dd2e230f9de2676be07d094a837a0167e275194
Author: Florian Reuter <freuter at novell.com>
Date:   Tue Sep 14 16:12:59 2010 +0200

    sw-import-html-controls.diff:
    
    n#485609

diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index a2b92ee..94ac4dd 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1581,6 +1581,8 @@ public:     // eigentlich private, geht aber leider nur public
     eF_ResT Read_F_OCX(WW8FieldDesc*, String&);
     eF_ResT Read_F_Hyperlink(WW8FieldDesc*, String& rStr);
         eF_ResT Read_F_Shape(WW8FieldDesc* pF, String& rStr);
+    eF_ResT Read_F_HTMLControl( WW8FieldDesc* pF, String& rStr);
+
 
     void DeleteFormImpl();
 
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index fb565ea..88683c8 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -321,6 +321,14 @@ eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, String& rStr)
     }
 }
 
+eF_ResT SwWW8ImplReader::Read_F_HTMLControl( WW8FieldDesc* pF, String& rStr)
+{
+    if( bObj && nPicLocFc )
+        nObjLocFc = nPicLocFc;
+    bEmbeddObj = true;
+    return FLD_TEXT;
+}
+
 void SwWW8ImplReader::DeleteFormImpl()
 {
     delete pFormImpl, pFormImpl = 0;
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 692e1df..4af6197 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -908,7 +908,7 @@ long SwWW8ImplReader::Read_Field(WW8PLCFManResult* pRes)
         &SwWW8ImplReader::Read_F_Hyperlink,         // 88
         0,                                          // 89
         0,                                          // 90
-        0,                                          // 91
+        &SwWW8ImplReader::Read_F_HTMLControl,       // 91
         0,                                          // 92
         0,                                          // 93
         0,                                          // 94


More information about the ooo-build-commit mailing list