LibreOffice Module dbaccess (master) 1
ConnectionLineData.cxx
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
21#include <utility>
22
23using namespace dbaui;
24OConnectionLineData::OConnectionLineData()
25{
26}
27
28OConnectionLineData::OConnectionLineData( OUString sSourceFieldName, OUString sDestFieldName )
29 :m_aSourceFieldName(std::move( sSourceFieldName ))
30 ,m_aDestFieldName(std::move( sDestFieldName ))
31{
32}
33
35 : ::salhelper::SimpleReferenceObject()
36{
37 *this = rConnLineData;
38}
39
41{
42}
43
45{
46 *this = rSource;
47 // Here I rely on the (non-virtual) operator=, which only copies my members
48}
49
51{
52 if (&rConnLineData == this)
53 return *this;
54
55 m_aSourceFieldName = rConnLineData.GetSourceFieldName();
56 m_aDestFieldName = rConnLineData.GetDestFieldName();
57
58 return *this;
59}
60
62{
63 m_aDestFieldName.clear();
64 m_aSourceFieldName.clear();
65}
66
67namespace dbaui
68{
70{
71 return (lhs.m_aSourceFieldName == rhs.m_aSourceFieldName)
72 && (lhs.m_aDestFieldName == rhs.m_aDestFieldName);
73}
74
75}
76
77/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
the class OConnectionLineData contains the data of a connection e.g.
virtual ~OConnectionLineData() override
OUString const & GetSourceFieldName() const
OUString const & GetDestFieldName() const
void CopyFrom(const OConnectionLineData &rSource)
OConnectionLineData & operator=(const OConnectionLineData &rConnLineData)
static bool operator==(const OIndexField &_rLHS, const OIndexField &_rRHS)
Definition: indexdialog.cxx:47