summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2006-12-01 15:29:09 +0000
committerRüdiger Timm <rt@openoffice.org>2006-12-01 15:29:09 +0000
commit860d15cceb555860b016856fc6c262e060c7fdd8 (patch)
tree55a197b2bd77dd364600a174bdff2f2c46dc1638
parent6ebf3ae2a9527e30957e830b4bc6296ca8fcd714 (diff)
INTEGRATION: CWS dbwizardpp5 (1.4.52); FILE MERGED
2006/10/06 16:35:16 bc 1.4.52.1: #i43801#reportwizard now handles NumberFormat correctly
-rw-r--r--wizards/com/sun/star/wizards/common/NumberFormatter.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/wizards/com/sun/star/wizards/common/NumberFormatter.java b/wizards/com/sun/star/wizards/common/NumberFormatter.java
index 56358afee913..be2710a64ed6 100644
--- a/wizards/com/sun/star/wizards/common/NumberFormatter.java
+++ b/wizards/com/sun/star/wizards/common/NumberFormatter.java
@@ -4,9 +4,9 @@
*
* $RCSfile: NumberFormatter.java,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: vg $ $Date: 2006-04-07 12:32:53 $
+ * last change: $Author: rt $ $Date: 2006-12-01 16:29:09 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -172,12 +172,12 @@ public class NumberFormatter {
- public void setNumberFormat(XInterface _xFormatObject, int _FormatKey) {
+ public void setNumberFormat(XInterface _xFormatObject, int _FormatKey, NumberFormatter _oNumberFormatter) {
try {
- XPropertySet xNumberFormat = xNumberFormats.getByKey(_FormatKey); //CurDBField.DBFormatKey);
+ XPropertySet xNumberFormat = _oNumberFormatter.xNumberFormats.getByKey(_FormatKey); //CurDBField.DBFormatKey);
String FormatString = AnyConverter.toString(Helper.getUnoPropertyValue(xNumberFormat, "FormatString"));
Locale oLocale = (Locale) Helper.getUnoPropertyValue(xNumberFormat, "Locale");
- int NewFormatKey = defineNumberFormat(FormatString);
+ int NewFormatKey = defineNumberFormat(FormatString, oLocale);
XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, _xFormatObject);
if (xPSet.getPropertySetInfo().hasPropertyByName("NumberFormat"))
xPSet.setPropertyValue("NumberFormat", new Integer(NewFormatKey));
@@ -208,7 +208,7 @@ public class NumberFormatter {
}
- public void setBooleanReportDisplayNumberFormat(){
+ public int setBooleanReportDisplayNumberFormat(){
String FormatString = "[=1]" + '"' + (char)9745 + '"' + ";[=0]" + '"' + (char)58480 + '"' + ";0";
iLogicalFormatKey = xNumberFormats.queryKey(FormatString, aLocale, true);
try {
@@ -218,8 +218,10 @@ public class NumberFormatter {
e.printStackTrace();
iLogicalFormatKey = xNumberFormatTypes.getStandardFormat(NumberFormat.LOGICAL, aLocale);
}
+ return iLogicalFormatKey;
}
+
/**
* @return Returns the iDateFormatKey.
*/