LibreOffice Module connectivity (master) 1
adoimp.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#pragma once
20
21#include <com/sun/star/sdbc/SQLException.hpp>
22
23#include <adoctint.h>
24
25struct ADOConnection;
26
27namespace sal::systools { class BStr; };
28
29namespace connectivity::ado
30{
31
32 class WpADOField;
33 class ADOS
34 {
35 public:
36 // Also here: Free BSTR with SysFreeString()!
37 static sal::systools::BStr& GetKeyStr();
38
39 static const CLSID CLSID_ADOCATALOG_25;
40 static const IID IID_ADOCATALOG_25;
41
42 static const CLSID CLSID_ADOCONNECTION_21;
43 static const IID IID_ADOCONNECTION_21;
44
45 static const CLSID CLSID_ADOCOMMAND_21;
46 static const IID IID_ADOCOMMAND_21;
47
48 static const CLSID CLSID_ADORECORDSET_21;
49 static const IID IID_ADORECORDSET_21;
50
51 static const CLSID CLSID_ADOINDEX_25;
52 static const IID IID_ADOINDEX_25;
53
54 static const CLSID CLSID_ADOCOLUMN_25;
55 static const IID IID_ADOCOLUMN_25;
56
57 static const CLSID CLSID_ADOKEY_25;
58 static const IID IID_ADOKEY_25;
59
60 static const CLSID CLSID_ADOTABLE_25;
61 static const IID IID_ADOTABLE_25;
62
63 static const CLSID CLSID_ADOGROUP_25;
64 static const IID IID_ADOGROUP_25;
65
66 static const CLSID CLSID_ADOUSER_25;
67 static const IID IID_ADOUSER_25;
68
69 static const CLSID CLSID_ADOVIEW_25;
70 static const IID IID_ADOVIEW_25;
71
74 static void ThrowException(ADOConnection* _pAdoCon,const css::uno::Reference< css::uno::XInterface >& _xInterface);
75 static sal_Int32 MapADOType2Jdbc(DataTypeEnum eType);
76 static DataTypeEnum MapJdbc2ADOType(sal_Int32 _nType,sal_Int32 _nJetEngine);
77 static bool isJetEngine(sal_Int32 _nEngineType);
78
79 static ObjectTypeEnum mapObjectType2Ado(sal_Int32 objType);
80 static sal_Int32 mapAdoType2Object(ObjectTypeEnum objType);
81 static sal_Int32 mapAdoRights2Sdbc(RightsEnum eRights);
82 static sal_Int32 mapRights2Ado(sal_Int32 nRights);
83
86 static WpADOField getField(ADORecordset* _pRecordSet,sal_Int32 _nColumnIndex);
87 };
88
89
90}
91
92
93#define ADO_PROP(ItemName) \
94 WpADOProperty aProp(aProps.GetItem(ItemName)); \
95 OLEVariant aVar; \
96 if(aProp.IsValid()) \
97 aVar = aProp.GetValue(); \
98 else \
99 ADOS::ThrowException(m_rADOConnection,*this);
100
101
102
103/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static const CLSID CLSID_ADOTABLE_25
Definition: adoimp.hxx:60
static void ThrowException(ADOConnection *_pAdoCon, const css::uno::Reference< css::uno::XInterface > &_xInterface)
Definition: ADriver.cxx:207
static const CLSID CLSID_ADOCOMMAND_21
Definition: adoimp.hxx:45
static const CLSID CLSID_ADOCONNECTION_21
Definition: adoimp.hxx:42
static const CLSID CLSID_ADOGROUP_25
Definition: adoimp.hxx:63
static bool isJetEngine(sal_Int32 _nEngineType)
Definition: adoimp.cxx:189
static const CLSID CLSID_ADOCOLUMN_25
Definition: adoimp.hxx:54
static const CLSID CLSID_ADOVIEW_25
Definition: adoimp.hxx:69
static const IID IID_ADOCOMMAND_21
Definition: adoimp.hxx:46
static ObjectTypeEnum mapObjectType2Ado(sal_Int32 objType)
Definition: adoimp.cxx:224
static const IID IID_ADOCONNECTION_21
Definition: adoimp.hxx:43
static const IID IID_ADOUSER_25
Definition: adoimp.hxx:67
static const IID IID_ADOCOLUMN_25
Definition: adoimp.hxx:55
static DataTypeEnum MapJdbc2ADOType(sal_Int32 _nType, sal_Int32 _nJetEngine)
Definition: adoimp.cxx:131
static sal_Int32 MapADOType2Jdbc(DataTypeEnum eType)
Definition: adoimp.cxx:78
static sal_Int32 mapRights2Ado(sal_Int32 nRights)
Definition: adoimp.cxx:287
static const CLSID CLSID_ADOKEY_25
Definition: adoimp.hxx:57
static const IID IID_ADOGROUP_25
Definition: adoimp.hxx:64
static const IID IID_ADOTABLE_25
Definition: adoimp.hxx:61
static WpADOField getField(ADORecordset *_pRecordSet, sal_Int32 _nColumnIndex)
Definition: adoimp.cxx:309
static const CLSID CLSID_ADOCATALOG_25
Definition: adoimp.hxx:39
static sal_Int32 mapAdoRights2Sdbc(RightsEnum eRights)
Definition: adoimp.cxx:266
static sal::systools::BStr & GetKeyStr()
Definition: adoimp.cxx:71
static sal_Int32 mapAdoType2Object(ObjectTypeEnum objType)
Definition: adoimp.cxx:242
static const CLSID CLSID_ADOUSER_25
Definition: adoimp.hxx:66
static const IID IID_ADOCATALOG_25
Definition: adoimp.hxx:40
static const CLSID CLSID_ADORECORDSET_21
Definition: adoimp.hxx:48
static const IID IID_ADOKEY_25
Definition: adoimp.hxx:58
static const IID IID_ADORECORDSET_21
Definition: adoimp.hxx:49
static const IID IID_ADOVIEW_25
Definition: adoimp.hxx:70
static const CLSID CLSID_ADOINDEX_25
Definition: adoimp.hxx:51
static const IID IID_ADOINDEX_25
Definition: adoimp.hxx:52