Re: [PATCH] fix some java deprecation warnings in qadevOOo module
On 06/21/2012 05:43 PM, Noel Grandin wrote: Perhaps you can tell me - there are some deprecated methods like this one: package com.sun.star.wizards.common; public class NumberFormatter { public static XNumberFormatter createNumberFormatter(XMultiServiceFactory _xMSF, XNumberFormatsSupplier _xNumberFormatsSupplier) throws Exception that are used in various places, but I can't find a replacement - there doesn't seem to be a NumberFormatter factory class with a create method taking an XComponentContext parameter, like I would expect. Any ideas? That factory would be a new-style com.sun.star.util.NumberFormatter service. ;) It is a little unclear to me why that method is marked @deprecated. Assuming that it is so because it uses the obsolete XMultiServceFactory.createInstance approach (rather than XMultiComponentFactory.createInstanceWithContext), you could either rewrite it (and its callers) to use XComponentContext/XMultiComponentFactory instead (which might become a bit of a painful avalanche if the callers themselves also only have the XMultiServiceFactory around, but not the XComponentContext; there is no equivalent of the C++ comphelper::getProcessComponentContext in Java). Or you could remove the "@" from "@deprecated" so that it no longer generates noise. (Given that writing new code based on this is rare, the chance that somebody unintentionally uses this method instead of a better counter part in new code is negligible.) Stephan ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [PATCH] fix some java deprecation warnings in qadevOOo module
On 2012-06-20 22:29, Michael Stahl wrote: On 19/06/12 16:35, Noel Grandin wrote: Hi Since the qadevOOo module seems to require java 1.5, I updated a couple of places to remove some deprecation warnings. thanks for fixing the annoying warnings; the Java baseline was raised to 1.5 already some years ago in OOo times, so feel free to use Java 1.5 constructs in all our modules if it helps. Perhaps you can tell me - there are some deprecated methods like this one: package com.sun.star.wizards.common; public class NumberFormatter { public static XNumberFormatter createNumberFormatter(XMultiServiceFactory _xMSF, XNumberFormatsSupplier _xNumberFormatsSupplier) throws Exception that are used in various places, but I can't find a replacement - there doesn't seem to be a NumberFormatter factory class with a create method taking an XComponentContext parameter, like I would expect. Any ideas? Thanks, Noel Grandin Disclaimer: http://www.peralex.com/disclaimer.html ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [PATCH] fix some java deprecation warnings in qadevOOo module
On 19/06/12 16:35, Noel Grandin wrote: > Hi > > Since the qadevOOo module seems to require java 1.5, I updated a couple > of places to remove some deprecation warnings. thanks for fixing the annoying warnings; the Java baseline was raised to 1.5 already some years ago in OOo times, so feel free to use Java 1.5 constructs in all our modules if it helps. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice