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

#include <IAppPrefsImportOptions.h>

Inheritance diagram for IAppPrefsImportOptions:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IAPPPREFSIMPORTOPTIONS }
 
enum  ListImportMatchAction { kReplaceListItems, kUseExistingListItems }
 

Public Member Functions

virtual void SetHandleListItemsWithMatchingNames (ListImportMatchAction action)=0
 
virtual ListImportMatchAction HandleListItemsWithMatchingNames () const =0
 
virtual void SetDeleteNonImportedListItems (bool16 deleteNonImported)=0
 
virtual bool16 DeleteNonImportedListItems () const =0
 
virtual void ModelSetHandleListItemsWithMatchingNames (ListImportMatchAction action)=0
 
virtual void ModelSetDeleteNonImportedListItems (bool16 deleteNonImported)=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

Importing Application Prefs that were exported via Utils<ISnippetExport>->ExportAppPrefs() is done via ISnippetImport::ImportFromStream() Importing this way does not allow options for importing, so instead, the options for importing AppPrefs are stored in this interface on the Workspace

This interface allows you to set import options that will be used during ISnippetImport::ImportFromStream()

See Also
ISnippetImport
ISnippetExport

Member Function Documentation

virtual bool16 IAppPrefsImportOptions::DeleteNonImportedListItems () const
pure virtual

Should non-imported list items be deleted. See SetDeleteNonImportedListItems() for more info

Returns
kTrue to delete on-imported list items, kFalse to keep them
virtual ListImportMatchAction IAppPrefsImportOptions::HandleListItemsWithMatchingNames () const
pure virtual

Returns whether we should replace existing list elements or use the existing elements. See SetHandleListItemsWithMatchingNames()

Returns
kReplaceListItems to replace list items, kUseExistingListItems to use existing list items
virtual void IAppPrefsImportOptions::ModelSetDeleteNonImportedListItems (bool16 deleteNonImported)
pure virtual

This method is called by the command to set the actual values. This should not be called by clients, instead call SetDeleteNonImportedListItems()

virtual void IAppPrefsImportOptions::ModelSetHandleListItemsWithMatchingNames (ListImportMatchAction action)
pure virtual

This method is called by the command to set the actual values. This should not be called by clients, instead call SetHandleListItemsWithMatchingNames()

virtual void IAppPrefsImportOptions::SetDeleteNonImportedListItems (bool16 deleteNonImported)
pure virtual

When app prefs are imported, the standard behavior is to replace an entire list with the new set of imported items. The standard behavior is to delete non-imported items. That means if we have items A, B and C before import and the imported items are A, B and D, we should end up with A, B and D. C was non-imported, so it was deleted If, however, DeleteNonImportedListItems was false, we'd end up with A, B, C and D. A merge of both lists.

Parameters
deleteNonImportedspecifies whether pre-existing list elements that were not part of the import should be deleted
virtual void IAppPrefsImportOptions::SetHandleListItemsWithMatchingNames (ListImportMatchAction action)
pure virtual

When named list items in the app prefs, like Swatches, Text Styles, etc. are imported, there is the potential to run into name conflicts. If we are importing an item named "Headline" and we already have a list item named "Headline", there are 2 choices. We can either use the already existing version of "Headline" in the list or we can replace the existing version with the version of "Headline" that is being imported. This method processes a command to set the values, so it can be called from outside a transaction

Parameters
actionspecifies whether list elements with matching names should use the existing element or replace it