Bump version to 5.0-14
[LibreOffice.git] / dbaccess / source / ui / querydesign / ConnectionLineData.cxx
blob518ffea0324378b3cd0bdef83e20b37a1f1b3a8d
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 .
20 #include "ConnectionLineData.hxx"
21 #include <tools/debug.hxx>
23 using namespace dbaui;
24 //class OConnectionLineData
25 OConnectionLineData::OConnectionLineData()
29 OConnectionLineData::OConnectionLineData( const OUString& rSourceFieldName, const OUString& rDestFieldName )
30 :m_aSourceFieldName( rSourceFieldName )
31 ,m_aDestFieldName( rDestFieldName )
35 OConnectionLineData::OConnectionLineData( const OConnectionLineData& rConnLineData )
36 : ::salhelper::SimpleReferenceObject()
38 *this = rConnLineData;
41 OConnectionLineData::~OConnectionLineData()
45 void OConnectionLineData::CopyFrom(const OConnectionLineData& rSource)
47 *this = rSource;
48 // Here I rely on the (non-virtual) operator=, which only copies my members
51 OConnectionLineData& OConnectionLineData::operator=( const OConnectionLineData& rConnLineData )
53 if (&rConnLineData == this)
54 return *this;
56 m_aSourceFieldName = rConnLineData.GetSourceFieldName();
57 m_aDestFieldName = rConnLineData.GetDestFieldName();
59 return *this;
62 bool OConnectionLineData::Reset()
64 m_aDestFieldName.clear();
65 m_aSourceFieldName.clear();
66 return true;
69 namespace dbaui
71 bool operator==(const OConnectionLineData& lhs, const OConnectionLineData& rhs)
73 return (lhs.m_aSourceFieldName == rhs.m_aSourceFieldName)
74 && (lhs.m_aDestFieldName == rhs.m_aDestFieldName);
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */