summaryrefslogtreecommitdiff
path: root/sc/source/ui/unoobj/styleuno.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/unoobj/styleuno.cxx')
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 1ceaa424ecd6..50aecbe7f2e3 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -68,6 +68,7 @@
#include "docsh.hxx"
#include "attrib.hxx"
#include "stlpool.hxx"
+#include "docpool.hxx"
#include "unoguard.hxx"
#include "miscuno.hxx"
#include "convuno.hxx"
@@ -830,6 +831,9 @@ void SAL_CALL ScStyleFamilyObj::insertByName( const rtl::OUString& aName, const
{
(void)pStylePool->Make( aNameStr, eFamily, SFXSTYLEBIT_USERDEF );
+ if ( eFamily == SFX_STYLE_FAMILY_PARA && !pDoc->IsImportingXML() )
+ pDoc->GetPool()->CellStyleCreated( aNameStr );
+
pStyleObj->InitDoc( pDocShell, aNameStr ); // Objekt kann benutzt werden
pDocShell->SetDocumentModified(); // verwendet wird der neue Style noch nicht
@@ -1287,6 +1291,10 @@ void SAL_CALL ScStyleObj::setName( const rtl::OUString& aNewName )
{
aStyleName = aString; //! notify other objects for this style?
+ ScDocument* pDoc = pDocShell->GetDocument();
+ if ( eFamily == SFX_STYLE_FAMILY_PARA && !pDoc->IsImportingXML() )
+ pDoc->GetPool()->CellStyleCreated( aString );
+
// Zellvorlagen = 2, Seitenvorlagen = 4
UINT16 nId = ( eFamily == SFX_STYLE_FAMILY_PARA ) ?
SID_STYLE_FAMILY2 : SID_STYLE_FAMILY4;