LibreOffice Module sw (master)  1
Macros | Typedefs | Enumerations | Functions
thints.cxx File Reference
#include <sal/config.h>
#include <sal/log.hxx>
#include <DocumentContentOperationsManager.hxx>
#include <hintids.hxx>
#include <editeng/xmlcnitm.hxx>
#include <editeng/rsiditem.hxx>
#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 <txtfld.hxx>
#include <txtannotationfld.hxx>
#include <charfmt.hxx>
#include <frmfmt.hxx>
#include <ftnidx.hxx>
#include <fmtruby.hxx>
#include <fmtmeta.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
 

Enumerations

enum  Split_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 bool lcl_IsIgnoredCharFormatForBullets (const sal_uInt16 nWhich)
 
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 void lcl_CheckSortNumber (const SwpHints &rHints, SwTextCharFormat &rNewCharFormat)
 
sal_Unicode GetCharOfTextAttr (const SwTextAttr &rAttr)
 

Macro Definition Documentation

#define CHECK   Check(true);

Definition at line 80 of file thints.cxx.

Referenced by SwpHints::TryInsertHint().

#define CHECK_NOTMERGED   Check(false);

Definition at line 81 of file thints.cxx.

Referenced by SwpHints::BuildPortions(), and SwpHints::DeleteAtPos().

Typedef Documentation

typedef std::vector<SwTextAttrNesting *> NestList_t

Definition at line 253 of file thints.cxx.

Enumeration Type Documentation

enum Split_t

Definition at line 179 of file thints.cxx.

Function Documentation

sal_Unicode GetCharOfTextAttr ( const SwTextAttr rAttr)
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 144 of file thints.cxx.

Referenced by SwpHints::TryInsertNesting().

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

Definition at line 134 of file thints.cxx.

Referenced by SwpHints::TryInsertNesting().

static bool isSelfNestable ( const sal_uInt16  nWhich)
static
static bool isSplittable ( const sal_uInt16  nWhich)
static
static void lcl_CheckSortNumber ( const SwpHints rHints,
SwTextCharFormat rNewCharFormat 
)
static
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 256 of file thints.cxx.

References MakeTextAttrNesting().

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

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 269 of file thints.cxx.

References lcl_DoSplitImpl(), and TextAttrContains().

Referenced by SwpHints::TryInsertNesting().

static bool lcl_IsIgnoredCharFormatForBullets ( const sal_uInt16  nWhich)
static
static void lcl_MergeAttr ( SfxItemSet rSet,
const SfxPoolItem rAttr 
)
static
static void lcl_MergeAttr_ExpandChrFormat ( SfxItemSet rSet,
const SfxPoolItem rAttr 
)
static
static void lcl_MergeListLevelIndentAsLRSpaceItem ( const SwTextNode rTextNode,
SfxItemSet rSet 
)
static
SwTextAttr* MakeRedlineTextAttr ( SwDoc rDoc,
SfxPoolItem const &  rAttr 
)
SwTextAttr* MakeTextAttr ( SwDoc rDoc,
SfxPoolItem rAttr,
sal_Int32 const  nStt,
sal_Int32 const  nEnd,
CopyOrNewType const  bIsCopy,
SwTextNode *const  pTextNode 
)
SwTextAttr* MakeTextAttr ( SwDoc rDoc,
const SfxItemSet rSet,
sal_Int32  nStt,
sal_Int32  nEnd 
)
static SwTextAttrNesting* MakeTextAttrNesting ( SwTextNode rNode,
SwTextAttrNesting rNesting,
const sal_Int32  nStart,
const sal_Int32  nEnd 
)
static
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 188 of file thints.cxx.

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

Referenced by SwpHints::TryInsertNesting().

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

Definition at line 112 of file thints.cxx.

References End, and SwTextAttr::GetStart().

Referenced by lcl_DoSplitNew().

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