11.3.1 Clipboard Creation - Client Application Tests

From the user's perspective, the Edit Copy command should put an object on the clipboard with the object type preserved. For example, if an embedded object is copied to the clipboard, then a paste operation in the client application can only create an embedded object. Similarly, if a linked object is copied to the clipboard, the client application would paste a linked object.

To paste an object, the client application calls OleCreateFromClip to create the object. The client application should then call OleQueryType to find out the object's type. The Paste command is enabled only if there is data on the clipboard.

The Paste Link command creates either a new linked, packaged, or handled object from clipboard data. The object type is dependent upon the information available on the clipboard.

If the Paste Link command is active (as opposed to being dimmed), the application is aware that link information is available on the clipboard. The client application will call OleCreateLinkFromClip to create the object. It should also call OleQueryType to get the object type. The object type will be embedded for packaged objects.

11.3.1.1 Copying and Pasting Static Data into a Client Application Document Test Case Cli-1

Precondition

The Native, Ownerlink, and ObjectLink OLE data formats are not on the clipboard.

The presentation data on the clipboard is compatible with the client application.

Procedure

In the client application, choose Edit Paste to paste the data into the client application document.

Postcondition

Object data should appear in the client application document.

The created object will be static.

11.3.1.2 Copying and Pasting an Embedded Object into a Client Application Document Test Case Cli-2

Precondition

A server application's Native and OwnerLink formats are on the clipboard, but they are not necessarily active.

Other presentation formats that are compatible with the client application are on the clipboard.

Procedure

In the client application, choose Edit Paste to embed the object into the client application document.

Postcondition

The embedded object should appear in the client application document.

The presentation size of the object, as it appears in the client application document, is determined by the server application.

Similar Cases

Create a handler embedded object using a server application that supports handler objects.

Create a packaged object using the Microsoft Windows 3.1 File Manager or the test tool, SRTEST.EXE.

Special Case

Use the Clipboard and Set Clipboard Options in SRTEST.EXE to put the Text and RTF formats on the clipboard. Check that the paste works correctly in the client application. The client application will take care of the presentation drawing if an object is created.

11.3.1.3 Copying and Pasting a Linked Object into a Client Application Document Test Case Cli-3

Precondition

The server application supports linking of its objects.

Only the ObjectLink format is on the clipboard (use SRTEST.EXE if required).

Other presentation formats that are compatible with the client application are on the clipboard.

Procedure

In the client application, choose Edit Paste Link to create a linked object to the client application document.

Postcondition

A linked object should appear in the client application document. The presentation depends on characteristics of the client application.

The presentation size of the object, as it appears in the client application document, is determined by the server application.

The newly created object should be immediately linked if the server application and the corresponding document are open.

Special Cases

Choose Clipboard Options in SRTEST.EXE to select Text and RTF formats, but not picture, DIB, or bitmap formats for placement on the clipboard. Check in the client application to see if the paste operation works properly (if the paste is enabled, it should create the linked object).

Similar Cases

Create a handler linked object.

Create a packaged object using SRTEST.EXE.

11.3.1.4 Copying and Paste Linking a Server Application Object into a Client Application Document Test Case Cli-4

Precondition

ObjectLink format is present on the clipboard from any server application.

The data on the clipboard has been saved in a file.

The presentation data is compatible with the client application.

Procedure

In the client application, choose Edit Paste Link to paste a link to the object from the clipboard into the client application document.

Postcondition

The object should appear in the client application document. Its presentation data will depend on the characteristics of the client application.

The object should establish an automatic link if the server application document is open.

The presentation size of the object, as it appears in the client application document, is determined by the server application.

Similar Cases

Try to create a link when the server application is not running, or when it is running but the linked document is not open.

The server application is running and has an open linked document, but it is blocked. The object is not completely created before the server application is unblocked. Try manipulating the object. The application may prevent operations on the object. Verify that this condition is handled properly.

The server application is running and has an open linked document, but it is busy. The client application may refuse to create the object or it may display a busy dialog box.

Create a handler link and compare the results.

Use SRTEST.EXE to put the filename format on the clipboard and create a packaged object using Paste Link.

11.3.1.5 Copying and Paste Linking Unsuccessful Test Case Cli-5

Precondition

The client application supports compound documents.

ObjectLink data is not on the clipboard.

Postcondition

The client application's Edit Paste Link command is disabled.

Otherwise, if ObjectLink is available or OwnerLink is available without Native data, the link should be created.