LCOV - code coverage report
Current view: top level - connectivity/source/drivers/file - FNoException.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 22 36 61.1 %
Date: 2012-08-25 Functions: 5 9 55.6 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 37 80 46.2 %

           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                 :            : #include "file/FCatalog.hxx"
      21                 :            : #include "file/fcomp.hxx"
      22                 :            : #include "file/fanalyzer.hxx"
      23                 :            : #include "file/FResultSet.hxx"
      24                 :            : #include "file/FPreparedStatement.hxx"
      25                 :            : #include <connectivity/FValue.hxx>
      26                 :            : #include <tools/debug.hxx>
      27                 :            : #include "TKeyValue.hxx"
      28                 :            : #include <rtl/logfile.hxx>
      29                 :            : 
      30                 :            : using namespace connectivity;
      31                 :            : using namespace connectivity::file;
      32                 :            : // -----------------------------------------------------------------------------
      33                 :          0 : void OFileCatalog::refreshViews()
      34                 :          0 : {}
      35                 :          0 : void OFileCatalog::refreshGroups()
      36                 :          0 : {}
      37                 :          0 : void OFileCatalog::refreshUsers()
      38                 :            : {
      39                 :          0 : }
      40                 :            : // -----------------------------------------------------------------------------
      41         [ +  - ]:         88 : OPredicateInterpreter::~OPredicateInterpreter()
      42                 :            : {
      43         [ -  + ]:         88 :     while(!m_aStack.empty())
      44                 :            :     {
      45 [ #  # ][ #  # ]:          0 :         delete m_aStack.top();
                 [ #  # ]
      46         [ #  # ]:          0 :         m_aStack.pop();
      47                 :            :     }
      48                 :            :     //  m_aStack.clear();
      49         [ -  + ]:        176 : }
      50                 :            : // -----------------------------------------------------------------------------
      51                 :        176 : void OPredicateCompiler::Clean()
      52                 :            : {
      53 [ +  - ][ +  - ]:        404 :     for(OCodeList::reverse_iterator aIter = m_aCodeList.rbegin(); aIter != m_aCodeList.rend();++aIter)
                 [ +  + ]
      54                 :            :     {
      55 [ +  - ][ +  - ]:        228 :         delete *aIter;
                 [ +  - ]
      56                 :            :     }
      57                 :        176 :     m_aCodeList.clear();
      58                 :        176 : }
      59                 :            : // -----------------------------------------------------------------------------
      60                 :         24 : void OSQLAnalyzer::bindParameterRow(OValueRefRow& _pRow)
      61                 :            : {
      62                 :         24 :     OCodeList& rCodeList    = m_aCompiler->m_aCodeList;
      63 [ +  - ][ +  - ]:        144 :     for(OCodeList::iterator aIter = rCodeList.begin(); aIter != rCodeList.end();++aIter)
                 [ +  + ]
      64                 :            :     {
      65 [ +  - ][ +  - ]:        120 :         OOperandParam* pParam = PTR_CAST(OOperandParam,(*aIter));
         [ +  - ][ +  - ]
         [ +  - ][ +  + ]
                 [ +  - ]
      66         [ +  + ]:        120 :         if ( pParam )
      67         [ +  - ]:         24 :             pParam->bindValue(_pRow);
      68                 :            :     }
      69                 :         24 : }
      70                 :            : // -----------------------------------------------------------------------------
      71                 :          0 : void OPreparedStatement::scanParameter(OSQLParseNode* pParseNode,::std::vector< OSQLParseNode*>& _rParaNodes)
      72                 :            : {
      73                 :            :     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OPreparedStatement::scanParameter" );
      74                 :            :     DBG_ASSERT(pParseNode != NULL,"OResultSet: interner Fehler: ungueltiger ParseNode");
      75                 :            : 
      76                 :            :     // found parameter Name-Rule?
      77 [ #  # ][ #  # ]:          0 :     if (SQL_ISRULE(pParseNode,parameter))
                 [ #  # ]
      78                 :            :     {
      79                 :            :         DBG_ASSERT(pParseNode->count() >= 1,"OResultSet: Parse Tree fehlerhaft");
      80                 :            :         DBG_ASSERT(pParseNode->getChild(0)->getNodeType() == SQL_NODE_PUNCTUATION,"OResultSet: Parse Tree fehlerhaft");
      81                 :            : 
      82                 :          0 :         _rParaNodes.push_back(pParseNode);
      83                 :            :         // Further descend not nessesary
      84                 :          0 :         return;
      85                 :            :     }
      86                 :            : 
      87                 :            :     // Further descend in Parse Tree
      88         [ #  # ]:          0 :     for (sal_uInt32 i = 0; i < pParseNode->count(); i++)
      89                 :          0 :         scanParameter(pParseNode->getChild(i),_rParaNodes);
      90                 :            : }
      91                 :            : // -----------------------------------------------------------------------------
      92                 :         40 : OKeyValue* OResultSet::GetOrderbyKeyValue(OValueRefRow& _rRow)
      93                 :            : {
      94                 :            :     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OResultSet::GetOrderbyKeyValue" );
      95         [ +  - ]:         40 :     sal_uInt32 nBookmarkValue = Abs((sal_Int32)(_rRow->get())[0]->getValue());
      96                 :            : 
      97         [ +  - ]:         40 :     OKeyValue* pKeyValue = OKeyValue::createKeyValue((sal_uInt32)nBookmarkValue);
      98                 :            : 
      99                 :         40 :     ::std::vector<sal_Int32>::iterator aIter = m_aOrderbyColumnNumber.begin();
     100 [ +  - ][ +  - ]:         80 :     for (;aIter != m_aOrderbyColumnNumber.end(); ++aIter)
                 [ +  + ]
     101                 :            :     {
     102                 :            :         OSL_ENSURE(*aIter < static_cast<sal_Int32>(_rRow->get().size()),"Invalid index for orderkey values!");
     103 [ +  - ][ +  - ]:         40 :         pKeyValue->pushKey(new ORowSetValueDecorator((_rRow->get())[*aIter]->getValue()));
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
     104                 :            :     }
     105                 :            : 
     106                 :         40 :     return pKeyValue;
     107                 :            : }
     108                 :            : // -----------------------------------------------------------------------------
     109                 :            : 
     110                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10