diff options
author | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-07-20 02:29:58 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-08-03 00:08:18 +0200 |
commit | c84764e08da5e1c6202d300684baab0076d6b3ed (patch) | |
tree | cc42e3c3cd406f9ee294a57d4b02c1325bb9c746 /xmloff | |
parent | 7956d73cf531a0630f17d746940e91eb76959008 (diff) |
tdf#134971 Don't overwrite default styles when inserting doc
Seems code never really bothered not to touch default style
info, when inserting from file. Original commit is:
Author: Sascha Ballach <sab@openoffice.org>
Date: Wed Feb 28 08:24:41 2001 +0000
import of default styles added
Change-Id: Ibb639a585bedabdcc5987900ecca1e04f4bb593a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99015
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/style/xmlstyle.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx index cc11a46dfe13..b87939436db1 100644 --- a/xmloff/source/style/xmlstyle.cxx +++ b/xmloff/source/style/xmlstyle.cxx @@ -839,7 +839,9 @@ void SvXMLStylesContext::CopyStylesToDoc( bool bOverwrite, continue; if (pStyle->IsDefaultStyle()) - pStyle->SetDefaults(); + { + if (bOverwrite) pStyle->SetDefaults(); + } else if( InsertStyleFamily( pStyle->GetFamily() ) ) pStyle->CreateAndInsert( bOverwrite ); } |