tdf#130857 qt weld: Support mail merge "Server Auth" dialog
[LibreOffice.git] / sc / source / filter / inc / tablecolumnsbuffer.hxx
blobf54c2eb5533e546ec81009c18c65b1ab640a3fc0
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 #pragma once
22 #include <oox/helper/refvector.hxx>
23 #include <dbdata.hxx>
24 #include "workbookhelper.hxx"
26 namespace oox { class AttributeList; }
27 namespace oox { class SequenceInputStream; }
28 class ScDBData;
30 namespace oox::xls {
32 /** A column in a table (database range).
34 class TableColumn : public WorkbookHelper
36 public:
37 explicit TableColumn( const WorkbookHelper& rHelper );
39 /** Imports table column settings from the tableColumn element. */
40 void importTableColumn( const AttributeList& rAttribs );
41 /** Imports table column settings from the TABLECOLUMN (?) record. */
42 void importTableColumn( SequenceInputStream& rStrm );
43 /** Gets the name of this column. */
44 const OUString& getName() const;
45 /** Gets the attributes of this column. */
46 const TableColumnAttributes& getColumnAttributes() const;
48 private:
49 OUString maName;
50 sal_Int32 mnId;
51 sal_Int32 mnDataDxfId;
52 TableColumnAttributes maColumnAttributes;
55 class TableColumns : public WorkbookHelper
57 public:
58 explicit TableColumns( const WorkbookHelper& rHelper );
60 /** Imports settings from the tableColumns element. */
61 void importTableColumns( const AttributeList& rAttribs );
62 /** Imports settings from the TABLECOLUMNS (?) record. */
63 void importTableColumns( SequenceInputStream& rStrm );
65 /** Creates a new table column and stores it internally. */
66 TableColumn& createTableColumn();
68 /** Applies the columns to the passed database range. */
69 bool finalizeImport( ScDBData* pDBData );
71 private:
72 typedef RefVector< TableColumn > TableColumnVector;
74 TableColumnVector maTableColumnVector;
75 sal_Int32 mnCount;
78 class TableColumnsBuffer : public WorkbookHelper
80 public:
81 explicit TableColumnsBuffer( const WorkbookHelper& rHelper );
83 /** Creates a new table columns object and stores it internally. */
84 TableColumns& createTableColumns();
86 /** Applies the table columns to the passed database range. */
87 void finalizeImport( ScDBData* pDBData );
89 private:
90 /** Returns the table columns object used. */
91 TableColumns* getActiveTableColumns();
93 private:
94 typedef RefVector< TableColumns > TableColumnsVector;
95 TableColumnsVector maTableColumnsVector;
98 } // namespace oox::xls
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */