[Libreoffice-commits] .: 2 commits - filter/inc filter/source svx/inc
David Tardon
dtardon at kemper.freedesktop.org
Mon Jul 23 01:41:18 PDT 2012
filter/inc/filter/msfilter/msdffimp.hxx | 14 +++++++-------
filter/inc/filter/msfilter/svdfppt.hxx | 12 ++++++------
filter/source/msfilter/svdfppt.cxx | 8 ++++++++
svx/inc/svx/svditer.hxx | 6 +++---
4 files changed, 24 insertions(+), 16 deletions(-)
New commits:
commit 4d05a50182587ee2c63b6911206cbd6c3287c180
Author: David Tardon <dtardon at redhat.com>
Date: Mon Jul 23 10:33:36 2012 +0200
mark more one-param ctors as explicit
Change-Id: Idf923e4a1e81a2e2e9c7107e4b6725bd9eb33e38
diff --git a/filter/inc/filter/msfilter/msdffimp.hxx b/filter/inc/filter/msfilter/msdffimp.hxx
index 22a8d72..e127aa8 100644
--- a/filter/inc/filter/msfilter/msdffimp.hxx
+++ b/filter/inc/filter/msfilter/msdffimp.hxx
@@ -121,7 +121,7 @@ protected:
DffPropFlags mpFlags[ 1024 ];
public:
- DffPropSet( sal_Bool bInitialize = sal_False )
+ explicit DffPropSet( sal_Bool bInitialize = sal_False )
{
if ( bInitialize )
memset( mpFlags, 0, 0x400 * sizeof( DffPropFlags ) );
@@ -160,7 +160,7 @@ class MSFILTER_DLLPUBLIC DffPropertyReader : public DffPropSet
public:
sal_Int32 mnFix16Angle;
- DffPropertyReader( const SvxMSDffManager& rManager );
+ explicit DffPropertyReader( const SvxMSDffManager& rManager );
~DffPropertyReader();
sal_Int32 Fix16ToAngle( sal_Int32 nAngle ) const;
@@ -344,7 +344,7 @@ struct SvxMSDffImportData
SvxMSDffImportData()
{}
- SvxMSDffImportData( const Rectangle& rParentRect ) : aParentRect( rParentRect ) {}
+ explicit SvxMSDffImportData( const Rectangle& rParentRect ) : aParentRect( rParentRect ) {}
void SetNewRect(sal_Int32 left, sal_Int32 top, sal_Int32 right, sal_Int32 bottom )
{ aNewRect = Rectangle(left, top, right, bottom); }
sal_Bool HasParRect() const { return aParentRect.IsEmpty(); }
@@ -403,7 +403,7 @@ struct DffRecordList
DffRecordHeader mHd[ DFF_RECORD_MANAGER_BUF_SIZE ];
- DffRecordList( DffRecordList* pList );
+ explicit DffRecordList( DffRecordList* pList );
~DffRecordList();
};
@@ -431,7 +431,7 @@ public :
DffSeekToContentMode eMode = SEEK_FROM_BEGINNING );
DffRecordManager();
- DffRecordManager( SvStream& rIn );
+ explicit DffRecordManager( SvStream& rIn );
~DffRecordManager();
DffRecordHeader* Current();
@@ -815,7 +815,7 @@ struct SvxMSDffShapeInfo
sal_Bool bSortByShapeId :1;
sal_Bool bLastBoxInChain:1;
- SvxMSDffShapeInfo(sal_uLong nFPos, sal_uInt32 nId=0, // sal_uLong nBIdx=0,
+ explicit SvxMSDffShapeInfo(sal_uLong nFPos, sal_uInt32 nId=0, // sal_uLong nBIdx=0,
sal_uInt16 nSeqId=0, sal_uInt16 nBoxId=0):
nShapeId( nId ),
nFilePos( nFPos ),
@@ -860,7 +860,7 @@ struct SvxMSDffShapeOrder
// Approach: In the Ctor of SvxMSDffManager only the shape ids are stored in
// the shape order array. The Text-Box number and the object
// pointer are only stored if the shape is really imported.
- SvxMSDffShapeOrder( sal_uLong nId ):
+ explicit SvxMSDffShapeOrder( sal_uLong nId ):
nShapeId( nId ), nTxBxComp( 0 ), pFly( 0 ), nHdFtSection( 0 ), pObj( 0 ){}
bool operator==( const SvxMSDffShapeOrder& rEntry ) const
diff --git a/filter/inc/filter/msfilter/svdfppt.hxx b/filter/inc/filter/msfilter/svdfppt.hxx
index d2fb3b1..baf955e 100644
--- a/filter/inc/filter/msfilter/svdfppt.hxx
+++ b/filter/inc/filter/msfilter/svdfppt.hxx
@@ -500,7 +500,7 @@ struct MSFILTER_DLLPUBLIC HeaderFooterEntry
const PptSlidePersistEntry& rSlidePersist
);
- HeaderFooterEntry( const PptSlidePersistEntry* pMaster = NULL );
+ explicit HeaderFooterEntry( const PptSlidePersistEntry* pMaster = NULL );
~HeaderFooterEntry();
};
@@ -672,7 +672,7 @@ struct PPTTextSpecInfo
sal_uInt16 nLanguage[ 3 ];
sal_uInt16 nDontKnow;
- PPTTextSpecInfo( sal_uInt32 nCharIdx );
+ explicit PPTTextSpecInfo( sal_uInt32 nCharIdx );
~PPTTextSpecInfo();
};
@@ -762,7 +762,7 @@ struct PPTCharSheet
{
PPTCharLevel maCharLevel[ 5 ];
- PPTCharSheet( sal_uInt32 nInstance );
+ explicit PPTCharSheet( sal_uInt32 nInstance );
PPTCharSheet( const PPTCharSheet& rCharSheet );
void Read( SvStream& rIn, sal_Bool bMasterStyle, sal_uInt32 nLevel, sal_Bool bFirst );
@@ -795,7 +795,7 @@ public:
PPTParaLevel maParaLevel[ 5 ];
- PPTParaSheet( sal_uInt32 nInstance );
+ explicit PPTParaSheet( sal_uInt32 nInstance );
PPTParaSheet( const PPTParaSheet& rParaSheet );
void Read(
@@ -945,7 +945,7 @@ struct PPTCharPropSet
void SetFont( sal_uInt16 nFont );
void SetColor( sal_uInt32 nColor );
- PPTCharPropSet( sal_uInt32 nParagraph );
+ explicit PPTCharPropSet( sal_uInt32 nParagraph );
PPTCharPropSet( PPTCharPropSet& rCharPropSet );
PPTCharPropSet( PPTCharPropSet& rCharPropSet, sal_uInt32 nParagraph );
~PPTCharPropSet();
@@ -1204,7 +1204,7 @@ struct ImplPPTTextObj
sal_uInt32 mnTextFlags;
- ImplPPTTextObj( PptSlidePersistEntry& rPersistEntry ) : mrPersistEntry ( rPersistEntry ) {};
+ explicit ImplPPTTextObj( PptSlidePersistEntry& rPersistEntry ) : mrPersistEntry ( rPersistEntry ) {};
};
class PPTTextObj
diff --git a/svx/inc/svx/svditer.hxx b/svx/inc/svx/svditer.hxx
index 85fc4b6..044e375 100644
--- a/svx/inc/svx/svditer.hxx
+++ b/svx/inc/svx/svditer.hxx
@@ -55,7 +55,7 @@ class SVX_DLLPUBLIC SdrObjListIter
void ImpProcessObj(SdrObject* pObj, SdrIterMode eMode, bool bUseZOrder);
public:
- SdrObjListIter(const SdrObjList& rObjList, SdrIterMode eMode = IM_DEEPNOGROUPS, bool bReverse = false);
+ explicit SdrObjListIter(const SdrObjList& rObjList, SdrIterMode eMode = IM_DEEPNOGROUPS, bool bReverse = false);
/** This variant lets the user choose the order in which to travel over
the objects.
@param bUseZOrder
@@ -67,10 +67,10 @@ public:
/* SJ: the following function can now be used with every
SdrObject and is no longer limited to group objects */
- SdrObjListIter(const SdrObject& rObj, SdrIterMode eMode = IM_DEEPNOGROUPS, bool bReverse = false);
+ explicit SdrObjListIter(const SdrObject& rObj, SdrIterMode eMode = IM_DEEPNOGROUPS, bool bReverse = false);
/** Iterates over a list of marked objects received from the SdrMarkView. */
- SdrObjListIter(const SdrMarkList& rMarkList, SdrIterMode eMode = IM_DEEPNOGROUPS, bool bReverse = false);
+ explicit SdrObjListIter(const SdrMarkList& rMarkList, SdrIterMode eMode = IM_DEEPNOGROUPS, bool bReverse = false);
void Reset() { mnIndex = (mbReverse ? maObjList.size() : 0L); }
bool IsMore() const { return (mbReverse ? mnIndex != 0 : ( mnIndex < maObjList.size())); }
commit d067102af8cbe1f95fb2f0458df891bd38210723
Author: David Tardon <dtardon at redhat.com>
Date: Mon Jul 23 10:00:32 2012 +0200
fdo#52015 do not crash importing connector to table from .ppt
Change-Id: Ib7d7860cd422b28b6987f94da0a9c664ff7dfde1
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 63dc372..c94c132 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -7460,6 +7460,14 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTab
for ( size_t i = 0; i < pSolverContainer->aCList.size(); ++i )
{
SvxMSDffConnectorRule* pPtr = pSolverContainer->aCList[ i ];
+
+ // check connections to the group object
+ if ( pPtr->pAObj == pGroup )
+ pPtr->pAObj = NULL;
+ if ( pPtr->pBObj == pGroup )
+ pPtr->pBObj = NULL;
+
+ // check connections to all its subobjects
SdrObjListIter aIter( *pGroup, IM_DEEPWITHGROUPS );
while( aIter.IsMore() )
{
More information about the Libreoffice-commits
mailing list