diff options
author | gt <gt@openoffice.org> | 2001-04-06 11:37:56 +0000 |
---|---|---|
committer | gt <gt@openoffice.org> | 2001-04-06 11:37:56 +0000 |
commit | c90ad4abd2a94e816f65a0fc8d36c08ddc124e9b (patch) | |
tree | d067cb788b6da3685771d8fcd77af778fd8d1db2 /sc | |
parent | 61154055788fe4988c4729148ecae6fd00486e3c (diff) |
#i194# optimise Mulblanks to optional XF for row
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/inc/excdoc.hxx | 31 | ||||
-rw-r--r-- | sc/source/filter/inc/excrecds.hxx | 28 |
2 files changed, 50 insertions, 9 deletions
diff --git a/sc/source/filter/inc/excdoc.hxx b/sc/source/filter/inc/excdoc.hxx index 90f5128320ac..d59498ce00e2 100644 --- a/sc/source/filter/inc/excdoc.hxx +++ b/sc/source/filter/inc/excdoc.hxx @@ -2,9 +2,9 @@ * * $RCSfile: excdoc.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: dr $ $Date: 2001-02-26 06:51:25 $ + * last change: $Author: gt $ $Date: 2001-04-06 12:37:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -92,6 +92,7 @@ class NameBuffer; class XclExpStream; class XclExpChangeTrack; + //--------------------------------------------------- class ExcRecordListRefs - #ifndef MAC @@ -140,6 +141,28 @@ public: }; + + +class DefRowXFs : protected List +{ +protected: + UINT32 nLastList; + UINT16 nLastRow; + + static inline void* Set( UINT16 nRowNum, UINT16 nXF ); + static inline void Get( const void*, UINT16& rRowNum, UINT16& rXF ); +public: + DefRowXFs( void ); + virtual ~DefRowXFs(); + + void Add( UINT16 nRowNum, UINT16 nXF ); + + void ChangeXF( UINT16 nRowNum, UINT16& rXF ); +}; + + + + //------------------------------------------------------------ class ExcTable - class ExcTable : public ExcRoot @@ -152,6 +175,7 @@ private: UINT16 nAktCol; static ExcRowBlock* pRowBlock; // buffer for ROW recs + DefRowXFs* pDefRowXFs; void Clear(); void NullTab( const String* pCodename = NULL ); @@ -168,6 +192,9 @@ public: void FillAsHeader( ExcRecordListRefs& rBundleSheetRecList ); void FillAsTable( void ); + void SetDefRowXF( UINT16 nXF, UINT16 nRowNum ); + void ModifyToDefaultRowXF( UINT16 nRowNum, UINT16& rXF ); + void Write( XclExpStream& ); }; diff --git a/sc/source/filter/inc/excrecds.hxx b/sc/source/filter/inc/excrecds.hxx index 4a4f000d0d9f..11902e5b7e0e 100644 --- a/sc/source/filter/inc/excrecds.hxx +++ b/sc/source/filter/inc/excrecds.hxx @@ -2,9 +2,9 @@ * * $RCSfile: excrecds.hxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: dr $ $Date: 2001-03-19 13:24:08 $ + * last change: $Author: gt $ $Date: 2001-04-06 12:37:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -119,6 +119,7 @@ class EditTextObject; class ScPageHFItem; class ScProgress; +class ExcTable; class UsedAttrList; class ExcArray; class ExcArrays; @@ -817,10 +818,11 @@ public: class ExcBlankMulblank : public ExcCell, private UINT32List { -private: +protected: ULONG nRecLen; UINT16 nLastCol; BOOL bMulBlank; + BOOL bDummy; // not saved, 'cause row contains formatting info inline UINT16 GetXF( UINT32 nEntry ) const { return (UINT16) nEntry; } inline UINT16 GetCount( UINT32 nEntry ) const { return (UINT16)(nEntry >> 16); } @@ -831,7 +833,8 @@ private: const ScAddress rPos, const ScPatternAttr* pAttr, RootData& rRootData, - UINT16 nCount ); + UINT16 nCount, + ExcTable& rExcTab ); virtual void SaveDiff( XclExpStream& rStrm ); // instead of SaveCont() virtual ULONG GetDiffLen( void ) const; @@ -841,26 +844,33 @@ public: const ScAddress rPos, const ScPatternAttr* pFirstAttr, RootData& rRootData, - UINT16 nFirstCount ); + UINT16 nFirstCount, + ExcTable& rExcTab ); void Add( const ScAddress rPos, const ScPatternAttr* pAttr, RootData& rRootData, - UINT16 nAddCount ); + UINT16 nAddCount, + ExcTable& rExcTab ); inline UINT16 GetLastCol() const { return nLastCol; } virtual UINT16 GetXF() const; // returns last used XF virtual UINT16 GetNum() const; + + virtual void Save( XclExpStream& ); // for dummy case }; + inline void ExcBlankMulblank::Append( UINT16 nXF, UINT16 nCount ) { UINT32List::Append( (UINT32) nXF + (((UINT32) nCount) << 16) ); } + + //---------------------------------------------------- class ExcNameListEntry - class ExcNameListEntry : public ExcRecord @@ -1012,6 +1022,8 @@ public: class ExcRow : public ExcRecord { private: + friend class DefRowXFs; + ExcTable& rExcTab; UINT16 nNum; UINT16 nFirstCol; UINT16 nLastCol; @@ -1028,7 +1040,7 @@ private: protected: public: ExcRow( UINT16 nNum, UINT16 nTab, UINT16 nFCol, UINT16 nLCol, - UINT16 nXF, ScDocument& rDoc, ExcEOutline& rOutline ); + UINT16 nXF, ScDocument& rDoc, ExcEOutline& rOutline, ExcTable& rExcTab ); inline BOOL IsDefault(); @@ -1058,6 +1070,8 @@ public: // returns new block or NULL if last block not full ExcRowBlock* Append( ExcRow* pNewRow ); + void SetDefXFs( DefRowXFs& rDefRowXFs ); + virtual void Save( XclExpStream& rStrm ); }; |