[ooo-build-commit] .: Branch 'ooo/OOO320' - 2 commits - sw/source

Jan Holesovsky kendy at kemper.freedesktop.org
Mon Feb 1 21:04:53 PST 2010


 sw/source/core/unocore/unostyle.cxx |    1 
 sw/source/ui/docvw/postit.cxx       |   50 +++++++++++++++++++++++++++---------
 2 files changed, 39 insertions(+), 12 deletions(-)

New commits:
commit c8827094a9899e1af32c290f817154e473f45e08
Author: Oliver Bolte <obo at openoffice.org>
Date:   Mon Feb 1 14:39:38 2010 +0000

    CWS-TOOLING: integrate CWS ooo321gsl02
    2010-01-29 19:09:29 +0100 hjs  r277966 : #i107957 - deliver right .xcu, no matter how WITH_LANG is set
    2010-01-29 16:14:32 +0100 os  r277964 : #i108426# missing increment added
    2010-01-29 13:28:08 +0100 pl  r277962 : #i107763# avoid strange visuals on X11 platforms

diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 6033541..a935395 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1266,6 +1266,7 @@ sal_Bool SwStyleProperties_Impl::GetProperty(const ::rtl::OUString& rName, uno::
             bRet = sal_True;
             break;
         }
+        ++nPos;
         ++aIt;
     }
     
commit 3006a97452c49277166c348997387bcf1e77874b
Author: Oliver Bolte <obo at openoffice.org>
Date:   Mon Feb 1 13:48:06 2010 +0000

    #i108813# Crash on two times Undo inserting comment with text

diff --git a/sw/source/ui/docvw/postit.cxx b/sw/source/ui/docvw/postit.cxx
index 157a6e1..cbc012b 100644
--- a/sw/source/ui/docvw/postit.cxx
+++ b/sw/source/ui/docvw/postit.cxx
@@ -1612,14 +1612,26 @@ void SwPostIt::UpdateData()
 {
     if ( Engine()->IsModified() )
     {
-        SwTxtFld* pTxtFld = mpFmtFld->GetTxtFld();
-        SwPosition aPosition( pTxtFld->GetTxtNode() );
-        aPosition.nContent = *pTxtFld->GetStart();
-        SwField* pOldField = mpFld->Copy();
+        // --> OD 2010-02-01 #i108813# - check, if undo is active
+        std::auto_ptr<SwField> pOldField( 0 );
+        if ( DocView()->GetDocShell()->GetDoc()->DoesUndo() )
+        {
+            pOldField.reset( mpFld->Copy() );
+        }
+        // <--
+
         mpFld->SetPar2(Engine()->GetEditEngine().GetText());
         mpFld->SetTextObject(Engine()->CreateParaObject());
-        DocView()->GetDocShell()->GetDoc()->AppendUndo(new SwUndoFieldFromDoc(aPosition, *pOldField, *mpFld, 0, true));
-        delete pOldField;
+
+        // --> OD 2010-02-01 #i108813# - check, if undo is active
+        if ( DocView()->GetDocShell()->GetDoc()->DoesUndo() )
+        {
+            SwTxtFld* pTxtFld = mpFmtFld->GetTxtFld();
+            SwPosition aPosition( pTxtFld->GetTxtNode() );
+            aPosition.nContent = *pTxtFld->GetStart();
+            DocView()->GetDocShell()->GetDoc()->AppendUndo(new SwUndoFieldFromDoc(aPosition, *pOldField, *mpFld, 0, true));
+        }
+        // <--
         // so we get a new layout of notes (anchor position is still the same and we would otherwise not get one)
         Mgr()->SetLayout();
         // #i98686# if we have several views, all notes should update their text
@@ -1793,14 +1805,28 @@ void SwPostIt::InitAnswer(OutlinerParaObject* pText)
     // lets insert an undo step so the initial text can be easily deleted
     // but do not use UpdateData() directly, would set modified state again and reentrance into Mgr
     Engine()->SetModifyHdl( Link() );
-    SwTxtFld* pTxtFld = mpFmtFld->GetTxtFld();
-    SwPosition aPosition( pTxtFld->GetTxtNode() );
-    aPosition.nContent = *pTxtFld->GetStart();
-    SwField* pOldField = mpFld->Copy();
+
+    // --> OD 2010-02-01 #i108813# - check, if undo is active
+    std::auto_ptr<SwField> pOldField( 0 );
+    if ( DocView()->GetDocShell()->GetDoc()->DoesUndo() )
+    {
+        pOldField.reset( mpFld->Copy() );
+    }
+    // <--
+
     mpFld->SetPar2(Engine()->GetEditEngine().GetText());
     mpFld->SetTextObject(Engine()->CreateParaObject());
-    DocView()->GetDocShell()->GetDoc()->AppendUndo(new SwUndoFieldFromDoc(aPosition, *pOldField, *mpFld, 0, true));
-    delete pOldField;
+
+    // --> OD 2010-02-01 #i108813# - check, if undo is active
+    if ( DocView()->GetDocShell()->GetDoc()->DoesUndo() )
+    {
+        SwTxtFld* pTxtFld = mpFmtFld->GetTxtFld();
+        SwPosition aPosition( pTxtFld->GetTxtNode() );
+        aPosition.nContent = *pTxtFld->GetStart();
+        DocView()->GetDocShell()->GetDoc()->AppendUndo(new SwUndoFieldFromDoc(aPosition, *pOldField, *mpFld, 0, true));
+    }
+    // <--
+
     Engine()->SetModifyHdl( LINK( this, SwPostIt, ModifyHdl ) );
     Engine()->ClearModifyFlag();
     Engine()->GetUndoManager().Clear();


More information about the ooo-build-commit mailing list