fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / dbaccess / source / ui / querydesign / QTableConnectionData.hxx
blobc511649bf2f4405bccba59fcf18ace55b14b9af4
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_DBACCESS_SOURCE_UI_QUERYDESIGN_QTABLECONNECTIONDATA_HXX
20 #define INCLUDED_DBACCESS_SOURCE_UI_QUERYDESIGN_QTABLECONNECTIONDATA_HXX
22 #include "TableConnectionData.hxx"
23 #include "TableFieldDescription.hxx"
24 #include "QEnumTypes.hxx"
25 #include <tools/rtti.hxx>
27 namespace dbaui
29 class OQueryTableConnectionData : public OTableConnectionData
31 sal_Int32 m_nFromEntryIndex;
32 sal_Int32 m_nDestEntryIndex;
33 EJoinType m_eJoinType;
34 bool m_bNatural;
36 ETableFieldType m_eFromType;
37 ETableFieldType m_eDestType;
39 protected:
40 // for creation and duplication of lines of own type
41 virtual OConnectionLineDataRef CreateLineDataObj() SAL_OVERRIDE;
42 virtual OConnectionLineDataRef CreateLineDataObj( const OConnectionLineData& rConnLineData ) SAL_OVERRIDE;
44 OQueryTableConnectionData& operator=( const OQueryTableConnectionData& rConnData );
45 public:
46 OQueryTableConnectionData();
47 OQueryTableConnectionData( const OQueryTableConnectionData& rConnData );
48 OQueryTableConnectionData( const TTableWindowData::value_type& _pReferencingTable,const TTableWindowData::value_type& _pReferencedTable,
49 const OUString& rConnName=OUString());
50 virtual ~OQueryTableConnectionData();
52 virtual void CopyFrom(const OTableConnectionData& rSource) SAL_OVERRIDE;
53 virtual OTableConnectionData* NewInstance() const SAL_OVERRIDE;
56 /** Update create a new connection
58 @return true if successful
60 virtual bool Update() SAL_OVERRIDE;
62 OUString GetAliasName(EConnectionSide nWhich) const;
64 sal_Int32 GetFieldIndex(EConnectionSide nWhich) const { return nWhich==JTCS_TO ? m_nDestEntryIndex : m_nFromEntryIndex; }
65 void SetFieldIndex(EConnectionSide nWhich, sal_Int32 nVal) { if (nWhich==JTCS_TO) m_nDestEntryIndex=nVal; else m_nFromEntryIndex=nVal; }
67 ETableFieldType GetFieldType(EConnectionSide nWhich) const { return nWhich==JTCS_TO ? m_eDestType : m_eFromType; }
68 void SetFieldType(EConnectionSide nWhich, ETableFieldType eType) { if (nWhich==JTCS_TO) m_eDestType=eType; else m_eFromType=eType; }
70 void InitFromDrag(const OTableFieldDescRef& rDragLeft, const OTableFieldDescRef& rDragRight);
72 EJoinType GetJoinType() const { return m_eJoinType; };
73 void SetJoinType(const EJoinType& eJT) { m_eJoinType = eJT; };
75 inline void setNatural(bool _bNatural) { m_bNatural = _bNatural; }
76 inline bool isNatural() const { return m_bNatural; }
80 #endif // INCLUDED_DBACCESS_SOURCE_UI_QUERYDESIGN_QTABLECONNECTIONDATA_HXX
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */