Skip to main content
Inspiring
August 5, 2021
Answered

Responder/Notification/Observer for kDuplicateCmdBoss

  • August 5, 2021
  • 1 reply
  • 334 views

Hi,

 

I want to know when page items are duplicated. Command - kDuplicateCmdBoss.

 

I have Document Observer and I am able to observe kCopyPageItemCmdBoss which gets call during paste operation.

 

When user paste then I can get ICopyCmdData->GetInputItems and can determine whether copy is done from kScrapDocBoss or kDocBoss.

 

When user duplicate the spread then I can observe kCreateSpreadFromSpreadCmdBoss and from the duplicated spread, I can retreive the new page items.

 

But I did not find any way to capture kDuplicateCmdBoss and get list of duplicated items.

 

Any clues ?

 

Regards,

Rahul Rastogi

 

 

This topic has been closed for replies.
Correct answer Rahul_Rastogi

Solution -

 

We can observer document with IID_IDUPLICATE_DOCUMENT, command kDuplicateCmdBoss.

1 reply

Inspiring
August 6, 2021

My Investigations till now -

 

Observe kCopyPageItemCmdBoss

ICopyCmdData->GetRootCmd - this will give us kDuplicateCmdBoss.

State of kDuplicateCmdBoss is kNotDone.

 

So I am able to capture duplicate command but I want to know which are the new frames that got created from duplicate command. 

 

Rahul_RastogiAuthorCorrect answer
Inspiring
August 7, 2021

Solution -

 

We can observer document with IID_IDUPLICATE_DOCUMENT, command kDuplicateCmdBoss.