summaryrefslogtreecommitdiffstats
path: root/dbaccess/source/ui/misc/indexcollection.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/misc/indexcollection.cxx')
-rw-r--r--dbaccess/source/ui/misc/indexcollection.cxx19
1 files changed, 6 insertions, 13 deletions
diff --git a/dbaccess/source/ui/misc/indexcollection.cxx b/dbaccess/source/ui/misc/indexcollection.cxx
index b45dbd4df956..96e70108a69c 100644
--- a/dbaccess/source/ui/misc/indexcollection.cxx
+++ b/dbaccess/source/ui/misc/indexcollection.cxx
@@ -142,11 +142,9 @@ namespace dbaui
}
// set the properties
- static const char s_sUniquePropertyName[] = "IsUnique";
- static const char s_sSortPropertyName[] = "IsAscending";
static const char s_sNamePropertyName[] = "Name";
// the index' own props
- xIndexDescriptor->setPropertyValue(s_sUniquePropertyName, css::uno::makeAny(_rPos->bUnique));
+ xIndexDescriptor->setPropertyValue("IsUnique", css::uno::makeAny(_rPos->bUnique));
xIndexDescriptor->setPropertyValue(s_sNamePropertyName, makeAny(_rPos->sName));
// the fields
@@ -161,7 +159,7 @@ namespace dbaui
OSL_ENSURE(xColDescriptor.is(), "OIndexCollection::commitNewIndex: invalid column descriptor!");
if (xColDescriptor.is())
{
- xColDescriptor->setPropertyValue(s_sSortPropertyName, css::uno::makeAny(aFieldLoop->bSortAscending));
+ xColDescriptor->setPropertyValue("IsAscending", css::uno::makeAny(aFieldLoop->bSortAscending));
xColDescriptor->setPropertyValue(s_sNamePropertyName, makeAny(OUString(aFieldLoop->sFieldName)));
xAppendCols->appendByDescriptor(xColDescriptor);
}
@@ -244,14 +242,9 @@ namespace dbaui
void OIndexCollection::implFillIndexInfo(OIndex& _rIndex, const Reference< XPropertySet >& _rxDescriptor)
{
- static const char s_sPrimaryIndexPropertyName[] = "IsPrimaryKeyIndex";
- static const char s_sUniquePropertyName[] = "IsUnique";
- static const char s_sSortPropertyName[] = "IsAscending";
- static const char s_sCatalogPropertyName[] = "Catalog";
-
- _rIndex.bPrimaryKey = ::cppu::any2bool(_rxDescriptor->getPropertyValue(s_sPrimaryIndexPropertyName));
- _rIndex.bUnique = ::cppu::any2bool(_rxDescriptor->getPropertyValue(s_sUniquePropertyName));
- _rxDescriptor->getPropertyValue(s_sCatalogPropertyName) >>= _rIndex.sDescription;
+ _rIndex.bPrimaryKey = ::cppu::any2bool(_rxDescriptor->getPropertyValue("IsPrimaryKeyIndex"));
+ _rIndex.bUnique = ::cppu::any2bool(_rxDescriptor->getPropertyValue("IsUnique"));
+ _rxDescriptor->getPropertyValue("Catalog") >>= _rIndex.sDescription;
// the columns
Reference< XColumnsSupplier > xSuppCols(_rxDescriptor, UNO_QUERY);
@@ -283,7 +276,7 @@ namespace dbaui
// get the relevant properties
aCopyTo->sFieldName = *pFieldNames;
- aCopyTo->bSortAscending = ::cppu::any2bool(xIndexColumn->getPropertyValue(s_sSortPropertyName));
+ aCopyTo->bSortAscending = ::cppu::any2bool(xIndexColumn->getPropertyValue("IsAscending"));
}
_rIndex.aFields.resize(aCopyTo - _rIndex.aFields.begin());