LibreOffice Module oox (master) 1
datatablecontext.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
26#include <oox/token/namespaces.hxx>
27#include <oox/token/tokens.hxx>
28
30{
31using ::oox::core::ContextHandler2Helper;
33
34DataTableContext::DataTableContext(ContextHandler2Helper& rParent, DataTableModel& rModel)
35 : ContextBase<DataTableModel>(rParent, rModel)
36{
37}
38
40
42 const AttributeList& rAttribs)
43{
44 switch (getCurrentElement())
45 {
46 case C_TOKEN(dTable):
47 switch (nElement)
48 {
49 case C_TOKEN(showHorzBorder):
50 mrModel.mbShowHBorder = rAttribs.getBool(XML_val, false);
51 break;
52 case C_TOKEN(showVertBorder):
53 mrModel.mbShowVBorder = rAttribs.getBool(XML_val, false);
54 break;
55 case C_TOKEN(showOutline):
56 mrModel.mbShowOutline = rAttribs.getBool(XML_val, false);
57 break;
58 case C_TOKEN(showKeys):
59 mrModel.mbShowKeys = rAttribs.getBool(XML_val, false);
60 break;
61 case C_TOKEN(spPr):
63 case C_TOKEN(txPr):
64 return new TextBodyContext(*this, mrModel.mxTextProp.create());
65 }
66 break;
67 }
68 return nullptr;
69}
70
71} // namespace oox::drawingml::chart
72
73/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Provides access to attribute values of an element.
std::optional< bool > getBool(sal_Int32 nAttrToken) const
Returns the boolean value of the specified attribute.
DataTableContext(::oox::core::ContextHandler2Helper &rParent, DataTableModel &rModel)
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
::rtl::Reference< ContextHandler > ContextHandlerRef
bool mbShowOutline
Show Vertical Border.
ModelRef< TextBody > mxTextProp
frame formatting.
bool mbShowVBorder
Show Horizontal Border.