Transformation PlugIns

From RealWorld Wiki

Jump to: navigation, search

Document transformation plug-ins are similar to the operation plug-ins. Instead of modifying the passed document, they create and return a new document, using information from the original one.

Beside the actual document, the operation can also access view states, the current window and current locale identifier. Document transformation should in normal cases not interact with the user, it can return a localized error message should the need arise.

The Sequence operation can harbor multiple operations as well as transformations. It is currently the only way how to use transformations in RealWorld Designer applications. Typical use case is a sequence of transformation followed by an operation that either opens the document created by the operation in new or current window or saves the document.

Contents

[edit] Transformations by class

[edit] Common transformations

  • Display configuration - show a configuration dialog before the transformation is actually executed giving the user a change to modify transformation's parameters. The dialog may contain a preview window.

[edit] Document-specific transformations

[edit] Implementing a Transformation

From technical point of view a Transformation plug-in is a COM class placed in a category CATID_DocumentTransformation and implementing an IDocumentTransformation interface.

GUID CATID_DocumentTransformation =
    {0xd6313391, 0x6375, 0x4e57, {0x9b, 0x8f, 0xbd, 0x6e, 0x83, 0xfa, 0xf5, 0x01}};
Personal tools