LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/ucb/source/core - identify.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 15 16 93.8 %
Date: 2013-07-09 Functions: 8 10 80.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             : 
      21             : /**************************************************************************
      22             :                                 TODO
      23             :  **************************************************************************
      24             : 
      25             :  *************************************************************************/
      26             : 
      27             : #include "identify.hxx"
      28             : 
      29             : using namespace com::sun::star::uno;
      30             : using namespace com::sun::star::lang;
      31             : using namespace com::sun::star::ucb;
      32             : 
      33             : 
      34             : //=========================================================================
      35             : //
      36             : // ContentIdentifier Implementation.
      37             : //
      38             : //=========================================================================
      39             : 
      40       11633 : ContentIdentifier::ContentIdentifier(
      41             :                         const OUString& ContentId )
      42       11633 : : m_aContentId( ContentId )
      43             : {
      44       11633 : }
      45             : 
      46             : //=========================================================================
      47             : // virtual
      48       23266 : ContentIdentifier::~ContentIdentifier()
      49             : {
      50       23266 : }
      51             : 
      52             : //=========================================================================
      53             : //
      54             : // XInterface methods.
      55             : //
      56             : //=========================================================================
      57             : 
      58       66218 : XINTERFACE_IMPL_2( ContentIdentifier,
      59             :                    XTypeProvider,
      60             :                    XContentIdentifier );
      61             : 
      62             : //=========================================================================
      63             : //
      64             : // XTypeProvider methods.
      65             : //
      66             : //=========================================================================
      67             : 
      68           0 : XTYPEPROVIDER_IMPL_2( ContentIdentifier,
      69             :                       XTypeProvider,
      70             :                       XContentIdentifier );
      71             : 
      72             : //=========================================================================
      73             : //
      74             : // XContentIdentifier methods.
      75             : //
      76             : //=========================================================================
      77             : 
      78             : // virtual
      79       28509 : OUString SAL_CALL ContentIdentifier::getContentIdentifier()
      80             :     throw( RuntimeException )
      81             : {
      82       28509 :     return m_aContentId;
      83             : }
      84             : 
      85             : //=========================================================================
      86             : // virtual
      87         802 : OUString SAL_CALL ContentIdentifier::getContentProviderScheme()
      88             :     throw( RuntimeException )
      89             : {
      90         802 :     if ( m_aProviderScheme.isEmpty() && !m_aContentId.isEmpty() )
      91             :     {
      92             :         // The content provider scheme is the part before the first ':'
      93             :         // within the content id.
      94         800 :         sal_Int32 nPos = m_aContentId.indexOf( ':', 0 );
      95         800 :         if ( nPos != -1 )
      96             :         {
      97         728 :             OUString aScheme( m_aContentId.copy( 0, nPos ) );
      98         728 :             m_aProviderScheme = aScheme.toAsciiLowerCase();
      99             :         }
     100             :     }
     101             : 
     102         802 :     return m_aProviderScheme;
     103             : }
     104             : 
     105             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10