Language:

The Free and Open Productivity Suite
Apache OpenOffice 4.1.4 released

Developer's Guide

API

SDK

Tips 'n' Tricks

Miscellaneous


:: com :: sun :: star :: embed ::

interface XLinkageSupport
Base Interfaces
XLinkageSupportXCommonEmbedPersist

XCommonEmbedPersist
(referenced interface's summary:)
specifies common implementation for embedded objects and links persistence.
Description
specifies an additional implementation for linked embedded object support.

Methods' Summary
breakLink breaks the link and provides the object with a parent storage and a name for object's entry  
isLink allows to detect whether the object is a linked one.  
getLinkURL returns the URL of the link object.  
Methods' Details
breakLink
void
breakLink( [in] XStorage  xStorage,
[in] string  sEntryName )
raises( ::com::sun::star::lang::IllegalArgumentException,
WrongStateException,
::com::sun::star::io::IOException,
::com::sun::star::uno::Exception );

Description
breaks the link and provides the object with a parent storage and a name for object's entry

This method can be used only for links implementations that implement the whole set of embedded object interfaces. Usually the sets of interfaces are the same for links and objects. An example of exception from this are OOo links that do not implement XEmbedPersist interface. For such cases the method will throw an exception.

The link will be broken and the linked object will become a normal embedded object.

An entry with the specified name should be created\opened inside provided storage. This entry will be used for the object persistence. If the entry exists already all it's contents will be ignored.

Parameter xStorage
a parent storage the entry should be created\opened in
Parameter sEntryName
a name for the entry
Throws
::com::sun::star::lang::IllegalArgumentException one of arguments is illegal
Throws
com::sun::star::embed::WrongStateException the object is in wrong state or not a linked object
Throws
com::sun::star::io::IOException in case object has not persistence or other io problems
Throws
com::sun::star::uno::Exception in case of other problems
See also
also
XEmbedPersist::setPersistentEntry
isLink
boolean
isLink()
raises( WrongStateException );

Description
allows to detect whether the object is a linked one.

Most of embedded objects will not support this interface, but some of them can do it, to allow conversion from link to object. After the conversion the object does not change, so interface set staies the same, but the object is not a link any more.

Returns
true - the object is a linked one. false - otherwise
Throws
com::sun::star::embed::WrongStateException the object is in wrong state
getLinkURL
string
getLinkURL()
raises( WrongStateException,
::com::sun::star::uno::Exception );

Description
returns the URL of the link object.
Throws
com::sun::star::embed::WrongStateException the object is in wrong state or is not a link
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache and the Apache feather logo are trademarks of The Apache Software Foundation. OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.