Kaydet (Commit) a55ab3fd authored tarafından Vladimir Glazounov's avatar Vladimir Glazounov

INTEGRATION: CWS dbwizard3 (1.2.58); FILE MERGED

2005/02/15 17:29:54 bc 1.2.58.4: ##Replacing of placeholders improved
2005/01/20 00:57:20 bc 1.2.58.3: #39669# Dataimport for Reports overworked
2005/01/07 15:17:03 bc 1.2.58.2: #i40082#new NumberFormatter class added
2004/12/18 21:54:59 bc 1.2.58.1: ##code for including schemas and catalogs in tablewizard added
üst f3435178
......@@ -38,7 +38,6 @@
*
*************************************************************************/
package com.sun.star.wizards.report;
import com.sun.star.beans.PropertyState;
import com.sun.star.beans.XPropertySet;
import com.sun.star.beans.XPropertyState;
......@@ -114,7 +113,6 @@ public class DBColumn {
String CellName = (String) Helper.getUnoPropertyValue(xNameCell, "CellName");
xNameTextCell = (XTextRange) UnoRuntime.queryInterface(XTextRange.class, xNameCell);
xValCell = CurRecordTable.xCellRange.getCellByPosition(i,1);
Desktop.setNumberFormat(xValCell, oTextTableHandler.NumberFormats, CurDBField.DBFormatKey);
xValTextCell = (XTextRange) UnoRuntime.queryInterface(XTextRange.class, xValCell);
xValCellCursor = TextDocument.createTextCursor(xValCell);
}
......@@ -134,6 +132,7 @@ public class DBColumn {
xValCellCursor = TextDocument.createTextCursor(xValCell);
ValColumn = OldDBColumn.ValColumn;
ValRow = OldDBColumn.ValRow;
initializeNumberFormat();
}
......@@ -155,16 +154,17 @@ public class DBColumn {
CellString = xTextCell.getString();
String CompString = TableName.substring(4);
XTextCursor xLocCellCursor = TextDocument.createTextCursor(xCell);
if (isNameCell(xLocCellCursor, CurDBField.AliasName, CompString)){
if (isNameCell(xLocCellCursor, CurDBField.FieldName, CompString)){
xNameCell = xCell;
xNameTextCell = xTextCell;
}
else if (CellString.equals(CurFieldString)){
else{ //In Grouping Sections only two cells are allowed ' if (CellString.equals(CurFieldString)){
xValCell = xCell;
xValTextCell = xTextCell;
xValCellCursor = xLocCellCursor;
ValColumn = n;
ValRow = m;
checkforLeftAlignment();
}
}
}
......@@ -197,7 +197,7 @@ public class DBColumn {
public void initializeNumberFormat(){
Desktop.setNumberFormat(xValCell, oTextTableHandler.NumberFormats, CurDBField.DBFormatKey);
oTextTableHandler.getNumberFormatter().setNumberFormat(xValCell, CurDBField.DBFormatKey);
setCellFont();
}
......@@ -218,11 +218,14 @@ public class DBColumn {
public void formatValueCell(){
Desktop.setNumberFormat(xValCell, oTextTableHandler.NumberFormats, CurDBField.DBFormatKey);
if ((CurDBField.bIsNumberFormat) && (ValColumn == xTableColumns.getCount()-1)){
oTextTableHandler.getNumberFormatter().setNumberFormat(xValCell, CurDBField.DBFormatKey);
if (checkforLeftAlignment())
bAlignLeft = true;
setCellFont();
}
}
private boolean checkforLeftAlignment(){
bAlignLeft = ((CurDBField.bIsNumberFormat) && (ValColumn == xTableColumns.getCount()-1));
return bAlignLeft;
}
......@@ -315,7 +318,7 @@ public class DBColumn {
public void setCellFont(){
try{
XPropertyState xPropertyState;
int FieldType = CurDBField.FieldType;
int FieldType = CurDBField.FieldType;
if (FieldType == com.sun.star.sdbc.DataType.BOOLEAN || FieldType == com.sun.star.sdbc.DataType.BIT){
CharFontName = "StarSymbol";
PropertyState = com.sun.star.beans.PropertyState.DIRECT_VALUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment