1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_OOX_PPT_PPTFILTERHELPERS_HXX
21 #define INCLUDED_OOX_PPT_PPTFILTERHELPERS_HXX
23 #include <com/sun/star/uno/Reference.hxx>
24 #include <oox/dllapi.h>
25 #include <sal/types.h>
26 #include <rtl/ustring.hxx>
27 #include <com/sun/star/uno/Any.hxx>
29 namespace com::sun::star
{
30 namespace animations
{ class XAnimationNode
; }
35 // conversion of MS to OOo attributes.
36 enum class AnimationAttributeEnum
38 PPT_X
, PPT_Y
, PPT_W
, PPT_H
, PPT_C
, R
, XSHEAR
, FILLCOLOR
, FILLTYPE
,
39 FILLON
, STROKECOLOR
, STROKEON
, STYLECOLOR
, STYLEROTATION
, FONTWEIGHT
,
40 STYLEUNDERLINE
, STYLEFONTFAMILY
, STYLEFONTSIZE
, STYLEFONTSTYLE
,
41 STYLEVISIBILITY
, STYLEOPACITY
, UNKNOWN
44 struct ImplAttributeNameConversion
46 AnimationAttributeEnum meAttribute
;
48 const char* mpAPIName
;
51 OOX_DLLPUBLIC
const ImplAttributeNameConversion
*getAttributeConversionList();
53 struct OOX_DLLPUBLIC transition
58 bool mbDirection
; // true: default geometric direction
60 static const transition
* getList();
61 static const transition
* find( std::u16string_view rName
);
64 struct OOX_DLLPUBLIC convert_subtype
67 const char* mpStrSubType
;
69 static const convert_subtype
* getList();
72 struct OOX_DLLPUBLIC preset_mapping
74 sal_Int32 mnPresetClass
;
76 const char* mpStrPresetId
;
78 static const preset_mapping
* getList();
81 OOX_DLLPUBLIC OUString
getConvertedSubType( sal_Int16 nPresetClass
, sal_Int32 nPresetId
, sal_Int32 nPresetSubType
);
83 OOX_DLLPUBLIC
void fixMainSequenceTiming( const css::uno::Reference
< css::animations::XAnimationNode
>& xNode
);
85 OOX_DLLPUBLIC
void fixInteractiveSequenceTiming( const css::uno::Reference
< css::animations::XAnimationNode
>& xNode
);
87 /** convert attribute values of the animation target so that LibreOffice understand.
89 OOX_DLLPUBLIC
bool convertAnimationValue(AnimationAttributeEnum eAttribute
, css::uno::Any
& rValue
);
91 /** convert the measure string to LibreOffice format.
92 * i.e. convert occurrence of #{0,1}ppt_[xywh] to x,y, width, height.
94 OOX_DLLPUBLIC
bool convertMeasure(OUString
& rString
);
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */