summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-02-22 16:09:53 +0000
committerThorsten Behrens <thorsten.behrens@allotropia.de>2022-09-08 12:16:39 +0200
commit9bb297fc7a96a3fdccf2c10511ba758d244293fd (patch)
tree9325babd9464e69c7a1317158d180db9cfd54032
parent7ac39cd1e8b9ca956e91806eaa50e07024abd668 (diff)
keep paragraph's that failed to load until import is complete
LIBREOFFICE-509JU93T Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130326 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 32e8d3e45698a3cc09f66460b460db1d10ac50b5) Change-Id: I526edb182fed4fa023cce58e78a650a7c2046ed3 Conflicts: hwpfilter/source/hwpfile.cxx hwpfilter/source/hwpfile.h
-rw-r--r--hwpfilter/source/hwpfile.cxx1
-rw-r--r--hwpfilter/source/hwpfile.h4
2 files changed, 5 insertions, 0 deletions
diff --git a/hwpfilter/source/hwpfile.cxx b/hwpfilter/source/hwpfile.cxx
index 0aa1e9541af0..69386d7a846a 100644
--- a/hwpfilter/source/hwpfile.cxx
+++ b/hwpfilter/source/hwpfile.cxx
@@ -273,6 +273,7 @@ bool HWPFile::ReadParaList(std::list < HWPPara* > &aplist, unsigned char flag)
aplist.push_back(spNode.release());
spNode.reset( new HWPPara );
}
+ pfailedlist.push_back(std::move(spNode));
return true;
}
diff --git a/hwpfilter/source/hwpfile.h b/hwpfilter/source/hwpfile.h
index c98f90c82fe2..6336e36d97c3 100644
--- a/hwpfilter/source/hwpfile.h
+++ b/hwpfilter/source/hwpfile.h
@@ -276,6 +276,10 @@ class DLLEXPORT HWPFile
std::list<ColumnInfo*> columnlist;
// paragraph linked list
std::list<HWPPara*> plist;
+ // keep paragraph's that failed to load until
+ // import is complete to avoid dangling references
+ // elsewhere
+ std::vector<std::unique_ptr<HWPPara>> pfailedlist;
// floating box linked list
std::list<FBox*> blist;
// embedded picture list(tag datas)