1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ConnectionLineData.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_dbaccess.hxx"
33 #ifndef DBAUI_CONNECTIONLINEDATA_HXX
34 #include "ConnectionLineData.hxx"
36 #ifndef _TOOLS_DEBUG_HXX
37 #include <tools/debug.hxx>
41 using namespace dbaui
;
42 DBG_NAME(OConnectionLineData
)
43 //==================================================================
44 //class OConnectionLineData
45 //==================================================================
46 //------------------------------------------------------------------------
47 OConnectionLineData::OConnectionLineData()
49 DBG_CTOR(OConnectionLineData
,NULL
);
52 //------------------------------------------------------------------------
53 OConnectionLineData::OConnectionLineData( const ::rtl::OUString
& rSourceFieldName
, const ::rtl::OUString
& rDestFieldName
)
54 :m_aSourceFieldName( rSourceFieldName
)
55 ,m_aDestFieldName( rDestFieldName
)
57 DBG_CTOR(OConnectionLineData
,NULL
);
60 //------------------------------------------------------------------------
61 OConnectionLineData::OConnectionLineData( const OConnectionLineData
& rConnLineData
)
64 DBG_CTOR(OConnectionLineData
,NULL
);
65 *this = rConnLineData
;
68 //------------------------------------------------------------------------
69 OConnectionLineData::~OConnectionLineData()
71 DBG_DTOR(OConnectionLineData
,NULL
);
74 //------------------------------------------------------------------------
75 void OConnectionLineData::CopyFrom(const OConnectionLineData
& rSource
)
78 // hier ziehe ich mich auf das (nicht-virtuelle) operator= zurueck, das nur meine Members kopiert
81 //------------------------------------------------------------------------
82 OConnectionLineData
& OConnectionLineData::operator=( const OConnectionLineData
& rConnLineData
)
84 if (&rConnLineData
== this)
87 m_aSourceFieldName
= rConnLineData
.GetSourceFieldName();
88 m_aDestFieldName
= rConnLineData
.GetDestFieldName();
93 //------------------------------------------------------------------------
94 bool OConnectionLineData::Reset()
96 m_aDestFieldName
= m_aSourceFieldName
= ::rtl::OUString();
99 // -----------------------------------------------------------------------------
102 //-------------------------------------------------------------------------
103 bool operator==(const OConnectionLineData
& lhs
, const OConnectionLineData
& rhs
)
105 return (lhs
.m_aSourceFieldName
== rhs
.m_aSourceFieldName
)
106 && (lhs
.m_aDestFieldName
== rhs
.m_aDestFieldName
);