sw/source/filter/html/swhtml.cxx | 10 ++-------- sw/source/filter/ww8/ww8par.cxx | 9 ++------- 2 files changed, 4 insertions(+), 15 deletions(-)
New commits: commit a820979e22e882f7005c326c8597c0647f4fcf90 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jan 2 16:13:15 2018 +0000 always going to be a textnode Change-Id: I10167618b66ad7662b001333244bc8188b71c783 Reviewed-on: https://gerrit.libreoffice.org/47270 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index d6ffd1928348..e8d3b316aaab 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -5544,14 +5544,8 @@ bool TestImportHTML(SvStream &rStream) xDocSh->DoInitNew(); SwDoc *pD = static_cast<SwDocShell*>((&xDocSh))->GetDoc(); - SwNodeIndex aIdx( - *pD->GetNodes().GetEndOfContent().StartOfSectionNode(), 1); - if( !aIdx.GetNode().IsTextNode() ) - { - pD->GetNodes().GoNext( &aIdx ); - } - SwPaM aPaM( aIdx ); - aPaM.GetPoint()->nContent.Assign(aIdx.GetNode().GetContentNode(), 0); + SwNodeIndex aIdx(pD->GetNodes().GetEndOfContent(), -1); + SwPaM aPaM(aIdx); pD->SetInReading(true); bool bRet = false; try diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 1a35d257e596..bf508642f9b8 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -6233,13 +6233,8 @@ bool TestImportDOC(SvStream &rStream, const OUString &rFltName) xDocSh->DoInitNew(); SwDoc *pD = static_cast<SwDocShell*>((&xDocSh))->GetDoc(); - SwNodeIndex aIdx( - *pD->GetNodes().GetEndOfContent().StartOfSectionNode(), 1); - if( !aIdx.GetNode().IsTextNode() ) - { - pD->GetNodes().GoNext( &aIdx ); - } - SwPaM aPaM( aIdx ); + SwNodeIndex aIdx(pD->GetNodes().GetEndOfContent(), -1); + SwPaM aPaM(aIdx); aPaM.GetPoint()->nContent.Assign(aIdx.GetNode().GetContentNode(), 0); pD->SetInReading(true); bool bRet = xReader->Read(*pD, OUString(), aPaM, OUString()) == ERRCODE_NONE;
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits