incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1334048 - in /incubator/ooo/branches/alg/aw080/main: sd/source/core/ sd/source/ui/dlg/ sd/source/ui/func/ sd/source/ui/inc/ sd/source/ui/view/ svx/inc/svx/ svx/inc/svx/sdr/properties/ svx/source/sdr/properties/ svx/source/svdraw/
Date Fri, 04 May 2012 15:57:46 GMT
Author: alg
Date: Fri May  4 15:57:45 2012
New Revision: 1334048

URL: http://svn.apache.org/viewvc?rev=1334048&view=rev
Log:
aw080: removed MovetoItemPool and MigrateItemSet, adaptions to these

Modified:
    incubator/ooo/branches/alg/aw080/main/sd/source/core/drawdoc3.cxx
    incubator/ooo/branches/alg/aw080/main/sd/source/ui/dlg/unchss.cxx
    incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fupage.cxx
    incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fuprobjs.cxx
    incubator/ooo/branches/alg/aw080/main/sd/source/ui/inc/unchss.hxx
    incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/drawview.cxx
    incubator/ooo/branches/alg/aw080/main/svx/inc/svx/sdr/properties/attributeproperties.hxx
    incubator/ooo/branches/alg/aw080/main/svx/inc/svx/sdr/properties/e3dsceneproperties.hxx
    incubator/ooo/branches/alg/aw080/main/svx/inc/svx/sdr/properties/groupproperties.hxx
    incubator/ooo/branches/alg/aw080/main/svx/inc/svx/sdr/properties/properties.hxx
    incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdmodel.hxx
    incubator/ooo/branches/alg/aw080/main/svx/source/sdr/properties/attributeproperties.cxx
    incubator/ooo/branches/alg/aw080/main/svx/source/sdr/properties/e3dsceneproperties.cxx
    incubator/ooo/branches/alg/aw080/main/svx/source/sdr/properties/groupproperties.cxx
    incubator/ooo/branches/alg/aw080/main/svx/source/sdr/properties/properties.cxx
    incubator/ooo/branches/alg/aw080/main/svx/source/svdraw/svdmodel.cxx

Modified: incubator/ooo/branches/alg/aw080/main/sd/source/core/drawdoc3.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sd/source/core/drawdoc3.cxx?rev=1334048&r1=1334047&r2=1334048&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sd/source/core/drawdoc3.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sd/source/core/drawdoc3.cxx Fri May  4 15:57:45
2012
@@ -1644,8 +1644,7 @@ void SdDrawDocument::SetMasterPage(sal_u
 						DBG_ASSERT(bTest, "StyleSheet-Umbenennung fehlgeschlagen");
 						pMySheet->GetItemSet().ClearItem(0);  // alle loeschen
 
-						StyleSheetUndoAction* pUndoChStyle = new StyleSheetUndoAction(this,
-																 pMySheet, &pHisSheet->GetItemSet());
+						StyleSheetUndoAction* pUndoChStyle = new StyleSheetUndoAction(*this, *pMySheet, pHisSheet->GetItemSet());
 						pUndoMgr->AddUndoAction(pUndoChStyle);
 						pMySheet->GetItemSet().Put(pHisSheet->GetItemSet());
 						pMySheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));

Modified: incubator/ooo/branches/alg/aw080/main/sd/source/ui/dlg/unchss.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sd/source/ui/dlg/unchss.cxx?rev=1334048&r1=1334047&r2=1334048&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sd/source/ui/dlg/unchss.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sd/source/ui/dlg/unchss.cxx Fri May  4 15:57:45
2012
@@ -47,24 +47,17 @@
 |*
 \************************************************************************/
 
-StyleSheetUndoAction::StyleSheetUndoAction(SdDrawDocument* pTheDoc,
-										   SfxStyleSheet* pTheStyleSheet,
-										   const SfxItemSet* pTheNewItemSet) :
-					  SdUndoAction(pTheDoc)
+StyleSheetUndoAction::StyleSheetUndoAction(
+    SdDrawDocument& rTheDoc,
+	SfxStyleSheet& rTheStyleSheet,
+	const SfxItemSet& rTheNewItemSet) 
+:   SdUndoAction(&rTheDoc),
+    mrStyleSheet(rTheStyleSheet),
+	maNewSet(rTheNewItemSet),
+	maOldSet(mrStyleSheet.GetItemSet())
 {
-	DBG_ASSERT(pTheStyleSheet, "Undo ohne StyleSheet ???");
-	pStyleSheet = pTheStyleSheet;
-
-	// ItemSets anlegen; Vorsicht, das neue koennte aus einem anderen Pool
-	// stammen, also mitsamt seinen Items clonen
-	pNewSet = new SfxItemSet((SfxItemPool&)GetGlobalDrawObjectItemPool(), pTheNewItemSet->GetRanges());
-	pTheDoc->MigrateItemSet( pTheNewItemSet, pNewSet, pTheDoc );
-
-	pOldSet = new SfxItemSet((SfxItemPool&)GetGlobalDrawObjectItemPool(),pStyleSheet->GetItemSet().GetRanges());
-	pTheDoc->MigrateItemSet( &pStyleSheet->GetItemSet(), pOldSet, pTheDoc );
-
 	aComment = String(SdResId(STR_UNDO_CHANGE_PRES_OBJECT));
-	String aName(pStyleSheet->GetName());
+	String aName(mrStyleSheet.GetName());
 
 	// Layoutnamen und Separator loeschen
 	String aSep( RTL_CONSTASCII_USTRINGPARAM( SD_LT_SEPARATOR ) );
@@ -119,14 +112,16 @@ StyleSheetUndoAction::StyleSheetUndoActi
 
 void StyleSheetUndoAction::Undo()
 {
-	SfxItemSet aNewSet( mpDoc->GetItemPool(), pOldSet->GetRanges() );
-	mpDoc->MigrateItemSet( pOldSet, &aNewSet, mpDoc );
+	mrStyleSheet.GetItemSet().Set(maOldSet);
 
-	pStyleSheet->GetItemSet().Set(aNewSet);
-	if( pStyleSheet->GetFamily() == SD_STYLE_FAMILY_PSEUDO )
-		( (SdStyleSheet*)pStyleSheet )->GetRealStyleSheet()->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
+    if(SD_STYLE_FAMILY_PSEUDO == mrStyleSheet.GetFamily())
+    {
+		static_cast< SdStyleSheet& >(mrStyleSheet).GetRealStyleSheet()->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
+    }
 	else
-		pStyleSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
+    {
+		mrStyleSheet.Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
+    }
 }
 
 /*************************************************************************
@@ -137,14 +132,16 @@ void StyleSheetUndoAction::Undo()
 
 void StyleSheetUndoAction::Redo()
 {
-	SfxItemSet aNewSet( mpDoc->GetItemPool(), pOldSet->GetRanges() );
-	mpDoc->MigrateItemSet( pNewSet, &aNewSet, mpDoc );
+	mrStyleSheet.GetItemSet().Set(maNewSet);
 
-	pStyleSheet->GetItemSet().Set(aNewSet);
-	if( pStyleSheet->GetFamily() == SD_STYLE_FAMILY_PSEUDO )
-		( (SdStyleSheet*)pStyleSheet )->GetRealStyleSheet()->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
+    if(SD_STYLE_FAMILY_PSEUDO == mrStyleSheet.GetFamily())
+    {
+		static_cast< SdStyleSheet& >(mrStyleSheet).GetRealStyleSheet()->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
+    }
 	else
-		pStyleSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
+    {
+		mrStyleSheet.Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
+    }
 }
 
 /*************************************************************************
@@ -155,8 +152,6 @@ void StyleSheetUndoAction::Redo()
 
 StyleSheetUndoAction::~StyleSheetUndoAction()
 {
-	delete pNewSet;
-	delete pOldSet;
 }
 
 /*************************************************************************
@@ -169,3 +164,5 @@ String StyleSheetUndoAction::GetComment(
 {
 	return aComment;
 }
+
+// eof

Modified: incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fupage.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fupage.cxx?rev=1334048&r1=1334047&r2=1334048&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fupage.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fupage.cxx Fri May  4 15:57:45
2012
@@ -308,10 +308,20 @@ const SfxItemSet* FuPage::ExecuteDialog(
 
 				pTempSet->Put( XFillStyleItem( XFILL_BITMAP ) );
 				
-				// MigrateItemSet makes sure the XFillBitmapItem will have a unique name
-				SfxItemSet aMigrateSet( mpDoc->GetItemPool(), XATTR_FILLBITMAP, XATTR_FILLBITMAP );
-				aMigrateSet.Put( XFillBitmapItem( String(RTL_CONSTASCII_USTRINGPARAM("background")),
XOBitmap(aGraphic) ) );
-				mpDoc->MigrateItemSet( &aMigrateSet, pTempSet.get(), NULL );
+				// Need to be sure that the name for the XFillBitmapItem is unique due to
+                // usage in the UNO API. Use checkForUniqueItem at the default item; it will
+                // always return something. If the name already was unique, it returns a
pointer
+                // to the item it was triggered at, thus the new item needs to be deleted
+                // when it is not equal to the address of it.
+                const XFillBitmapItem aNewItem(String(RTL_CONSTASCII_USTRINGPARAM("background")),
XOBitmap(aGraphic));
+            	const XFillBitmapItem* pSaveItem = aNewItem.checkForUniqueItem(mpDoc);
+
+                pTempSet->Put( *pSaveItem );
+
+                if(pSaveItem != &aNewItem)
+                {
+                    delete pSaveItem;
+                }
 
 				pTempSet->Put( XFillBmpStretchItem( sal_True ));
 				pTempSet->Put( XFillBmpTileItem( sal_False ));
@@ -329,168 +339,171 @@ const SfxItemSet* FuPage::ExecuteDialog(
 
 	if( pTempSet.get() )
 	{
-		pStyleSheet->AdjustToFontHeight(*pTempSet);
-
-		if( mbDisplayBackgroundTabPage )
-		{
-			// if some fillstyle-items are not set in the dialog, then
-			// try to use the items before
-			bool bChanges = false;
-			for( sal_uInt16 i=XATTR_FILL_FIRST; i<XATTR_FILL_LAST; i++ )
-			{
-				if( aMergedAttr.GetItemState( i ) != SFX_ITEM_DEFAULT )
-				{
-					if( pTempSet->GetItemState( i ) == SFX_ITEM_DEFAULT )
-						pTempSet->Put( aMergedAttr.Get( i ) );
-					else
-						if( aMergedAttr.GetItem( i ) != pTempSet->GetItem( i ) )
-							bChanges = true;
-				}
-			}
-
-			// if the background for this page was set to invisible, the background-object has to
be deleted, too.
-			if( ( ( (XFillStyleItem*) pTempSet->GetItem( XATTR_FILLSTYLE ) )->GetValue() ==
XFILL_NONE ) ||
-				( ( pTempSet->GetItemState( XATTR_FILLSTYLE ) == SFX_ITEM_DEFAULT ) &&
-					( ( (XFillStyleItem*) aMergedAttr.GetItem( XATTR_FILLSTYLE ) )->GetValue() == XFILL_NONE
) ) )
-				mbPageBckgrdDeleted = true;
-
-			bool bSetToAllPages = false;
-
-			// Ask, wether the setting are for the background-page or for the current page
-			if( !mbMasterPage && bChanges )
-			{
-				// But don't ask in notice-view, because we can't change the background of
-				// notice-masterpage (at the moment)
-				if( ePageKind != PK_NOTES )
-				{
-					String aTit(SdResId( STR_PAGE_BACKGROUND_TITLE ));
-					String aTxt(SdResId( STR_PAGE_BACKGROUND_TXT ));
-					MessBox aQuestionBox (
-                        pParent,
-                        WB_YES_NO | WB_DEF_YES,
-                        aTit,
-                        aTxt );
-					aQuestionBox.SetImage( QueryBox::GetStandardImage() );
-					bSetToAllPages = ( RET_YES == aQuestionBox.Execute() );
-				}
-
-                if( mbPageBckgrdDeleted )
-				{
-                    mpBackgroundObjUndoAction = new SdBackgroundObjUndoAction(
-                        *mpDoc, *mpPage, mpPage->getSdrPageProperties().GetItemSet());
-
-                    if(!mpPage->IsMasterPage())
-                    {
-                        // on normal pages, switch off fill attribute usage
-						SdrPageProperties& rPageProperties = mpPage->getSdrPageProperties();
-						rPageProperties.ClearItem( XATTR_FILLBITMAP );
-						rPageProperties.ClearItem( XATTR_FILLGRADIENT );
-						rPageProperties.ClearItem( XATTR_FILLHATCH );
-                        rPageProperties.PutItem(XFillStyleItem(XFILL_NONE));
-                    }
-				}
-			}
-
-			// Sonderbehandlung: die INVALIDS auf NULL-Pointer
-			// zurueckgesetzen (sonst landen INVALIDs oder
-			// Pointer auf die DefaultItems in der Vorlage;
-			// beides wuerde die Attribut-Vererbung unterbinden)
-			pTempSet->ClearInvalidItems();
-
-			if( mbMasterPage )
-			{
-				StyleSheetUndoAction* pAction = new StyleSheetUndoAction(mpDoc, (SfxStyleSheet*)pStyleSheet,
&(*pTempSet.get()));
-				mpDocSh->GetUndoManager()->AddUndoAction(pAction);
-				pStyleSheet->GetItemSet().Put( *(pTempSet.get()) );
-				sdr::properties::CleanupFillProperties( pStyleSheet->GetItemSet() );
-				pStyleSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
-			}
-			else if( bSetToAllPages )
-			{
-				String aComment(SdResId(STR_UNDO_CHANGE_PAGEFORMAT));
-				::svl::IUndoManager* pUndoMgr = mpDocSh->GetUndoManager();
-				pUndoMgr->EnterListAction(aComment, aComment);
-				SdUndoGroup* pUndoGroup = new SdUndoGroup(mpDoc);
-				pUndoGroup->SetComment(aComment);
-
-				//Set background on all master pages
-				sal_uInt32 nMasterPageCount = mpDoc->GetMasterSdPageCount(ePageKind);
-				for (sal_uInt32 i = 0; i < nMasterPageCount; ++i)
-				{
-					SdPage *pMasterPage = mpDoc->GetMasterSdPage(i, ePageKind);
-					SdStyleSheet *pStyle =
-						pMasterPage->getPresentationStyle(HID_PSEUDOSHEET_BACKGROUND);
-					StyleSheetUndoAction* pAction =
-						new StyleSheetUndoAction(mpDoc, (SfxStyleSheet*)pStyle, &(*pTempSet.get()));
-					pUndoGroup->AddAction(pAction);
-					pStyle->GetItemSet().Put( *(pTempSet.get()) );
-					sdr::properties::CleanupFillProperties( pStyleSheet->GetItemSet() );
-					pStyle->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
-				}
-
-				//Remove background from all pages to reset to the master bg
-				sal_uInt32 nPageCount(mpDoc->GetSdPageCount(ePageKind));
-				for(sal_uInt32 i=0; i<nPageCount; ++i)
-				{
-					SdPage *pPage = mpDoc->GetSdPage(i, ePageKind);
-
-					const SfxItemSet& rFillAttributes = pPage->getSdrPageProperties().GetItemSet();
-   					if(XFILL_NONE != ((const XFillStyleItem&)rFillAttributes.Get(XATTR_FILLSTYLE)).GetValue())
+        if(pStyleSheet)
+        {
+		    pStyleSheet->AdjustToFontHeight(*pTempSet);
+
+		    if( mbDisplayBackgroundTabPage )
+		    {
+			    // if some fillstyle-items are not set in the dialog, then
+			    // try to use the items before
+			    bool bChanges = false;
+			    for( sal_uInt16 i=XATTR_FILL_FIRST; i<XATTR_FILL_LAST; i++ )
+			    {
+				    if( aMergedAttr.GetItemState( i ) != SFX_ITEM_DEFAULT )
 				    {
-						SdBackgroundObjUndoAction *pBackgroundObjUndoAction = new SdBackgroundObjUndoAction(*mpDoc,
*pPage, rFillAttributes);
-						pUndoGroup->AddAction(pBackgroundObjUndoAction);
-
-						SdrPageProperties& rPageProperties = pPage->getSdrPageProperties();
-						rPageProperties.ClearItem( XATTR_FILLBITMAP );
-						rPageProperties.ClearItem( XATTR_FILLGRADIENT );
-						rPageProperties.ClearItem( XATTR_FILLHATCH );
-                        rPageProperties.PutItem(XFillStyleItem(XFILL_NONE));
-
-						pPage->ActionChanged();
-					}
-				}
-
-				pUndoMgr->AddUndoAction(pUndoGroup);
-				pUndoMgr->LeaveListAction();
-
-			}
-
-			// if background filling is set to master pages then clear from page set
-			if( mbMasterPage || bSetToAllPages )
-			{
-				for( sal_uInt16 nWhich = XATTR_FILL_FIRST; nWhich <= XATTR_FILL_LAST; nWhich++ )
-				{
-					pTempSet->ClearItem( nWhich );
-				}
-				pTempSet->Put(XFillStyleItem(XFILL_NONE));
-			}
-
-			const SfxPoolItem *pItem;
-			if( SFX_ITEM_SET == pTempSet->GetItemState( EE_PARA_WRITINGDIR, sal_False, &pItem
) )
-			{
-				sal_uInt32 nVal = ((SvxFrameDirectionItem*)pItem)->GetValue();
-				mpDoc->SetDefaultWritingMode( nVal == FRMDIR_HORI_RIGHT_TOP ? ::com::sun::star::text::WritingMode_RL_TB
: ::com::sun::star::text::WritingMode_LR_TB );
-			}
-
-			mpDoc->SetChanged(true);
+					    if( pTempSet->GetItemState( i ) == SFX_ITEM_DEFAULT )
+						    pTempSet->Put( aMergedAttr.Get( i ) );
+					    else
+						    if( aMergedAttr.GetItem( i ) != pTempSet->GetItem( i ) )
+							    bChanges = true;
+				    }
+			    }
+
+			    // if the background for this page was set to invisible, the background-object has
to be deleted, too.
+			    if( ( ( (XFillStyleItem*) pTempSet->GetItem( XATTR_FILLSTYLE ) )->GetValue()
== XFILL_NONE ) ||
+				    ( ( pTempSet->GetItemState( XATTR_FILLSTYLE ) == SFX_ITEM_DEFAULT ) &&
+					    ( ( (XFillStyleItem*) aMergedAttr.GetItem( XATTR_FILLSTYLE ) )->GetValue() ==
XFILL_NONE ) ) )
+				    mbPageBckgrdDeleted = true;
+
+			    bool bSetToAllPages = false;
+
+			    // Ask, wether the setting are for the background-page or for the current page
+			    if( !mbMasterPage && bChanges )
+			    {
+				    // But don't ask in notice-view, because we can't change the background of
+				    // notice-masterpage (at the moment)
+				    if( ePageKind != PK_NOTES )
+				    {
+					    String aTit(SdResId( STR_PAGE_BACKGROUND_TITLE ));
+					    String aTxt(SdResId( STR_PAGE_BACKGROUND_TXT ));
+					    MessBox aQuestionBox (
+                            pParent,
+                            WB_YES_NO | WB_DEF_YES,
+                            aTit,
+                            aTxt );
+					    aQuestionBox.SetImage( QueryBox::GetStandardImage() );
+					    bSetToAllPages = ( RET_YES == aQuestionBox.Execute() );
+				    }
 
-			// BackgroundFill of Masterpage: no hard attributes allowed
-            SdrPage& rUsedMasterPage = mpPage->IsMasterPage() ? *mpPage : mpPage->TRG_GetMasterPage();
-            OSL_ENSURE(rUsedMasterPage.IsMasterPage(), "No MasterPage (!)");
-            rUsedMasterPage.getSdrPageProperties().ClearItem();
-            OSL_ENSURE(0 != rUsedMasterPage.getSdrPageProperties().GetStyleSheet(), 
-                "MasterPage without StyleSheet detected (!)");
-		}
+                    if( mbPageBckgrdDeleted )
+				    {
+                        mpBackgroundObjUndoAction = new SdBackgroundObjUndoAction(
+                            *mpDoc, *mpPage, mpPage->getSdrPageProperties().GetItemSet());
 
-		aNewAttr.Put(*(pTempSet.get()));
-		mrReq.Done( aNewAttr );
+                        if(!mpPage->IsMasterPage())
+                        {
+                            // on normal pages, switch off fill attribute usage
+						    SdrPageProperties& rPageProperties = mpPage->getSdrPageProperties();
+						    rPageProperties.ClearItem( XATTR_FILLBITMAP );
+						    rPageProperties.ClearItem( XATTR_FILLGRADIENT );
+						    rPageProperties.ClearItem( XATTR_FILLHATCH );
+                            rPageProperties.PutItem(XFillStyleItem(XFILL_NONE));
+                        }
+				    }
+			    }
+
+			    // Sonderbehandlung: die INVALIDS auf NULL-Pointer
+			    // zurueckgesetzen (sonst landen INVALIDs oder
+			    // Pointer auf die DefaultItems in der Vorlage;
+			    // beides wuerde die Attribut-Vererbung unterbinden)
+			    pTempSet->ClearInvalidItems();
+
+			    if( mbMasterPage )
+			    {
+				    StyleSheetUndoAction* pAction = new StyleSheetUndoAction(*mpDoc, *pStyleSheet, *pTempSet.get());
+				    mpDocSh->GetUndoManager()->AddUndoAction(pAction);
+				    pStyleSheet->GetItemSet().Put( *(pTempSet.get()) );
+				    sdr::properties::CleanupFillProperties( pStyleSheet->GetItemSet() );
+				    pStyleSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
+			    }
+			    else if( bSetToAllPages )
+			    {
+				    String aComment(SdResId(STR_UNDO_CHANGE_PAGEFORMAT));
+				    ::svl::IUndoManager* pUndoMgr = mpDocSh->GetUndoManager();
+				    pUndoMgr->EnterListAction(aComment, aComment);
+				    SdUndoGroup* pUndoGroup = new SdUndoGroup(mpDoc);
+				    pUndoGroup->SetComment(aComment);
+
+				    //Set background on all master pages
+				    sal_uInt32 nMasterPageCount = mpDoc->GetMasterSdPageCount(ePageKind);
+				    for (sal_uInt32 i = 0; i < nMasterPageCount; ++i)
+				    {
+					    SdPage *pMasterPage = mpDoc->GetMasterSdPage(i, ePageKind);
+					    SdStyleSheet *pStyle = pMasterPage->getPresentationStyle(HID_PSEUDOSHEET_BACKGROUND);
+					    StyleSheetUndoAction* pAction = new StyleSheetUndoAction(*mpDoc, *pStyle, *pTempSet.get());
+					    pUndoGroup->AddAction(pAction);
+					    pStyle->GetItemSet().Put( *(pTempSet.get()) );
+					    sdr::properties::CleanupFillProperties( pStyleSheet->GetItemSet() );
+					    pStyle->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
+				    }
+
+				    //Remove background from all pages to reset to the master bg
+				    sal_uInt32 nPageCount(mpDoc->GetSdPageCount(ePageKind));
+				    for(sal_uInt32 i=0; i<nPageCount; ++i)
+				    {
+					    SdPage *pPage = mpDoc->GetSdPage(i, ePageKind);
 
-		return mrReq.GetArgs();
-	}
-	else
-	{
-		return 0;
+					    const SfxItemSet& rFillAttributes = pPage->getSdrPageProperties().GetItemSet();
+   					    if(XFILL_NONE != ((const XFillStyleItem&)rFillAttributes.Get(XATTR_FILLSTYLE)).GetValue())
+				        {
+						    SdBackgroundObjUndoAction *pBackgroundObjUndoAction = new SdBackgroundObjUndoAction(*mpDoc,
*pPage, rFillAttributes);
+						    pUndoGroup->AddAction(pBackgroundObjUndoAction);
+
+						    SdrPageProperties& rPageProperties = pPage->getSdrPageProperties();
+						    rPageProperties.ClearItem( XATTR_FILLBITMAP );
+						    rPageProperties.ClearItem( XATTR_FILLGRADIENT );
+						    rPageProperties.ClearItem( XATTR_FILLHATCH );
+                            rPageProperties.PutItem(XFillStyleItem(XFILL_NONE));
+
+						    pPage->ActionChanged();
+					    }
+				    }
+
+				    pUndoMgr->AddUndoAction(pUndoGroup);
+				    pUndoMgr->LeaveListAction();
+
+			    }
+
+			    // if background filling is set to master pages then clear from page set
+			    if( mbMasterPage || bSetToAllPages )
+			    {
+				    for( sal_uInt16 nWhich = XATTR_FILL_FIRST; nWhich <= XATTR_FILL_LAST; nWhich++
)
+				    {
+					    pTempSet->ClearItem( nWhich );
+				    }
+				    pTempSet->Put(XFillStyleItem(XFILL_NONE));
+			    }
+
+			    const SfxPoolItem *pItem;
+			    if( SFX_ITEM_SET == pTempSet->GetItemState( EE_PARA_WRITINGDIR, sal_False, &pItem
) )
+			    {
+				    sal_uInt32 nVal = ((SvxFrameDirectionItem*)pItem)->GetValue();
+				    mpDoc->SetDefaultWritingMode( nVal == FRMDIR_HORI_RIGHT_TOP ? ::com::sun::star::text::WritingMode_RL_TB
: ::com::sun::star::text::WritingMode_LR_TB );
+			    }
+
+			    mpDoc->SetChanged(true);
+
+			    // BackgroundFill of Masterpage: no hard attributes allowed
+                SdrPage& rUsedMasterPage = mpPage->IsMasterPage() ? *mpPage : mpPage->TRG_GetMasterPage();
+                OSL_ENSURE(rUsedMasterPage.IsMasterPage(), "No MasterPage (!)");
+                rUsedMasterPage.getSdrPageProperties().ClearItem();
+                OSL_ENSURE(0 != rUsedMasterPage.getSdrPageProperties().GetStyleSheet(), 
+                    "MasterPage without StyleSheet detected (!)");
+		    }
+
+		    aNewAttr.Put(*(pTempSet.get()));
+		    mrReq.Done( aNewAttr );
+
+    		return mrReq.GetArgs();
+        }
+        else
+        {
+            OSL_ENSURE(false, "pStyleSheet not set (!)");
+        }
 	}
+
+    return 0;
 }
 
 void FuPage::ApplyItemSet( const SfxItemSet* pArgs )

Modified: incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fuprobjs.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fuprobjs.cxx?rev=1334048&r1=1334047&r2=1334048&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fuprobjs.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/fuprobjs.cxx Fri May  4 15:57:45
2012
@@ -143,26 +143,22 @@ void FuPresentationObjects::DoExecute( S
 		}
 
 		SfxStyleSheetBasePool* pStyleSheetPool = mpDocSh->GetStyleSheetPool();
-		SfxStyleSheetBase* pStyleSheet = pStyleSheetPool->Find( aStyleName, SD_STYLE_FAMILY_MASTERPAGE
);
-		DBG_ASSERT(pStyleSheet, "StyleSheet nicht gefunden");
+		SfxStyleSheet* pStyleSheet = dynamic_cast< SfxStyleSheet* >(pStyleSheetPool->Find(aStyleName,
SD_STYLE_FAMILY_MASTERPAGE));
+		OSL_ENSURE(pStyleSheet, "StyleSheet not found or not based on SfxStyleSheet");
 
 		if( pStyleSheet )
 		{
-			SfxStyleSheetBase& rStyleSheet = *pStyleSheet;
-
 			SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
-			SfxAbstractTabDialog* pDlg = pFact ? pFact->CreateSdPresLayoutTemplateDlg( mpDocSh,
NULL, SdResId( nDlgId ), rStyleSheet, ePO, pStyleSheetPool ) : 0;
+			SfxAbstractTabDialog* pDlg = pFact ? pFact->CreateSdPresLayoutTemplateDlg( mpDocSh,
NULL, SdResId( nDlgId ), *pStyleSheet, ePO, pStyleSheetPool ) : 0;
 			if( pDlg && (pDlg->Execute() == RET_OK) )
 			{
 				const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
 				// Undo-Action
-				StyleSheetUndoAction* pAction = new StyleSheetUndoAction
-												(mpDoc, (SfxStyleSheet*)pStyleSheet,
-													pOutSet);
-				mpDocSh->GetUndoManager()->AddUndoAction(pAction);
+				StyleSheetUndoAction* pAction = new StyleSheetUndoAction(*mpDoc, *pStyleSheet, *pOutSet);
 
+                mpDocSh->GetUndoManager()->AddUndoAction(pAction);
 				pStyleSheet->GetItemSet().Put( *pOutSet );
-				( (SfxStyleSheet*) pStyleSheet )->Broadcast( SfxSimpleHint( SFX_HINT_DATACHANGED )
);
+				pStyleSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
 			}
 			delete( pDlg );
 		}

Modified: incubator/ooo/branches/alg/aw080/main/sd/source/ui/inc/unchss.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sd/source/ui/inc/unchss.hxx?rev=1334048&r1=1334047&r2=1334048&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sd/source/ui/inc/unchss.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sd/source/ui/inc/unchss.hxx Fri May  4 15:57:45
2012
@@ -25,23 +25,23 @@
 #define _SD_UNCHSS_HXX
 
 #include "sdundo.hxx"
+#include <svl/itemset.hxx>
 
-class SfxItemSet;
 class SfxStyleSheet;
 class SdDrawDocument;
 
 class StyleSheetUndoAction : public SdUndoAction
 {
-	SfxStyleSheet*  pStyleSheet;
-
-	SfxItemSet*     pNewSet;
-	SfxItemSet*     pOldSet;
+	SfxStyleSheet&  mrStyleSheet;
+	SfxItemSet      maNewSet;
+	SfxItemSet      maOldSet;
 	String          aComment;
 
 public:
-	StyleSheetUndoAction(SdDrawDocument* pTheDoc,
-						 SfxStyleSheet*  pTheStyleSheet,
-						 const SfxItemSet* pTheNewItemSet);
+	StyleSheetUndoAction(
+        SdDrawDocument& rTheDoc,
+		SfxStyleSheet&  rTheStyleSheet,
+		const SfxItemSet& rTheNewItemSet);
 
 	virtual ~StyleSheetUndoAction();
 	virtual void Undo();
@@ -52,3 +52,4 @@ public:
 
 #endif      // _SD_UNCHSS_HXX
 
+// eof

Modified: incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/drawview.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/drawview.cxx?rev=1334048&r1=1334047&r2=1334048&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/drawview.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sd/source/ui/view/drawview.cxx Fri May  4 15:57:45
2012
@@ -202,7 +202,7 @@ bool DrawView::SetAttributes(const SfxIt
 					aTempSet.ClearInvalidItems();
 
 					// Undo-Action
-					StyleSheetUndoAction* pAction = new StyleSheetUndoAction(mpDoc, pSheet, &aTempSet);
+					StyleSheetUndoAction* pAction = new StyleSheetUndoAction(*mpDoc, *pSheet, aTempSet);
 					mpDocSh->GetUndoManager()->AddUndoAction(pAction);
 
 					pSheet->GetItemSet().Put(aTempSet);
@@ -249,7 +249,7 @@ bool DrawView::SetAttributes(const SfxIt
 						}
 
 						// Undo-Action
-						StyleSheetUndoAction* pAction = new StyleSheetUndoAction(mpDoc, pSheet, &aTempSet);
+						StyleSheetUndoAction* pAction = new StyleSheetUndoAction(*mpDoc, *pSheet, aTempSet);
 						mpDocSh->GetUndoManager()->AddUndoAction(pAction);
 
 						pSheet->GetItemSet().Put(aTempSet);
@@ -317,7 +317,7 @@ bool DrawView::SetAttributes(const SfxIt
 						aTempSet.ClearInvalidItems();
 
 						// Undo-Action
-						StyleSheetUndoAction* pAction = new StyleSheetUndoAction(mpDoc, pSheet, &aTempSet);
+						StyleSheetUndoAction* pAction = new StyleSheetUndoAction(*mpDoc, *pSheet, aTempSet);
 						mpDocSh->GetUndoManager()->AddUndoAction(pAction);
 
 						pSheet->GetItemSet().Put(aTempSet,false);
@@ -362,7 +362,7 @@ bool DrawView::SetAttributes(const SfxIt
 							aTempSet.ClearInvalidItems();
 
 							// Undo-Action
-							StyleSheetUndoAction* pAction = new StyleSheetUndoAction(mpDoc, pSheet, &aTempSet);
+							StyleSheetUndoAction* pAction = new StyleSheetUndoAction(*mpDoc, *pSheet, aTempSet);
 							mpDocSh->GetUndoManager()->AddUndoAction(pAction);
 
 							pSheet->GetItemSet().Set(aTempSet,false);

Modified: incubator/ooo/branches/alg/aw080/main/svx/inc/svx/sdr/properties/attributeproperties.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/inc/svx/sdr/properties/attributeproperties.hxx?rev=1334048&r1=1334047&r2=1334048&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/inc/svx/sdr/properties/attributeproperties.hxx
(original)
+++ incubator/ooo/branches/alg/aw080/main/svx/inc/svx/sdr/properties/attributeproperties.hxx
Fri May  4 15:57:45 2012
@@ -74,9 +74,6 @@ namespace sdr
 			// get the installed StyleSheet
 			virtual SfxStyleSheet* GetStyleSheet() const;
 
-			// Move properties to a new ItemPool.
-			virtual void MoveToItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel
= 0L);
-
 			// force all attributes which come from styles to hard attributes
 			// to be able to live without the style.
 			virtual void ForceStyleToHardAttributes();

Modified: incubator/ooo/branches/alg/aw080/main/svx/inc/svx/sdr/properties/e3dsceneproperties.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/inc/svx/sdr/properties/e3dsceneproperties.hxx?rev=1334048&r1=1334047&r2=1334048&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/inc/svx/sdr/properties/e3dsceneproperties.hxx
(original)
+++ incubator/ooo/branches/alg/aw080/main/svx/inc/svx/sdr/properties/e3dsceneproperties.hxx
Fri May  4 15:57:45 2012
@@ -76,9 +76,6 @@ namespace sdr
 			// get the installed StyleSheet
 			virtual SfxStyleSheet* GetStyleSheet() const;
 
-			// Move properties to a new ItemPool. Default implementation does nothing.
-			virtual void MoveToItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel
= 0L);
-
 			// Special for scene:
 			void SetSceneItemsFromCamera();
 		};

Modified: incubator/ooo/branches/alg/aw080/main/svx/inc/svx/sdr/properties/groupproperties.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/inc/svx/sdr/properties/groupproperties.hxx?rev=1334048&r1=1334047&r2=1334048&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/inc/svx/sdr/properties/groupproperties.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/inc/svx/sdr/properties/groupproperties.hxx Fri
May  4 15:57:45 2012
@@ -108,9 +108,6 @@ namespace sdr
 			// DefaultProperties::GetObjectItemSet() if a new ItemSet is created
 			virtual void ForceDefaultAttributes();
 
-			// Move properties to a new ItemPool.
-			virtual void MoveToItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel
= 0L);
-
 			// force all attributes which come from styles to hard attributes
 			// to be able to live without the style.
 			virtual void ForceStyleToHardAttributes();

Modified: incubator/ooo/branches/alg/aw080/main/svx/inc/svx/sdr/properties/properties.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/inc/svx/sdr/properties/properties.hxx?rev=1334048&r1=1334047&r2=1334048&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/inc/svx/sdr/properties/properties.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/inc/svx/sdr/properties/properties.hxx Fri May
 4 15:57:45 2012
@@ -152,10 +152,6 @@ namespace sdr
 			// overloaded to do it for hierarchical objects like e.g. groups.
 			virtual void Scale(const Fraction& rScale);
 
-			// Move local items to a new ItemPool. This needs to be
-			// overloaded to do it for hierarchical objects like e.g. groups.
-			virtual void MoveToItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel
= 0L);
-
 			// force all attributes which come from styles to hard attributes
 			// to be able to live without the style.
 			virtual void ForceStyleToHardAttributes();

Modified: incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdmodel.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdmodel.hxx?rev=1334048&r1=1334047&r2=1334048&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdmodel.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdmodel.hxx Fri May  4 15:57:45 2012
@@ -564,12 +564,6 @@ public:
 	/** returns the numbering type that is used to format page fields in drawing shapes */
 	virtual SvxNumType GetPageNumType() const;
 
-	/** copies the items from the source set to the destination set. Both sets must have
-		same ranges but can have different pools. If pNewModel is optional. If it is null,
-		this model is used. */
-
-	void MigrateItemSet( const SfxItemSet* pSourceSet, SfxItemSet* pDestSet, SdrModel* pNewModel
);
-
 	bool IsInDestruction() const { return mbInDestruction; }
 
     static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelImplementationId();

Modified: incubator/ooo/branches/alg/aw080/main/svx/source/sdr/properties/attributeproperties.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/source/sdr/properties/attributeproperties.cxx?rev=1334048&r1=1334047&r2=1334048&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/source/sdr/properties/attributeproperties.cxx
(original)
+++ incubator/ooo/branches/alg/aw080/main/svx/source/sdr/properties/attributeproperties.cxx
Fri May  4 15:57:45 2012
@@ -248,68 +248,6 @@ namespace sdr
 			return mpStyleSheet;
 		}
 
-		void AttributeProperties::MoveToItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool,
SdrModel* pNewModel)
-		{
-            OSL_ASSERT(pNewModel!=NULL);
-
-			if(pSrcPool && pDestPool && (pSrcPool != pDestPool))
-			{
-				if(mpItemSet)
-				{
-					// migrate ItemSet to new pool. Scaling is NOT necessary
-					// because this functionality is used by UNDO only. Thus
-					// objects and ItemSets would be moved back to their original
-					// pool before usage.
-					SfxItemSet* pOldSet = mpItemSet;
-					SfxStyleSheet* pStySheet = GetStyleSheet();
-
-					if(pStySheet)
-					{
-						ImpRemoveStyleSheet();
-					}
-
-					mpItemSet = mpItemSet->Clone(false, pDestPool);
-					GetSdrObject().getSdrModelFromSdrObject().MigrateItemSet(pOldSet, mpItemSet, pNewModel);
-
-					// set stylesheet (if used)
-					if(pStySheet)
-					{
-                        // #i109515#
-                        SfxItemPool* pStyleSheetPool = &pStySheet->GetPool().GetPool();
-                        
-                        if(pStyleSheetPool == pDestPool)
-                        {
-                            // just re-set stylesheet
-    						ImpAddStyleSheet(pStySheet, sal_True);
-                        }
-                        else
-                        {
-                            // StyleSheet is NOT from the correct pool.
-                            // Look one up in the right pool with the same
-                            // name or use the default.
-
-                            // Look up the style in the new document.
-                            OSL_ASSERT(pNewModel->GetStyleSheetPool() != NULL);
-                            SfxStyleSheet* pNewStyleSheet = dynamic_cast<SfxStyleSheet*>(
-                                pNewModel->GetStyleSheetPool()->Find(
-                                    pStySheet->GetName(),
-                                    SFX_STYLE_FAMILY_ALL));
-                            if (pNewStyleSheet == NULL
-                                || &pNewStyleSheet->GetPool().GetPool() != pDestPool)
-                            {
-                                // There is no copy of the style in the new
-                                // document.  Use the default as a fallback.
-                                pNewStyleSheet = pNewModel->GetDefaultStyleSheet();
-                            }
-    						ImpAddStyleSheet(pNewStyleSheet, sal_True);
-                        }
-					}
-
-					delete pOldSet;
-				}
-			}
-		}
-
 		void AttributeProperties::ForceStyleToHardAttributes()
 		{
 			if(GetStyleSheet() && dynamic_cast< SfxStyleSheet* >(mpStyleSheet))

Modified: incubator/ooo/branches/alg/aw080/main/svx/source/sdr/properties/e3dsceneproperties.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/source/sdr/properties/e3dsceneproperties.cxx?rev=1334048&r1=1334047&r2=1334048&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/source/sdr/properties/e3dsceneproperties.cxx
(original)
+++ incubator/ooo/branches/alg/aw080/main/svx/source/sdr/properties/e3dsceneproperties.cxx
Fri May  4 15:57:45 2012
@@ -281,31 +281,6 @@ namespace sdr
 			return pRetval;
 		}
 
-		void E3dSceneProperties::MoveToItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool,
SdrModel* pNewModel)
-		{
-			if(pSrcPool && pDestPool && (pSrcPool != pDestPool))
-			{
-				// call parent
-				E3dProperties::MoveToItemPool(pSrcPool, pDestPool, pNewModel);
-
-				// own reaction, but only with outmost scene
-				E3dScene& rObj = (E3dScene&)GetSdrObject();
-				const SdrObjList* pSubList = rObj.getChildrenOfSdrObject();
-
-				if(pSubList && rObj.GetScene() == &rObj)
-				{
-					SdrObjListIter a3DIterator(*pSubList, IM_DEEPWITHGROUPS);
-					
-					while(a3DIterator.IsMore())
-					{
-						E3dObject* pObj = dynamic_cast< E3dObject* >(a3DIterator.Next());
-						DBG_ASSERT(pObj, "In scenes there are only 3D objects allowed (!)");
-						pObj->GetProperties().MoveToItemPool(pSrcPool, pDestPool, pNewModel);
-					}
-				}
-			}
-		}
-
 		void E3dSceneProperties::SetSceneItemsFromCamera()
 		{
 			// force ItemSet

Modified: incubator/ooo/branches/alg/aw080/main/svx/source/sdr/properties/groupproperties.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/source/sdr/properties/groupproperties.cxx?rev=1334048&r1=1334047&r2=1334048&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/source/sdr/properties/groupproperties.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/source/sdr/properties/groupproperties.cxx Fri
May  4 15:57:45 2012
@@ -250,33 +250,6 @@ namespace sdr
 			// nothing to do here, groups have no items and thus no default items, too.
 		}
 
-		void GroupProperties::MoveToItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel*
pNewModel)
-		{
-			if(pSrcPool && pDestPool && (pSrcPool != pDestPool))
-			{
-				const SdrObjList* pSub = GetSdrObject().getChildrenOfSdrObject();
-                const sal_uInt32 nCount(pSub ? pSub->GetObjCount() : 0);
-
-				for(sal_uInt32 a(0L); a < nCount; a++)
-				{
-					pSub->GetObj(a)->GetProperties().MoveToItemPool(pSrcPool, pDestPool, pNewModel);
-				}
-
-				// also clear local ItemSet, it's only temporary for group objects anyways.
-				if(mpItemSet)
-				{
-					// #121905#
-					// copy/paste is still using clone operators and MoveToItemPool functionality.
-					// Since SfxItemSet contains a pool pointer, ClearItem is not enough here.
-					// The ItemSet for merge is constructed on demand, so it's enough here to
-					// just delete it and set to 0L.
-					// mpItemSet->ClearItem();
-					delete mpItemSet;
-					mpItemSet = 0L;
-				}
-			}
-		}
-
 		void GroupProperties::ForceStyleToHardAttributes()
 		{
 			const SdrObjList* pSub = GetSdrObject().getChildrenOfSdrObject();

Modified: incubator/ooo/branches/alg/aw080/main/svx/source/sdr/properties/properties.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/source/sdr/properties/properties.cxx?rev=1334048&r1=1334047&r2=1334048&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/source/sdr/properties/properties.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/source/sdr/properties/properties.cxx Fri May
 4 15:57:45 2012
@@ -86,12 +86,6 @@ namespace sdr
 			// an ItemSet is implemented.
 		}
 
-		void BaseProperties::MoveToItemPool(SfxItemPool* /*pSrcPool*/, SfxItemPool* /*pDestPool*/,
SdrModel* /*pNewModel*/)
-		{
-			// Move properties to a new ItemPool. Default implementation does nothing.
-			// Overload where an ItemSet is implemented.
-		}
-
 		void BaseProperties::ForceStyleToHardAttributes()
 		{
 			// force all attributes which come from styles to hard attributes

Modified: incubator/ooo/branches/alg/aw080/main/svx/source/svdraw/svdmodel.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/source/svdraw/svdmodel.cxx?rev=1334048&r1=1334047&r2=1334048&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/source/svdraw/svdmodel.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/source/svdraw/svdmodel.cxx Fri May  4 15:57:45
2012
@@ -2126,83 +2126,6 @@ void SdrModel::setLock( bool bLock )
 	}
 }
 
-void SdrModel::MigrateItemSet(const SfxItemSet* pSourceSet, SfxItemSet* pDestSet, SdrModel*
pNewModel) // TTTT: Needed?
-{
-	if(pSourceSet && pDestSet && (pSourceSet != pDestSet ))
-	{
-		if(!pNewModel)
-		{
-			pNewModel = this;
-		}
-
-		SfxWhichIter aWhichIter(*pSourceSet);
-		sal_uInt16 nWhich(aWhichIter.FirstWhich());
-		const SfxPoolItem *pPoolItem;
-
-		while(nWhich)
-		{
-			if(SFX_ITEM_SET == pSourceSet->GetItemState(nWhich, false, &pPoolItem))
-			{
-				const SfxPoolItem* pItem = pPoolItem;
-
-				switch( nWhich )
-				{
-					case XATTR_FILLBITMAP:
-					{
-						pItem = ((XFillBitmapItem*)pItem)->checkForUniqueItem( pNewModel );
-						break;
-					}
-					case XATTR_LINEDASH:
-					{
-						pItem = ((XLineDashItem*)pItem)->checkForUniqueItem( pNewModel );
-						break;
-					}
-					case XATTR_LINESTART:
-					{
-						pItem = ((XLineStartItem*)pItem)->checkForUniqueItem( pNewModel );
-						break;
-					}
-					case XATTR_LINEEND:
-					{
-						pItem = ((XLineEndItem*)pItem)->checkForUniqueItem( pNewModel );
-						break;
-					}
-					case XATTR_FILLGRADIENT:
-					{
-						pItem = ((XFillGradientItem*)pItem)->checkForUniqueItem( pNewModel );
-						break;
-					}
-					case XATTR_FILLFLOATTRANSPARENCE:
-					{
-						// #85953# allow all kinds of XFillFloatTransparenceItem to be set
-						pItem = ((XFillFloatTransparenceItem*)pItem)->checkForUniqueItem( pNewModel );
-						break;
-					}
-					case XATTR_FILLHATCH:
-					{
-						pItem = ((XFillHatchItem*)pItem)->checkForUniqueItem( pNewModel );
-						break;
-					}
-				}
-
-				// set item
-				if(pItem)
-				{
-					pDestSet->Put(*pItem);
-
-					// delete item if it was a generated one
-					if(pItem != pPoolItem)
-					{
-						delete (SfxPoolItem*)pItem;
-					}
-				}
-			}
-
-			nWhich = aWhichIter.NextWhich();
-		}
-	}
-}
-
 void SdrModel::SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars
)
 {
 	if(mpForbiddenCharactersTable)



Mime
View raw message