class SwFlyCache; typedef std::vector<SwFlyCache> SwPageFlyCache;
class SwLayCacheImpl
{
std::vector<SwNodeOffset> mIndices; /// either a textframe character offset, or a row index inside a table
std::deque<sal_Int32> m_aOffset;
std::vector<sal_uInt16> m_aType;
SwPageFlyCache m_FlyCache; bool m_bUseFlyCache; void Insert( sal_uInt16 nType, SwNodeOffset nIndex, sal_Int32 nOffset );
/// Look for fresh text frames at this (new) page and set them to the right /// position, if they are in the fly cache. void CheckFlyCache( SwPageFrame* pPage )
{ if( mpImpl && mnFlyIdx < mpImpl->GetFlyCount() ) CheckFlyCache_( pPage ); }
};
// Contains the data structures that are required to read and write a layout cache. #define SW_LAYCACHE_IO_REC_PAGES 'p' #define SW_LAYCACHE_IO_REC_PARA 'P' #define SW_LAYCACHE_IO_REC_TABLE 'T' #define SW_LAYCACHE_IO_REC_FLY 'F'
/// Get input or output stream
SvStream& GetStream() const { return *m_pStream; }
/// Open a record of type "nType" void OpenRec( sal_uInt8 nType );
/// Close a record. This skips any unread data that /// remains in the record. void CloseRec();
/// Return the number of bytes contained in the current record that /// haven't been read by now.
sal_uInt32 BytesLeft();
/// Return the current record's type
sal_uInt8 Peek();
/// Skip the current record void SkipRec();
/// Open a flag record for reading. The uppermost four bits are flags, /// while the lowermost are the flag record's size. Flag records cannot /// be nested.
sal_uInt8 OpenFlagRec();
/// Open flag record for writing; void OpenFlagRec( sal_uInt8 nFlags, sal_uInt8 nLen );
/// Close a flag record. Any bytes left are skipped. void CloseFlagRec();
// Stored information about text frames: class SwFlyCache : public SwRect // position and size
{ public:
sal_uLong nOrdNum; ///< Id to recognize text frames
sal_uInt16 nPageNum; ///< page number
SwFlyCache( sal_uInt16 nP, sal_uLong nO, tools::Long nXL, tools::Long nYL, tools::Long nWL, tools::Long nHL ) :
SwRect( nXL, nYL, nWL, nHL ), nOrdNum( nO ), nPageNum( nP ){}
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.