LCOV - code coverage report
Current view: top level - connectivity/source/simpledbt - dbtfactory.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 13 20 65.0 %
Date: 2014-11-03 Functions: 4 7 57.1 %
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             : #include <connectivity/virtualdbtools.hxx>
      22             : #include <connectivity/formattedcolumnvalue.hxx>
      23             : #include "dbtfactory.hxx"
      24             : #include "parser_s.hxx"
      25             : #include "staticdbtools_s.hxx"
      26             : #include "charset_s.hxx"
      27             : 
      28             : using namespace ::com::sun::star::uno;
      29             : using namespace ::com::sun::star::lang;
      30             : 
      31             : 
      32             : // the entry point for load-on-call usage of the DBTOOLS lib
      33             : #if HAVE_FEATURE_DESKTOP
      34         474 : extern "C" void* SAL_CALL createDataAccessToolsFactory()
      35             : {
      36         474 :     ::connectivity::ODataAccessToolsFactory* pFactory = new ::connectivity::ODataAccessToolsFactory;
      37         474 :     pFactory->acquire();
      38         474 :     return pFactory;
      39             : }
      40             : #endif
      41             : 
      42             : namespace connectivity
      43             : {
      44             : 
      45             : 
      46             : 
      47             :     //= ODataAccessToolsFactory
      48             : 
      49             : 
      50         474 :     ODataAccessToolsFactory::ODataAccessToolsFactory()
      51             :     {
      52         474 :         ODataAccessStaticTools* pStaticTools = new ODataAccessStaticTools;
      53         474 :         m_xTypeConversionHelper = pStaticTools;
      54         474 :         m_xToolsHelper = pStaticTools;
      55         474 :     }
      56             : 
      57             : 
      58           0 :     ::rtl::Reference< simple::IDataAccessTypeConversion > ODataAccessToolsFactory::getTypeConversionHelper()
      59             :     {
      60           0 :         return m_xTypeConversionHelper;
      61             :     }
      62             : 
      63             : 
      64           2 :     ::rtl::Reference< simple::IDataAccessCharSet > ODataAccessToolsFactory::createCharsetHelper( ) const
      65             :     {
      66           2 :         return new ODataAccessCharSet;
      67             :     }
      68             : 
      69             : 
      70         472 :     ::rtl::Reference< simple::IDataAccessTools > ODataAccessToolsFactory::getDataAccessTools()
      71             :     {
      72         472 :         return m_xToolsHelper;
      73             :     }
      74             : 
      75             : 
      76           0 :     ::std::unique_ptr< ::dbtools::FormattedColumnValue > ODataAccessToolsFactory::createFormattedColumnValue(
      77             :         const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
      78             :         const Reference< ::com::sun::star::sdbc::XRowSet >& _rxRowSet, const Reference< ::com::sun::star::beans::XPropertySet >& _rxColumn )
      79             :     {
      80           0 :         ::std::unique_ptr< ::dbtools::FormattedColumnValue > pValue( new ::dbtools::FormattedColumnValue( _rxContext, _rxRowSet, _rxColumn ) );
      81           0 :         return pValue;
      82             :     }
      83             : 
      84             : 
      85           0 :     ::rtl::Reference< simple::ISQLParser > ODataAccessToolsFactory::createSQLParser(const Reference< XComponentContext >& rxContext, const IParseContext* _pContext) const
      86             :     {
      87           0 :         return new OSimpleSQLParser(rxContext, _pContext);
      88             :     }
      89             : 
      90             : 
      91             : }   // namespace connectivity
      92             : 
      93             : 
      94             : 
      95             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10