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-04 10:23:19 +0200 |
commit | a975573406553f46507dd309f02a5bf5198596fc (patch) | |
tree | 7df9d3a344203be75cace786a2740d435089a861 /xmloff | |
parent | 2a755d748aecd65d1a3d0c2685678a85472481cd (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>
(cherry picked from commit c84764e08da5e1c6202d300684baab0076d6b3ed)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99919
Reviewed-by: Michael Stahl <michael.stahl@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 d020280cb173..f6eeb70dea17 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 ); } |