Package com.sun.star.beans

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


            final XPropertySet xImage = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class,
                    m_xGraphicProvider.queryGraphic(value));

            if (xImage != null)
            {
                final XPropertySetInfo xInfo = xImage.getPropertySetInfo();
                if (xInfo.hasPropertyByName("Size100thMM"))
                {
                    Size imageSize = (Size) xImage.getPropertyValue("Size100thMM");
                    dim.setSize(imageSize.Width, imageSize.Height);
                    if (dim.height == 0 && dim.width == 0)
                    {
                        imageSize = (Size) xImage.getPropertyValue("SizePixel");
                        final int dpi = java.awt.Toolkit.getDefaultToolkit().getScreenResolution();
                        final double fac = 2540 / dpi;
                        dim.setSize(imageSize.Width * fac, imageSize.Height * fac);
                    }
                }
                else if (xInfo.hasPropertyByName("SizePixel"))
                {
                    final Size imageSize = (Size) xImage.getPropertyValue("SizePixel");
                    final int dpi = java.awt.Toolkit.getDefaultToolkit().getScreenResolution();
                    final double fac = 2540 / dpi;
                    dim.setSize(imageSize.Width * fac, imageSize.Height * fac);
 
View Full Code Here

            final XPropertySet xImage = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class,
                    m_xGraphicProvider.queryGraphic(value));

            if (xImage != null)
            {
                final XPropertySetInfo xInfo = xImage.getPropertySetInfo();
                if (xInfo.hasPropertyByName("MimeType"))
                {
                    return (String) xImage.getPropertyValue("MimeType");
                }
            }
        }
View Full Code Here

      final XPropertySet xImage = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class,
        m_xGraphicProvider.queryGraphic( value ) );

      if (xImage != null)
      {
        final XPropertySetInfo xInfo = xImage.getPropertySetInfo();
        if (xInfo.hasPropertyByName("Size100thMM"))
        {
          Size imageSize = (Size) xImage.getPropertyValue("Size100thMM");
          dim.setSize(imageSize.Width, imageSize.Height);
          if (dim.height == 0 && dim.width == 0)
          {
            imageSize = (Size) xImage.getPropertyValue("SizePixel");
            final int dpi = java.awt.Toolkit.getDefaultToolkit().getScreenResolution();
            final double fac = 2540 / dpi;
            dim.setSize(imageSize.Width * fac, imageSize.Height * fac);
          }
        }
        else if (xInfo.hasPropertyByName("SizePixel"))
        {
          final Size imageSize = (Size) xImage.getPropertyValue("SizePixel");
          final int dpi = java.awt.Toolkit.getDefaultToolkit().getScreenResolution();
          final double fac = 2540 / dpi;
          dim.setSize(imageSize.Width * fac, imageSize.Height * fac);
 
View Full Code Here

      final XPropertySet xImage = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class,
          m_xGraphicProvider.queryGraphic(value));

      if (xImage != null)
      {
        final XPropertySetInfo xInfo = xImage.getPropertySetInfo();
        if (xInfo.hasPropertyByName("MimeType"))
        {
          mimeType = (String) xImage.getPropertyValue("MimeType");
        }
      }
    }
View Full Code Here

     */
    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

     */
    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

            // 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

        for(int i = 0; i < names.length; i++) {
            if (!mayBeDef && states[i] != PropertyState.DEFAULT_VALUE ) {
                propName = names[i];
                XPropertySet xPropSet = (XPropertySet)
                    UnoRuntime.queryInterface(XPropertySet.class, oObj);
                XPropertySetInfo xPropSetInfo = xPropSet.getPropertySetInfo();
                Property prop = null;
                try {
                    prop = xPropSetInfo.getPropertyByName(names[i]);
                }
                catch(com.sun.star.beans.UnknownPropertyException e) {
                    log.println("couldn't get property info: " + e.toString());
                    throw new StatusException(Status.failed
                        ("couldn't get property info"));
View Full Code Here

                if (!part_result) {
                    log.println("Property '" + names[i] +
                        "' wasn't set to default");
                    XPropertySet xPropSet = (XPropertySet)
                        UnoRuntime.queryInterface(XPropertySet.class, oObj);
                    XPropertySetInfo xPropSetInfo =
                        xPropSet.getPropertySetInfo();
                    Property prop = xPropSetInfo.getPropertyByName(names[i]);
                    if ( (prop.Attributes &
                            PropertyAttribute.MAYBEDEFAULT) != 0 ) {
                        log.println("   ... and it has MAYBEDEFAULT "+
                            "attribute - FAILED");
                    } else {
View Full Code Here

TOP

Related Classes of com.sun.star.beans.XPropertySetInfo

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.