summaryrefslogtreecommitdiff
path: root/sd/source/ui/dlg/unchss.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2003-03-27 09:58:12 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2003-03-27 09:58:12 +0000
commit2c32696a04bc195c8ce61a0df6dcafb8c0c49fe0 (patch)
tree20f65f4b4d1a3a1c7c73f694210b3a07b6bea496 /sd/source/ui/dlg/unchss.cxx
parent534bd7f86535dc81073d673d9bc185bb34520a55 (diff)
MWS_SRX644: migrate branch mws_srx644 -> HEAD
Diffstat (limited to 'sd/source/ui/dlg/unchss.cxx')
-rw-r--r--sd/source/ui/dlg/unchss.cxx24
1 files changed, 18 insertions, 6 deletions
diff --git a/sd/source/ui/dlg/unchss.cxx b/sd/source/ui/dlg/unchss.cxx
index e6ad479a1960..ac15dfe93c53 100644
--- a/sd/source/ui/dlg/unchss.cxx
+++ b/sd/source/ui/dlg/unchss.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unchss.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: dl $ $Date: 2001-09-27 15:01:34 $
+ * last change: $Author: hr $ $Date: 2003-03-27 10:57:45 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -70,6 +70,9 @@
#ifndef _SFXSMPLHINT_HXX //autogen
#include <svtools/smplhint.hxx>
#endif
+#ifndef _SVDOBJ_HXX
+#include <svx/svdobj.hxx>
+#endif
#include "unchss.hxx"
@@ -101,8 +104,11 @@ StyleSheetUndoAction::StyleSheetUndoAction(SdDrawDocument* pTheDoc,
// ItemSets anlegen; Vorsicht, das neue koennte aus einem anderen Pool
// stammen, also mitsamt seinen Items clonen
- pNewSet = pTheNewItemSet->Clone(TRUE, &(pTheDoc->GetPool()));
- pOldSet = new SfxItemSet(pStyleSheet->GetItemSet());
+ pNewSet = new SfxItemSet(*(SfxItemPool*)SdrObject::GetGlobalDrawObjectItemPool(), pTheNewItemSet->GetRanges());
+ pTheDoc->MigrateItemSet( pTheNewItemSet, pNewSet, pTheDoc );
+
+ pOldSet = new SfxItemSet(*(SfxItemPool*)SdrObject::GetGlobalDrawObjectItemPool(),pStyleSheet->GetItemSet().GetRanges());
+ pTheDoc->MigrateItemSet( &pStyleSheet->GetItemSet(), pOldSet, pTheDoc );
aComment = String(SdResId(STR_UNDO_CHANGE_PRES_OBJECT));
String aName(pStyleSheet->GetName());
@@ -128,7 +134,10 @@ StyleSheetUndoAction::StyleSheetUndoAction(SdDrawDocument* pTheDoc,
void StyleSheetUndoAction::Undo()
{
- pStyleSheet->GetItemSet().Set(*pOldSet);
+ SfxItemSet aNewSet( pDoc->GetItemPool(), pOldSet->GetRanges() );
+ pDoc->MigrateItemSet( pOldSet, &aNewSet, pDoc );
+
+ pStyleSheet->GetItemSet().Set(aNewSet);
if( pStyleSheet->GetFamily() == SFX_STYLE_FAMILY_PSEUDO )
( (SdStyleSheet*)pStyleSheet )->GetRealStyleSheet()->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
else
@@ -143,7 +152,10 @@ void StyleSheetUndoAction::Undo()
void StyleSheetUndoAction::Redo()
{
- pStyleSheet->GetItemSet().Set(*pNewSet);
+ SfxItemSet aNewSet( pDoc->GetItemPool(), pOldSet->GetRanges() );
+ pDoc->MigrateItemSet( pNewSet, &aNewSet, pDoc );
+
+ pStyleSheet->GetItemSet().Set(aNewSet);
if( pStyleSheet->GetFamily() == SFX_STYLE_FAMILY_PSEUDO )
( (SdStyleSheet*)pStyleSheet )->GetRealStyleSheet()->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
else