INTEGRATION: CWS impresspresobjs (1.12.138); FILE MERGED

2005/11/24 11:34:21 cl 1.12.138.1: #123595# use SdrUndoFactory for creating undo actions
This commit is contained in:
Rüdiger Timm 2006-01-10 13:52:15 +00:00
parent 2e30fd2ddc
commit cb5882302c

View file

@ -4,9 +4,9 @@
* *
* $RCSfile: fontworkbar.cxx,v $ * $RCSfile: fontworkbar.cxx,v $
* *
* $Revision: 1.12 $ * $Revision: 1.13 $
* *
* last change: $Author: rt $ $Date: 2005-09-09 00:54:23 $ * last change: $Author: rt $ $Date: 2006-01-10 14:52:15 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
@ -522,7 +522,7 @@ void FontworkBar::execute( SdrView* pSdrView, SfxRequest& rReq, SfxBindings& rBi
{ {
String aStr( SVX_RES( RID_SVXSTR_UNDO_APPLY_FONTWORK_SHAPE ) ); String aStr( SVX_RES( RID_SVXSTR_UNDO_APPLY_FONTWORK_SHAPE ) );
pSdrView->BegUndo( aStr ); pSdrView->BegUndo( aStr );
pSdrView->AddUndo( new SdrUndoAttrObj( *pObj ) ); pSdrView->AddUndo( pSdrView->GetModel()->GetSdrUndoFactory().CreateUndoAttrObject( *pObj ) );
SdrCustomShapeGeometryItem aGeometryItem( (SdrCustomShapeGeometryItem&)pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ); SdrCustomShapeGeometryItem aGeometryItem( (SdrCustomShapeGeometryItem&)pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
GetGeometryForCustomShape( aGeometryItem, aCustomShape ); GetGeometryForCustomShape( aGeometryItem, aCustomShape );
pObj->SetMergedItem( aGeometryItem ); pObj->SetMergedItem( aGeometryItem );
@ -583,7 +583,7 @@ void FontworkBar::execute( SdrView* pSdrView, SfxRequest& rReq, SfxBindings& rBi
{ {
String aStr( SVX_RES( nStrResId ) ); String aStr( SVX_RES( nStrResId ) );
pSdrView->BegUndo( aStr ); pSdrView->BegUndo( aStr );
pSdrView->AddUndo( new SdrUndoAttrObj( *pObj ) ); pSdrView->AddUndo( pSdrView->GetModel()->GetSdrUndoFactory().CreateUndoAttrObject( *pObj ) );
SdrCustomShapeGeometryItem aGeometryItem( (SdrCustomShapeGeometryItem&)pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ); SdrCustomShapeGeometryItem aGeometryItem( (SdrCustomShapeGeometryItem&)pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
impl_execute( pSdrView, rReq, aGeometryItem, pObj ); impl_execute( pSdrView, rReq, aGeometryItem, pObj );
pObj->SetMergedItem( aGeometryItem ); pObj->SetMergedItem( aGeometryItem );