LibreOffice Module sw (master)  1
Classes | Macros | Typedefs | Enumerations | Functions
thints.cxx File Reference
#include <sal/config.h>
#include <sal/log.hxx>
#include <DocumentSettingManager.hxx>
#include <hintids.hxx>
#include <editeng/xmlcnitm.hxx>
#include <editeng/rsiditem.hxx>
#include <svl/whiter.hxx>
#include <svl/itemiter.hxx>
#include <svl/stylepool.hxx>
#include <editeng/fontitem.hxx>
#include <editeng/langitem.hxx>
#include <editeng/emphasismarkitem.hxx>
#include <editeng/charscaleitem.hxx>
#include <editeng/charrotateitem.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 <charatr.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 <swfont.hxx>
#include <istyleaccess.hxx>
#include <dcontact.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.

Classes

struct  SwPoolItemEndPair
 

Macros

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

Typedefs

typedef std::vector< SwTextAttrNesting * > NestList_t
 

Enumerations

enum  Split_t {
  FAIL,
  SPLIT_NEW,
  SPLIT_OTHER
}
 

Functions

static void TextAttrDelete (SwDoc &rDoc, SwTextAttr *const pAttr)
 
static bool TextAttrContains (const sal_Int32 nPos, 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 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 87 of file thints.cxx.

Referenced by SwpHints::TryInsertHint().

#define CHECK_NOTMERGED   Check(false);

Definition at line 88 of file thints.cxx.

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

Typedef Documentation

typedef std::vector<SwTextAttrNesting *> NestList_t

Definition at line 255 of file thints.cxx.

Enumeration Type Documentation

enum Split_t
Enumerator
FAIL 
SPLIT_NEW 
SPLIT_OTHER 

Definition at line 184 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 151 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 141 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 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 258 of file thints.cxx.

References MakeTextAttrNesting(), 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 190 of file thints.cxx.

References FAIL, isSplittable(), RES_TXTATR_CJK_RUBY, RES_TXTATR_INETFMT, RES_TXTATR_INPUTFIELD, SPLIT_NEW, and SPLIT_OTHER.

Referenced by SwpHints::TryInsertNesting().

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

Definition at line 119 of file thints.cxx.

References End, and SwTextAttr::GetStart().

Referenced by lcl_DoSplitNew().

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