LibreOffice Module oox (master)
1
oox
source
drawingml
ThemeOverrideFragmentHandler.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
10
#include <
drawingml/ThemeOverrideFragmentHandler.hxx
>
11
#include <oox/token/namespaces.hxx>
12
#include <
drawingml/themeelementscontext.hxx
>
13
14
using namespace
::
oox::core
;
15
16
namespace
oox::drawingml
17
{
18
19
ThemeOverrideFragmentHandler::ThemeOverrideFragmentHandler
(
XmlFilterBase
& rFilter,
const
OUString& rFragmentPath,
Theme
& rOoxTheme,
model::Theme
& rTheme)
20
:
FragmentHandler2
(rFilter, rFragmentPath)
21
, mrOoxTheme(rOoxTheme)
22
,
mrTheme
(rTheme)
23
{
24
}
25
26
ThemeOverrideFragmentHandler::~ThemeOverrideFragmentHandler
()
27
{
28
}
29
30
ContextHandlerRef
ThemeOverrideFragmentHandler::onCreateContext
(sal_Int32 nElement,
const
AttributeList
&
/*rAttribute*/
)
31
{
32
// CT_OfficeStyleSheet
33
switch
(getCurrentElement())
34
{
35
case
XML_ROOT_CONTEXT
:
36
switch
(nElement)
37
{
38
case
A_TOKEN( themeOverride ):
// CT_BaseStylesOverride
39
return
new
ThemeElementsContext
(*
this
,
mrOoxTheme
,
mrTheme
);
40
}
41
break
;
42
}
43
return
nullptr
;
44
}
45
46
}
// namespace oox::drawingml
47
48
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ThemeOverrideFragmentHandler.hxx
model::Theme
oox::AttributeList
Provides access to attribute values of an element.
Definition:
attributelist.hxx:83
oox::core::FragmentHandler2
Definition:
fragmenthandler2.hxx:47
oox::core::XmlFilterBase
Definition:
xmlfilterbase.hxx:85
oox::drawingml::ThemeElementsContext
Definition:
themeelementscontext.hxx:31
oox::drawingml::ThemeOverrideFragmentHandler::onCreateContext
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
Definition:
ThemeOverrideFragmentHandler.cxx:30
oox::drawingml::ThemeOverrideFragmentHandler::mrTheme
model::Theme & mrTheme
Definition:
ThemeOverrideFragmentHandler.hxx:31
oox::drawingml::ThemeOverrideFragmentHandler::mrOoxTheme
Theme & mrOoxTheme
Definition:
ThemeOverrideFragmentHandler.hxx:30
oox::drawingml::ThemeOverrideFragmentHandler::~ThemeOverrideFragmentHandler
virtual ~ThemeOverrideFragmentHandler() override
Definition:
ThemeOverrideFragmentHandler.cxx:26
oox::drawingml::ThemeOverrideFragmentHandler::ThemeOverrideFragmentHandler
ThemeOverrideFragmentHandler(::oox::core::XmlFilterBase &rFilter, const OUString &rFragmentPath, Theme &rOoxTheme, model::Theme &rTheme)
Definition:
ThemeOverrideFragmentHandler.cxx:19
oox::drawingml::Theme
Definition:
theme.hxx:63
rtl::Reference
oox::core
oox::core::XML_ROOT_CONTEXT
const sal_Int32 XML_ROOT_CONTEXT
Definition:
contexthandler2.hxx:45
oox::drawingml
mrTheme
model::Theme & mrTheme
Definition:
themeelementscontext.cxx:202
themeelementscontext.hxx
Generated on Sun Jul 30 2023 04:44:11 for LibreOffice Module oox (master) by
1.9.3