summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorSerge Krot <Serge.Krot@cib.de>2020-10-08 09:01:33 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2020-10-14 22:59:35 +0200
commit92c05bd1f8ef695a56718c4b54babbe757ab9b89 (patch)
treeb90d242984e59cd7232902a21f941c9a533e0153 /sw/source
parent3ee77ed55e9d1da8d0746e8c06ecf82ed429521e (diff)
tdf#132289 missing styles when inserting file with list
Change-Id: I444997a6cc55cfe287f4c610f538f2f54803646c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104085 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104319 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx4
-rw-r--r--sw/source/filter/xml/xmlimp.cxx3
2 files changed, 6 insertions, 1 deletions
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index f53c6977ef6f..eb77942b6fe7 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -2451,11 +2451,13 @@ void SwTextNode::CutImpl( SwTextNode * const pDest, const SwIndex & rDestStart,
do
{
// check current item
- sal_uInt16 nWhich = IsInvalidItem( pItem )
+ const sal_uInt16 nWhich = IsInvalidItem( pItem )
? pDest->GetpSwAttrSet()->GetWhichByPos( aIter.GetCurPos() )
: pItem->Which();
if( RES_FRMATR_STYLE_NAME != nWhich &&
RES_FRMATR_CONDITIONAL_STYLE_NAME != nWhich &&
+ RES_PAGEDESC != nWhich &&
+ RES_BREAK != nWhich &&
SfxItemState::SET == pDest->GetpSwAttrSet()->GetItemState( nWhich, false ) )
{
// check if parent value (original value in style) has the same value as in [pItem]
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 75766a7f8a64..08cc729a019d 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -811,7 +811,10 @@ void SwXMLImport::endDocument()
if (!pTextNode->GetText().isEmpty())
pDelNd->FormatToTextAttr( pTextNode );
else
+ {
+ pTextNode->ResetAttr(RES_CHRATR_BEGIN, RES_CHRATR_END);
pTextNode->ChgFormatColl( pDelNd->GetTextColl() );
+ }
pTextNode->JoinNext();
}
}