1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: datasourceui.cxx,v $
10 * $Revision: 1.5.68.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #include "datasourceui.hxx"
33 #include "dsitems.hxx"
35 /** === begin UNO includes === **/
36 /** === end UNO includes === **/
38 //........................................................................
41 //........................................................................
43 /** === begin UNO using === **/
44 using ::com::sun::star::uno::Reference
;
45 using ::com::sun::star::uno::UNO_QUERY
;
46 using ::com::sun::star::uno::UNO_QUERY_THROW
;
47 using ::com::sun::star::uno::Exception
;
48 using ::com::sun::star::uno::RuntimeException
;
49 /** === end UNO using === **/
51 //====================================================================
53 //====================================================================
54 //--------------------------------------------------------------------
55 DataSourceUI::DataSourceUI( const DataSourceMetaData
& _rDSMeta
)
56 :m_aDSMeta( _rDSMeta
)
60 //--------------------------------------------------------------------
61 DataSourceUI::~DataSourceUI()
65 //--------------------------------------------------------------------
66 bool DataSourceUI::hasSetting( const USHORT _nItemId
) const
68 const AdvancedSettingsSupport
& rAdvancedSupport( m_aDSMeta
.getAdvancedSettingsSupport() );
72 case DSID_SQL92CHECK
: return rAdvancedSupport
.bUseSQL92NamingConstraints
;
73 case DSID_APPEND_TABLE_ALIAS
: return rAdvancedSupport
.bAppendTableAliasInSelect
;
74 case DSID_AS_BEFORE_CORRNAME
: return rAdvancedSupport
.bUseKeywordAsBeforeAlias
;
75 case DSID_ENABLEOUTERJOIN
: return rAdvancedSupport
.bUseBracketedOuterJoinSyntax
;
76 case DSID_IGNOREDRIVER_PRIV
: return rAdvancedSupport
.bIgnoreDriverPrivileges
;
77 case DSID_PARAMETERNAMESUBST
: return rAdvancedSupport
.bParameterNameSubstitution
;
78 case DSID_SUPPRESSVERSIONCL
: return rAdvancedSupport
.bDisplayVersionColumns
;
79 case DSID_CATALOG
: return rAdvancedSupport
.bUseCatalogInSelect
;
80 case DSID_SCHEMA
: return rAdvancedSupport
.bUseSchemaInSelect
;
81 case DSID_INDEXAPPENDIX
: return rAdvancedSupport
.bUseIndexDirectionKeyword
;
82 case DSID_DOSLINEENDS
: return rAdvancedSupport
.bUseDOSLineEnds
;
83 case DSID_BOOLEANCOMPARISON
: return rAdvancedSupport
.bBooleanComparisonMode
;
84 case DSID_CHECK_REQUIRED_FIELDS
:return rAdvancedSupport
.bFormsCheckRequiredFields
;
85 case DSID_AUTORETRIEVEENABLED
: return rAdvancedSupport
.bGeneratedValues
;
86 case DSID_AUTOINCREMENTVALUE
: return rAdvancedSupport
.bGeneratedValues
;
87 case DSID_AUTORETRIEVEVALUE
: return rAdvancedSupport
.bGeneratedValues
;
88 case DSID_IGNORECURRENCY
: return rAdvancedSupport
.bIgnoreCurrency
;
89 case DSID_ESCAPE_DATETIME
: return rAdvancedSupport
.bEscapeDateTime
;
92 OSL_ENSURE( false, "DataSourceUI::hasSetting: this item id is currently not supported!" );
93 // Support for *all* items is a medium-term goal only.
97 //........................................................................
99 //........................................................................