LibreOffice Module sd (master) 1
TransitionPreset.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 * 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#pragma once
21
22#include <com/sun/star/lang/XMultiServiceFactory.hpp>
23
24#include <vector>
25#include <map>
26#include <memory>
27#include <unordered_map>
28
29namespace com::sun::star {
30 namespace animations { class XAnimationNode; }
31 namespace uno { template<class X> class Reference; }
32}
33
34namespace sd {
35
36class TransitionPreset;
37typedef std::shared_ptr< TransitionPreset > TransitionPresetPtr;
38typedef std::vector< TransitionPresetPtr > TransitionPresetList;
39typedef std::unordered_map< OUString, OUString > UStringMap;
40
42{
43public:
45
46 sal_Int16 getTransition() const { return mnTransition; }
47 sal_Int16 getSubtype() const { return mnSubtype; }
48 bool getDirection() const { return mbDirection; }
49 sal_Int32 getFadeColor() const { return mnFadeColor; }
50
51 const OUString& getPresetId() const { return maPresetId; }
52 const OUString& getSetId() const { return maSetId; }
53 const OUString& getSetLabel() const { return maSetLabel; }
54 const OUString& getVariantLabel() const { return maVariantLabel; }
55
56private:
57 TransitionPreset( const css::uno::Reference< css::animations::XAnimationNode >& xNode );
58
60 static std::map<OUString, TransitionPresetList> mPresetsMap;
61
62 sal_Int16 mnTransition;
63 sal_Int16 mnSubtype;
65 sal_Int32 mnFadeColor;
66 OUString maPresetId;
67 OUString maSetId;
68 OUString maSetLabel;
70
72 css::uno::Reference< css::lang::XMultiServiceFactory > const & xServiceFactory,
73 const OUString& aFilename );
74};
75
76}
77
78/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_Int16 getTransition() const
const OUString & getSetLabel() const
const OUString & getSetId() const
sal_Int32 getFadeColor() const
const OUString & getPresetId() const
TransitionPreset(const css::uno::Reference< css::animations::XAnimationNode > &xNode)
static std::map< OUString, TransitionPresetList > mPresetsMap
static bool importTransitionPresetList(TransitionPresetList &rList)
sal_Int16 getSubtype() const
static const TransitionPresetList & getTransitionPresetList()
const OUString & getVariantLabel() const
static bool importTransitionsFile(TransitionPresetList &rList, css::uno::Reference< css::lang::XMultiServiceFactory > const &xServiceFactory, const OUString &aFilename)
Reference
std::vector< TransitionPresetPtr > TransitionPresetList
std::unordered_map< OUString, OUString > UStringMap
std::shared_ptr< TransitionPreset > TransitionPresetPtr