#include <IAppPrefsImportOptions.h>
|
| enum | { kDefaultIID = IID_IAPPPREFSIMPORTOPTIONS } |
| |
| enum | ListImportMatchAction { kReplaceListItems, kUseExistingListItems } |
| |
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
| 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 |
| virtual void IAppPrefsImportOptions::ModelSetHandleListItemsWithMatchingNames | ( | ListImportMatchAction | action | ) | |
| pure virtual |
| 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
| deleteNonImported | specifies 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
| action | specifies whether list elements with matching names should use the existing element or replace it |