LibreOffice Module sc (master)  1
tablecolumnscontext.cxx
Go to the documentation of this file.
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 #include <tablecolumnscontext.hxx>
21 
22 #include <tablecolumnsbuffer.hxx>
23 #include <oox/token/namespaces.hxx>
24 
25 namespace oox::xls {
26 
27 using ::oox::core::ContextHandlerRef;
28 
30  WorksheetContextBase( rParent ),
31  mrTableColumn( rTableColumn )
32 {
33 }
34 
35 ContextHandlerRef TableColumnContext::onCreateContext( sal_Int32 /*nElement*/, const AttributeList& /*rAttribs*/ )
36 {
37  /* no known child elements */
38  return nullptr;
39 }
40 
42 {
43  mrTableColumn.importTableColumn( rAttribs );
44 }
45 
47 {
48  /* no known child elements */
49  return nullptr;
50 }
51 
53 {
55 }
56 
58  WorksheetContextBase( rFragment ),
59  mrTableColumns( rTableColumns )
60 {
61 }
62 
63 ContextHandlerRef TableColumnsContext::onCreateContext( sal_Int32 nElement, const AttributeList& /*rAttribs*/ )
64 {
65  if( (getCurrentElement() == XLS_TOKEN( tableColumns )) && (nElement == XLS_TOKEN( tableColumn )) )
67  return nullptr;
68 }
69 
71 {
73 }
74 
76 {
77  /* XXX not implemented */
78 #if 0
79  if( (getCurrentElement() == BIFF12_ID_TABLECOLUMNS) && (nRecId == BIFF12_ID_TABLECOLUMN) )
81 #endif
82  return nullptr;
83 }
84 
86 {
88 }
89 
90 } // namespace oox::xls
91 
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
TableColumn & createTableColumn()
Creates a new table column and stores it internally.
TableColumnsContext(WorksheetFragmentBase &rFragment, TableColumns &rTableColumns)
void importTableColumn(const AttributeList &rAttribs)
Imports table column settings from the tableColumn element.
A column in a table (database range).
void importTableColumns(const AttributeList &rAttribs)
Imports settings from the tableColumns element.
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
sal_Int32 getCurrentElement() const
Fragment handler derived from the WorksheetHelper helper class.
Context handler derived from the WorksheetHelper helper class.
virtual void onStartRecord(SequenceInputStream &rStrm) override
TableColumnContext(WorksheetContextBase &rParent, TableColumn &rTableColumn)
virtual ::oox::core::ContextHandlerRef onCreateRecordContext(sal_Int32 nRecId, SequenceInputStream &rStrm) override
virtual ::oox::core::ContextHandlerRef onCreateRecordContext(sal_Int32 nRecId, SequenceInputStream &rStrm) override
virtual void onStartElement(const AttributeList &rAttribs) override
virtual void onStartElement(const AttributeList &rAttribs) override
virtual void onStartRecord(SequenceInputStream &rStrm) override
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override