LCOV - code coverage report
Current view: top level - sc/source/filter/oox - querytablefragment.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 1 18 5.6 %
Date: 2014-04-11 Functions: 2 6 33.3 %
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 "querytablefragment.hxx"
      21             : 
      22             : #include "biffinputstream.hxx"
      23             : #include "querytablebuffer.hxx"
      24             : 
      25             : namespace oox {
      26             : namespace xls {
      27             : 
      28             : using namespace ::oox::core;
      29             : 
      30             : 
      31           0 : QueryTableFragment::QueryTableFragment( const WorksheetHelper& rHelper, const OUString& rFragmentPath ) :
      32             :     WorksheetFragmentBase( rHelper, rFragmentPath ),
      33           0 :     mrQueryTable( getQueryTables().createQueryTable() )
      34             : {
      35           0 : }
      36             : 
      37           0 : ContextHandlerRef QueryTableFragment::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
      38             : {
      39           0 :     switch( getCurrentElement() )
      40             :     {
      41             :         case XML_ROOT_CONTEXT:
      42           0 :             if( nElement == XLS_TOKEN( queryTable ) )
      43           0 :                 mrQueryTable.importQueryTable( rAttribs );
      44           0 :         break;
      45             :     }
      46           0 :     return 0;
      47             : }
      48             : 
      49           0 : ContextHandlerRef QueryTableFragment::onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm )
      50             : {
      51           0 :     switch( getCurrentElement() )
      52             :     {
      53             :         case XML_ROOT_CONTEXT:
      54           0 :             if( nRecId == BIFF12_ID_QUERYTABLE )
      55           0 :                 mrQueryTable.importQueryTable( rStrm );
      56           0 :         break;
      57             :     }
      58           0 :     return 0;
      59             : }
      60             : 
      61           0 : const RecordInfo* QueryTableFragment::getRecordInfos() const
      62             : {
      63             :     static const RecordInfo spRecInfos[] =
      64             :     {
      65             :         { BIFF12_ID_QUERYTABLE,         BIFF12_ID_QUERYTABLE + 1        },
      66             :         { BIFF12_ID_QUERYTABLEREFRESH,  BIFF12_ID_QUERYTABLEREFRESH + 1 },
      67             :         { -1,                           -1                              }
      68             :     };
      69           0 :     return spRecInfos;
      70             : }
      71             : 
      72             : 
      73             : } // namespace xls
      74          18 : } // namespace oox
      75             : 
      76             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10