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

Generated by: LCOV version 1.10