LCOV - code coverage report
Current view: top level - cui/source/options - connpoolsettings.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 30 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 11 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : 
      20             : #include "connpoolsettings.hxx"
      21             : 
      22             : 
      23             : namespace offapp
      24             : {
      25             : 
      26           0 :     DriverPooling::DriverPooling( const OUString& _rName, bool _bEnabled, const sal_Int32 _nTimeout )
      27             :         :sName(_rName)
      28             :         ,bEnabled(_bEnabled)
      29           0 :         ,nTimeoutSeconds(_nTimeout)
      30             :     {
      31           0 :     }
      32             : 
      33             : 
      34           0 :     bool DriverPooling::operator == (const DriverPooling& _rR) const
      35             :     {
      36           0 :         return  (sName == _rR.sName)
      37           0 :             &&  (bEnabled == _rR.bEnabled)
      38           0 :             &&  (nTimeoutSeconds == _rR.nTimeoutSeconds);
      39             :     }
      40             : 
      41           0 :     DriverPoolingSettings::DriverPoolingSettings()
      42             :     {
      43           0 :     }
      44             : 
      45           0 :     TYPEINIT1( DriverPoolingSettingsItem, SfxPoolItem )
      46             : 
      47           0 :     DriverPoolingSettingsItem::DriverPoolingSettingsItem( sal_uInt16 _nId, const DriverPoolingSettings &_rSettings )
      48             :         :SfxPoolItem(_nId)
      49           0 :         ,m_aSettings(_rSettings)
      50             :     {
      51           0 :     }
      52             : 
      53             : 
      54           0 :     bool DriverPoolingSettingsItem::operator==( const SfxPoolItem& _rCompare ) const
      55             :     {
      56           0 :         const DriverPoolingSettingsItem* pItem = PTR_CAST(DriverPoolingSettingsItem, &_rCompare);
      57           0 :         if (!pItem)
      58           0 :             return false;
      59             : 
      60           0 :         if (m_aSettings.size() != pItem->m_aSettings.size())
      61           0 :             return false;
      62             : 
      63           0 :         DriverPoolingSettings::const_iterator aOwn = m_aSettings.begin();
      64           0 :         DriverPoolingSettings::const_iterator aOwnEnd = m_aSettings.end();
      65           0 :         DriverPoolingSettings::const_iterator aForeign = pItem->m_aSettings.begin();
      66           0 :         while (aOwn < aOwnEnd)
      67             :         {
      68           0 :             if (*aOwn != *aForeign)
      69           0 :                 return false;
      70             : 
      71           0 :             ++aForeign;
      72           0 :             ++aOwn;
      73             :         }
      74             : 
      75           0 :         return true;
      76             :     }
      77             : 
      78             : 
      79           0 :     SfxPoolItem* DriverPoolingSettingsItem::Clone( SfxItemPool * ) const
      80             :     {
      81           0 :         return new DriverPoolingSettingsItem(Which(), m_aSettings);
      82             :     }
      83             : 
      84             : 
      85             : 
      86             : 
      87             : }   // namespace offapp
      88             : 
      89             : 
      90             : 
      91             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11