LibreOffice Module editeng (master) 1
|
#include <eertfpar.hxx>
Public Member Functions | |
EditRTFParser (SvStream &rIn, EditSelection aCurSel, SfxItemPool &rAttrPool, EditEngine *pEditEngine) | |
virtual | ~EditRTFParser () override |
virtual SvParserState | CallParser () override |
EditPaM const & | GetCurPaM () const |
Public Member Functions inherited from SvxRTFParser | |
virtual SvParserState | CallParser () override |
const Color & | GetColor (size_t nId) const |
const vcl::Font & | GetFont (sal_uInt16 nId) |
virtual bool | IsEndPara (EditNodeIdx *pNd, sal_Int32 nCnt) const =0 |
void | SetAttrPool (SfxItemPool *pNewPool) |
template<class T > | |
void | SetPardMap (TypedWhichId< T > wid, TypedWhichId< T > widTrue) |
void | ReadBorderAttr (int nToken, SfxItemSet &rSet, bool bTableDef=false) |
void | ReadBackgroundAttr (int nToken, SfxItemSet &rSet, bool bTableDef=false) |
virtual void | Continue (int nToken) override |
const SfxItemSet & | GetRTFDefaults () |
Public Member Functions inherited from SvRTFParser | |
SvRTFParser (SvStream &rIn, sal_uInt8 nStackSize=3) | |
virtual SvParserState | CallParser () override |
virtual void | Continue (int nToken) override |
Public Member Functions inherited from SvParser< int > | |
SvParser (SvStream &rIn, sal_uInt8 nStackSize=3) | |
virtual SvParserState | CallParser ()=0 |
SvParserState | GetStatus () const |
sal_uInt32 | GetLineNr () const |
sal_uInt32 | GetLinePos () const |
void | IncLineNr () |
sal_uInt32 | IncLinePos () |
void | SetLineNr (sal_uInt32 nlNum) |
void | SetLinePos (sal_uInt32 nlPos) |
sal_uInt32 | GetNextChar () |
void | RereadLookahead () |
bool | IsParserWorking () const |
Link< LinkParamNone *, void > | GetAsynchCallLink () const |
void | SaveState (T nToken) |
void | RestoreState () |
virtual void | Continue (T nToken) |
void | SetSrcEncoding (rtl_TextEncoding eSrcEnc) |
rtl_TextEncoding | GetSrcEncoding () const |
void | SetSwitchToUCS2 (bool bSet) |
bool | IsSwitchToUCS2 () const |
sal_uInt16 | GetCharSize () const |
T | GetSaveToken () const |
Private Member Functions | |
virtual void | InsertPara () override |
virtual void | InsertText () override |
virtual void | MovePos (bool bForward=true) override |
virtual void | SetEndPrevPara (std::optional< EditNodeIdx > &rpNodePos, sal_Int32 &rCntPos) override |
virtual void | UnknownAttrToken (int nToken) override |
virtual void | NextToken (int nToken) override |
virtual void | SetAttrInDoc (SvxRTFItemStackType &rSet) override |
virtual bool | IsEndPara (EditNodeIdx *pNd, sal_Int32 nCnt) const override |
virtual void | CalcValue () override |
void | CreateStyleSheets () |
SfxStyleSheet * | CreateStyleSheet (SvxRTFStyleType const *pRTFStyle) |
SvxRTFStyleType * | FindStyleSheet (std::u16string_view rName) |
void | AddRTFDefaultValues (const EditPaM &rStart, const EditPaM &rEnd) |
void | ReadField () |
void | SkipGroup () |
Private Attributes | |
EditSelection | aCurSel |
EditEngine * | mpEditEngine |
MapMode | aEditMapMode |
sal_uInt16 | nDefFont |
bool | bLastActionInsertParaBreak |
Additional Inherited Members | |
Protected Member Functions inherited from SvxRTFParser | |
virtual void | InsertPara ()=0 |
virtual void | NextToken (int nToken) override |
void | ReadStyleTable () |
void | ReadColorTable () |
void | ReadFontTable () |
void | ReadAttr (int nToken, SfxItemSet *pSet) |
void | ReadTabAttr (int nToken, SfxItemSet &rSet) |
SfxItemSet & | GetAttrSet () |
bool | IsAttrSttPos () |
void | AttrGroupEnd () |
void | SetAllAttrOfStk () |
virtual void | InsertText ()=0 |
virtual void | MovePos (bool bForward=true)=0 |
virtual void | SetEndPrevPara (std::optional< EditNodeIdx > &rpNodePos, sal_Int32 &rCntPos)=0 |
virtual void | SetAttrInDoc (SvxRTFItemStackType &rSet) |
virtual void | UnknownAttrToken (int nToken) |
virtual void | CalcValue () |
SvxRTFParser (SfxItemPool &rAttrPool, SvStream &rIn) | |
virtual | ~SvxRTFParser () override |
void | SetNewDoc (bool bFlag) |
bool | IsChkStyleAttr () const |
void | SetChkStyleAttr (bool bFlag) |
bool | IsCalcValue () const |
void | SetCalcValue (bool bFlag) |
void | SetInsPos (const EditPosition &rNew) |
SvxRTFStyleTbl & | GetStyleTbl () |
Protected Member Functions inherited from SvRTFParser | |
sal_Unicode | GetHexValue () |
void | ScanText () |
void | SkipGroup () |
virtual int | GetNextToken_ () override |
void | ReadUnknownData () |
void | ReadBitmapData () |
virtual | ~SvRTFParser () override |
rtl_TextEncoding | GetCodeSet () const |
void | SetEncoding (rtl_TextEncoding eEnc) |
Protected Member Functions inherited from SvParser< int > | |
T | SkipToken (short nCnt=-1) |
TokenStackType * | GetStackPtr (short nCnt) |
T | GetNextToken () |
virtual T | GetNextToken_ ()=0 |
virtual void | NextToken (T nToken)=0 |
virtual | ~SvParser () override |
void | ClearTxtConvContext () |
Static Protected Member Functions inherited from SvxRTFParser | |
static void | DelCharAtEnd (OUStringBuffer &rStr, const sal_Unicode cDel) |
Protected Attributes inherited from SvParser< int > | |
SvStream & | rInput |
OUStringBuffer | aToken |
sal_uInt32 | nlLineNr |
sal_uInt32 | nlLinePos |
std::unique_ptr< SvParser_Impl< T > > | pImplData |
tools::Long | m_nTokenIndex |
tools::Long | nTokenValue |
bool | bTokenHasValue |
bool | bFuzzing |
SvParserState | eState |
rtl_TextEncoding | eSrcEnc |
sal_uInt64 | nNextChPos |
sal_uInt32 | nNextCh |
bool | bSwitchToUCS2 |
bool | bRTF_InTextRead |
Definition at line 27 of file eertfpar.hxx.
EditRTFParser::EditRTFParser | ( | SvStream & | rIn, |
EditSelection | aCurSel, | ||
SfxItemPool & | rAttrPool, | ||
EditEngine * | pEditEngine | ||
) |
Definition at line 61 of file eertfpar.cxx.
References aCurSel, aEditMapMode, OutputDevice::GetMapMode(), MapMode::GetMapUnit(), EditEngine::GetRefDevice(), EditEngine::IsImportRTFStyleSheetsSet(), mpEditEngine, SvxRTFParser::SetCalcValue(), SvxRTFParser::SetChkStyleAttr(), SvxRTFParser::SetInsPos(), and SvxRTFParser::SetNewDoc().
|
overridevirtual |
Definition at line 78 of file eertfpar.cxx.
Definition at line 148 of file eertfpar.cxx.
References EE_CHAR_FONTHEIGHT(), EE_CHAR_FONTINFO(), vcl::Font::GetCharSet(), ContentNode::GetContentAttribs(), EditEngine::GetEditDoc(), vcl::Font::GetFamilyName(), vcl::Font::GetFamilyType(), SvxRTFParser::GetFont(), ContentAttribs::GetItems(), OutputDevice::GetMapMode(), MapMode::GetMapUnit(), EditPaM::GetNode(), EditDoc::GetObject(), vcl::Font::GetPitch(), EditDoc::GetPos(), EditEngine::GetRefDevice(), vcl::Font::GetStyleName(), ContentAttribs::HasItem(), OutputDevice::LogicToLogic(), mpEditEngine, nDefFont, SfxItemSet::Put(), and Size::Width().
Referenced by CallParser().
|
overrideprivatevirtual |
Reimplemented from SvxRTFParser.
Definition at line 506 of file eertfpar.cxx.
References aEditMapMode, MapMode::GetMapUnit(), gRTFMapUnit, OutputDevice::LogicToLogic(), and SvParser< int >::nTokenValue.
|
overridevirtual |
Reimplemented from SvxRTFParser.
Definition at line 82 of file eertfpar.cxx.
References aCurSel, AddRTFDefaultValues(), bLastActionInsertParaBreak, SvxRTFParser::CallParser(), EditEngine::CallRtfImportHandler(), SfxItemSet::ClearItem(), EditEngine::ConnectParagraphs(), EditEngine::CreateESelection(), DBG_ASSERT, EditEngine::DeleteSelection(), End, ContentNode::GetContentAttribs(), EditEngine::GetEditDoc(), EditPaM::GetIndex(), ContentAttribs::GetItems(), EditPaM::GetNode(), EditDoc::GetObject(), EditDoc::GetPos(), EditSelection::HasRange(), EditEngine::InsertParaBreak(), EditEngine::IsRtfImportHandlerSet(), ContentNode::Len(), EditSelection::Max(), EditSelection::Min(), mpEditEngine, EditEngine::ParaAttribsToCharAttribs(), and Start.
|
private |
Definition at line 450 of file eertfpar.cxx.
References SvxRTFStyleType::aAttrSet, aName, ConvertAndPutItems(), CreateStyleSheet(), end, SfxStyleSheetBasePool::Find(), FindStyleSheet(), SfxStyleSheetBase::GetItemSet(), EditEngine::GetStyleSheetPool(), SvxRTFParser::GetStyleTbl(), SfxStyleSheetBasePool::Make(), mpEditEngine, SvxRTFStyleType::nBasedOn, pS, SfxItemSet::SetParent(), and SvxRTFStyleType::sName.
Referenced by CreateStyleSheet(), and CreateStyleSheets().
|
private |
Definition at line 493 of file eertfpar.cxx.
References CreateStyleSheet(), EditEngine::GetStyleSheetPool(), SvxRTFParser::GetStyleTbl(), EditEngine::IsImportRTFStyleSheetsSet(), and mpEditEngine.
Referenced by NextToken().
|
private |
Definition at line 439 of file eertfpar.cxx.
References SvxRTFParser::GetStyleTbl().
Referenced by CreateStyleSheet().
|
inline |
Definition at line 61 of file eertfpar.hxx.
References aCurSel, and EditSelection::Max().
|
overrideprivatevirtual |
Implements SvxRTFParser.
Definition at line 254 of file eertfpar.cxx.
References aCurSel, bLastActionInsertParaBreak, EditEngine::CallRtfImportHandler(), EditEngine::CreateESelection(), InsertPara, EditEngine::InsertParaBreak(), EditEngine::IsRtfImportHandlerSet(), and mpEditEngine.
|
overrideprivatevirtual |
Implements SvxRTFParser.
Definition at line 242 of file eertfpar.cxx.
References aCurSel, SvParser< int >::aToken, bLastActionInsertParaBreak, EditEngine::CallRtfImportHandler(), EditEngine::CreateESelection(), InsertText, EditEngine::InsertText(), EditEngine::IsRtfImportHandlerSet(), and mpEditEngine.
|
overrideprivatevirtual |
Implements SvxRTFParser.
Definition at line 293 of file eertfpar.cxx.
References EditNodeIdx::GetNode(), and ContentNode::Len().
|
overrideprivatevirtual |
Implements SvxRTFParser.
Definition at line 265 of file eertfpar.cxx.
References aCurSel, EditEngine::CursorLeft(), EditEngine::CursorRight(), EditSelection::Max(), and mpEditEngine.
|
overrideprivatevirtual |
Reimplemented from SvxRTFParser.
Definition at line 173 of file eertfpar.cxx.
References aCurSel, EditEngine::CallRtfImportHandler(), EditEngine::CreateESelection(), CreateStyleSheets(), EditEngine::InsertLineBreak(), EditEngine::InsertParaBreak(), EditEngine::IsRtfImportHandlerSet(), mpEditEngine, nDefFont, NextToken, SvxRTFParser::NextToken(), nToken, RtfImportInfo::nToken, SvParser< int >::nTokenValue, RtfImportInfo::nTokenValue, ReadField(), RTF_CELL, RTF_DEFF, RTF_DEFTAB, RTF_FIELD, RTF_LINE, RTF_LISTTEXT, RTF_PGDSCTBL, RTF_SHPINST, RTF_SP, RTF_STYLESHEET, and SkipGroup().
|
private |
Definition at line 513 of file eertfpar.cxx.
References aCurSel, SvParser< int >::aToken, bLastActionInsertParaBreak, EE_FEATURE_FIELD(), SvParser< int >::GetNextToken(), EditEngine::InsertField(), SvParser< int >::IsParserWorking(), mpEditEngine, Repr, RTF_FIELD, RTF_FLDINST, RTF_FLDRSLT, RTF_TEXTTOKEN, SkipGroup(), SvParser< int >::SkipToken(), comphelper::string::strip(), and EditEngine::UpdateFieldsOnly().
Referenced by NextToken().
|
overrideprivatevirtual |
Reimplemented from SvxRTFParser.
Definition at line 298 of file eertfpar.cxx.
References EditEngine::CallRtfImportHandler(), EditEngine::CreateESelection(), DBG_ASSERT, DFLT_ESC_AUTO_SUB, DFLT_ESC_AUTO_SUPER, EE_CHAR_ESCAPEMENT(), EE_CHAR_FONTHEIGHT(), EE_CHAR_FONTHEIGHT_CJK(), EE_CHAR_FONTHEIGHT_CTL(), EE_PARA_OUTLLEVEL(), end, SfxStyleSheetBasePool::Find(), EditEngine::GetBaseParaAttribs(), ContentNode::GetCharAttribs(), ContentNode::GetContentAttribs(), CharAttribList::GetDefFont(), EditEngine::GetEditDoc(), vcl::Font::GetFontSize(), EditPaM::GetIndex(), SfxItemSet::GetItemIfSet(), EditDoc::GetItemPool(), ContentAttribs::GetItems(), SfxItemSet::GetItemState(), SfxItemPool::GetMetric(), EditPaM::GetNode(), GetNode(), EditDoc::GetObject(), EditDoc::GetPos(), EditEngine::GetStyleSheetPool(), SvxRTFParser::GetStyleTbl(), gRTFMapUnit, Size::Height(), utl::ConfigManager::IsFuzzing(), EditEngine::IsImportRTFStyleSheetsSet(), EditEngine::IsRtfImportHandlerSet(), ContentNode::Len(), OutputDevice::LogicToLogic(), mpEditEngine, n, pS, SfxItemSet::Put(), rSet, EditEngine::SeekCursor(), SetAttr, EditEngine::SetAttribs(), EditEngine::SetParaAttribsOnly(), SvxFontHeightItem::SetProp(), EditEngine::SetStyleSheet(), and z.
|
overrideprivatevirtual |
Implements SvxRTFParser.
Definition at line 275 of file eertfpar.cxx.
References aCurSel, DBG_ASSERT, EditEngine::GetEditDoc(), EditPaM::GetNode(), EditDoc::GetObject(), EditDoc::GetPos(), ContentNode::Len(), EditSelection::Max(), and mpEditEngine.
|
private |
Definition at line 582 of file eertfpar.cxx.
References SvParser< int >::GetNextToken(), SvParser< int >::IsParserWorking(), and SvParser< int >::SkipToken().
Referenced by NextToken(), and ReadField().
|
overrideprivatevirtual |
Reimplemented from SvxRTFParser.
Definition at line 229 of file eertfpar.cxx.
References aCurSel, EditEngine::CallRtfImportHandler(), EditEngine::CreateESelection(), EditEngine::IsRtfImportHandlerSet(), mpEditEngine, nToken, RtfImportInfo::nToken, SvParser< int >::nTokenValue, RtfImportInfo::nTokenValue, and UnknownAttr.
|
private |
Definition at line 30 of file eertfpar.hxx.
Referenced by CallParser(), EditRTFParser(), GetCurPaM(), InsertPara(), InsertText(), MovePos(), NextToken(), ReadField(), SetEndPrevPara(), and UnknownAttrToken().
|
private |
Definition at line 32 of file eertfpar.hxx.
Referenced by CalcValue(), and EditRTFParser().
|
private |
Definition at line 35 of file eertfpar.hxx.
Referenced by CallParser(), InsertPara(), InsertText(), and ReadField().
|
private |
Definition at line 31 of file eertfpar.hxx.
Referenced by AddRTFDefaultValues(), CallParser(), CreateStyleSheet(), CreateStyleSheets(), EditRTFParser(), InsertPara(), InsertText(), MovePos(), NextToken(), ReadField(), SetAttrInDoc(), SetEndPrevPara(), and UnknownAttrToken().
|
private |
Definition at line 34 of file eertfpar.hxx.
Referenced by AddRTFDefaultValues(), and NextToken().