Package ag.ion.bion.officelayer.util

Examples of ag.ion.bion.officelayer.util.UtilException


    try {
      if (xNumberFormatter == null) {
        IServiceProvider serviceProvider = textDocument
            .getServiceProvider();
        if (serviceProvider == null)
          throw new UtilException(
              "No service provider available in document.");
        Object formatter = serviceProvider
            .createServiceWithContext("com.sun.star.util.NumberFormatter");
        xNumberFormatter = (XNumberFormatter) UnoRuntime
            .queryInterface(XNumberFormatter.class, formatter);
        xNumberFormatter
            .attachNumberFormatsSupplier(xNumberFormatsSupplier);
      }
      return xNumberFormatter.convertNumberToString(key, number);
    } catch (Exception exception) {
      UtilException utilException = new UtilException(exception
          .getMessage());
      utilException.initCause(exception);
      throw utilException;
    }
  }
View Full Code Here


      }
      counter++;
    }

    if (javaNumberFormatterRegistry.size() == 0) {
      throw new UtilException("No suitable pattern available.");
    }
  }
View Full Code Here

        return new JavaFormattedNumber(javaNumberFormatter
            .format(value), javaNumberFormatter.getTextColor());
      }
      return null;
    } catch (Exception exception) {
      UtilException utilException = new UtilException(exception
          .getMessage());
      utilException.initCause(exception);
      throw utilException;
    }
  }
View Full Code Here

            .format(doubleValue), javaNumberFormatter
            .getTextColor());
      }
      return null;
    } catch (Exception exception) {
      UtilException utilException = new UtilException(exception
          .getMessage());
      utilException.initCause(exception);
      throw utilException;
    }
  }
View Full Code Here

      for (int i = 0; i < allFormats.length; i++) {
        if (newKey == allFormats[i].getFormatKey())
          return allFormats[i];
      }
    } catch (Exception exception) {
      UtilException utilException = new UtilException(exception
          .getMessage());
      utilException.initCause(exception);
      throw utilException;
    }
    throw new UtilException("The number format is not available.");
  }
View Full Code Here

        }
        formats.add(new NumberFormat(key, xProp, this));
      }
      return formats.toArray(new INumberFormat[formats.size()]);
    } catch (Exception exception) {
      UtilException utilException = new UtilException(exception
          .getMessage());
      utilException.initCause(exception);
      throw utilException;
    }
  }
View Full Code Here

    try {
      if (xNumberFormatter == null) {
        IServiceProvider serviceProvider = textDocument
            .getServiceProvider();
        if (serviceProvider == null)
          throw new UtilException(
              "No service provider available in document.");
        Object formatter = serviceProvider
            .createServiceWithContext("com.sun.star.util.NumberFormatter");
        xNumberFormatter = (XNumberFormatter) UnoRuntime
            .queryInterface(XNumberFormatter.class, formatter);
        xNumberFormatter
            .attachNumberFormatsSupplier(xNumberFormatsSupplier);
      }
      return xNumberFormatter.convertStringToNumber(key, text);
    } catch (Exception exception) {
      UtilException utilException = new UtilException(exception
          .getMessage());
      utilException.initCause(exception);
      throw utilException;
    }
  }
View Full Code Here

      }
      counter++;
    }
   
    if(javaNumberFormatterRegistry.size() == 0) {
      throw new UtilException("No suitable pattern available.");
    }   
  }
View Full Code Here

        return new JavaFormattedNumber(javaNumberFormatter.format(value), javaNumberFormatter.getTextColor());     
      }
      return null;
    }
    catch(Exception exception) {
      UtilException utilException = new UtilException(exception.getMessage());
      utilException.initCause(exception);
      throw utilException;
    }
  }
View Full Code Here

        return new JavaFormattedNumber(javaNumberFormatter.format(doubleValue), javaNumberFormatter.getTextColor());     
      }
      return null;
    }
    catch(Exception exception) {
      UtilException utilException = new UtilException(exception.getMessage());
      utilException.initCause(exception);
      throw utilException;
    }
  }
View Full Code Here

TOP

Related Classes of ag.ion.bion.officelayer.util.UtilException

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.