From e17bde3792c51461ec908841d4a5620c45f1e66c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Timm?= Date: Mon, 1 Dec 2003 09:15:25 +0000 Subject: [PATCH] INTEGRATION: CWS geordi2q10 (1.20.10); FILE MERGED 2003/11/28 11:15:28 rt 1.20.10.1: #111934#: join CWS dba01pp1 --- forms/source/component/ComboBox.cxx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index 8da3edafe7d9..16e75635fe88 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ComboBox.cxx,v $ * - * $Revision: 1.20 $ + * $Revision: 1.21 $ * - * last change: $Author: obo $ $Date: 2003-10-21 08:55:36 $ + * last change: $Author: rt $ $Date: 2003-12-01 10:15:25 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -612,13 +612,14 @@ void OComboBoxModel::loadData() } // search the field - Reference xSupplyFields(xComposer, UNO_QUERY); + Reference< XColumnsSupplier > xSupplyFields(xComposer, UNO_QUERY); DBG_ASSERT(xSupplyFields.is(), "OComboBoxModel::loadData : invalid query composer !"); - Reference xFieldNames = xSupplyFields->getColumns(); + Reference< XNameAccess > xFieldNames = xSupplyFields->getColumns(); if (xFieldNames->hasByName(m_aControlSource)) { - Reference xComposerFieldAsSet(*(Reference*)xFieldNames->getByName(m_aControlSource).getValue()); + Reference< XPropertySet > xComposerFieldAsSet; + xFieldNames->getByName(m_aControlSource) >>= xComposerFieldAsSet; if (hasProperty(PROPERTY_FIELDSOURCE, xComposerFieldAsSet)) xComposerFieldAsSet->getPropertyValue(PROPERTY_FIELDSOURCE) >>= aFieldName; } @@ -643,7 +644,8 @@ void OComboBoxModel::loadData() case ListSourceType_QUERY: { Reference xSupplyQueries(xConnection, UNO_QUERY); - Reference xQuery(*(InterfaceRef*)xSupplyQueries->getQueries()->getByName(m_aListSource).getValue(), UNO_QUERY); + Reference< XPropertySet > xQuery; + xSupplyQueries->getQueries()->getByName( m_aListSource ) >>= xQuery; xStmt = xConnection->createStatement(); Reference(xStmt, UNO_QUERY)->setPropertyValue(PROPERTY_ESCAPE_PROCESSING, xQuery->getPropertyValue(PROPERTY_ESCAPE_PROCESSING)); @@ -704,7 +706,7 @@ void OComboBoxModel::loadData() } Reference xDataField; if (xColumns.is()) - xDataField = Reference(*(InterfaceRef*)xColumns->getByIndex(0).getValue(), UNO_QUERY); + xColumns->getByIndex(0) >>= xDataField; if (!xDataField.is()) { disposeComponent(xListCursor);