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

#include <redlnitr.hxx>

Collaboration diagram for SwRedlineItr:
[legend]

Public Types

enum class  Mode {
  Show ,
  Ignore ,
  Hide
}
 

Public Member Functions

 SwRedlineItr (const SwTextNode &rTextNd, SwFont &rFnt, SwAttrHandler &rAH, sal_Int32 nRedlPos, Mode mode, const std::vector< ExtTextInputAttr > *pArr=nullptr, SwPosition const *pExtInputStart=nullptr)
 
 ~SwRedlineItr () COVERITY_NOEXCEPT_FALSE
 
SwRedlineTable::size_type GetAct () const
 
bool IsOn () const
 
void Clear (SwFont *pFnt)
 
void ChangeTextAttr (SwFont *pFnt, SwTextAttr const &rHt, bool bChg)
 
short Seek (SwFont &rFnt, SwNodeOffset nNode, sal_Int32 nNew, sal_Int32 nOld)
 
void Reset ()
 
std::pair< sal_Int32, std::pair< SwRangeRedline const *, size_t > > GetNextRedln (sal_Int32 nNext, SwTextNode const *pNode, SwRedlineTable::size_type &rAct)
 Ignore mode: does nothing. More...
 
bool ChkSpecialUnderline () const
 
bool CheckLine (SwNodeOffset nStartNode, sal_Int32 nChkStart, SwNodeOffset nEndNode, sal_Int32 nChkEnd, OUString &rRedlineText, bool &bRedlineEnd, RedlineType &eRedlineEnd, size_t *pAuthorAtPos=nullptr)
 
bool LeaveExtend (SwFont &rFnt, SwNodeOffset const nNode, sal_Int32 const nNew)
 
bool ExtOn ()
 
void UpdateExtFont (SwFont &rFnt)
 

Private Member Functions

void Clear_ (SwFont *pFnt)
 
bool ChkSpecialUnderline_ () const
 
void FillHints (std::size_t nAuthor, RedlineType eType)
 
short EnterExtend (SwFont &rFnt, SwNodeOffset const nNode, sal_Int32 const nNew)
 
sal_Int32 NextExtend (SwNodeOffset const nNode, sal_Int32 const nNext)
 

Private Attributes

std::deque< SwTextAttr * > m_Hints
 
const SwDocm_rDoc
 
SwAttrHandlerm_rAttrHandler
 
std::unique_ptr< SfxItemSetm_pSet
 
std::unique_ptr< SwExtendm_pExt
 
SwNodeOffset const m_nNdIdx
 
SwRedlineTable::size_type const m_nFirst
 
SwRedlineTable::size_type m_nAct
 
sal_Int32 m_nStart
 
sal_Int32 m_nEnd
 
bool m_bOn
 
Mode const m_eMode
 

Detailed Description

Definition at line 70 of file redlnitr.hxx.

Member Enumeration Documentation

◆ Mode

enum class SwRedlineItr::Mode
strong
Enumerator
Show 
Ignore 
Hide 

Definition at line 85 of file redlnitr.hxx.

Constructor & Destructor Documentation

◆ SwRedlineItr()

SwRedlineItr::SwRedlineItr ( const SwTextNode rTextNd,
SwFont rFnt,
SwAttrHandler rAH,
sal_Int32  nRedlPos,
Mode  mode,
const std::vector< ExtTextInputAttr > *  pArr = nullptr,
SwPosition const *  pExtInputStart = nullptr 
)

◆ ~SwRedlineItr()

SwRedlineItr::~SwRedlineItr ( )

Definition at line 731 of file redlnitr.cxx.

References Clear(), and m_pExt.

Member Function Documentation

◆ ChangeTextAttr()

void SwRedlineItr::ChangeTextAttr ( SwFont pFnt,
SwTextAttr const &  rHt,
bool  bChg 
)

◆ CheckLine()

bool SwRedlineItr::CheckLine ( SwNodeOffset  nStartNode,
sal_Int32  nChkStart,
SwNodeOffset  nEndNode,
sal_Int32  nChkEnd,
OUString &  rRedlineText,
bool &  bRedlineEnd,
RedlineType eRedlineEnd,
size_t *  pAuthorAtPos = nullptr 
)

◆ ChkSpecialUnderline()

bool SwRedlineItr::ChkSpecialUnderline ( ) const
inline

Definition at line 118 of file redlnitr.hxx.

References ChkSpecialUnderline_(), and IsOn().

◆ ChkSpecialUnderline_()

bool SwRedlineItr::ChkSpecialUnderline_ ( ) const
private

Definition at line 1005 of file redlnitr.cxx.

References m_Hints, RES_CHRATR_ESCAPEMENT(), and RES_CHRATR_UNDERLINE().

Referenced by ChkSpecialUnderline().

◆ Clear()

void SwRedlineItr::Clear ( SwFont pFnt)
inline

Definition at line 109 of file redlnitr.hxx.

References Clear_(), and m_bOn.

Referenced by SwTextFormatter::FeedInf(), and ~SwRedlineItr().

◆ Clear_()

void SwRedlineItr::Clear_ ( SwFont pFnt)
private

◆ EnterExtend()

short SwRedlineItr::EnterExtend ( SwFont rFnt,
SwNodeOffset const  nNode,
sal_Int32 const  nNew 
)
inlineprivate

Definition at line 92 of file redlnitr.hxx.

References m_pExt.

Referenced by Seek().

◆ ExtOn()

bool SwRedlineItr::ExtOn ( )
inline

Definition at line 125 of file redlnitr.hxx.

References m_pExt.

Referenced by Seek(), and UpdateExtFont().

◆ FillHints()

void SwRedlineItr::FillHints ( std::size_t  nAuthor,
RedlineType  eType 
)
private

Definition at line 869 of file redlnitr.cxx.

References eType, m_pSet, and SW_MOD.

Referenced by Seek().

◆ GetAct()

SwRedlineTable::size_type SwRedlineItr::GetAct ( ) const
inline

Definition at line 107 of file redlnitr.hxx.

References m_nAct.

◆ GetNextRedln()

std::pair< sal_Int32, std::pair< SwRangeRedline const *, size_t > > SwRedlineItr::GetNextRedln ( sal_Int32  nNext,
SwTextNode const *  pNode,
SwRedlineTable::size_type rAct 
)

Ignore mode: does nothing.

Show mode: returns end of redline if currently in one, or start of next Hide mode: returns start of next redline in current node, plus (if it's a Delete) its end position and number of consecutive RLs

Definition at line 929 of file redlnitr.cxx.

References SwRangeRedline::CalcStartEnd(), SwPaM::End(), SwDoc::getIDocumentRedlineAccess(), SwNode::GetIndex(), IDocumentRedlineAccess::GetRedlineTable(), SwRangeRedline::GetType(), Hide, Ignore, m_bOn, m_eMode, m_nAct, m_nEnd, m_nFirst, m_nStart, m_rDoc, NextExtend(), SwRedlineTable::npos, Show, SwRedlineTable::size(), and SwPaM::Start().

◆ IsOn()

bool SwRedlineItr::IsOn ( ) const
inline

Definition at line 108 of file redlnitr.hxx.

References m_bOn, and m_pExt.

Referenced by ChangeTextAttr(), and ChkSpecialUnderline().

◆ LeaveExtend()

bool SwRedlineItr::LeaveExtend ( SwFont rFnt,
SwNodeOffset const  nNode,
sal_Int32 const  nNew 
)
inline

Definition at line 123 of file redlnitr.hxx.

References m_pExt.

◆ NextExtend()

sal_Int32 SwRedlineItr::NextExtend ( SwNodeOffset const  nNode,
sal_Int32 const  nNext 
)
inlineprivate

Definition at line 97 of file redlnitr.hxx.

References m_pExt.

Referenced by GetNextRedln().

◆ Reset()

void SwRedlineItr::Reset ( void  )
inline

Definition at line 112 of file redlnitr.hxx.

References m_nAct, m_nFirst, m_pExt, and SwRedlineTable::npos.

Referenced by SwTextFormatter::FeedInf().

◆ Seek()

short SwRedlineItr::Seek ( SwFont rFnt,
SwNodeOffset  nNode,
sal_Int32  nNew,
sal_Int32  nOld 
)

◆ UpdateExtFont()

void SwRedlineItr::UpdateExtFont ( SwFont rFnt)
inline

Definition at line 129 of file redlnitr.hxx.

References ExtOn(), and m_pExt.

Member Data Documentation

◆ m_bOn

bool SwRedlineItr::m_bOn
private

Definition at line 83 of file redlnitr.hxx.

Referenced by Clear(), Clear_(), GetNextRedln(), IsOn(), and Seek().

◆ m_eMode

Mode const SwRedlineItr::m_eMode
private

Definition at line 87 of file redlnitr.hxx.

Referenced by ChangeTextAttr(), CheckLine(), GetNextRedln(), Seek(), and SwRedlineItr().

◆ m_Hints

std::deque<SwTextAttr *> SwRedlineItr::m_Hints
private

Definition at line 72 of file redlnitr.hxx.

Referenced by ChkSpecialUnderline_(), Clear_(), and Seek().

◆ m_nAct

SwRedlineTable::size_type SwRedlineItr::m_nAct
private

Definition at line 80 of file redlnitr.hxx.

Referenced by CheckLine(), GetAct(), GetNextRedln(), Reset(), and Seek().

◆ m_nEnd

sal_Int32 SwRedlineItr::m_nEnd
private

Definition at line 82 of file redlnitr.hxx.

Referenced by CheckLine(), GetNextRedln(), and Seek().

◆ m_nFirst

SwRedlineTable::size_type const SwRedlineItr::m_nFirst
private

Definition at line 79 of file redlnitr.hxx.

Referenced by CheckLine(), GetNextRedln(), Reset(), and Seek().

◆ m_nNdIdx

SwNodeOffset const SwRedlineItr::m_nNdIdx
private

Definition at line 78 of file redlnitr.hxx.

Referenced by SwRedlineItr().

◆ m_nStart

sal_Int32 SwRedlineItr::m_nStart
private

Definition at line 81 of file redlnitr.hxx.

Referenced by CheckLine(), GetNextRedln(), and Seek().

◆ m_pExt

std::unique_ptr<SwExtend> SwRedlineItr::m_pExt
private

◆ m_pSet

std::unique_ptr<SfxItemSet> SwRedlineItr::m_pSet
private

Definition at line 75 of file redlnitr.hxx.

Referenced by FillHints(), and Seek().

◆ m_rAttrHandler

SwAttrHandler& SwRedlineItr::m_rAttrHandler
private

Definition at line 74 of file redlnitr.hxx.

Referenced by ChangeTextAttr(), Clear_(), and Seek().

◆ m_rDoc

const SwDoc& SwRedlineItr::m_rDoc
private

Definition at line 73 of file redlnitr.hxx.

Referenced by CheckLine(), Clear_(), GetNextRedln(), and Seek().


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