summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2015-10-29 15:18:19 +0200
committerTor Lillqvist <tml@collabora.com>2015-10-29 15:41:21 +0200
commit93e2e45e497bd55cd0fa0502a618d5326ce382b0 (patch)
tree0c3ef0b47044227dc6ed05027410d48c67368815 /sd/source
parent326b21356784a382a3880835f5f24353730e4e30 (diff)
Too much copy pasta is not good for you
Change-Id: Ie5a3cddd6fcf9d1a763284c1aea0fca579da4f8d
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/filter/eppt/pptexanimations.cxx9
-rw-r--r--sd/source/filter/eppt/pptx-epptooxml.cxx2
-rw-r--r--sd/source/filter/ppt/pptanimations.hxx340
-rw-r--r--sd/source/filter/ppt/pptinanimations.cxx255
-rw-r--r--sd/source/filter/ppt/pptinanimations.hxx5
5 files changed, 39 insertions, 572 deletions
diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx
index 095232db72fc..4be6576f995d 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 87f3f5815a62..9fa5a976b9b4 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 06598f04b706..4d5696e53c93 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" },
- { 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 }
-};
-
} // namespace ppt
#endif
diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx
index 13a7708b6aa4..403f04f03070 100644
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -54,6 +54,7 @@
#include <com/sun/star/presentation/ParagraphTarget.hpp>
#include <com/sun/star/presentation/TextAnimationType.hpp>
#include <comphelper/processfactory.hxx>
+#include <oox/helper/addtosequence.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/math.hxx>
@@ -83,21 +84,6 @@ using namespace ::com::sun::star::presentation;
namespace ppt
{
-const transition* transition::find( const OUString& rName )
-{
- const transition* p = gTransitions;
-
- while( p->mpName )
- {
- if( rName.equalsAscii( p->mpName ) )
- return p;
-
- p++;
- }
-
- return NULL;
-}
-
SvStream& operator>>(SvStream& rIn, AnimationNode& rNode )
{
rIn.ReadInt32( rNode.mnU1 );
@@ -161,41 +147,6 @@ Any PropertySet::getProperty( sal_Int32 nProperty ) const
return Any();
}
-/** 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 );
- }
-}
-
AnimationImporter::AnimationImporter( ImplSdPPTImport* pPPTImport, SvStream& rStCtrl )
: mpPPTImport( pPPTImport ), mrStCtrl( rStCtrl )
{
@@ -443,10 +394,10 @@ int AnimationImporter::importAnimationContainer( const Atom* pAtom, const Refere
switch(nPPTNodeType)
{
case DFF_ANIM_NODE_TYPE_MAIN_SEQUENCE:
- fixMainSequenceTiming( xNode );
+ oox::ppt::fixMainSequenceTiming( xNode );
break;
case DFF_ANIM_NODE_TYPE_INTERACTIVE_SEQ:
- fixInteractiveSequenceTiming( xNode );
+ oox::ppt::fixInteractiveSequenceTiming( xNode );
break;
}
}
@@ -545,93 +496,6 @@ int AnimationImporter::importAnimationContainer( const Atom* pAtom, const Refere
return nNodes;
}
-void AnimationImporter::fixMainSequenceTiming( const css::uno::Reference< css::animations::XAnimationNode >& xNode )
-{
- try
- {
- bool bFirst = true;
- Reference< XEnumerationAccess > xEA( xNode, UNO_QUERY_THROW );
- Reference< XEnumeration > xE( xEA->createEnumeration(), UNO_QUERY_THROW );
- while( xE->hasMoreElements() )
- {
- // click node
- Reference< XAnimationNode > xClickNode( xE->nextElement(), UNO_QUERY );
-
- Event aEvent;
- aEvent.Trigger = EventTrigger::ON_NEXT;
- aEvent.Repeat = 0;
- xClickNode->setBegin( makeAny( aEvent ) );
-
- if( bFirst )
- {
- bFirst = false;
- Reference< XEnumerationAccess > xEA2( xClickNode, UNO_QUERY_THROW );
- Reference< XEnumeration > xE2( xEA2->createEnumeration(), UNO_QUERY_THROW );
- if( xE2->hasMoreElements() )
- {
- // with node
- xE2->nextElement() >>= xEA2;
- if( xEA2.is() )
- xE2.set(xEA2->createEnumeration(), css::uno::UNO_QUERY);
- else
- xE2.clear();
-
- if( xE2.is() && xE2->hasMoreElements() )
- {
- Reference< XAnimationNode > xEffectNode( xE2->nextElement(), UNO_QUERY_THROW );
- const Sequence< NamedValue > aUserData( xEffectNode->getUserData() );
- const NamedValue* p = aUserData.getConstArray();
- sal_Int32 nLength = aUserData.getLength();
- while( nLength-- )
- {
- if ( p->Name == "node-type" )
- {
- sal_Int16 nNodeType = 0;
- p->Value >>= nNodeType;
- if( nNodeType != css::presentation::EffectNodeType::ON_CLICK )
- {
- // first effect does not start on click, so correct
- // first click nodes begin to 0s
- xClickNode->setBegin( makeAny( (double)0.0 ) );
- break;
- }
- }
- p++;
- }
- }
- }
- }
- }
- }
- catch( Exception& )
- {
- OSL_FAIL("sd::AnimationImporter::fixMainSequenceTiming(), exception caught!" );
- }
-}
-
-void AnimationImporter::fixInteractiveSequenceTiming( const css::uno::Reference< css::animations::XAnimationNode >& xNode )
-{
- try
- {
- Any aBegin( xNode->getBegin() );
- Any aEmpty;
- xNode->setBegin( aEmpty );
-
- Reference< XEnumerationAccess > xEA( xNode, UNO_QUERY_THROW );
- Reference< XEnumeration > xE( xEA->createEnumeration(), UNO_QUERY_THROW );
- while( xE->hasMoreElements() )
- {
- // click node
- Reference< XAnimationNode > xClickNode( xE->nextElement(), UNO_QUERY );
- xClickNode->setBegin( aBegin );
- }
- }
- catch( Exception& )
- {
- OSL_FAIL("sd::AnimationImporter::fixInteractiveSequenceTiming(), exception caught!" );
- }
-}
-
bool AnimationImporter::convertAnimationNode( const Reference< XAnimationNode >& xNode, const Reference< XAnimationNode >& xParent )
{
Reference< XAnimate > xAnimate( xNode, UNO_QUERY );
@@ -651,9 +515,9 @@ bool AnimationImporter::convertAnimationNode( const Reference< XAnimationNode >&
if( (nNodeType == AnimationNodeType::SET) && aAttributeName == "fill.on" )
return false;
- const ImplAttributeNameConversion* p = gImplConversionList;
+ const oox::ppt::ImplAttributeNameConversion* p = oox::ppt::getAttributeConversionList();
- MS_AttributeNames eAttribute = MS_UNKNOWN;
+ oox::ppt::MS_AttributeNames eAttribute = oox::ppt::MS_UNKNOWN;
if( (nNodeType == AnimationNodeType::ANIMATEMOTION) ||
(nNodeType == AnimationNodeType::ANIMATETRANSFORM) )
@@ -683,7 +547,7 @@ bool AnimationImporter::convertAnimationNode( const Reference< XAnimationNode >&
xAnimate->setAttributeName( aAttributeName );
- if( eAttribute != MS_UNKNOWN )
+ if( eAttribute != oox::ppt::MS_UNKNOWN )
{
Any aAny( xAnimate->getFrom() );
if( aAny.hasValue() )
@@ -797,15 +661,15 @@ static int lcl_gethex( int nChar )
return 0;
}
-bool AnimationImporter::convertAnimationValue( MS_AttributeNames eAttribute, Any& rValue )
+bool AnimationImporter::convertAnimationValue( oox::ppt::MS_AttributeNames eAttribute, Any& rValue )
{
bool bRet = false;
switch( eAttribute )
{
- case MS_PPT_X:
- case MS_PPT_Y:
- case MS_PPT_W:
- case MS_PPT_H:
+ case oox::ppt::MS_PPT_X:
+ case oox::ppt::MS_PPT_Y:
+ case oox::ppt::MS_PPT_W:
+ case oox::ppt::MS_PPT_H:
{
OUString aString;
@@ -846,8 +710,8 @@ bool AnimationImporter::convertAnimationValue( MS_AttributeNames eAttribute, Any
}
break;
- case MS_XSHEAR:
- case MS_R:
+ case oox::ppt::MS_XSHEAR:
+ case oox::ppt::MS_R:
{
OUString aString;
if( rValue >>= aString )
@@ -858,7 +722,7 @@ bool AnimationImporter::convertAnimationValue( MS_AttributeNames eAttribute, Any
}
break;
- case MS_STYLEROTATION:
+ case oox::ppt::MS_STYLEROTATION:
{
if( rValue.getValueType() == cppu::UnoType<OUString>::get() )
{
@@ -877,10 +741,10 @@ bool AnimationImporter::convertAnimationValue( MS_AttributeNames eAttribute, Any
}
break;
- case MS_FILLCOLOR:
- case MS_STROKECOLOR:
- case MS_STYLECOLOR:
- case MS_PPT_C:
+ case oox::ppt::MS_FILLCOLOR:
+ case oox::ppt::MS_STROKECOLOR:
+ case oox::ppt::MS_STYLECOLOR:
+ case oox::ppt::MS_PPT_C:
{
OUString aString;
if( rValue >>= aString )
@@ -925,7 +789,7 @@ bool AnimationImporter::convertAnimationValue( MS_AttributeNames eAttribute, Any
}
break;
- case MS_FILLTYPE:
+ case oox::ppt::MS_FILLTYPE:
{
OUString aString;
if( rValue >>= aString )
@@ -936,7 +800,7 @@ bool AnimationImporter::convertAnimationValue( MS_AttributeNames eAttribute, Any
}
break;
- case MS_STROKEON:
+ case oox::ppt::MS_STROKEON:
{
OUString aString;
if( rValue >>= aString )
@@ -947,7 +811,7 @@ bool AnimationImporter::convertAnimationValue( MS_AttributeNames eAttribute, Any
}
break;
- case MS_FONTWEIGHT:
+ case oox::ppt::MS_FONTWEIGHT:
{
OUString aString;
if( rValue >>= aString )
@@ -958,7 +822,7 @@ bool AnimationImporter::convertAnimationValue( MS_AttributeNames eAttribute, Any
}
break;
- case MS_STYLEFONTSTYLE:
+ case oox::ppt::MS_STYLEFONTSTYLE:
{
OUString aString;
if( rValue >>= aString )
@@ -969,7 +833,7 @@ bool AnimationImporter::convertAnimationValue( MS_AttributeNames eAttribute, Any
}
break;
- case MS_STYLEUNDERLINE:
+ case oox::ppt::MS_STYLEUNDERLINE:
{
OUString aString;
if( rValue >>= aString )
@@ -980,8 +844,8 @@ bool AnimationImporter::convertAnimationValue( MS_AttributeNames eAttribute, Any
}
break;
- case MS_STYLEOPACITY:
- case MS_STYLEFONTSIZE:
+ case oox::ppt::MS_STYLEOPACITY:
+ case oox::ppt::MS_STYLEFONTSIZE:
{
OUString aString;
if( rValue >>= aString )
@@ -992,7 +856,7 @@ bool AnimationImporter::convertAnimationValue( MS_AttributeNames eAttribute, Any
}
break;
- case MS_STYLEVISIBILITY:
+ case oox::ppt::MS_STYLEVISIBILITY:
{
OUString aString;
if( rValue >>= aString )
@@ -1009,65 +873,6 @@ bool AnimationImporter::convertAnimationValue( MS_AttributeNames eAttribute, Any
return bRet;
}
-static OUString getConvertedSubType( sal_Int16 nPresetClass, sal_Int32 nPresetId, sal_Int32 nPresetSubType )
-{
- const sal_Char* pStr = 0;
-
- if( (nPresetClass == EffectPresetClass::ENTRANCE) || (nPresetClass == EffectPresetClass::EXIT) )
- {
- // skip wheel effect
- if( nPresetId != 21 )
- {
- if( nPresetId == 5 )
- {
- // checkerboard
- switch( nPresetSubType )
- {
- case 5: pStr = "downward"; break;
- case 10: pStr = "across"; break;
- }
- }
- else if( nPresetId == 17 )
- {
- // stretch
- if( nPresetSubType == 10 )
- pStr = "across";
- }
- else if( nPresetId == 18 )
- {
- // strips
- switch( nPresetSubType )
- {
- case 3: pStr = "right-to-top"; break;
- case 6: pStr = "right-to-bottom"; break;
- case 9: pStr = "left-to-top"; break;
- case 12: pStr = "left-to-bottom"; break;
- }
- }
-
- if( pStr == 0 )
- {
- const convert_subtype* p = gConvertArray;
-
- while( p->mpStrSubType )
- {
- if( p->mnID == nPresetSubType )
- {
- pStr = p->mpStrSubType;
- break;
- }
- p++;
- }
- }
- }
- }
-
- if( pStr )
- return OUString::createFromAscii( pStr );
- else
- return OUString::number( nPresetSubType );
-}
-
void AnimationImporter::fillNode( Reference< XAnimationNode >& xNode, const AnimationNode& rNode, const PropertySet& rSet )
{
bool bAfterEffect = false;
@@ -1194,7 +999,7 @@ void AnimationImporter::fillNode( Reference< XAnimationNode >& xNode, const Anim
aUserData.realloc(nSize+1);
aUserData[nSize].Name = "preset-id";
- const preset_maping* p = gPresetMaping;
+ const oox::ppt::preset_maping* p = oox::ppt::preset_maping::getList();
while( p->mpStrPresetId && ((p->mnPresetClass != nEffectPresetClass) || (p->mnPresetId != nPresetId )) )
p++;
@@ -1232,7 +1037,7 @@ void AnimationImporter::fillNode( Reference< XAnimationNode >& xNode, const Anim
sal_Int32 nSize = aUserData.getLength();
aUserData.realloc(nSize+1);
aUserData[nSize].Name = "preset-sub-type";
- aUserData[nSize].Value <<= getConvertedSubType( nEffectPresetClass, nPresetId, nPresetSubType );
+ aUserData[nSize].Value <<= oox::ppt::getConvertedSubType( nEffectPresetClass, nPresetId, nPresetSubType );
}
}
}
@@ -1577,7 +1382,7 @@ void AnimationImporter::importAnimateFilterContainer( const Atom* pAtom, const R
dump( " filter=\"%s\"", filter );
- const transition* pTransition = transition::find( filter );
+ const oox::ppt::transition* pTransition = oox::ppt::transition::find( filter );
if( pTransition )
{
xFilter->setTransition( pTransition->mnType );
@@ -2851,7 +2656,7 @@ void AnimationImporter::importAnimationEvents( const Atom* pAtom, const Referenc
pChildAtom = Atom::findNextChildAtom( pChildAtom );
}
- *pEvents = addToSequence( *pEvents, (aEvent.Trigger == EventTrigger::NONE) ? aEvent.Offset : makeAny( aEvent ) );
+ *pEvents = oox::addToSequence( *pEvents, (aEvent.Trigger == EventTrigger::NONE) ? aEvent.Offset : makeAny( aEvent ) );
}
pEventAtom = pAtom->findNextChildAtom( DFF_msofbtAnimEvent, pEventAtom );
diff --git a/sd/source/filter/ppt/pptinanimations.hxx b/sd/source/filter/ppt/pptinanimations.hxx
index ec4175c92e8b..3456743c734f 100644
--- a/sd/source/filter/ppt/pptinanimations.hxx
+++ b/sd/source/filter/ppt/pptinanimations.hxx
@@ -79,10 +79,7 @@ private:
static css::uno::Reference< css::animations::XAnimationNode > createNode( const Atom* pAtom, const AnimationNode& rNode );
bool convertAnimationNode( const css::uno::Reference< css::animations::XAnimationNode >& xNode, const css::uno::Reference< css::animations::XAnimationNode >& xParent );
- static bool convertAnimationValue( MS_AttributeNames eAttribute, css::uno::Any& rValue );
-
- static void fixMainSequenceTiming( const css::uno::Reference< css::animations::XAnimationNode >& xNode );
- static void fixInteractiveSequenceTiming( const css::uno::Reference< css::animations::XAnimationNode >& xNode );
+ static bool convertAnimationValue( oox::ppt::MS_AttributeNames eAttribute, css::uno::Any& rValue );
void processAfterEffectNodes();