LibreOffice Module oox (master)  1
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 
11 #include <oox/drawingml/theme.hxx>
12 #include <oox/token/namespaces.hxx>
14 
15 using namespace ::oox::core;
16 
17 namespace oox::drawingml {
18 
19 ThemeOverrideFragmentHandler::ThemeOverrideFragmentHandler( XmlFilterBase& rFilter, const OUString& rFragmentPath, Theme& rTheme ) :
20  FragmentHandler2( rFilter, rFragmentPath ),
21  mrTheme( rTheme )
22 {
23 }
24 
26 {
27 }
28 
30 {
31  // CT_OfficeStyleSheet
32  switch( getCurrentElement() )
33  {
34  case XML_ROOT_CONTEXT:
35  switch( nElement )
36  {
37  case A_TOKEN( themeOverride ): // CT_BaseStylesOverride
38  return new ThemeElementsContext( *this, mrTheme );
39  }
40  break;
41  }
42  return nullptr;
43 }
44 
45 } // namespace oox::drawingml
46 
47 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ThemeOverrideFragmentHandler(::oox::core::XmlFilterBase &rFilter, const OUString &rFragmentPath, Theme &rTheme)
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
Will be called to create a context handler for the passed element.
sal_Int32 getCurrentElement() const
Returns the identifier of the currently processed element.
Provides access to attribute values of an element.
const sal_Int32 XML_ROOT_CONTEXT