From cd20f4166f1c688987e8fa36cea74a4162322752 Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Tue, 19 Aug 2008 09:34:08 +0000 Subject: 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 --- wizards/com/sun/star/wizards/report/DBColumn.java | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'wizards') 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; } } -- cgit v1.2.3