LCOV - code coverage report
Current view: top level - toolkit/source/controls - spinningprogress.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 32 0.0 %
Date: 2012-08-25 Functions: 0 9 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 40 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       4                 :            :  *
       5                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       6                 :            :  *
       7                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       8                 :            :  *
       9                 :            :  * This file is part of OpenOffice.org.
      10                 :            :  *
      11                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      12                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      13                 :            :  * only, as published by the Free Software Foundation.
      14                 :            :  *
      15                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      16                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      17                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      18                 :            :  * GNU Lesser General Public License version 3 for more details
      19                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      20                 :            :  *
      21                 :            :  * You should have received a copy of the GNU Lesser General Public License
      22                 :            :  * version 3 along with OpenOffice.org.  If not, see
      23                 :            :  * <http://www.openoffice.org/license.html>
      24                 :            :  * for a copy of the LGPLv3 License.
      25                 :            :  *
      26                 :            :  ************************************************************************/
      27                 :            : 
      28                 :            : 
      29                 :            : #include "toolkit/controls/spinningprogress.hxx"
      30                 :            : #include "toolkit/helper/servicenames.hxx"
      31                 :            : #include "toolkit/helper/unopropertyarrayhelper.hxx"
      32                 :            : 
      33                 :            : 
      34                 :            : #include <rtl/ustrbuf.hxx>
      35                 :            : #include <tools/diagnose_ex.h>
      36                 :            : #include <vcl/throbber.hxx>
      37                 :            : 
      38                 :            : //......................................................................................................................
      39                 :            : namespace toolkit
      40                 :            : {
      41                 :            : //......................................................................................................................
      42                 :            : 
      43                 :            :     /** === begin UNO using === **/
      44                 :            :     using ::com::sun::star::uno::Reference;
      45                 :            :     using ::com::sun::star::uno::XInterface;
      46                 :            :     using ::com::sun::star::uno::UNO_QUERY;
      47                 :            :     using ::com::sun::star::uno::UNO_QUERY_THROW;
      48                 :            :     using ::com::sun::star::uno::UNO_SET_THROW;
      49                 :            :     using ::com::sun::star::uno::Exception;
      50                 :            :     using ::com::sun::star::uno::RuntimeException;
      51                 :            :     using ::com::sun::star::uno::Any;
      52                 :            :     using ::com::sun::star::uno::makeAny;
      53                 :            :     using ::com::sun::star::uno::Sequence;
      54                 :            :     using ::com::sun::star::uno::Type;
      55                 :            :     using ::com::sun::star::beans::XPropertySetInfo;
      56                 :            :     using ::com::sun::star::lang::XMultiServiceFactory;
      57                 :            :     /** === end UNO using === **/
      58                 :            : 
      59                 :            :     //==================================================================================================================
      60                 :            :     //= SpinningProgressControlModel
      61                 :            :     //==================================================================================================================
      62                 :            :     //------------------------------------------------------------------------------------------------------------------
      63                 :          0 :     SpinningProgressControlModel::SpinningProgressControlModel( Reference< XMultiServiceFactory > const & i_factory )
      64                 :          0 :         :SpinningProgressControlModel_Base( i_factory )
      65                 :            :     {
      66                 :            :         // default image sets
      67         [ #  # ]:          0 :         osl_incrementInterlockedCount( &m_refCount );
      68                 :            :         {
      69                 :            :             try
      70                 :            :             {
      71                 :            :                 Throbber::ImageSet aImageSets[] =
      72                 :            :                 {
      73                 :            :                     Throbber::IMAGES_16_PX, Throbber::IMAGES_32_PX, Throbber::IMAGES_64_PX
      74                 :          0 :                 };
      75         [ #  # ]:          0 :                 for ( size_t i=0; i < sizeof( aImageSets ) / sizeof( aImageSets[0] ); ++i )
      76                 :            :                 {
      77         [ #  # ]:          0 :                     const ::std::vector< ::rtl::OUString > aDefaultURLs( Throbber::getDefaultImageURLs( aImageSets[i] ) );
      78         [ #  # ]:          0 :                     const Sequence< ::rtl::OUString > aImageURLs( &aDefaultURLs[0], aDefaultURLs.size() );
      79         [ #  # ]:          0 :                     insertImageSet( i, aImageURLs );
      80 [ #  # ][ #  # ]:          0 :                 }
      81                 :            :             }
      82         [ #  # ]:          0 :             catch( const Exception& )
      83                 :            :             {
      84                 :            :                 DBG_UNHANDLED_EXCEPTION();
      85                 :            :             }
      86                 :            :         }
      87         [ #  # ]:          0 :         osl_decrementInterlockedCount( &m_refCount );
      88                 :          0 :     }
      89                 :            : 
      90                 :            :     //------------------------------------------------------------------------------------------------------------------
      91                 :          0 :     SpinningProgressControlModel::SpinningProgressControlModel( const SpinningProgressControlModel& i_copySource )
      92                 :          0 :         :SpinningProgressControlModel_Base( i_copySource )
      93                 :            :     {
      94                 :          0 :     }
      95                 :            : 
      96                 :            :     //------------------------------------------------------------------------------------------------------------------
      97                 :          0 :     SpinningProgressControlModel::~SpinningProgressControlModel()
      98                 :            :     {
      99         [ #  # ]:          0 :     }
     100                 :            : 
     101                 :            :     //------------------------------------------------------------------------------------------------------------------
     102                 :          0 :     UnoControlModel* SpinningProgressControlModel::Clone() const
     103                 :            :     {
     104         [ #  # ]:          0 :         return new SpinningProgressControlModel( *this );
     105                 :            :     }
     106                 :            : 
     107                 :            :     //------------------------------------------------------------------------------------------------------------------
     108                 :          0 :     Reference< XPropertySetInfo > SAL_CALL SpinningProgressControlModel::getPropertySetInfo(  ) throw(RuntimeException)
     109                 :            :     {
     110 [ #  # ][ #  # ]:          0 :         static Reference< XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
         [ #  # ][ #  # ]
                 [ #  # ]
     111                 :          0 :         return xInfo;
     112                 :            :     }
     113                 :            : 
     114                 :            :     //------------------------------------------------------------------------------------------------------------------
     115                 :          0 :     ::rtl::OUString SAL_CALL SpinningProgressControlModel::getServiceName() throw(RuntimeException)
     116                 :            :     {
     117                 :          0 :         return ::rtl::OUString::createFromAscii( szServiceName_SpinningProgressControlModel );
     118                 :            :     }
     119                 :            : 
     120                 :            :     //------------------------------------------------------------------------------------------------------------------
     121                 :          0 :     ::rtl::OUString SAL_CALL SpinningProgressControlModel::getImplementationName(  ) throw(RuntimeException)
     122                 :            :     {
     123                 :          0 :         return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.toolkit.SpinningProgressControlModel"));
     124                 :            :     }
     125                 :            : 
     126                 :            :     //------------------------------------------------------------------------------------------------------------------
     127                 :          0 :     Sequence< ::rtl::OUString > SAL_CALL SpinningProgressControlModel::getSupportedServiceNames() throw(RuntimeException)
     128                 :            :     {
     129                 :          0 :         Sequence< ::rtl::OUString > aServiceNames(3);
     130         [ #  # ]:          0 :         aServiceNames[0] = ::rtl::OUString::createFromAscii( szServiceName_SpinningProgressControlModel );
     131         [ #  # ]:          0 :         aServiceNames[1] = ::rtl::OUString::createFromAscii( szServiceName_AnimatedImagesControlModel );
     132 [ #  # ][ #  # ]:          0 :         aServiceNames[2] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlModel"));
     133                 :          0 :         return aServiceNames;
     134                 :            :     }
     135                 :            : 
     136                 :            : //......................................................................................................................
     137                 :            : } // namespace toolkit
     138                 :            : //......................................................................................................................
     139                 :            : 
     140                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10