filter/inc/filter/msfilter/msdffimp.hxx | 595 +++++++++++++++----------------- 1 file changed, 295 insertions(+), 300 deletions(-)
New commits: commit f3e7d82e7c20f8d78b418ecc92d2e22c0a3fb0dc Author: Philipp Riemer <[email protected]> Date: Sat Jun 23 20:21:09 2012 +0200 cleanup filter/.../msdffimp.hxx - deleted empty lines - re-indented code - added/deleted spaces in parameter lists - wrapped parameter lists if too long diff --git a/filter/inc/filter/msfilter/msdffimp.hxx b/filter/inc/filter/msfilter/msdffimp.hxx index 2116c85..ebfc993 100644 --- a/filter/inc/filter/msfilter/msdffimp.hxx +++ b/filter/inc/filter/msfilter/msdffimp.hxx @@ -55,7 +55,6 @@ class PolyPolygon; class FmFormModel; class SdrModel; class DffRecordHeader; - class SwFlyFrmFmt; struct SvxMSDffBLIPInfo; @@ -64,7 +63,6 @@ struct SvxMSDffShapeOrder; class MSFILTER_DLLPUBLIC DffRecordHeader { - public: sal_uInt8 nRecVer; // may be DFF_PSFLAG_CONTAINER sal_uInt16 nRecInstance; @@ -72,11 +70,13 @@ public: sal_uInt16 nRecType; sal_uInt32 nRecLen; sal_uLong nFilePos; -public: - DffRecordHeader() : nRecVer(0), nRecInstance(0), nImpVerInst(0), nRecType(0), nRecLen(0), nFilePos(0) {} + + DffRecordHeader() : nRecVer(0), nRecInstance(0), nImpVerInst(0), + nRecType(0), nRecLen(0), nFilePos(0) {} bool IsContainer() const { return nRecVer == DFF_PSFLAG_CONTAINER; } sal_uLong GetRecBegFilePos() const { return nFilePos; } - sal_uLong GetRecEndFilePos() const { return nFilePos + DFF_COMMON_RECORD_HEADER_SIZE + nRecLen; } + sal_uLong GetRecEndFilePos() const + { return nFilePos + DFF_COMMON_RECORD_HEADER_SIZE + nRecLen; } bool SeekToEndOfRecord(SvStream& rIn) const { sal_Size nPos = nFilePos + DFF_COMMON_RECORD_HEADER_SIZE + nRecLen; @@ -93,7 +93,6 @@ public: } MSFILTER_DLLPUBLIC friend SvStream& operator>>(SvStream& rIn, DffRecordHeader& rRec); - }; struct DffPropFlags @@ -113,22 +112,21 @@ private: DffPropFlags& rFlags, sal_uInt32 nRecordType) const; protected: - -typedef std::map<sal_uInt32, sal_uInt32> RecordTypesMap; + typedef std::map<sal_uInt32, sal_uInt32> RecordTypesMap; RecordTypesMap maRecordTypes; sal_uInt32 mpContents[ 1024 ]; DffPropFlags mpFlags[ 1024 ]; public: - DffPropSet( sal_Bool bInitialize = sal_False ) { if ( bInitialize ) memset( mpFlags, 0, 0x400 * sizeof( DffPropFlags ) ); }; - inline sal_Bool IsProperty( sal_uInt32 nRecType ) const { return ( mpFlags[ nRecType & 0x3ff ].bSet ); }; + inline sal_Bool IsProperty( sal_uInt32 nRecType ) const + { return ( mpFlags[ nRecType & 0x3ff ].bSet ); }; sal_Bool IsHardAttribute( sal_uInt32 nId ) const; sal_uInt32 GetPropertyValue( sal_uInt32 nId, sal_uInt32 nDefault = 0 ) const; /** Returns a boolean property by its real identifier. */ @@ -150,43 +148,40 @@ class MSFILTER_DLLPUBLIC DffPropertyReader : public DffPropSet const SvxMSDffManager& rManager; DffPropSet* pDefaultPropSet; - void ApplyCustomShapeTextAttributes( SfxItemSet& rSet ) const; - void ApplyCustomShapeAdjustmentAttributes( SfxItemSet& rSet ) const; - void ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxItemSet& rSet, const DffObjData& rObjData ) const; - void ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eShapeType ) const; // #i28269# - void ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, const DffObjData& rObjData ) const; + void ApplyCustomShapeTextAttributes( SfxItemSet& rSet ) const; + void ApplyCustomShapeAdjustmentAttributes( SfxItemSet& rSet ) const; + void ApplyCustomShapeGeometryAttributes( SvStream& rIn, + SfxItemSet& rSet, + const DffObjData& rObjData ) const; + void ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eShapeType ) const; // #i28269# + void ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, const DffObjData& rObjData ) const; public: - - sal_Int32 mnFix16Angle; - + sal_Int32 mnFix16Angle; DffPropertyReader( const SvxMSDffManager& rManager ); ~DffPropertyReader(); - sal_Int32 Fix16ToAngle( sal_Int32 nAngle ) const; + sal_Int32 Fix16ToAngle( sal_Int32 nAngle ) const; #ifdef DBG_CUSTOMSHAPE - void ReadPropSet( SvStream& rIn, void* pClientData, sal_uInt32 nShapeType = 0 ) const; + void ReadPropSet( SvStream& rIn, void* pClientData, sal_uInt32 nShapeType = 0 ) const; #else - void ReadPropSet( SvStream& rIn, void* pClientData ) const; + void ReadPropSet( SvStream& rIn, void* pClientData ) const; #endif - void SetDefaultPropSet( SvStream& rIn, sal_uInt32 nOffDgg ) const; - void ApplyAttributes( SvStream& rIn, SfxItemSet& rSet ) const; - void ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const DffObjData& rObjData ) const; + void SetDefaultPropSet( SvStream& rIn, sal_uInt32 nOffDgg ) const; + void ApplyAttributes( SvStream& rIn, SfxItemSet& rSet ) const; + void ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const DffObjData& rObjData ) const; }; - #define COL_DEFAULT RGB_COLORDATA( 0xFA, 0xFB, 0xFC ) typedef SvxMSDffShapeInfo* SvxMSDffShapeInfo_Ptr; - typedef ::std::map< sal_Int32, SdrObject* > SvxMSDffShapeIdContainer; #define SVEXT_PERSIST_STREAM "\002OlePres000" // the following two will be sorted by the order of their appearance: typedef boost::ptr_vector<SvxMSDffBLIPInfo> SvxMSDffBLIPInfos; - class SvxMSDffShapeOrders : public std::vector<SvxMSDffShapeOrder*> { public: @@ -250,8 +245,8 @@ struct MSFILTER_DLLPUBLIC SvxMSDffSolverContainer { SvxMSDffConnectorRuleList aCList; - SvxMSDffSolverContainer(); - ~SvxMSDffSolverContainer(); + SvxMSDffSolverContainer(); + ~SvxMSDffSolverContainer(); MSFILTER_DLLPUBLIC friend SvStream& operator>>( SvStream& rIn, SvxMSDffSolverContainer& rAtom ); }; @@ -267,12 +262,10 @@ struct MSDffTxId { sal_uInt16 nTxBxS; sal_uInt16 nSequence; - MSDffTxId(sal_uInt16 nTxBxS_, sal_uInt16 nSequence_ ) - : nTxBxS( nTxBxS_ ), - nSequence( nSequence_ ){} - MSDffTxId(const MSDffTxId& rCopy) - : nTxBxS( rCopy.nTxBxS ), - nSequence( rCopy.nSequence ){} + MSDffTxId( sal_uInt16 nTxBxS_, sal_uInt16 nSequence_ ) + : nTxBxS( nTxBxS_ ), nSequence( nSequence_ ){} + MSDffTxId( const MSDffTxId& rCopy ) + : nTxBxS( rCopy.nTxBxS ), nSequence( rCopy.nSequence ){} }; struct MSFILTER_DLLPUBLIC SvxMSDffImportRec @@ -315,8 +308,8 @@ struct MSFILTER_DLLPUBLIC SvxMSDffImportRec sal_Bool bReplaceByFly :1; sal_Bool bLastBoxInChain :1; sal_Bool bHasUDefProp :1; - sal_Bool bVFlip :1; - sal_Bool bHFlip :1; + sal_Bool bVFlip :1; + sal_Bool bHFlip :1; sal_Bool bAutoWidth :1; int relativeHorizontalWidth; ///< in 0.1% or -1 for none bool isHorizontalRule; @@ -324,11 +317,12 @@ struct MSFILTER_DLLPUBLIC SvxMSDffImportRec SvxMSDffImportRec(); SvxMSDffImportRec(const SvxMSDffImportRec& rCopy); ~SvxMSDffImportRec(); + sal_Bool operator==( const SvxMSDffImportRec& rEntry ) const { return nShapeId == rEntry.nShapeId; } - sal_Bool operator<( const SvxMSDffImportRec& rEntry ) const { return nShapeId < rEntry.nShapeId; } + private: SvxMSDffImportRec &operator=(const SvxMSDffImportRec&); }; @@ -336,7 +330,7 @@ private: typedef SvxMSDffImportRec* MSDffImportRec_Ptr; /** list of all SvxMSDffImportRec instances of/for a group */ -SV_DECL_PTRARR_SORT_DEL_VISIBILITY(MSDffImportRecords, MSDffImportRec_Ptr, 16, MSFILTER_DLLPUBLIC) +SV_DECL_PTRARR_SORT_DEL_VISIBILITY( MSDffImportRecords, MSDffImportRec_Ptr, 16, MSFILTER_DLLPUBLIC ) /** block of parameters for import/export for a single call of ImportObjAtCurrentStreamPos() */ @@ -349,17 +343,15 @@ struct SvxMSDffImportData SvxMSDffImportData() {} - SvxMSDffImportData(const Rectangle& rParentRect) - :aParentRect( rParentRect ) - {} - void SetNewRect(sal_Int32 l, sal_Int32 o, - sal_Int32 r, sal_Int32 u ){ aNewRect = Rectangle(l,o, r,u); } + 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(); } sal_Bool HasNewRect() const { return aNewRect.IsEmpty() ; } sal_Bool HasRecords() const { return 0 != aRecords.Count(); } - sal_uInt16 GetRecCount() const { return aRecords.Count(); } + sal_uInt16 GetRecCount() const { return aRecords.Count(); } SvxMSDffImportRec* GetRecord(sal_uInt16 iRecord) const - { return aRecords.GetObject( iRecord ); } + { return aRecords.GetObject( iRecord ); } }; struct DffObjData @@ -384,7 +376,7 @@ struct DffObjData DffObjData( const DffRecordHeader& rObjHd, const Rectangle& rBoundRect, - int nClByGroup ) : + int nClByGroup ) : rSpHd( rObjHd ), aBoundRect( rBoundRect ), nShapeId( 0 ), @@ -410,8 +402,8 @@ struct DffRecordList DffRecordHeader mHd[ DFF_RECORD_MANAGER_BUF_SIZE ]; - DffRecordList( DffRecordList* pList ); - ~DffRecordList(); + DffRecordList( DffRecordList* pList ); + ~DffRecordList(); }; enum DffSeekToContentMode @@ -423,25 +415,29 @@ enum DffSeekToContentMode class MSFILTER_DLLPUBLIC DffRecordManager : public DffRecordList { - public : - - DffRecordList* pCList; - - void Clear(); - void Consume( SvStream& rIn, sal_Bool bAppend = sal_False, sal_uInt32 nStOfs = 0 ); - - sal_Bool SeekToContent( SvStream& rIn, sal_uInt16 nRecType, DffSeekToContentMode eMode = SEEK_FROM_BEGINNING ); - DffRecordHeader* GetRecordHeader( sal_uInt16 nRecType, DffSeekToContentMode eMode = SEEK_FROM_BEGINNING ); - - DffRecordManager(); - DffRecordManager( SvStream& rIn ); - ~DffRecordManager(); - - DffRecordHeader* Current(); - DffRecordHeader* First(); - DffRecordHeader* Next(); - DffRecordHeader* Prev(); - DffRecordHeader* Last(); +public : + DffRecordList* pCList; + + void Clear(); + void Consume( SvStream& rIn, + sal_Bool bAppend = sal_False, + sal_uInt32 nStOfs = 0 ); + + sal_Bool SeekToContent( SvStream& rIn, + sal_uInt16 nRecType, + DffSeekToContentMode eMode = SEEK_FROM_BEGINNING ); + DffRecordHeader* GetRecordHeader( sal_uInt16 nRecType, + DffSeekToContentMode eMode = SEEK_FROM_BEGINNING ); + + DffRecordManager(); + DffRecordManager( SvStream& rIn ); + ~DffRecordManager(); + + DffRecordHeader* Current(); + DffRecordHeader* First(); + DffRecordHeader* Next(); + DffRecordHeader* Prev(); + DffRecordHeader* Last(); }; /** abstract base class for Escher imports @@ -470,8 +466,7 @@ class MSFILTER_DLLPUBLIC SvxMSDffManager : public DffPropertyReader void GetFidclData(sal_uInt32 nOffsDgg); protected : - -typedef std::map<sal_uInt32, sal_uInt32> OffsetMap; + typedef std::map<sal_uInt32, sal_uInt32> OffsetMap; String maBaseURL; sal_uInt32 mnCurMaxShapeId; // we need this information to @@ -541,11 +536,24 @@ typedef std::map<sal_uInt32, sal_uInt32> OffsetMap; const Rectangle& rVisArea ); // the following methods need to be overriden for Excel imports - virtual sal_Bool ProcessClientAnchor(SvStream& rStData, sal_uInt32 nDatLen, char*& rpBuff, sal_uInt32& rBuffLen ) const; - virtual void ProcessClientAnchor2( SvStream& rStData, DffRecordHeader& rHd, void* pData, DffObjData& ); - virtual sal_Bool ProcessClientData( SvStream& rStData, sal_uInt32 nDatLen, char*& rpBuff, sal_uInt32& rBuffLen ) const; - virtual SdrObject* ProcessObj( SvStream& rSt, DffObjData& rData, void* pData, Rectangle& rTextRect, SdrObject* pObj = NULL); - virtual sal_uLong Calc_nBLIPPos( sal_uLong nOrgVal, sal_uLong nStreamPos ) const; + virtual sal_Bool ProcessClientAnchor( SvStream& rStData, + sal_uInt32 nDatLen, + char*& rpBuff, + sal_uInt32& rBuffLen ) const; + virtual void ProcessClientAnchor2( SvStream& rStData, + DffRecordHeader& rHd, + void* pData, DffObjData& ); + virtual sal_Bool ProcessClientData( SvStream& rStData, + sal_uInt32 nDatLen, + char*& rpBuff, + sal_uInt32& rBuffLen ) const; + virtual SdrObject* ProcessObj( SvStream& rSt, + DffObjData& rData, + void* pData, + Rectangle& rTextRect, + SdrObject* pObj = NULL); + virtual sal_uLong Calc_nBLIPPos( sal_uLong nOrgVal, + sal_uLong nStreamPos ) const; virtual bool GetColorFromPalette(sal_uInt16 nNum, Color& rColor) const; // Fontwork objects use a new implementation of ReadObjText because the old @@ -553,9 +561,10 @@ typedef std::map<sal_uInt32, sal_uInt32> OffsetMap; void ReadObjText( const String& rText, SdrObject* pObj ) const; // the following method needs to be overridden for the import of OLE objects - virtual sal_Bool GetOLEStorageName( long nOLEId, String& rStorageName, - SotStorageRef& rSrcStorage, - com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xDestStg + virtual sal_Bool GetOLEStorageName( long nOLEId, + String& rStorageName, + SotStorageRef& rSrcStorage, + com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xDestStg ) const; /** Prevent that (rounded) rectangles with wrapped text will always be @@ -566,7 +575,6 @@ typedef std::map<sal_uInt32, sal_uInt32> OffsetMap; virtual sal_Bool ShapeHasText(sal_uLong nShapeId, sal_uLong nFilePos) const; public: - void* pSvxMSDffDummy1; void* pSvxMSDffDummy2; void* pSvxMSDffDummy3; @@ -578,18 +586,33 @@ public: sal_Bool mbTracing; Color MSO_TEXT_CLR_ToColor( sal_uInt32 nColorCode ) const; - Color MSO_CLR_ToColor( sal_uInt32 nColorCode, sal_uInt16 nContextProperty = DFF_Prop_lineColor ) const; - virtual sal_Bool SeekToShape( SvStream& rSt, void* pClientData, sal_uInt32 nId ) const; - bool SeekToRec( SvStream& rSt, sal_uInt16 nRecId, sal_uLong nMaxFilePos, DffRecordHeader* pRecHd = NULL, sal_uLong nSkipCount = 0 ) const; - bool SeekToRec2( sal_uInt16 nRecId1, sal_uInt16 nRecId2, sal_uLong nMaxFilePos, DffRecordHeader* pRecHd = NULL, sal_uLong nSkipCount = 0 ) const; - - static rtl::OUString MSDFFReadZString(SvStream& rIn, sal_uInt32 nMaxLen, bool bUniCode = sal_False); - - static bool ReadCommonRecordHeader(DffRecordHeader& rRec, SvStream& rIn) - SAL_WARN_UNUSED_RESULT; - static bool ReadCommonRecordHeader(SvStream& rSt, sal_uInt8& rVer, - sal_uInt16& rInst, sal_uInt16& rFbt, sal_uInt32& rLength) - SAL_WARN_UNUSED_RESULT; + Color MSO_CLR_ToColor( sal_uInt32 nColorCode, + sal_uInt16 nContextProperty = DFF_Prop_lineColor ) const; + virtual sal_Bool SeekToShape( SvStream& rSt, + void* pClientData, + sal_uInt32 nId ) const; + bool SeekToRec( SvStream& rSt, + sal_uInt16 nRecId, + sal_uLong nMaxFilePos, + DffRecordHeader* pRecHd = NULL, + sal_uLong nSkipCount = 0 ) const; + bool SeekToRec2( sal_uInt16 nRecId1, + sal_uInt16 nRecId2, + sal_uLong nMaxFilePos, + DffRecordHeader* pRecHd = NULL, + sal_uLong nSkipCount = 0 ) const; + + static rtl::OUString MSDFFReadZString( SvStream& rIn, + sal_uInt32 nMaxLen, + bool bUniCode = sal_False); + + static bool ReadCommonRecordHeader( DffRecordHeader& rRec, + SvStream& rIn) SAL_WARN_UNUSED_RESULT; + static bool ReadCommonRecordHeader( SvStream& rSt, + sal_uInt8& rVer, + sal_uInt16& rInst, + sal_uInt16& rFbt, + sal_uInt32& rLength) SAL_WARN_UNUSED_RESULT; // TODO: provide proper documentation here /** constructor @@ -619,13 +642,15 @@ public: SdrModel* pSdrModel_ = 0, long nApplicationScale = 0, ColorData mnDefaultColor_ = COL_DEFAULT, - sal_uLong nDefaultFontHeight_ = 24, + sal_uLong nDefaultFontHeight_ = 24, SvStream* pStData2_ = 0 ); // in PPT the parameters DGGContainerOffset and PicStream are provided by an // init method SvxMSDffManager( SvStream& rStCtrl, const String& rBaseURL ); - void InitSvxMSDffManager(sal_uInt32 nOffsDgg_, SvStream* pStData_, sal_uInt32 nSvxMSDffOLEConvFlags); + void InitSvxMSDffManager( sal_uInt32 nOffsDgg_, + SvStream* pStData_, + sal_uInt32 nSvxMSDffOLEConvFlags); void SetDgContainer( SvStream& rSt ); virtual ~SvxMSDffManager(); @@ -634,9 +659,12 @@ public: void SetSvxMSDffSettings( sal_uInt32 nSettings ) { nSvxMSDffSettings = nSettings; }; static sal_Bool MakeContentStream( SotStorage * pStor, const GDIMetaFile & ); - static sal_Bool ConvertToOle2( SvStream& rStm, sal_uInt32 nLen, const GDIMetaFile*, - const SotStorageRef & rDest ); - static rtl::OUString ReadDffString(SvStream& rSt, DffRecordHeader aStrHd = DffRecordHeader()); + static sal_Bool ConvertToOle2( SvStream& rStm, + sal_uInt32 nLen, + const GDIMetaFile*, + const SotStorageRef & rDest ); + static rtl::OUString ReadDffString( SvStream& rSt, + DffRecordHeader aStrHd = DffRecordHeader()); static bool ReadObjText(SvStream& rSt, SdrObject* pObj); void SetModel(SdrModel* pModel, long nApplicationScale); @@ -672,8 +700,7 @@ public: */ sal_Bool GetBLIPDirect(SvStream& rBLIPStream, Graphic& rData, Rectangle* pVisArea = NULL ) const; - sal_Bool GetShape(sal_uLong nId, - SdrObject*& rpData, SvxMSDffImportData& rData); + sal_Bool GetShape(sal_uLong nId, SdrObject*& rpData, SvxMSDffImportData& rData); /** Get count of managed BLIPs @@ -684,29 +711,42 @@ public: */ sal_uInt16 GetBLIPCount() const{ return nBLIPCount; } - SdrObject* ImportObj(SvStream& rSt, void* pData, - Rectangle& rClientRect, const Rectangle& rGlobalChildRect, int nCalledByGroup = 0, sal_Int32* pShapeId = NULL); - - SdrObject* ImportGroup( const DffRecordHeader& rHd, SvStream& rSt, void* pData, - Rectangle& rClientRect, const Rectangle& rGlobalChildRect, int nCalledByGroup = 0, sal_Int32* pShapeId = NULL ); - - SdrObject* ImportShape( const DffRecordHeader& rHd, SvStream& rSt, void* pData, - Rectangle& rClientRect, const Rectangle& rGlobalChildRect, int nCalledByGroup = 0, sal_Int32* pShapeId = NULL); - - Rectangle GetGlobalChildAnchor( const DffRecordHeader& rHd, SvStream& rSt, Rectangle& aClientRect ); - void GetGroupAnchors( const DffRecordHeader& rHd, SvStream& rSt, - Rectangle& rGroupClientAnchor, Rectangle& rGroupChildAnchor, - const Rectangle& rClientRect, const Rectangle& rGlobalChildRect ); + SdrObject* ImportObj( SvStream& rSt, + void* pData, + Rectangle& rClientRect, + const Rectangle& rGlobalChildRect, + int nCalledByGroup = 0, + sal_Int32* pShapeId = NULL); + SdrObject* ImportGroup( const DffRecordHeader& rHd, + SvStream& rSt, + void* pData, + Rectangle& rClientRect, + const Rectangle& rGlobalChildRect, + int nCalledByGroup = 0, + sal_Int32* pShapeId = NULL ); + SdrObject* ImportShape( const DffRecordHeader& rHd, + SvStream& rSt, + void* pData, + Rectangle& rClientRect, + const Rectangle& rGlobalChildRect, + int nCalledByGroup = 0, + sal_Int32* pShapeId = NULL); + + Rectangle GetGlobalChildAnchor( const DffRecordHeader& rHd, + SvStream& rSt, + Rectangle& aClientRect ); + void GetGroupAnchors( const DffRecordHeader& rHd, + SvStream& rSt, + Rectangle& rGroupClientAnchor, + Rectangle& rGroupChildAnchor, + const Rectangle& rClientRect, + const Rectangle& rGlobalChildRect ); inline const SvxMSDffShapeInfos* GetShapeInfos( void ) const - { - return pShapeInfos; - } + { return pShapeInfos; } inline const SvxMSDffShapeOrders* GetShapeOrders( void ) const - { - return pShapeOrders; - } + { return pShapeOrders; } void StoreShapeOrder(sal_uLong nId, sal_uLong nTxBx, @@ -823,13 +863,9 @@ struct SvxMSDffShapeOrder nShapeId( nId ), nTxBxComp( 0 ), pFly( 0 ), nHdFtSection( 0 ), pObj( 0 ){} sal_Bool operator==( const SvxMSDffShapeOrder& rEntry ) const - { - return (nTxBxComp == rEntry.nTxBxComp); - } + { return (nTxBxComp == rEntry.nTxBxComp); } sal_Bool operator<( const SvxMSDffShapeOrder& rEntry ) const - { - return (nTxBxComp < rEntry.nTxBxComp); - } + { return (nTxBxComp < rEntry.nTxBxComp); } }; #endif commit 01465da1bc926d6037427f566bdfc185f03f918f Author: Philipp Riemer <[email protected]> Date: Sat Jun 23 20:13:36 2012 +0200 change comments into doxygen format in filters/.../msdffimp.hxx - changed and re-indented documentation after members - re-wrapped and corrected some existing comments - deleted method that was commented out diff --git a/filter/inc/filter/msfilter/msdffimp.hxx b/filter/inc/filter/msfilter/msdffimp.hxx index 0bcb2f4..2116c85 100644 --- a/filter/inc/filter/msfilter/msdffimp.hxx +++ b/filter/inc/filter/msfilter/msdffimp.hxx @@ -201,19 +201,19 @@ SV_DECL_PTRARR_SORT_VISIBILITY( SvxMSDffShapeTxBxSort, SvxMSDffShapeOrder*, 16, #define SVXMSDFF_SETTINGS_IMPORT_PPT 2 #define SVXMSDFF_SETTINGS_IMPORT_EXCEL 4 -#define SP_FGROUP 0x001 // This shape is a group shape -#define SP_FCHILD 0x002 // Not a top-level shape -#define SP_FPATRIARCH 0x004 // This is the topmost group shape. - // Exactly one of these per drawing. -#define SP_FDELETED 0x008 // The shape has been deleted -#define SP_FOLESHAPE 0x010 // The shape is an OLE object -#define SP_FHAVEMASTER 0x020 // Shape has a hspMaster property -#define SP_FFLIPH 0x040 // Shape is flipped horizontally -#define SP_FFLIPV 0x080 // Shape is flipped vertically -#define SP_FCONNECTOR 0x100 // Connector type of shape -#define SP_FHAVEANCHOR 0x200 // Shape has an anchor of some kind -#define SP_FBACKGROUND 0x400 // Background shape -#define SP_FHAVESPT 0x800 // Shape has a shape type property +#define SP_FGROUP 0x001 ///< This shape is a group shape +#define SP_FCHILD 0x002 ///< Not a top-level shape +#define SP_FPATRIARCH 0x004 ///< This is the topmost group shape. + ///< Exactly one of these per drawing. +#define SP_FDELETED 0x008 ///< The shape has been deleted +#define SP_FOLESHAPE 0x010 ///< The shape is an OLE object +#define SP_FHAVEMASTER 0x020 ///< Shape has a hspMaster property +#define SP_FFLIPH 0x040 ///< Shape is flipped horizontally +#define SP_FFLIPV 0x080 ///< Shape is flipped vertically +#define SP_FCONNECTOR 0x100 ///< Connector type of shape +#define SP_FHAVEANCHOR 0x200 ///< Shape has an anchor of some kind +#define SP_FBACKGROUND 0x400 ///< Background shape +#define SP_FHAVESPT 0x800 ///< Shape has a shape type property // for the CreateSdrOLEFromStorage we need the information, how we handle // convert able OLE-Objects - this ist stored in @@ -225,20 +225,21 @@ SV_DECL_PTRARR_SORT_VISIBILITY( SvxMSDffShapeTxBxSort, SvxMSDffShapeOrder*, 16, struct SvxMSDffConnectorRule { sal_uInt32 nRuleId; - sal_uInt32 nShapeA; // SPID of shape A - - sal_uInt32 nShapeB; // SPID of shape B - sal_uInt32 nShapeC; // SPID of connector shape - sal_uInt32 ncptiA; // Connection site Index of shape A - sal_uInt32 ncptiB; // Connection site Index of shape B - sal_uInt32 nSpFlagsA; // SpFlags of shape A ( the original mirror flags must be known when solving the Solver Container ) - sal_uInt32 nSpFlagsB; // SpFlags of shape A - - SdrObject* pAObj; // pPtr of object ( corresponding to shape A ) - SdrObject* pBObj; // " - SdrObject* pCObj; // " of connector object - - SvxMSDffConnectorRule() : nSpFlagsA( 0 ), nSpFlagsB( 0 ), pAObj( NULL ), pBObj( NULL ), pCObj( NULL ) {}; + sal_uInt32 nShapeA; ///< SPID of shape A + sal_uInt32 nShapeB; ///< SPID of shape B + sal_uInt32 nShapeC; ///< SPID of connector shape + sal_uInt32 ncptiA; ///< Connection site Index of shape A + sal_uInt32 ncptiB; ///< Connection site Index of shape B + sal_uInt32 nSpFlagsA; ///< SpFlags of shape A (the original mirror flags + ///< must be known when solving the Solver Container) + sal_uInt32 nSpFlagsB; ///< SpFlags of shape B + + SdrObject* pAObj; ///< pPtr of object (corresponding to shape A) + SdrObject* pBObj; ///< pPtr of object (corresponding to shape B) + SdrObject* pCObj; ///< pPtr of connector object + + SvxMSDffConnectorRule() : nSpFlagsA( 0 ), nSpFlagsB( 0 ), pAObj( NULL ), + pBObj( NULL ), pCObj( NULL ) {}; friend SvStream& operator>>( SvStream& rIn, SvxMSDffConnectorRule& rAtom ); }; @@ -257,8 +258,8 @@ struct MSFILTER_DLLPUBLIC SvxMSDffSolverContainer struct FIDCL { - sal_uInt32 dgid; // DG owning the SPIDs in this cluster - sal_uInt32 cspidCur; // number of SPIDs used so far + sal_uInt32 dgid; ///< DG owning the SPIDs in this cluster + sal_uInt32 cspidCur; ///< number of SPIDs used so far }; /// provided by SvxMSDffManager for each shape in a group @@ -317,7 +318,7 @@ struct MSFILTER_DLLPUBLIC SvxMSDffImportRec sal_Bool bVFlip :1; sal_Bool bHFlip :1; sal_Bool bAutoWidth :1; - int relativeHorizontalWidth; // in 0.1% or -1 for none + int relativeHorizontalWidth; ///< in 0.1% or -1 for none bool isHorizontalRule; SvxMSDffImportRec(); @@ -477,7 +478,7 @@ typedef std::map<sal_uInt32, sal_uInt32> OffsetMap; sal_uInt32 mnDrawingsSaved; // access the right drawing sal_uInt32 mnIdClusters; // while only knowing the shapeid std::vector<FIDCL> maFidcls; - OffsetMap maDgOffsetTable; // array of fileoffsets + OffsetMap maDgOffsetTable; ///< array of fileoffsets friend class DffPropertyReader; @@ -498,9 +499,8 @@ typedef std::map<sal_uInt32, sal_uInt32> OffsetMap; sal_uInt32 nSvxMSDffSettings; sal_uInt32 nSvxMSDffOLEConvFlags; - /** stores a reference to an imported SdrObject with its shape id if - it has one - */ + /** stores a reference to an imported SdrObject + with its shape id if it has one */ SvxMSDffShapeIdContainer maShapeIdContainer; void GetCtrlData(sal_uInt32 nOffsDgg); @@ -526,7 +526,7 @@ typedef std::map<sal_uInt32, sal_uInt32> OffsetMap; bool ReadGraphic( SvStream& rSt, sal_uLong nIndex, Graphic& rGraphic ) const; SdrObject* ImportGraphic( SvStream&, SfxItemSet&, const DffObjData& ); // #i32596# - pass <nCalledByGroup> to method - // Needed in the Writer Microsoft Word import to avoid import of OLE objects + // Needed in Writer's Microsoft Word import to avoid import of OLE objects // inside groups. Instead a graphic object is created. virtual SdrObject* ImportOLE( long nOLEId, const Graphic& rGraf, @@ -548,8 +548,8 @@ typedef std::map<sal_uInt32, sal_uInt32> OffsetMap; virtual sal_uLong Calc_nBLIPPos( sal_uLong nOrgVal, sal_uLong nStreamPos ) const; virtual bool GetColorFromPalette(sal_uInt16 nNum, Color& rColor) const; - // SJ: New implementation of ReadObjText is used by Fontwork objects, because - // the old one does not properly import multiple paragraphs + // Fontwork objects use a new implementation of ReadObjText because the old + // one does not properly import multiple paragraphs. void ReadObjText( const String& rText, SdrObject* pObj ) const; // the following method needs to be overridden for the import of OLE objects @@ -684,31 +684,6 @@ public: */ sal_uInt16 GetBLIPCount() const{ return nBLIPCount; } -/* - ZCodecDecompressed() - Dekomprimierung eines komp. WMF oder Enhanced WMF - ==================== - Input: rIn -bereits korrekt positionierter Stream, - der das komprimierte Bild enthaelt - rOut -bereits korrekt positionierter Ausgabe-Stream, - - bLookForEnd -Flag, ob das komp. Bild bis zum Stream-Ende reicht. - Falls sal_True, wird jeweils geprueft, ob das gelesene noch - zum Bild gehoert. - Falls sal_False, wird bis zum Stream-Ende gelesen. - - Output: rIn -Der Stream steht hinter dem Ende des komp. Bildes. - (es kann aber noch eine Ende-Kennung und CRC-Sum folgen) - rOut -Der Stream enthaelt das dekomprimierte Bild. - Der Stream wird auf den Anfang des Bildes positioniert. - (also dorthin, wo der Stream vor der Verarbeitung stand) - - Rueckgabewert: sal_True, im Erfolgsfall - sal_False bei Fehler oder Null Bytes geschrieben -*/ -// static sal_Bool ZCodecDecompressed( SvStream& rIn, -// SvStream& rOut, -// sal_Bool bLookForEnd ); -// SdrObject* ImportObj(SvStream& rSt, void* pData, Rectangle& rClientRect, const Rectangle& rGlobalChildRect, int nCalledByGroup = 0, sal_Int32* pShapeId = NULL); @@ -759,8 +734,11 @@ public: sal_uInt32 nConvertFlags, sal_Int64 nAspect ); - /* the method SolveSolver will create connections between shapes, it should be called after a page is imported. - The SvxMSDffSolverContainer is containing necessary data data that is collected during the import of each shape + /** Create connections between shapes. + This method should be called after a page is imported. + + @param rSolver contains necessary data that is collected during the + import of each shape */ void SolveSolver( const SvxMSDffSolverContainer& rSolver ); commit ffaf08777cfeb941ded8cea762a802656dc1314f Author: Philipp Riemer <[email protected]> Date: Mon Jun 25 14:29:04 2012 +0100 cleanup German comments in filter/../msdffimp.hxx Change-Id: I5bd39caa388738725f493db05ba492d83c39584e diff --git a/filter/inc/filter/msfilter/msdffimp.hxx b/filter/inc/filter/msfilter/msdffimp.hxx index ac9e8be..0bcb2f4 100644 --- a/filter/inc/filter/msfilter/msdffimp.hxx +++ b/filter/inc/filter/msfilter/msdffimp.hxx @@ -184,7 +184,7 @@ typedef ::std::map< sal_Int32, SdrObject* > SvxMSDffShapeIdContainer; #define SVEXT_PERSIST_STREAM "\002OlePres000" -// are sorted by the order of occurrence: +// the following two will be sorted by the order of their appearance: typedef boost::ptr_vector<SvxMSDffBLIPInfo> SvxMSDffBLIPInfos; class SvxMSDffShapeOrders : public std::vector<SvxMSDffShapeOrder*> @@ -193,10 +193,9 @@ public: ~SvxMSDffShapeOrders(); }; -// will be sorted explicitly: -SV_DECL_PTRARR_SORT_DEL_VISIBILITY(SvxMSDffShapeInfos, SvxMSDffShapeInfo_Ptr, 16, MSFILTER_DLLPUBLIC) - -SV_DECL_PTRARR_SORT_VISIBILITY(SvxMSDffShapeTxBxSort, SvxMSDffShapeOrder*, 16, MSFILTER_DLLPUBLIC) +// the following two will be sorted explicitly: +SV_DECL_PTRARR_SORT_DEL_VISIBILITY( SvxMSDffShapeInfos, SvxMSDffShapeInfo_Ptr, 16, MSFILTER_DLLPUBLIC ) +SV_DECL_PTRARR_SORT_VISIBILITY( SvxMSDffShapeTxBxSort, SvxMSDffShapeOrder*, 16, MSFILTER_DLLPUBLIC ) #define SVXMSDFF_SETTINGS_CROP_BITMAPS 1 #define SVXMSDFF_SETTINGS_IMPORT_PPT 2 @@ -262,9 +261,7 @@ struct FIDCL sal_uInt32 cspidCur; // number of SPIDs used so far }; -//--------------------------------------------------------------------------- -// from SvxMSDffManager provided for each group included in the shape -//--------------------------------------------------------------------------- +/// provided by SvxMSDffManager for each shape in a group struct MSDffTxId { sal_uInt16 nTxBxS; @@ -294,7 +291,7 @@ struct MSFILTER_DLLPUBLIC SvxMSDffImportRec sal_uInt32 nLayoutInTableCell; sal_uInt32 nFlags; long nTextRotationAngle; - long nDxTextLeft; // The distance from the surrounding text box shape + long nDxTextLeft; ///< distance of text box from surrounding shape long nDyTextTop; long nDxTextRight; long nDyTextBottom; @@ -306,11 +303,11 @@ struct MSFILTER_DLLPUBLIC SvxMSDffImportRec long nCropFromBottom; long nCropFromLeft; long nCropFromRight; - MSDffTxId aTextId; // Identifiers for text boxes - sal_uLong nNextShapeId; // for linked text boxes + MSDffTxId aTextId; ///< identifier for text boxes + sal_uLong nNextShapeId; ///< for linked text boxes sal_uLong nShapeId; MSO_SPT eShapeType; - MSO_LineStyle eLineStyle; // Umrandungs-Arten + MSO_LineStyle eLineStyle; ///< border types MSO_LineDashing eLineDashing; sal_Bool bDrawHell :1; sal_Bool bHidden :1; @@ -337,18 +334,17 @@ private: typedef SvxMSDffImportRec* MSDffImportRec_Ptr; -// List of all SvxMSDffImportRec for a Group +/** list of all SvxMSDffImportRec instances of/for a group */ SV_DECL_PTRARR_SORT_DEL_VISIBILITY(MSDffImportRecords, MSDffImportRec_Ptr, 16, MSFILTER_DLLPUBLIC) -//--------------------------------------------------------------------------- -// Import-/Export-Parameterblock fuer 1 x ImportObjAtCurrentStreamPos() -//--------------------------------------------------------------------------- +/** block of parameters for import/export for a single call of + ImportObjAtCurrentStreamPos() */ struct SvxMSDffImportData { - MSDffImportRecords aRecords; // Shape-Pointer ids and private data - Rectangle aParentRect;// Rectangle der umgebenden group - // bzw. von aussen reingegebenes Rect - Rectangle aNewRect; // defined by this Rectangle shape + MSDffImportRecords aRecords; ///< Shape pointer, Shape ids and private data + Rectangle aParentRect;///< Rectangle of the surrounding groups, + ///< which might have been provided externally + Rectangle aNewRect; ///< Rectangle that is defined by this shape SvxMSDffImportData() {} @@ -447,16 +443,15 @@ class MSFILTER_DLLPUBLIC DffRecordManager : public DffRecordList DffRecordHeader* Last(); }; -/* - SvxMSDffManager - abstract base class for Escher-Import - =============== - Purpose: To access objects in the Drawing File Format - Current Status: Access only to blips (will be extended later) - - Beachte: in der zwecks PowerPoint-, ODER Word- ODER Excel-Import - ======== abgeleiteten Klasse - MUSS jeweils die Methode ProcessUserDefinedRecord() - implementiert werden! +/** abstract base class for Escher imports + + Purpose: access to objects in Drawing File Format + + Note: The method ProcessUserDefinedRecord() _has_ to be implemented in the + inheriting class(es) that is/are eventually used for PowerPoint, Word, + or Excel importing. + + Status: Currently only access to BLIPs (will be extended later) */ class MSFILTER_DLLPUBLIC SvxMSDffManager : public DffPropertyReader { @@ -545,9 +540,7 @@ typedef std::map<sal_uInt32, sal_uInt32> OffsetMap; const Graphic& rGrf, const Rectangle& rVisArea ); -/* - the following methods are to overwrite the Excel import: -*/ +// the following methods need to be overriden for Excel imports virtual sal_Bool ProcessClientAnchor(SvStream& rStData, sal_uInt32 nDatLen, char*& rpBuff, sal_uInt32& rBuffLen ) const; virtual void ProcessClientAnchor2( SvStream& rStData, DffRecordHeader& rHd, void* pData, DffObjData& ); virtual sal_Bool ProcessClientData( SvStream& rStData, sal_uInt32 nDatLen, char*& rpBuff, sal_uInt32& rBuffLen ) const; @@ -559,20 +552,16 @@ typedef std::map<sal_uInt32, sal_uInt32> OffsetMap; // the old one does not properly import multiple paragraphs void ReadObjText( const String& rText, SdrObject* pObj ) const; - /* - folgende Methode ist von allen zu ueberschreiben, die OLE-Objecte - importieren moechten: - */ +// the following method needs to be overridden for the import of OLE objects virtual sal_Bool GetOLEStorageName( long nOLEId, String& rStorageName, SotStorageRef& rSrcStorage, com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xDestStg ) const; - /* - folgende Methode ist von allen zu ueberschreiben, die verhindern - moechten, dass (abgerundete) Rechtecke mit umgebrochenem Text - immer in SdrRectObj( OBJ_TEXT ) umgewandelt werden: - sal_True bedeutet umwandeln. + /** Prevent that (rounded) rectangles with wrapped text will always be + converted into SdrRectObj( OBJ_TEXT ). + + @return sal_True means "conversion". */ virtual sal_Bool ShapeHasText(sal_uLong nShapeId, sal_uLong nFilePos) const; @@ -601,25 +590,28 @@ public: static bool ReadCommonRecordHeader(SvStream& rSt, sal_uInt8& rVer, sal_uInt16& rInst, sal_uInt16& rFbt, sal_uInt32& rLength) SAL_WARN_UNUSED_RESULT; -/* - Constructor - =========== - Input: rStCtrl - Stream management of containers, - FBSE Objects and Shapes - ( to be handed over; - Stream must already be open ) - - nOffsDgg - Offset in rStCtrl: Beginning of the Drawing Group Container - - pStData - Datastream, in which the blips are stored - ( if zero, it is assumed that the blips are also - stored in rStCtrl; this stream must also be - already open ) - pSdrModel_ kann beim Ctor-Aufruf leer bleiben, muss dann aber - spaeter ueber SetModel() gesetzt werden! - - is nBLIPCount -*/ + +// TODO: provide proper documentation here + /** constructor + + sets nBLIPCount + + @param rStCtrl Management stream with containers, FBSE + objects and shapes (mandatory; stream needs + to be open already) + @param rBaseURL ??? + @param nOffsDgg offset in rStrCtrl; beginning of the drawing + group container + @param pStData data stream in that the BLIPs are stored (if + NULL it is assumed that all BLIPs are also in + the rStCtrl; stream needs to be open already) + @param pSdrModel_ ??? (can be empty during Ctor call but needs + to be set via SetModel() later in that case!) + @param nApplicationScale ??? + @param mnDefaultColor_ ??? + @param nDefaultFontHeight_ ??? + @param pStData2_ ??? + */ SvxMSDffManager( SvStream& rStCtrl, const String& rBaseURL, sal_uInt32 nOffsDgg, @@ -630,8 +622,8 @@ public: sal_uLong nDefaultFontHeight_ = 24, SvStream* pStData2_ = 0 ); - // in PPT werden die Parameter DGGContainerOffset und PicStream - // mit Hilfe einer Init Routine Uebergeben. + // in PPT the parameters DGGContainerOffset and PicStream are provided by an + // init method SvxMSDffManager( SvStream& rStCtrl, const String& rBaseURL ); void InitSvxMSDffManager(sal_uInt32 nOffsDgg_, SvStream* pStData_, sal_uInt32 nSvxMSDffOLEConvFlags); void SetDgContainer( SvStream& rSt ); @@ -656,69 +648,62 @@ public: sal_uInt32 ScalePt( sal_uInt32 nPt ) const; sal_Int32 ScalePoint( sal_Int32 nVal ) const; -/* - GetBLIP() - Requirement of a particular BLIP - ========= - Input: nIdx - Number of requested BLIP - ( muss immer uebergeben werden ) +// TODO: provide proper documentation here + /** Request for a specific BLIP. - Output: rData - already completely converted data - ( should be used directly as an image in our documents ) + @param[in] nIdx number of the requested BLIP (mandatory) + @param[out] rData already converted data (insert directly as graphics + into our documents) + @param pVisArea ??? - Returns: sal_True, on success, sal_False on error -*/ + @return sal_True if successful, sal_False otherwise + */ sal_Bool GetBLIP( sal_uLong nIdx, Graphic& rData, Rectangle* pVisArea = NULL ); -/* - GetBLIPDirect() -Reading an already positioned stream of BLIP - =============== - Input: rBLIPStream -already correctly positioned in the stream - ( muss immer uebergeben werden ) +// TODO: provide proper documentation here + /** read a BLIP out of a already positioned stream - Output: rData -already completely converted data - ( should be used directly as an image in our documents ) + @param[in] rBLIPStream alread positioned stream (mandatory) + @param[out] rData already converted data (insert directly as + graphics into our documents) + @param pVisArea ??? - Returns: sal_True, on success, sal_False on error -*/ + @return sal_True if successful, sal_False otherwise + */ sal_Bool GetBLIPDirect(SvStream& rBLIPStream, Graphic& rData, Rectangle* pVisArea = NULL ) const; sal_Bool GetShape(sal_uLong nId, SdrObject*& rpData, SvxMSDffImportData& rData); -/* - GetBLIPCount() - Query the number of managed BLIP - ============== - Input: ./. - Output: ./. - Returns: nBLIPCount - Number of pStData (or rStCtrl) contained in BLIPs - (that is: number of FBSEs in Drawing Group Container ) - - Values: 0 - Structure Ok, however BLIPs is not available - 1.. - Number of BLIPs - USHRT_MAX - Error: drawing not in the correct file format -*/ + /** Get count of managed BLIPs + + @return Number of BLIPs in pStData (or rStCtrl), thus number of FBSEs in + the drawing group container. If 0 is returned this means that + the structure is ok but there are no BLIPs; if USHRT_MAX is + returned than there was an error: no correct Drawing File Format + */ sal_uInt16 GetBLIPCount() const{ return nBLIPCount; } /* - ZCodecDecompressed() - Decompress a complete WMF or Enhanced WMF + ZCodecDecompressed() - Dekomprimierung eines komp. WMF oder Enhanced WMF ==================== - Input: rIn -contains the already correctly possitioned Stream, - of the compressed image - rOut -already correctly positioned output stream + Input: rIn -bereits korrekt positionierter Stream, + der das komprimierte Bild enthaelt + rOut -bereits korrekt positionierter Ausgabe-Stream, bLookForEnd -Flag, ob das komp. Bild bis zum Stream-Ende reicht. Falls sal_True, wird jeweils geprueft, ob das gelesene noch zum Bild gehoert. - If sal_False, will read until the end of the stream. + Falls sal_False, wird bis zum Stream-Ende gelesen. - Output: rIn -The stream behind the end of the complete image. - (but it can still follow an end identifier and CRC-Sum) - rOut -The stream contains the decompressed image. - The stream is positioned at the beginning of the picture. - (that is, to the place where the stream was before processing) + Output: rIn -Der Stream steht hinter dem Ende des komp. Bildes. + (es kann aber noch eine Ende-Kennung und CRC-Sum folgen) + rOut -Der Stream enthaelt das dekomprimierte Bild. + Der Stream wird auf den Anfang des Bildes positioniert. + (also dorthin, wo der Stream vor der Verarbeitung stand) - Returns: sal_True, if successful - sal_False written in error or zero bytes + Rueckgabewert: sal_True, im Erfolgsfall + sal_False bei Fehler oder Null Bytes geschrieben */ // static sal_Bool ZCodecDecompressed( SvStream& rIn, // SvStream& rOut, @@ -793,21 +778,21 @@ public: struct SvxMSDffBLIPInfo { - sal_uInt16 nBLIPType; // Type of BLIP example : 6 for PNG - sal_uLong nFilePos; // Offset in the data stram of the BLIP - sal_uLong nBLIPSize; // Number of bytes in the strean that the BLIP takes + sal_uInt16 nBLIPType; ///< type of BLIP: e.g. 6 for PNG + sal_uLong nFilePos; ///< offset of the BLIP in data strem + sal_uLong nBLIPSize; ///< number of bytes that the BLIP needs in stream SvxMSDffBLIPInfo(sal_uInt16 nBType, sal_uLong nFPos, sal_uLong nBSize): nBLIPType( nBType ), nFilePos( nFPos ), nBLIPSize( nBSize ){} }; struct SvxMSDffShapeInfo { - sal_uInt32 nShapeId; // Shape Id, used in SPA and the PLCF mso_fbtSp (FSP) - sal_uLong nFilePos; // Offset of the shape in the control stream for any new requests - // for this shape + sal_uInt32 nShapeId; ///< shape id, used in PLCF SPA and in mso_fbtSp (FSP) + sal_uLong nFilePos; ///< offset of the shape in control stream for + ///< potential later access to it sal_uInt32 nTxBxComp; - sal_Bool bReplaceByFly :1; // Shape maybe replaced by writer framework. + sal_Bool bReplaceByFly :1; ///< shape can be replaced by a frame in Writer sal_Bool bSortByShapeId :1; sal_Bool bLastBoxInChain:1; @@ -844,22 +829,18 @@ struct SvxMSDffShapeInfo struct SvxMSDffShapeOrder { - sal_uLong nShapeId; // Shape Id, verwendet im PLCF SPA und im mso_fbtSp (FSP) - - sal_uLong nTxBxComp; // Ketten- und Boxnummer in der Text-Box-Story (bzw. Null) - - SwFlyFrmFmt* pFly; // Frame-Format eines statt des Sdr-Text-Objektes im - // Writer eingefuegten Rahmens: zur Verkettung benoetigt! - - short nHdFtSection; // used by Writer to find out if linked frames are in the - // same header or footer of the same section - - SdrObject* pObj; // Pointer to draw the object or null if not used - - // Vorgehensweise: im Ctor des SvxMSDffManager werden im der Shape-Order-Array - // nur die Shape-Ids vermerkt, - // Text-Box number and the object pointer will be saved only if - // the shape is actually imported! + sal_uLong nShapeId; ///< shape id used in PLCF SPA and in mso_fbtSp (FSP) + sal_uLong nTxBxComp; ///< chain or box number in the Text-Box-Story (or NULL) + SwFlyFrmFmt* pFly; ///< format of frame that was inserted as a replacement + ///< for a Sdr-Text object in Writer - needed for + ///< chaining! + short nHdFtSection; ///< used by Writer to find out if linked frames are in + ///< the same header or footer of the same section + SdrObject* pObj; ///< pointer to the draw object (or NULL if not used) + + // 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 ): nShapeId( nId ), nTxBxComp( 0 ), pFly( 0 ), nHdFtSection( 0 ), pObj( 0 ){} _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
