LibreOffice Module sw (master)
1
|
#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>
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 SwTextAttrNesting * | MakeTextAttrNesting (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) |
SwTextAttr * | MakeRedlineTextAttr (SwDoc &rDoc, SfxPoolItem const &rAttr) |
create redline dummy text hint that must not be inserted into hints array More... | |
SwTextAttr * | MakeTextAttr (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... | |
SwTextAttr * | MakeTextAttr (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) |
#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 std::vector<SwTextAttrNesting *> NestList_t |
Definition at line 253 of file thints.cxx.
enum Split_t |
Definition at line 179 of file thints.cxx.
sal_Unicode GetCharOfTextAttr | ( | const SwTextAttr & | rAttr | ) |
Definition at line 3464 of file thints.cxx.
References CH_TXTATR_BREAKWORD, CH_TXTATR_INWORD, RES_TXTATR_ANNOTATION, RES_TXTATR_FIELD, RES_TXTATR_FLYCNT, RES_TXTATR_FTN, RES_TXTATR_META, RES_TXTATR_METAFIELD, RES_TXTATR_REFMARK, RES_TXTATR_TOXMARK, and SwTextAttr::Which().
Referenced by SwTextNode::InsertHint().
|
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 |
Definition at line 134 of file thints.cxx.
Referenced by SwpHints::TryInsertNesting().
|
static |
Definition at line 154 of file thints.cxx.
References RES_TXTATR_CJK_RUBY, RES_TXTATR_INETFMT, RES_TXTATR_INPUTFIELD, RES_TXTATR_META, and RES_TXTATR_METAFIELD.
Referenced by SwpHints::TryInsertNesting().
|
static |
Definition at line 166 of file thints.cxx.
References RES_TXTATR_CJK_RUBY, RES_TXTATR_INETFMT, RES_TXTATR_INPUTFIELD, RES_TXTATR_META, and RES_TXTATR_METAFIELD.
Referenced by splitPolicy(), and SwpHints::TryInsertNesting().
|
static |
Definition at line 2925 of file thints.cxx.
References SwpHints::Count(), SwTextAttr::End(), SwpHints::Get(), SwTextAttrEnd::GetEnd(), SwTextAttr::GetStart(), i, RES_TXTATR_CHARFMT, SwTextCharFormat::SetSortNumber(), static_txtattr_cast(), and SwTextAttr::Which().
Referenced by SwpHints::TryInsertHint().
|
static |
Definition at line 256 of file thints.cxx.
References MakeTextAttrNesting().
Referenced by lcl_DoSplitNew(), and SwpHints::TryInsertNesting().
|
static |
Definition at line 269 of file thints.cxx.
References lcl_DoSplitImpl(), and TextAttrContains().
Referenced by SwpHints::TryInsertNesting().
|
static |
Definition at line 1806 of file thints.cxx.
References RES_CHRATR_CJK_POSTURE, RES_CHRATR_CJK_WEIGHT, RES_CHRATR_CTL_POSTURE, RES_CHRATR_CTL_WEIGHT, RES_CHRATR_POSTURE, RES_CHRATR_UNDERLINE, and RES_CHRATR_WEIGHT.
Referenced by SwTextNode::TryCharSetExpandToNum().
|
static |
Definition at line 1999 of file thints.cxx.
References SfxWhichIter::FirstWhich(), SfxItemSet::Get(), CharFormat::GetItemSet(), SfxItemSet::GetItemState(), SfxWhichIter::NextWhich(), SfxItemSet::Put(), RES_CHRATR_END, RES_TXTATR_AUTOFMT, RES_TXTATR_UNKNOWN_CONTAINER, and SfxPoolItem::Which().
Referenced by SwTextNode::GetParaAttr().
|
static |
Definition at line 2021 of file thints.cxx.
References SfxWhichIter::FirstWhich(), SfxItemSet::Get(), CharFormat::GetItemSet(), SfxItemSet::GetItemState(), SfxWhichIter::NextWhich(), SfxItemSet::Put(), RES_CHRATR_END, RES_TXTATR_AUTOFMT, RES_TXTATR_CHARFMT, RES_TXTATR_INETFMT, RES_TXTATR_UNKNOWN_CONTAINER, and SfxPoolItem::Which().
Referenced by SwTextNode::GetParaAttr().
|
static |
Definition at line 2073 of file thints.cxx.
References SwTextNode::AreListLevelIndentsApplicable(), SwNumRule::Get(), SwTextNode::GetActualListLevel(), SvxNumberFormat::GetFirstLineIndent(), SvxNumberFormat::GetIndentAt(), SwTextNode::GetNumRule(), SvxNumberFormat::GetPositionAndSpaceMode(), SvxNumberFormat::LABEL_ALIGNMENT, SfxItemSet::Put(), RES_LR_SPACE, SvxLRSpaceItem::SetTextFirstLineOfst(), and SvxLRSpaceItem::SetTextLeft().
Referenced by SwTextNode::GetParaAttr().
SwTextAttr* MakeRedlineTextAttr | ( | SwDoc & | rDoc, |
SfxPoolItem const & | rAttr | ||
) |
create redline dummy text hint that must not be inserted into hints array
Definition at line 984 of file thints.cxx.
References SwDoc::GetAttrPool(), SfxItemPool::Put(), RES_CHRATR_BACKGROUND, RES_CHRATR_CASEMAP, RES_CHRATR_CJK_POSTURE, RES_CHRATR_CJK_WEIGHT, RES_CHRATR_COLOR, RES_CHRATR_CROSSEDOUT, RES_CHRATR_CTL_POSTURE, RES_CHRATR_CTL_WEIGHT, RES_CHRATR_POSTURE, RES_CHRATR_UNDERLINE, RES_CHRATR_WEIGHT, and SfxPoolItem::Which().
Referenced by SwRedlineItr::Seek().
SwTextAttr* MakeTextAttr | ( | 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!
Definition at line 1014 of file thints.cxx.
References Copy, SwTextMeta::CreateTextMeta(), SwDoc::GetAttrPool(), SwFormatCharFormat::GetCharFormat(), SwDoc::GetDfltCharFormat(), SwFormatField::GetField(), SwTextAttr::GetFormatField(), SwDoc::GetMetaFieldManager(), isCHRATR(), SwDoc::IsClipBoard(), MakeTextAttr(), SfxItemPool::Put(), RES_TXTATR_ANNOTATION, RES_TXTATR_AUTOFMT, RES_TXTATR_CHARFMT, RES_TXTATR_CJK_RUBY, RES_TXTATR_FIELD, RES_TXTATR_FLYCNT, RES_TXTATR_FTN, RES_TXTATR_INETFMT, RES_TXTATR_INPUTFIELD, RES_TXTATR_META, RES_TXTATR_METAFIELD, RES_TXTATR_REFMARK, RES_TXTATR_TOXMARK, SwFormatCharFormat::SetCharFormat(), and SfxPoolItem::Which().
Referenced by SwpHints::BuildPortions(), SwTextNode::CopyText(), SwTextNode::CutImpl(), SwTextNode::impl_FormatToTextAttr(), SwTextNode::InsertItem(), MakeTextAttr(), MakeTextAttrNesting(), SwTextNode::RstTextAttr(), SwTextNode::SetAttr(), and SwTextNode::Update().
SwTextAttr* MakeTextAttr | ( | SwDoc & | rDoc, |
const SfxItemSet & | rSet, | ||
sal_Int32 | nStt, | ||
sal_Int32 | nEnd | ||
) |
Definition at line 1134 of file thints.cxx.
References IStyleAccess::AUTO_STYLE_CHAR, IStyleAccess::getAutomaticStyle(), SwDoc::GetIStyleAccess(), MakeTextAttr(), and SwFormatAutoFormat::SetStyleHandle().
|
static |
Create a new nesting text hint.
Definition at line 229 of file thints.cxx.
References SwTextAttr::GetAttr(), SwNode::GetDoc(), MakeTextAttr(), RES_TXTATR_CJK_RUBY, RES_TXTATR_INETFMT, static_txtattr_cast(), and SwTextAttr::Which().
Referenced by lcl_DoSplitImpl(), and SwpHints::TryInsertNesting().
|
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 |
Definition at line 112 of file thints.cxx.
References End, and SwTextAttr::GetStart().
Referenced by lcl_DoSplitNew().
|
static |
Definition at line 102 of file thints.cxx.
References SwTextAttr::Destroy(), SwDoc::GetAttrPool(), RES_TXTATR_META, RES_TXTATR_METAFIELD, static_txtattr_cast(), and SwTextAttr::Which().
Referenced by SwpHints::TryInsertNesting().