Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / oox / source / drawingml / ThemeOverrideFragmentHandler.cxx
blob72f93a7e2581aff22ac5098438ea633e03bf0c4a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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 */
10 #include <drawingml/ThemeOverrideFragmentHandler.hxx>
11 #include <oox/token/namespaces.hxx>
12 #include <drawingml/themeelementscontext.hxx>
14 using namespace ::oox::core;
16 namespace oox::drawingml
19 ThemeOverrideFragmentHandler::ThemeOverrideFragmentHandler(XmlFilterBase& rFilter, const OUString& rFragmentPath, Theme& rOoxTheme, model::Theme& rTheme)
20 : FragmentHandler2(rFilter, rFragmentPath)
21 , mrOoxTheme(rOoxTheme)
22 , mrTheme(rTheme)
26 ThemeOverrideFragmentHandler::~ThemeOverrideFragmentHandler()
30 ContextHandlerRef ThemeOverrideFragmentHandler::onCreateContext(sal_Int32 nElement, const AttributeList& /*rAttribute*/)
32 // CT_OfficeStyleSheet
33 switch (getCurrentElement())
35 case XML_ROOT_CONTEXT:
36 switch (nElement)
38 case A_TOKEN( themeOverride ): // CT_BaseStylesOverride
39 return new ThemeElementsContext(*this, mrOoxTheme, mrTheme);
41 break;
43 return nullptr;
46 } // namespace oox::drawingml
48 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */