summaryrefslogtreecommitdiffstats
path: root/hwpfilter/source/hwpfile.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'hwpfilter/source/hwpfile.cxx')
-rw-r--r--hwpfilter/source/hwpfile.cxx38
1 files changed, 25 insertions, 13 deletions
diff --git a/hwpfilter/source/hwpfile.cxx b/hwpfilter/source/hwpfile.cxx
index 5f32a38c0633..c186ad8609a4 100644
--- a/hwpfilter/source/hwpfile.cxx
+++ b/hwpfilter/source/hwpfile.cxx
@@ -139,6 +139,16 @@ bool HWPFile::Read2b(unsigned short &out)
return hiodev && hiodev->read2b(out);
}
+bool HWPFile::Read2b(char16_t &out)
+{
+ unsigned short n;
+ auto const ok = Read2b(n);
+ if (ok) {
+ out = n;
+ }
+ return ok;
+}
+
bool HWPFile::Read4b(unsigned int &out)
{
return hiodev && hiodev->read4b(out);
@@ -238,6 +248,7 @@ void HWPFile::ReadParaList(std::vector < HWPPara* > &aplist)
aplist.push_back(spNode.release());
spNode.reset( new HWPPara );
}
+ move_to_failed(std::move(spNode));
}
void HWPFile::ReadParaList(std::vector< std::unique_ptr<HWPPara> > &aplist, unsigned char flag)
@@ -271,6 +282,12 @@ void HWPFile::ReadParaList(std::vector< std::unique_ptr<HWPPara> > &aplist, unsi
aplist.push_back(std::move(spNode));
spNode.reset( new HWPPara );
}
+ move_to_failed(std::move(spNode));
+}
+
+void HWPFile::move_to_failed(std::unique_ptr<HWPPara> xPara)
+{
+ pfailedlist.push_back(std::move(xPara));
}
void HWPFile::TagsRead()
@@ -450,11 +467,6 @@ EmPicture *HWPFile::GetEmPictureByName(char * name)
return nullptr;
}
-void HWPFile::AddBox(FBox * box)
-{
- blist.push_back(box);
-}
-
ParaShape *HWPFile::getParaShape(int index)
{
if (index < 0 || o3tl::make_unsigned(index) >= pslist.size())
@@ -554,13 +566,13 @@ void HWPFile::AddCharShape(std::shared_ptr<CharShape> const & cshape)
void HWPFile::AddColumnInfo()
{
- columnlist.emplace_back(new ColumnInfo(m_nCurrentPage));
+ columnlist.emplace_back(new HWPColumnInfo(m_nCurrentPage));
setMaxSettedPage();
}
void HWPFile::SetColumnDef(const std::shared_ptr<ColumnDef>& rColdef)
{
- ColumnInfo *cinfo = columnlist.back().get();
+ HWPColumnInfo *cinfo = columnlist.back().get();
if( cinfo->bIsSet )
return;
cinfo->xColdef = rColdef;
@@ -601,9 +613,9 @@ int HWPFile::compareCharShape(CharShape const *shape)
CharShape *cshape = getCharShape(i);
if( shape->size == cshape->size &&
- shape->font[0] == cshape->font[0] &&
- shape->ratio[0] == cshape->ratio[0] &&
- shape->space[0] == cshape->space[0] &&
+ shape->font == cshape->font &&
+ shape->ratio == cshape->ratio &&
+ shape->space == cshape->space &&
shape->color[1] == cshape->color[1] &&
shape->color[0] == cshape->color[0] &&
shape->shade == cshape->shade &&
@@ -637,9 +649,9 @@ int HWPFile::compareParaShape(const ParaShape* shape)
shape->pagebreak == pshape->pagebreak)
{
if (shape->cshape->size == pshape->cshape->size &&
- shape->cshape->font[0] == pshape->cshape->font[0] &&
- shape->cshape->ratio[0] == pshape->cshape->ratio[0] &&
- shape->cshape->space[0] == pshape->cshape->space[0] &&
+ shape->cshape->font == pshape->cshape->font &&
+ shape->cshape->ratio == pshape->cshape->ratio &&
+ shape->cshape->space == pshape->cshape->space &&
shape->cshape->color[1] == pshape->cshape->color[1] &&
shape->cshape->color[0] == pshape->cshape->color[0] &&
shape->cshape->shade == pshape->cshape->shade &&