Line data Source code
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 :
20 : #include "ConnectionLineData.hxx"
21 : #include <tools/debug.hxx>
22 :
23 : using namespace dbaui;
24 : //class OConnectionLineData
25 0 : OConnectionLineData::OConnectionLineData()
26 : {
27 0 : }
28 :
29 0 : OConnectionLineData::OConnectionLineData( const OUString& rSourceFieldName, const OUString& rDestFieldName )
30 : :m_aSourceFieldName( rSourceFieldName )
31 0 : ,m_aDestFieldName( rDestFieldName )
32 : {
33 0 : }
34 :
35 0 : OConnectionLineData::OConnectionLineData( const OConnectionLineData& rConnLineData )
36 0 : : ::salhelper::SimpleReferenceObject()
37 : {
38 0 : *this = rConnLineData;
39 0 : }
40 :
41 0 : OConnectionLineData::~OConnectionLineData()
42 : {
43 0 : }
44 :
45 0 : void OConnectionLineData::CopyFrom(const OConnectionLineData& rSource)
46 : {
47 0 : *this = rSource;
48 : // Here I rely on the (non-virtual) operator=, which only copies my members
49 0 : }
50 :
51 0 : OConnectionLineData& OConnectionLineData::operator=( const OConnectionLineData& rConnLineData )
52 : {
53 0 : if (&rConnLineData == this)
54 0 : return *this;
55 :
56 0 : m_aSourceFieldName = rConnLineData.GetSourceFieldName();
57 0 : m_aDestFieldName = rConnLineData.GetDestFieldName();
58 :
59 0 : return *this;
60 : }
61 :
62 0 : bool OConnectionLineData::Reset()
63 : {
64 0 : m_aDestFieldName = m_aSourceFieldName = OUString();
65 0 : return true;
66 : }
67 :
68 : namespace dbaui
69 : {
70 0 : bool operator==(const OConnectionLineData& lhs, const OConnectionLineData& rhs)
71 : {
72 0 : return (lhs.m_aSourceFieldName == rhs.m_aSourceFieldName)
73 0 : && (lhs.m_aDestFieldName == rhs.m_aDestFieldName);
74 : }
75 :
76 : }
77 :
78 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|