diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-02-27 21:17:52 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-02-28 09:47:52 +0100 |
commit | a74a4236e4f4cc957123a9417c7da99b2699b242 (patch) | |
tree | f0c0c100bb40a7ab1a891961a3dbd2fe61f9342b /hwpfilter/source/hwpfile.cxx | |
parent | 48f18fb66300cbdafd5b03b683e72aecaa0a2e94 (diff) |
ofz#44991 keep paragraph's that failed to load until import is complete
to avoid dangling references to them
Change-Id: Ic8710f63a8cf6a6a665348c7c84bf0b43f0e2c83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130612
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'hwpfilter/source/hwpfile.cxx')
-rw-r--r-- | hwpfilter/source/hwpfile.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/hwpfilter/source/hwpfile.cxx b/hwpfilter/source/hwpfile.cxx index f9d74e896d0d..58d6c4849d91 100644 --- a/hwpfilter/source/hwpfile.cxx +++ b/hwpfilter/source/hwpfile.cxx @@ -238,7 +238,7 @@ void HWPFile::ReadParaList(std::vector < HWPPara* > &aplist) aplist.push_back(spNode.release()); spNode.reset( new HWPPara ); } - pfailedlist.push_back(std::move(spNode)); + move_to_failed(std::move(spNode)); } void HWPFile::ReadParaList(std::vector< std::unique_ptr<HWPPara> > &aplist, unsigned char flag) @@ -272,7 +272,12 @@ void HWPFile::ReadParaList(std::vector< std::unique_ptr<HWPPara> > &aplist, unsi aplist.push_back(std::move(spNode)); spNode.reset( new HWPPara ); } - pfailedlist.push_back(std::move(spNode)); + 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() |