Examples of XPropertySetInfo


Examples of com.sun.star.beans.XPropertySetInfo

            // execute the command
            Object result = xCommandProcessor.execute(command, 0, null);
           
            // check the result
            log.println("Result: "+ result.getClass().toString());
            XPropertySetInfo xPropertySetInfo = (XPropertySetInfo)UnoRuntime.queryInterface(XPropertySetInfo.class, result);
            Property[] props = xPropertySetInfo.getProperties();
            boolean res = false;
            for(int i=0; i<props.length; i++) {
                String propName = props[i].Name;
                res |= propName.equals("DocumentModel");
                log.println("Found property: " + propName + "   type: " + props[i].Type.getTypeName());
View Full Code Here

Examples of com.sun.star.beans.XPropertySetInfo

     */
    public void _FillBitmap() {

        String propName = "FillBitmap";

        XPropertySetInfo info = oObj.getPropertySetInfo();

        if (!info.hasPropertyByName(propName)) {
            if (isOptional(propName)) {
                // skipping optional property test
                log.println("Property '" + propName + "' is optional and not supported");
                tRes.tested(propName, true);
                return;
View Full Code Here

Examples of com.sun.star.beans.XPropertySetInfo

    {
        XPropertySet xFrom = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, _aFrom);
        XPropertySet xTo = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, _aTo);


        XPropertySetInfo xForeignPropInfo = xFrom.getPropertySetInfo();
        XPropertySetInfo xSectionPropInfo = xTo.getPropertySetInfo();
        Property[] aAllProperties = xForeignPropInfo.getProperties();
        for (int i = 0; i < aAllProperties.length; i++)
        {
            String sPropertyName = aAllProperties[i].Name;
            if (xSectionPropInfo.hasPropertyByName(sPropertyName))
            {
                try
                {
                    Property aDestProp = xForeignPropInfo.getPropertyByName(sPropertyName);
                    if ((aDestProp.Attributes & PropertyAttribute.READONLY) == 0)
View Full Code Here

Examples of com.sun.star.beans.XPropertySetInfo

            XServiceInfo xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface(XServiceInfo.class, m_xPropertySet);
            if (xServiceInfo != null)
            {
                sName = xServiceInfo.getImplementationName();
            }
            XPropertySetInfo xInfo = m_xPropertySet.getPropertySetInfo();
            Property[] aAllProperties = xInfo.getProperties();
            DebugHelper.writeInfo("Show all properties of Implementation of :'" + sName + "'");
            for (int i = 0; i < aAllProperties.length; i++)
            {
                DebugHelper.writeInfo(" - " + aAllProperties[i].Name);
            }
View Full Code Here

Examples of com.sun.star.beans.XPropertySetInfo

        // some initializations which are the same for all controls
        XPropertySet xModelProps = UNO.queryPropertySet( xModel );
        try
        {
            XPropertySetInfo xPSI = xModelProps.getPropertySetInfo();
            if ( xPSI.hasPropertyByName( "Border" ) )
            {
                if ( ((Short)xModelProps.getPropertyValue( "Border" )).shortValue() == com.sun.star.awt.VisualEffect.LOOK3D )
                    xModelProps.setPropertyValue( "Border", new Short( com.sun.star.awt.VisualEffect.FLAT ) );
            }
            if ( xPSI.hasPropertyByName( "VisualEffect" ) )
                xModelProps.setPropertyValue( "VisualEffect", new Short( com.sun.star.awt.VisualEffect.FLAT ) );
            if ( m_document.classify() != DocumentType.CALC )
                if ( xPSI.hasPropertyByName( "BorderColor" ) )
                    xModelProps.setPropertyValue( "BorderColor", new Integer( 0x00C0C0C0 ) );
        }
        catch( com.sun.star.uno.Exception e )
        {
            System.err.println(e);
View Full Code Here

Examples of com.sun.star.beans.XPropertySetInfo

  public void handle( Object aFormComponent ) throws com.sun.star.uno.Exception
  {
    // check if it's a button
    XPropertySet xProps = UNO.queryPropertySet( aFormComponent );
    XPropertySetInfo xPI = null;
    if ( null != xProps )
      xPI = xProps.getPropertySetInfo();
    if ( ( null != xPI ) && xPI.hasPropertyByName( "ClassId" ) )
    {
      Short nClassId = (Short)xProps.getPropertyValue( "ClassId" );
      if ( FormComponentType.COMMANDBUTTON == nClassId.shortValue() )
      {
        // yes, it is
View Full Code Here

Examples of com.sun.star.beans.XPropertySetInfo

        propContainer.addProperty( "SomeBoundText", PropertyAttribute.BOUND, "InitialBoundText" );
        propContainer.addProperty( "SomeTransientText", PropertyAttribute.TRANSIENT, "InitialTransientProperty" );
        propContainer.addProperty( "SomeReadonlyText", PropertyAttribute.READONLY, "InitialReadonlyText" );
        propContainer.addProperty( "SomeNumericValue", PropertyAttribute.BOUND, new Integer( 42 ) );

        XPropertySetInfo propertyInfo = textFieldModel.getPropertySetInfo();
        assure( "Per service definition, dynamic properties are expected to be forced to be removeable",
            ( propertyInfo.getPropertyByName("SomeBoundText").Attributes & PropertyAttribute.REMOVEABLE ) != 0 );

        // a second addition of a property with an existent name should be rejected
        boolean caughtExpected = false;
        try { propContainer.addProperty( "SomeBoundText", PropertyAttribute.BOUND, "InitialBoundText" ); }
        catch( PropertyExistException e ) { caughtExpected = true; }
View Full Code Here

Examples of com.sun.star.beans.XPropertySetInfo

    * <code>PTT</code> (Properties To Test) to determine available properties.
    * All tests for services without <code>getPropertySetInfo</code> must
    * provide this object relation.
    */
    public boolean _getPropertySetInfo() {
        XPropertySetInfo propertySetInfo = oObj.getPropertySetInfo();

        if (propertySetInfo == null) {
            log.println("getPropertySetInfo() method returned null");
            String[] ptt = (String[]) param.get("PTT");
            PTT.normal=ptt[0];
View Full Code Here

Examples of com.sun.star.beans.XPropertySetInfo

     */
    protected boolean checkResult(XPropertySet set, String propName,
                                  Object oldValue, Object newValue,
                                  Object resValue, Exception exception)
                           throws Exception {
        XPropertySetInfo info = set.getPropertySetInfo();
        Property prop = info.getPropertyByName(propName);

        oldValue = getRealValue(oldValue);
        newValue = getRealValue(newValue);
        resValue = getRealValue(resValue);

View Full Code Here

Examples of com.sun.star.beans.XPropertySetInfo

        xDocText.insertTextContent(xDocTextCursor, xMetaField, true);

        XPropertySet xPropertySet = (XPropertySet)
            UnoRuntime.queryInterface(XPropertySet.class, xMetaField);
        assure("PropertySet: not supported?", xPropertySet != null);
        XPropertySetInfo xPropertySetInfo = xPropertySet.getPropertySetInfo();
        assure("hasPropertyByName(\"NumberFormat\"):",
                xPropertySetInfo.hasPropertyByName("NumberFormat"));
        assure("hasPropertyByName(\"IsFixedLanguage\"):",
                xPropertySetInfo.hasPropertyByName("IsFixedLanguage"));

        int def = (Integer) xPropertySet.getPropertyValue("NumberFormat");
        log.println("NumberFormat: default is " + def);
        short INT = com.sun.star.i18n.NumberFormatIndex.NUMBER_INT;
        xPropertySet.setPropertyValue("NumberFormat", INT);
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.