Examples of XPropertySetInfo


Examples of com.sun.star.beans.XPropertySetInfo

      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 = 25400 / dpi;
          dim.setSize(imageSize.Width * fac, imageSize.Height * fac);
 
View Full Code Here

Examples of com.sun.star.beans.XPropertySetInfo

      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

Examples of com.sun.star.beans.XPropertySetInfo

            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 / (double)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

Examples of com.sun.star.beans.XPropertySetInfo

            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

Examples of com.sun.star.beans.XPropertySetInfo

         * @result - adds the result of testing propName property to
         *           MultiMethodTest.tRes.
         */
        protected void testProperty(String propName)
        {
            XPropertySetInfo info = oObj.getPropertySetInfo();

            if (info != null)
            {
                if (!info.hasPropertyByName(propName))
                {
                    if (isOptional(propName) || optionalService)
                    {
                        // skipping optional property test
                        log.println("Property '" + propName + "' is optional and not supported");
View Full Code Here

Examples of com.sun.star.beans.XPropertySetInfo

         */
        protected void checkResult(String propName, Object oldValue,
                Object newValue, Object resValue, Exception exception)
                throws Exception
        {
            XPropertySetInfo info = oObj.getPropertySetInfo();
            if (info == null)
            {
                log.println("Can't get XPropertySetInfo for property " + propName);
                tRes.tested(propName, false);
                return;
            }
            Property prop = info.getPropertyByName(propName);

            short attr = prop.Attributes;
            boolean readOnly = (prop.Attributes & PropertyAttribute.READONLY) != 0;
            boolean maybeVoid = (prop.Attributes & PropertyAttribute.MAYBEVOID) != 0;
            //check get-set methods
View Full Code Here

Examples of com.sun.star.beans.XPropertySetInfo

    public void removePropertyChangeListener(String name, XPropertyChangeListener l) {
    }

    public XPropertySetInfo getPropertySetInfo() {
        return new XPropertySetInfo() {
            public Property[] getProperties() {
                return props;
            }

            public boolean hasPropertyByName(String name) {
View Full Code Here

Examples of com.sun.star.beans.XPropertySetInfo

    }

    public static Map toMap(XPropertySet props) {
        Hashtable result = new Hashtable(10);

        XPropertySetInfo setInfo = props.getPropertySetInfo();
        Property[] properties = setInfo.getProperties();

        for (int i = 0; i < properties.length; i++) {
            String name = properties[i].Name;
            Object value;
View Full Code Here

Examples of com.sun.star.beans.XPropertySetInfo

     * @see com.sun.star.beans.XPropertySet
     */
    public static void printPropertyInfo(XPropertySet PS, String name,
                                                        PrintWriter out) {
        try {
            XPropertySetInfo PSI = PS.getPropertySetInfo();
            Property[] props = PSI.getProperties();
            Property prop = PSI.getPropertyByName(name);
            out.println("Property name is " + prop.Name);
            out.println("Property handle is " + prop.Handle);
            out.println("Property type is " + prop.Type.getTypeName());
            out.println("Property current value is " +
                                                    PS.getPropertyValue(name));
View Full Code Here

Examples of com.sun.star.beans.XPropertySetInfo

     * Print the names of all properties inside this property set
     * @param ps The property set which is printed.
     * @see com.sun.star.beans.XPropertySet
     */
    public static void printPropertiesNames(XPropertySet ps) {
            XPropertySetInfo psi = ps.getPropertySetInfo();
            Property[] props = psi.getProperties();
            for (int i = 0; i < props.length; i++)
                    System.out.println(i + ".  " + props[i].Name);
    }
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.