Examples of XDrawPageSupplier


Examples of com.sun.star.drawing.XDrawPageSupplier

                UnoRuntime.queryInterface(XDrawPagesSupplier.class, oDoc);
                oDP = (XDrawPage) UnoRuntime.queryInterface(XDrawPage.class, oDPS.getDrawPages().getByIndex(0));
            } else {
               

            XDrawPageSupplier oDPS = (XDrawPageSupplier)
                UnoRuntime.queryInterface(XDrawPageSupplier.class, oDoc);
            oDP = oDPS.getDrawPage();
            }
            XShapes shapes = (XShapes) UnoRuntime.queryInterface
                (XShapes.class, oDP);
            XShape button = FormTools.createControlShape
                (oDoc, 100, 100, 10000, 50000, "CommandButton");
View Full Code Here

Examples of com.sun.star.drawing.XDrawPageSupplier

            // get internal service factory of the document
            XMultiServiceFactory xCalcFactory = (XMultiServiceFactory)UnoRuntime.queryInterface(
                XMultiServiceFactory.class, xCalcComponent);
            // get Drawpage
            XDrawPageSupplier xDrawPageSupplier = (XDrawPageSupplier)UnoRuntime.queryInterface(XDrawPageSupplier.class, sheet);
            XDrawPage xDrawPage = xDrawPageSupplier.getDrawPage();

            // create and insert RectangleShape and get shape text, then manipulate text
            Object calcShape = xCalcFactory.createInstance(
                "com.sun.star.drawing.RectangleShape");
            XShape xCalcShape = (XShape)UnoRuntime.queryInterface(
View Full Code Here

Examples of com.sun.star.drawing.XDrawPageSupplier

                    // And set the AnchorTypes of both shapes to 'AT_PARAGRAPH'
                    xRectProps.setPropertyValue ( "AnchorType", TextContentAnchorType.AT_PARAGRAPH );
                    xEllipseProps.setPropertyValue ( "AnchorType", TextContentAnchorType.AT_PARAGRAPH );

                    // Access the XDrawPageSupplier interface of the document
                    XDrawPageSupplier xDrawPageSupplier = ( XDrawPageSupplier) UnoRuntime.queryInterface (
                            XDrawPageSupplier.class, mxDoc );

                    // Get the XShapes interface of the draw page
                    XShapes xShapes = ( XShapes ) UnoRuntime.queryInterface (
                            XShapes.class, xDrawPageSupplier.getDrawPage () );

                    // Add both shapes
                    xShapes.add ( xEllipse );
                    xShapes.add ( xRect );
View Full Code Here

Examples of com.sun.star.drawing.XDrawPageSupplier

   *
   * @author Markus Kr�ger
   * @date 25.01.2007
   */
  public IFormService getFormService() {
    XDrawPageSupplier drawPageSupplier = ((XDrawPageSupplier) UnoRuntime.queryInterface(XDrawPageSupplier.class,
        xComponent));
    if (drawPageSupplier != null) {
      XDrawPage drawPage = drawPageSupplier.getDrawPage();
      if (drawPage != null) {
        return new FormService(this, drawPage);
      }
    }
    return null;
View Full Code Here

Examples of com.sun.star.drawing.XDrawPageSupplier

   *
   * @author Markus Kr�ger
   * @date 25.01.2007
   */
  public IFormService getFormService() {
    XDrawPageSupplier drawPageSupplier = ((XDrawPageSupplier) UnoRuntime
        .queryInterface(XDrawPageSupplier.class, xComponent));
    if (drawPageSupplier != null) {
      XDrawPage drawPage = drawPageSupplier.getDrawPage();
      if (drawPage != null) {
        return new FormService(this, drawPage);
      }
    }
    return null;
View Full Code Here

Examples of com.sun.star.drawing.XDrawPageSupplier

            // get internal service factory of the document
            XMultiServiceFactory xCalcFactory = (XMultiServiceFactory)UnoRuntime.queryInterface(
                XMultiServiceFactory.class, xCalcComponent);
            // get Drawpage
            XDrawPageSupplier xDrawPageSupplier = (XDrawPageSupplier)UnoRuntime.queryInterface(XDrawPageSupplier.class, sheet);
            XDrawPage xDrawPage = xDrawPageSupplier.getDrawPage();

            // create and insert RectangleShape and get shape text, then manipulate text
            Object calcShape = xCalcFactory.createInstance(
                "com.sun.star.drawing.RectangleShape");
            XShape xCalcShape = (XShape)UnoRuntime.queryInterface(
View Full Code Here

Examples of com.sun.star.drawing.XDrawPageSupplier

                                          TextContentAnchorType.AT_PARAGRAPH );
            xEllipseProps.setPropertyValue ( "AnchorType",
                                             TextContentAnchorType.AT_PARAGRAPH );

            // Access the XDrawPageSupplier interface of the document
            XDrawPageSupplier xDrawPageSupplier = (XDrawPageSupplier)
                UnoRuntime.queryInterface (XDrawPageSupplier.class, mxDoc );

            // Get the XShapes interface of the draw page
            XShapes xShapes = ( XShapes ) UnoRuntime.queryInterface (
                XShapes.class, xDrawPageSupplier.getDrawPage () );
           
            // Add both shapes
            xShapes.add ( xEllipse );
            xShapes.add ( xRect );
View Full Code Here

Examples of com.sun.star.drawing.XDrawPageSupplier

        // knitt both
        xShape.setControl( controlModel );

        // add the shape to the shapes collection of the document
        SpreadsheetDocument spreadsheetDoc = (SpreadsheetDocument)m_currentDocument;
        final XDrawPageSupplier suppDrawPage = UnoRuntime.queryInterface( XDrawPageSupplier.class,
            spreadsheetDoc.getSheet( 0 ) );
        final XDrawPage insertIntoPage = suppDrawPage.getDrawPage();

        final XShapes sheetShapes = UnoRuntime.queryInterface( XShapes.class, insertIntoPage );
        sheetShapes.add( xShape );

        return UnoRuntime.queryInterface( XPropertySet.class, controlModel );
View Full Code Here

Examples of com.sun.star.drawing.XDrawPageSupplier

                                          TextContentAnchorType.AT_PARAGRAPH );
            xEllipseProps.setPropertyValue ( "AnchorType",
                                             TextContentAnchorType.AT_PARAGRAPH );

            // Access the XDrawPageSupplier interface of the document
            XDrawPageSupplier xDrawPageSupplier = (XDrawPageSupplier)
                UnoRuntime.queryInterface (XDrawPageSupplier.class, mxDoc );

            // Get the XShapes interface of the draw page
            XShapes xShapes = ( XShapes ) UnoRuntime.queryInterface (
                XShapes.class, xDrawPageSupplier.getDrawPage () );
           
            // Add both shapes
            xShapes.add ( xEllipse );
            xShapes.add ( xRect );
View Full Code Here

Examples of com.sun.star.drawing.XDrawPageSupplier

    }

    /* ------------------------------------------------------------------ */
    protected XControlModel getListBoxModel( XSpreadsheet sheet )
    {
        XDrawPageSupplier suppPage = (XDrawPageSupplier)UnoRuntime.queryInterface(
            XDrawPageSupplier.class, sheet );
        FormComponent formsRoot = new FormComponent( suppPage.getDrawPage() );
        XControlModel listBoxModel = (XControlModel)formsRoot.getByIndex( 0 ).
            getByName( "ListBox" ).query( XControlModel.class );
        return listBoxModel;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.