| View previous topic :: View next topic |
| Author |
Message |
poekel General User

Joined: 14 Jun 2004 Posts: 8 Location: Germany
|
Posted: Mon Jul 05, 2004 6:30 am Post subject: [JAVA] how to insert additional info for objects? metadata? |
|
|
hej,
is there a way to insert additional data - e.g. metadata - to objects, graphics etc.? this should work like this:
- select a graphic image
- go to a menu entry and add a note to this object
- the note should be hidden and only attached to the selected object
anyone knows?
thanks a lot
poekel |
|
| Back to top |
|
 |
DannyB Moderator


Joined: 02 Apr 2003 Posts: 3991 Location: Lawrence, Kansas, USA
|
|
| Back to top |
|
 |
poekel General User

Joined: 14 Jun 2004 Posts: 8 Location: Germany
|
Posted: Wed Jul 07, 2004 5:38 am Post subject: |
|
|
oh thanks,
but i don't know how to use this in a text document. here some further examples of my code...i successfully determine that a graphic is selected:
| Code: | XController xFramecontroller = m_xFrame.getController();
XSelectionSupplier xselectionsupplier = (XSelectionSupplier) UnoRuntime.queryInterface(XSelectionSupplier.class, xFramecontroller);
Object objectSelection = xselectionsupplier.getSelection();
XServiceInfo xserviceinfo = ( XServiceInfo ) UnoRuntime.queryInterface(XServiceInfo.class, objectSelection );
if ( xserviceinfo.supportsService("com.sun.star.text.TextGraphicObject" )) {
// now i can access all properties of the textGraphicObject service
props = UnoRuntime.queryInterface(XPropertySet.class, objectSelection);
// ...so i can invert the selected graphic
props.setPropertyValue("GraphicIsInverted", new Boolean(true));
}
|
but now my problem is to attach additional content - user defined attributes or something else - to this object...
what can i do?
greetz
dennis |
|
| Back to top |
|
 |
|