diff options
author | Georgy Litvinov <git@litvinovg.pro> | 2020-12-25 16:22:37 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-12-29 19:17:49 +0100 |
commit | 83ff5b784e910f06c9d8384ac73a1c0bda0551d5 (patch) | |
tree | a98327338f0db4a0f514757847cd371f23a00cbc /sw | |
parent | 388c0893a2defa4296fbad31c2add980079b4fee (diff) |
Missing last para style when inserting text from odt file tdf#138879
Change-Id: Ief235e98f3de02350b6403a1ea8ecf6361571789
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108285
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/xml/xmlimp.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 9e06e6e098e8..956582987373 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -768,6 +768,16 @@ void SwXMLImport::endDocument() if( pCurrNd->CanJoinNext( &pPos->nNode )) { SwTextNode* pNextNd = pPos->nNode.GetNode().GetTextNode(); + + SwNode *pLastPar = pDoc->GetNodes()[nNodeIdx -2]; + if ( !pLastPar->IsTextNode() ) { + pLastPar = pDoc->GetNodes()[nNodeIdx -1]; + } + if ( pLastPar->IsTextNode() ) + { + pNextNd->ChgFormatColl(pLastPar->GetTextNode()->GetTextColl()); + } + pPos->nContent.Assign( pNextNd, 0 ); pPaM->SetMark(); pPaM->DeleteMark(); pNextNd->JoinPrev(); |