1 /************************************************************************* 2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * 4 * Copyright 2009 by Sun Microsystems, Inc. 5 * 6 * OpenOffice.org - a multi-platform office productivity suite 7 * 8 * This file is part of OpenOffice.org. 9 * 10 * OpenOffice.org is free software: you can redistribute it and/or modify 11 * it under the terms of the GNU Lesser General Public License version 3 12 * only, as published by the Free Software Foundation. 13 * 14 * OpenOffice.org is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * GNU Lesser General Public License version 3 for more details 18 * (a copy is included in the LICENSE file that accompanied this code). 19 * 20 * You should have received a copy of the GNU Lesser General Public License 21 * version 3 along with OpenOffice.org. If not, see 22 * <http://www.openoffice.org/license.html> 23 * for a copy of the LGPLv3 License. 24 ************************************************************************/ 25 26 #ifndef SUBCOMPONENTS_HXX 27 #define SUBCOMPONENTS_HXX 28 29 #include "dbaccessdllapi.h" 30 31 /** === begin UNO includes === **/ 32 #include <com/sun/star/sdb/application/DatabaseObject.hpp> 33 /** === end UNO includes === **/ 34 35 #include <rtl/ustring.hxx> 36 37 #include <hash_map> 38 #include <map> 39 40 //........................................................................ 41 namespace dbaccess 42 { 43 //........................................................................ 44 45 namespace DatabaseObject = ::com::sun::star::sdb::application::DatabaseObject; 46 47 // ------------------------------------------------------------------- 48 enum SubComponentType 49 { 50 TABLE = DatabaseObject::TABLE, 51 QUERY = DatabaseObject::QUERY, 52 FORM = DatabaseObject::FORM, 53 REPORT = DatabaseObject::REPORT, 54 55 RELATION_DESIGN = 1000, 56 57 UNKNOWN = 10001 58 }; 59 60 // ------------------------------------------------------------------- 61 struct DBACCESS_DLLPRIVATE SubComponentDescriptor 62 { 63 ::rtl::OUString sName; 64 bool bForEditing; 65 66 SubComponentDescriptor() 67 :sName() 68 ,bForEditing( false ) 69 { 70 } 71 72 SubComponentDescriptor( const ::rtl::OUString& i_rName, const bool i_bForEditing ) 73 :sName( i_rName ) 74 ,bForEditing( i_bForEditing ) 75 { 76 } 77 }; 78 79 // ------------------------------------------------------------------- 80 typedef ::std::hash_map< ::rtl::OUString, SubComponentDescriptor, ::rtl::OUStringHash > MapStringToCompDesc; 81 typedef ::std::map< SubComponentType, MapStringToCompDesc > MapCompTypeToCompDescs; 82 83 84 //........................................................................ 85 } // namespace dbaccess 86 //........................................................................ 87 88 #endif // SUBCOMPONENTS_HXX 89