LibreOffice Module sw (master) 1
|
#include <modeltoviewhelper.hxx>
Classes | |
struct | ConversionMapEntry |
For each expanded/hidden portion in the model string, there is an entry in the conversion map. More... | |
struct | ModelPosition |
This struct defines a position in the model string. More... | |
Public Member Functions | |
ModelToViewHelper (const SwTextNode &rNode, SwRootFrame const *pLayout, ExpandMode eMode=ExpandMode::ExpandFields|ExpandMode::ExpandFootnote|ExpandMode::HideFieldmarkCommands|ExpandMode::ReplaceMode) | |
ModelToViewHelper () | |
sal_Int32 | ConvertToViewPosition (sal_Int32 nModelPos) const |
Converts a model position into a view position. More... | |
ModelPosition | ConvertToModelPosition (sal_Int32 nViewPos) const |
Converts a view position into a model position. More... | |
const OUString & | getViewText () const |
std::vector< sal_Int32 > const & | getFieldPositions () const |
std::vector< sal_Int32 > const & | getFootnotePositions () const |
Private Types | |
typedef std::vector< ConversionMapEntry > | ConversionMap |
Private Attributes | |
ConversionMap | m_aMap |
std::vector< sal_Int32 > | m_FieldPositions |
store positions of fields and footnotes for grammar checkers More... | |
std::vector< sal_Int32 > | m_FootnotePositions |
OUString | m_aRetText |
Definition at line 83 of file modeltoviewhelper.hxx.
|
private |
Definition at line 103 of file modeltoviewhelper.hxx.
ModelToViewHelper::ModelToViewHelper | ( | const SwTextNode & | rNode, |
SwRootFrame const * | pLayout, | ||
ExpandMode | eMode = ExpandMode::ExpandFields | ExpandMode::ExpandFootnote | ExpandMode::HideFieldmarkCommands | ExpandMode::ReplaceMode |
||
) |
Definition at line 91 of file modeltoviewhelper.cxx.
References CH_TXT_ATR_FIELDEND, CH_TXT_ATR_FIELDSEP, CH_TXT_ATR_FIELDSTART, CH_TXT_ATR_FORMELEMENT, CHAR_ZWSP, SwpHints::Count(), eMode, sw::mark::ExpandFieldmark(), ExpandFields, ExpandFootnote, sw::mark::FindFieldSep(), fnMoveBackward, SwpHints::Get(), SwPosition::GetContentIndex(), SwNode::GetDoc(), IDocumentMarkAccess::getFieldmarkAt(), SwDoc::getIDocumentMarkAccess(), IDocumentMarkAccess::getInnerFieldmarkFor(), getLength(), SwPosition::GetNode(), IDocumentMarkAccess::getNoTextFieldmarksIn(), SwPaM::GetPoint(), SwTextNode::GetpSwpHints(), MultiSelection::GetRange(), MultiSelection::GetRangeCount(), SwTextAttr::GetStart(), SwTextNode::GetText(), SwNode::GetTextNode(), SwFormatFootnote::GetViewNumStr(), GoInContent(), SwTextAttr::HasDummyChar(), HideDeletions, HideFieldmarkCommands, HideInvisible, i, MultiSelection::IsSelected(), SwTextNode::Len(), m_aMap, m_aRetText, m_FieldPositions, m_FootnotePositions, Range::Max(), Range::Min(), SwPaM::Move(), SwPostItHelper::NONE, PassThrough, ReplaceMode, RES_TXTATR_ANNOTATION(), RES_TXTATR_FIELD(), RES_TXTATR_FTN(), MultiSelection::Select(), SwScriptInfo::selectHiddenTextProperty(), SwScriptInfo::selectRedLineDeleted(), u, and SwTextAttr::Which().
|
inline |
Definition at line 132 of file modeltoviewhelper.hxx.
ModelToViewHelper::ModelPosition ModelToViewHelper::ConvertToModelPosition | ( | sal_Int32 | nViewPos | ) | const |
Converts a view position into a model position.
nPos | nPos denotes a position in the view string which should be converted. |
Definition at line 422 of file modeltoviewhelper.cxx.
References m_aMap, ModelToViewHelper::ModelPosition::mbIsField, ModelToViewHelper::ModelPosition::mnPos, and ModelToViewHelper::ModelPosition::mnSubPos.
Referenced by lcl_commitGrammarMarkUp(), lcl_syncGrammarError(), SwScanner::NextWord(), SwDoc::Spell(), and SwScanner::SwScanner().
sal_Int32 ModelToViewHelper::ConvertToViewPosition | ( | sal_Int32 | nModelPos | ) | const |
Converts a model position into a view position.
nPos | nPos denotes a position in the model string which should be converted. Note that converting model positions inside fields is not supported, therefore nPos is not of type ModelPosition. |
Definition at line 398 of file modeltoviewhelper.cxx.
References m_aMap.
Referenced by SwTextNode::CountWords(), sw::ToxTextGenerator::GetAttributesForNode(), SwEditShell::GetCorrection(), SwTextNode::GetExpandText(), SwEditShell::GetGrammarCorrection(), lcl_commitGrammarMarkUp(), SwTextFrame::SmartTagScan(), and SwDoc::Spell().
|
inline |
Definition at line 167 of file modeltoviewhelper.hxx.
References m_FieldPositions.
|
inline |
Definition at line 168 of file modeltoviewhelper.hxx.
References m_FootnotePositions.
|
inline |
Definition at line 166 of file modeltoviewhelper.hxx.
References m_aRetText.
Referenced by SwTextNode::CountWords(), sw::ToxTextGenerator::GetAttributesForNode(), SwEditShell::GetCorrection(), SwTextNode::GetExpandText(), SwEditShell::GetGrammarCorrection(), SwXFlatParagraphIterator::getNextPara(), SwXFlatParagraphIterator::getParaAfter(), SwXFlatParagraphIterator::getParaBefore(), SwTextFrame::SmartTagScan(), and SwDoc::Spell().
|
private |
Definition at line 105 of file modeltoviewhelper.hxx.
Referenced by ConvertToModelPosition(), ConvertToViewPosition(), and ModelToViewHelper().
|
private |
Definition at line 110 of file modeltoviewhelper.hxx.
Referenced by getViewText(), and ModelToViewHelper().
|
private |
store positions of fields and footnotes for grammar checkers
Definition at line 107 of file modeltoviewhelper.hxx.
Referenced by getFieldPositions(), and ModelToViewHelper().
|
private |
Definition at line 108 of file modeltoviewhelper.hxx.
Referenced by getFootnotePositions(), and ModelToViewHelper().