LibreOffice Module sw (master) 1
Macros | Typedefs | Functions
thints.cxx File Reference
#include <sal/config.h>
#include <sal/log.hxx>
#include <DocumentContentOperationsManager.hxx>
#include <hintids.hxx>
#include <editeng/rsiditem.hxx>
#include <osl/diagnose.h>
#include <svl/whiter.hxx>
#include <svl/itemiter.hxx>
#include <editeng/charhiddenitem.hxx>
#include <editeng/langitem.hxx>
#include <editeng/lrspitem.hxx>
#include <txtinet.hxx>
#include <txtflcnt.hxx>
#include <fmtfld.hxx>
#include <fmtrfmrk.hxx>
#include <fmtanchr.hxx>
#include <fmtinfmt.hxx>
#include <txtatr.hxx>
#include <fchrfmt.hxx>
#include <fmtautofmt.hxx>
#include <fmtflcnt.hxx>
#include <fmtftn.hxx>
#include <txttxmrk.hxx>
#include <txtrfmrk.hxx>
#include <txtftn.hxx>
#include <textlinebreak.hxx>
#include <txtfld.hxx>
#include <txtannotationfld.hxx>
#include <unotools/fltrcfg.hxx>
#include <charfmt.hxx>
#include <frmfmt.hxx>
#include <ftnidx.hxx>
#include <fmtruby.hxx>
#include <fmtmeta.hxx>
#include <formatcontentcontrol.hxx>
#include <textcontentcontrol.hxx>
#include <breakit.hxx>
#include <doc.hxx>
#include <IDocumentUndoRedo.hxx>
#include <IDocumentFieldsAccess.hxx>
#include <IDocumentLayoutAccess.hxx>
#include <IDocumentStylePoolAccess.hxx>
#include <fldbas.hxx>
#include <pam.hxx>
#include <ndtxt.hxx>
#include <txtfrm.hxx>
#include <rootfrm.hxx>
#include <rolbck.hxx>
#include <ddefld.hxx>
#include <docufld.hxx>
#include <expfld.hxx>
#include <usrfld.hxx>
#include <poolfmt.hxx>
#include <istyleaccess.hxx>
#include <docsh.hxx>
#include <algorithm>
#include <map>
#include <memory>
#include <rdfhelper.hxx>
#include <hints.hxx>
Include dependency graph for thints.cxx:

Go to the source code of this file.

Macros

#define CHECK   Check(true);
 
#define CHECK_NOTMERGED   Check(false);
 

Typedefs

typedef std::vector< SwTextAttrNesting * > NestList_t
 

Functions

static void TextAttrDelete (SwDoc &rDoc, SwTextAttr *const pAttr)
 
static bool TextAttrContains (const sal_Int32 nPos, const SwTextAttrEnd *const pAttr)
 
static bool isOverlap (const sal_Int32 nStart1, const sal_Int32 nEnd1, const sal_Int32 nStart2, const sal_Int32 nEnd2)
 
static bool isNestedAny (const sal_Int32 nStart1, const sal_Int32 nEnd1, const sal_Int32 nStart2, const sal_Int32 nEnd2)
 #i106930#: now asymmetric: empty hint1 is not nested, but empty hint2 is More...
 
static bool isSelfNestable (const sal_uInt16 nWhich)
 
static bool isSplittable (const sal_uInt16 nWhich)
 
static Split_t splitPolicy (const sal_uInt16 nWhichNew, const sal_uInt16 nWhichOther)
 Calculate splitting policy for overlapping hints, based on what kind of hint is inserted, and what kind of existing hint overlaps. More...
 
static SwTextAttrNestingMakeTextAttrNesting (SwTextNode &rNode, SwTextAttrNesting &rNesting, const sal_Int32 nStart, const sal_Int32 nEnd)
 Create a new nesting text hint. More...
 
static NestList_t::iterator lcl_DoSplitImpl (NestList_t &rSplits, SwTextNode &rNode, NestList_t::iterator const iter, sal_Int32 const nSplitPos, bool const bSplitAtStart, bool const bOtherDummy)
 
static void lcl_DoSplitNew (NestList_t &rSplits, SwTextNode &rNode, const sal_Int32 nNewStart, const sal_Int32 nOtherStart, const sal_Int32 nOtherEnd, bool bOtherDummy)
 
SwTextAttrMakeRedlineTextAttr (SwDoc &rDoc, SfxPoolItem const &rAttr)
 create redline dummy text hint that must not be inserted into hints array More...
 
SwTextAttrMakeTextAttr (SwDoc &rDoc, SfxPoolItem &rAttr, sal_Int32 const nStt, sal_Int32 const nEnd, CopyOrNewType const bIsCopy, SwTextNode *const pTextNode)
 if COPY then pTextNode must be given! More...
 
SwTextAttrMakeTextAttr (SwDoc &rDoc, const SfxItemSet &rSet, sal_Int32 nStt, sal_Int32 nEnd)
 
static void lcl_MergeAttr (SfxItemSet &rSet, const SfxPoolItem &rAttr)
 
static void lcl_MergeAttr_ExpandChrFormat (SfxItemSet &rSet, const SfxPoolItem &rAttr)
 
static void lcl_MergeListLevelIndentAsLRSpaceItem (const SwTextNode &rTextNode, SfxItemSet &rSet)
 
static MergeResult lcl_Compare_Attributes (int i, int j, const std::pair< PortionMap::const_iterator, PortionMap::const_iterator > &aRange1, const std::pair< PortionMap::const_iterator, PortionMap::const_iterator > &aRange2, std::vector< bool > &RsidOnlyAutoFormatFlagMap)
 
static void lcl_CheckSortNumber (const SwpHints &rHints, SwTextCharFormat &rNewCharFormat)
 
sal_Unicode GetCharOfTextAttr (const SwTextAttr &rAttr)
 

Macro Definition Documentation

◆ CHECK

#define CHECK   Check(true);

Definition at line 84 of file thints.cxx.

◆ CHECK_NOTMERGED

#define CHECK_NOTMERGED   Check(false);

Definition at line 85 of file thints.cxx.

Typedef Documentation

◆ NestList_t

typedef std::vector<SwTextAttrNesting *> NestList_t

Definition at line 263 of file thints.cxx.

Function Documentation

◆ GetCharOfTextAttr()

sal_Unicode GetCharOfTextAttr ( const SwTextAttr rAttr)

◆ isNestedAny()

static bool isNestedAny ( const sal_Int32  nStart1,
const sal_Int32  nEnd1,
const sal_Int32  nStart2,
const sal_Int32  nEnd2 
)
static

#i106930#: now asymmetric: empty hint1 is not nested, but empty hint2 is

Definition at line 152 of file thints.cxx.

Referenced by SwpHints::TryInsertNesting().

◆ isOverlap()

static bool isOverlap ( const sal_Int32  nStart1,
const sal_Int32  nEnd1,
const sal_Int32  nStart2,
const sal_Int32  nEnd2 
)
static

Definition at line 142 of file thints.cxx.

Referenced by SwpHints::TryInsertNesting().

◆ isSelfNestable()

static bool isSelfNestable ( const sal_uInt16  nWhich)
static

◆ isSplittable()

static bool isSplittable ( const sal_uInt16  nWhich)
static

◆ lcl_CheckSortNumber()

static void lcl_CheckSortNumber ( const SwpHints rHints,
SwTextCharFormat rNewCharFormat 
)
static

◆ lcl_Compare_Attributes()

static MergeResult lcl_Compare_Attributes ( int  i,
int  j,
const std::pair< PortionMap::const_iterator, PortionMap::const_iterator > &  aRange1,
const std::pair< PortionMap::const_iterator, PortionMap::const_iterator > &  aRange2,
std::vector< bool > &  RsidOnlyAutoFormatFlagMap 
)
static

◆ lcl_DoSplitImpl()

static NestList_t::iterator lcl_DoSplitImpl ( NestList_t rSplits,
SwTextNode rNode,
NestList_t::iterator const  iter,
sal_Int32 const  nSplitPos,
bool const  bSplitAtStart,
bool const  bOtherDummy 
)
static

Definition at line 266 of file thints.cxx.

References MakeTextAttrNesting().

Referenced by lcl_DoSplitNew(), and SwpHints::TryInsertNesting().

◆ lcl_DoSplitNew()

static void lcl_DoSplitNew ( NestList_t rSplits,
SwTextNode rNode,
const sal_Int32  nNewStart,
const sal_Int32  nOtherStart,
const sal_Int32  nOtherEnd,
bool  bOtherDummy 
)
static

Definition at line 279 of file thints.cxx.

References lcl_DoSplitImpl().

Referenced by SwpHints::TryInsertNesting().

◆ lcl_MergeAttr()

static void lcl_MergeAttr ( SfxItemSet rSet,
const SfxPoolItem rAttr 
)
static

◆ lcl_MergeAttr_ExpandChrFormat()

static void lcl_MergeAttr_ExpandChrFormat ( SfxItemSet rSet,
const SfxPoolItem rAttr 
)
static

◆ lcl_MergeListLevelIndentAsLRSpaceItem()

static void lcl_MergeListLevelIndentAsLRSpaceItem ( const SwTextNode rTextNode,
SfxItemSet rSet 
)
static

◆ MakeRedlineTextAttr()

SwTextAttr * MakeRedlineTextAttr ( SwDoc rDoc,
SfxPoolItem const &  rAttr 
)

◆ MakeTextAttr() [1/2]

SwTextAttr * MakeTextAttr ( SwDoc rDoc,
const SfxItemSet rSet,
sal_Int32  nStt,
sal_Int32  nEnd 
)

◆ MakeTextAttr() [2/2]

SwTextAttr * MakeTextAttr ( SwDoc rDoc,
SfxPoolItem rAttr,
sal_Int32 const  nStt,
sal_Int32 const  nEnd,
CopyOrNewType const  bIsCopy,
SwTextNode *const  pTextNode 
)

◆ MakeTextAttrNesting()

static SwTextAttrNesting * MakeTextAttrNesting ( SwTextNode rNode,
SwTextAttrNesting rNesting,
const sal_Int32  nStart,
const sal_Int32  nEnd 
)
static

◆ splitPolicy()

static Split_t splitPolicy ( const sal_uInt16  nWhichNew,
const sal_uInt16  nWhichOther 
)
static

Calculate splitting policy for overlapping hints, based on what kind of hint is inserted, and what kind of existing hint overlaps.

Definition at line 198 of file thints.cxx.

References isSplittable(), RES_TXTATR_CJK_RUBY(), RES_TXTATR_INETFMT(), and RES_TXTATR_INPUTFIELD().

Referenced by SwpHints::TryInsertNesting().

◆ TextAttrContains()

static bool TextAttrContains ( const sal_Int32  nPos,
const SwTextAttrEnd *const  pAttr 
)
static

Definition at line 120 of file thints.cxx.

References SwTextAttr::End(), SwTextAttr::GetStart(), and nPos.

◆ TextAttrDelete()

static void TextAttrDelete ( SwDoc rDoc,
SwTextAttr *const  pAttr 
)
static