1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_dbui.hxx"
26 
27 #ifndef _DBAUI_PROPERTYSETITEM_HXX_
28 #include "propertysetitem.hxx"
29 #endif
30 
31 //.........................................................................
32 namespace dbaui
33 {
34 //.........................................................................
35 
36 	using namespace ::com::sun::star::uno;
37 	using namespace ::com::sun::star::beans;
38 
39 	//=========================================================================
40 	//= OPropertySetItem
41 	//=========================================================================
42 	TYPEINIT1(OPropertySetItem, SfxPoolItem);
43 	//-------------------------------------------------------------------------
OPropertySetItem(sal_Int16 _nWhich)44 	OPropertySetItem::OPropertySetItem(sal_Int16 _nWhich)
45 		:SfxPoolItem(_nWhich)
46 	{
47 	}
48 
49 	//-------------------------------------------------------------------------
OPropertySetItem(sal_Int16 _nWhich,const Reference<XPropertySet> & _rxSet)50 	OPropertySetItem::OPropertySetItem(sal_Int16 _nWhich, const Reference< XPropertySet >& _rxSet)
51 		:SfxPoolItem(_nWhich)
52 		,m_xSet(_rxSet)
53 	{
54 	}
55 
56 	//-------------------------------------------------------------------------
OPropertySetItem(const OPropertySetItem & _rSource)57 	OPropertySetItem::OPropertySetItem(const OPropertySetItem& _rSource)
58 		:SfxPoolItem(_rSource)
59 		,m_xSet(_rSource.m_xSet)
60 	{
61 	}
62 
63 	//-------------------------------------------------------------------------
operator ==(const SfxPoolItem & _rItem) const64 	int OPropertySetItem::operator==(const SfxPoolItem& _rItem) const
65 	{
66 		const OPropertySetItem* pCompare = PTR_CAST(OPropertySetItem, &_rItem);
67 		if ((!pCompare) || (pCompare->m_xSet.get() != m_xSet.get()))
68 			return 0;
69 
70 		return 1;
71 	}
72 
73 	//-------------------------------------------------------------------------
Clone(SfxItemPool *) const74 	SfxPoolItem* OPropertySetItem::Clone(SfxItemPool* /* _pPool */) const
75 	{
76 		return new OPropertySetItem(*this);
77 	}
78 
79 //.........................................................................
80 }	// namespace dbaui
81 //.........................................................................
82 
83