thats very easy to find out, do not be afraid to grep for something. If
you grep for SetBackgroundObj(0)
you will soon find something like

if( mbPageBckgrdDeleted )
{
mpBackgroundObjUndoAction = new SdBackgroundObjUndoAction( *mpDoc,
*mpPage, mpPage->GetBackgroundObj() );
mpPage->SetBackgroundObj( NULL );
mpPage->ActionChanged();
}

You can compile multiple undo actions into one undo action if you call
BegUndo([put name of your undo here]) before you add
other undo actions and EndUndo() after you added your last undo actions.
Then only one undo list action will be on top of the
undo stack and it will undo all your actions at once.

Regards,
Christian


zhaoshengoutside wrote:
> Hi:
>
> Christian Lippka wrote:
>   
>> You can check if SdrPage::GetBackgroundObj() returns a non null pointer.
>> In that case the slide
>> has a background set. You can clear the background of a slide by calling
>> SdrPage::SetBackgroundObj(0).
>> But don't forget to add an undo event or bad things will happen.
>>     
>
> I did so, and it worked, now I can change all the background setting to all
> the slides, and I add the code before the mast page setting take effection,
> but still one small issue:
> it is in the undo stack, and if I do that in series, if I change one
> slide's
> background setting, and choose to only set this slide, then if I change
> background
> to all the slides, now, all the slides change to the same setting, but
> then ,if I
> undo the last action, all the slides go to white, which means no
> background setting.
> but the slide changed before is suppose to have some sort of background.
>
> I guess, it is what you said the Undo event should be added.how can I
> remember the changes, after I invoke SetBackgroundObj(0); another
> probelm occur,
> if seriese of single change to some slides, how can remember all of the
> changes
> by sequence?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to