LibreOffice Module oox (master)
1
oox
source
drawingml
chart
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
20
#include <
drawingml/chart/datatablecontext.hxx
>
21
#include <
drawingml/shapepropertiescontext.hxx
>
22
#include <
drawingml/textbodycontext.hxx
>
23
#include <
drawingml/chart/plotareamodel.hxx
>
24
#include <
oox/core/xmlfilterbase.hxx
>
25
#include <
oox/helper/attributelist.hxx
>
26
#include <oox/token/namespaces.hxx>
27
#include <oox/token/tokens.hxx>
28
29
namespace
oox::drawingml::chart
30
{
31
using ::oox::core::ContextHandler2Helper;
32
using ::oox::core::ContextHandlerRef
;
33
34
DataTableContext::DataTableContext
(ContextHandler2Helper& rParent,
DataTableModel
& rModel)
35
:
ContextBase
<
DataTableModel
>(rParent, rModel)
36
{
37
}
38
39
DataTableContext::~DataTableContext
() {}
40
41
ContextHandlerRef
DataTableContext::onCreateContext
(sal_Int32 nElement,
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):
62
return
new
ShapePropertiesContext
(*
this
,
mrModel
.
mxShapeProp
.
create
());
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: */
attributelist.hxx
oox::AttributeList
Provides access to attribute values of an element.
Definition:
attributelist.hxx:83
oox::AttributeList::getBool
std::optional< bool > getBool(sal_Int32 nAttrToken) const
Returns the boolean value of the specified attribute.
Definition:
attributelist.cxx:232
oox::drawingml::ShapePropertiesContext
Definition:
shapepropertiescontext.hxx:29
oox::drawingml::TextBodyContext
Definition:
textbodycontext.hxx:30
oox::drawingml::chart::ContextBase
Definition:
chartcontextbase.hxx:31
oox::drawingml::chart::ContextBase< DataTableModel >::mrModel
DataTableModel & mrModel
Definition:
chartcontextbase.hxx:37
oox::drawingml::chart::DataTableContext::DataTableContext
DataTableContext(::oox::core::ContextHandler2Helper &rParent, DataTableModel &rModel)
Definition:
datatablecontext.cxx:34
oox::drawingml::chart::DataTableContext::onCreateContext
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
Definition:
datatablecontext.cxx:41
oox::drawingml::chart::DataTableContext::~DataTableContext
virtual ~DataTableContext() override
Definition:
datatablecontext.cxx:39
oox::drawingml::chart::ModelRef::create
ModelType & create()
Definition:
modelbase.hxx:43
rtl::Reference
datatablecontext.hxx
oox::core::ContextHandlerRef
::rtl::Reference< ContextHandler > ContextHandlerRef
Definition:
contexthandler.hxx:49
oox::drawingml::chart
plotareamodel.hxx
shapepropertiescontext.hxx
oox::drawingml::chart::DataTableModel
Definition:
datatablemodel.hxx:25
oox::drawingml::chart::DataTableModel::mbShowOutline
bool mbShowOutline
Show Vertical Border.
Definition:
datatablemodel.hxx:28
oox::drawingml::chart::DataTableModel::mbShowHBorder
bool mbShowHBorder
Definition:
datatablemodel.hxx:26
oox::drawingml::chart::DataTableModel::mxShapeProp
ModelRef< Shape > mxShapeProp
Definition:
datatablemodel.hxx:31
oox::drawingml::chart::DataTableModel::mxTextProp
ModelRef< TextBody > mxTextProp
frame formatting.
Definition:
datatablemodel.hxx:32
oox::drawingml::chart::DataTableModel::mbShowKeys
bool mbShowKeys
Show outline.
Definition:
datatablemodel.hxx:29
oox::drawingml::chart::DataTableModel::mbShowVBorder
bool mbShowVBorder
Show Horizontal Border.
Definition:
datatablemodel.hxx:27
textbodycontext.hxx
xmlfilterbase.hxx
Generated on Sun Jul 30 2023 04:44:07 for LibreOffice Module oox (master) by
1.9.3