LibreOffice Module sw (master) 1
|
#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>
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 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 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) |
#define CHECK Check(true); |
Definition at line 84 of file thints.cxx.
#define CHECK_NOTMERGED Check(false); |
Definition at line 85 of file thints.cxx.
typedef std::vector<SwTextAttrNesting *> NestList_t |
Definition at line 263 of file thints.cxx.
sal_Unicode GetCharOfTextAttr | ( | const SwTextAttr & | rAttr | ) |
Definition at line 3539 of file thints.cxx.
References CH_TXTATR_BREAKWORD, CH_TXTATR_INWORD, CH_TXTATR_NEWLINE, RES_TXTATR_ANNOTATION(), RES_TXTATR_CONTENTCONTROL(), RES_TXTATR_FIELD(), RES_TXTATR_FLYCNT(), RES_TXTATR_FTN(), RES_TXTATR_LINEBREAK(), 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 152 of file thints.cxx.
Referenced by SwpHints::TryInsertNesting().
|
static |
Definition at line 142 of file thints.cxx.
Referenced by SwpHints::TryInsertNesting().
|
static |
Definition at line 162 of file thints.cxx.
References RES_TXTATR_CJK_RUBY(), RES_TXTATR_CONTENTCONTROL(), RES_TXTATR_INETFMT(), RES_TXTATR_INPUTFIELD(), RES_TXTATR_META(), and RES_TXTATR_METAFIELD().
Referenced by SwpHints::TryInsertNesting().
|
static |
Definition at line 175 of file thints.cxx.
References RES_TXTATR_CJK_RUBY(), RES_TXTATR_CONTENTCONTROL(), RES_TXTATR_INETFMT(), RES_TXTATR_INPUTFIELD(), RES_TXTATR_META(), and RES_TXTATR_METAFIELD().
Referenced by splitPolicy(), and SwpHints::TryInsertNesting().
|
static |
Definition at line 3000 of file thints.cxx.
References SwpHints::Count(), SwTextAttr::End(), SwpHints::Get(), SwTextAttrEnd::GetEnd(), SwTextAttr::GetStart(), i, RES_TXTATR_CHARFMT(), SwTextCharFormat::SetSortNumber(), and SwTextAttr::Which().
Referenced by SwpHints::TryInsertHint().
|
static |
Definition at line 2890 of file thints.cxx.
References SwTextAttr::GetAutoFormat(), SfxItemIter::GetCurItem(), SwFormatAutoFormat::GetStyleHandle(), i, IsInvalidItem(), SfxItemIter::NextItem(), RES_CHRATR_RSID(), RES_TXTATR_AUTOFMT(), and SwTextAttr::Which().
Referenced by SwpHints::MergePortions().
|
static |
Definition at line 266 of file thints.cxx.
References MakeTextAttrNesting().
Referenced by lcl_DoSplitNew(), and SwpHints::TryInsertNesting().
|
static |
Definition at line 279 of file thints.cxx.
References lcl_DoSplitImpl().
Referenced by SwpHints::TryInsertNesting().
|
static |
Definition at line 2036 of file thints.cxx.
References SfxWhichIter::FirstWhich(), CharFormat::GetItemSet(), SfxWhichIter::GetItemState(), SfxWhichIter::NextWhich(), SfxItemSet::Put(), RES_CHRATR_END(), RES_TXTATR_AUTOFMT(), RES_TXTATR_UNKNOWN_CONTAINER(), rSet, and SfxPoolItem::Which().
Referenced by SwTextNode::GetParaAttr().
|
static |
Definition at line 2059 of file thints.cxx.
References SfxWhichIter::FirstWhich(), CharFormat::GetItemSet(), SfxWhichIter::GetItemState(), SfxWhichIter::NextWhich(), SfxItemSet::Put(), RES_CHRATR_END(), RES_TXTATR_AUTOFMT(), RES_TXTATR_CHARFMT(), RES_TXTATR_INETFMT(), RES_TXTATR_UNKNOWN_CONTAINER(), rSet, and SfxPoolItem::Which().
Referenced by SwTextNode::GetParaAttr().
|
static |
Definition at line 2112 of file thints.cxx.
References SwTextNode::AreListLevelIndentsApplicable(), SwNumRule::Get(), SwTextNode::GetActualListLevel(), SvxNumberFormat::GetFirstLineIndent(), SvxNumberFormat::GetIndentAt(), SwTextNode::GetNumRule(), SvxNumberFormat::GetPositionAndSpaceMode(), SvxNumberFormat::LABEL_ALIGNMENT, sw::LeftMargin, sw::No, SfxItemSet::Put(), RES_MARGIN_FIRSTLINE(), RES_MARGIN_TEXTLEFT(), and rSet.
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 1000 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, |
const SfxItemSet & | rSet, | ||
sal_Int32 | nStt, | ||
sal_Int32 | nEnd | ||
) |
Definition at line 1174 of file thints.cxx.
References IStyleAccess::AUTO_STYLE_CHAR, IStyleAccess::getAutomaticStyle(), SwDoc::GetIStyleAccess(), MakeTextAttr(), rSet, and SwFormatAutoFormat::SetStyleHandle().
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 1030 of file thints.cxx.
References Copy, SwTextContentControl::CreateTextContentControl(), SwTextMeta::CreateTextMeta(), SwDoc::GetAttrPool(), SwFormatCharFormat::GetCharFormat(), SwDoc::GetDfltCharFormat(), SwTOXType::GetDoc(), SwFormatField::GetField(), SwTextAttr::GetFormatField(), SwDoc::GetMetaFieldManager(), SwTextFootnote::GetSeqRefNo(), SwFormatAutoFormat::GetStyleHandle(), SwHistorySetTOXMark::GetSwTOXType(), SwFormatFootnote::GetTextFootnote(), SwTOXMark::GetTOXType(), SwTOXType::GetType(), SwTOXType::GetTypeName(), isCHRATR(), SwDoc::IsClipBoard(), MakeTextAttr(), SfxItemSet::Put(), SfxItemPool::Put(), SwTOXMark::RegisterToTOXType(), RES_TXTATR_ANNOTATION(), RES_TXTATR_AUTOFMT(), RES_TXTATR_CHARFMT(), RES_TXTATR_CJK_RUBY(), RES_TXTATR_CONTENTCONTROL(), RES_TXTATR_FIELD(), RES_TXTATR_FLYCNT(), RES_TXTATR_FTN(), RES_TXTATR_INETFMT(), RES_TXTATR_INPUTFIELD(), RES_TXTATR_LINEBREAK(), RES_TXTATR_META(), RES_TXTATR_METAFIELD(), RES_TXTATR_REFMARK(), RES_TXTATR_TOXMARK(), SwFormatCharFormat::SetCharFormat(), SwPostItField::SetName(), 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().
|
static |
Create a new nesting text hint.
Definition at line 239 of file thints.cxx.
References SwTextAttr::GetAttr(), SwNode::GetDoc(), MakeTextAttr(), RES_TXTATR_CJK_RUBY(), RES_TXTATR_INETFMT(), 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 198 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 120 of file thints.cxx.
References SwTextAttr::End(), SwTextAttr::GetStart(), and nPos.
|
static |
Definition at line 106 of file thints.cxx.
References SwTextAttr::Destroy(), SwDoc::GetAttrPool(), RES_TXTATR_CONTENTCONTROL(), RES_TXTATR_META(), RES_TXTATR_METAFIELD(), and SwTextAttr::Which().
Referenced by SwpHints::TryInsertNesting().