summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/tabledesign/TableController.cxx
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2001-10-18 11:04:12 +0000
committerOcke Janssen <oj@openoffice.org>2001-10-18 11:04:12 +0000
commit0768b7c5b3fca67cdf924f1a1683ed5c450b1936 (patch)
tree0de415b9c3761fa84efb6f244f041d68cb409b65 /dbaccess/source/ui/tabledesign/TableController.cxx
parenta47fca5466c33dc1aebb6ee3dfe5f8cd67cfacac (diff)
#93312# insert dummy type into tablecontroller
Diffstat (limited to 'dbaccess/source/ui/tabledesign/TableController.cxx')
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx42
1 files changed, 25 insertions, 17 deletions
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index 8a1f0e6f4c44..7f3a920f809d 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: TableController.cxx,v $
*
- * $Revision: 1.54 $
+ * $Revision: 1.55 $
*
- * last change: $Author: oj $ $Date: 2001-09-25 13:24:37 $
+ * last change: $Author: oj $ $Date: 2001-10-18 12:04:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -246,12 +246,16 @@ OTableController::OTableController(const Reference< XMultiServiceFactory >& _rM)
,m_bModified(sal_False)
,m_sTypeNames(ModuleRes(STR_TABLEDESIGN_DBFIELDTYPES))
,m_bNew(sal_True)
+ ,m_pTypeInfo(NULL)
{
InvalidateAll();
+ m_pTypeInfo = new OTypeInfo();
+ m_pTypeInfo->aUIName = m_sTypeNames.GetToken(TYPE_OTHER);
}
// -----------------------------------------------------------------------------
OTableController::~OTableController()
{
+ DELETEZ(m_pTypeInfo);
m_aTypeInfoIndex.clear();
OTypeInfoMap::iterator aIter = m_aTypeInfo.begin();
for(;aIter != m_aTypeInfo.end();++aIter)
@@ -1053,25 +1057,29 @@ void OTableController::loadData()
// search for type
sal_Bool bForce;
const OTypeInfo* pTypeInfo = ::dbaui::getTypeInfoFromType(m_aTypeInfo,nType,sTypeName,nPrecision,nScale,bForce);
+ if(!pTypeInfo)
+ pTypeInfo = m_pTypeInfo;
pTabEdRow->SetFieldType( pTypeInfo, bForce );
pActFieldDescr = pTabEdRow->GetActFieldDescr();
OSL_ENSURE(pActFieldDescr, "OTableController::loadData: invalid field description generated by the table row!");
- pActFieldDescr->SetName(sName);
- pActFieldDescr->SetFormatKey(nFormatKey);
- // pActFieldDescr->SetPrimaryKey(pPrimary->GetValue());
- pActFieldDescr->SetDescription(sDescription);
- pActFieldDescr->SetAutoIncrement(bIsAutoIncrement);
- pActFieldDescr->SetHorJustify((SvxCellHorJustify)nAlign);
- pActFieldDescr->SetCurrency(bIsCurrency);
-
- //////////////////////////////////////////////////////////////////////
- // Spezielle Daten
- pActFieldDescr->SetIsNullable(nNullable);
- pActFieldDescr->SetDefaultValue(sDefaultValue);
- pActFieldDescr->SetPrecision(nPrecision);
- pActFieldDescr->SetScale(nScale);
-
+ if(pActFieldDescr)
+ {
+ pActFieldDescr->SetName(sName);
+ pActFieldDescr->SetFormatKey(nFormatKey);
+ // pActFieldDescr->SetPrimaryKey(pPrimary->GetValue());
+ pActFieldDescr->SetDescription(sDescription);
+ pActFieldDescr->SetAutoIncrement(bIsAutoIncrement);
+ pActFieldDescr->SetHorJustify((SvxCellHorJustify)nAlign);
+ pActFieldDescr->SetCurrency(bIsCurrency);
+
+ //////////////////////////////////////////////////////////////////////
+ // Spezielle Daten
+ pActFieldDescr->SetIsNullable(nNullable);
+ pActFieldDescr->SetDefaultValue(sDefaultValue);
+ pActFieldDescr->SetPrecision(nPrecision);
+ pActFieldDescr->SetScale(nScale);
+ }
m_vRowList.push_back( pTabEdRow);
}
// fill the primary key information