[Libreoffice-commits] core.git: 3 commits - include/oox include/svx svx/source
Jian Fang Zhang
zhangjf at apache.org
Sat May 25 05:28:33 PDT 2013
include/oox/core/recordparser.hxx | 4 +---
include/svx/sdasitm.hxx | 17 +++++++++++++++++
svx/source/form/fmundo.cxx | 3 +++
svx/source/items/customshapeitem.cxx | 15 ++-------------
4 files changed, 23 insertions(+), 16 deletions(-)
New commits:
commit 853a7ae81de88a9b2903a673a40b6a3943868c6a
Author: Jian Fang Zhang <zhangjf at apache.org>
Date: Wed Sep 5 03:44:09 2012 +0000
Resolves: #i120746# FormScriptingEnvironment is never released
when created in the FmXUndoEnvironment ctor it is never released
Found by: zhangjf
Patch by: zhangjf
(cherry picked from commit d52fc99575db0d30b19a69dadcd2c3544584ecab)
Change-Id: Iaeba1018551441f3bb13f90d3d42ac2855e285e6
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index cf1567b..7b07764 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -193,6 +193,9 @@ FmXUndoEnvironment::FmXUndoEnvironment(FmFormModel& _rModel)
FmXUndoEnvironment::~FmXUndoEnvironment()
{
DBG_DTOR(FmXUndoEnvironment,NULL);
+ if ( !m_bDisposed ) // i120746, call FormScriptingEnvironment::dispose to avoid memory leak
+ m_pScriptingEnv->dispose();
+
if (m_pPropertySetCache)
delete static_cast<PropertySetInfoCache*>(m_pPropertySetCache);
}
commit a6659d6df6d68a4df43e70376cf6eea1fb54b932
Author: Herbert Dürr <hdu at apache.org>
Date: Tue Apr 16 12:03:08 2013 +0000
provide complete types of some SdrCustomShapeGeometryItem functors...
before they are used
(cherry picked from commit 7d6c5e79a17aa2ff392433667187c4bfe4ee2432)
Conflicts:
svx/inc/svx/sdasitm.hxx
svx/source/items/customshapeitem.cxx
Change-Id: Iac3e37bcfd4ab26d97411092259da2cc1879c2de
diff --git a/include/svx/sdasitm.hxx b/include/svx/sdasitm.hxx
index e54bf1f..0f7164e 100644
--- a/include/svx/sdasitm.hxx
+++ b/include/svx/sdasitm.hxx
@@ -127,6 +127,23 @@ public:
SdrTextAutoGrowSizeItem( SvStream& rIn ) : SdrOnOffItem( SDRATTR_TEXT_AUTOGROWSIZE, rIn ) {}
};
+// some useful inline methods
+
+inline bool SdrCustomShapeGeometryItem::PropertyEq::operator()( const OUString& r1, const OUString& r2 ) const
+{
+ return r1.equals( r2 );
+}
+
+inline bool SdrCustomShapeGeometryItem::PropertyPairEq::operator()( const SdrCustomShapeGeometryItem::PropertyPair& r1, const SdrCustomShapeGeometryItem::PropertyPair& r2 ) const
+{
+ return ( r1.first.equals( r2.first ) ) && ( r1.second.equals( r2.second ) );
+}
+
+inline size_t SdrCustomShapeGeometryItem::PropertyPairHash::operator()( const SdrCustomShapeGeometryItem::PropertyPair &r1 ) const
+{
+ return (size_t)r1.first.hashCode() + r1.second.hashCode();
+};
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/items/customshapeitem.cxx b/svx/source/items/customshapeitem.cxx
index 5b8ed9f..87b8cfc 100644
--- a/svx/source/items/customshapeitem.cxx
+++ b/svx/source/items/customshapeitem.cxx
@@ -31,23 +31,12 @@ SdrCustomShapeDataItem::SdrCustomShapeDataItem()
: SfxStringItem( SDRATTR_CUSTOMSHAPE_DATA, String() )
{}
-bool SdrCustomShapeGeometryItem::PropertyEq::operator()( const OUString& r1, const OUString& r2 ) const
-{
- return r1.equals( r2 );
-}
-bool SdrCustomShapeGeometryItem::PropertyPairEq::operator()( const SdrCustomShapeGeometryItem::PropertyPair& r1, const SdrCustomShapeGeometryItem::PropertyPair& r2 ) const
-{
- return ( r1.first.equals( r2.first ) ) && ( r1.second.equals( r2.second ) );
-}
-size_t SdrCustomShapeGeometryItem::PropertyPairHash::operator()( const SdrCustomShapeGeometryItem::PropertyPair &r1 ) const
-{
- return (size_t)r1.first.hashCode() + r1.second.hashCode();
-};
-
TYPEINIT1_FACTORY( SdrCustomShapeGeometryItem, SfxPoolItem , new SdrCustomShapeGeometryItem);
+
SdrCustomShapeGeometryItem::SdrCustomShapeGeometryItem()
: SfxPoolItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )
{}
+
SdrCustomShapeGeometryItem::SdrCustomShapeGeometryItem( const uno::Sequence< beans::PropertyValue >& rVal )
: SfxPoolItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )
{
commit 1fb61b87136e556f13537794d30077606f4949c9
Author: Herbert Dürr <hdu at apache.org>
Date: Tue Apr 16 11:23:34 2013 +0000
provide complete types of FragmentHandler and RecordInfo before they are used
(cherry picked from commit c73bc9587bdcf6a5d3add454fe3383fc9d2c1e65)
Conflicts:
oox/inc/oox/core/recordparser.hxx
Change-Id: I6deecaabe32d4b071a83ce4687f83543354ddac2
diff --git a/include/oox/core/recordparser.hxx b/include/oox/core/recordparser.hxx
index 9e417c0..bd89427 100644
--- a/include/oox/core/recordparser.hxx
+++ b/include/oox/core/recordparser.hxx
@@ -25,13 +25,11 @@
#include <com/sun/star/xml/sax/SAXException.hpp>
#include <rtl/ref.hxx>
#include "oox/helper/binaryinputstream.hxx"
+#include "oox/core/fragmenthandler.hxx"
namespace oox {
namespace core {
-class FragmentHandler;
-struct RecordInfo;
-
namespace prv { class Locator; }
namespace prv { class ContextStack; }
More information about the Libreoffice-commits
mailing list