Files
core/HwpFile/HwpDoc/Paragraph/CtrlNote.cpp
2025-01-05 23:13:24 +03:00

40 lines
773 B
C++

#include "CtrlNote.h"
namespace HWP
{
CCtrlNote::CCtrlNote()
{}
CCtrlNote::CCtrlNote(const HWP_STRING& sCtrlID)
: CCtrl(sCtrlID)
{}
CCtrlNote::CCtrlNote(const HWP_STRING& sCtrlID, int nSize, CHWPStream& oBuffer, int nOff, int nVersion)
: CCtrl(sCtrlID)
{
oBuffer.Skip(8);
m_bFullFilled = true;
m_nSize = 8;
}
int CCtrlNote::GetSize()
{
return m_nSize;
}
std::vector<const CHWPPargraph*> CCtrlNote::GetParagraphs() const
{
std::vector<const CHWPPargraph*> arParagraphs(m_arParas.size());
for (unsigned int unIndex = 0; unIndex < m_arParas.size(); ++unIndex)
arParagraphs[unIndex] = dynamic_cast<const CHWPPargraph*>(m_arParas[unIndex]);
return arParagraphs;
}
void CCtrlNote::AddParagraph(CHWPPargraph* pParagraph)
{
m_arParas.push_back(pParagraph);
}
}