summaryrefslogtreecommitdiff
path: root/slideshow/source/engine/animationfactory.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'slideshow/source/engine/animationfactory.cxx')
-rw-r--r--slideshow/source/engine/animationfactory.cxx282
1 files changed, 132 insertions, 150 deletions
diff --git a/slideshow/source/engine/animationfactory.cxx b/slideshow/source/engine/animationfactory.cxx
index c27f7d57a235..30449a965d09 100644
--- a/slideshow/source/engine/animationfactory.cxx
+++ b/slideshow/source/engine/animationfactory.cxx
@@ -734,56 +734,54 @@ namespace slideshow
{
default:
// FALLTHROUGH intended
- case ATTRIBUTE_INVALID:
+ case AttributeType::Invalid:
return CLASS_UNKNOWN_PROPERTY;
- case ATTRIBUTE_CHAR_COLOR:
+ case AttributeType::CharColor:
// FALLTHROUGH intended
- case ATTRIBUTE_COLOR:
+ case AttributeType::Color:
// FALLTHROUGH intended
- case ATTRIBUTE_DIMCOLOR:
+ case AttributeType::DimColor:
// FALLTHROUGH intended
- case ATTRIBUTE_FILL_COLOR:
+ case AttributeType::FillColor:
// FALLTHROUGH intended
- case ATTRIBUTE_LINE_COLOR:
+ case AttributeType::LineColor:
return CLASS_COLOR_PROPERTY;
- case ATTRIBUTE_CHAR_FONT_NAME:
+ case AttributeType::CharFontName:
return CLASS_STRING_PROPERTY;
- case ATTRIBUTE_VISIBILITY:
+ case AttributeType::Visibility:
return CLASS_BOOL_PROPERTY;
- case ATTRIBUTE_CHAR_HEIGHT:
+ case AttributeType::CharHeight:
// FALLTHROUGH intended
- case ATTRIBUTE_CHAR_WEIGHT:
+ case AttributeType::CharWeight:
// FALLTHROUGH intended
- case ATTRIBUTE_CHAR_ROTATION:
+ case AttributeType::Height:
// FALLTHROUGH intended
- case ATTRIBUTE_HEIGHT:
+ case AttributeType::Opacity:
// FALLTHROUGH intended
- case ATTRIBUTE_OPACITY:
+ case AttributeType::Rotate:
// FALLTHROUGH intended
- case ATTRIBUTE_ROTATE:
+ case AttributeType::SkewX:
// FALLTHROUGH intended
- case ATTRIBUTE_SKEW_X:
+ case AttributeType::SkewY:
// FALLTHROUGH intended
- case ATTRIBUTE_SKEW_Y:
+ case AttributeType::Width:
// FALLTHROUGH intended
- case ATTRIBUTE_WIDTH:
+ case AttributeType::PosX:
// FALLTHROUGH intended
- case ATTRIBUTE_POS_X:
- // FALLTHROUGH intended
- case ATTRIBUTE_POS_Y:
+ case AttributeType::PosY:
return CLASS_NUMBER_PROPERTY;
- case ATTRIBUTE_CHAR_UNDERLINE:
+ case AttributeType::CharUnderline:
// FALLTHROUGH intended
- case ATTRIBUTE_FILL_STYLE:
+ case AttributeType::FillStyle:
// FALLTHROUGH intended
- case ATTRIBUTE_LINE_STYLE:
+ case AttributeType::LineStyle:
// FALLTHROUGH intended
- case ATTRIBUTE_CHAR_POSTURE:
+ case AttributeType::CharPosture:
return CLASS_ENUM_PROPERTY;
}
}
@@ -800,37 +798,37 @@ namespace slideshow
{
default:
// FALLTHROUGH intended
- case ATTRIBUTE_INVALID:
+ case AttributeType::Invalid:
ENSURE_OR_THROW( false,
"AnimationFactory::createNumberPropertyAnimation(): Unknown attribute" );
break;
- case ATTRIBUTE_CHAR_COLOR:
+ case AttributeType::CharColor:
// FALLTHROUGH intended
- case ATTRIBUTE_CHAR_FONT_NAME:
+ case AttributeType::CharFontName:
// FALLTHROUGH intended
- case ATTRIBUTE_CHAR_POSTURE:
+ case AttributeType::CharPosture:
// FALLTHROUGH intended
- case ATTRIBUTE_CHAR_UNDERLINE:
+ case AttributeType::CharUnderline:
// FALLTHROUGH intended
- case ATTRIBUTE_COLOR:
+ case AttributeType::Color:
// FALLTHROUGH intended
- case ATTRIBUTE_DIMCOLOR:
+ case AttributeType::DimColor:
// FALLTHROUGH intended
- case ATTRIBUTE_FILL_COLOR:
+ case AttributeType::FillColor:
// FALLTHROUGH intended
- case ATTRIBUTE_FILL_STYLE:
+ case AttributeType::FillStyle:
// FALLTHROUGH intended
- case ATTRIBUTE_LINE_COLOR:
+ case AttributeType::LineColor:
// FALLTHROUGH intended
- case ATTRIBUTE_LINE_STYLE:
+ case AttributeType::LineStyle:
// FALLTHROUGH intended
- case ATTRIBUTE_VISIBILITY:
+ case AttributeType::Visibility:
ENSURE_OR_THROW( false,
"AnimationFactory::createNumberPropertyAnimation(): Attribute type mismatch" );
break;
- case ATTRIBUTE_CHAR_HEIGHT:
+ case AttributeType::CharHeight:
return makeGenericAnimation<NumberAnimation>( rShapeManager,
nFlags,
&ShapeAttributeLayer::isCharScaleValid,
@@ -839,7 +837,7 @@ namespace slideshow
&ShapeAttributeLayer::getCharScale,
&ShapeAttributeLayer::setCharScale );
- case ATTRIBUTE_CHAR_WEIGHT:
+ case AttributeType::CharWeight:
return makeGenericAnimation<NumberAnimation>( rShapeManager,
nFlags,
&ShapeAttributeLayer::isCharWeightValid,
@@ -847,15 +845,7 @@ namespace slideshow
&ShapeAttributeLayer::getCharWeight,
&ShapeAttributeLayer::setCharWeight );
- case ATTRIBUTE_CHAR_ROTATION:
- return makeGenericAnimation<NumberAnimation>( rShapeManager,
- nFlags,
- &ShapeAttributeLayer::isCharRotationAngleValid,
- getDefault<double>( rShape, rAttrName ),
- &ShapeAttributeLayer::getCharRotationAngle,
- &ShapeAttributeLayer::setCharRotationAngle );
-
- case ATTRIBUTE_HEIGHT:
+ case AttributeType::Height:
return makeGenericAnimation( rShapeManager,
nFlags,
&ShapeAttributeLayer::isHeightValid,
@@ -869,7 +859,7 @@ namespace slideshow
// convert expression parser value from relative page size
rSlideSize.getY() );
- case ATTRIBUTE_OPACITY:
+ case AttributeType::Opacity:
return makeGenericAnimation<NumberAnimation>( rShapeManager,
nFlags,
&ShapeAttributeLayer::isAlphaValid,
@@ -878,7 +868,7 @@ namespace slideshow
&ShapeAttributeLayer::getAlpha,
&ShapeAttributeLayer::setAlpha );
- case ATTRIBUTE_ROTATE:
+ case AttributeType::Rotate:
return makeGenericAnimation<NumberAnimation>( rShapeManager,
nFlags,
&ShapeAttributeLayer::isRotationAngleValid,
@@ -888,7 +878,7 @@ namespace slideshow
&ShapeAttributeLayer::getRotationAngle,
&ShapeAttributeLayer::setRotationAngle );
- case ATTRIBUTE_SKEW_X:
+ case AttributeType::SkewX:
return makeGenericAnimation<NumberAnimation>( rShapeManager,
nFlags,
&ShapeAttributeLayer::isShearXAngleValid,
@@ -897,7 +887,7 @@ namespace slideshow
&ShapeAttributeLayer::getShearXAngle,
&ShapeAttributeLayer::setShearXAngle );
- case ATTRIBUTE_SKEW_Y:
+ case AttributeType::SkewY:
return makeGenericAnimation<NumberAnimation>( rShapeManager,
nFlags,
&ShapeAttributeLayer::isShearYAngleValid,
@@ -906,7 +896,7 @@ namespace slideshow
&ShapeAttributeLayer::getShearYAngle,
&ShapeAttributeLayer::setShearYAngle );
- case ATTRIBUTE_WIDTH:
+ case AttributeType::Width:
return makeGenericAnimation( rShapeManager,
nFlags,
&ShapeAttributeLayer::isWidthValid,
@@ -920,7 +910,7 @@ namespace slideshow
// convert expression parser value from relative page size
rSlideSize.getX() );
- case ATTRIBUTE_POS_X:
+ case AttributeType::PosX:
return makeGenericAnimation( rShapeManager,
nFlags,
&ShapeAttributeLayer::isPosXValid,
@@ -934,7 +924,7 @@ namespace slideshow
// convert expression parser value from relative page size
rSlideSize.getX() );
- case ATTRIBUTE_POS_Y:
+ case AttributeType::PosY:
return makeGenericAnimation( rShapeManager,
nFlags,
&ShapeAttributeLayer::isPosYValid,
@@ -964,52 +954,50 @@ namespace slideshow
{
default:
// FALLTHROUGH intended
- case ATTRIBUTE_INVALID:
+ case AttributeType::Invalid:
ENSURE_OR_THROW( false,
"AnimationFactory::createEnumPropertyAnimation(): Unknown attribute" );
break;
- case ATTRIBUTE_CHAR_COLOR:
+ case AttributeType::CharColor:
// FALLTHROUGH intended
- case ATTRIBUTE_CHAR_FONT_NAME:
+ case AttributeType::CharFontName:
// FALLTHROUGH intended
- case ATTRIBUTE_COLOR:
+ case AttributeType::Color:
// FALLTHROUGH intended
- case ATTRIBUTE_DIMCOLOR:
+ case AttributeType::DimColor:
// FALLTHROUGH intended
- case ATTRIBUTE_FILL_COLOR:
+ case AttributeType::FillColor:
// FALLTHROUGH intended
- case ATTRIBUTE_LINE_COLOR:
+ case AttributeType::LineColor:
// FALLTHROUGH intended
- case ATTRIBUTE_VISIBILITY:
+ case AttributeType::Visibility:
// FALLTHROUGH intended
- case ATTRIBUTE_CHAR_HEIGHT:
+ case AttributeType::CharHeight:
// FALLTHROUGH intended
- case ATTRIBUTE_CHAR_WEIGHT:
+ case AttributeType::CharWeight:
// FALLTHROUGH intended
- case ATTRIBUTE_CHAR_ROTATION:
+ case AttributeType::Height:
// FALLTHROUGH intended
- case ATTRIBUTE_HEIGHT:
+ case AttributeType::Opacity:
// FALLTHROUGH intended
- case ATTRIBUTE_OPACITY:
+ case AttributeType::Rotate:
// FALLTHROUGH intended
- case ATTRIBUTE_ROTATE:
+ case AttributeType::SkewX:
// FALLTHROUGH intended
- case ATTRIBUTE_SKEW_X:
+ case AttributeType::SkewY:
// FALLTHROUGH intended
- case ATTRIBUTE_SKEW_Y:
+ case AttributeType::Width:
// FALLTHROUGH intended
- case ATTRIBUTE_WIDTH:
+ case AttributeType::PosX:
// FALLTHROUGH intended
- case ATTRIBUTE_POS_X:
- // FALLTHROUGH intended
- case ATTRIBUTE_POS_Y:
+ case AttributeType::PosY:
ENSURE_OR_THROW( false,
"AnimationFactory::createEnumPropertyAnimation(): Attribute type mismatch" );
break;
- case ATTRIBUTE_FILL_STYLE:
+ case AttributeType::FillStyle:
return makeGenericAnimation<EnumAnimation>( rShapeManager,
nFlags,
&ShapeAttributeLayer::isFillStyleValid,
@@ -1018,7 +1006,7 @@ namespace slideshow
&ShapeAttributeLayer::getFillStyle,
&ShapeAttributeLayer::setFillStyle );
- case ATTRIBUTE_LINE_STYLE:
+ case AttributeType::LineStyle:
return makeGenericAnimation<EnumAnimation>( rShapeManager,
nFlags,
&ShapeAttributeLayer::isLineStyleValid,
@@ -1027,7 +1015,7 @@ namespace slideshow
&ShapeAttributeLayer::getLineStyle,
&ShapeAttributeLayer::setLineStyle );
- case ATTRIBUTE_CHAR_POSTURE:
+ case AttributeType::CharPosture:
return makeGenericAnimation<EnumAnimation>( rShapeManager,
nFlags,
&ShapeAttributeLayer::isCharPostureValid,
@@ -1036,7 +1024,7 @@ namespace slideshow
&ShapeAttributeLayer::getCharPosture,
&ShapeAttributeLayer::setCharPosture );
- case ATTRIBUTE_CHAR_UNDERLINE:
+ case AttributeType::CharUnderline:
return makeGenericAnimation<EnumAnimation>( rShapeManager,
nFlags,
&ShapeAttributeLayer::isUnderlineModeValid,
@@ -1060,49 +1048,47 @@ namespace slideshow
{
default:
// FALLTHROUGH intended
- case ATTRIBUTE_INVALID:
+ case AttributeType::Invalid:
ENSURE_OR_THROW( false,
"AnimationFactory::createColorPropertyAnimation(): Unknown attribute" );
break;
- case ATTRIBUTE_CHAR_FONT_NAME:
- // FALLTHROUGH intended
- case ATTRIBUTE_CHAR_HEIGHT:
+ case AttributeType::CharFontName:
// FALLTHROUGH intended
- case ATTRIBUTE_CHAR_POSTURE:
+ case AttributeType::CharHeight:
// FALLTHROUGH intended
- case ATTRIBUTE_CHAR_ROTATION:
+ case AttributeType::CharPosture:
// FALLTHROUGH intended
- case ATTRIBUTE_CHAR_UNDERLINE:
+ case AttributeType::CharUnderline:
// FALLTHROUGH intended
- case ATTRIBUTE_CHAR_WEIGHT:
+ case AttributeType::CharWeight:
// FALLTHROUGH intended
- case ATTRIBUTE_FILL_STYLE:
+ case AttributeType::FillStyle:
// FALLTHROUGH intended
- case ATTRIBUTE_HEIGHT:
+ case AttributeType::Height:
// FALLTHROUGH intended
- case ATTRIBUTE_LINE_STYLE:
+ case AttributeType::LineStyle:
// FALLTHROUGH intended
- case ATTRIBUTE_OPACITY:
+ case AttributeType::Opacity:
// FALLTHROUGH intended
- case ATTRIBUTE_ROTATE:
+ case AttributeType::Rotate:
// FALLTHROUGH intended
- case ATTRIBUTE_SKEW_X:
+ case AttributeType::SkewX:
// FALLTHROUGH intended
- case ATTRIBUTE_SKEW_Y:
+ case AttributeType::SkewY:
// FALLTHROUGH intended
- case ATTRIBUTE_VISIBILITY:
+ case AttributeType::Visibility:
// FALLTHROUGH intended
- case ATTRIBUTE_WIDTH:
+ case AttributeType::Width:
// FALLTHROUGH intended
- case ATTRIBUTE_POS_X:
+ case AttributeType::PosX:
// FALLTHROUGH intended
- case ATTRIBUTE_POS_Y:
+ case AttributeType::PosY:
ENSURE_OR_THROW( false,
"AnimationFactory::createColorPropertyAnimation(): Attribute type mismatch" );
break;
- case ATTRIBUTE_CHAR_COLOR:
+ case AttributeType::CharColor:
return makeGenericAnimation<ColorAnimation>( rShapeManager,
nFlags,
&ShapeAttributeLayer::isCharColorValid,
@@ -1110,7 +1096,7 @@ namespace slideshow
&ShapeAttributeLayer::getCharColor,
&ShapeAttributeLayer::setCharColor );
- case ATTRIBUTE_COLOR:
+ case AttributeType::Color:
// TODO(F2): This is just mapped to fill color to make it work
return makeGenericAnimation<ColorAnimation>( rShapeManager,
nFlags,
@@ -1119,7 +1105,7 @@ namespace slideshow
&ShapeAttributeLayer::getFillColor,
&ShapeAttributeLayer::setFillColor );
- case ATTRIBUTE_DIMCOLOR:
+ case AttributeType::DimColor:
return makeGenericAnimation<ColorAnimation>( rShapeManager,
nFlags,
&ShapeAttributeLayer::isDimColorValid,
@@ -1127,7 +1113,7 @@ namespace slideshow
&ShapeAttributeLayer::getDimColor,
&ShapeAttributeLayer::setDimColor );
- case ATTRIBUTE_FILL_COLOR:
+ case AttributeType::FillColor:
return makeGenericAnimation<ColorAnimation>( rShapeManager,
nFlags,
&ShapeAttributeLayer::isFillColorValid,
@@ -1135,7 +1121,7 @@ namespace slideshow
&ShapeAttributeLayer::getFillColor,
&ShapeAttributeLayer::setFillColor );
- case ATTRIBUTE_LINE_COLOR:
+ case AttributeType::LineColor:
return makeGenericAnimation<ColorAnimation>( rShapeManager,
nFlags,
&ShapeAttributeLayer::isLineColorValid,
@@ -1212,57 +1198,55 @@ namespace slideshow
{
default:
// FALLTHROUGH intended
- case ATTRIBUTE_INVALID:
+ case AttributeType::Invalid:
ENSURE_OR_THROW( false,
"AnimationFactory::createStringPropertyAnimation(): Unknown attribute" );
break;
- case ATTRIBUTE_CHAR_COLOR:
+ case AttributeType::CharColor:
// FALLTHROUGH intended
- case ATTRIBUTE_CHAR_HEIGHT:
+ case AttributeType::CharHeight:
// FALLTHROUGH intended
- case ATTRIBUTE_CHAR_ROTATION:
+ case AttributeType::CharUnderline:
// FALLTHROUGH intended
- case ATTRIBUTE_CHAR_UNDERLINE:
+ case AttributeType::Color:
// FALLTHROUGH intended
- case ATTRIBUTE_COLOR:
+ case AttributeType::DimColor:
// FALLTHROUGH intended
- case ATTRIBUTE_DIMCOLOR:
+ case AttributeType::FillColor:
// FALLTHROUGH intended
- case ATTRIBUTE_FILL_COLOR:
+ case AttributeType::Height:
// FALLTHROUGH intended
- case ATTRIBUTE_HEIGHT:
+ case AttributeType::LineColor:
// FALLTHROUGH intended
- case ATTRIBUTE_LINE_COLOR:
+ case AttributeType::Opacity:
// FALLTHROUGH intended
- case ATTRIBUTE_OPACITY:
+ case AttributeType::Rotate:
// FALLTHROUGH intended
- case ATTRIBUTE_ROTATE:
+ case AttributeType::SkewX:
// FALLTHROUGH intended
- case ATTRIBUTE_SKEW_X:
+ case AttributeType::SkewY:
// FALLTHROUGH intended
- case ATTRIBUTE_SKEW_Y:
+ case AttributeType::Visibility:
// FALLTHROUGH intended
- case ATTRIBUTE_VISIBILITY:
+ case AttributeType::Width:
// FALLTHROUGH intended
- case ATTRIBUTE_WIDTH:
+ case AttributeType::PosX:
// FALLTHROUGH intended
- case ATTRIBUTE_POS_X:
+ case AttributeType::PosY:
// FALLTHROUGH intended
- case ATTRIBUTE_POS_Y:
+ case AttributeType::CharPosture:
// FALLTHROUGH intended
- case ATTRIBUTE_CHAR_POSTURE:
+ case AttributeType::CharWeight:
// FALLTHROUGH intended
- case ATTRIBUTE_CHAR_WEIGHT:
+ case AttributeType::FillStyle:
// FALLTHROUGH intended
- case ATTRIBUTE_FILL_STYLE:
- // FALLTHROUGH intended
- case ATTRIBUTE_LINE_STYLE:
+ case AttributeType::LineStyle:
ENSURE_OR_THROW( false,
"AnimationFactory::createStringPropertyAnimation(): Attribute type mismatch" );
break;
- case ATTRIBUTE_CHAR_FONT_NAME:
+ case AttributeType::CharFontName:
return makeGenericAnimation<StringAnimation>( rShapeManager,
nFlags,
&ShapeAttributeLayer::isFontFamilyValid,
@@ -1286,57 +1270,55 @@ namespace slideshow
{
default:
// FALLTHROUGH intended
- case ATTRIBUTE_INVALID:
+ case AttributeType::Invalid:
ENSURE_OR_THROW( false,
"AnimationFactory::createBoolPropertyAnimation(): Unknown attribute" );
break;
- case ATTRIBUTE_CHAR_COLOR:
- // FALLTHROUGH intended
- case ATTRIBUTE_CHAR_FONT_NAME:
+ case AttributeType::CharColor:
// FALLTHROUGH intended
- case ATTRIBUTE_CHAR_HEIGHT:
+ case AttributeType::CharFontName:
// FALLTHROUGH intended
- case ATTRIBUTE_CHAR_POSTURE:
+ case AttributeType::CharHeight:
// FALLTHROUGH intended
- case ATTRIBUTE_CHAR_ROTATION:
+ case AttributeType::CharPosture:
// FALLTHROUGH intended
- case ATTRIBUTE_CHAR_WEIGHT:
+ case AttributeType::CharWeight:
// FALLTHROUGH intended
- case ATTRIBUTE_COLOR:
+ case AttributeType::Color:
// FALLTHROUGH intended
- case ATTRIBUTE_DIMCOLOR:
+ case AttributeType::DimColor:
// FALLTHROUGH intended
- case ATTRIBUTE_FILL_COLOR:
+ case AttributeType::FillColor:
// FALLTHROUGH intended
- case ATTRIBUTE_FILL_STYLE:
+ case AttributeType::FillStyle:
// FALLTHROUGH intended
- case ATTRIBUTE_HEIGHT:
+ case AttributeType::Height:
// FALLTHROUGH intended
- case ATTRIBUTE_LINE_COLOR:
+ case AttributeType::LineColor:
// FALLTHROUGH intended
- case ATTRIBUTE_LINE_STYLE:
+ case AttributeType::LineStyle:
// FALLTHROUGH intended
- case ATTRIBUTE_OPACITY:
+ case AttributeType::Opacity:
// FALLTHROUGH intended
- case ATTRIBUTE_ROTATE:
+ case AttributeType::Rotate:
// FALLTHROUGH intended
- case ATTRIBUTE_SKEW_X:
+ case AttributeType::SkewX:
// FALLTHROUGH intended
- case ATTRIBUTE_SKEW_Y:
+ case AttributeType::SkewY:
// FALLTHROUGH intended
- case ATTRIBUTE_WIDTH:
+ case AttributeType::Width:
// FALLTHROUGH intended
- case ATTRIBUTE_POS_X:
+ case AttributeType::PosX:
// FALLTHROUGH intended
- case ATTRIBUTE_POS_Y:
+ case AttributeType::PosY:
// FALLTHROUGH intended
- case ATTRIBUTE_CHAR_UNDERLINE:
+ case AttributeType::CharUnderline:
ENSURE_OR_THROW( false,
"AnimationFactory::createBoolPropertyAnimation(): Attribute type mismatch" );
break;
- case ATTRIBUTE_VISIBILITY:
+ case AttributeType::Visibility:
return makeGenericAnimation<BoolAnimation>( rShapeManager,
nFlags,
&ShapeAttributeLayer::isVisibilityValid,