LCOV - code coverage report
Current view: top level - libreoffice/connectivity/source/simpledbt - dbtfactory.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 15 24 62.5 %
Date: 2012-12-27 Functions: 5 9 55.6 %
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           3 : extern "C" void* SAL_CALL createDataAccessToolsFactory()
      34             : {
      35           3 :     ::connectivity::ODataAccessToolsFactory* pFactory = new ::connectivity::ODataAccessToolsFactory;
      36           3 :     pFactory->acquire();
      37           3 :     return pFactory;
      38             : }
      39             : 
      40             : //........................................................................
      41             : namespace connectivity
      42             : {
      43             : //........................................................................
      44             : 
      45             :     //================================================================
      46             :     //= ODataAccessToolsFactory
      47             :     //================================================================
      48             :     //----------------------------------------------------------------
      49           3 :     ODataAccessToolsFactory::ODataAccessToolsFactory()
      50             :     {
      51           3 :         ODataAccessStaticTools* pStaticTools = new ODataAccessStaticTools;
      52           3 :         m_xTypeConversionHelper = pStaticTools;
      53           3 :         m_xToolsHelper = pStaticTools;
      54           3 :     }
      55             : 
      56             :     //----------------------------------------------------------------
      57           6 :     oslInterlockedCount SAL_CALL ODataAccessToolsFactory::acquire()
      58             :     {
      59           6 :         return ORefBase::acquire();
      60             :     }
      61             : 
      62             :     //----------------------------------------------------------------
      63           6 :     oslInterlockedCount SAL_CALL ODataAccessToolsFactory::release()
      64             :     {
      65           6 :         return ORefBase::release();
      66             :     }
      67             : 
      68             :     //----------------------------------------------------------------
      69           0 :     ::rtl::Reference< simple::IDataAccessTypeConversion > ODataAccessToolsFactory::getTypeConversionHelper()
      70             :     {
      71           0 :         return m_xTypeConversionHelper;
      72             :     }
      73             : 
      74             :     //----------------------------------------------------------------
      75           0 :     ::rtl::Reference< simple::IDataAccessCharSet > ODataAccessToolsFactory::createCharsetHelper( ) const
      76             :     {
      77           0 :         return new ODataAccessCharSet;
      78             :     }
      79             : 
      80             :     //----------------------------------------------------------------
      81           3 :     ::rtl::Reference< simple::IDataAccessTools > ODataAccessToolsFactory::getDataAccessTools()
      82             :     {
      83           3 :         return m_xToolsHelper;
      84             :     }
      85             : 
      86             :     //----------------------------------------------------------------
      87             :     SAL_WNODEPRECATED_DECLARATIONS_PUSH
      88           0 :     ::std::auto_ptr< ::dbtools::FormattedColumnValue > ODataAccessToolsFactory::createFormattedColumnValue( const ::comphelper::ComponentContext& _rContext,
      89             :         const Reference< ::com::sun::star::sdbc::XRowSet >& _rxRowSet, const Reference< ::com::sun::star::beans::XPropertySet >& _rxColumn )
      90             :     {
      91           0 :         ::std::auto_ptr< ::dbtools::FormattedColumnValue > pValue( new ::dbtools::FormattedColumnValue( _rContext, _rxRowSet, _rxColumn ) );
      92           0 :         return pValue;
      93             :     }
      94             :     SAL_WNODEPRECATED_DECLARATIONS_POP
      95             : 
      96             :     //----------------------------------------------------------------
      97           0 :     ::rtl::Reference< simple::ISQLParser > ODataAccessToolsFactory::createSQLParser(const Reference< XComponentContext >& rxContext, const IParseContext* _pContext) const
      98             :     {
      99           0 :         return new OSimpleSQLParser(rxContext, _pContext);
     100             :     }
     101             : 
     102             : //........................................................................
     103             : }   // namespace connectivity
     104             : //........................................................................
     105             : 
     106             : 
     107             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10