class SvxRTFItemStackType; using SvxRTFItemStackList = std::vector<std::unique_ptr<SvxRTFItemStackType>>;
// Mapper-Classes for the various requirements on Document positions // Swg - NodePosition is a SwContentIndex, which is used internally // EditEngine - ULONG to list of paragraphs
class EditEngine; class ContentNode; class EditNodeIdx
{ public:
EditNodeIdx(EditEngine* pEE, ContentNode* pNd);
sal_Int32 GetIdx() const;
ContentNode* GetNode() { return mpNode; } private:
EditEngine* mpEditEngine;
ContentNode* mpNode;
};
class EditSelection; class EditPosition
{ private:
EditEngine* mpEditEngine;
EditSelection* mpCurSel;
// Sets all the attributes that are different from the current void SetAttrSet( SvxRTFItemStackType &rSet ); void SetDefault( int nToken, int nValue );
// is called for each token that is recognized in CallParser virtualvoid NextToken( int nToken ) override;
void ReadStyleTable(); void ReadColorTable(); void ReadFontTable(); void ReadAttr( int nToken, SfxItemSet* pSet ); void ReadTabAttr( int nToken, SfxItemSet& rSet );
inline SfxItemSet& GetAttrSet(); // no text yet inserted? (SttPos from the top stack entry!) bool IsAttrSttPos(); void AttrGroupEnd(); // edit the current, delete from stack void SetAllAttrOfStk(); // end all Attr. and set it into doc
virtualvoid InsertText() = 0; virtualvoid MovePos( bool bForward = true ) = 0; virtualvoid SetEndPrevPara( std::optional<EditNodeIdx>& rpNodePos,
sal_Int32& rCntPos )=0; virtualvoid SetAttrInDoc( SvxRTFItemStackType &rSet ); // for Tokens, which are not evaluated in ReadAttr virtualvoid UnknownAttrToken( int nToken );
// if no-one would like to have any twips virtualvoid CalcValue();
SvxRTFParser( SfxItemPool& rAttrPool, SvStream& rIn ); virtual ~SvxRTFParser() override;
// to set a different attribute pool. May only be done prior to CallParser! // The maps are not generated anew! void SetAttrPool( SfxItemPool* pNewPool ) { pAttrPool = pNewPool; } // to set different WhichIds for a different pool. template<class T> void SetPardMap(TypedWhichId<T> wid, TypedWhichId<T> widTrue) { aPardMap.set(wid, widTrue); } // to be able to assign them from the outside as for example table cells void ReadBorderAttr( int nToken, SfxItemSet& rSet, bool bTableDef=false ); void ReadBackgroundAttr( int nToken, SfxItemSet& rSet, bool bTableDef=false );
// for asynchronous read from the SvStream virtualvoidContinue( int nToken ) override;
// get RTF default ItemSets. Must be used by pard/plain tokens or in // reset of Style-Items const SfxItemSet& GetRTFDefaults();
};
// The stack for the attributes: // this class may only be used by SvxRTFParser! class SvxRTFItemStackType
{ friendclass SvxRTFParser;
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.