Examples of XSelectionSupplier


Examples of com.sun.star.view.XSelectionSupplier

        XController cont1 = model1.getCurrentController();
        XController cont2 = model2.getCurrentController();
        cont1.getFrame().setName("cont1");
        cont2.getFrame().setName("cont2");

        XSelectionSupplier sel = (XSelectionSupplier) UnoRuntime.queryInterface(
                                         XSelectionSupplier.class, cont1);

        XCell toSel = null;
        XCell[] xCalculatableCells = null;
        try {
View Full Code Here

Examples of com.sun.star.view.XSelectionSupplier

        XController cont2 = model2.getCurrentController();

        cont1.getFrame().setName("cont1");
        cont2.getFrame().setName("cont2");

        XSelectionSupplier sel = (XSelectionSupplier) UnoRuntime.queryInterface(
                                         XSelectionSupplier.class, cont1);

        log.println("Adding SelectionSupplier and Shape to select for XModel");
        tEnv.addObjRelation("SELSUPP", sel);
        tEnv.addObjRelation("TOSELECT", the_table);
View Full Code Here

Examples of com.sun.star.view.XSelectionSupplier

            XFrame xFrame = this.xTextDocument.getCurrentController().getFrame();
            int ColCount = xTextTable.getColumns().getCount();
            XCellRange xCellRange = (XCellRange) UnoRuntime.queryInterface(XCellRange.class, xTextTable);
            XCellRange xLocCellRange = xCellRange.getCellRangeByPosition(0, 0, ColCount - 1, 1);
            short iHoriOrient = AnyConverter.toShort(Helper.getUnoPropertyValue(xTextTable, "HoriOrient"));
            XSelectionSupplier xSelection = (XSelectionSupplier) UnoRuntime.queryInterface(XSelectionSupplier.class, xTextDocument.getCurrentController());
            xSelection.select(xLocCellRange);
            Desktop.dispatchURL(_xMSF, ".Uno:DistributeColumns", xFrame);
            Desktop.dispatchURL(_xMSF, ".Uno:SetOptimalColumnWidth", xFrame);
            Helper.setUnoPropertyValue(xTextTable, "HoriOrient", new Short(iHoriOrient));
        }
        catch (Exception exception)
View Full Code Here

Examples of com.sun.star.view.XSelectionSupplier

            }
            public boolean equals(Object obj) {
                return compare(this, obj) == 0;
            } });

        XSelectionSupplier xsel = (XSelectionSupplier)
            UnoRuntime.queryInterface(XSelectionSupplier.class,xContr);
        try {
            xsel.select(second);
        } catch (Exception e) {
            log.println("Couldn't select");
            throw new StatusException( "Couldn't select", e );
        }
View Full Code Here

Examples of com.sun.star.view.XSelectionSupplier

   * @return The XSelectionSupplier interface of the document frame
   * controller.
   */
  public XSelectionSupplier getSelectionSupplier()
  {
    XSelectionSupplier  selection;
    selection  = (XSelectionSupplier)UnoRuntime.queryInterface(
      XSelectionSupplier.class, mFrame.getController());
    return selection;
  }
View Full Code Here

Examples of com.sun.star.view.XSelectionSupplier

   */   
  private XIndexAccess getSelectionIndex()
    throws java.lang.Exception
  {
    XIndexAccess xIndexAccess = null;
    XSelectionSupplier xSelectionSupplier = getSelectionSupplier();

    if (xSelectionSupplier == null)
      throw new Exception("queryCurrentPosition: xSelectionSupplier == null");

    try {
      XInterface xInterface = (XInterface) UnoRuntime.queryInterface(
                XInterface.class,xSelectionSupplier.getSelection());
      xIndexAccess = (XIndexAccess)UnoRuntime.queryInterface(
        XIndexAccess.class,xInterface);
    }
    catch( java.lang.Exception e ) {
      e.printStackTrace(System.err);
View Full Code Here

Examples of com.sun.star.view.XSelectionSupplier

  /** Creates an XSelectionChangeListener and adds it to the active document
   */
  private void initListeners()
  {
    XSelectionSupplier xSelectionSupplier = null;

    if (getFrame() == null) return;

    if (mXSelectionChangeListener == null) {
      try {
View Full Code Here

Examples of com.sun.star.view.XSelectionSupplier

            XFrame xframe = xdesktop.getCurrentFrame();
           
            // Getting the controller.
            XController xcontroller = xframe.getController();
           
            XSelectionSupplier xselectionsupplier =
            ( XSelectionSupplier ) UnoRuntime.queryInterface(
            XSelectionSupplier.class, xcontroller );
           
            Object objectSelection = xselectionsupplier.getSelection();
           
            XServiceInfo xserviceinfo = ( XServiceInfo )
            UnoRuntime.queryInterface( XServiceInfo.class,
            objectSelection );
           
View Full Code Here

Examples of com.sun.star.view.XSelectionSupplier

        PropertyValue param3 = new PropertyValue();
        param3.Name = "Command";
        param3.Value = "biblio";
        params[2] = param3;
       
        final XSelectionSupplier xSelect = (XSelectionSupplier) UnoRuntime.queryInterface(
            XSelectionSupplier.class, xCont);
       
       
        final Object[] initArgs = params;
       
        XInterface oObj = null;
       
        AccessibilityTools at = new AccessibilityTools();
       
        XWindow xWindow = secondController.getFrame().getContainerWindow();
       
        XAccessible xRoot = at.getAccessibleObject(xWindow);
       
        oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.TABLE,
            "Table");
       
        log.println("ImplementationName: " + util.utils.getImplName(oObj));
       
        TestEnvironment tEnv = new TestEnvironment(oObj);
       
        tEnv.addObjRelation("EventProducer",
            new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
            public void fireEvent() {
                try {
                    xSelect.select(params);
                } catch (com.sun.star.lang.IllegalArgumentException ex) {
                }
            }
        });
       
View Full Code Here

Examples of com.sun.star.view.XSelectionSupplier

        param3.Value = "select * from biblio";
        params[2] = param3;
       
        XController xCont = the_frame2.getController();
       
        XSelectionSupplier xSelect = (XSelectionSupplier) UnoRuntime.queryInterface(
            XSelectionSupplier.class, xCont);
       
        try {
            xSelect.select(params);
        } catch (com.sun.star.lang.IllegalArgumentException ex) {
            throw new StatusException("Could not select Biblio-Database", ex);
        }

        shortWait();
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.