LibreOffice Module sd (master) 1
pptx-animations-nodectx.hxx
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#pragma once
10
11#include <com/sun/star/uno/Reference.hxx>
12#include <com/sun/star/animations/XAnimationNode.hpp>
13#include <vector>
15
16namespace oox::core
17{
18class NodeContext;
19
20typedef std::unique_ptr<NodeContext> NodeContextPtr;
21
23{
24 const css::uno::Reference<css::animations::XAnimationNode> mxNode;
25
26 std::vector<NodeContextPtr> maChildNodes;
27 std::vector<Cond> maBeginCondList;
28 std::vector<Cond> maEndCondList;
29 // if the node has valid target or contains at least one valid target.
30 bool mbValid;
31
32 // if the node should be on SubTnLst or ChildTnLst
34
35 // Attributes initialized from mxNode->getUserData().
40
42 void initUserData();
43
46 bool initChildNodes();
47
49 void initValid(bool bHasValidChild, bool bIsIterateChild);
50
51public:
52 NodeContext(const css::uno::Reference<css::animations::XAnimationNode>& xNode,
53 bool bMainSeqChild, bool bIsIterateChild);
54 const css::uno::Reference<css::animations::XAnimationNode>& getNode() const { return mxNode; }
55 sal_Int16 getEffectNodeType() const { return mnEffectNodeType; }
56 sal_Int16 getEffectPresetClass() const { return mnEffectPresetClass; }
57 const OUString& getEffectPresetId() const { return msEffectPresetId; }
58 const OUString& getEffectPresetSubType() const { return msEffectPresetSubType; }
59 bool isValid() const { return mbValid; }
60 bool isOnSubTnLst() const { return mbOnSubTnLst; }
61 const std::vector<NodeContextPtr>& getChildNodes() const { return maChildNodes; };
62 const css::uno::Reference<css::animations::XAnimationNode>& getNodeForCondition() const;
63 const std::vector<Cond>& getBeginCondList() const { return maBeginCondList; }
64 const std::vector<Cond>& getEndCondList() const { return maEndCondList; }
65};
66}
void initValid(bool bHasValidChild, bool bIsIterateChild)
constructor helper to initialize mbValid
void initUserData()
constructor helper for initializing user data.
const std::vector< NodeContextPtr > & getChildNodes() const
const std::vector< Cond > & getBeginCondList() const
std::vector< Cond > maEndCondList
const std::vector< Cond > & getEndCondList() const
const OUString & getEffectPresetId() const
std::vector< Cond > maBeginCondList
const css::uno::Reference< css::animations::XAnimationNode > & getNode() const
bool initChildNodes()
constructor helper to initialize maChildNodes.
std::vector< NodeContextPtr > maChildNodes
const css::uno::Reference< css::animations::XAnimationNode > & getNodeForCondition() const
NodeContext(const css::uno::Reference< css::animations::XAnimationNode > &xNode, bool bMainSeqChild, bool bIsIterateChild)
sal_Int16 getEffectPresetClass() const
const css::uno::Reference< css::animations::XAnimationNode > mxNode
const OUString & getEffectPresetSubType() const
std::unique_ptr< NodeContext > NodeContextPtr