path: root/wizards/com/sun/star
diff options
authorJulien Nabet <>2019-03-12 20:03:14 +0100
committerJulien Nabet <>2019-03-13 07:08:22 +0100
commit535d4e6dae24973f5bea80643b691c706a3b4efa (patch)
tree66bbaf21d1851ea81f76c987f65171fd659cdb94 /wizards/com/sun/star
parent78971bf2793e8f79b54e220305fe7d44760385bf (diff)
Fix wizards/
Create a brand new odb file (embedded HSQLDB) Create a simple table in it Launch Query wizard, you'll see these on console: ... at com.sun.proxy.$Proxy69.addNew(Unknown Source) at at at ... ... at com.sun.proxy.$Proxy69.addNew(Unknown Source) at at at ... Root cause is uses "YYYY-MM-DD" and "YYYY-MM-DD HH:MM:SS" (lines 504 and 506) If it's ok for English locales, xNumberFormats.queryKey calls fail at least for French locales. Use addNewConverted instead of addNew method to take into account the difference of locales and avoid these stacktraces Change-Id: I5ef6325b8a213ae6758e378c4d3b8560c117042f Reviewed-on: Tested-by: Jenkins Reviewed-by: Lionel Elie Mamane <>
Diffstat (limited to 'wizards/com/sun/star')
1 files changed, 2 insertions, 1 deletions
diff --git a/wizards/com/sun/star/wizards/common/ b/wizards/com/sun/star/wizards/common/
index dfbd742aef8e..9a6ca217e6c9 100644
--- a/wizards/com/sun/star/wizards/common/
+++ b/wizards/com/sun/star/wizards/common/
@@ -48,6 +48,7 @@ public class NumberFormatter
private XNumberFormatTypes xNumberFormatTypes;
private XPropertySet xNumberFormatSettings;
private final Locale aLocale;
+ static private final Locale enLocale = new Locale( "en", "US", "" );
public NumberFormatter(XMultiServiceFactory _xMSF, XNumberFormatsSupplier _xNumberFormatsSupplier, Locale _aLocale) throws Exception
@@ -93,7 +94,7 @@ public class NumberFormatter
int NewFormatKey = xNumberFormats.queryKey(_FormatString, aLocale, true);
if (NewFormatKey == -1)
- NewFormatKey = xNumberFormats.addNew(_FormatString, aLocale);
+ NewFormatKey = xNumberFormats.addNewConverted(_FormatString, enLocale, aLocale);
return NewFormatKey;