diff options
author | Ocke Janssen [oj] <Ocke.Janssen@sun.com> | 2010-01-13 08:44:34 +0100 |
---|---|---|
committer | Ocke Janssen [oj] <Ocke.Janssen@sun.com> | 2010-01-13 08:44:34 +0100 |
commit | 5580d728b5fee56679b1aecc8c5a8b77f8c0b2e3 (patch) | |
tree | f2c0ffdb4f923e38cabe3f2ea235ac4b4bef9ea3 /dbaccess/source/ui/tabledesign | |
parent | aaea1b38cd4d2735fe91d2f04e609ba75324a516 (diff) |
dba33f: #i20615# new feature to allow server side column descrriptions to be visible and changeable in the table designer.
Diffstat (limited to 'dbaccess/source/ui/tabledesign')
-rw-r--r-- | dbaccess/source/ui/tabledesign/FieldDescriptions.cxx | 29 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TEditControl.cxx | 146 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TEditControl.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableController.cxx | 17 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableRow.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/table.src | 6 |
6 files changed, 155 insertions, 48 deletions
diff --git a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx index e78cc2303..a769c0893 100644 --- a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx +++ b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx @@ -157,6 +157,8 @@ OFieldDescription::OFieldDescription(const Reference< XPropertySet >& xAffectedC SetName(::comphelper::getString(xAffectedCol->getPropertyValue(PROPERTY_NAME))); if(xPropSetInfo->hasPropertyByName(PROPERTY_DESCRIPTION)) SetDescription(::comphelper::getString(xAffectedCol->getPropertyValue(PROPERTY_DESCRIPTION))); + if(xPropSetInfo->hasPropertyByName(PROPERTY_HELPTEXT)) + SetHelpText(::comphelper::getString(xAffectedCol->getPropertyValue(PROPERTY_HELPTEXT))); if(xPropSetInfo->hasPropertyByName(PROPERTY_DEFAULTVALUE)) SetDefaultValue( xAffectedCol->getPropertyValue(PROPERTY_DEFAULTVALUE) ); @@ -288,6 +290,21 @@ void OFieldDescription::SetName(const ::rtl::OUString& _rName) } } // ----------------------------------------------------------------------------- +void OFieldDescription::SetHelpText(const ::rtl::OUString& _sHelpText) +{ + try + { + if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_HELPTEXT) ) + m_xDest->setPropertyValue(PROPERTY_HELPTEXT,makeAny(_sHelpText)); + else + m_sHelpText = _sHelpText; + } + catch(const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } +} +// ----------------------------------------------------------------------------- void OFieldDescription::SetDescription(const ::rtl::OUString& _rDescription) { try @@ -504,6 +521,14 @@ void OFieldDescription::SetCurrency(sal_Bool _bIsCurrency) return m_sDescription; } // ----------------------------------------------------------------------------- +::rtl::OUString OFieldDescription::GetHelpText() const +{ + if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_HELPTEXT) ) + return ::comphelper::getString(m_xDest->getPropertyValue(PROPERTY_HELPTEXT)); + else + return m_sHelpText; +} +// ----------------------------------------------------------------------------- ::com::sun::star::uno::Any OFieldDescription::GetControlDefault() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_CONTROLDEFAULT) ) @@ -657,8 +682,8 @@ void OFieldDescription::copyColumnSettingsTo(const Reference< XPropertySet >& _r _rxColumn->setPropertyValue(PROPERTY_FORMATKEY,makeAny(GetFormatKey())); if ( GetHorJustify() != SVX_HOR_JUSTIFY_STANDARD && xInfo->hasPropertyByName(PROPERTY_ALIGN) ) _rxColumn->setPropertyValue(PROPERTY_ALIGN,makeAny(dbaui::mapTextAllign(GetHorJustify()))); - if ( GetDescription().getLength() && xInfo->hasPropertyByName(PROPERTY_HELPTEXT) ) - _rxColumn->setPropertyValue(PROPERTY_HELPTEXT,makeAny(GetDescription())); + if ( GetHelpText().getLength() && xInfo->hasPropertyByName(PROPERTY_HELPTEXT) ) + _rxColumn->setPropertyValue(PROPERTY_HELPTEXT,makeAny(GetHelpText())); if ( GetControlDefault().hasValue() && xInfo->hasPropertyByName(PROPERTY_CONTROLDEFAULT) ) _rxColumn->setPropertyValue(PROPERTY_CONTROLDEFAULT,GetControlDefault()); diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index bcdd42a38..e1ae1cf47 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -108,6 +108,7 @@ #ifndef DBAUI_TABLEFIELDCONTROL_HXX #include "TableFieldControl.hxx" #endif +#include "dsntypes.hxx" using namespace ::dbaui; using namespace ::comphelper; @@ -202,13 +203,21 @@ void OTableEditorCtrl::Init() ////////////////////////////////////////////////////////////////////// // Spalten einfuegen String aColumnName( ModuleRes(STR_TAB_FIELD_COLUMN_NAME) ); - InsertDataColumn( 1, aColumnName, FIELDNAME_WIDTH ); + InsertDataColumn( FIELD_NAME, aColumnName, FIELDNAME_WIDTH ); aColumnName = String( ModuleRes(STR_TAB_FIELD_COLUMN_DATATYPE) ); - InsertDataColumn( 2, aColumnName, FIELDTYPE_WIDTH ); + InsertDataColumn( FIELD_TYPE, aColumnName, FIELDTYPE_WIDTH ); - aColumnName = String( ModuleRes(STR_TAB_FIELD_DESCR) ); - InsertDataColumn( 3, aColumnName, FIELDDESCR_WIDTH ); + ::dbaccess::ODsnTypeCollection aDsnTypes(GetView()->getController().getORB()); + sal_Bool bShowColumnDescription = aDsnTypes.supportsColumnDescription(::comphelper::getString(GetView()->getController().getDataSource()->getPropertyValue(PROPERTY_URL))); + aColumnName = String( ModuleRes(STR_TAB_HELP_TEXT) ); + InsertDataColumn( HELP_TEXT, aColumnName, bShowColumnDescription ? FIELDTYPE_WIDTH : FIELDDESCR_WIDTH ); + + if ( bShowColumnDescription ) + { + aColumnName = String( ModuleRes(STR_COLUMN_DESCRIPTION) ); + InsertDataColumn( COLUMN_DESCRIPTION, aColumnName, FIELDTYPE_WIDTH ); + } InitCellController(); @@ -232,6 +241,7 @@ OTableEditorCtrl::OTableEditorCtrl(Window* pWindow) :OTableRowView(pWindow) ,pNameCell(NULL) ,pTypeCell(NULL) + ,pHelpTextCell(NULL) ,pDescrCell(NULL) ,pDescrWin(NULL) ,nIndexEvent(0) @@ -345,12 +355,16 @@ void OTableEditorCtrl::InitCellController() pDescrCell = new Edit( &GetDataWindow(), WB_LEFT ); pDescrCell->SetMaxTextLen( MAX_DESCR_LEN ); + pHelpTextCell = new Edit( &GetDataWindow(), WB_LEFT ); + pHelpTextCell->SetMaxTextLen( MAX_DESCR_LEN ); + pNameCell->SetHelpId(HID_TABDESIGN_NAMECELL); pTypeCell->SetHelpId(HID_TABDESIGN_TYPECELL); pDescrCell->SetHelpId(HID_TABDESIGN_COMMENTCELL); + pHelpTextCell->SetHelpId(HID_TABDESIGN_HELPTEXT); Size aHeight; - const Control* pControls[] = { pTypeCell,pDescrCell,pNameCell}; + const Control* pControls[] = { pTypeCell,pDescrCell,pNameCell,pHelpTextCell}; for(sal_Size i= 0; i < sizeof(pControls)/sizeof(pControls[0]);++i) { const Size aTemp( pControls[i]->GetOptimalSize(WINDOWSIZE_PREFERRED) ); @@ -368,6 +382,7 @@ void OTableEditorCtrl::ClearModified() DBG_CHKTHIS(OTableEditorCtrl,NULL); pNameCell->ClearModifyFlag(); pDescrCell->ClearModifyFlag(); + pHelpTextCell->ClearModifyFlag(); pTypeCell->SaveValue(); } @@ -399,6 +414,7 @@ OTableEditorCtrl::~OTableEditorCtrl() delete pNameCell; delete pTypeCell; delete pDescrCell; + delete pHelpTextCell; } //------------------------------------------------------------------------------ @@ -474,10 +490,16 @@ CellController* OTableEditorCtrl::GetController(long nRow, sal_uInt16 nColumnId) if (pActFieldDescr && (pActFieldDescr->GetName().getLength() != 0)) return new ListBoxCellController( pTypeCell ); else return NULL; - case FIELD_DESCR: + case HELP_TEXT: + if (pActFieldDescr && (pActFieldDescr->GetName().getLength() != 0)) + return new EditCellController( pHelpTextCell ); + else + return NULL; + case COLUMN_DESCRIPTION: if (pActFieldDescr && (pActFieldDescr->GetName().getLength() != 0)) return new EditCellController( pDescrCell ); - else return NULL; + else + return NULL; default: return NULL; } @@ -519,7 +541,13 @@ void OTableEditorCtrl::InitController(CellControllerRef&, long nRow, sal_uInt16 } break; - case FIELD_DESCR: + case HELP_TEXT: + if( pActFieldDescr ) + aInitString = pActFieldDescr->GetHelpText(); + pHelpTextCell->SetText( aInitString ); + pHelpTextCell->SaveValue(); + break; + case COLUMN_DESCRIPTION: if( pActFieldDescr ) aInitString = pActFieldDescr->GetDescription(); pDescrCell->SetText( aInitString ); @@ -579,7 +607,8 @@ void OTableEditorCtrl::DisplayData(long nRow, sal_Bool bGrabFocus) CellControllerRef aTemp; InitController(aTemp, nRow, FIELD_NAME); InitController(aTemp, nRow, FIELD_TYPE); - InitController(aTemp, nRow, FIELD_DESCR); + InitController(aTemp, nRow, COLUMN_DESCRIPTION); + InitController(aTemp, nRow, HELP_TEXT); GoToRow(nRow); // das Description-Window aktualisieren @@ -604,7 +633,8 @@ void OTableEditorCtrl::CursorMoved() CellControllerRef aTemp; InitController(aTemp,m_nDataPos,FIELD_NAME); InitController(aTemp,m_nDataPos,FIELD_TYPE); - InitController(aTemp,m_nDataPos,FIELD_DESCR); + InitController(aTemp,m_nDataPos,COLUMN_DESCRIPTION); + InitController(aTemp,m_nDataPos,HELP_TEXT); } OTableRowView::CursorMoved(); @@ -678,7 +708,20 @@ sal_Bool OTableEditorCtrl::SaveData(long nRow, sal_uInt16 nColId) ////////////////////////////////////////////////////////////// // Speichern Inhalt DescrCell - case FIELD_DESCR: + case HELP_TEXT: + { + ////////////////////////////////////////////////////////////// + // Wenn aktuelle Feldbeschreibung NULL, Default setzen + if( !pActFieldDescr ) + { + pHelpTextCell->SetText(String()); + pHelpTextCell->ClearModifyFlag(); + } + else + pActFieldDescr->SetHelpText( pHelpTextCell->GetText() ); + break; + } + case COLUMN_DESCRIPTION: { ////////////////////////////////////////////////////////////// // Wenn aktuelle Feldbeschreibung NULL, Default setzen @@ -814,7 +857,8 @@ void OTableEditorCtrl::CellModified( long nRow, sal_uInt16 nColId ) { case FIELD_NAME: sActionDescription = String( ModuleRes( STR_CHANGE_COLUMN_NAME ) ); break; case FIELD_TYPE: sActionDescription = String( ModuleRes( STR_CHANGE_COLUMN_TYPE ) ); break; - case FIELD_DESCR: sActionDescription = String( ModuleRes( STR_CHANGE_COLUMN_DESCRIPTION ) ); break; + case HELP_TEXT: + case COLUMN_DESCRIPTION: sActionDescription = String( ModuleRes( STR_CHANGE_COLUMN_DESCRIPTION ) ); break; default: sActionDescription = String( ModuleRes( STR_CHANGE_COLUMN_ATTRIBUTE ) ); break; } @@ -1179,7 +1223,7 @@ void OTableEditorCtrl::SetCellData( long nRow, sal_uInt16 nColId, const ::com::s OSL_ENSURE(sal_False, "OTableEditorCtrl::SetCellData: invalid column!"); break; - case FIELD_DESCR: + case COLUMN_DESCRIPTION: pFieldDescr->SetDescription( sValue = ::comphelper::getString(_rNewData) ); break; @@ -1268,9 +1312,12 @@ Any OTableEditorCtrl::GetCellData( long nRow, sal_uInt16 nColId ) sValue = pFieldDescr->getTypeInfo()->aUIName; break; - case FIELD_DESCR: + case COLUMN_DESCRIPTION: sValue = pFieldDescr->GetDescription(); break; + case HELP_TEXT: + sValue = pFieldDescr->GetHelpText(); + break; case FIELD_PROPERTY_DEFAULT: return pFieldDescr->GetControlDefault(); @@ -1350,16 +1397,24 @@ sal_Bool OTableEditorCtrl::IsCutAllowed( long nRow ) if(bIsCutAllowed) { - if(m_eChildFocus == DESCRIPTION) - bIsCutAllowed = pDescrCell->GetSelected().Len() != 0; - else if(m_eChildFocus == NAME) - bIsCutAllowed = pNameCell->GetSelected().Len() != 0; - else if(m_eChildFocus == ROW) - // only rows are selected for cutting so we look if all rows are valid - // wwe don't waant to copy empty rows here - bIsCutAllowed = IsCopyAllowed(nRow); - else - bIsCutAllowed = sal_False; + switch(m_eChildFocus) + { + case DESCRIPTION: + bIsCutAllowed = pDescrCell->GetSelected().Len() != 0; + break; + case HELPTEXT: + bIsCutAllowed = pHelpTextCell->GetSelected().Len() != 0; + break; + case NAME: + bIsCutAllowed = pNameCell->GetSelected().Len() != 0; + break; + case ROW: + bIsCutAllowed = IsCopyAllowed(nRow); + break; + default: + bIsCutAllowed = sal_False; + break; + } } // Reference<XPropertySet> xTable = GetView()->getController().getTable(); @@ -1375,8 +1430,10 @@ sal_Bool OTableEditorCtrl::IsCopyAllowed( long /*nRow*/ ) { DBG_CHKTHIS(OTableEditorCtrl,NULL); sal_Bool bIsCopyAllowed = sal_False; - if(m_eChildFocus == DESCRIPTION) + if(m_eChildFocus == DESCRIPTION ) bIsCopyAllowed = pDescrCell->GetSelected().Len() != 0; + else if(HELPTEXT == m_eChildFocus ) + bIsCopyAllowed = pHelpTextCell->GetSelected().Len() != 0; else if(m_eChildFocus == NAME) bIsCopyAllowed = pNameCell->GetSelected().Len() != 0; else if(m_eChildFocus == ROW) @@ -1438,9 +1495,18 @@ void OTableEditorCtrl::cut() { if(GetView()->getController().isAlterAllowed()) { - SaveData(-1,FIELD_DESCR); + SaveData(-1,COLUMN_DESCRIPTION); pDescrCell->Cut(); - CellModified(-1,FIELD_DESCR); + CellModified(-1,COLUMN_DESCRIPTION); + } + } + else if(HELPTEXT == m_eChildFocus ) + { + if(GetView()->getController().isAlterAllowed()) + { + SaveData(-1,HELP_TEXT); + pHelpTextCell->Cut(); + CellModified(-1,HELP_TEXT); } } else if(m_eChildFocus == ROW) @@ -1458,7 +1524,9 @@ void OTableEditorCtrl::copy() OTableRowView::copy(); else if(m_eChildFocus == NAME) pNameCell->Copy(); - else if(m_eChildFocus == DESCRIPTION) + else if(HELPTEXT == m_eChildFocus ) + pHelpTextCell->Copy(); + else if(m_eChildFocus == DESCRIPTION ) pDescrCell->Copy(); } @@ -1480,6 +1548,14 @@ void OTableEditorCtrl::paste() CellModified(); } } + else if(HELPTEXT == m_eChildFocus ) + { + if(GetView()->getController().isAlterAllowed()) + { + pHelpTextCell->Paste(); + CellModified(); + } + } else if(m_eChildFocus == DESCRIPTION) { if(GetView()->getController().isAlterAllowed()) @@ -1496,16 +1572,6 @@ sal_Bool OTableEditorCtrl::IsDeleteAllowed( long /*nRow*/ ) DBG_CHKTHIS(OTableEditorCtrl,NULL); return GetSelectRowCount() != 0 && GetView()->getController().isDropAllowed(); -// Reference<XPropertySet> xTable = GetView()->getController().getTable(); -// if( !GetSelectRowCount() || (xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == ::rtl::OUString::createFromAscii("VIEW"))) -// return sal_False; -// -// // Wenn nur Felder hinzugefuegt werden duerfen, Delete nur auf neuen Feldern -// Reference<XConnection> xCon = GetView()->getController().getConnection(); -// Reference< XDatabaseMetaData> xMetaData = xCon.is() ? xCon->getMetaData() : NULL; -// -// return !(xTable.is() && xTable->getPropertySetInfo()->getPropertyByName(PROPERTY_NAME).Attributes & PropertyAttribute::READONLY) || -// ( xMetaData.is() && xMetaData->supportsAlterTableWithAddColumn() && xMetaData->supportsAlterTableWithDropColumn()); } //------------------------------------------------------------------------------ @@ -1936,7 +2002,9 @@ long OTableEditorCtrl::PreNotify( NotifyEvent& rNEvt ) { if (rNEvt.GetType() == EVENT_GETFOCUS) { - if( pDescrCell && pDescrCell->HasChildPathFocus() ) + if( pHelpTextCell && pHelpTextCell->HasChildPathFocus() ) + m_eChildFocus = HELPTEXT; + else if( pDescrCell && pDescrCell->HasChildPathFocus() ) m_eChildFocus = DESCRIPTION; else if(pNameCell && pNameCell->HasChildPathFocus() ) m_eChildFocus = NAME; diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx b/dbaccess/source/ui/tabledesign/TEditControl.hxx index f8f058f3d..b65734181 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.hxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx @@ -59,6 +59,7 @@ namespace dbaui { enum ChildFocusState { + HELPTEXT, DESCRIPTION, NAME, ROW, @@ -70,6 +71,7 @@ namespace dbaui OSQLNameEdit* pNameCell; ::svt::ListBoxControl* pTypeCell; + Edit* pHelpTextCell; Edit* pDescrCell; OTableFieldDescWin* pDescrWin; // properties of one column diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx index f0e0f7c13..8eb94aeb3 100644 --- a/dbaccess/source/ui/tabledesign/TableController.cxx +++ b/dbaccess/source/ui/tabledesign/TableController.cxx @@ -871,7 +871,7 @@ void OTableController::loadData() sal_Int32 nAlign = 0; sal_Bool bIsAutoIncrement = false, bIsCurrency = false; - ::rtl::OUString sName,sDescription,sTypeName; + ::rtl::OUString sName,sDescription,sTypeName,sHelpText; Any aControlDefault; // get the properties from the column @@ -883,10 +883,11 @@ void OTableController::loadData() xColumn->getPropertyValue(PROPERTY_TYPE) >>= nType; xColumn->getPropertyValue(PROPERTY_SCALE) >>= nScale; xColumn->getPropertyValue(PROPERTY_PRECISION) >>= nPrecision; - + xColumn->getPropertyValue(PROPERTY_DESCRIPTION) >>= sDescription; if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_HELPTEXT)) - xColumn->getPropertyValue(PROPERTY_HELPTEXT) >>= sDescription; + xColumn->getPropertyValue(PROPERTY_HELPTEXT) >>= sHelpText; + if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_CONTROLDEFAULT)) aControlDefault = xColumn->getPropertyValue(PROPERTY_CONTROLDEFAULT); if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_FORMATKEY)) @@ -912,6 +913,7 @@ void OTableController::loadData() pActFieldDescr->SetFormatKey(nFormatKey); // pActFieldDescr->SetPrimaryKey(pPrimary->GetValue()); pActFieldDescr->SetDescription(sDescription); + pActFieldDescr->SetHelpText(sHelpText); pActFieldDescr->SetAutoIncrement(bIsAutoIncrement); pActFieldDescr->SetHorJustify(dbaui::mapTextJustify(nAlign)); pActFieldDescr->SetCurrency(bIsCurrency); @@ -1120,13 +1122,14 @@ void OTableController::alterColumns() sal_Int32 nType=0,nPrecision=0,nScale=0,nNullable=0; sal_Bool bAutoIncrement = false; - ::rtl::OUString sTypeName; + ::rtl::OUString sTypeName,sDescription; xColumn->getPropertyValue(PROPERTY_TYPE) >>= nType; xColumn->getPropertyValue(PROPERTY_PRECISION) >>= nPrecision; xColumn->getPropertyValue(PROPERTY_SCALE) >>= nScale; xColumn->getPropertyValue(PROPERTY_ISNULLABLE) >>= nNullable; xColumn->getPropertyValue(PROPERTY_ISAUTOINCREMENT) >>= bAutoIncrement; + xColumn->getPropertyValue(PROPERTY_DESCRIPTION) >>= sDescription; try { xColumn->getPropertyValue(PROPERTY_TYPENAME) >>= sTypeName; } catch( const Exception& ) @@ -1144,7 +1147,8 @@ void OTableController::alterColumns() sTypeName != pField->GetTypeName() || (nPrecision != pField->GetPrecision() && nPrecision ) || nScale != pField->GetScale() || - nNullable != pField->GetIsNullable() || + nNullable != pField->GetIsNullable() || + sDescription != pField->GetDescription() || bAutoIncrement != pField->IsAutoIncrement())&& xColumnFactory.is()) { @@ -1264,7 +1268,8 @@ void OTableController::alterColumns() xColumns->getByName(pField->GetName()) >>= xColumn; Reference<XPropertySetInfo> xInfo = xColumn->getPropertySetInfo(); if ( xInfo->hasPropertyByName(PROPERTY_HELPTEXT) ) - xColumn->setPropertyValue(PROPERTY_HELPTEXT,makeAny(pField->GetDescription())); + xColumn->setPropertyValue(PROPERTY_HELPTEXT,makeAny(pField->GetHelpText())); + if(xInfo->hasPropertyByName(PROPERTY_CONTROLDEFAULT)) xColumn->setPropertyValue(PROPERTY_CONTROLDEFAULT,pField->GetControlDefault()); if(xInfo->hasPropertyByName(PROPERTY_FORMATKEY)) diff --git a/dbaccess/source/ui/tabledesign/TableRow.cxx b/dbaccess/source/ui/tabledesign/TableRow.cxx index c17ce8283..3aa87947d 100644 --- a/dbaccess/source/ui/tabledesign/TableRow.cxx +++ b/dbaccess/source/ui/tabledesign/TableRow.cxx @@ -140,6 +140,7 @@ namespace dbaui _rStr << (sal_Int32)1; _rStr.WriteByteString(pFieldDesc->GetName()); _rStr.WriteByteString(pFieldDesc->GetDescription()); + _rStr.WriteByteString(pFieldDesc->GetHelpText()); double nValue = 0.0; Any aValue = pFieldDesc->GetControlDefault(); if ( aValue >>= nValue ) @@ -184,6 +185,8 @@ namespace dbaui _rStr.ReadByteString(sValue); pFieldDesc->SetDescription(sValue); + _rStr.ReadByteString(sValue); + pFieldDesc->SetHelpText(sValue); _rStr >> nValue; Any aControlDefault; diff --git a/dbaccess/source/ui/tabledesign/table.src b/dbaccess/source/ui/tabledesign/table.src index e084ff76e..79da6deba 100644 --- a/dbaccess/source/ui/tabledesign/table.src +++ b/dbaccess/source/ui/tabledesign/table.src @@ -106,10 +106,14 @@ String STR_TAB_FIELD_LENGTH { Text [ en-US ] = "Field length" ; }; -String STR_TAB_FIELD_DESCR +String STR_TAB_HELP_TEXT { Text [ en-US ] = "Description" ; }; +String STR_COLUMN_DESCRIPTION +{ + Text [ en-US ] = "Column Description" ; +}; String STR_TAB_FIELD_NULLABLE { Text [ en-US ] = "Input required" ; |