LibreOffice Module sw (master)  1
Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
wwSprmParser Class Reference

wwSprmParser knows how to take a sequence of bytes and split it up into sprms and their arguments More...

#include <ww8scan.hxx>

Collaboration diagram for wwSprmParser:
[legend]

Public Types

enum  SprmType {
  L_FIX =0,
  L_VAR =1,
  L_VAR2 =2
}
 

Public Member Functions

 wwSprmParser (const WW8Fib &rFib)
 
sal_uInt16 GetSprmId (const sal_uInt8 *pSp) const
 Return the SPRM id at the beginning of this byte sequence. More...
 
sal_uInt16 GetSprmSize (sal_uInt16 nId, const sal_uInt8 *pSprm, sal_Int32 nRemLen) const
 
sal_uInt16 DistanceToData (sal_uInt16 nId) const
 Get known len of a sprms head, the bytes of the sprm id + any bytes reserved to hold a variable length. More...
 
sal_uInt16 GetSprmTailLen (sal_uInt16 nId, const sal_uInt8 *pSprm, sal_Int32 nRemLen) const
 Get len of a sprms data area, ignoring the bytes of the sprm id and ignoring any len bytes. More...
 
int MinSprmLen () const
 The minimum acceptable sprm len possible for this type of parser. More...
 
SprmResult findSprmData (sal_uInt16 nId, sal_uInt8 *pSprms, sal_uInt16 nLen) const
 Returns the offset to data of the first sprm of id nId, 0. More...
 

Private Member Functions

SprmInfo GetSprmInfo (sal_uInt16 nId) const
 
sal_uInt8 SprmDataOfs (sal_uInt16 nId) const
 

Static Private Member Functions

static const wwSprmSearcherGetWW8SprmSearcher ()
 
static const wwSprmSearcherGetWW6SprmSearcher (const WW8Fib &rFib)
 
static const wwSprmSearcherGetWW2SprmSearcher ()
 

Private Attributes

ww::WordVersion meVersion
 
sal_uInt8 mnDelta
 
const wwSprmSearchermpKnownSprms
 

Detailed Description

wwSprmParser knows how to take a sequence of bytes and split it up into sprms and their arguments

Definition at line 113 of file ww8scan.hxx.

Member Enumeration Documentation

Enumerator
L_FIX 
L_VAR 
L_VAR2 

Definition at line 128 of file ww8scan.hxx.

Constructor & Destructor Documentation

wwSprmParser::wwSprmParser ( const WW8Fib rFib)
explicit

Member Function Documentation

sal_uInt16 wwSprmParser::DistanceToData ( sal_uInt16  nId) const

Get known len of a sprms head, the bytes of the sprm id + any bytes reserved to hold a variable length.

Definition at line 8451 of file ww8scan.cxx.

References mnDelta, and SprmDataOfs().

Referenced by WW8PLCFx_SEPX::Find4Sprms(), WW8SprmIter::FindSprm(), findSprmData(), SwMSDffManager::GetOLEStorageName(), WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm(), WW8PLCFx_Fc_FKP::HasSprm(), and WW8SprmIter::UpdateMyMembers().

SprmResult wwSprmParser::findSprmData ( sal_uInt16  nId,
sal_uInt8 pSprms,
sal_uInt16  nLen 
) const

Returns the offset to data of the first sprm of id nId, 0.

Definition at line 8456 of file ww8scan.cxx.

References DistanceToData(), GetSprmId(), GetSprmSize(), MinSprmLen(), and SAL_WARN_IF.

Referenced by WW8ListManager::GrpprlHasSprm(), and WW8RStyle::HasParaSprm().

sal_uInt16 wwSprmParser::GetSprmId ( const sal_uInt8 pSp) const

Return the SPRM id at the beginning of this byte sequence.

Definition at line 8418 of file ww8scan.cxx.

References ww::IsSevenMinus(), meVersion, and nId.

Referenced by WW8PLCFx_SEPX::Find4Sprms(), findSprmData(), WW8PLCFMan::GetId(), SwMSDffManager::GetOLEStorageName(), WW8SprmIter::UpdateMyMembers(), and WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp().

SprmInfo wwSprmParser::GetSprmInfo ( sal_uInt16  nId) const
private
sal_uInt16 wwSprmParser::GetSprmSize ( sal_uInt16  nId,
const sal_uInt8 pSprm,
sal_Int32  nRemLen 
) const
sal_uInt16 wwSprmParser::GetSprmTailLen ( sal_uInt16  nId,
const sal_uInt8 pSprm,
sal_Int32  nRemLen 
) const

Get len of a sprms data area, ignoring the bytes of the sprm id and ignoring any len bytes.

Reports the remaining data after those bytes

Definition at line 8346 of file ww8scan.cxx.

References GetSprmInfo(), L_FIX, L_VAR, L_VAR2, mnDelta, SprmInfo::nLen, SprmInfo::nVari, and SAL_WARN.

Referenced by GetSprmSize().

const wwSprmSearcher * wwSprmParser::GetWW2SprmSearcher ( )
staticprivate

Definition at line 87 of file ww8scan.cxx.

References L_FIX, L_VAR, L_VAR2, and SAL_N_ELEMENTS.

Referenced by wwSprmParser().

const wwSprmSearcher * wwSprmParser::GetWW6SprmSearcher ( const WW8Fib rFib)
staticprivate

Definition at line 238 of file ww8scan.cxx.

References L_FIX, L_VAR, L_VAR2, WW8Fib::m_wIdent, and SAL_N_ELEMENTS.

Referenced by wwSprmParser().

const wwSprmSearcher * wwSprmParser::GetWW8SprmSearcher ( )
staticprivate
int wwSprmParser::MinSprmLen ( ) const
inline

The minimum acceptable sprm len possible for this type of parser.

Definition at line 146 of file ww8scan.hxx.

References ww::IsSevenMinus().

Referenced by WW8PLCFMan::AdvSprm(), WW8PLCFx_SEPX::Find4Sprms(), findSprmData(), WW8PLCFMan::GetId(), WW8PLCFMan::GetSprmStart(), and WW8SprmIter::UpdateMyMembers().

sal_uInt8 wwSprmParser::SprmDataOfs ( sal_uInt16  nId) const
private

Definition at line 8446 of file ww8scan.cxx.

References GetSprmInfo(), and SprmInfo::nVari.

Referenced by DistanceToData(), and GetSprmSize().

Member Data Documentation

ww::WordVersion wwSprmParser::meVersion
private

Definition at line 116 of file ww8scan.hxx.

Referenced by GetSprmId(), GetSprmInfo(), and wwSprmParser().

sal_uInt8 wwSprmParser::mnDelta
private

Definition at line 117 of file ww8scan.hxx.

Referenced by DistanceToData(), GetSprmSize(), GetSprmTailLen(), and wwSprmParser().

const wwSprmSearcher* wwSprmParser::mpKnownSprms
private

Definition at line 118 of file ww8scan.hxx.

Referenced by GetSprmInfo(), and wwSprmParser().


The documentation for this class was generated from the following files: