InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IScrapUtils Class Referenceabstract

#include <IScrapUtils.h>

Inheritance diagram for IScrapUtils:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ISCRAPUTILS }
 

Public Member Functions

virtual void CopyObjects (const UIDList *srcItems, UIDList *destItems, IPMUnknown *pmobject=nil)=0
 
virtual UID CopyObject (const UIDRef &srcItem, IDataBase *targetDB, IPMUnknown *pmobject=nil)=0
 
virtual UID CopyMappedObject (const UIDRef &srcItem, IDataBase *targetDB, IPMUnknown *pmobject=nil)=0
 
virtual void CopyObjectInto (IPMUnknown *sourceItem, IPMUnknown *destinationItem, bool16 dirtyDestination)=0
 
virtual void CopyPageItemObjects (const UIDList *srcItems, UIDList *destItems, IPMUnknown *pmobject=nil)=0
 
virtual UID CopyPageItemObject (const UIDRef &srcItem, IDataBase *targetDB, IPMUnknown *pmobject=nil)=0
 
virtual bool16 IsScrapDB (IDataBase *db)=0
 
virtual void UpdateOriginalLayerOnPaste (const UIDList &items)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

IID_ISCRAPUTILS interface; Uitlity functions that helps make a copy of item(s) adding to destination database. The parameter IPMUnknown* pmobject = nil has root to as early as 1998 (change list #6), but not sure what it is exactly for; Our current code base has just a few instance of usage, I will list the usage instead.

Member Function Documentation

virtual UID IScrapUtils::CopyMappedObject (const UIDRefsrcItem,
IDataBasetargetDB,
IPMUnknownpmobject = nil 
)
pure virtual

Makes a copy of the source item in the target database. Use this function only if you are copying an object (during mapping) which is being mapped. This doesn't use IXReferenceUID to keep track of copy context, rather uses IMappingSession for that purpose.

Parameters
srcItemIN Item to copy.
*targetDBIN Target DB.
pmobjectIN ?.Passed in from IReferenceConverter::ConvertReference
virtual UID IScrapUtils::CopyObject (const UIDRefsrcItem,
IDataBasetargetDB,
IPMUnknownpmobject = nil 
)
pure virtual

Makes a copy of the source item in the target database.

Parameters
srcItemIN Item to copy.
*targetDBIN Target DB.
pmobjectIN ?.Passed in from IReferenceConverter::ConvertReference
virtual void IScrapUtils::CopyObjectInto (IPMUnknownsourceItem,
IPMUnknowndestinationItem,
bool16 dirtyDestination 
)
pure virtual

Writes the source item into a temporary stream and then reads the stream into the destination item.

Parameters
sourceItemIN Source item.
destinationItemOUT Destination item.
dirtyDestinationIN Should the destination item be dirtied.
virtual void IScrapUtils::CopyObjects (const UIDListsrcItems,
UIDListdestItems,
IPMUnknownpmobject = nil 
)
pure virtual

Makes a copy of each of the items on the source list. The new item is added to the destItems list. The target database for the new items is the database passed in with destItems.

Parameters
srcItemsIN Items to copy.
destItemsOUT New copied items.
pmobjectIN ?. No usage in core code base
virtual UID IScrapUtils::CopyPageItemObject (const UIDRefsrcItem,
IDataBasetargetDB,
IPMUnknownpmobject = nil 
)
pure virtual

Makes a copy of the source item in the target database, ignoring the IHierarchy interface

Parameters
srcItemIN Item to copy.
*targetDBIN Target DB.
pmobjectIN ? No usage except called by CopyPageItemObjects.
virtual void IScrapUtils::CopyPageItemObjects (const UIDListsrcItems,
UIDListdestItems,
IPMUnknownpmobject = nil 
)
pure virtual

Makes a copy of each of the pageitems on the srcItems. The new item is added to the destItems list. The target database for the new pageitems is the database passed in with destItems.

Parameters
srcItemsIN Items to copy.
destItemsOUT Items copied.
pmobjectIN ?. Only usage in PasteGraphicItemCmd, pass in this pointer of Command
virtual bool16 IScrapUtils::IsScrapDB (IDataBasedb)
pure virtual

Returns Used to check to see if a given database is the scrap database.

Parameters
dbIN IDatabase to test.
Returns
kTrue if db is the scrap database
virtual void IScrapUtils::UpdateOriginalLayerOnPaste (const UIDListitems)
pure virtual

Internal use only - please do not use this Update the original layer information, which was there in the source before grouping items after the paste/drop is completed

Parameters
newItemsIN list of pasted items.
Returns
none.