1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SC_SOURCE_FILTER_INC_QUERYTABLEBUFFER_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_INC_QUERYTABLEBUFFER_HXX
23 #include "stylesbuffer.hxx"
24 #include "worksheethelper.hxx"
29 struct QueryTableModel
: public AutoFormatModel
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.
47 explicit QueryTableModel();
50 class QueryTable
: public WorksheetHelper
53 explicit QueryTable( const WorksheetHelper
& rHelper
);
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
);
60 /** Inserts a web query into the sheet. */
61 void finalizeImport();
64 QueryTableModel maModel
;
67 class QueryTableBuffer
: public WorksheetHelper
70 explicit QueryTableBuffer( const WorksheetHelper
& rHelper
);
72 /** Creates a new query table and stores it into the internal vector. */
73 QueryTable
& createQueryTable();
75 /** Inserts all web queries into the sheet. */
76 void finalizeImport();
79 typedef RefVector
< QueryTable
> QueryTableVector
;
80 QueryTableVector maQueryTables
;
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */