Links in OpenDoc Parts
Volume Number: 13
Issue Number: 6
Column Tag: develop
Supporting Links in Your OpenDoc Part
by Mike Halpin and Elizabeth Dykstra-Erickson
OpenDoc linking enables users to maintain synchronized copies of content at multiple
locations, so that they can reuse content without having to manually update each time a
change is made to the master copy. You may be wondering whether it's time to support
linking in your part editor. This article will help you assess the difficulty and
desirability of doing so -- and includes useful code samples to get you off to a quick
start. In addition, it discusses linking-related requirements that apply to all parts.
Suppose a user is creating a presentation from numeric data in a spreadsheet and
wants to display the same data in a variety of ways. If both the spreadsheet part editor
and the presentation part editor support linking, the user can link the data and create
simple to sophisticated visualizations of the data without reentering it. In addition, if
the data is live (for example, if it's being generated by a stock ticker), real-time data
changes can be displayed dynamically in multiple ways throughout the presentation.
Here's another scenario: The user is preparing a very large document that's shared by
multiple users. If the part editors employed in the document support linking, all users
can link content for which they're responsible from one portion of the document to
another, keeping it synchronized at their discretion. Text, numeric data, and graphic
elements can be linked to facilitate easy, immediate updates to complex documents.
Or maybe a user is creating a schematic that uses the same set of symbols in many
locations. If the schematic part supports linking, the user need only create each
symbol once, place it in a library, and link it to each destination location. That way, if
a symbol needs to be changed, the user need only modify the source and update the links
to refresh each instance of the symbol. This could be useful for symbols, shapes, or
labels used on blueprints, engineering diagrams, flowcharts, organization charts,
calendars -- you name it.
These examples should give you an inkling of the kind of power you put in users' hands
when you support linking in your OpenDoc part. Although the user needs to plan ahead
and spend the time to create the links, the link interface is easy to use and can save a
lot of time and effort for data that's expected to change frequently but must be kept in