LCOV - code coverage report
Current view: top level - connectivity/source/simpledbt - staticdbtools_s.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 8 45 17.8 %
Date: 2014-11-03 Functions: 4 23 17.4 %
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             : #include <connectivity/virtualdbtools.hxx>
      21             : #include "staticdbtools_s.hxx"
      22             : #include <connectivity/dbconversion.hxx>
      23             : #include <connectivity/dbtools.hxx>
      24             : #include <com/sun/star/sdb/SQLContext.hpp>
      25             : 
      26             : 
      27             : namespace connectivity
      28             : {
      29             : 
      30             : 
      31             :     using namespace ::com::sun::star::util;
      32             :     using namespace ::com::sun::star::uno;
      33             :     using namespace ::com::sun::star::sdb;
      34             :     using namespace ::com::sun::star::lang;
      35             :     using namespace ::com::sun::star::sdbc;
      36             :     using namespace ::com::sun::star::beans;
      37             :     using namespace ::com::sun::star::container;
      38             : 
      39             : 
      40             :     //= ODataAccessStaticTools
      41             : 
      42             : 
      43         474 :     ODataAccessStaticTools::ODataAccessStaticTools()
      44             :     {
      45         474 :     }
      46             : 
      47             : 
      48           0 :     Date ODataAccessStaticTools::getStandardDate() const
      49             :     {
      50           0 :         return ::dbtools::DBTypeConversion::getStandardDate();
      51             :     }
      52             : 
      53             : 
      54           0 :     double ODataAccessStaticTools::getValue(const Reference< XColumn>& _rxVariant, const Date& rNullDate ) const
      55             :     {
      56           0 :         return ::dbtools::DBTypeConversion::getValue( _rxVariant, rNullDate );
      57             :     }
      58             : 
      59             : 
      60           0 :     OUString ODataAccessStaticTools::getFormattedValue(const Reference< XColumn >& _rxColumn, const Reference< XNumberFormatter >& _rxFormatter,
      61             :         const Date& _rNullDate, sal_Int32 _nKey, sal_Int16 _nKeyType) const
      62             :     {
      63           0 :         return ::dbtools::DBTypeConversion::getFormattedValue(_rxColumn, _rxFormatter, _rNullDate, _nKey, _nKeyType);
      64             :     }
      65             : 
      66             : 
      67           0 :     OUString ODataAccessStaticTools::getFormattedValue( const Reference< XPropertySet>& _rxColumn, const Reference< XNumberFormatter>& _rxFormatter,
      68             :         const Locale& _rLocale, const Date& _rNullDate ) const
      69             :     {
      70           0 :         return ::dbtools::DBTypeConversion::getFormattedValue( _rxColumn, _rxFormatter, _rLocale, _rNullDate );
      71             :     }
      72             : 
      73             : 
      74           0 :     Reference< XConnection> ODataAccessStaticTools::getConnection_withFeedback(const OUString& _rDataSourceName, const OUString& _rUser,
      75             :         const OUString& _rPwd, const Reference< XComponentContext>& _rxContext) const
      76             :     {
      77           0 :         return ::dbtools::getConnection_withFeedback(_rDataSourceName, _rUser, _rPwd, _rxContext);
      78             :     }
      79             : 
      80             : 
      81           0 :     Reference< XConnection> ODataAccessStaticTools::connectRowset(const Reference< XRowSet>& _rxRowSet, const Reference< XComponentContext >& _rxContext, bool _bSetAsActiveConnection) const
      82             :     {
      83           0 :         return ::dbtools::connectRowset( _rxRowSet, _rxContext, _bSetAsActiveConnection);
      84             :     }
      85             : 
      86             : 
      87         104 :     Reference< XConnection> ODataAccessStaticTools::getRowSetConnection(
      88             :                 const Reference< XRowSet>& _rxRowSet)
      89             :                 const
      90             :     {
      91         104 :         return ::dbtools::getConnection(_rxRowSet);
      92             :     }
      93             : 
      94             : 
      95           0 :     Reference< XNumberFormatsSupplier> ODataAccessStaticTools::getNumberFormats(const Reference< XConnection>& _rxConn, bool _bAllowDefault) const
      96             :     {
      97           0 :         return ::dbtools::getNumberFormats(_rxConn, _bAllowDefault);
      98             :     }
      99             : 
     100             : 
     101           0 :     sal_Int32 ODataAccessStaticTools::getDefaultNumberFormat( const Reference< XPropertySet >& _rxColumn, const Reference< XNumberFormatTypes >& _rxTypes,
     102             :         const Locale& _rLocale ) const
     103             :     {
     104           0 :         return ::dbtools::getDefaultNumberFormat( _rxColumn, _rxTypes, _rLocale );
     105             :     }
     106             : 
     107             : 
     108           0 :     void ODataAccessStaticTools::TransferFormComponentProperties(const Reference< XPropertySet>& _rxOld, const Reference< XPropertySet>& _rxNew, const Locale& _rLocale) const
     109             :     {
     110           0 :         ::dbtools::TransferFormComponentProperties(_rxOld, _rxNew, _rLocale);
     111           0 :     }
     112             : 
     113             : 
     114           0 :     OUString ODataAccessStaticTools::quoteName(const OUString& _rQuote, const OUString& _rName) const
     115             :     {
     116           0 :         return ::dbtools::quoteName(_rQuote, _rName);
     117             :     }
     118             : 
     119             : 
     120           0 :     OUString ODataAccessStaticTools::composeTableNameForSelect( const Reference< XConnection >& _rxConnection, const OUString& _rCatalog, const OUString& _rSchema, const OUString& _rName ) const
     121             :     {
     122           0 :         return ::dbtools::composeTableNameForSelect( _rxConnection, _rCatalog, _rSchema, _rName );
     123             :     }
     124             : 
     125             : 
     126           0 :     OUString ODataAccessStaticTools::composeTableNameForSelect( const Reference< XConnection >& _rxConnection, const Reference< XPropertySet>& _xTable ) const
     127             :     {
     128           0 :         return ::dbtools::composeTableNameForSelect( _rxConnection, _xTable );
     129             :     }
     130             : 
     131             : 
     132           0 :     SQLContext ODataAccessStaticTools::prependContextInfo(SQLException& _rException, const Reference< XInterface >& _rxContext,
     133             :         const OUString& _rContextDescription, const OUString& _rContextDetails) const
     134             :     {
     135           0 :         return ::dbtools::prependContextInfo(_rException, _rxContext, _rContextDescription, _rContextDetails);
     136             :     }
     137             : 
     138             : 
     139          52 :     Reference< XDataSource > ODataAccessStaticTools::getDataSource( const OUString& _rsRegisteredName, const Reference< XComponentContext>& _rxContext ) const
     140             :     {
     141          52 :         return ::dbtools::getDataSource( _rsRegisteredName, _rxContext );
     142             :     }
     143             : 
     144             : 
     145           0 :     bool ODataAccessStaticTools::canInsert(const Reference< XPropertySet>& _rxCursorSet) const
     146             :     {
     147           0 :         return ::dbtools::canInsert( _rxCursorSet );
     148             :     }
     149             : 
     150             : 
     151           0 :     bool ODataAccessStaticTools::canUpdate(const Reference< XPropertySet>& _rxCursorSet) const
     152             :     {
     153           0 :         return ::dbtools::canUpdate( _rxCursorSet );
     154             :     }
     155             : 
     156             : 
     157           0 :     bool ODataAccessStaticTools::canDelete(const Reference< XPropertySet>& _rxCursorSet) const
     158             :     {
     159           0 :         return ::dbtools::canDelete( _rxCursorSet );
     160             :     }
     161             : 
     162             : 
     163           0 :     Reference< XNameAccess > ODataAccessStaticTools::getFieldsByCommandDescriptor( const Reference< XConnection >& _rxConnection,
     164             :         const sal_Int32 _nCommandType, const OUString& _rCommand,
     165             :             Reference< XComponent >& _rxKeepFieldsAlive, ::dbtools::SQLExceptionInfo* _pErrorInfo )
     166             :     {
     167             :         return ::dbtools::getFieldsByCommandDescriptor( _rxConnection, _nCommandType, _rCommand,
     168           0 :             _rxKeepFieldsAlive, _pErrorInfo );
     169             :     }
     170             : 
     171             : 
     172           0 :     Sequence< OUString > ODataAccessStaticTools::getFieldNamesByCommandDescriptor(
     173             :         const Reference< XConnection >& _rxConnection, const sal_Int32 _nCommandType,
     174             :         const OUString& _rCommand, ::dbtools::SQLExceptionInfo* _pErrorInfo )
     175             :     {
     176             :         return ::dbtools::getFieldNamesByCommandDescriptor( _rxConnection, _nCommandType,
     177           0 :             _rCommand, _pErrorInfo );
     178             :     }
     179             : 
     180             : 
     181         316 :     bool ODataAccessStaticTools::isEmbeddedInDatabase( const Reference< XInterface >& _rxComponent, Reference< XConnection >& _rxActualConnection )
     182             :     {
     183         316 :         return ::dbtools::isEmbeddedInDatabase( _rxComponent, _rxActualConnection );
     184             :     }
     185             : 
     186             : 
     187             : }   // namespace connectivity
     188             : 
     189             : 
     190             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10