*Page zero is the first page.* Once you have a drawing document, obtain one of its pages.FUNCTION OOoGetDrawPage( oDrawDoc, nPageNum )LOCAL oPages
oPages = oDrawDoc.GetDrawPages()LOCAL oPage
oPage = oPages.GetByIndex( nPageNum )RETURN oPage
ENDFUNC

* Given a draw document,create a shape.* The shape must be added to the drawpage,by calling
* the drawpage's Add() method.* The oPosition and oSize arguments are optional, but you may
* pass a PointandSize struct for these arguments.

* Similar to VFP's built inRGB()function.* Pass in R,G,B valuesand out comes an OpenOffice.orgcolorvalue.*Note that thisis DIFFERENT from how VFP constructs colorvalues.FUNCTION OOoRGB( nRed, nGreen, nBlue )RETURNBITOR(BITOR(BITLSHIFT( nRed,16),BITLSHIFT( nGreen,8)), nBlue )ENDFUNC

*!* * Create a UNO struct object and return it.*!* * This routine is now obsolete.*!* * See a superior implementation of this routine elsewhere*!* * which uses the Bridge_GetStruct() feature of the OLE-UNO bridge.*!* FUNCTION OOoCreateStruct( cTypeName )*!* * Ask service manager for a CoreReflection object.*!* LOCAL oCoreReflection*!* oCoreReflection = OOoGetCoreReflection()*!* *!* * Get the IDL Class for the type name.*!* LOCAL oXIdlClass*!* oXIdlClass = .NULL.