[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
Georgy Litvinov (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jan 4 20:52:18 UTC 2021
sw/source/filter/xml/xmlimp.cxx | 10 ++++++++++
1 file changed, 10 insertions(+)
New commits:
commit abc2a0563d33726c10c6cc10c1b879d635453b61
Author: Georgy Litvinov <git at litvinovg.pro>
AuthorDate: Fri Dec 25 16:22:37 2020 +0100
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Mon Jan 4 21:51:44 2021 +0100
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 at collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
(cherry picked from commit 83ff5b784e910f06c9d8384ac73a1c0bda0551d5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108590
Reviewed-by: Georgy Litvinov <git at litvinovg.pro>
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
Tested-by: Jenkins
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 0a7934c8b303..bfd7ef37d004 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -824,6 +824,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();
More information about the Libreoffice-commits
mailing list