26#include <osl/diagnose.h>
29#include <libxml/xmlwriter.h>
33, mnNumberingStartValue( -1 )
34, mbParaIsNumberingRestart( false )
86 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"Paragraph"));
87 (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"nDepth"),
"%" SAL_PRIdINT32,
static_cast<sal_Int32
>(
nDepth));
88 (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"mnNumberingStartValue"),
"%" SAL_PRIdINT32,
static_cast<sal_Int32
>(
mnNumberingStartValue));
89 (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"mbParaIsNumberingRestart"),
"%" SAL_PRIdINT32,
static_cast<sal_Int32
>(
mbParaIsNumberingRestart));
90 (void)xmlTextWriterEndElement(pWriter);
107 "editeng",
"ParagraphList::Insert - bad insert position " << nAbsPos);
111 Append( std::move(pPara) );
120 SAL_WARN(
"editeng",
"ParagraphList::Remove - out of bounds " << nPara);
131 if ( (( nDest < nStart ) || ( nDest >= ( nStart + _nCount ) )) && nStart >= 0 && nDest >= 0 && _nCount >= 0 )
133 std::vector<std::unique_ptr<Paragraph>> aParas;
134 auto iterBeg =
maEntries.begin() + nStart;
135 auto iterEnd = iterBeg + _nCount;
137 for (
auto it = iterBeg; it != iterEnd; ++it)
138 aParas.push_back(std::move(*it));
142 if ( nDest > nStart )
145 for (
auto &
i : aParas)
153 OSL_FAIL(
"MoveParagraphs: Invalid Parameters" );
180 sal_Int32 nChildCount = 0;
208 for ( sal_Int32
n = 1;
n <= nChildCount;
n++ )
224 for ( sal_Int32
n = 1;
n <= nChildCount;
n++ )
240 if (entry.get() == pParent)
250 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"ParagraphList"));
251 for (
auto const & pParagraph :
maEntries)
252 pParagraph->dumpAsXml(pWriter);
253 (void)xmlTextWriterEndElement(pWriter);
bool operator==(const ParagraphData &rCandidate) const
sal_Int16 mnNumberingStartValue
bool mbParaIsNumberingRestart
Paragraph * GetParagraph(sal_Int32 nPos) const
void Remove(sal_Int32 nPara)
Link< Paragraph &, void > aVisibleStateChangedHdl
void Insert(std::unique_ptr< Paragraph > pPara, sal_Int32 nAbsPos)
std::vector< std::unique_ptr< Paragraph > > maEntries
void MoveParagraphs(sal_Int32 nStart, sal_Int32 nDest, sal_Int32 nCount)
void dumpAsXml(xmlTextWriterPtr pWriter) const
bool HasChildren(Paragraph const *pParagraph) const
bool HasVisibleChildren(Paragraph const *pParagraph) const
sal_Int32 GetChildCount(Paragraph const *pParagraph) const
void Append(std::unique_ptr< Paragraph > pPara)
void Expand(Paragraph const *pParent)
bool HasHiddenChildren(Paragraph const *pParagraph) const
void Collapse(Paragraph const *pParent)
sal_Int32 GetAbsPos(Paragraph const *pParent) const
Paragraph * GetParent(Paragraph const *pParagraph) const
sal_Int16 GetDepth() const
void SetNumberingStartValue(sal_Int16 nNumberingStartValue)
void dumpAsXml(xmlTextWriterPtr pWriter) const
void SetParaIsNumberingRestart(bool bParaIsNumberingRestart)
#define DBG_ASSERT(sCon, aError)
#define EE_PARA_NOT_FOUND
#define EE_PARA_MAX_COUNT
struct _xmlTextWriter * xmlTextWriterPtr
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)