css::util::Color getCol(int r, int g, int b);
Reference<XComponent> openDraw(Reference<XComponentContext> xComponentContext);
Reference<XShape> createShape(Reference<XComponent> xDocComp, int height, int width, int x, int y,
OUString kind, css::util::Color col);
Reference<XShapeGroup> createSequence(Reference<XComponent> xDocComp, Reference<XDrawPage> xDP);
int main()
{
Reference<XComponentContext> xContext = NULL;
Reference<XShape> createShape(Reference<XComponent> xDocComp, int height, int width, int x, int y,
OUString kind, css::util::Color col)
{ // kind can be either 'Ellipse', 'Line' or 'Rectangle'
Size size;
Point position;
Reference<XShape> xShape;
// get the multiservice factory
Reference<XMultiServiceFactory> xDocMSF(xDocComp, UNO_QUERY);
Reference<XShapeGroup> createSequence(Reference<XComponent> xDocComp, Reference<XDrawPage> xDP)
{
Size size;
Point position;
Reference<XShape> xShape;
Reference<XShapes> xShapes(xDP, UNO_QUERY); int height = 2000; int width = 2500; int x = 1800; int y = 22000;
Reference<XInterface> oInt; int r = 30; int g = 0; int b = 70;
// getting the multiservice factory
Reference<XMultiServiceFactory> xDocMSF(xDocComp, UNO_QUERY);
for (int i = 0; i < 380; i = i + 30)
{ try
{
oInt = xDocMSF->createInstance("com.sun.star.drawing.EllipseShape");
xShape = Reference<XShape>(oInt, UNO_QUERY);
size.Height = height;
size.Width = width;
position.X = x + (i * 40);
position.Y = y + (i * 40) % 4000;
xShape->setSize(size);
xShape->setPosition(position);
} catch (Exception e)
{ // Some exception occurs.FAILED
std::cout << "Could not get Shape." << std::endl << e.Message << std::endl; exit(1);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.