InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
SnpCopyPasteTable Class Reference

Public Member Functions

 SnpCopyPasteTable ()
 
virtual ~SnpCopyPasteTable ()
 
ErrorCode DoCopyPaste (const ITableModel *fromTable, ITableModel *toTable, const GridAddress &pasteAt, ITableModel::EWhatState whatState=ITableModel::eAll) const
 

Detailed Description

  • Copy paste a table content into another table
  • How to create a new text frame and activate the corresponding tool

Illustrates use of command that allows a table to be copied and pasted.

Precondition: There is one table selected. The snippet will create a table in a new text frame with proper text focus and tool selected, then copy the selected table contents and paste into the new table.

See Also
kTableCopyPasteCmdBoss
ITool
ILayoutControlData
IGraphicFrameData
SDKLayoutHelper

Constructor & Destructor Documentation

SnpCopyPasteTable::SnpCopyPasteTable ()
inline

Constructor.

virtual SnpCopyPasteTable::~SnpCopyPasteTable ()
inlinevirtual

Destructor.

Member Function Documentation

ErrorCode SnpCopyPasteTable::DoCopyPaste (const ITableModelfromTable,
ITableModeltoTable,
const GridAddresspasteAt,
ITableModel::EWhatState whatState = ITableModel::eAll 
) const

Shows how to copy a table to another table, by using CopyPasteTableCmd.

Parameters
fromTableThe source table model to copy from.
toTableThe destination table model to copy to.
pasteAtThe target grid address to copy to.
whatStateEWhatState enum that specifies what to copy. See {ITableModel::EWhatState} for details.
Returns
kSuccess on success, kFailure otherwise.