summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/tabledesign/TableController.cxx
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2002-09-24 08:19:07 +0000
committerOcke Janssen <oj@openoffice.org>2002-09-24 08:19:07 +0000
commit3000faccaf963e614ee49e63a206a1c229d456e5 (patch)
treef39a52bcdd564dd0a6cf6cc7def409ab66c1a144 /dbaccess/source/ui/tabledesign/TableController.cxx
parente6aac5e97de7d1b87ff8154190c0ac25dfa1d750 (diff)
#103049# change handling of controlDefault, allow string and doubles
Diffstat (limited to 'dbaccess/source/ui/tabledesign/TableController.cxx')
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx20
1 files changed, 11 insertions, 9 deletions
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index 8a20269d6350..d459fa26dbdc 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.80 $
+ * $Revision: 1.81 $
*
- * last change: $Author: oj $ $Date: 2002-09-20 11:05:39 $
+ * last change: $Author: oj $ $Date: 2002-09-24 09:19:05 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1027,7 +1027,8 @@ void OTableController::loadData()
sal_Int32 nAlign = 0;
sal_Bool bIsAutoIncrement,bIsCurrency;
- ::rtl::OUString sName,sControlDefault,sDescription,sTypeName;
+ ::rtl::OUString sName,sDescription,sTypeName;
+ Any aControlDefault;
// get the properties from the column
xColumn->getPropertyValue(PROPERTY_NAME) >>= sName;
@@ -1043,7 +1044,7 @@ void OTableController::loadData()
if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_HELPTEXT))
xColumn->getPropertyValue(PROPERTY_HELPTEXT) >>= sDescription;
if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_CONTROLDEFAULT))
- xColumn->getPropertyValue(PROPERTY_CONTROLDEFAULT)>>= sControlDefault;
+ aControlDefault = xColumn->getPropertyValue(PROPERTY_CONTROLDEFAULT);
if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_FORMATKEY))
xColumn->getPropertyValue(PROPERTY_FORMATKEY) >>= nFormatKey;
if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_ALIGN))
@@ -1073,7 +1074,7 @@ void OTableController::loadData()
//////////////////////////////////////////////////////////////////////
// Spezielle Daten
pActFieldDescr->SetIsNullable(nNullable);
- pActFieldDescr->SetDefaultValue(sControlDefault);
+ pActFieldDescr->SetControlDefault(aControlDefault);
pActFieldDescr->SetPrecision(nPrecision);
pActFieldDescr->SetScale(nScale);
}
@@ -1299,7 +1300,8 @@ void OTableController::alterColumns()
sal_Int32 nType,nPrecision,nScale,nNullable,nFormatKey=0,nAlignment=0;
sal_Bool bAutoIncrement;
- ::rtl::OUString sDescription,sControlDefault;
+ ::rtl::OUString sDescription;
+ Any aControlDefault;
xColumn->getPropertyValue(PROPERTY_TYPE) >>= nType;
xColumn->getPropertyValue(PROPERTY_PRECISION) >>= nPrecision;
@@ -1310,7 +1312,7 @@ void OTableController::alterColumns()
if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_HELPTEXT))
xColumn->getPropertyValue(PROPERTY_HELPTEXT) >>= sDescription;
if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_CONTROLDEFAULT))
- xColumn->getPropertyValue(PROPERTY_CONTROLDEFAULT) >>= sControlDefault;
+ aControlDefault = xColumn->getPropertyValue(PROPERTY_CONTROLDEFAULT);
if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_FORMATKEY))
xColumn->getPropertyValue(PROPERTY_FORMATKEY) >>= nFormatKey;
if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_ALIGN))
@@ -1385,10 +1387,10 @@ void OTableController::alterColumns()
if(xColumn.is() && xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_HELPTEXT))
xColumn->setPropertyValue(PROPERTY_HELPTEXT,makeAny(pField->GetDescription()));
}
- if(sControlDefault != pField->GetDefaultValue())
+ if ( aControlDefault != pField->GetControlDefault())
{
if(xColumn.is() && xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_CONTROLDEFAULT))
- xColumn->setPropertyValue(PROPERTY_CONTROLDEFAULT,makeAny(pField->GetDefaultValue()));
+ xColumn->setPropertyValue(PROPERTY_CONTROLDEFAULT,pField->GetControlDefault());
}
}
else if(xColumnFactory.is() && xAlter.is() && nPos < nColumnCount)