Kaydet (Commit) 2ae89f59 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

don't use default style as parent for OOXML cond format style, tdf#91335

Change-Id: I1388bb5ab71f6f6d174872023f085240f3bff916
üst 158b5076
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#include <svl/style.hxx> #include <svl/style.hxx>
#include "scdllapi.h"
#define SCSTYLEBIT_STANDARD 0x0001 #define SCSTYLEBIT_STANDARD 0x0001
class ScStyleSheetPool; class ScStyleSheetPool;
...@@ -48,6 +50,7 @@ public: ...@@ -48,6 +50,7 @@ public:
ScStyleSheet( const ScStyleSheet& rStyle ); ScStyleSheet( const ScStyleSheet& rStyle );
virtual bool SetParent ( const OUString& rParentName ) SAL_OVERRIDE; virtual bool SetParent ( const OUString& rParentName ) SAL_OVERRIDE;
SC_DLLPUBLIC void ResetParent();
virtual SfxItemSet& GetItemSet () SAL_OVERRIDE; virtual SfxItemSet& GetItemSet () SAL_OVERRIDE;
virtual bool IsUsed () const SAL_OVERRIDE; virtual bool IsUsed () const SAL_OVERRIDE;
virtual bool HasFollowSupport () const SAL_OVERRIDE; virtual bool HasFollowSupport () const SAL_OVERRIDE;
......
...@@ -121,6 +121,11 @@ bool ScStyleSheet::SetParent( const OUString& rParentName ) ...@@ -121,6 +121,11 @@ bool ScStyleSheet::SetParent( const OUString& rParentName )
return bResult; return bResult;
} }
void ScStyleSheet::ResetParent()
{
GetItemSet().SetParent(NULL);
}
SfxItemSet& ScStyleSheet::GetItemSet() SfxItemSet& ScStyleSheet::GetItemSet()
{ {
if ( !pSet ) if ( !pSet )
......
...@@ -3117,9 +3117,12 @@ OUString StylesBuffer::createDxfStyle( sal_Int32 nDxfId ) const ...@@ -3117,9 +3117,12 @@ OUString StylesBuffer::createDxfStyle( sal_Int32 nDxfId ) const
// Create a cell style. This may overwrite an existing style if // Create a cell style. This may overwrite an existing style if
// one with the same name exists. // one with the same name exists.
ScStyleSheet& rStyleSheet = ScfTools::MakeCellStyleSheet(
*getScDocument().GetStyleSheetPool(), rStyleName, true);
rStyleSheet.ResetParent();
SfxItemSet& rStyleItemSet = SfxItemSet& rStyleItemSet =
ScfTools::MakeCellStyleSheet( rStyleSheet.GetItemSet();
*getScDocument().GetStyleSheetPool(), rStyleName, true).GetItemSet();
pDxf->fillToItemSet(rStyleItemSet); pDxf->fillToItemSet(rStyleItemSet);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment