[Libreoffice-commits] core.git: 6 commits - sd/inc sd/source sfx2/inc sfx2/source xmloff/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Tue Feb 26 21:26:37 PST 2013
sd/inc/undoanim.hxx | 7 ++++---
sd/source/core/undoanim.cxx | 2 --
sd/source/filter/ppt/pptinanimations.cxx | 4 ++--
sd/source/ui/func/fuinsfil.cxx | 1 +
sd/source/ui/view/outlnvsh.cxx | 2 ++
sfx2/inc/sfx2/app.hxx | 3 +++
sfx2/inc/sfx2/docfile.hxx | 6 ++++++
sfx2/source/appl/appopen.cxx | 1 +
xmloff/source/style/xmlnumi.cxx | 2 +-
9 files changed, 20 insertions(+), 8 deletions(-)
New commits:
commit 66dc20ae279e4f913795ff6e959d83eaefed78b4
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed Feb 27 03:30:41 2013 +0100
coverity#441041: unitialized variable
Change-Id: I5918448afaf5409d9372592011d936b48701903d
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
index 8e89cba..4237349 100644
--- a/xmloff/source/style/xmlnumi.cxx
+++ b/xmloff/source/style/xmlnumi.cxx
@@ -440,7 +440,7 @@ SvXMLImportContext *SvxXMLListLevelStyleContext_Impl::CreateChildContext(
Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties(
const SvI18NMap *pI18NMap )
{
- sal_Int16 eType;
+ sal_Int16 eType = NUMBER_NONE;
sal_Int32 nCount = 0;
if( bBullet )
commit 5a2477c43412a58e4fb9918688d1ff7173125f5b
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed Feb 27 03:07:49 2013 +0100
coverity#705704: fix memory leak
Change-Id: I96a8b1f303c25f291dfda6ccd8f4f7c3f2d34021
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 7ee2479..9e182c5 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -1916,6 +1916,8 @@ bool OutlineViewShell::UpdateOutlineObject( SdPage* pPage, Paragraph* pPara )
pTO->ActionChanged();
}
}
+ else
+ delete pOPO;
}
else if( pTO )
{
commit 842c219f3fe73a3d94be6cfda96bff6ac967947f
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed Feb 27 03:05:31 2013 +0100
coverity#705699: fix memory leak
Change-Id: Ib0561a18082759d3ccd4175164d3398fa028ba8c
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index d25059a..3bea01b 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -506,6 +506,7 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium)
if (pOutlinerView)
{
pOutlinerView->InsertText(*pOPO);
+ delete pOPO;
}
else
{
commit 13e8f68e82713cae2d081a236b260bda12aafa23
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed Feb 27 03:02:17 2013 +0100
coverity#705698: fix memory leak and add some documentation
Change-Id: I082ac7c47a59f1cb0ef4e098739d6c7fa98e3795
diff --git a/sfx2/inc/sfx2/app.hxx b/sfx2/inc/sfx2/app.hxx
index 6fe8bc0..24c0294 100644
--- a/sfx2/inc/sfx2/app.hxx
+++ b/sfx2/inc/sfx2/app.hxx
@@ -164,6 +164,9 @@ public:
void RemoveDdeTopic( SfxObjectShell* );
// "static" methods
+ /**
+ * @param pArgs Takes ownership
+ */
sal_uIntPtr LoadTemplate( SfxObjectShellLock& xDoc, const String& rFileName, sal_Bool bCopy=sal_True, SfxItemSet* pArgs = 0 );
SfxTemplateDialog* GetTemplateDialog();
Window* GetTopWindow() const;
diff --git a/sfx2/inc/sfx2/docfile.hxx b/sfx2/inc/sfx2/docfile.hxx
index d4ee981..05b6c91 100644
--- a/sfx2/inc/sfx2/docfile.hxx
+++ b/sfx2/inc/sfx2/docfile.hxx
@@ -96,9 +96,15 @@ public:
SfxMedium(String const &, StreamMode, void *)
SAL_DELETED_FUNCTION;
+ /**
+ * @param pSet does NOT take ownership
+ */
SfxMedium( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
const String& rBaseURL,
const SfxItemSet* pSet=0 );
+ /**
+ * @param pSet does NOT take ownership
+ */
SfxMedium( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
const String& rBaseURL,
const String& rTypeName,
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index aaee060..de1e79d 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -375,6 +375,7 @@ sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const String
xDoc = SfxObjectShell::CreateObject( pFilter->GetServiceName() );
SfxMedium *pMedium = new SfxMedium( rFileName, STREAM_STD_READ, pFilter, pSet );
+ delete pSet;
if(!xDoc->DoLoad(pMedium))
{
ErrCode nErrCode = xDoc->GetErrorCode();
commit c7631f94625debbe120f810b80b189301da83396
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed Feb 27 02:51:04 2013 +0100
coverity#705697: fix memory leak
Change-Id: I637d21b0f94ecb036ca4887bb2a36649f907d9e9
diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx
index c314e4f..2ed65bf 100644
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -251,10 +251,10 @@ int AnimationImporter::import( const Reference< XDrawPage >& xPage, const DffRec
{
Reference< XAnimationNode > xParent;
- const Atom* pAtom = Atom::import( rProgTagContentHd, mrStCtrl );
+ boost::scoped_ptr<Atom> pAtom(Atom::import( rProgTagContentHd, mrStCtrl ));
if( pAtom )
{
- nNodes = importAnimationContainer( pAtom, xParent );
+ nNodes = importAnimationContainer( pAtom.get(), xParent );
}
processAfterEffectNodes();
commit 7b627e465ce018b3a27346c541d77667a5130628
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed Feb 27 02:46:19 2013 +0100
coverity#704165: fix memory leak
Change-Id: Ia62ab987bc7f4f25e22385194ca2df8d6e74376f
diff --git a/sd/inc/undoanim.hxx b/sd/inc/undoanim.hxx
index 0fb1784..3fe7855 100644
--- a/sd/inc/undoanim.hxx
+++ b/sd/inc/undoanim.hxx
@@ -23,6 +23,7 @@
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/animations/XAnimationNode.hpp>
#include <svx/svdundo.hxx>
+#include <boost/scoped_ptr.hpp>
#include "sdundo.hxx"
@@ -45,7 +46,7 @@ public:
virtual rtl::OUString GetComment() const;
private:
- UndoAnimationImpl* mpImpl;
+ boost::scoped_ptr<UndoAnimationImpl> mpImpl;
};
struct UndoAnimationPathImpl;
@@ -61,7 +62,7 @@ public:
virtual rtl::OUString GetComment() const;
private:
- UndoAnimationPathImpl* mpImpl;
+ boost::scoped_ptr<UndoAnimationPathImpl> mpImpl;
};
struct UndoTransitionImpl;
@@ -78,7 +79,7 @@ public:
virtual rtl::OUString GetComment() const;
private:
- UndoTransitionImpl* mpImpl;
+ boost::scoped_ptr<UndoTransitionImpl> mpImpl;
};
}
diff --git a/sd/source/core/undoanim.cxx b/sd/source/core/undoanim.cxx
index 49752d9..27ca99f 100644
--- a/sd/source/core/undoanim.cxx
+++ b/sd/source/core/undoanim.cxx
@@ -65,7 +65,6 @@ UndoAnimation::UndoAnimation( SdDrawDocument* pDoc, SdPage* pThePage )
UndoAnimation::~UndoAnimation()
{
- delete mpImpl;
}
void UndoAnimation::Undo()
@@ -233,7 +232,6 @@ UndoTransition::UndoTransition( SdDrawDocument* _pDoc, SdPage* pThePage )
UndoTransition::~UndoTransition()
{
- delete mpImpl;
}
void UndoTransition::Undo()
More information about the Libreoffice-commits
mailing list