summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star/wizards/report/DBColumn.java
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2008-08-19 09:34:08 +0000
committerVladimir Glazounov <vg@openoffice.org>2008-08-19 09:34:08 +0000
commitcd20f4166f1c688987e8fa36cea74a4162322752 (patch)
tree486e6b39d790b8a61c09d19de7c144f1bfbf23fc /wizards/com/sun/star/wizards/report/DBColumn.java
parent7706a14d9ec6a7c67738dc58cf2b387ddce94266 (diff)
INTEGRATION: CWS dba31a (1.14.10); FILE MERGED
2008/07/02 12:06:48 fs 1.14.10.1: copying following changes from CWS dba30f to CWS dba31a: 2008/07/01 09:41:34 lla 1.14.2.1: #i82743# problem with 'Title' as DB Entry name
Diffstat (limited to 'wizards/com/sun/star/wizards/report/DBColumn.java')
-rw-r--r--wizards/com/sun/star/wizards/report/DBColumn.java21
1 files changed, 18 insertions, 3 deletions
diff --git a/wizards/com/sun/star/wizards/report/DBColumn.java b/wizards/com/sun/star/wizards/report/DBColumn.java
index 5c5c31eebabf..04dca6bd5b60 100644
--- a/wizards/com/sun/star/wizards/report/DBColumn.java
+++ b/wizards/com/sun/star/wizards/report/DBColumn.java
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: DBColumn.java,v $
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
* This file is part of OpenOffice.org.
*
@@ -450,7 +450,8 @@ public class DBColumn
catch(Exception exception)
{
exception.printStackTrace(System.out);
- }}
+ }
+ }
private boolean isNameCell(XTextCursor xCellCursor, String CurFieldName, String CompString)
{
@@ -468,7 +469,21 @@ public class DBColumn
XDependentTextField xDependent = (XDependentTextField) UnoRuntime.queryInterface(XDependentTextField.class, oTextField);
XPropertySet xMaster = xDependent.getTextFieldMaster();
String UserFieldName = (String) xMaster.getPropertyValue("Name");
- boolean bIsNameCell = ((UserFieldName.startsWith(CompString)) || (UserFieldName.equals(CurFieldName)));
+ boolean bIsNameCell = false;
+ if ((UserFieldName.startsWith(CompString)) || (UserFieldName.equals(CurFieldName)))
+ {
+ bIsNameCell = true;
+ }
+ else
+ {
+ // stupid hack, 'Title' is not a real good Table-Cell-Name
+ // take a look at xmloff/source/text/txtvfldi.txt, there exists 2 '_renamed_' strings
+ String sLocalCurFieldName = CurFieldName + "_renamed_";
+ if (UserFieldName.startsWith(sLocalCurFieldName))
+ {
+ bIsNameCell = true;
+ }
+ }
return bIsNameCell;
}
}