Package com.sun.star.uno

Examples of com.sun.star.uno.Type


        if (currentContext && !internal
            && funId != MethodDescription.ID_RELEASE)
        {
            marshal.writeInterface(
                UnoRuntime.getCurrentContext(),
                new Type(XCurrentContext.class));
        }
        ITypeDescription[] inSig = desc.getInSignature();
        ITypeDescription[] outSig = desc.getOutSignature();
        for (int i = 0; i < inSig.length; ++i) {
            if (inSig[i] != null) {
View Full Code Here


        try {
            XConnection the_connection = null;
           
            try {
                the_connection = (XConnection) AnyConverter.toObject(
                                    new Type(XConnection.class),
                                    oObj.getPropertyValue("ActiveConnection"));
            } catch (com.sun.star.lang.IllegalArgumentException iae) {
                throw new StatusException("couldn't convert Any",iae);
            }           
           
View Full Code Here

    }

    // XTypeProvider
    public Type[] getTypes() throws com.sun.star.uno.RuntimeException {
      try {
        return new Type[]{new Type(XBridgeTest.class), new Type(XRecursiveCall.class), new Type(XServiceInfo.class), new Type(XTypeProvider.class)};
      }
      catch(Exception exception) {
        throw new com.sun.star.uno.RuntimeException(exception.getMessage());
      }
    }
View Full Code Here

                new Any(Type.BOOLEAN, Boolean.TRUE),
                new boolean[] { true },
                new byte[] { Byte.MIN_VALUE },
                new short[] { Short.MIN_VALUE },
                new Any(
                    new Type("[]unsigned short"), new short[] { (short) -1 }),
                new int[] { Integer.MIN_VALUE },
                new Any(new Type("[]unsigned long"), new int[] { -1 }),
                new long[] { Long.MIN_VALUE },
                new Any(new Type("[]unsigned hyper"), new long[] { -1L }),
                new float[] { 0.123f },
                new double[] { 0.456 },
                new char[] { 'X' },
                new String[] { "test" },
                new Type[] { Type.ANY },
                new Any(new Type("[]any"), new Boolean[] { Boolean.TRUE }),
                new boolean[][] { new boolean[] { true } },
                new Object[][] {
                    new Object[] { new Any(Type.BOOLEAN, Boolean.TRUE) } },
                new TestEnum[] { TestEnum.TWO },
                new TestStruct[] { new TestStruct(10) },
                new Any(
                    new Type(
                        "[]test.testtools.bridgetest.TestPolyStruct<boolean>"),
                    new TestPolyStruct[] { new TestPolyStruct(Boolean.TRUE) }),
                new Any(
                    new Type("[]test.testtools.bridgetest.TestPolyStruct<any>"),
                    new TestPolyStruct[] {
                        new TestPolyStruct(new Any(Type.BOOLEAN, Boolean.TRUE))
                    }),
                new XInterface[] { null },
                TestEnum.TWO,
                new TestStruct(10),
                new Any(
                    new Type(
                        "test.testtools.bridgetest.TestPolyStruct<boolean>"),
                    new TestPolyStruct(Boolean.TRUE)),
                new Any(
                    new Type("test.testtools.bridgetest.TestPolyStruct<any>"),
                    new TestPolyStruct(new Any(Type.BOOLEAN, Boolean.TRUE))),
                null });
            Constructors2.create1(
                context,
                new TestPolyStruct(Type.LONG),
View Full Code Here

        testProperty("UserDefinedAttributes", new PropertyTester() {
            protected Object getNewValue(String propName, Object oldValue) {
                XNameContainer NC = null;
                try {
                    NC = (XNameContainer)
                    AnyConverter.toObject(new Type(XNameContainer.class),oldValue);
                    NC.insertByName("MyAttribute",
                        new AttributeData("","CDATA","Value"));
                } catch ( com.sun.star.lang.IllegalArgumentException e ) {
                    log.println("Failed to check 'UserDefinedAttributes'");
                    e.printStackTrace(log);
View Full Code Here

    public void insertHiddenControl(XNameAccess xNameAccess, XNameContainer xNamedForm, String ControlName, String ControlValue) {
    try {
        XInterface xHiddenControl;
        if (xNameAccess.hasByName(ControlName) == true)
            xHiddenControl = (XInterface) AnyConverter.toObject(new Type(XInterface.class), xNameAccess.getByName(ControlName));
        else {
            xHiddenControl = (XInterface) xMSFDoc.createInstance("com.sun.star.form.component.HiddenControl");
            xNamedForm.insertByName(ControlName, xHiddenControl);
        }
        Helper.setUnoPropertyValue(xHiddenControl, "HiddenValue", ControlValue);
View Full Code Here

    public XNameContainer getFormByName(String _sname){
    XNameContainer xNamedForm = null;
    try {
        if (xNamedForms.hasByName(_sname)) {
            Object oDBForm = AnyConverter.toObject(new Type(XInterface.class), Helper.getUnoObjectbyName(xNamedForms, _sname));
            xNamedForm = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, oDBForm);
        }
    } catch (IllegalArgumentException e) {
        e.printStackTrace(System.out);
    }
View Full Code Here

        XController xc = xm.getCurrentController();
        XIndexAccess xIA = (XIndexAccess)
            UnoRuntime.queryInterface(XIndexAccess.class, xc);
        try {
            oObj = (XInterface) AnyConverter.toObject(
                        new Type(XInterface.class),xIA.getByIndex(0));
        } catch (com.sun.star.lang.WrappedTargetException e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't get by index", e);
        } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
            e.printStackTrace(log);
View Full Code Here

            XInterface formats = (XInterface)oMSF.createInstance
                    ("com.sun.star.sheet.TableAutoFormats");
            XIndexAccess formatsIndex = (XIndexAccess)
                    UnoRuntime.queryInterface(XIndexAccess.class, formats);
            oObj = (XInterface) AnyConverter.toObject(
                    new Type(XInterface.class),formatsIndex.getByIndex
                                            (formatsIndex.getCount() - 1));

            XNamed objNamed = (XNamed)
                UnoRuntime.queryInterface(XNamed.class, oObj) ;
            log.println("AutoFormat name is '" + objNamed.getName() + "'") ;
View Full Code Here

        XIndexAccess oIndexAccess = (XIndexAccess) UnoRuntime.queryInterface(
                                            XIndexAccess.class, xSpreadsheets);

        try {
            oSheet = (XSpreadsheet) AnyConverter.toObject(
                             new Type(XSpreadsheet.class),
                             oIndexAccess.getByIndex(0));
        } catch (com.sun.star.lang.WrappedTargetException e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't get a spreadsheet", e);
        } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
View Full Code Here

TOP

Related Classes of com.sun.star.uno.Type

Copyright © 2018 www.massapicom. 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.