Tag: cws_dev300_dba30d User: fs Date: 2008-06-10 11:05:21+0000 Modified: dba/dbaccess/source/ui/app/AppDetailPageHelper.cxx dba/dbaccess/source/ui/app/AppDetailPageHelper.hxx
Log: +describeCurrentSelectionForType File Changes: Directory: /dba/dbaccess/source/ui/app/ ======================================= File [changed]: AppDetailPageHelper.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppDetailPageHelper.cxx?r1=1.32.10.4&r2=1.32.10.5 Delta lines: +17 -9 -------------------- --- AppDetailPageHelper.cxx 2008-06-10 08:34:44+0000 1.32.10.4 +++ AppDetailPageHelper.cxx 2008-06-10 11:05:19+0000 1.32.10.5 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AppDetailPageHelper.cxx,v $ - * $Revision: 1.32.10.4 $ + * $Revision: 1.32.10.5 $ * * This file is part of OpenOffice.org. * @@ -452,19 +452,27 @@ } // ----------------------------------------------------------------------------- -void OAppDetailPageHelper::describeCurrentSelectionForControl( const Control& _rControl, Any& _out_rSelectedObjects ) +void OAppDetailPageHelper::describeCurrentSelectionForControl( const Control& _rControl, Sequence< NamedDatabaseObject >& _out_rSelectedObjects ) { - DBTreeListBox* pList = NULL; enum ElementType eType = E_TABLE; for ( size_t i=0; i < ELEMENT_COUNT; eType = static_cast< ElementType >( ++i ) ) { if ( m_pLists[eType] == &_rControl ) { - pList = m_pLists[eType]; + describeCurrentSelectionForType( eType, _out_rSelectedObjects ); break; } } - OSL_ENSURE( pList, "OAppDetailPageHelper::describeCurrentSelectionForControl: invalid control, this is none of our lists!" ); + OSL_ENSURE( false, "OAppDetailPageHelper::describeCurrentSelectionForControl: invalid control!" ); +} + +// ----------------------------------------------------------------------------- +void OAppDetailPageHelper::describeCurrentSelectionForType( const ElementType _eType, Sequence< NamedDatabaseObject >& _out_rSelectedObjects ) +{ + OSL_ENSURE( _eType < E_ELEMENT_TYPE_COUNT, "OAppDetailPageHelper::describeCurrentSelectionForType: invalid type!" ); + DBTreeListBox* pList = m_pLists[ _eType ]; + OSL_ENSURE( pList, "OAppDetailPageHelper::describeCurrentSelectionForType: " + "You really should ensure this type has already been viewed before!" ); if ( !pList ) return; @@ -474,7 +482,7 @@ while( pEntry ) { NamedDatabaseObject aObject; - switch ( eType ) + switch ( _eType ) { case E_TABLE: { @@ -504,14 +512,14 @@ } if ( isLeaf( pEntry ) ) - aObject.Type = ( eType == E_FORM ) ? DatabaseObject::FORM : DatabaseObject::REPORT; + aObject.Type = ( _eType == E_FORM ) ? DatabaseObject::FORM : DatabaseObject::REPORT; else - aObject.Type = ( eType == E_FORM ) ? DatabaseObjectContainer::FORMS_FOLDER : DatabaseObjectContainer::REPORTS_FOLDER; + aObject.Type = ( _eType == E_FORM ) ? DatabaseObjectContainer::FORMS_FOLDER : DatabaseObjectContainer::REPORTS_FOLDER; aObject.Name = sName; } break; default: - OSL_ENSURE( false, "OAppDetailPageHelper::describeCurrentSelectionForControl: unexpected type!" ); + OSL_ENSURE( false, "OAppDetailPageHelper::describeCurrentSelectionForType: unexpected type!" ); break; } File [changed]: AppDetailPageHelper.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppDetailPageHelper.hxx?r1=1.14.30.3&r2=1.14.30.4 Delta lines: +12 -2 -------------------- --- AppDetailPageHelper.hxx 2008-06-09 13:45:44+0000 1.14.30.3 +++ AppDetailPageHelper.hxx 2008-06-10 11:05:19+0000 1.14.30.4 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AppDetailPageHelper.hxx,v $ - * $Revision: 1.14.30.3 $ + * $Revision: 1.14.30.4 $ * * This file is part of OpenOffice.org. * @@ -38,6 +38,9 @@ #ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_ #include <com/sun/star/sdbc/XDatabaseMetaData.hpp> #endif +#ifndef _COM_SUN_STAR_SDB_APPLICATION_NAMEDDATABASEOBJECT_HPP_ +#include <com/sun/star/sdb/application/NamedDatabaseObject.hpp> +#endif #ifndef _COM_SUN_STAR_UCB_XCONTENT_HPP_ #include <com/sun/star/ucb/XContent.hpp> #endif @@ -268,7 +271,14 @@ */ void describeCurrentSelectionForControl( const Control& _rControl, - ::com::sun::star::uno::Any& _out_rSelectedObjects + ::com::sun::star::uno::Sequence< ::com::sun::star::sdb::application::NamedDatabaseObject >& _out_rSelectedObjects + ); + + /** describes the current selection for the given ElementType + */ + void describeCurrentSelectionForType( + const ElementType _eType, + ::com::sun::star::uno::Sequence< ::com::sun::star::sdb::application::NamedDatabaseObject >& _out_rSelectedObjects ); /** select all names on the currently selected container. Non existence names where ignored. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
