nss: upgrade to release 3.73
[LibreOffice.git] / sd / inc / TransitionPreset.hxx
blob0549289e820b5cbb1335778c2b1d82e7ffc74b2d
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SD_INC_TRANSITIONPRESET_HXX
21 #define INCLUDED_SD_INC_TRANSITIONPRESET_HXX
23 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
25 #include <vector>
26 #include <map>
27 #include <memory>
28 #include <unordered_map>
30 namespace com::sun::star {
31 namespace animations { class XAnimationNode; }
32 namespace uno { template<class X> class Reference; }
35 namespace sd {
37 class TransitionPreset;
38 typedef std::shared_ptr< TransitionPreset > TransitionPresetPtr;
39 typedef std::vector< TransitionPresetPtr > TransitionPresetList;
40 typedef std::unordered_map< OUString, OUString > UStringMap;
42 class TransitionPreset
44 public:
45 static const TransitionPresetList& getTransitionPresetList();
47 sal_Int16 getTransition() const { return mnTransition; }
48 sal_Int16 getSubtype() const { return mnSubtype; }
49 bool getDirection() const { return mbDirection; }
50 sal_Int32 getFadeColor() const { return mnFadeColor; }
52 const OUString& getPresetId() const { return maPresetId; }
53 const OUString& getSetId() const { return maSetId; }
54 const OUString& getSetLabel() const { return maSetLabel; }
55 const OUString& getVariantLabel() const { return maVariantLabel; }
57 private:
58 TransitionPreset( const css::uno::Reference< css::animations::XAnimationNode >& xNode );
60 static bool importTransitionPresetList(TransitionPresetList& rList);
61 static std::map<OUString, TransitionPresetList> mPresetsMap;
63 sal_Int16 mnTransition;
64 sal_Int16 mnSubtype;
65 bool mbDirection;
66 sal_Int32 mnFadeColor;
67 OUString maPresetId;
68 OUString maSetId;
69 OUString maSetLabel;
70 OUString maVariantLabel;
72 static bool importTransitionsFile( TransitionPresetList& rList,
73 css::uno::Reference< css::lang::XMultiServiceFactory > const & xServiceFactory,
74 const OUString& aFilename );
79 #endif // INCLUDED_SD_INC_TRANSITIONPRESET_HXX
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */