LCOV - code coverage report
Current view: top level - sc/source/filter/inc - querytablebuffer.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 1 3 33.3 %
Date: 2015-06-13 12:38:46 Functions: 1 5 20.0 %
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             : #ifndef INCLUDED_SC_SOURCE_FILTER_INC_QUERYTABLEBUFFER_HXX
      21             : #define INCLUDED_SC_SOURCE_FILTER_INC_QUERYTABLEBUFFER_HXX
      22             : 
      23             : #include "stylesbuffer.hxx"
      24             : #include "worksheethelper.hxx"
      25             : 
      26             : namespace oox {
      27             : namespace xls {
      28             : 
      29           0 : struct QueryTableModel : public AutoFormatModel
      30             : {
      31             :     OUString     maDefName;          /// Defined name containing the target cell range.
      32             :     sal_Int32           mnConnId;           /// Identifier of the external connection used to query the data.
      33             :     sal_Int32           mnGrowShrinkType;   /// Behaviour when source data size changes.
      34             :     bool                mbHeaders;          /// True = source data contains a header row.
      35             :     bool                mbRowNumbers;       /// True = first column contains row numbers.
      36             :     bool                mbDisableRefresh;   /// True = refreshing data disabled.
      37             :     bool                mbBackground;       /// True = refresh asynchronously.
      38             :     bool                mbFirstBackground;  /// True = first background refresh not yet finished.
      39             :     bool                mbRefreshOnLoad;    /// True = refresh table after import.
      40             :     bool                mbFillFormulas;     /// True = expand formulas next to range when source data grows.
      41             :     bool                mbRemoveDataOnSave; /// True = remove querried data before saving.
      42             :     bool                mbDisableEdit;      /// True = connection locked for editing.
      43             :     bool                mbPreserveFormat;   /// True = use existing formatting for new rows.
      44             :     bool                mbAdjustColWidth;   /// True = adjust column widths after refresh.
      45             :     bool                mbIntermediate;     /// True = query table defined but not built yet.
      46             : 
      47             :     explicit            QueryTableModel();
      48             : };
      49             : 
      50           0 : class QueryTable : public WorksheetHelper
      51             : {
      52             : public:
      53             :     explicit            QueryTable( const WorksheetHelper& rHelper );
      54             : 
      55             :     /** Imports query table settings from the queryTable element. */
      56             :     void                importQueryTable( const AttributeList& rAttribs );
      57             :     /** Imports query table settings from the QUERYTABLE record. */
      58             :     void                importQueryTable( SequenceInputStream& rStrm );
      59             : 
      60             :     /** Inserts a web query into the sheet. */
      61             :     void                finalizeImport();
      62             : 
      63             : private:
      64             :     QueryTableModel     maModel;
      65             : };
      66             : 
      67         269 : class QueryTableBuffer : public WorksheetHelper
      68             : {
      69             : public:
      70             :     explicit            QueryTableBuffer( const WorksheetHelper& rHelper );
      71             : 
      72             :     /** Creates a new query table and stores it into the internal vector. */
      73             :     QueryTable&         createQueryTable();
      74             : 
      75             :     /** Inserts all web queries into the sheet. */
      76             :     void                finalizeImport();
      77             : 
      78             : private:
      79             :     typedef RefVector< QueryTable > QueryTableVector;
      80             :     QueryTableVector    maQueryTables;
      81             : };
      82             : 
      83             : } // namespace xls
      84             : } // namespace oox
      85             : 
      86             : #endif
      87             : 
      88             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11