public static XDrawPage getDrawPage ( XTextDocument aDoc ) {
XDrawPage oDP = null;
try {
XDrawPageSupplier oDPS = (XDrawPageSupplier)
UnoRuntime.queryInterface(XDrawPageSupplier.class,aDoc);
oDP = (XDrawPage) oDPS.getDrawPage();
} catch ( Exception e ) {
throw new IllegalArgumentException( "Couldn't get drawpage" );
}
return oDP;
}