diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-05-19 04:53:07 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-05-19 05:33:48 +0200 |
commit | 2ae89f59fdad8ac5a98ce02ea31cbe55a5048c43 (patch) | |
tree | 077172d63d9a9e58e65e6a7260135a3b1965e1d2 | |
parent | 158b50763962f66515062300e265839828463efa (diff) |
don't use default style as parent for OOXML cond format style, tdf#91335
Change-Id: I1388bb5ab71f6f6d174872023f085240f3bff916
-rw-r--r-- | sc/inc/stlsheet.hxx | 3 | ||||
-rw-r--r-- | sc/source/core/data/stlsheet.cxx | 5 | ||||
-rw-r--r-- | sc/source/filter/oox/stylesbuffer.cxx | 7 |
3 files changed, 13 insertions, 2 deletions
diff --git a/sc/inc/stlsheet.hxx b/sc/inc/stlsheet.hxx index cb65a01028bb..6bfcfd595e9d 100644 --- a/sc/inc/stlsheet.hxx +++ b/sc/inc/stlsheet.hxx @@ -22,6 +22,8 @@ #include <svl/style.hxx> +#include "scdllapi.h" + #define SCSTYLEBIT_STANDARD 0x0001 class ScStyleSheetPool; @@ -48,6 +50,7 @@ public: ScStyleSheet( const ScStyleSheet& rStyle ); virtual bool SetParent ( const OUString& rParentName ) SAL_OVERRIDE; + SC_DLLPUBLIC void ResetParent(); virtual SfxItemSet& GetItemSet () SAL_OVERRIDE; virtual bool IsUsed () const SAL_OVERRIDE; virtual bool HasFollowSupport () const SAL_OVERRIDE; diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx index 5d278ff1b8f4..be060c284ad6 100644 --- a/sc/source/core/data/stlsheet.cxx +++ b/sc/source/core/data/stlsheet.cxx @@ -121,6 +121,11 @@ bool ScStyleSheet::SetParent( const OUString& rParentName ) return bResult; } +void ScStyleSheet::ResetParent() +{ + GetItemSet().SetParent(NULL); +} + SfxItemSet& ScStyleSheet::GetItemSet() { if ( !pSet ) diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx index 5e73b6856359..598ea497e311 100644 --- a/sc/source/filter/oox/stylesbuffer.cxx +++ b/sc/source/filter/oox/stylesbuffer.cxx @@ -3117,9 +3117,12 @@ OUString StylesBuffer::createDxfStyle( sal_Int32 nDxfId ) const // Create a cell style. This may overwrite an existing style if // one with the same name exists. + ScStyleSheet& rStyleSheet = ScfTools::MakeCellStyleSheet( + *getScDocument().GetStyleSheetPool(), rStyleName, true); + + rStyleSheet.ResetParent(); SfxItemSet& rStyleItemSet = - ScfTools::MakeCellStyleSheet( - *getScDocument().GetStyleSheetPool(), rStyleName, true).GetItemSet(); + rStyleSheet.GetItemSet(); pDxf->fillToItemSet(rStyleItemSet); } |