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: connpoolsettings.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_svx.hxx"
34 #ifdef SVX_DLLIMPLEMENTATION
35 #undef SVX_DLLIMPLEMENTATION
37 #include "connpoolsettings.hxx"
39 //........................................................................
42 //........................................................................
44 //====================================================================
46 //====================================================================
47 //--------------------------------------------------------------------
48 DriverPooling::DriverPooling()
54 //--------------------------------------------------------------------
55 DriverPooling::DriverPooling( const String
& _rName
, sal_Bool _bEnabled
, const sal_Int32 _nTimeout
)
58 ,nTimeoutSeconds(_nTimeout
)
62 //--------------------------------------------------------------------
63 sal_Bool
DriverPooling::operator == (const DriverPooling
& _rR
) const
65 return (sName
== _rR
.sName
)
66 && (bEnabled
== _rR
.bEnabled
)
67 && (nTimeoutSeconds
== _rR
.nTimeoutSeconds
);
70 //====================================================================
71 //= DriverPoolingSettings
72 //====================================================================
73 //--------------------------------------------------------------------
74 DriverPoolingSettings::DriverPoolingSettings()
78 //====================================================================
79 //= DriverPoolingSettingsItem
80 //====================================================================
81 TYPEINIT1( DriverPoolingSettingsItem
, SfxPoolItem
)
82 //--------------------------------------------------------------------
83 DriverPoolingSettingsItem::DriverPoolingSettingsItem( sal_uInt16 _nId
, const DriverPoolingSettings _rSettings
)
85 ,m_aSettings(_rSettings
)
89 //--------------------------------------------------------------------
90 int DriverPoolingSettingsItem::operator==( const SfxPoolItem
& _rCompare
) const
92 const DriverPoolingSettingsItem
* pItem
= PTR_CAST(DriverPoolingSettingsItem
, &_rCompare
);
96 if (m_aSettings
.size() != pItem
->m_aSettings
.size())
99 DriverPoolingSettings::const_iterator aOwn
= m_aSettings
.begin();
100 DriverPoolingSettings::const_iterator aOwnEnd
= m_aSettings
.end();
101 DriverPoolingSettings::const_iterator aForeign
= pItem
->m_aSettings
.begin();
102 while (aOwn
< aOwnEnd
)
104 if (*aOwn
!= *aForeign
)
114 //--------------------------------------------------------------------
115 SfxPoolItem
* DriverPoolingSettingsItem::Clone( SfxItemPool
* ) const
117 return new DriverPoolingSettingsItem(Which(), m_aSettings
);
120 //--------------------------------------------------------------------
122 //........................................................................
123 } // namespace offapp
124 //........................................................................