LCOV - code coverage report
Current view: top level - svl/source/uno - pathservice.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 7 21 33.3 %
Date: 2012-08-25 Functions: 5 11 45.5 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 7 16 43.8 %

           Branch data     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                 :            : #include <unotools/pathoptions.hxx>
      22                 :            : #include "sal/types.h"
      23                 :            : #include "rtl/ustring.hxx"
      24                 :            : #include <cppuhelper/implbase2.hxx>
      25                 :            : #include <com/sun/star/frame/XConfigManager.hpp>
      26                 :            : #include <com/sun/star/lang/XServiceInfo.hpp>
      27                 :            : 
      28                 :            : namespace css = com::sun::star;
      29                 :            : using rtl::OUString;
      30                 :            : 
      31                 :            : // -----------------------------------------------------------------------
      32                 :            : 
      33 [ +  - ][ -  + ]:         28 : class PathService : public ::cppu::WeakImplHelper2< css::frame::XConfigManager, css::lang::XServiceInfo >
      34                 :            : {
      35                 :            :     SvtPathOptions m_aOptions;
      36                 :            : 
      37                 :            : public:
      38                 :         14 :     PathService()
      39         [ +  - ]:         14 :         {}
      40                 :            : 
      41                 :          0 :     virtual OUString SAL_CALL getImplementationName()
      42                 :            :         throw(css::uno::RuntimeException)
      43                 :            :         {
      44                 :          0 :             return OUString("com.sun.star.comp.svl.PathService");
      45                 :            :         }
      46                 :            : 
      47                 :          0 :     virtual sal_Bool SAL_CALL supportsService (
      48                 :            :         const OUString & rName)
      49                 :            :         throw(css::uno::RuntimeException)
      50                 :            :         {
      51                 :          0 :             return (rName.compareToAscii("com.sun.star.config.SpecialConfigManager") == 0);
      52                 :            :         }
      53                 :            : 
      54                 :          0 :     virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
      55                 :            :         throw(css::uno::RuntimeException)
      56                 :            :         {
      57                 :          0 :             css::uno::Sequence< OUString > aRet(1);
      58         [ #  # ]:          0 :             aRet.getArray()[0] = OUString("com.sun.star.config.SpecialConfigManager");
      59                 :          0 :             return aRet;
      60                 :            :         }
      61                 :            : 
      62                 :         16 :     virtual OUString SAL_CALL substituteVariables (
      63                 :            :         const OUString& sText)
      64                 :            :         throw(css::uno::RuntimeException)
      65                 :            :         {
      66 [ +  - ][ +  - ]:         16 :             return m_aOptions.SubstituteVariable( sText );
                 [ +  - ]
      67                 :            :         }
      68                 :            : 
      69                 :          0 :     virtual void SAL_CALL addPropertyChangeListener (
      70                 :            :         const OUString &, const css::uno::Reference< css::beans::XPropertyChangeListener > &)
      71                 :            :         throw(css::uno::RuntimeException)
      72                 :          0 :         {}
      73                 :            : 
      74                 :          0 :     virtual void SAL_CALL removePropertyChangeListener (
      75                 :            :         const OUString &, const css::uno::Reference< css::beans::XPropertyChangeListener > &)
      76                 :            :         throw(css::uno::RuntimeException)
      77                 :          0 :         {}
      78                 :            : 
      79                 :          0 :     virtual void SAL_CALL flush()
      80                 :            :         throw(css::uno::RuntimeException)
      81                 :          0 :         {}
      82                 :            : };
      83                 :            : 
      84                 :            : // -----------------------------------------------------------------------
      85                 :            : 
      86                 :         14 : css::uno::Reference< css::uno::XInterface > PathService_CreateInstance (
      87                 :            :     SAL_UNUSED_PARAMETER const css::uno::Reference<
      88                 :            :         css::lang::XMultiServiceFactory > &)
      89                 :            : {
      90                 :            :     return css::uno::Reference< css::uno::XInterface >(
      91         [ +  - ]:         14 :         static_cast< cppu::OWeakObject* >(new PathService()));
      92                 :            : }
      93                 :            : 
      94                 :            : // -----------------------------------------------------------------------
      95                 :            : 
      96                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10