1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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>
23 using namespace dbaui
;
24 OConnectionLineData::OConnectionLineData()
28 OConnectionLineData::OConnectionLineData( OUString sSourceFieldName
, OUString sDestFieldName
)
29 :m_aSourceFieldName(std::move( sSourceFieldName
))
30 ,m_aDestFieldName(std::move( sDestFieldName
))
34 OConnectionLineData::OConnectionLineData( const OConnectionLineData
& rConnLineData
)
35 : ::salhelper::SimpleReferenceObject()
37 *this = rConnLineData
;
40 OConnectionLineData::~OConnectionLineData()
44 void OConnectionLineData::CopyFrom(const OConnectionLineData
& rSource
)
47 // Here I rely on the (non-virtual) operator=, which only copies my members
50 OConnectionLineData
& OConnectionLineData::operator=( const OConnectionLineData
& rConnLineData
)
52 if (&rConnLineData
== this)
55 m_aSourceFieldName
= rConnLineData
.GetSourceFieldName();
56 m_aDestFieldName
= rConnLineData
.GetDestFieldName();
61 void OConnectionLineData::Reset()
63 m_aDestFieldName
.clear();
64 m_aSourceFieldName
.clear();
69 bool operator==(const OConnectionLineData
& lhs
, const OConnectionLineData
& rhs
)
71 return (lhs
.m_aSourceFieldName
== rhs
.m_aSourceFieldName
)
72 && (lhs
.m_aDestFieldName
== rhs
.m_aDestFieldName
);
77 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */