[Libreoffice-commits] core.git: 5 commits - include/svx svx/source sw/source vcl/source

Armin Le Grand alg at apache.org
Tue Oct 8 07:59:43 PDT 2013


 include/svx/sdrundomanager.hxx       |    3 +
 svx/source/svdraw/sdrundomanager.cxx |   19 ++++++++++++
 sw/source/core/swg/swblocks.cxx      |    3 +
 sw/source/core/text/porfld.cxx       |    5 ++-
 sw/source/filter/html/swhtml.cxx     |    5 +++
 vcl/source/window/menu.cxx           |   55 ++++++++++++++++++++++++-----------
 6 files changed, 72 insertions(+), 18 deletions(-)

New commits:
commit bfeabd965c4ed4cc78975dbedafb586e2fac8c48
Author: Armin Le Grand <alg at apache.org>
Date:   Tue Oct 8 12:38:03 2013 +0000

    Resolves: #i123350# Added Clear() implementation to SdrUndoManager...
    
    to only delete text edit part of the undo stack
    
    (cherry picked from commit 81e916525fa63b188b2a3b9bb7030e4d451a4808)
    
    Conflicts:
    	svx/inc/svx/sdrundomanager.hxx
    
    Change-Id: I19594e4cfa52a24dbcb95639ac3c6b9f39908cc7

diff --git a/include/svx/sdrundomanager.hxx b/include/svx/sdrundomanager.hxx
old mode 100644
new mode 100755
index f71f115..9c88f06
--- a/include/svx/sdrundomanager.hxx
+++ b/include/svx/sdrundomanager.hxx
@@ -48,6 +48,9 @@ public:
     virtual bool Undo();
     virtual bool Redo();
 
+    // #i123350#
+    virtual void Clear();
+
     // Call for the view which starts the interactive text edit. Use link to
     // activate (start text edit) and empty link to reset (end text edit). On
     // reset all text edit actions will be removed from this undo manager to
diff --git a/svx/source/svdraw/sdrundomanager.cxx b/svx/source/svdraw/sdrundomanager.cxx
index 4f97225..f2a00c5 100644
--- a/svx/source/svdraw/sdrundomanager.cxx
+++ b/svx/source/svdraw/sdrundomanager.cxx
@@ -80,6 +80,25 @@ bool SdrUndoManager::Redo()
     return bRetval;
 }
 
+void SdrUndoManager::Clear()
+{
+    if(isTextEditActive())
+    {
+        while(GetUndoActionCount() && mpLastUndoActionBeforeTextEdit != GetUndoAction(0))
+        {
+            RemoveLastUndoAction();
+        }
+
+        // urgently needed: RemoveLastUndoAction does NOT correct the Redo stack by itself (!)
+        ClearRedo();
+    }
+    else
+    {
+        // call parent
+        EditUndoManager::Clear();
+    }
+}
+
 void SdrUndoManager::SetEndTextEditHdl(const Link& rLink)
 {
     maEndTextEditHdl = rLink;
commit 8d1a172121ab29c70de89c59945b60f462a89fa4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 8 15:42:03 2013 +0100

    CID#1079272 uninitialized member variable
    
    Change-Id: Iff12fd9f9fbd1dac3f56dd733d967d8ba251d6b4

diff --git a/sw/source/core/swg/swblocks.cxx b/sw/source/core/swg/swblocks.cxx
index 2193ea0..aaf0aea 100644
--- a/sw/source/core/swg/swblocks.cxx
+++ b/sw/source/core/swg/swblocks.cxx
@@ -94,7 +94,8 @@ SwImpBlocks::SwImpBlocks( const OUString& rFile, sal_Bool )
     aDateModified( Date::EMPTY ),
     aTimeModified( Time::EMPTY ),
     pDoc( 0 ), nCur( (sal_uInt16)-1 ),
-    bReadOnly( sal_True ), bInPutMuchBlocks( sal_False )
+    bReadOnly( sal_True ), bInPutMuchBlocks( sal_False ),
+    bInfoChanged(false)
 {
     FStatHelper::GetModifiedDateTimeOfFile( rFile,
                                             &aDateModified, &aTimeModified );
commit 609c35d943b001cb1d598709289cfa0b2bb48f01
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 8 15:40:43 2013 +0100

    CID#1079271 uninitialized member variables
    
    Change-Id: I4bf9e0c7a548c0f22ce670803bc8334277f80c9e

diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index c51d7e5..ab693ea 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -135,22 +135,45 @@ struct MenuItemData
 
     SalMenuItem*    pSalMenuItem;           // access to native menu
 
-                    MenuItemData() :
-                        pSubMenu(NULL), pAutoSubMenu(NULL), nItemImageAngle(0), pSalMenuItem ( NULL )
-                    {}
-                    MenuItemData( const OUString& rStr, const Image& rImage ) :
-                        pSubMenu(NULL),
-                        pAutoSubMenu(NULL),
-                        aText( rStr ),
-                        aImage( rImage ),
-                        nItemImageAngle(0),
-                        pSalMenuItem ( NULL )
-                    {}
-                    ~MenuItemData();
-        bool HasCheck() const
-        {
-            return bChecked || ( nBits & ( MIB_RADIOCHECK | MIB_CHECKABLE | MIB_AUTOCHECK ) );
-        }
+    MenuItemData()
+        : nId(0)
+        , eType(MENUITEM_DONTKNOW)
+        , nBits(0)
+        , pSubMenu(NULL)
+        , pAutoSubMenu(NULL)
+        , nUserValue(0)
+        , bChecked(false)
+        , bEnabled(false)
+        , bVisible(false)
+        , bIsTemporary(false)
+        , bMirrorMode(false)
+        , nItemImageAngle(0)
+        , pSalMenuItem(NULL)
+    {
+    }
+    MenuItemData( const OUString& rStr, const Image& rImage )
+        : nId(0)
+        , eType(MENUITEM_DONTKNOW)
+        , nBits(0)
+        , pSubMenu(NULL)
+        , pAutoSubMenu(NULL)
+        , aText(rStr)
+        , nUserValue(0)
+        , aImage(rImage)
+        , bChecked(false)
+        , bEnabled(false)
+        , bVisible(false)
+        , bIsTemporary(false)
+        , bMirrorMode(false)
+        , nItemImageAngle(0)
+        , pSalMenuItem(NULL)
+    {
+    }
+    ~MenuItemData();
+    bool HasCheck() const
+    {
+        return bChecked || ( nBits & ( MIB_RADIOCHECK | MIB_CHECKABLE | MIB_AUTOCHECK ) );
+    }
 };
 
 MenuItemData::~MenuItemData()
commit 298f380883019590693e0cb6e26d74bf0fd75a7f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 8 15:18:21 2013 +0100

    CID#1079270 uninitialized member variables
    
    Change-Id: I89b5ae1dd3a18bcc273ec2dff9edc11b5e3cbd3c

diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index ac70559..ee8d6da 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -1090,7 +1090,10 @@ void SwTxtFrm::StopAnimation( OutputDevice* pOut )
  *************************************************************************/
 
 SwCombinedPortion::SwCombinedPortion( const OUString &rTxt )
-     : SwFldPortion( rTxt )
+    : SwFldPortion( rTxt )
+    , nUpPos(0)
+    , nLowPos(0)
+    , nProportion(55)
 {
     SetLen(1);
     SetWhichPor( POR_COMBINED );
commit cdac7b317e9d20111f51e970330eef3a8a8b7533
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 8 15:11:50 2013 +0100

    CID#1079262 uninitialized member variables
    
    Change-Id: Iee6ba8b3970f4d0f65756ecee12b859b6d1df82b

diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 8a1e91e..799ca38 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -264,6 +264,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCrsr, SvStream& rIn,
     // #i83625#
     nContextStMin( 0 ),
     nContextStAttrMin( 0 ),
+    nSelectEntryCnt( 0 ),
     nOpenParaToken( 0 ),
     eJumpTo( JUMPTO_NONE ),
 #ifdef DBG_UTIL
@@ -276,6 +277,10 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCrsr, SvStream& rIn,
     bInField( sal_False ),
     bCallNextToken( sal_False ),
     bIgnoreRawData( sal_False ),
+    bLBEntrySelected ( false ),
+    bTAIgnoreNewPara ( false ),
+    bFixMarqueeWidth ( false ),
+    bFixMarqueeHeight ( false ),
     bNoParSpace( sal_False ),
     bInNoEmbed( sal_False ),
     bInTitle( sal_False ),


More information about the Libreoffice-commits mailing list