include/oox/helper/addtosequence.hxx | 42 ++ include/oox/ppt/pptfilterhelpers.hxx | 86 +++++ oox/source/ppt/animationspersist.cxx | 72 ++-- oox/source/ppt/animvariantcontext.cxx | 102 ++++++ oox/source/ppt/commonbehaviorcontext.cxx | 4 oox/source/ppt/commonbehaviorcontext.hxx | 2 oox/source/ppt/commontimenodecontext.cxx | 486 ++++++++++++++---------------- oox/source/ppt/pptfilterhelpers.cxx | 225 ++++--------- oox/source/ppt/pptfilterhelpers.hxx | 91 ----- oox/source/ppt/slidetransition.cxx | 2 oox/source/ppt/timenode.cxx | 15 sd/source/filter/eppt/pptexanimations.cxx | 9 sd/source/filter/eppt/pptx-epptooxml.cxx | 2 sd/source/filter/ppt/pptanimations.hxx | 340 -------------------- sd/source/filter/ppt/pptinanimations.cxx | 255 +-------------- sd/source/filter/ppt/pptinanimations.hxx | 5 16 files changed, 632 insertions(+), 1106 deletions(-)
New commits: commit 93e2e45e497bd55cd0fa0502a618d5326ce382b0 Author: Tor Lillqvist <t...@collabora.com> Date: Thu Oct 29 15:18:19 2015 +0200 Too much copy pasta is not good for you Change-Id: Ie5a3cddd6fcf9d1a763284c1aea0fca579da4f8d diff --git a/include/oox/helper/addtosequence.hxx b/include/oox/helper/addtosequence.hxx new file mode 100644 index 0000000..57b7732 --- /dev/null +++ b/include/oox/helper/addtosequence.hxx @@ -0,0 +1,42 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_OOX_HELPER_ADDTOSEQUENCE_HXX +#define INCLUDED_OOX_HELPER_ADDTOSEQUENCE_HXX + +#include <com/sun/star/uno/Any.hxx> +#include <oox/dllapi.h> +#include <rtl/ustring.hxx> + +namespace oox +{ + +/** this adds an any to another any. + if rNewValue is empty, rOldValue is returned. + if rOldValue is empty, rNewValue is returned. + if rOldValue contains a value, a sequence with rOldValue and rNewValue is returned. + if rOldValue contains a sequence, a new sequence with the old sequence and rNewValue is returned. +*/ +OOX_DLLPUBLIC css::uno::Any addToSequence( const css::uno::Any& rOldValue, const css::uno::Any& rNewValue ); + +} // namespace oox + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/oox/ppt/pptfilterhelpers.hxx b/include/oox/ppt/pptfilterhelpers.hxx new file mode 100644 index 0000000..a832c3b --- /dev/null +++ b/include/oox/ppt/pptfilterhelpers.hxx @@ -0,0 +1,86 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_OOX_PPT_PPTFILTERHELPERS_HXX +#define INCLUDED_OOX_PPT_PPTFILTERHELPERS_HXX + +#include <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/animations/XAnimationNode.hpp> +#include <oox/dllapi.h> +#include <sal/types.h> +#include <rtl/ustring.hxx> + +namespace oox { namespace ppt { + + // conversion of MS to OOo attributes. + enum MS_AttributeNames + { + MS_PPT_X, MS_PPT_Y, MS_PPT_W, MS_PPT_H, MS_PPT_C, MS_R, MS_XSHEAR, MS_FILLCOLOR, MS_FILLTYPE, + MS_STROKECOLOR, MS_STROKEON, MS_STYLECOLOR, MS_STYLEROTATION, MS_FONTWEIGHT, + MS_STYLEUNDERLINE, MS_STYLEFONTFAMILY, MS_STYLEFONTSIZE, MS_STYLEFONTSTYLE, + MS_STYLEVISIBILITY, MS_STYLEOPACITY, MS_UNKNOWN + }; + + struct ImplAttributeNameConversion + { + MS_AttributeNames meAttribute; + const char* mpMSName; + const char* mpAPIName; + }; + + OOX_DLLPUBLIC const ImplAttributeNameConversion *getAttributeConversionList(); + + struct OOX_DLLPUBLIC transition + { + const sal_Char* mpName; + sal_Int16 mnType; + sal_Int16 mnSubType; + bool mbDirection; // true: default geometric direction + + static const transition* getList(); + static const transition* find( const OUString& rName ); + }; + + struct OOX_DLLPUBLIC convert_subtype + { + sal_Int32 mnID; + const sal_Char* mpStrSubType; + + static const convert_subtype* getList(); + }; + + struct OOX_DLLPUBLIC preset_maping + { + sal_Int32 mnPresetClass; + sal_Int32 mnPresetId; + const sal_Char* mpStrPresetId; + + static const preset_maping* getList(); + }; + + OOX_DLLPUBLIC OUString getConvertedSubType( sal_Int16 nPresetClass, sal_Int32 nPresetId, sal_Int32 nPresetSubType ); + + OOX_DLLPUBLIC void fixMainSequenceTiming( const css::uno::Reference< css::animations::XAnimationNode >& xNode ); + + OOX_DLLPUBLIC void fixInteractiveSequenceTiming( const css::uno::Reference< css::animations::XAnimationNode >& xNode ); +} } + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/source/ppt/animationspersist.cxx b/oox/source/ppt/animationspersist.cxx index a3bbb4e..0e0cc9b 100644 --- a/oox/source/ppt/animationspersist.cxx +++ b/oox/source/ppt/animationspersist.cxx @@ -27,12 +27,47 @@ #include <com/sun/star/presentation/ShapeAnimationSubType.hpp> #include "oox/drawingml/shape.hxx" +#include <oox/helper/addtosequence.hxx> using namespace ::com::sun::star::uno; using namespace ::com::sun::star::presentation; using namespace ::com::sun::star::drawing; using namespace ::com::sun::star::text; +namespace oox +{ + +Any addToSequence( const Any& rOldValue, const Any& rNewValue ) +{ + if( !rNewValue.hasValue() ) + { + return rOldValue; + } + else if( !rOldValue.hasValue() ) + { + return rNewValue; + } + else + { + Sequence< Any > aNewSeq; + if( rOldValue >>= aNewSeq ) + { + sal_Int32 nSize = aNewSeq.getLength(); + aNewSeq.realloc(nSize+1); + aNewSeq[nSize] = rNewValue; + } + else + { + aNewSeq.realloc(2); + aNewSeq[0] = rOldValue; + aNewSeq[1] = rNewValue; + } + return makeAny( aNewSeq ); + } +} + +} // namespace oox + namespace oox { namespace ppt { void ShapeTargetElement::convert( css::uno::Any & rTarget, sal_Int16 & rSubType ) const @@ -124,43 +159,6 @@ namespace oox { namespace ppt { return aTarget; } -// BEGIN CUT&PASTE from sd/source/filter/ppt/pptinanimations.cxx -/** this adds an any to another any. - if rNewValue is empty, rOldValue is returned. - if rOldValue is empty, rNewValue is returned. - if rOldValue contains a value, a sequence with rOldValue and rNewValue is returned. - if rOldValue contains a sequence, a new sequence with the old sequence and rNewValue is returned. -*/ - static Any addToSequence( const Any& rOldValue, const Any& rNewValue ) - { - if( !rNewValue.hasValue() ) - { - return rOldValue; - } - else if( !rOldValue.hasValue() ) - { - return rNewValue; - } - else - { - Sequence< Any > aNewSeq; - if( rOldValue >>= aNewSeq ) - { - sal_Int32 nSize = aNewSeq.getLength(); - aNewSeq.realloc(nSize+1); - aNewSeq[nSize] = rNewValue; - } - else - { - aNewSeq.realloc(2); - aNewSeq[0] = rOldValue; - aNewSeq[1] = rNewValue; - } - return makeAny( aNewSeq ); - } - } -// END - Any AnimationCondition::convert(const SlidePersistPtr & pSlide) const { Any aAny; diff --git a/oox/source/ppt/animvariantcontext.cxx b/oox/source/ppt/animvariantcontext.cxx index 92cb578..7e8d36d 100644 --- a/oox/source/ppt/animvariantcontext.cxx +++ b/oox/source/ppt/animvariantcontext.cxx @@ -30,7 +30,6 @@ #include "oox/core/fragmenthandler.hxx" #include "oox/core/xmlfilterbase.hxx" #include "drawingml/colorchoicecontext.hxx" -#include "pptfilterhelpers.hxx" using namespace ::oox::core; using namespace ::com::sun::star::uno; @@ -38,6 +37,107 @@ using namespace ::com::sun::star::xml::sax; namespace oox { namespace ppt { + bool convertMeasure( OUString& rString ) + { + bool bRet = false; + + /* here we want to substitute all occurrences of + * [#]ppt_[xyhw] with + * x,y,height and width respectively + */ + sal_Int32 nIndex = 0; + sal_Int32 nLastIndex = 0; + + nIndex = rString.indexOf("ppt_"); + // bail out early if there is no substitution to be made + if(nIndex >= 0) + { + OUStringBuffer sRes(rString.getLength()); + + do + { + // copy the non matching interval verbatim + if(nIndex > nLastIndex) + { + sRes.append(rString.getStr() + nLastIndex, (nIndex - nLastIndex)); + } + // we are searching for ppt_[xywh] so we need and extra char behind the match + if(nIndex + 4 < rString.getLength()) + { + switch(rString[nIndex + 4]) + { + case (sal_Unicode)'h': // we found ppt_h + // if it was #ppt_h we already copied the # + // which we do not want in the target, so remove it + if(nIndex && (rString[nIndex - 1] == (sal_Unicode)'#')) + { + sRes.remove(sRes.getLength() - 1, 1); + } + sRes.append("height"); + bRet = true; + break; + case (sal_Unicode)'w': + if(nIndex && (rString[nIndex - 1] == (sal_Unicode)'#')) + { + sRes.remove(sRes.getLength() - 1, 1); + } + sRes.append("width"); + bRet = true; + break; + case (sal_Unicode)'x': + if(nIndex && (rString[nIndex - 1] == (sal_Unicode)'#')) + { + sRes[sRes.getLength() - 1] = (sal_Unicode)'x'; + } + else + { + sRes.append('x'); + } + bRet = true; + break; + case (sal_Unicode)'y': + if(nIndex && (rString[nIndex - 1] == (sal_Unicode)'#')) + { + sRes[sRes.getLength() - 1] = (sal_Unicode)'y'; + } + else + { + sRes.append('y'); + } + bRet = true; + break; + default: + // this was ppt_ without an interesting thing after that + // just copy it verbatim + sRes.append("ppt_"); + // we are going to adjust for ppt_@ after the switch + // so compensate for the fact we did not really process + // an extra character after ppt_ + nIndex -= 1; + break; + } + } + else + { + sRes.append("ppt_"); + nIndex += 4; + nLastIndex = nIndex; + break; + } + nIndex += 5; + nLastIndex = nIndex; + } + while((nIndex = rString.indexOf("ppt_", nIndex)) > 0); + // copy the non matching tail if any + if(nLastIndex < rString.getLength()) + { + sRes.append(rString.getStr() + nLastIndex, rString.getLength() - nLastIndex ); + } + rString = sRes.makeStringAndClear(); + } + return bRet; + } + AnimVariantContext::AnimVariantContext( FragmentHandler2& rParent, sal_Int32 aElement, Any & aValue ) : FragmentHandler2( rParent ) , mnElement( aElement ) diff --git a/oox/source/ppt/commonbehaviorcontext.cxx b/oox/source/ppt/commonbehaviorcontext.cxx index 66b26da..32ac8f0 100644 --- a/oox/source/ppt/commonbehaviorcontext.cxx +++ b/oox/source/ppt/commonbehaviorcontext.cxx @@ -26,11 +26,11 @@ #include <com/sun/star/animations/XAnimate.hpp> #include "oox/core/fragmenthandler.hxx" +#include <oox/ppt/pptfilterhelpers.hxx> #include "commonbehaviorcontext.hxx" #include "commontimenodecontext.hxx" #include "timetargetelementcontext.hxx" -#include "pptfilterhelpers.hxx" #include <string.h> @@ -83,7 +83,7 @@ namespace oox { namespace ppt { case PPT_TOKEN( attrName ): if( mbIsInAttrName ) { - const ImplAttributeNameConversion *attrConv = gImplConversionList; + const ImplAttributeNameConversion *attrConv = getAttributeConversionList(); while( attrConv->mpMSName != NULL ) { if(msCurrentAttribute.equalsAscii( attrConv->mpMSName ) ) diff --git a/oox/source/ppt/commonbehaviorcontext.hxx b/oox/source/ppt/commonbehaviorcontext.hxx index c6fb3c2..dbe0701 100644 --- a/oox/source/ppt/commonbehaviorcontext.hxx +++ b/oox/source/ppt/commonbehaviorcontext.hxx @@ -23,8 +23,8 @@ #include <rtl/ustring.hxx> #include "oox/ppt/timenodelistcontext.hxx" #include "oox/ppt/animationspersist.hxx" +#include <oox/ppt/pptfilterhelpers.hxx> #include "conditioncontext.hxx" -#include "pptfilterhelpers.hxx" namespace oox { namespace ppt { diff --git a/oox/source/ppt/commontimenodecontext.cxx b/oox/source/ppt/commontimenodecontext.cxx index fd35d33..22a40ea 100644 --- a/oox/source/ppt/commontimenodecontext.cxx +++ b/oox/source/ppt/commontimenodecontext.cxx @@ -36,6 +36,7 @@ #include "oox/helper/attributelist.hxx" #include "oox/core/fragmenthandler.hxx" #include "oox/ppt/pptimport.hxx" +#include <oox/ppt/pptfilterhelpers.hxx> #include "oox/drawingml/drawingmltypes.hxx" #include "animationtypes.hxx" @@ -50,253 +51,250 @@ using ::com::sun::star::beans::NamedValue; namespace oox { namespace ppt { -// BEGIN CUT&PASTE from sd/source/filter/ppt/pptanimations.hxx -struct convert_subtype +const convert_subtype* convert_subtype::getList() { - sal_Int32 mnID; - const sal_Char* mpStrSubType; -}; -static const convert_subtype gConvertArray[] = -{ - // fly in - { 1, "from-top" }, - { 2, "from-right" }, - { 3, "from-top-right" }, - { 4, "from-bottom" }, - { 5, "horizontal" }, - { 6, "from-bottom-right" }, - { 8, "from-left" }, - { 9, "from-top-left" }, - { 10, "vertical" }, - { 12, "from-bottom-left" }, - { 16, "in" }, - { 21, "vertical-in" }, - { 26, "horizontal-in" }, - { 32, "out" }, - { 36, "out-from-screen-center" }, - { 37, "vertical-out" }, - { 42, "horizontal-out" }, - { 272, "in-slightly" }, - { 288, "out-slightly" }, - { 528, "in-from-screen-center" }, - { 0, 0 } -}; + static const convert_subtype aList[] = + { + // fly in + { 1, "from-top" }, + { 2, "from-right" }, + { 3, "from-top-right" }, + { 4, "from-bottom" }, + { 5, "horizontal" }, + { 6, "from-bottom-right" }, + { 8, "from-left" }, + { 9, "from-top-left" }, + { 10, "vertical" }, + { 12, "from-bottom-left" }, + { 16, "in" }, + { 21, "vertical-in" }, + { 26, "horizontal-in" }, + { 32, "out" }, + { 36, "out-from-screen-center" }, + { 37, "vertical-out" }, + { 42, "horizontal-out" }, + { 272, "in-slightly" }, + { 288, "out-slightly" }, + { 528, "in-from-screen-center" }, + { 0, 0 } + }; + + return aList; +} -struct preset_maping +const preset_maping* preset_maping::getList() { - sal_Int32 mnPresetClass; - sal_Int32 mnPresetId; - const sal_Char* mpStrPresetId; -}; -static const preset_maping gPresetMaping[] = -{ - { css::presentation::EffectPresetClass::ENTRANCE, 1 ,"ooo-entrance-appear" }, - { css::presentation::EffectPresetClass::ENTRANCE, 2 ,"ooo-entrance-fly-in" }, - { css::presentation::EffectPresetClass::ENTRANCE, 3 ,"ooo-entrance-venetian-blinds" }, - { css::presentation::EffectPresetClass::ENTRANCE, 4 ,"ooo-entrance-box" }, - { css::presentation::EffectPresetClass::ENTRANCE, 5 ,"ooo-entrance-checkerboard" }, - { css::presentation::EffectPresetClass::ENTRANCE, 6 ,"ooo-entrance-circle" }, - { css::presentation::EffectPresetClass::ENTRANCE, 7 ,"ooo-entrance-fly-in-slow" }, - { css::presentation::EffectPresetClass::ENTRANCE, 8 ,"ooo-entrance-diamond" }, - { css::presentation::EffectPresetClass::ENTRANCE, 9 ,"ooo-entrance-dissolve-in" }, - { css::presentation::EffectPresetClass::ENTRANCE, 10 ,"ooo-entrance-fade-in" }, - { css::presentation::EffectPresetClass::ENTRANCE, 11 ,"ooo-entrance-flash-once" }, - { css::presentation::EffectPresetClass::ENTRANCE, 12 ,"ooo-entrance-peek-in" }, - { css::presentation::EffectPresetClass::ENTRANCE, 13 ,"ooo-entrance-plus" }, - { css::presentation::EffectPresetClass::ENTRANCE, 14 ,"ooo-entrance-random-bars" }, - { css::presentation::EffectPresetClass::ENTRANCE, 15 ,"ooo-entrance-spiral-in" }, - { css::presentation::EffectPresetClass::ENTRANCE, 16 ,"ooo-entrance-split" }, - { css::presentation::EffectPresetClass::ENTRANCE, 17 ,"ooo-entrance-stretchy" }, - { css::presentation::EffectPresetClass::ENTRANCE, 18 ,"ooo-entrance-diagonal-squares" }, - { css::presentation::EffectPresetClass::ENTRANCE, 19 ,"ooo-entrance-swivel" }, - { css::presentation::EffectPresetClass::ENTRANCE, 20 ,"ooo-entrance-wedge" }, - { css::presentation::EffectPresetClass::ENTRANCE, 21 ,"ooo-entrance-wheel" }, - { css::presentation::EffectPresetClass::ENTRANCE, 22 ,"ooo-entrance-wipe" }, - { css::presentation::EffectPresetClass::ENTRANCE, 23 ,"ooo-entrance-zoom" }, - { css::presentation::EffectPresetClass::ENTRANCE, 24 ,"ooo-entrance-random" }, - { css::presentation::EffectPresetClass::ENTRANCE, 25 ,"ooo-entrance-boomerang" }, - { css::presentation::EffectPresetClass::ENTRANCE, 26 ,"ooo-entrance-bounce" }, - { css::presentation::EffectPresetClass::ENTRANCE, 27 ,"ooo-entrance-colored-lettering" }, - { css::presentation::EffectPresetClass::ENTRANCE, 28 ,"ooo-entrance-movie-credits" }, - { css::presentation::EffectPresetClass::ENTRANCE, 29 ,"ooo-entrance-ease-in" }, - { css::presentation::EffectPresetClass::ENTRANCE, 30 ,"ooo-entrance-float" }, - { css::presentation::EffectPresetClass::ENTRANCE, 31 ,"ooo-entrance-turn-and-grow" }, - { css::presentation::EffectPresetClass::ENTRANCE, 34 ,"ooo-entrance-breaks" }, - { css::presentation::EffectPresetClass::ENTRANCE, 35 ,"ooo-entrance-pinwheel" }, - { css::presentation::EffectPresetClass::ENTRANCE, 37 ,"ooo-entrance-rise-up" }, - { css::presentation::EffectPresetClass::ENTRANCE, 38 ,"ooo-entrance-falling-in" }, - { css::presentation::EffectPresetClass::ENTRANCE, 39 ,"ooo-entrance-thread" }, - { css::presentation::EffectPresetClass::ENTRANCE, 40 ,"ooo-entrance-unfold" }, - { css::presentation::EffectPresetClass::ENTRANCE, 41 ,"ooo-entrance-whip" }, - { css::presentation::EffectPresetClass::ENTRANCE, 42 ,"ooo-entrance-ascend" }, - { css::presentation::EffectPresetClass::ENTRANCE, 43 ,"ooo-entrance-center-revolve" }, - { css::presentation::EffectPresetClass::ENTRANCE, 45 ,"ooo-entrance-fade-in-and-swivel" }, - { css::presentation::EffectPresetClass::ENTRANCE, 47 ,"ooo-entrance-descend" }, - { css::presentation::EffectPresetClass::ENTRANCE, 48 ,"ooo-entrance-sling" }, - { css::presentation::EffectPresetClass::ENTRANCE, 49 ,"ooo-entrance-spin-in" }, - { css::presentation::EffectPresetClass::ENTRANCE, 50 ,"ooo-entrance-compress" }, - { css::presentation::EffectPresetClass::ENTRANCE, 51 ,"ooo-entrance-magnify" }, - { css::presentation::EffectPresetClass::ENTRANCE, 52 ,"ooo-entrance-curve-up" }, - { css::presentation::EffectPresetClass::ENTRANCE, 53 ,"ooo-entrance-fade-in-and-zoom" }, - { css::presentation::EffectPresetClass::ENTRANCE, 54 ,"ooo-entrance-glide" }, - { css::presentation::EffectPresetClass::ENTRANCE, 55 ,"ooo-entrance-expand" }, - { css::presentation::EffectPresetClass::ENTRANCE, 56 ,"ooo-entrance-flip" }, - { css::presentation::EffectPresetClass::ENTRANCE, 58 ,"ooo-entrance-fold" }, - { css::presentation::EffectPresetClass::EMPHASIS, 1 ,"ooo-emphasis-fill-color" }, - { css::presentation::EffectPresetClass::EMPHASIS, 2 ,"ooo-emphasis-font" }, - { css::presentation::EffectPresetClass::EMPHASIS, 3 ,"ooo-emphasis-font-color" }, - { css::presentation::EffectPresetClass::EMPHASIS, 4 ,"ooo-emphasis-font-size" }, - { css::presentation::EffectPresetClass::EMPHASIS, 5 ,"ooo-emphasis-font-style" }, - { css::presentation::EffectPresetClass::EMPHASIS, 6 ,"ooo-emphasis-grow-and-shrink" }, - { css::presentation::EffectPresetClass::EMPHASIS, 7 ,"ooo-emphasis-line-color" }, - { css::presentation::EffectPresetClass::EMPHASIS, 8 ,"ooo-emphasis-spin" }, - { css::presentation::EffectPresetClass::EMPHASIS, 9 ,"ooo-emphasis-transparency" }, - { css::presentation::EffectPresetClass::EMPHASIS, 10 ,"ooo-emphasis-bold-flash" }, - { css::presentation::EffectPresetClass::EMPHASIS, 14 ,"ooo-emphasis-blast" }, - { css::presentation::EffectPresetClass::EMPHASIS, 15 ,"ooo-emphasis-bold-reveal" }, - { css::presentation::EffectPresetClass::EMPHASIS, 16 ,"ooo-emphasis-color-over-by-word" }, - { css::presentation::EffectPresetClass::EMPHASIS, 18 ,"ooo-emphasis-reveal-underline" }, - { css::presentation::EffectPresetClass::EMPHASIS, 19 ,"ooo-emphasis-color-blend" }, - { css::presentation::EffectPresetClass::EMPHASIS, 20 ,"ooo-emphasis-color-over-by-letter" }, - { css::presentation::EffectPresetClass::EMPHASIS, 21 ,"ooo-emphasis-complementary-color" }, - { css::presentation::EffectPresetClass::EMPHASIS, 22 ,"ooo-emphasis-complementary-color-2" }, - { css::presentation::EffectPresetClass::EMPHASIS, 23 ,"ooo-emphasis-contrasting-color" }, - { css::presentation::EffectPresetClass::EMPHASIS, 24 ,"ooo-emphasis-darken" }, - { css::presentation::EffectPresetClass::EMPHASIS, 25 ,"ooo-emphasis-desaturate" }, - { css::presentation::EffectPresetClass::EMPHASIS, 26 ,"ooo-emphasis-flash-bulb" }, - { css::presentation::EffectPresetClass::EMPHASIS, 27 ,"ooo-emphasis-flicker" }, - { css::presentation::EffectPresetClass::EMPHASIS, 28 ,"ooo-emphasis-grow-with-color" }, - { css::presentation::EffectPresetClass::EMPHASIS, 30 ,"ooo-emphasis-lighten" }, - { css::presentation::EffectPresetClass::EMPHASIS, 31 ,"ooo-emphasis-style-emphasis" }, - { css::presentation::EffectPresetClass::EMPHASIS, 32 ,"ooo-emphasis-teeter" }, - { css::presentation::EffectPresetClass::EMPHASIS, 33 ,"ooo-emphasis-vertical-highlight" }, - { css::presentation::EffectPresetClass::EMPHASIS, 34 ,"ooo-emphasis-wave" }, - { css::presentation::EffectPresetClass::EMPHASIS, 35 ,"ooo-emphasis-blink" }, - { css::presentation::EffectPresetClass::EMPHASIS, 36 ,"ooo-emphasis-shimmer" }, - { css::presentation::EffectPresetClass::EXIT, 1 ,"ooo-exit-disappear" }, - { css::presentation::EffectPresetClass::EXIT, 2 ,"ooo-exit-fly-out" }, - { css::presentation::EffectPresetClass::EXIT, 3 ,"ooo-exit-venetian-blinds" }, - { css::presentation::EffectPresetClass::EXIT, 4 ,"ooo-exit-box" }, - { css::presentation::EffectPresetClass::EXIT, 5 ,"ooo-exit-checkerboard" }, - { css::presentation::EffectPresetClass::EXIT, 6 ,"ooo-exit-circle" }, - { css::presentation::EffectPresetClass::EXIT, 7 ,"ooo-exit-crawl-out" }, - { css::presentation::EffectPresetClass::EXIT, 8 ,"ooo-exit-diamond" }, - { css::presentation::EffectPresetClass::EXIT, 9 ,"ooo-exit-dissolve" }, - { css::presentation::EffectPresetClass::EXIT, 10 ,"ooo-exit-fade-out" }, - { css::presentation::EffectPresetClass::EXIT, 11 ,"ooo-exit-flash-once" }, - { css::presentation::EffectPresetClass::EXIT, 12 ,"ooo-exit-peek-out" }, - { css::presentation::EffectPresetClass::EXIT, 13 ,"ooo-exit-plus" }, - { css::presentation::EffectPresetClass::EXIT, 14 ,"ooo-exit-random-bars" }, - { css::presentation::EffectPresetClass::EXIT, 15 ,"ooo-exit-spiral-out" }, - { css::presentation::EffectPresetClass::EXIT, 16 ,"ooo-exit-split" }, - { css::presentation::EffectPresetClass::EXIT, 17 ,"ooo-exit-collapse" }, - { css::presentation::EffectPresetClass::EXIT, 18 ,"ooo-exit-diagonal-squares" }, - { css::presentation::EffectPresetClass::EXIT, 19 ,"ooo-exit-swivel" }, - { css::presentation::EffectPresetClass::EXIT, 20 ,"ooo-exit-wedge" }, - { css::presentation::EffectPresetClass::EXIT, 21 ,"ooo-exit-wheel" }, - { css::presentation::EffectPresetClass::EXIT, 22 ,"ooo-exit-wipe" }, - { css::presentation::EffectPresetClass::EXIT, 23 ,"ooo-exit-zoom" }, - { css::presentation::EffectPresetClass::EXIT, 24 ,"ooo-exit-random" }, - { css::presentation::EffectPresetClass::EXIT, 25 ,"ooo-exit-boomerang" }, - { css::presentation::EffectPresetClass::EXIT, 26 ,"ooo-exit-bounce" }, - { css::presentation::EffectPresetClass::EXIT, 27 ,"ooo-exit-colored-lettering" }, - { css::presentation::EffectPresetClass::EXIT, 28 ,"ooo-exit-movie-credits" }, - { css::presentation::EffectPresetClass::EXIT, 29 ,"ooo-exit-ease-out" }, - { css::presentation::EffectPresetClass::EXIT, 30 ,"ooo-exit-float" }, - { css::presentation::EffectPresetClass::EXIT, 31 ,"ooo-exit-turn-and-grow" }, - { css::presentation::EffectPresetClass::EXIT, 34 ,"ooo-exit-breaks" }, - { css::presentation::EffectPresetClass::EXIT, 35 ,"ooo-exit-pinwheel" }, - { css::presentation::EffectPresetClass::EXIT, 37 ,"ooo-exit-sink-down" }, - { css::presentation::EffectPresetClass::EXIT, 38 ,"ooo-exit-swish" }, - { css::presentation::EffectPresetClass::EXIT, 39 ,"ooo-exit-thread" }, - { css::presentation::EffectPresetClass::EXIT, 40 ,"ooo-exit-unfold" }, - { css::presentation::EffectPresetClass::EXIT, 41 ,"ooo-exit-whip" }, - { css::presentation::EffectPresetClass::EXIT, 42 ,"ooo-exit-descend" }, - { css::presentation::EffectPresetClass::EXIT, 43 ,"ooo-exit-center-revolve" }, - { css::presentation::EffectPresetClass::EXIT, 45 ,"ooo-exit-fade-out-and-swivel" }, - { css::presentation::EffectPresetClass::EXIT, 47 ,"ooo-exit-ascend" }, - { css::presentation::EffectPresetClass::EXIT, 48 ,"ooo-exit-sling" }, - { css::presentation::EffectPresetClass::EXIT, 53 ,"ooo-exit-fade-out-and-zoom" }, - { css::presentation::EffectPresetClass::EXIT, 55 ,"ooo-exit-contract" }, - { css::presentation::EffectPresetClass::EXIT, 49 ,"ooo-exit-spin-out" }, - { css::presentation::EffectPresetClass::EXIT, 50 ,"ooo-exit-stretchy" }, - { css::presentation::EffectPresetClass::EXIT, 51 ,"ooo-exit-magnify" }, - { css::presentation::EffectPresetClass::EXIT, 52 ,"ooo-exit-curve-down" }, - { css::presentation::EffectPresetClass::EXIT, 54 ,"ooo-exit-glide" }, - { css::presentation::EffectPresetClass::EXIT, 56 ,"ooo-exit-flip" }, - { css::presentation::EffectPresetClass::EXIT, 58 ,"ooo-exit-fold" }, - - { css::presentation::EffectPresetClass::MOTIONPATH, 16 ,"ooo-motionpath-4-point-star" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 5 ,"ooo-motionpath-5-point-star" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 11 ,"ooo-motionpath-6-point-star" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 17 ,"ooo-motionpath-8-point-star" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 1 ,"ooo-motionpath-circle" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 6 ,"ooo-motionpath-crescent-moon" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 3 ,"ooo-motionpath-diamond" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 13 ,"ooo-motionpath-equal-triangle" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 12 ,"ooo-motionpath-oval" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 9 ,"ooo-motionpath-heart" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 4 ,"ooo-motionpath-hexagon" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 10 ,"ooo-motionpath-octagon" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 14 ,"ooo-motionpath-parallelogram" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 15 ,"ooo-motionpath-pentagon" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 2 ,"ooo-motionpath-right-triangle" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 7 ,"ooo-motionpath-square" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 18 ,"ooo-motionpath-teardrop" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 8 ,"ooo-motionpath-trapezoid" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 37 ,"ooo-motionpath-arc-down" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 51 ,"ooo-motionpath-arc-left" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 58 ,"ooo-motionpath-arc-right" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 44 ,"ooo-motionpath-arc-up" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 41 ,"ooo-motionpath-bounce-left" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 54 ,"ooo-motionpath-bounce-right" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 48 ,"ooo-motionpath-curvy-left" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 61 ,"ooo-motionpath-curvy-right" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 60 ,"ooo-motionpath-decaying-wave" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 49 ,"ooo-motionpath-diagonal-down-right" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 56 ,"ooo-motionpath-diagonal-up-right" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 42 ,"ooo-motionpath-down" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 52 ,"ooo-motionpath-funnel" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 53 ,"ooo-motionpath-spring" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 62 ,"ooo-motionpath-stairs-down" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 50 ,"ooo-motionpath-turn-down" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 36 ,"ooo-motionpath-turn-down-right" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 43 ,"ooo-motionpath-turn-up" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 57 ,"ooo-motionpath-turn-up-right" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 64 ,"ooo-motionpath-up" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 47 ,"ooo-motionpath-wave" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 38 ,"ooo-motionpath-zigzag" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 31 ,"ooo-motionpath-bean" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 25 ,"ooo-motionpath-buzz-saw" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 20 ,"ooo-motionpath-curved-square" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 21 ,"ooo-motionpath-curved-x" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 23 ,"ooo-motionpath-curvy-star" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 28 ,"ooo-motionpath-figure-8-four" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 26 ,"ooo-motionpath-horizontal-figure-8" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 34 ,"ooo-motionpath-inverted-square" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 33 ,"ooo-motionpath-inverted-triangle" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 24 ,"ooo-motionpath-loop-de-loop" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 29 ,"ooo-motionpath-neutron" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 27 ,"ooo-motionpath-peanut" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 32 ,"ooo-motionpath-clover" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 19 ,"ooo-motionpath-pointy-star" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 30 ,"ooo-motionpath-swoosh" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 22 ,"ooo-motionpath-vertical-figure-8" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 35 ,"ooo-motionpath-left" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 63 ,"ooo-motionpath-right" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 55 ,"ooo-motionpath-spiral-left" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 46 ,"ooo-motionpath-spiral-right" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 40 ,"ooo-motionpath-sine-wave" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 59 ,"ooo-motionpath-s-curve-1" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 39 ,"ooo-motionpath-s-curve-2" }, - { css::presentation::EffectPresetClass::MOTIONPATH, 45 ,"ooo-motionpath-heartbeat" }, - - { 0,0,0 } + static const preset_maping aList[] = + { + { css::presentation::EffectPresetClass::ENTRANCE, 1 ,"ooo-entrance-appear" }, + { css::presentation::EffectPresetClass::ENTRANCE, 2 ,"ooo-entrance-fly-in" }, + { css::presentation::EffectPresetClass::ENTRANCE, 3 ,"ooo-entrance-venetian-blinds" }, + { css::presentation::EffectPresetClass::ENTRANCE, 4 ,"ooo-entrance-box" }, + { css::presentation::EffectPresetClass::ENTRANCE, 5 ,"ooo-entrance-checkerboard" }, + { css::presentation::EffectPresetClass::ENTRANCE, 6 ,"ooo-entrance-circle" }, + { css::presentation::EffectPresetClass::ENTRANCE, 7 ,"ooo-entrance-fly-in-slow" }, + { css::presentation::EffectPresetClass::ENTRANCE, 8 ,"ooo-entrance-diamond" }, + { css::presentation::EffectPresetClass::ENTRANCE, 9 ,"ooo-entrance-dissolve-in" }, + { css::presentation::EffectPresetClass::ENTRANCE, 10 ,"ooo-entrance-fade-in" }, + { css::presentation::EffectPresetClass::ENTRANCE, 11 ,"ooo-entrance-flash-once" }, + { css::presentation::EffectPresetClass::ENTRANCE, 12 ,"ooo-entrance-peek-in" }, + { css::presentation::EffectPresetClass::ENTRANCE, 13 ,"ooo-entrance-plus" }, + { css::presentation::EffectPresetClass::ENTRANCE, 14 ,"ooo-entrance-random-bars" }, + { css::presentation::EffectPresetClass::ENTRANCE, 15 ,"ooo-entrance-spiral-in" }, + { css::presentation::EffectPresetClass::ENTRANCE, 16 ,"ooo-entrance-split" }, + { css::presentation::EffectPresetClass::ENTRANCE, 17 ,"ooo-entrance-stretchy" }, + { css::presentation::EffectPresetClass::ENTRANCE, 18 ,"ooo-entrance-diagonal-squares" }, + { css::presentation::EffectPresetClass::ENTRANCE, 19 ,"ooo-entrance-swivel" }, + { css::presentation::EffectPresetClass::ENTRANCE, 20 ,"ooo-entrance-wedge" }, + { css::presentation::EffectPresetClass::ENTRANCE, 21 ,"ooo-entrance-wheel" }, + { css::presentation::EffectPresetClass::ENTRANCE, 22 ,"ooo-entrance-wipe" }, + { css::presentation::EffectPresetClass::ENTRANCE, 23 ,"ooo-entrance-zoom" }, + { css::presentation::EffectPresetClass::ENTRANCE, 24 ,"ooo-entrance-random" }, + { css::presentation::EffectPresetClass::ENTRANCE, 25 ,"ooo-entrance-boomerang" }, + { css::presentation::EffectPresetClass::ENTRANCE, 26 ,"ooo-entrance-bounce" }, + { css::presentation::EffectPresetClass::ENTRANCE, 27 ,"ooo-entrance-colored-lettering" }, + { css::presentation::EffectPresetClass::ENTRANCE, 28 ,"ooo-entrance-movie-credits" }, + { css::presentation::EffectPresetClass::ENTRANCE, 29 ,"ooo-entrance-ease-in" }, + { css::presentation::EffectPresetClass::ENTRANCE, 30 ,"ooo-entrance-float" }, + { css::presentation::EffectPresetClass::ENTRANCE, 31 ,"ooo-entrance-turn-and-grow" }, + { css::presentation::EffectPresetClass::ENTRANCE, 34 ,"ooo-entrance-breaks" }, + { css::presentation::EffectPresetClass::ENTRANCE, 35 ,"ooo-entrance-pinwheel" }, + { css::presentation::EffectPresetClass::ENTRANCE, 37 ,"ooo-entrance-rise-up" }, + { css::presentation::EffectPresetClass::ENTRANCE, 38 ,"ooo-entrance-falling-in" }, + { css::presentation::EffectPresetClass::ENTRANCE, 39 ,"ooo-entrance-thread" }, + { css::presentation::EffectPresetClass::ENTRANCE, 40 ,"ooo-entrance-unfold" }, + { css::presentation::EffectPresetClass::ENTRANCE, 41 ,"ooo-entrance-whip" }, + { css::presentation::EffectPresetClass::ENTRANCE, 42 ,"ooo-entrance-ascend" }, + { css::presentation::EffectPresetClass::ENTRANCE, 43 ,"ooo-entrance-center-revolve" }, + { css::presentation::EffectPresetClass::ENTRANCE, 45 ,"ooo-entrance-fade-in-and-swivel" }, + { css::presentation::EffectPresetClass::ENTRANCE, 47 ,"ooo-entrance-descend" }, + { css::presentation::EffectPresetClass::ENTRANCE, 48 ,"ooo-entrance-sling" }, + { css::presentation::EffectPresetClass::ENTRANCE, 49 ,"ooo-entrance-spin-in" }, + { css::presentation::EffectPresetClass::ENTRANCE, 50 ,"ooo-entrance-compress" }, + { css::presentation::EffectPresetClass::ENTRANCE, 51 ,"ooo-entrance-magnify" }, + { css::presentation::EffectPresetClass::ENTRANCE, 52 ,"ooo-entrance-curve-up" }, + { css::presentation::EffectPresetClass::ENTRANCE, 53 ,"ooo-entrance-fade-in-and-zoom" }, + { css::presentation::EffectPresetClass::ENTRANCE, 54 ,"ooo-entrance-glide" }, + { css::presentation::EffectPresetClass::ENTRANCE, 55 ,"ooo-entrance-expand" }, + { css::presentation::EffectPresetClass::ENTRANCE, 56 ,"ooo-entrance-flip" }, + { css::presentation::EffectPresetClass::ENTRANCE, 58 ,"ooo-entrance-fold" }, + { css::presentation::EffectPresetClass::EMPHASIS, 1 ,"ooo-emphasis-fill-color" }, + { css::presentation::EffectPresetClass::EMPHASIS, 2 ,"ooo-emphasis-font" }, + { css::presentation::EffectPresetClass::EMPHASIS, 3 ,"ooo-emphasis-font-color" }, + { css::presentation::EffectPresetClass::EMPHASIS, 4 ,"ooo-emphasis-font-size" }, + { css::presentation::EffectPresetClass::EMPHASIS, 5 ,"ooo-emphasis-font-style" }, + { css::presentation::EffectPresetClass::EMPHASIS, 6 ,"ooo-emphasis-grow-and-shrink" }, + { css::presentation::EffectPresetClass::EMPHASIS, 7 ,"ooo-emphasis-line-color" }, + { css::presentation::EffectPresetClass::EMPHASIS, 8 ,"ooo-emphasis-spin" }, + { css::presentation::EffectPresetClass::EMPHASIS, 9 ,"ooo-emphasis-transparency" }, + { css::presentation::EffectPresetClass::EMPHASIS, 10 ,"ooo-emphasis-bold-flash" }, + { css::presentation::EffectPresetClass::EMPHASIS, 14 ,"ooo-emphasis-blast" }, + { css::presentation::EffectPresetClass::EMPHASIS, 15 ,"ooo-emphasis-bold-reveal" }, + { css::presentation::EffectPresetClass::EMPHASIS, 16 ,"ooo-emphasis-color-over-by-word" }, + { css::presentation::EffectPresetClass::EMPHASIS, 18 ,"ooo-emphasis-reveal-underline" }, + { css::presentation::EffectPresetClass::EMPHASIS, 19 ,"ooo-emphasis-color-blend" }, + { css::presentation::EffectPresetClass::EMPHASIS, 20 ,"ooo-emphasis-color-over-by-letter" }, + { css::presentation::EffectPresetClass::EMPHASIS, 21 ,"ooo-emphasis-complementary-color" }, + { css::presentation::EffectPresetClass::EMPHASIS, 22 ,"ooo-emphasis-complementary-color-2" }, + { css::presentation::EffectPresetClass::EMPHASIS, 23 ,"ooo-emphasis-contrasting-color" }, + { css::presentation::EffectPresetClass::EMPHASIS, 24 ,"ooo-emphasis-darken" }, + { css::presentation::EffectPresetClass::EMPHASIS, 25 ,"ooo-emphasis-desaturate" }, + { css::presentation::EffectPresetClass::EMPHASIS, 26 ,"ooo-emphasis-flash-bulb" }, + { css::presentation::EffectPresetClass::EMPHASIS, 27 ,"ooo-emphasis-flicker" }, + { css::presentation::EffectPresetClass::EMPHASIS, 28 ,"ooo-emphasis-grow-with-color" }, + { css::presentation::EffectPresetClass::EMPHASIS, 30 ,"ooo-emphasis-lighten" }, + { css::presentation::EffectPresetClass::EMPHASIS, 31 ,"ooo-emphasis-style-emphasis" }, + { css::presentation::EffectPresetClass::EMPHASIS, 32 ,"ooo-emphasis-teeter" }, + { css::presentation::EffectPresetClass::EMPHASIS, 33 ,"ooo-emphasis-vertical-highlight" }, + { css::presentation::EffectPresetClass::EMPHASIS, 34 ,"ooo-emphasis-wave" }, + { css::presentation::EffectPresetClass::EMPHASIS, 35 ,"ooo-emphasis-blink" }, + { css::presentation::EffectPresetClass::EMPHASIS, 36 ,"ooo-emphasis-shimmer" }, + { css::presentation::EffectPresetClass::EXIT, 1 ,"ooo-exit-disappear" }, + { css::presentation::EffectPresetClass::EXIT, 2 ,"ooo-exit-fly-out" }, + { css::presentation::EffectPresetClass::EXIT, 3 ,"ooo-exit-venetian-blinds" }, + { css::presentation::EffectPresetClass::EXIT, 4 ,"ooo-exit-box" }, + { css::presentation::EffectPresetClass::EXIT, 5 ,"ooo-exit-checkerboard" }, + { css::presentation::EffectPresetClass::EXIT, 6 ,"ooo-exit-circle" }, + { css::presentation::EffectPresetClass::EXIT, 7 ,"ooo-exit-crawl-out" }, + { css::presentation::EffectPresetClass::EXIT, 8 ,"ooo-exit-diamond" }, + { css::presentation::EffectPresetClass::EXIT, 9 ,"ooo-exit-dissolve" }, + { css::presentation::EffectPresetClass::EXIT, 10 ,"ooo-exit-fade-out" }, + { css::presentation::EffectPresetClass::EXIT, 11 ,"ooo-exit-flash-once" }, + { css::presentation::EffectPresetClass::EXIT, 12 ,"ooo-exit-peek-out" }, + { css::presentation::EffectPresetClass::EXIT, 13 ,"ooo-exit-plus" }, + { css::presentation::EffectPresetClass::EXIT, 14 ,"ooo-exit-random-bars" }, + { css::presentation::EffectPresetClass::EXIT, 15 ,"ooo-exit-spiral-out" }, + { css::presentation::EffectPresetClass::EXIT, 16 ,"ooo-exit-split" }, + { css::presentation::EffectPresetClass::EXIT, 17 ,"ooo-exit-collapse" }, + { css::presentation::EffectPresetClass::EXIT, 18 ,"ooo-exit-diagonal-squares" }, + { css::presentation::EffectPresetClass::EXIT, 19 ,"ooo-exit-swivel" }, + { css::presentation::EffectPresetClass::EXIT, 20 ,"ooo-exit-wedge" }, + { css::presentation::EffectPresetClass::EXIT, 21 ,"ooo-exit-wheel" }, + { css::presentation::EffectPresetClass::EXIT, 22 ,"ooo-exit-wipe" }, + { css::presentation::EffectPresetClass::EXIT, 23 ,"ooo-exit-zoom" }, + { css::presentation::EffectPresetClass::EXIT, 24 ,"ooo-exit-random" }, + { css::presentation::EffectPresetClass::EXIT, 25 ,"ooo-exit-boomerang" }, + { css::presentation::EffectPresetClass::EXIT, 26 ,"ooo-exit-bounce" }, + { css::presentation::EffectPresetClass::EXIT, 27 ,"ooo-exit-colored-lettering" }, + { css::presentation::EffectPresetClass::EXIT, 28 ,"ooo-exit-movie-credits" }, + { css::presentation::EffectPresetClass::EXIT, 29 ,"ooo-exit-ease-out" }, + { css::presentation::EffectPresetClass::EXIT, 30 ,"ooo-exit-float" }, + { css::presentation::EffectPresetClass::EXIT, 31 ,"ooo-exit-turn-and-grow" }, + { css::presentation::EffectPresetClass::EXIT, 34 ,"ooo-exit-breaks" }, + { css::presentation::EffectPresetClass::EXIT, 35 ,"ooo-exit-pinwheel" }, + { css::presentation::EffectPresetClass::EXIT, 37 ,"ooo-exit-sink-down" }, + { css::presentation::EffectPresetClass::EXIT, 38 ,"ooo-exit-swish" }, + { css::presentation::EffectPresetClass::EXIT, 39 ,"ooo-exit-thread" }, + { css::presentation::EffectPresetClass::EXIT, 40 ,"ooo-exit-unfold" }, + { css::presentation::EffectPresetClass::EXIT, 41 ,"ooo-exit-whip" }, + { css::presentation::EffectPresetClass::EXIT, 42 ,"ooo-exit-descend" }, + { css::presentation::EffectPresetClass::EXIT, 43 ,"ooo-exit-center-revolve" }, + { css::presentation::EffectPresetClass::EXIT, 45 ,"ooo-exit-fade-out-and-swivel" }, + { css::presentation::EffectPresetClass::EXIT, 47 ,"ooo-exit-ascend" }, + { css::presentation::EffectPresetClass::EXIT, 48 ,"ooo-exit-sling" }, + { css::presentation::EffectPresetClass::EXIT, 53 ,"ooo-exit-fade-out-and-zoom" }, + { css::presentation::EffectPresetClass::EXIT, 55 ,"ooo-exit-contract" }, + { css::presentation::EffectPresetClass::EXIT, 49 ,"ooo-exit-spin-out" }, + { css::presentation::EffectPresetClass::EXIT, 50 ,"ooo-exit-stretchy" }, + { css::presentation::EffectPresetClass::EXIT, 51 ,"ooo-exit-magnify" }, + { css::presentation::EffectPresetClass::EXIT, 52 ,"ooo-exit-curve-down" }, + { css::presentation::EffectPresetClass::EXIT, 54 ,"ooo-exit-glide" }, + { css::presentation::EffectPresetClass::EXIT, 56 ,"ooo-exit-flip" }, + { css::presentation::EffectPresetClass::EXIT, 58 ,"ooo-exit-fold" }, + + { css::presentation::EffectPresetClass::MOTIONPATH, 16 ,"ooo-motionpath-4-point-star" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 5 ,"ooo-motionpath-5-point-star" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 11 ,"ooo-motionpath-6-point-star" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 17 ,"ooo-motionpath-8-point-star" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 1 ,"ooo-motionpath-circle" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 6 ,"ooo-motionpath-crescent-moon" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 3 ,"ooo-motionpath-diamond" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 13 ,"ooo-motionpath-equal-triangle" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 12 ,"ooo-motionpath-oval" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 9 ,"ooo-motionpath-heart" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 4 ,"ooo-motionpath-hexagon" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 10 ,"ooo-motionpath-octagon" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 14 ,"ooo-motionpath-parallelogram" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 15 ,"ooo-motionpath-pentagon" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 2 ,"ooo-motionpath-right-triangle" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 7 ,"ooo-motionpath-square" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 18 ,"ooo-motionpath-teardrop" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 8 ,"ooo-motionpath-trapezoid" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 37 ,"ooo-motionpath-arc-down" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 51 ,"ooo-motionpath-arc-left" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 58 ,"ooo-motionpath-arc-right" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 44 ,"ooo-motionpath-arc-up" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 41 ,"ooo-motionpath-bounce-left" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 54 ,"ooo-motionpath-bounce-right" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 48 ,"ooo-motionpath-curvy-left" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 61 ,"ooo-motionpath-curvy-right" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 60 ,"ooo-motionpath-decaying-wave" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 49 ,"ooo-motionpath-diagonal-down-right" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 56 ,"ooo-motionpath-diagonal-up-right" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 42 ,"ooo-motionpath-down" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 52 ,"ooo-motionpath-funnel" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 53 ,"ooo-motionpath-spring" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 62 ,"ooo-motionpath-stairs-down" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 50 ,"ooo-motionpath-turn-down" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 36 ,"ooo-motionpath-turn-down-right" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 43 ,"ooo-motionpath-turn-up" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 57 ,"ooo-motionpath-turn-up-right" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 64 ,"ooo-motionpath-up" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 47 ,"ooo-motionpath-wave" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 38 ,"ooo-motionpath-zigzag" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 31 ,"ooo-motionpath-bean" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 25 ,"ooo-motionpath-buzz-saw" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 20 ,"ooo-motionpath-curved-square" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 21 ,"ooo-motionpath-curved-x" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 23 ,"ooo-motionpath-curvy-star" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 28 ,"ooo-motionpath-figure-8-four" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 26 ,"ooo-motionpath-horizontal-figure-8" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 34 ,"ooo-motionpath-inverted-square" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 33 ,"ooo-motionpath-inverted-triangle" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 24 ,"ooo-motionpath-loop-de-loop" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 29 ,"ooo-motionpath-neutron" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 27 ,"ooo-motionpath-peanut" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 32 ,"ooo-motionpath-clover" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 19 ,"ooo-motionpath-pointy-star" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 30 ,"ooo-motionpath-swoosh" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 22 ,"ooo-motionpath-vertical-figure-8" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 35 ,"ooo-motionpath-left" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 63 ,"ooo-motionpath-right" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 55 ,"ooo-motionpath-spiral-left" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 46 ,"ooo-motionpath-spiral-right" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 40 ,"ooo-motionpath-sine-wave" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 59 ,"ooo-motionpath-s-curve-1" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 39 ,"ooo-motionpath-s-curve-2" }, + { css::presentation::EffectPresetClass::MOTIONPATH, 45 ,"ooo-motionpath-heartbeat" }, + + { 0,0,0 } + }; + + return aList; }; -// from sd/source/filter/ppt/pptinanimations.cxx -static OUString getConvertedSubType( sal_Int16 nPresetClass, sal_Int32 nPresetId, sal_Int32 nPresetSubType ) +OUString getConvertedSubType( sal_Int16 nPresetClass, sal_Int32 nPresetId, sal_Int32 nPresetSubType ) { const sal_Char* pStr = 0; @@ -334,7 +332,7 @@ static OUString getConvertedSubType( sal_Int16 nPresetClass, sal_Int32 nPresetId if( pStr == 0 ) { - const convert_subtype* p = gConvertArray; + const convert_subtype* p = convert_subtype::getList(); while( p->mpStrSubType ) { @@ -355,8 +353,6 @@ static OUString getConvertedSubType( sal_Int16 nPresetClass, sal_Int32 nPresetId return OUString::number( nPresetSubType ); } -// END - CommonTimeNodeContext::CommonTimeNodeContext( FragmentHandler2& rParent, sal_Int32 aElement, @@ -535,7 +531,7 @@ static OUString getConvertedSubType( sal_Int16 nPresetClass, sal_Int32 nPresetId if( attribs.hasAttribute( XML_presetID ) ) { sal_Int32 nPresetId = attribs.getInteger( XML_presetID, 0 ); - const preset_maping* p = gPresetMaping; + const preset_maping* p = preset_maping::getList(); while( p->mpStrPresetId && ((p->mnPresetClass != nEffectPresetClass) || (p->mnPresetId != nPresetId )) ) p++; diff --git a/oox/source/ppt/pptfilterhelpers.cxx b/oox/source/ppt/pptfilterhelpers.cxx index 76b158c..4979f5b 100644 --- a/oox/source/ppt/pptfilterhelpers.cxx +++ b/oox/source/ppt/pptfilterhelpers.cxx @@ -19,60 +19,94 @@ #include <com/sun/star/animations/TransitionType.hpp> #include <com/sun/star/animations/TransitionSubType.hpp> +#include <oox/ppt/pptfilterhelpers.hxx> #include <rtl/ustrbuf.hxx> -#include "pptfilterhelpers.hxx" namespace oox { namespace ppt { - // BEGIN CUT&PASTE from sd pptanimations.hxx + const ImplAttributeNameConversion *getAttributeConversionList() + { + static const ImplAttributeNameConversion aList[] = + { + { MS_PPT_X, "ppt_x", "X" }, + { MS_PPT_Y, "ppt_y", "Y" }, + { MS_PPT_W, "ppt_w", "Width" }, + { MS_PPT_H, "ppt_h", "Height" }, + { MS_PPT_C, "ppt_c", "DimColor" }, + { MS_R, "r", "Rotate" }, + { MS_XSHEAR, "xshear", "SkewX" }, + { MS_FILLCOLOR, "fillColor", "FillColor" }, + { MS_FILLCOLOR, "fillcolor", "FillColor" }, + { MS_FILLTYPE, "fill.type", "FillStyle" }, + { MS_STROKECOLOR, "stroke.color", "LineColor" }, + { MS_STROKEON, "stroke.on", "LineStyle" }, + { MS_STYLECOLOR, "style.color", "CharColor" }, + { MS_STYLEROTATION, "style.rotation", "Rotate" }, + { MS_FONTWEIGHT, "style.fontWeight", "CharWeight" }, + { MS_STYLEUNDERLINE, "style.textDecorationUnderline","CharUnderline" }, + { MS_STYLEFONTFAMILY, "style.fontFamily", "CharFontName" }, + { MS_STYLEFONTSIZE, "style.fontSize", "CharHeight" }, + { MS_STYLEFONTSTYLE, "style.fontStyle", "CharPosture" }, + { MS_STYLEVISIBILITY, "style.visibility", "Visibility" }, + { MS_STYLEOPACITY, "style.opacity", "Opacity" }, + { MS_UNKNOWN, NULL, NULL } + }; + + return aList; + } - static const transition gTransitions[] = + const transition* transition::getList() { - { "wipe(up)", css::animations::TransitionType::BARWIPE, css::animations::TransitionSubType::TOPTOBOTTOM, true }, - { "wipe(right)", css::animations::TransitionType::BARWIPE, css::animations::TransitionSubType::LEFTTORIGHT, false }, - { "wipe(left)", css::animations::TransitionType::BARWIPE, css::animations::TransitionSubType::LEFTTORIGHT, true }, - { "wipe(down)", css::animations::TransitionType::BARWIPE, css::animations::TransitionSubType::TOPTOBOTTOM, false }, - { "wheel(1)", css::animations::TransitionType::PINWHEELWIPE, css::animations::TransitionSubType::ONEBLADE, true }, - { "wheel(2)", css::animations::TransitionType::PINWHEELWIPE, css::animations::TransitionSubType::TWOBLADEVERTICAL, true }, - { "wheel(3)", css::animations::TransitionType::PINWHEELWIPE, css::animations::TransitionSubType::THREEBLADE, true }, - { "wheel(4)", css::animations::TransitionType::PINWHEELWIPE, css::animations::TransitionSubType::FOURBLADE, true }, - { "wheel(8)", css::animations::TransitionType::PINWHEELWIPE, css::animations::TransitionSubType::EIGHTBLADE, true }, - { "strips(downLeft)", css::animations::TransitionType::WATERFALLWIPE, css::animations::TransitionSubType::HORIZONTALRIGHT, true }, - { "strips(upLeft)", css::animations::TransitionType::WATERFALLWIPE, css::animations::TransitionSubType::HORIZONTALLEFT, false }, - { "strips(downRight)", css::animations::TransitionType::WATERFALLWIPE, css::animations::TransitionSubType::HORIZONTALLEFT, true }, - { "strips(upRight)", css::animations::TransitionType::WATERFALLWIPE, css::animations::TransitionSubType::HORIZONTALRIGHT, false }, - { "barn(inVertical)", css::animations::TransitionType::BARNDOORWIPE, css::animations::TransitionSubType::VERTICAL, false }, - { "barn(outVertical)", css::animations::TransitionType::BARNDOORWIPE, css::animations::TransitionSubType::VERTICAL, true }, - { "barn(inHorizontal)", css::animations::TransitionType::BARNDOORWIPE, css::animations::TransitionSubType::HORIZONTAL, false }, - { "barn(outHorizontal)", css::animations::TransitionType::BARNDOORWIPE, css::animations::TransitionSubType::HORIZONTAL, true }, - { "randombar(vertical)", css::animations::TransitionType::RANDOMBARWIPE, css::animations::TransitionSubType::VERTICAL, true}, - { "randombar(horizontal)", css::animations::TransitionType::RANDOMBARWIPE, css::animations::TransitionSubType::HORIZONTAL, true }, - { "checkerboard(down)", css::animations::TransitionType::CHECKERBOARDWIPE, css::animations::TransitionSubType::DOWN, true}, - { "checkerboard(across)", css::animations::TransitionType::CHECKERBOARDWIPE, css::animations::TransitionSubType::ACROSS, true }, - { "plus(out)", css::animations::TransitionType::FOURBOXWIPE, css::animations::TransitionSubType::CORNERSIN, false }, - { "plus(in)", css::animations::TransitionType::FOURBOXWIPE, css::animations::TransitionSubType::CORNERSIN, true }, - { "diamond(out)", css::animations::TransitionType::IRISWIPE, css::animations::TransitionSubType::DIAMOND, true }, - { "diamond(in)", css::animations::TransitionType::IRISWIPE, css::animations::TransitionSubType::DIAMOND, false }, - { "circle(out)", css::animations::TransitionType::ELLIPSEWIPE, css::animations::TransitionSubType::HORIZONTAL, true }, - { "circle(in)", css::animations::TransitionType::ELLIPSEWIPE, css::animations::TransitionSubType::HORIZONTAL, false }, - { "box(out)", css::animations::TransitionType::IRISWIPE, css::animations::TransitionSubType::RECTANGLE, true }, - { "box(in)", css::animations::TransitionType::IRISWIPE, css::animations::TransitionSubType::RECTANGLE, false }, - { "wedge", css::animations::TransitionType::FANWIPE, css::animations::TransitionSubType::CENTERTOP, true }, - { "blinds(vertical)", css::animations::TransitionType::BLINDSWIPE, css::animations::TransitionSubType::VERTICAL, true }, - { "blinds(horizontal)", css::animations::TransitionType::BLINDSWIPE, css::animations::TransitionSubType::HORIZONTAL, true }, - { "fade", css::animations::TransitionType::FADE, css::animations::TransitionSubType::CROSSFADE, true }, - { "slide(fromTop)", css::animations::TransitionType::SLIDEWIPE, css::animations::TransitionSubType::FROMTOP, true }, - { "slide(fromRight)", css::animations::TransitionType::SLIDEWIPE, css::animations::TransitionSubType::FROMRIGHT, true }, - { "slide(fromLeft)", css::animations::TransitionType::SLIDEWIPE, css::animations::TransitionSubType::FROMLEFT, true }, - { "slide(fromBottom)", css::animations::TransitionType::SLIDEWIPE, css::animations::TransitionSubType::FROMBOTTOM, true }, - { "dissolve", css::animations::TransitionType::DISSOLVE, css::animations::TransitionSubType::DEFAULT, true }, - { "image", css::animations::TransitionType::DISSOLVE, css::animations::TransitionSubType::DEFAULT, true }, // TODO - { NULL, 0, 0, false } - }; + static const transition aList[] = + { + { "wipe(up)", css::animations::TransitionType::BARWIPE, css::animations::TransitionSubType::TOPTOBOTTOM, true }, + { "wipe(right)", css::animations::TransitionType::BARWIPE, css::animations::TransitionSubType::LEFTTORIGHT, false }, + { "wipe(left)", css::animations::TransitionType::BARWIPE, css::animations::TransitionSubType::LEFTTORIGHT, true }, + { "wipe(down)", css::animations::TransitionType::BARWIPE, css::animations::TransitionSubType::TOPTOBOTTOM, false }, + { "wheel(1)", css::animations::TransitionType::PINWHEELWIPE, css::animations::TransitionSubType::ONEBLADE, true }, + { "wheel(2)", css::animations::TransitionType::PINWHEELWIPE, css::animations::TransitionSubType::TWOBLADEVERTICAL, true }, + { "wheel(3)", css::animations::TransitionType::PINWHEELWIPE, css::animations::TransitionSubType::THREEBLADE, true }, + { "wheel(4)", css::animations::TransitionType::PINWHEELWIPE, css::animations::TransitionSubType::FOURBLADE, true }, + { "wheel(8)", css::animations::TransitionType::PINWHEELWIPE, css::animations::TransitionSubType::EIGHTBLADE, true }, + { "strips(downLeft)", css::animations::TransitionType::WATERFALLWIPE, css::animations::TransitionSubType::HORIZONTALRIGHT, true }, + { "strips(upLeft)", css::animations::TransitionType::WATERFALLWIPE, css::animations::TransitionSubType::HORIZONTALLEFT, false }, + { "strips(downRight)", css::animations::TransitionType::WATERFALLWIPE, css::animations::TransitionSubType::HORIZONTALLEFT, true }, + { "strips(upRight)", css::animations::TransitionType::WATERFALLWIPE, css::animations::TransitionSubType::HORIZONTALRIGHT, false }, + { "barn(inVertical)", css::animations::TransitionType::BARNDOORWIPE, css::animations::TransitionSubType::VERTICAL, false }, + { "barn(outVertical)", css::animations::TransitionType::BARNDOORWIPE, css::animations::TransitionSubType::VERTICAL, true }, + { "barn(inHorizontal)", css::animations::TransitionType::BARNDOORWIPE, css::animations::TransitionSubType::HORIZONTAL, false }, + { "barn(outHorizontal)", css::animations::TransitionType::BARNDOORWIPE, css::animations::TransitionSubType::HORIZONTAL, true }, + { "randombar(vertical)", css::animations::TransitionType::RANDOMBARWIPE, css::animations::TransitionSubType::VERTICAL, true}, + { "randombar(horizontal)", css::animations::TransitionType::RANDOMBARWIPE, css::animations::TransitionSubType::HORIZONTAL, true }, + { "checkerboard(down)", css::animations::TransitionType::CHECKERBOARDWIPE, css::animations::TransitionSubType::DOWN, true}, + { "checkerboard(across)", css::animations::TransitionType::CHECKERBOARDWIPE, css::animations::TransitionSubType::ACROSS, true }, + { "plus(out)", css::animations::TransitionType::FOURBOXWIPE, css::animations::TransitionSubType::CORNERSIN, false }, + { "plus(in)", css::animations::TransitionType::FOURBOXWIPE, css::animations::TransitionSubType::CORNERSIN, true }, + { "diamond(out)", css::animations::TransitionType::IRISWIPE, css::animations::TransitionSubType::DIAMOND, true }, + { "diamond(in)", css::animations::TransitionType::IRISWIPE, css::animations::TransitionSubType::DIAMOND, false }, + { "circle(out)", css::animations::TransitionType::ELLIPSEWIPE, css::animations::TransitionSubType::HORIZONTAL, true }, + { "circle(in)", css::animations::TransitionType::ELLIPSEWIPE, css::animations::TransitionSubType::HORIZONTAL, false }, + { "box(out)", css::animations::TransitionType::IRISWIPE, css::animations::TransitionSubType::RECTANGLE, true }, + { "box(in)", css::animations::TransitionType::IRISWIPE, css::animations::TransitionSubType::RECTANGLE, false }, + { "wedge", css::animations::TransitionType::FANWIPE, css::animations::TransitionSubType::CENTERTOP, true }, + { "blinds(vertical)", css::animations::TransitionType::BLINDSWIPE, css::animations::TransitionSubType::VERTICAL, true }, + { "blinds(horizontal)", css::animations::TransitionType::BLINDSWIPE, css::animations::TransitionSubType::HORIZONTAL, true }, + { "fade", css::animations::TransitionType::FADE, css::animations::TransitionSubType::CROSSFADE, true }, + { "slide(fromTop)", css::animations::TransitionType::SLIDEWIPE, css::animations::TransitionSubType::FROMTOP, true }, + { "slide(fromRight)", css::animations::TransitionType::SLIDEWIPE, css::animations::TransitionSubType::FROMRIGHT, true }, + { "slide(fromLeft)", css::animations::TransitionType::SLIDEWIPE, css::animations::TransitionSubType::FROMLEFT, true }, + { "slide(fromBottom)", css::animations::TransitionType::SLIDEWIPE, css::animations::TransitionSubType::FROMBOTTOM, true }, + { "dissolve", css::animations::TransitionType::DISSOLVE, css::animations::TransitionSubType::DEFAULT, true }, + { "image", css::animations::TransitionType::DISSOLVE, css::animations::TransitionSubType::DEFAULT, true }, // TODO + { NULL, 0, 0, false } + }; + + return aList; + } const transition* transition::find( const OUString& rName ) { - const transition* p = gTransitions; + const transition* p = transition::getList(); while( p->mpName ) { @@ -85,107 +119,6 @@ namespace oox { namespace ppt { return NULL; } - bool convertMeasure( OUString& rString ) - { - bool bRet = false; - - /* here we want to substitute all occurrences of - * [#]ppt_[xyhw] with - * x,y,height and width respectively - */ - sal_Int32 nIndex = 0; - sal_Int32 nLastIndex = 0; - - nIndex = rString.indexOf("ppt_"); - // bail out early if there is no substitution to be made - if(nIndex >= 0) - { - OUStringBuffer sRes(rString.getLength()); - - do - { - // copy the non matching interval verbatim - if(nIndex > nLastIndex) - { - sRes.append(rString.getStr() + nLastIndex, (nIndex - nLastIndex)); - } - // we are searching for ppt_[xywh] so we need and extra char behind the match - if(nIndex + 4 < rString.getLength()) - { - switch(rString[nIndex + 4]) - { - case (sal_Unicode)'h': // we found ppt_h - // if it was #ppt_h we already copied the # - // which we do not want in the target, so remove it - if(nIndex && (rString[nIndex - 1] == (sal_Unicode)'#')) - { - sRes.remove(sRes.getLength() - 1, 1); - } - sRes.append("height"); - bRet = true; - break; - case (sal_Unicode)'w': - if(nIndex && (rString[nIndex - 1] == (sal_Unicode)'#')) - { - sRes.remove(sRes.getLength() - 1, 1); - } - sRes.append("width"); - bRet = true; - break; - case (sal_Unicode)'x': - if(nIndex && (rString[nIndex - 1] == (sal_Unicode)'#')) - { - sRes[sRes.getLength() - 1] = (sal_Unicode)'x'; - } - else - { - sRes.append('x'); - } - bRet = true; - break; - case (sal_Unicode)'y': - if(nIndex && (rString[nIndex - 1] == (sal_Unicode)'#')) - { - sRes[sRes.getLength() - 1] = (sal_Unicode)'y'; - } - else - { - sRes.append('y'); - } - bRet = true; - break; - default: - // this was ppt_ without an interesting thing after that - // just copy it verbatim - sRes.append("ppt_"); - // we are going to adjust for ppt_@ after the switch - // so compensate for the fact we did not really process - // an extra character after ppt_ - nIndex -= 1; - break; - } - } - else - { - sRes.append("ppt_"); - nIndex += 4; - nLastIndex = nIndex; - break; - } - nIndex += 5; - nLastIndex = nIndex; - } - while((nIndex = rString.indexOf("ppt_", nIndex)) > 0); - // copy the non matching tail if any - if(nLastIndex < rString.getLength()) - { - sRes.append(rString.getStr() + nLastIndex, rString.getLength() - nLastIndex ); - } - rString = sRes.makeStringAndClear(); - } - return bRet; - } - } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/source/ppt/pptfilterhelpers.hxx b/oox/source/ppt/pptfilterhelpers.hxx deleted file mode 100644 index 49327d6..0000000 --- a/oox/source/ppt/pptfilterhelpers.hxx +++ /dev/null @@ -1,91 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_OOX_SOURCE_PPT_PPTFILTERHELPERS_HXX -#define INCLUDED_OOX_SOURCE_PPT_PPTFILTERHELPERS_HXX - -#include <rtl/ustring.hxx> - -namespace oox { namespace ppt { - -//BEGIN CUT&PASTE from sd pptanimations.hxx - // conversion of MS to OOo attributes. - enum MS_AttributeNames - { - MS_PPT_X, MS_PPT_Y, MS_PPT_W, MS_PPT_H, MS_PPT_C, MS_R, MS_XSHEAR, MS_FILLCOLOR, MS_FILLTYPE, - MS_STROKECOLOR, MS_STROKEON, MS_STYLECOLOR, MS_STYLEROTATION, MS_FONTWEIGHT, - MS_STYLEUNDERLINE, MS_STYLEFONTFAMILY, MS_STYLEFONTSIZE, MS_STYLEFONTSTYLE, - MS_STYLEVISIBILITY, MS_STYLEOPACITY, MS_UNKNOWN - }; - - struct ImplAttributeNameConversion - { - MS_AttributeNames meAttribute; - const char* mpMSName; - const char* mpAPIName; - }; - - static const ImplAttributeNameConversion gImplConversionList[] = - { - { MS_PPT_X, "ppt_x", "X" }, - { MS_PPT_Y, "ppt_y", "Y" }, - { MS_PPT_W, "ppt_w", "Width" }, - { MS_PPT_H, "ppt_h", "Height" }, - { MS_PPT_C, "ppt_c", "DimColor" }, - { MS_R, "r", "Rotate" }, - { MS_XSHEAR, "xshear", "SkewX" }, - { MS_FILLCOLOR, "fillColor", "FillColor" }, - { MS_FILLCOLOR, "fillcolor", "FillColor" }, - { MS_FILLTYPE, "fill.type", "FillStyle" }, - { MS_STROKECOLOR, "stroke.color", "LineColor" }, - { MS_STROKEON, "stroke.on", "LineStyle" }, - { MS_STYLECOLOR, "style.color", "CharColor" }, - { MS_STYLEROTATION, "style.rotation", "Rotate" }, - { MS_FONTWEIGHT, "style.fontWeight", "CharWeight" }, - { MS_STYLEUNDERLINE, "style.textDecorationUnderline","CharUnderline" }, - { MS_STYLEFONTFAMILY, "style.fontFamily", "CharFontName" }, - { MS_STYLEFONTSIZE, "style.fontSize", "CharHeight" }, - { MS_STYLEFONTSTYLE, "style.fontStyle", "CharPosture" }, - { MS_STYLEVISIBILITY, "style.visibility", "Visibility" }, - { MS_STYLEOPACITY, "style.opacity", "Opacity" }, - { MS_UNKNOWN, NULL, NULL } - }; - //END CUT&PASTE - - // BEGIN CUT&PASTE from sd pptanimations.hxx - struct transition - { - const sal_Char* mpName; - sal_Int16 mnType; - sal_Int16 mnSubType; - bool mbDirection; // true: default geometric direction - - static const transition* find( const OUString& rName ); - }; - // END CUT&PASTE - - // BEGIN CUT&PASTE from sd pptinanimation.cxx - bool convertMeasure( OUString& rString ); - // END CUT&PASTE from sd pptinanimation.cxx - -} } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/source/ppt/slidetransition.cxx b/oox/source/ppt/slidetransition.cxx index 65889fd..754082d 100644 --- a/oox/source/ppt/slidetransition.cxx +++ b/oox/source/ppt/slidetransition.cxx @@ -31,7 +31,7 @@ #include "oox/helper/propertymap.hxx" #include "oox/token/namespaces.hxx" #include "oox/token/tokens.hxx" -#include "pptfilterhelpers.hxx" +#include <oox/ppt/pptfilterhelpers.hxx> using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; diff --git a/oox/source/ppt/timenode.cxx b/oox/source/ppt/timenode.cxx index bbf135e..149f7f0 100644 --- a/oox/source/ppt/timenode.cxx +++ b/oox/source/ppt/timenode.cxx @@ -39,6 +39,7 @@ #include "oox/helper/helper.hxx" #include "oox/core/xmlfilterbase.hxx" +#include <oox/ppt/pptfilterhelpers.hxx> #include "sal/log.hxx" using namespace ::oox::core; @@ -104,9 +105,7 @@ namespace oox { namespace ppt { { } -// BEGIN CUT&PASTE from sd/source/filter/ppt/pptinanimations.hxx - - static void fixMainSequenceTiming( const css::uno::Reference< css::animations::XAnimationNode >& xNode ) + void fixMainSequenceTiming( const css::uno::Reference< css::animations::XAnimationNode >& xNode ) { try { @@ -164,14 +163,13 @@ namespace oox { namespace ppt { } } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; SAL_INFO("oox.ppt","fixMainSequenceTiming(), exception caught!" ); } } - static void fixInteractiveSequenceTiming( const css::uno::Reference< css::animations::XAnimationNode >& xNode ) + void fixInteractiveSequenceTiming( const css::uno::Reference< css::animations::XAnimationNode >& xNode ) { try { @@ -188,15 +186,12 @@ namespace oox { namespace ppt { xClickNode->setBegin( aBegin ); } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; SAL_INFO("oox.ppt","fixInteractiveSequenceTiming(), exception caught!" ); } } -// END CUT&PASTE - void TimeNode::addNode( const XmlFilterBase& rFilter, const Reference< XAnimationNode >& rxNode, const SlidePersistPtr & pSlide ) { try { diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx index 095232d..4be6576 100644 --- a/sd/source/filter/eppt/pptexanimations.cxx +++ b/sd/source/filter/eppt/pptexanimations.cxx @@ -57,6 +57,7 @@ #include <rtl/ustrbuf.hxx> #include <vcl/vclenum.hxx> +#include <oox/ppt/pptfilterhelpers.hxx> #include <svx/svdotext.hxx> #include <editeng/outlobj.hxx> #include <editeng/editobj.hxx> @@ -95,7 +96,7 @@ void ImplTranslateAttribute( OUString& rString, const TranslateMode eTranslateMo { if ( ( eTranslateMode & TRANSLATE_VALUE ) || ( eTranslateMode & TRANSLATE_ATTRIBUTE ) ) { - const ImplAttributeNameConversion* p = gImplConversionList; + const oox::ppt::ImplAttributeNameConversion* p = oox::ppt::getAttributeConversionList(); while( p->mpAPIName ) { if( rString.equalsAscii( p->mpAPIName ) ) @@ -207,7 +208,7 @@ sal_uInt32 AnimationExporter::TranslatePresetSubType( const sal_uInt32 nPresetCl } if ( !bTranslated ) { - const convert_subtype* p = gConvertArray; + const oox::ppt::convert_subtype* p = oox::ppt::convert_subtype::getList(); while( p->mpStrSubType ) { if ( rPresetSubType.equalsAscii( p->mpStrSubType ) ) @@ -230,7 +231,7 @@ const sal_Char* AnimationExporter::FindTransitionName( const sal_Int16 nType, co const sal_Char* pRet = NULL; int nFit = 0; - const transition* p = gTransitions; + const oox::ppt::transition* p = oox::ppt::transition::getList(); while( p->mpName ) { int nF = 0; @@ -932,7 +933,7 @@ sal_uInt32 AnimationExporter::GetPresetID( const OUString& rPreset, sal_uInt32 n } else { - const preset_maping* p = gPresetMaping; + const oox::ppt::preset_maping* p = oox::ppt::preset_maping::getList(); while( p->mpStrPresetId && ((p->mnPresetClass != (sal_Int32)nAPIPresetClass) || !rPreset.equalsAscii( p->mpStrPresetId )) ) p++; diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 87f3f58..9fa5a97 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -1161,7 +1161,7 @@ void PowerPointExport::WriteAnimationNodeEffect( FSHelperPtr pFS, const Referenc Reference< XTransitionFilter > xFilter( rXNode, UNO_QUERY ); if ( xFilter.is() ) { - const char* pFilter = ppt::AnimationExporter::FindTransitionName( xFilter->getTransition(), xFilter->getSubtype(), xFilter->getDirection() ); + const char* pFilter = ::ppt::AnimationExporter::FindTransitionName( xFilter->getTransition(), xFilter->getSubtype(), xFilter->getDirection() ); const char* pDirection = xFilter->getDirection() ? "in" : "out"; pFS->startElementNS( XML_p, XML_animEffect, XML_filter, pFilter, diff --git a/sd/source/filter/ppt/pptanimations.hxx b/sd/source/filter/ppt/pptanimations.hxx index 06598f0..4d5696e 100644 --- a/sd/source/filter/ppt/pptanimations.hxx +++ b/sd/source/filter/ppt/pptanimations.hxx @@ -25,6 +25,8 @@ #include <com/sun/star/animations/TransitionSubType.hpp> #include <com/sun/star/presentation/EffectPresetClass.hpp> +#include <oox/ppt/pptfilterhelpers.hxx> + #include <map> #include <sal/types.h> @@ -166,21 +168,6 @@ public: css::uno::Any getProperty( sal_Int32 nProperty ) const; }; -enum MS_AttributeNames -{ - MS_PPT_X, MS_PPT_Y, MS_PPT_W, MS_PPT_H, MS_PPT_C, MS_R, MS_XSHEAR, MS_FILLCOLOR, MS_FILLTYPE, - MS_STROKECOLOR, MS_STROKEON, MS_STYLECOLOR, MS_STYLEROTATION, MS_FONTWEIGHT, - MS_STYLEUNDERLINE, MS_STYLEFONTFAMILY, MS_STYLEFONTSIZE, MS_STYLEFONTSTYLE, - MS_STYLEVISIBILITY, MS_STYLEOPACITY, MS_UNKNOWN -}; - -struct ImplAttributeNameConversion -{ - MS_AttributeNames meAttribute; - const char* mpMSName; - const char* mpAPIName; -}; - /** this atom is the first entry in each animation group */ struct AnimationNode { @@ -216,329 +203,6 @@ public: friend SvStream& WriteAnimationNode(SvStream& rOut, AnimationNode& rAtom); }; -static const ImplAttributeNameConversion gImplConversionList[] = -{ - { MS_PPT_X, "ppt_x", "X" }, - { MS_PPT_Y, "ppt_y", "Y" }, - { MS_PPT_W, "ppt_w", "Width" }, - { MS_PPT_H, "ppt_h", "Height" }, - { MS_PPT_C, "ppt_c", "DimColor" }, - { MS_R, "r", "Rotate" }, - { MS_XSHEAR, "xshear", "SkewX" }, - { MS_FILLCOLOR, "fillColor", "FillColor" }, - { MS_FILLCOLOR, "fillcolor", "FillColor" }, - { MS_FILLTYPE, "fill.type", "FillStyle" }, - { MS_STROKECOLOR, "stroke.color", "LineColor" }, - { MS_STROKEON, "stroke.on", "LineStyle" }, - { MS_STYLECOLOR, "style.color", "CharColor" }, - { MS_STYLEROTATION, "style.rotation", "Rotate" }, - { MS_FONTWEIGHT, "style.fontWeight", "CharWeight" }, - { MS_STYLEUNDERLINE, "style.textDecorationUnderline","CharUnderline" }, - { MS_STYLEFONTFAMILY, "style.fontFamily", "CharFontName" }, - { MS_STYLEFONTSIZE, "style.fontSize", "CharHeight" }, - { MS_STYLEFONTSTYLE, "style.fontStyle", "CharPosture" }, - { MS_STYLEVISIBILITY, "style.visibility", "Visibility" }, - { MS_STYLEOPACITY, "style.opacity", "Opacity" }, - { MS_UNKNOWN, NULL, NULL } -}; - -struct transition -{ - const sal_Char* mpName; - sal_Int16 mnType; - sal_Int16 mnSubType; - bool mbDirection; // true: default geometric direction - - static const transition* find( const OUString& rName ); -}; -static const transition gTransitions[] = -{ -{ "wipe(up)", css::animations::TransitionType::BARWIPE, css::animations::TransitionSubType::TOPTOBOTTOM, true }, -{ "wipe(right)", css::animations::TransitionType::BARWIPE, css::animations::TransitionSubType::LEFTTORIGHT, false }, -{ "wipe(left)", css::animations::TransitionType::BARWIPE, css::animations::TransitionSubType::LEFTTORIGHT, true }, -{ "wipe(down)", css::animations::TransitionType::BARWIPE, css::animations::TransitionSubType::TOPTOBOTTOM, false }, -{ "wheel(1)", css::animations::TransitionType::PINWHEELWIPE, css::animations::TransitionSubType::ONEBLADE, true }, -{ "wheel(2)", css::animations::TransitionType::PINWHEELWIPE, css::animations::TransitionSubType::TWOBLADEVERTICAL, true }, -{ "wheel(3)", css::animations::TransitionType::PINWHEELWIPE, css::animations::TransitionSubType::THREEBLADE, true }, -{ "wheel(4)", css::animations::TransitionType::PINWHEELWIPE, css::animations::TransitionSubType::FOURBLADE, true }, -{ "wheel(8)", css::animations::TransitionType::PINWHEELWIPE, css::animations::TransitionSubType::EIGHTBLADE, true }, -{ "strips(downLeft)", css::animations::TransitionType::WATERFALLWIPE, css::animations::TransitionSubType::HORIZONTALRIGHT, true }, -{ "strips(upLeft)", css::animations::TransitionType::WATERFALLWIPE, css::animations::TransitionSubType::HORIZONTALLEFT, false }, -{ "strips(downRight)", css::animations::TransitionType::WATERFALLWIPE, css::animations::TransitionSubType::HORIZONTALLEFT, true }, -{ "strips(upRight)", css::animations::TransitionType::WATERFALLWIPE, css::animations::TransitionSubType::HORIZONTALRIGHT, false }, -{ "barn(inVertical)", css::animations::TransitionType::BARNDOORWIPE, css::animations::TransitionSubType::VERTICAL, false }, -{ "barn(outVertical)", css::animations::TransitionType::BARNDOORWIPE, css::animations::TransitionSubType::VERTICAL, true }, -{ "barn(inHorizontal)", css::animations::TransitionType::BARNDOORWIPE, css::animations::TransitionSubType::HORIZONTAL, false }, -{ "barn(outHorizontal)", css::animations::TransitionType::BARNDOORWIPE, css::animations::TransitionSubType::HORIZONTAL, true }, -{ "randombar(vertical)", css::animations::TransitionType::RANDOMBARWIPE, css::animations::TransitionSubType::VERTICAL, true}, -{ "randombar(horizontal)", css::animations::TransitionType::RANDOMBARWIPE, css::animations::TransitionSubType::HORIZONTAL, true }, -{ "checkerboard(down)", css::animations::TransitionType::CHECKERBOARDWIPE, css::animations::TransitionSubType::DOWN, true}, -{ "checkerboard(across)", css::animations::TransitionType::CHECKERBOARDWIPE, css::animations::TransitionSubType::ACROSS, true }, -{ "plus(out)", css::animations::TransitionType::FOURBOXWIPE, css::animations::TransitionSubType::CORNERSIN, false }, -{ "plus(in)", css::animations::TransitionType::FOURBOXWIPE, css::animations::TransitionSubType::CORNERSIN, true }, -{ "diamond(out)", css::animations::TransitionType::IRISWIPE, css::animations::TransitionSubType::DIAMOND, true }, -{ "diamond(in)", css::animations::TransitionType::IRISWIPE, css::animations::TransitionSubType::DIAMOND, false }, -{ "circle(out)", css::animations::TransitionType::ELLIPSEWIPE, css::animations::TransitionSubType::HORIZONTAL, true }, -{ "circle(in)", css::animations::TransitionType::ELLIPSEWIPE, css::animations::TransitionSubType::HORIZONTAL, false }, -{ "box(out)", css::animations::TransitionType::IRISWIPE, css::animations::TransitionSubType::RECTANGLE, true }, -{ "box(in)", css::animations::TransitionType::IRISWIPE, css::animations::TransitionSubType::RECTANGLE, false }, -{ "wedge", css::animations::TransitionType::FANWIPE, css::animations::TransitionSubType::CENTERTOP, true }, -{ "blinds(vertical)", css::animations::TransitionType::BLINDSWIPE, css::animations::TransitionSubType::VERTICAL, true }, -{ "blinds(horizontal)", css::animations::TransitionType::BLINDSWIPE, css::animations::TransitionSubType::HORIZONTAL, true }, -{ "fade", css::animations::TransitionType::FADE, css::animations::TransitionSubType::CROSSFADE, true }, -{ "slide(fromTop)", css::animations::TransitionType::SLIDEWIPE, css::animations::TransitionSubType::FROMTOP, true }, -{ "slide(fromRight)", css::animations::TransitionType::SLIDEWIPE, css::animations::TransitionSubType::FROMRIGHT, true }, -{ "slide(fromLeft)", css::animations::TransitionType::SLIDEWIPE, css::animations::TransitionSubType::FROMLEFT, true }, -{ "slide(fromBottom)", css::animations::TransitionType::SLIDEWIPE, css::animations::TransitionSubType::FROMBOTTOM, true }, -{ "dissolve", css::animations::TransitionType::DISSOLVE, css::animations::TransitionSubType::DEFAULT, true }, -{ "image", css::animations::TransitionType::DISSOLVE, css::animations::TransitionSubType::DEFAULT, true }, // TODO -{ NULL, 0, 0, false } -}; - -struct convert_subtype -{ - sal_Int32 mnID; - const sal_Char* mpStrSubType; -}; -static const convert_subtype gConvertArray[] = -{ - // fly in - { 1, "from-top" }, - { 2, "from-right" }, - { 3, "from-top-right" }, - { 4, "from-bottom" }, - { 5, "horizontal" }, - { 6, "from-bottom-right" }, - { 8, "from-left" }, - { 9, "from-top-left" }, - { 10, "vertical" }, - { 12, "from-bottom-left" }, - { 16, "in" }, - { 21, "vertical-in" }, - { 26, "horizontal-in" }, - { 32, "out" }, - { 36, "out-from-screen-center" }, - { 37, "vertical-out" }, - { 42, "horizontal-out" }, - { 272, "in-slightly" }, - { 288, "out-slightly" }, - { 528, "in-from-screen-center" }, - { 0, 0 } -}; - -struct preset_maping -{ - sal_Int32 mnPresetClass; - sal_Int32 mnPresetId; - const sal_Char* mpStrPresetId; -}; - -static const preset_maping gPresetMaping[] = -{ - { css::presentation::EffectPresetClass::ENTRANCE, 1 ,"ooo-entrance-appear" }, - { css::presentation::EffectPresetClass::ENTRANCE, 2 ,"ooo-entrance-fly-in" }, - { css::presentation::EffectPresetClass::ENTRANCE, 3 ,"ooo-entrance-venetian-blinds" }, - { css::presentation::EffectPresetClass::ENTRANCE, 4 ,"ooo-entrance-box" }, - { css::presentation::EffectPresetClass::ENTRANCE, 5 ,"ooo-entrance-checkerboard" }, - { css::presentation::EffectPresetClass::ENTRANCE, 6 ,"ooo-entrance-circle" }, - { css::presentation::EffectPresetClass::ENTRANCE, 7 ,"ooo-entrance-fly-in-slow" }, - { css::presentation::EffectPresetClass::ENTRANCE, 8 ,"ooo-entrance-diamond" }, - { css::presentation::EffectPresetClass::ENTRANCE, 9 ,"ooo-entrance-dissolve-in" }, - { css::presentation::EffectPresetClass::ENTRANCE, 10 ,"ooo-entrance-fade-in" }, - { css::presentation::EffectPresetClass::ENTRANCE, 11 ,"ooo-entrance-flash-once" }, - { css::presentation::EffectPresetClass::ENTRANCE, 12 ,"ooo-entrance-peek-in" }, - { css::presentation::EffectPresetClass::ENTRANCE, 13 ,"ooo-entrance-plus" }, - { css::presentation::EffectPresetClass::ENTRANCE, 14 ,"ooo-entrance-random-bars" }, - { css::presentation::EffectPresetClass::ENTRANCE, 15 ,"ooo-entrance-spiral-in" }, - { css::presentation::EffectPresetClass::ENTRANCE, 16 ,"ooo-entrance-split" }, - { css::presentation::EffectPresetClass::ENTRANCE, 17 ,"ooo-entrance-stretchy" }, - { css::presentation::EffectPresetClass::ENTRANCE, 18 ,"ooo-entrance-diagonal-squares" }, - { css::presentation::EffectPresetClass::ENTRANCE, 19 ,"ooo-entrance-swivel" }, - { css::presentation::EffectPresetClass::ENTRANCE, 20 ,"ooo-entrance-wedge" }, - { css::presentation::EffectPresetClass::ENTRANCE, 21 ,"ooo-entrance-wheel" }, - { css::presentation::EffectPresetClass::ENTRANCE, 22 ,"ooo-entrance-wipe" }, - { css::presentation::EffectPresetClass::ENTRANCE, 23 ,"ooo-entrance-zoom" }, - { css::presentation::EffectPresetClass::ENTRANCE, 24 ,"ooo-entrance-random" }, - { css::presentation::EffectPresetClass::ENTRANCE, 25 ,"ooo-entrance-boomerang" }, - { css::presentation::EffectPresetClass::ENTRANCE, 26 ,"ooo-entrance-bounce" }, - { css::presentation::EffectPresetClass::ENTRANCE, 27 ,"ooo-entrance-colored-lettering" }, - { css::presentation::EffectPresetClass::ENTRANCE, 28 ,"ooo-entrance-movie-credits" }, - { css::presentation::EffectPresetClass::ENTRANCE, 29 ,"ooo-entrance-ease-in" }, - { css::presentation::EffectPresetClass::ENTRANCE, 30 ,"ooo-entrance-float" }, - { css::presentation::EffectPresetClass::ENTRANCE, 31 ,"ooo-entrance-turn-and-grow" }, - { css::presentation::EffectPresetClass::ENTRANCE, 34 ,"ooo-entrance-breaks" }, - { css::presentation::EffectPresetClass::ENTRANCE, 35 ,"ooo-entrance-pinwheel" }, - { css::presentation::EffectPresetClass::ENTRANCE, 37 ,"ooo-entrance-rise-up" }, - { css::presentation::EffectPresetClass::ENTRANCE, 38 ,"ooo-entrance-falling-in" }, - { css::presentation::EffectPresetClass::ENTRANCE, 39 ,"ooo-entrance-thread" }, - { css::presentation::EffectPresetClass::ENTRANCE, 40 ,"ooo-entrance-unfold" }, - { css::presentation::EffectPresetClass::ENTRANCE, 41 ,"ooo-entrance-whip" }, - { css::presentation::EffectPresetClass::ENTRANCE, 42 ,"ooo-entrance-ascend" }, - { css::presentation::EffectPresetClass::ENTRANCE, 43 ,"ooo-entrance-center-revolve" }, - { css::presentation::EffectPresetClass::ENTRANCE, 45 ,"ooo-entrance-fade-in-and-swivel" }, - { css::presentation::EffectPresetClass::ENTRANCE, 47 ,"ooo-entrance-descend" }, - { css::presentation::EffectPresetClass::ENTRANCE, 48 ,"ooo-entrance-sling" }, - { css::presentation::EffectPresetClass::ENTRANCE, 49 ,"ooo-entrance-spin-in" }, - { css::presentation::EffectPresetClass::ENTRANCE, 50 ,"ooo-entrance-compress" }, - { css::presentation::EffectPresetClass::ENTRANCE, 51 ,"ooo-entrance-magnify" }, - { css::presentation::EffectPresetClass::ENTRANCE, 52 ,"ooo-entrance-curve-up" }, - { css::presentation::EffectPresetClass::ENTRANCE, 53 ,"ooo-entrance-fade-in-and-zoom" }, - { css::presentation::EffectPresetClass::ENTRANCE, 54 ,"ooo-entrance-glide" }, - { css::presentation::EffectPresetClass::ENTRANCE, 55 ,"ooo-entrance-expand" }, - { css::presentation::EffectPresetClass::ENTRANCE, 56 ,"ooo-entrance-flip" }, - { css::presentation::EffectPresetClass::ENTRANCE, 58 ,"ooo-entrance-fold" }, - { css::presentation::EffectPresetClass::EMPHASIS, 1 ,"ooo-emphasis-fill-color" }, - { css::presentation::EffectPresetClass::EMPHASIS, 2 ,"ooo-emphasis-font" }, - { css::presentation::EffectPresetClass::EMPHASIS, 3 ,"ooo-emphasis-font-color" }, - { css::presentation::EffectPresetClass::EMPHASIS, 4 ,"ooo-emphasis-font-size" }, - { css::presentation::EffectPresetClass::EMPHASIS, 5 ,"ooo-emphasis-font-style" }, - { css::presentation::EffectPresetClass::EMPHASIS, 6 ,"ooo-emphasis-grow-and-shrink" }, - { css::presentation::EffectPresetClass::EMPHASIS, 7 ,"ooo-emphasis-line-color" }, - { css::presentation::EffectPresetClass::EMPHASIS, 8 ,"ooo-emphasis-spin" }, - { css::presentation::EffectPresetClass::EMPHASIS, 9 ,"ooo-emphasis-transparency" }, - { css::presentation::EffectPresetClass::EMPHASIS, 10 ,"ooo-emphasis-bold-flash" }, - { css::presentation::EffectPresetClass::EMPHASIS, 14 ,"ooo-emphasis-blast" }, - { css::presentation::EffectPresetClass::EMPHASIS, 15 ,"ooo-emphasis-bold-reveal" }, - { css::presentation::EffectPresetClass::EMPHASIS, 16 ,"ooo-emphasis-color-over-by-word" }, - { css::presentation::EffectPresetClass::EMPHASIS, 18 ,"ooo-emphasis-reveal-underline" }, - { css::presentation::EffectPresetClass::EMPHASIS, 19 ,"ooo-emphasis-color-blend" }, - { css::presentation::EffectPresetClass::EMPHASIS, 20 ,"ooo-emphasis-color-over-by-letter" }, - { css::presentation::EffectPresetClass::EMPHASIS, 21 ,"ooo-emphasis-complementary-color" }, - { css::presentation::EffectPresetClass::EMPHASIS, 22 ,"ooo-emphasis-complementary-color-2" }, - { css::presentation::EffectPresetClass::EMPHASIS, 23 ,"ooo-emphasis-contrasting-color" }, - { css::presentation::EffectPresetClass::EMPHASIS, 24 ,"ooo-emphasis-darken" }, - { css::presentation::EffectPresetClass::EMPHASIS, 25 ,"ooo-emphasis-desaturate" }, - { css::presentation::EffectPresetClass::EMPHASIS, 26 ,"ooo-emphasis-flash-bulb" }, - { css::presentation::EffectPresetClass::EMPHASIS, 27 ,"ooo-emphasis-flicker" }, - { css::presentation::EffectPresetClass::EMPHASIS, 28 ,"ooo-emphasis-grow-with-color" }, - { css::presentation::EffectPresetClass::EMPHASIS, 30 ,"ooo-emphasis-lighten" }, - { css::presentation::EffectPresetClass::EMPHASIS, 31 ,"ooo-emphasis-style-emphasis" }, - { css::presentation::EffectPresetClass::EMPHASIS, 32 ,"ooo-emphasis-teeter" }, - { css::presentation::EffectPresetClass::EMPHASIS, 33 ,"ooo-emphasis-vertical-highlight" }, - { css::presentation::EffectPresetClass::EMPHASIS, 34 ,"ooo-emphasis-wave" }, - { css::presentation::EffectPresetClass::EMPHASIS, 35 ,"ooo-emphasis-blink" }, - { css::presentation::EffectPresetClass::EMPHASIS, 36 ,"ooo-emphasis-shimmer" }, - { css::presentation::EffectPresetClass::EXIT, 1 ,"ooo-exit-disappear" }, - { css::presentation::EffectPresetClass::EXIT, 2 ,"ooo-exit-fly-out" }, - { css::presentation::EffectPresetClass::EXIT, 3 ,"ooo-exit-venetian-blinds" }, - { css::presentation::EffectPresetClass::EXIT, 4 ,"ooo-exit-box" }, - { css::presentation::EffectPresetClass::EXIT, 5 ,"ooo-exit-checkerboard" }, - { css::presentation::EffectPresetClass::EXIT, 6 ,"ooo-exit-circle" }, - { css::presentation::EffectPresetClass::EXIT, 7 ,"ooo-exit-crawl-out" }, - { css::presentation::EffectPresetClass::EXIT, 8 ,"ooo-exit-diamond" }, - { css::presentation::EffectPresetClass::EXIT, 9 ,"ooo-exit-dissolve" }, - { css::presentation::EffectPresetClass::EXIT, 10 ,"ooo-exit-fade-out" }, - { css::presentation::EffectPresetClass::EXIT, 11 ,"ooo-exit-flash-once" }, - { css::presentation::EffectPresetClass::EXIT, 12 ,"ooo-exit-peek-out" }, - { css::presentation::EffectPresetClass::EXIT, 13 ,"ooo-exit-plus" }, - { css::presentation::EffectPresetClass::EXIT, 14 ,"ooo-exit-random-bars" }, - { css::presentation::EffectPresetClass::EXIT, 15 ,"ooo-exit-spiral-out" }, - { css::presentation::EffectPresetClass::EXIT, 16 ,"ooo-exit-split" }, - { css::presentation::EffectPresetClass::EXIT, 17 ,"ooo-exit-collapse" }, - { css::presentation::EffectPresetClass::EXIT, 18 ,"ooo-exit-diagonal-squares" }, - { css::presentation::EffectPresetClass::EXIT, 19 ,"ooo-exit-swivel" }, - { css::presentation::EffectPresetClass::EXIT, 20 ,"ooo-exit-wedge" }, - { css::presentation::EffectPresetClass::EXIT, 21 ,"ooo-exit-wheel" }, - { css::presentation::EffectPresetClass::EXIT, 22 ,"ooo-exit-wipe" }, ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits