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_Int32 GetSprmSize (sal_uInt16 nId, const sal_uInt8 *pSprm, sal_Int32 nRemLen) const
 
sal_Int32 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_Int32 nLen) const
 Returns the offset to data of the first sprm of id nId, 0. More...
 
ww::WordVersion GetFIBVersion () const
 

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

◆ SprmType

Enumerator
L_FIX 
L_VAR 
L_VAR2 

Definition at line 128 of file ww8scan.hxx.

Constructor & Destructor Documentation

◆ wwSprmParser()

wwSprmParser::wwSprmParser ( const WW8Fib rFib)
explicit

Member Function Documentation

◆ DistanceToData()

sal_Int32 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 8492 of file ww8scan.cxx.

References mnDelta, nId, and SprmDataOfs().

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

◆ findSprmData()

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

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

Definition at line 8497 of file ww8scan.cxx.

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

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

◆ GetFIBVersion()

ww::WordVersion wwSprmParser::GetFIBVersion ( ) const
inline

Definition at line 152 of file ww8scan.hxx.

References meVersion.

Referenced by WW8PLCFMan::IsSprmLegalForCategory().

◆ GetSprmId()

sal_uInt16 wwSprmParser::GetSprmId ( const sal_uInt8 pSp) const

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

Definition at line 8459 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().

◆ GetSprmInfo()

SprmInfo wwSprmParser::GetSprmInfo ( sal_uInt16  nId) const
private

◆ GetSprmSize()

sal_Int32 wwSprmParser::GetSprmSize ( sal_uInt16  nId,
const sal_uInt8 pSprm,
sal_Int32  nRemLen 
) const

◆ GetSprmTailLen()

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 8392 of file ww8scan.cxx.

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

Referenced by GetSprmSize().

◆ GetWW2SprmSearcher()

const wwSprmSearcher * wwSprmParser::GetWW2SprmSearcher ( )
staticprivate

Definition at line 86 of file ww8scan.cxx.

References L_FIX, L_VAR, L_VAR2, and SAL_N_ELEMENTS.

Referenced by wwSprmParser().

◆ GetWW6SprmSearcher()

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

Definition at line 237 of file ww8scan.cxx.

References L_FIX, L_VAR, L_VAR2, WW8Fib::m_wIdent, SAL_N_ELEMENTS, NS_sprm::v6::sprmCChse, NS_sprm::v6::sprmCCondHyhen, NS_sprm::v6::sprmCDefault, NS_sprm::v6::sprmCDttmRMark, NS_sprm::v6::sprmCDxaSpace, NS_sprm::v6::sprmCFBold, NS_sprm::v6::sprmCFCaps, NS_sprm::v6::sprmCFData, NS_sprm::v6::sprmCFFldVanish, NS_sprm::v6::sprmCFItalic, NS_sprm::v6::sprmCFObj, NS_sprm::v6::sprmCFOle2, NS_sprm::v6::sprmCFOutline, NS_sprm::v6::sprmCFRMark, NS_sprm::v6::sprmCFShadow, NS_sprm::v6::sprmCFSmallCaps, NS_sprm::v6::sprmCFSpec, NS_sprm::v6::sprmCFStrike, NS_sprm::v6::sprmCFStrikeRM, NS_sprm::v6::sprmCFtc, NS_sprm::v6::sprmCFVanish, NS_sprm::v6::sprmCHps, NS_sprm::v6::sprmCHpsInc, NS_sprm::v6::sprmCHpsInc1, NS_sprm::v6::sprmCHpsKern, NS_sprm::v6::sprmCHpsMul, NS_sprm::v6::sprmCHpsNew50, NS_sprm::v6::sprmCHpsPos, NS_sprm::v6::sprmCHpsPosAdj, NS_sprm::v6::sprmCIbstRMark, NS_sprm::v6::sprmCIco, NS_sprm::v6::sprmCIss, NS_sprm::v6::sprmCIstd, NS_sprm::v6::sprmCIstdPermute, NS_sprm::v6::sprmCKul, NS_sprm::v6::sprmCLid, NS_sprm::v6::sprmCMajority, NS_sprm::v6::sprmCMajority50, NS_sprm::v6::sprmCPicLocation, NS_sprm::v6::sprmCPlain, NS_sprm::v6::sprmCRMReason, NS_sprm::v6::sprmCSizePos, NS_sprm::v6::sprmCSymbol, NS_sprm::v6::sprmPAnld, NS_sprm::v6::sprmPBrcBar, NS_sprm::v6::sprmPBrcBar10, NS_sprm::v6::sprmPBrcBetween, NS_sprm::v6::sprmPBrcBetween10, NS_sprm::v6::sprmPBrcBottom, NS_sprm::v6::sprmPBrcBottom10, NS_sprm::v6::sprmPBrcl, NS_sprm::v6::sprmPBrcLeft, NS_sprm::v6::sprmPBrcLeft10, NS_sprm::v6::sprmPBrcp, NS_sprm::v6::sprmPBrcRight, NS_sprm::v6::sprmPBrcRight10, NS_sprm::v6::sprmPBrcTop, NS_sprm::v6::sprmPBrcTop10, NS_sprm::v6::sprmPChgTabs, NS_sprm::v6::sprmPChgTabsPapx, NS_sprm::v6::sprmPDcs, NS_sprm::v6::sprmPDxaAbs, NS_sprm::v6::sprmPDxaFromText, NS_sprm::v6::sprmPDxaLeft, NS_sprm::v6::sprmPDxaLeft1, NS_sprm::v6::sprmPDxaRight, NS_sprm::v6::sprmPDxaWidth, NS_sprm::v6::sprmPDyaAbs, NS_sprm::v6::sprmPDyaAfter, NS_sprm::v6::sprmPDyaBefore, NS_sprm::v6::sprmPDyaFromText, NS_sprm::v6::sprmPDyaLine, NS_sprm::v6::sprmPFInTable, NS_sprm::v6::sprmPFKeep, NS_sprm::v6::sprmPFKeepFollow, NS_sprm::v6::sprmPFLocked, NS_sprm::v6::sprmPFNoAutoHyph, NS_sprm::v6::sprmPFNoLineNumb, NS_sprm::v6::sprmPFromText10, NS_sprm::v6::sprmPFSideBySide, NS_sprm::v6::sprmPFWidowControl, NS_sprm::v6::sprmPicBrcBottom, NS_sprm::v6::sprmPicBrcl, NS_sprm::v6::sprmPicBrcLeft, NS_sprm::v6::sprmPicBrcRight, NS_sprm::v6::sprmPicBrcTop, NS_sprm::v6::sprmPicScale, NS_sprm::v6::sprmPIncLv1, NS_sprm::v6::sprmPIstd, NS_sprm::v6::sprmPIstdPermute, NS_sprm::v6::sprmPJc, NS_sprm::v6::sprmPNest, NS_sprm::v6::sprmPNLvlAnm, NS_sprm::v6::sprmPPageBreakBefore, NS_sprm::v6::sprmPPc, NS_sprm::v6::sprmPRuler, NS_sprm::v6::sprmPShd, NS_sprm::v6::sprmPTtp, NS_sprm::v6::sprmPWHeightAbs, NS_sprm::v6::sprmPWr, NS_sprm::v6::sprmSBCustomize, NS_sprm::v6::sprmSBkc, NS_sprm::v6::sprmSBOrientation, NS_sprm::v6::sprmSCcolumns, NS_sprm::v6::sprmSDmBinFirst, NS_sprm::v6::sprmSDmBinOther, NS_sprm::v6::sprmSDMPaperReq, NS_sprm::v6::sprmSDxaColSpacing, NS_sprm::v6::sprmSDxaColumns, NS_sprm::v6::sprmSDxaColWidth, NS_sprm::v6::sprmSDxaLeft, NS_sprm::v6::sprmSDxaLnn, NS_sprm::v6::sprmSDxaPgn, NS_sprm::v6::sprmSDxaRight, NS_sprm::v6::sprmSDyaBottom, NS_sprm::v6::sprmSDyaHdrBottom, NS_sprm::v6::sprmSDyaHdrTop, NS_sprm::v6::sprmSDyaPgn, NS_sprm::v6::sprmSDyaTop, NS_sprm::v6::sprmSDzaGutter, NS_sprm::v6::sprmSFAutoPgn, NS_sprm::v6::sprmSFEndnote, NS_sprm::v6::sprmSFEvenlySpaced, NS_sprm::v6::sprmSFPgnRestart, NS_sprm::v6::sprmSFProtected, NS_sprm::v6::sprmSFTitlePage, NS_sprm::v6::sprmSGprfIhdt, NS_sprm::v6::sprmSiHeadingPgn, NS_sprm::v6::sprmSLBetween, NS_sprm::v6::sprmSLnc, NS_sprm::v6::sprmSLnnMin, NS_sprm::v6::sprmSNfcPgn, NS_sprm::v6::sprmSNLnnMod, NS_sprm::v6::sprmSOlstAnm, NS_sprm::v6::sprmSPgnStart, NS_sprm::v6::sprmSScnsPgn, NS_sprm::v6::sprmSVjc, NS_sprm::v6::sprmSXaPage, NS_sprm::v6::sprmSYaPage, NS_sprm::v6::sprmTDefTable, NS_sprm::v6::sprmTDefTable10, NS_sprm::v6::sprmTDefTableShd, NS_sprm::v6::sprmTDelete, NS_sprm::v6::sprmTDxaCol, NS_sprm::v6::sprmTDxaGapHalf, NS_sprm::v6::sprmTDxaLeft, NS_sprm::v6::sprmTDyaRowHeight, NS_sprm::v6::sprmTFCantSplit, NS_sprm::v6::sprmTInsert, NS_sprm::v6::sprmTJc, NS_sprm::v6::sprmTMerge, NS_sprm::v6::sprmTSetBrc, NS_sprm::v6::sprmTSetBrc10, NS_sprm::v6::sprmTSetShd, NS_sprm::v6::sprmTSplit, NS_sprm::v6::sprmTTableBorders, NS_sprm::v6::sprmTTableHeader, and NS_sprm::v6::sprmTTlp.

Referenced by wwSprmParser().

◆ GetWW8SprmSearcher()

const wwSprmSearcher * wwSprmParser::GetWW8SprmSearcher ( )
staticprivate

◆ MinSprmLen()

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(), and meVersion.

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

◆ SprmDataOfs()

sal_uInt8 wwSprmParser::SprmDataOfs ( sal_uInt16  nId) const
private

Definition at line 8487 of file ww8scan.cxx.

References GetSprmInfo(), nId, and SprmInfo::nVari.

Referenced by DistanceToData(), and GetSprmSize().

Member Data Documentation

◆ meVersion

ww::WordVersion wwSprmParser::meVersion
private

Definition at line 116 of file ww8scan.hxx.

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

◆ mnDelta

sal_uInt8 wwSprmParser::mnDelta
private

Definition at line 117 of file ww8scan.hxx.

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

◆ mpKnownSprms

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: