[Libreoffice-commits] core.git: 2 commits - svx/source sw/source
Caolán McNamara
caolanm at redhat.com
Wed Jun 3 08:16:30 PDT 2015
svx/source/sdr/attribute/sdrtextattribute.cxx | 13 ++++++-------
sw/source/core/layout/layact.cxx | 1 +
2 files changed, 7 insertions(+), 7 deletions(-)
New commits:
commit 9eb16c85d6af4b73de9a75716c3ff34f929f26b2
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jun 3 14:15:03 2015 +0100
don't crash on layout of ooo55381-1.sxw
The pLay here is getting joined and thus deleted in a stack of
FormatLayoutTabs so set it as unjoinable for the duration that
we expect pLay to remain valid
Change-Id: Iedfaf710022ad19c0f415cee84f70c74dd7dbd96
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index fa4c289..c06706e 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -1393,6 +1393,7 @@ bool SwLayAction::FormatLayout( SwLayoutFrm *pLay, bool bAddRect )
if ( pLay->IsFootnoteFrm() ) // no LayFrms as Lower
return bChanged;
+ FlowFrmJoinLockGuard aJoinGuard(pLay);
SwFrm *pLow = pLay->Lower();
bool bTabChanged = false;
while ( pLow && pLow->GetUpper() == pLay )
commit 768a2d61c3b0a71fef0d9d732ae83938fe24633e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 2 20:37:04 2015 +0100
coverity#1302605 Resource leak in object
Change-Id: I574714c2d587ac22fcc812ffe8217f151ac40cb6
diff --git a/svx/source/sdr/attribute/sdrtextattribute.cxx b/svx/source/sdr/attribute/sdrtextattribute.cxx
index 45b55fb..ddd1ce1 100644
--- a/svx/source/sdr/attribute/sdrtextattribute.cxx
+++ b/svx/source/sdr/attribute/sdrtextattribute.cxx
@@ -38,7 +38,7 @@ namespace drawinglayer
// all-text attributes. The SdrText itself and a copy
// of the OPO
const SdrText* mpSdrText;
- const OutlinerParaObject* mpOutlinerParaObject;
+ std::shared_ptr<OutlinerParaObject> mxOutlinerParaObject;
// Set when it's a FormText; contains all FormText attributes
SdrFormTextAttribute maSdrFormTextAttribute;
@@ -88,7 +88,7 @@ namespace drawinglayer
bool bFixedCellHeight,
bool bWrongSpell)
: mpSdrText(pSdrText),
- mpOutlinerParaObject(new OutlinerParaObject(rOutlinerParaObject)),
+ mxOutlinerParaObject(new OutlinerParaObject(rOutlinerParaObject)),
maSdrFormTextAttribute(),
maTextLeftDistance(aTextLeftDistance),
maTextUpperDistance(aTextUpperDistance),
@@ -125,7 +125,6 @@ namespace drawinglayer
ImpSdrTextAttribute()
: mpSdrText(0),
- mpOutlinerParaObject(0),
maSdrFormTextAttribute(),
maTextLeftDistance(0),
maTextUpperDistance(0),
@@ -155,8 +154,8 @@ namespace drawinglayer
const OutlinerParaObject& getOutlinerParaObject() const
{
- assert(mpOutlinerParaObject && "Access to OutlinerParaObject of default version of ImpSdrTextAttribute (!)");
- return *mpOutlinerParaObject;
+ assert(mxOutlinerParaObject && "Access to OutlinerParaObject of default version of ImpSdrTextAttribute (!)");
+ return *mxOutlinerParaObject;
}
bool isContour() const { return mbContour; }
@@ -180,9 +179,9 @@ namespace drawinglayer
// compare operator
bool operator==(const ImpSdrTextAttribute& rCandidate) const
{
- if(mpOutlinerParaObject != rCandidate.mpOutlinerParaObject)
+ if (mxOutlinerParaObject.get() != rCandidate.mxOutlinerParaObject.get())
{
- if(mpOutlinerParaObject && rCandidate.mpOutlinerParaObject)
+ if (mxOutlinerParaObject && rCandidate.mxOutlinerParaObject)
{
// compares OPO and it's contents, but traditionally not the RedLining
// which is not seen as model, but as temporary information
More information about the Libreoffice-commits
mailing list