Kent Gibson schreef:
thanks for the tip about the graphic provider.
urgh, I guess we have the same problem, lack of
documentation.
Alrighty well I don't think I actually need the
graphicprovider, as I can get the XGraphic from the
property (when I did try with the graphic provider I
actually got a unsupported service error). When I try
to get the property Size100thMM I was always get 0 for
height or width. odd.
The Size100thMM is the rersult off warh is found in the header ot the
Original Imagefile.:Pixels divided by /DPI.
Not all imagefiles have a correct DPI, and that results in "0 "for
Size100thMM.
But the SizePixel is ALWAY's pressent and in fact the most important
informatiion. Its up to the user who must diseded how big (and with what
DPI) he will publish a image.
The "actualsize" is something what's calluleted by OO (a big Mistery how
it is done and when it is done) I supose sometimes with the standard
oo-DPI from 96 pixerls.inch and sometimes with the DPI from the original
Image
Using the "provider" gives me the most secure results.
does anyone have any ideas?
regards
######
drawingTextShape = factory.createInstance(
"com.sun.star.drawing.GraphicObjectShape" );
XTextContent xTextContentShapeTemp = ( XTextContent )
UnoRuntime.queryInterface(
XTextContent.class,drawingTextShape );
textHeaderText.insertTextContent( textHeaderText,
xTextContentShapeTemp, true );
XPropertySet xGraphicPropsGOS = ( XPropertySet )
UnoRuntime.queryInterface( XPropertySet.class,
drawingTextShape );
Object xGraphicObject =
xGraphicPropsGOS.getPropertyValue( "Graphic" );
XPropertySet xGraphicPropsGOSX = ( XPropertySet )
UnoRuntime.queryInterface( XPropertySet.class,
xGraphicObject );
Object sizePixelObject =
xGraphicPropsGOSX.getPropertyValue( "Size100thMM" );
actualSize = ( Size ) AnyConverter.toObject(
Size.class, sizePixelObject );
int width = actualSize.Width;
int height = actualSize.Height;
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]