30 #include <section.hxx>
45 && pRedline->GetType() == RedlineType::Delete
46 && *pRedline->GetPoint() != *pRedline->GetMark());
57 return ( nIdxLHS == nIdxRHS && lhs->
GetStart() < rhs->
GetStart() ) || nIdxLHS < nIdxRHS;
85 if (pTmp->IsHideRedlines())
93 SwNodeOffset nChapterStart(pChapterStartHidden->GetIndex());
96 if( !rOutlNds.
empty() )
101 for( ; n < rOutlNds.
size(); ++n )
102 if( rOutlNds[ n ]->GetIndex() > rStt.
GetIndex() )
104 else if ( rOutlNds[ n ]->GetTextNode()->GetAttrOutlineLevel() == 1 )
106 nChapterStart = rOutlNds[ n ]->GetIndex();
109 pChapterStartHidden = rOutlNds[ n ];
113 for( ; n < rOutlNds.
size(); ++n )
114 if ( rOutlNds[ n ]->GetTextNode()->GetAttrOutlineLevel() == 1 )
116 nChapterEnd = rOutlNds[ n ]->GetIndex();
121 for ( ; n < rOutlNds.
size(); ++n)
123 if (rOutlNds[n]->GetTextNode()->GetAttrOutlineLevel() == 1
126 nChapterEndHidden = rOutlNds[n]->GetIndex();
133 size_t nFootnoteNo = 1;
134 size_t nFootnoteNoHidden = 1;
135 if (
SeekEntry( *pChapterStartHidden, &nPos ) && nPos)
139 while( nPos && pCmpNd == &((*
this)[ --nPos ]->GetTextNode()) )
147 if( rOutlNds.
empty() )
149 nFootnoteNo = nPos+1;
152 nFootnoteNoHidden = (*this)[nPos - 1]->GetFootnote().GetNumberRLHidden() + 1;
156 for( ; nPos <
size(); ++nPos )
158 pTextFootnote = (*this)[ nPos ];
160 if (nChapterEndHidden <= nNode)
168 (nChapterStart <= nNode && nNode < nChapterEnd)
173 if (nChapterStart <= nNode && nNode < nChapterEnd)
191 size_t nFootnoteNo = 1;
193 size_t nFootnoteNoHidden = 1;
194 size_t nEndNoHidden = 1;
196 for( nPos = 0; nPos <
size(); ++nPos )
198 pTextFootnote = (*this)[ nPos ];
199 if( nUpdNdIdx <= pTextFootnote->GetTextNode().GetIndex() )
205 if (!aNumArr.
ChkNumber(rIDRA, *pTextFootnote).first)
228 for( ; nPos <
size(); ++nPos )
230 pTextFootnote = (*this)[ nPos ];
234 std::pair<sal_uInt16, sal_uInt16> nSectNo = aNumArr.
ChkNumber(rIDRA, *pTextFootnote);
235 if (!nSectNo.first && (rFootnote.
IsEndNote() || !bEndNoteOnly))
273 SwDoc& rDoc =
const_cast<SwDoc&
>((*this)[ 0 ]->GetTextNode().GetDoc());
291 if (pTmp->IsHideRedlines())
299 sal_uInt16 nNoNo = 1;
300 size_t nFootnoteIdx = 0;
301 for(
size_t n = 0;
n < rOutlNds.
size(); ++
n )
303 if ( rOutlNds[
n ]->GetTextNode()->GetAttrOutlineLevel() == 1 )
306 for( ; nFootnoteIdx <
size(); ++nFootnoteIdx )
308 pTextFootnote = (*this)[ nFootnoteIdx ];
328 if( nFootnoteIdx >=
size() )
339 for (nNo = 1, nNoNo = 1; nFootnoteIdx <
size(); ++nFootnoteIdx)
342 pTextFootnote = (*this)[ nFootnoteIdx ];
362 sal_uInt16 nFootnoteNo = 1;
363 sal_uInt16 nEndnoteNo = 1;
364 sal_uInt16 nFootnoteNoHidden = 1;
365 sal_uInt16 nEndnoteNoHidden = 1;
368 pTextFootnote = (*this)[
nPos ];
372 std::pair<sal_uInt16, sal_uInt16> nSectNo = aNumArr.ChkNumber(rIDRA, *pTextFootnote);
373 if (!nSectNo.first && (rFootnote.
IsEndNote() || !bEndNoteOnly))
405 for(
auto aLayout : aAllLayouts )
406 aLayout->UpdateFootnoteNums();
420 const size_t nM = nU + ( nO - nU ) / 2;
426 return (*
this)[ nM ];
428 else if( nNdIdx < nIdx )
468 std::pair<sal_uInt16, sal_uInt16> nRet(0, 0);
470 std::vector<const SwSectionNode*>* pArr;
471 std::vector<std::pair<sal_uInt16, sal_uInt16>> *pNum;
485 for(
size_t n = pArr->size();
n; )
486 if( (*pArr)[ --
n ] == &rNd )
488 nRet.first = ++((*pNum)[
n ].first);
491 ++((*pNum)[
n ].second);
493 nRet.second = ((*pNum)[
n ].second);
499 pArr->push_back( &rNd );
502 GetFormatAttr( nWh )).GetOffset();
503 nRet.first = tmp + 1;
504 nRet.second = tmp + 1;
505 pNum->push_back( nRet );
516 ?
GetNumber(rIDRA, rTextFootnote, *pSectNd)
517 : std::pair<sal_uInt16, sal_uInt16>(0, 0);
SwSectionNode * FindSectionNode()
Search section node, in which it is.
constexpr TypedWhichId< SwFormatEndAtTextEnd > RES_END_AT_TXTEND(118)
Marks a position in the document model.
virtual const SwRootFrame * GetCurrentLayout() const =0
-""- and with own numberformat
bool IsFootnoteDeleted(IDocumentRedlineAccess const &rIDRA, SwTextFootnote const &rTextFootnote)
SwSectionFormat * GetFormat()
Dialog to specify the properties of date form field.
The root element of a Writer document layout.
const SwSection & GetSection() const
sal_Int32 GetStart() const
o3tl::sorted_vector< SwRootFrame * > GetAllLayouts()
SwNodeOffset GetIndex() const
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
const SwStartNode * StartOfSectionNode() const
sal_uInt16 m_nFootnoteOffset
SwNodeOffset GetIndex() const
vector_type::size_type size_type
Marks a node in the document model.
const SwOutlineNodes & GetOutLineNds() const
Array of all OutlineNodes.
#define SwTextFootnote_GetIndex(pFIdx)
const SwFormatFootnote & GetFootnote() const
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
virtual const SwRangeRedline * GetRedline(const SwPosition &rPos, SwRedlineTable::size_type *pFndPos) const =0
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
bool IsParaPropsNode(SwRootFrame const &rLayout, SwTextNode const &rNode)
-""- and with own number sequence
SwNode & GetEndOfExtras() const
This is the last EndNode of a special section.
constexpr TypedWhichId< SwFormatFootnoteAtTextEnd > RES_FTN_AT_TXTEND(117)
const SwFootnoteInfo & GetFootnoteInfo() const
const SwEndNoteInfo & GetEndNoteInfo() const
Base class of the Writer document model elements.