fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / sc / source / filter / inc / tablecolumnsbuffer.hxx
blob2ccfcbc43bddc0f38de49c6c02815f1f40d5c30f
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 #ifndef INCLUDED_SC_SOURCE_FILTER_INC_TABLECOLUMNSBUFFER_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_INC_TABLECOLUMNSBUFFER_HXX
23 #include <oox/helper/refvector.hxx>
24 #include "workbookhelper.hxx"
26 class ScDBData;
28 namespace oox {
29 namespace xls {
31 /** A column in a table (database range).
33 class TableColumn : public WorkbookHelper
35 public:
36 explicit TableColumn( const WorkbookHelper& rHelper );
38 /** Imports table column settings from the tableColumn element. */
39 void importTableColumn( const AttributeList& rAttribs );
40 /** Imports table column settings from the TABLECOLUMN (?) record. */
41 void importTableColumn( SequenceInputStream& rStrm );
42 /** Gets the name of this column. */
43 const OUString& getName() const;
45 private:
46 OUString maName;
47 sal_Int32 mnId;
48 sal_Int32 mnDataDxfId;
51 class TableColumns : public WorkbookHelper
53 public:
54 explicit TableColumns( const WorkbookHelper& rHelper );
56 /** Imports settings from the tableColumns element. */
57 void importTableColumns( const AttributeList& rAttribs );
58 /** Imports settings from the TABLECOLUMNS (?) record. */
59 void importTableColumns( SequenceInputStream& rStrm );
61 /** Creates a new table column and stores it internally. */
62 TableColumn& createTableColumn();
64 /** Applies the columns to the passed database range. */
65 bool finalizeImport( ScDBData* pDBData );
67 private:
68 typedef RefVector< TableColumn > TableColumnVector;
70 TableColumnVector maTableColumnVector;
71 sal_Int32 mnCount;
74 class TableColumnsBuffer : public WorkbookHelper
76 public:
77 explicit TableColumnsBuffer( const WorkbookHelper& rHelper );
79 /** Creates a new table columns object and stores it internally. */
80 TableColumns& createTableColumns();
82 /** Applies the table columns to the passed database range.
83 @return True = this buffer contains valid table column settings. */
84 bool finalizeImport( ScDBData* pDBData );
86 private:
87 /** Returns the table columns object used. */
88 TableColumns* getActiveTableColumns();
90 private:
91 typedef RefVector< TableColumns > TableColumnsVector;
92 TableColumnsVector maTableColumnsVector;
95 } // namespace xls
96 } // namespace oox
98 #endif
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */