convert AttributeType to scoped enum
and drop unused CHAR_ROTATION enumerator Change-Id: I9ca50aef41fa736c7f34c210844fb54f60f5bca8
This commit is contained in:
@@ -734,56 +734,54 @@ namespace slideshow
|
|||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_INVALID:
|
case AttributeType::Invalid:
|
||||||
return CLASS_UNKNOWN_PROPERTY;
|
return CLASS_UNKNOWN_PROPERTY;
|
||||||
|
|
||||||
case ATTRIBUTE_CHAR_COLOR:
|
case AttributeType::CharColor:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_COLOR:
|
case AttributeType::Color:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_DIMCOLOR:
|
case AttributeType::DimColor:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_FILL_COLOR:
|
case AttributeType::FillColor:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_LINE_COLOR:
|
case AttributeType::LineColor:
|
||||||
return CLASS_COLOR_PROPERTY;
|
return CLASS_COLOR_PROPERTY;
|
||||||
|
|
||||||
case ATTRIBUTE_CHAR_FONT_NAME:
|
case AttributeType::CharFontName:
|
||||||
return CLASS_STRING_PROPERTY;
|
return CLASS_STRING_PROPERTY;
|
||||||
|
|
||||||
case ATTRIBUTE_VISIBILITY:
|
case AttributeType::Visibility:
|
||||||
return CLASS_BOOL_PROPERTY;
|
return CLASS_BOOL_PROPERTY;
|
||||||
|
|
||||||
case ATTRIBUTE_CHAR_HEIGHT:
|
case AttributeType::CharHeight:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_CHAR_WEIGHT:
|
case AttributeType::CharWeight:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_CHAR_ROTATION:
|
case AttributeType::Height:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_HEIGHT:
|
case AttributeType::Opacity:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_OPACITY:
|
case AttributeType::Rotate:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_ROTATE:
|
case AttributeType::SkewX:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_SKEW_X:
|
case AttributeType::SkewY:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_SKEW_Y:
|
case AttributeType::Width:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_WIDTH:
|
case AttributeType::PosX:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_POS_X:
|
case AttributeType::PosY:
|
||||||
// FALLTHROUGH intended
|
|
||||||
case ATTRIBUTE_POS_Y:
|
|
||||||
return CLASS_NUMBER_PROPERTY;
|
return CLASS_NUMBER_PROPERTY;
|
||||||
|
|
||||||
case ATTRIBUTE_CHAR_UNDERLINE:
|
case AttributeType::CharUnderline:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_FILL_STYLE:
|
case AttributeType::FillStyle:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_LINE_STYLE:
|
case AttributeType::LineStyle:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_CHAR_POSTURE:
|
case AttributeType::CharPosture:
|
||||||
return CLASS_ENUM_PROPERTY;
|
return CLASS_ENUM_PROPERTY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -800,37 +798,37 @@ namespace slideshow
|
|||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_INVALID:
|
case AttributeType::Invalid:
|
||||||
ENSURE_OR_THROW( false,
|
ENSURE_OR_THROW( false,
|
||||||
"AnimationFactory::createNumberPropertyAnimation(): Unknown attribute" );
|
"AnimationFactory::createNumberPropertyAnimation(): Unknown attribute" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ATTRIBUTE_CHAR_COLOR:
|
case AttributeType::CharColor:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_CHAR_FONT_NAME:
|
case AttributeType::CharFontName:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_CHAR_POSTURE:
|
case AttributeType::CharPosture:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_CHAR_UNDERLINE:
|
case AttributeType::CharUnderline:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_COLOR:
|
case AttributeType::Color:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_DIMCOLOR:
|
case AttributeType::DimColor:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_FILL_COLOR:
|
case AttributeType::FillColor:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_FILL_STYLE:
|
case AttributeType::FillStyle:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_LINE_COLOR:
|
case AttributeType::LineColor:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_LINE_STYLE:
|
case AttributeType::LineStyle:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_VISIBILITY:
|
case AttributeType::Visibility:
|
||||||
ENSURE_OR_THROW( false,
|
ENSURE_OR_THROW( false,
|
||||||
"AnimationFactory::createNumberPropertyAnimation(): Attribute type mismatch" );
|
"AnimationFactory::createNumberPropertyAnimation(): Attribute type mismatch" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ATTRIBUTE_CHAR_HEIGHT:
|
case AttributeType::CharHeight:
|
||||||
return makeGenericAnimation<NumberAnimation>( rShapeManager,
|
return makeGenericAnimation<NumberAnimation>( rShapeManager,
|
||||||
nFlags,
|
nFlags,
|
||||||
&ShapeAttributeLayer::isCharScaleValid,
|
&ShapeAttributeLayer::isCharScaleValid,
|
||||||
@@ -839,7 +837,7 @@ namespace slideshow
|
|||||||
&ShapeAttributeLayer::getCharScale,
|
&ShapeAttributeLayer::getCharScale,
|
||||||
&ShapeAttributeLayer::setCharScale );
|
&ShapeAttributeLayer::setCharScale );
|
||||||
|
|
||||||
case ATTRIBUTE_CHAR_WEIGHT:
|
case AttributeType::CharWeight:
|
||||||
return makeGenericAnimation<NumberAnimation>( rShapeManager,
|
return makeGenericAnimation<NumberAnimation>( rShapeManager,
|
||||||
nFlags,
|
nFlags,
|
||||||
&ShapeAttributeLayer::isCharWeightValid,
|
&ShapeAttributeLayer::isCharWeightValid,
|
||||||
@@ -847,15 +845,7 @@ namespace slideshow
|
|||||||
&ShapeAttributeLayer::getCharWeight,
|
&ShapeAttributeLayer::getCharWeight,
|
||||||
&ShapeAttributeLayer::setCharWeight );
|
&ShapeAttributeLayer::setCharWeight );
|
||||||
|
|
||||||
case ATTRIBUTE_CHAR_ROTATION:
|
case AttributeType::Height:
|
||||||
return makeGenericAnimation<NumberAnimation>( rShapeManager,
|
|
||||||
nFlags,
|
|
||||||
&ShapeAttributeLayer::isCharRotationAngleValid,
|
|
||||||
getDefault<double>( rShape, rAttrName ),
|
|
||||||
&ShapeAttributeLayer::getCharRotationAngle,
|
|
||||||
&ShapeAttributeLayer::setCharRotationAngle );
|
|
||||||
|
|
||||||
case ATTRIBUTE_HEIGHT:
|
|
||||||
return makeGenericAnimation( rShapeManager,
|
return makeGenericAnimation( rShapeManager,
|
||||||
nFlags,
|
nFlags,
|
||||||
&ShapeAttributeLayer::isHeightValid,
|
&ShapeAttributeLayer::isHeightValid,
|
||||||
@@ -869,7 +859,7 @@ namespace slideshow
|
|||||||
// convert expression parser value from relative page size
|
// convert expression parser value from relative page size
|
||||||
rSlideSize.getY() );
|
rSlideSize.getY() );
|
||||||
|
|
||||||
case ATTRIBUTE_OPACITY:
|
case AttributeType::Opacity:
|
||||||
return makeGenericAnimation<NumberAnimation>( rShapeManager,
|
return makeGenericAnimation<NumberAnimation>( rShapeManager,
|
||||||
nFlags,
|
nFlags,
|
||||||
&ShapeAttributeLayer::isAlphaValid,
|
&ShapeAttributeLayer::isAlphaValid,
|
||||||
@@ -878,7 +868,7 @@ namespace slideshow
|
|||||||
&ShapeAttributeLayer::getAlpha,
|
&ShapeAttributeLayer::getAlpha,
|
||||||
&ShapeAttributeLayer::setAlpha );
|
&ShapeAttributeLayer::setAlpha );
|
||||||
|
|
||||||
case ATTRIBUTE_ROTATE:
|
case AttributeType::Rotate:
|
||||||
return makeGenericAnimation<NumberAnimation>( rShapeManager,
|
return makeGenericAnimation<NumberAnimation>( rShapeManager,
|
||||||
nFlags,
|
nFlags,
|
||||||
&ShapeAttributeLayer::isRotationAngleValid,
|
&ShapeAttributeLayer::isRotationAngleValid,
|
||||||
@@ -888,7 +878,7 @@ namespace slideshow
|
|||||||
&ShapeAttributeLayer::getRotationAngle,
|
&ShapeAttributeLayer::getRotationAngle,
|
||||||
&ShapeAttributeLayer::setRotationAngle );
|
&ShapeAttributeLayer::setRotationAngle );
|
||||||
|
|
||||||
case ATTRIBUTE_SKEW_X:
|
case AttributeType::SkewX:
|
||||||
return makeGenericAnimation<NumberAnimation>( rShapeManager,
|
return makeGenericAnimation<NumberAnimation>( rShapeManager,
|
||||||
nFlags,
|
nFlags,
|
||||||
&ShapeAttributeLayer::isShearXAngleValid,
|
&ShapeAttributeLayer::isShearXAngleValid,
|
||||||
@@ -897,7 +887,7 @@ namespace slideshow
|
|||||||
&ShapeAttributeLayer::getShearXAngle,
|
&ShapeAttributeLayer::getShearXAngle,
|
||||||
&ShapeAttributeLayer::setShearXAngle );
|
&ShapeAttributeLayer::setShearXAngle );
|
||||||
|
|
||||||
case ATTRIBUTE_SKEW_Y:
|
case AttributeType::SkewY:
|
||||||
return makeGenericAnimation<NumberAnimation>( rShapeManager,
|
return makeGenericAnimation<NumberAnimation>( rShapeManager,
|
||||||
nFlags,
|
nFlags,
|
||||||
&ShapeAttributeLayer::isShearYAngleValid,
|
&ShapeAttributeLayer::isShearYAngleValid,
|
||||||
@@ -906,7 +896,7 @@ namespace slideshow
|
|||||||
&ShapeAttributeLayer::getShearYAngle,
|
&ShapeAttributeLayer::getShearYAngle,
|
||||||
&ShapeAttributeLayer::setShearYAngle );
|
&ShapeAttributeLayer::setShearYAngle );
|
||||||
|
|
||||||
case ATTRIBUTE_WIDTH:
|
case AttributeType::Width:
|
||||||
return makeGenericAnimation( rShapeManager,
|
return makeGenericAnimation( rShapeManager,
|
||||||
nFlags,
|
nFlags,
|
||||||
&ShapeAttributeLayer::isWidthValid,
|
&ShapeAttributeLayer::isWidthValid,
|
||||||
@@ -920,7 +910,7 @@ namespace slideshow
|
|||||||
// convert expression parser value from relative page size
|
// convert expression parser value from relative page size
|
||||||
rSlideSize.getX() );
|
rSlideSize.getX() );
|
||||||
|
|
||||||
case ATTRIBUTE_POS_X:
|
case AttributeType::PosX:
|
||||||
return makeGenericAnimation( rShapeManager,
|
return makeGenericAnimation( rShapeManager,
|
||||||
nFlags,
|
nFlags,
|
||||||
&ShapeAttributeLayer::isPosXValid,
|
&ShapeAttributeLayer::isPosXValid,
|
||||||
@@ -934,7 +924,7 @@ namespace slideshow
|
|||||||
// convert expression parser value from relative page size
|
// convert expression parser value from relative page size
|
||||||
rSlideSize.getX() );
|
rSlideSize.getX() );
|
||||||
|
|
||||||
case ATTRIBUTE_POS_Y:
|
case AttributeType::PosY:
|
||||||
return makeGenericAnimation( rShapeManager,
|
return makeGenericAnimation( rShapeManager,
|
||||||
nFlags,
|
nFlags,
|
||||||
&ShapeAttributeLayer::isPosYValid,
|
&ShapeAttributeLayer::isPosYValid,
|
||||||
@@ -964,52 +954,50 @@ namespace slideshow
|
|||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_INVALID:
|
case AttributeType::Invalid:
|
||||||
ENSURE_OR_THROW( false,
|
ENSURE_OR_THROW( false,
|
||||||
"AnimationFactory::createEnumPropertyAnimation(): Unknown attribute" );
|
"AnimationFactory::createEnumPropertyAnimation(): Unknown attribute" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ATTRIBUTE_CHAR_COLOR:
|
case AttributeType::CharColor:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_CHAR_FONT_NAME:
|
case AttributeType::CharFontName:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_COLOR:
|
case AttributeType::Color:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_DIMCOLOR:
|
case AttributeType::DimColor:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_FILL_COLOR:
|
case AttributeType::FillColor:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_LINE_COLOR:
|
case AttributeType::LineColor:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_VISIBILITY:
|
case AttributeType::Visibility:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_CHAR_HEIGHT:
|
case AttributeType::CharHeight:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_CHAR_WEIGHT:
|
case AttributeType::CharWeight:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_CHAR_ROTATION:
|
case AttributeType::Height:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_HEIGHT:
|
case AttributeType::Opacity:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_OPACITY:
|
case AttributeType::Rotate:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_ROTATE:
|
case AttributeType::SkewX:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_SKEW_X:
|
case AttributeType::SkewY:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_SKEW_Y:
|
case AttributeType::Width:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_WIDTH:
|
case AttributeType::PosX:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_POS_X:
|
case AttributeType::PosY:
|
||||||
// FALLTHROUGH intended
|
|
||||||
case ATTRIBUTE_POS_Y:
|
|
||||||
ENSURE_OR_THROW( false,
|
ENSURE_OR_THROW( false,
|
||||||
"AnimationFactory::createEnumPropertyAnimation(): Attribute type mismatch" );
|
"AnimationFactory::createEnumPropertyAnimation(): Attribute type mismatch" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ATTRIBUTE_FILL_STYLE:
|
case AttributeType::FillStyle:
|
||||||
return makeGenericAnimation<EnumAnimation>( rShapeManager,
|
return makeGenericAnimation<EnumAnimation>( rShapeManager,
|
||||||
nFlags,
|
nFlags,
|
||||||
&ShapeAttributeLayer::isFillStyleValid,
|
&ShapeAttributeLayer::isFillStyleValid,
|
||||||
@@ -1018,7 +1006,7 @@ namespace slideshow
|
|||||||
&ShapeAttributeLayer::getFillStyle,
|
&ShapeAttributeLayer::getFillStyle,
|
||||||
&ShapeAttributeLayer::setFillStyle );
|
&ShapeAttributeLayer::setFillStyle );
|
||||||
|
|
||||||
case ATTRIBUTE_LINE_STYLE:
|
case AttributeType::LineStyle:
|
||||||
return makeGenericAnimation<EnumAnimation>( rShapeManager,
|
return makeGenericAnimation<EnumAnimation>( rShapeManager,
|
||||||
nFlags,
|
nFlags,
|
||||||
&ShapeAttributeLayer::isLineStyleValid,
|
&ShapeAttributeLayer::isLineStyleValid,
|
||||||
@@ -1027,7 +1015,7 @@ namespace slideshow
|
|||||||
&ShapeAttributeLayer::getLineStyle,
|
&ShapeAttributeLayer::getLineStyle,
|
||||||
&ShapeAttributeLayer::setLineStyle );
|
&ShapeAttributeLayer::setLineStyle );
|
||||||
|
|
||||||
case ATTRIBUTE_CHAR_POSTURE:
|
case AttributeType::CharPosture:
|
||||||
return makeGenericAnimation<EnumAnimation>( rShapeManager,
|
return makeGenericAnimation<EnumAnimation>( rShapeManager,
|
||||||
nFlags,
|
nFlags,
|
||||||
&ShapeAttributeLayer::isCharPostureValid,
|
&ShapeAttributeLayer::isCharPostureValid,
|
||||||
@@ -1036,7 +1024,7 @@ namespace slideshow
|
|||||||
&ShapeAttributeLayer::getCharPosture,
|
&ShapeAttributeLayer::getCharPosture,
|
||||||
&ShapeAttributeLayer::setCharPosture );
|
&ShapeAttributeLayer::setCharPosture );
|
||||||
|
|
||||||
case ATTRIBUTE_CHAR_UNDERLINE:
|
case AttributeType::CharUnderline:
|
||||||
return makeGenericAnimation<EnumAnimation>( rShapeManager,
|
return makeGenericAnimation<EnumAnimation>( rShapeManager,
|
||||||
nFlags,
|
nFlags,
|
||||||
&ShapeAttributeLayer::isUnderlineModeValid,
|
&ShapeAttributeLayer::isUnderlineModeValid,
|
||||||
@@ -1060,49 +1048,47 @@ namespace slideshow
|
|||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_INVALID:
|
case AttributeType::Invalid:
|
||||||
ENSURE_OR_THROW( false,
|
ENSURE_OR_THROW( false,
|
||||||
"AnimationFactory::createColorPropertyAnimation(): Unknown attribute" );
|
"AnimationFactory::createColorPropertyAnimation(): Unknown attribute" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ATTRIBUTE_CHAR_FONT_NAME:
|
case AttributeType::CharFontName:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_CHAR_HEIGHT:
|
case AttributeType::CharHeight:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_CHAR_POSTURE:
|
case AttributeType::CharPosture:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_CHAR_ROTATION:
|
case AttributeType::CharUnderline:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_CHAR_UNDERLINE:
|
case AttributeType::CharWeight:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_CHAR_WEIGHT:
|
case AttributeType::FillStyle:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_FILL_STYLE:
|
case AttributeType::Height:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_HEIGHT:
|
case AttributeType::LineStyle:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_LINE_STYLE:
|
case AttributeType::Opacity:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_OPACITY:
|
case AttributeType::Rotate:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_ROTATE:
|
case AttributeType::SkewX:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_SKEW_X:
|
case AttributeType::SkewY:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_SKEW_Y:
|
case AttributeType::Visibility:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_VISIBILITY:
|
case AttributeType::Width:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_WIDTH:
|
case AttributeType::PosX:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_POS_X:
|
case AttributeType::PosY:
|
||||||
// FALLTHROUGH intended
|
|
||||||
case ATTRIBUTE_POS_Y:
|
|
||||||
ENSURE_OR_THROW( false,
|
ENSURE_OR_THROW( false,
|
||||||
"AnimationFactory::createColorPropertyAnimation(): Attribute type mismatch" );
|
"AnimationFactory::createColorPropertyAnimation(): Attribute type mismatch" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ATTRIBUTE_CHAR_COLOR:
|
case AttributeType::CharColor:
|
||||||
return makeGenericAnimation<ColorAnimation>( rShapeManager,
|
return makeGenericAnimation<ColorAnimation>( rShapeManager,
|
||||||
nFlags,
|
nFlags,
|
||||||
&ShapeAttributeLayer::isCharColorValid,
|
&ShapeAttributeLayer::isCharColorValid,
|
||||||
@@ -1110,7 +1096,7 @@ namespace slideshow
|
|||||||
&ShapeAttributeLayer::getCharColor,
|
&ShapeAttributeLayer::getCharColor,
|
||||||
&ShapeAttributeLayer::setCharColor );
|
&ShapeAttributeLayer::setCharColor );
|
||||||
|
|
||||||
case ATTRIBUTE_COLOR:
|
case AttributeType::Color:
|
||||||
// TODO(F2): This is just mapped to fill color to make it work
|
// TODO(F2): This is just mapped to fill color to make it work
|
||||||
return makeGenericAnimation<ColorAnimation>( rShapeManager,
|
return makeGenericAnimation<ColorAnimation>( rShapeManager,
|
||||||
nFlags,
|
nFlags,
|
||||||
@@ -1119,7 +1105,7 @@ namespace slideshow
|
|||||||
&ShapeAttributeLayer::getFillColor,
|
&ShapeAttributeLayer::getFillColor,
|
||||||
&ShapeAttributeLayer::setFillColor );
|
&ShapeAttributeLayer::setFillColor );
|
||||||
|
|
||||||
case ATTRIBUTE_DIMCOLOR:
|
case AttributeType::DimColor:
|
||||||
return makeGenericAnimation<ColorAnimation>( rShapeManager,
|
return makeGenericAnimation<ColorAnimation>( rShapeManager,
|
||||||
nFlags,
|
nFlags,
|
||||||
&ShapeAttributeLayer::isDimColorValid,
|
&ShapeAttributeLayer::isDimColorValid,
|
||||||
@@ -1127,7 +1113,7 @@ namespace slideshow
|
|||||||
&ShapeAttributeLayer::getDimColor,
|
&ShapeAttributeLayer::getDimColor,
|
||||||
&ShapeAttributeLayer::setDimColor );
|
&ShapeAttributeLayer::setDimColor );
|
||||||
|
|
||||||
case ATTRIBUTE_FILL_COLOR:
|
case AttributeType::FillColor:
|
||||||
return makeGenericAnimation<ColorAnimation>( rShapeManager,
|
return makeGenericAnimation<ColorAnimation>( rShapeManager,
|
||||||
nFlags,
|
nFlags,
|
||||||
&ShapeAttributeLayer::isFillColorValid,
|
&ShapeAttributeLayer::isFillColorValid,
|
||||||
@@ -1135,7 +1121,7 @@ namespace slideshow
|
|||||||
&ShapeAttributeLayer::getFillColor,
|
&ShapeAttributeLayer::getFillColor,
|
||||||
&ShapeAttributeLayer::setFillColor );
|
&ShapeAttributeLayer::setFillColor );
|
||||||
|
|
||||||
case ATTRIBUTE_LINE_COLOR:
|
case AttributeType::LineColor:
|
||||||
return makeGenericAnimation<ColorAnimation>( rShapeManager,
|
return makeGenericAnimation<ColorAnimation>( rShapeManager,
|
||||||
nFlags,
|
nFlags,
|
||||||
&ShapeAttributeLayer::isLineColorValid,
|
&ShapeAttributeLayer::isLineColorValid,
|
||||||
@@ -1212,57 +1198,55 @@ namespace slideshow
|
|||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_INVALID:
|
case AttributeType::Invalid:
|
||||||
ENSURE_OR_THROW( false,
|
ENSURE_OR_THROW( false,
|
||||||
"AnimationFactory::createStringPropertyAnimation(): Unknown attribute" );
|
"AnimationFactory::createStringPropertyAnimation(): Unknown attribute" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ATTRIBUTE_CHAR_COLOR:
|
case AttributeType::CharColor:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_CHAR_HEIGHT:
|
case AttributeType::CharHeight:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_CHAR_ROTATION:
|
case AttributeType::CharUnderline:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_CHAR_UNDERLINE:
|
case AttributeType::Color:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_COLOR:
|
case AttributeType::DimColor:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_DIMCOLOR:
|
case AttributeType::FillColor:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_FILL_COLOR:
|
case AttributeType::Height:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_HEIGHT:
|
case AttributeType::LineColor:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_LINE_COLOR:
|
case AttributeType::Opacity:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_OPACITY:
|
case AttributeType::Rotate:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_ROTATE:
|
case AttributeType::SkewX:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_SKEW_X:
|
case AttributeType::SkewY:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_SKEW_Y:
|
case AttributeType::Visibility:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_VISIBILITY:
|
case AttributeType::Width:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_WIDTH:
|
case AttributeType::PosX:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_POS_X:
|
case AttributeType::PosY:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_POS_Y:
|
case AttributeType::CharPosture:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_CHAR_POSTURE:
|
case AttributeType::CharWeight:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_CHAR_WEIGHT:
|
case AttributeType::FillStyle:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_FILL_STYLE:
|
case AttributeType::LineStyle:
|
||||||
// FALLTHROUGH intended
|
|
||||||
case ATTRIBUTE_LINE_STYLE:
|
|
||||||
ENSURE_OR_THROW( false,
|
ENSURE_OR_THROW( false,
|
||||||
"AnimationFactory::createStringPropertyAnimation(): Attribute type mismatch" );
|
"AnimationFactory::createStringPropertyAnimation(): Attribute type mismatch" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ATTRIBUTE_CHAR_FONT_NAME:
|
case AttributeType::CharFontName:
|
||||||
return makeGenericAnimation<StringAnimation>( rShapeManager,
|
return makeGenericAnimation<StringAnimation>( rShapeManager,
|
||||||
nFlags,
|
nFlags,
|
||||||
&ShapeAttributeLayer::isFontFamilyValid,
|
&ShapeAttributeLayer::isFontFamilyValid,
|
||||||
@@ -1286,57 +1270,55 @@ namespace slideshow
|
|||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_INVALID:
|
case AttributeType::Invalid:
|
||||||
ENSURE_OR_THROW( false,
|
ENSURE_OR_THROW( false,
|
||||||
"AnimationFactory::createBoolPropertyAnimation(): Unknown attribute" );
|
"AnimationFactory::createBoolPropertyAnimation(): Unknown attribute" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ATTRIBUTE_CHAR_COLOR:
|
case AttributeType::CharColor:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_CHAR_FONT_NAME:
|
case AttributeType::CharFontName:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_CHAR_HEIGHT:
|
case AttributeType::CharHeight:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_CHAR_POSTURE:
|
case AttributeType::CharPosture:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_CHAR_ROTATION:
|
case AttributeType::CharWeight:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_CHAR_WEIGHT:
|
case AttributeType::Color:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_COLOR:
|
case AttributeType::DimColor:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_DIMCOLOR:
|
case AttributeType::FillColor:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_FILL_COLOR:
|
case AttributeType::FillStyle:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_FILL_STYLE:
|
case AttributeType::Height:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_HEIGHT:
|
case AttributeType::LineColor:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_LINE_COLOR:
|
case AttributeType::LineStyle:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_LINE_STYLE:
|
case AttributeType::Opacity:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_OPACITY:
|
case AttributeType::Rotate:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_ROTATE:
|
case AttributeType::SkewX:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_SKEW_X:
|
case AttributeType::SkewY:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_SKEW_Y:
|
case AttributeType::Width:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_WIDTH:
|
case AttributeType::PosX:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_POS_X:
|
case AttributeType::PosY:
|
||||||
// FALLTHROUGH intended
|
// FALLTHROUGH intended
|
||||||
case ATTRIBUTE_POS_Y:
|
case AttributeType::CharUnderline:
|
||||||
// FALLTHROUGH intended
|
|
||||||
case ATTRIBUTE_CHAR_UNDERLINE:
|
|
||||||
ENSURE_OR_THROW( false,
|
ENSURE_OR_THROW( false,
|
||||||
"AnimationFactory::createBoolPropertyAnimation(): Attribute type mismatch" );
|
"AnimationFactory::createBoolPropertyAnimation(): Attribute type mismatch" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ATTRIBUTE_VISIBILITY:
|
case AttributeType::Visibility:
|
||||||
return makeGenericAnimation<BoolAnimation>( rShapeManager,
|
return makeGenericAnimation<BoolAnimation>( rShapeManager,
|
||||||
nFlags,
|
nFlags,
|
||||||
&ShapeAttributeLayer::isVisibilityValid,
|
&ShapeAttributeLayer::isVisibilityValid,
|
||||||
|
@@ -41,44 +41,44 @@ namespace slideshow
|
|||||||
*/
|
*/
|
||||||
static const AnimateAttributeMap::MapEntry lcl_attributeMap[] =
|
static const AnimateAttributeMap::MapEntry lcl_attributeMap[] =
|
||||||
{
|
{
|
||||||
{ "charcolor", ATTRIBUTE_CHAR_COLOR },
|
{ "charcolor", AttributeType::CharColor },
|
||||||
{ "charfontname", ATTRIBUTE_CHAR_FONT_NAME },
|
{ "charfontname", AttributeType::CharFontName },
|
||||||
{ "charheight", ATTRIBUTE_CHAR_HEIGHT },
|
{ "charheight", AttributeType::CharHeight },
|
||||||
{ "charposture", ATTRIBUTE_CHAR_POSTURE },
|
{ "charposture", AttributeType::CharPosture },
|
||||||
// TODO(Q1): This should prolly be changed in PPT import
|
// TODO(Q1): This should prolly be changed in PPT import
|
||||||
// { "charrotation", ATTRIBUTE_CHAR_ROTATION },
|
// { "charrotation", AttributeType::CharRotation },
|
||||||
{ "charrotation", ATTRIBUTE_ROTATE },
|
{ "charrotation", AttributeType::Rotate },
|
||||||
{ "charunderline", ATTRIBUTE_CHAR_UNDERLINE },
|
{ "charunderline", AttributeType::CharUnderline },
|
||||||
{ "charweight", ATTRIBUTE_CHAR_WEIGHT },
|
{ "charweight", AttributeType::CharWeight },
|
||||||
{ "color", ATTRIBUTE_COLOR },
|
{ "color", AttributeType::Color },
|
||||||
{ "dimcolor", ATTRIBUTE_DIMCOLOR },
|
{ "dimcolor", AttributeType::DimColor },
|
||||||
{ "fillcolor", ATTRIBUTE_FILL_COLOR },
|
{ "fillcolor", AttributeType::FillColor },
|
||||||
{ "fillstyle", ATTRIBUTE_FILL_STYLE },
|
{ "fillstyle", AttributeType::FillStyle },
|
||||||
{ "height", ATTRIBUTE_HEIGHT },
|
{ "height", AttributeType::Height },
|
||||||
{ "linecolor", ATTRIBUTE_LINE_COLOR },
|
{ "linecolor", AttributeType::LineColor },
|
||||||
{ "linestyle", ATTRIBUTE_LINE_STYLE },
|
{ "linestyle", AttributeType::LineStyle },
|
||||||
{ "opacity", ATTRIBUTE_OPACITY },
|
{ "opacity", AttributeType::Opacity },
|
||||||
{ "rotate", ATTRIBUTE_ROTATE },
|
{ "rotate", AttributeType::Rotate },
|
||||||
{ "skewx", ATTRIBUTE_SKEW_X },
|
{ "skewx", AttributeType::SkewX },
|
||||||
{ "skewy", ATTRIBUTE_SKEW_Y },
|
{ "skewy", AttributeType::SkewY },
|
||||||
{ "visibility", ATTRIBUTE_VISIBILITY },
|
{ "visibility", AttributeType::Visibility },
|
||||||
{ "width", ATTRIBUTE_WIDTH },
|
{ "width", AttributeType::Width },
|
||||||
{ "x", ATTRIBUTE_POS_X },
|
{ "x", AttributeType::PosX },
|
||||||
{ "y", ATTRIBUTE_POS_Y }
|
{ "y", AttributeType::PosY }
|
||||||
};
|
};
|
||||||
|
|
||||||
static const AnimateAttributeMap aMap( lcl_attributeMap,
|
static const AnimateAttributeMap aMap( lcl_attributeMap,
|
||||||
SAL_N_ELEMENTS(lcl_attributeMap),
|
SAL_N_ELEMENTS(lcl_attributeMap),
|
||||||
false );
|
false );
|
||||||
|
|
||||||
AttributeType eAttributeType = ATTRIBUTE_INVALID;
|
AttributeType eAttributeType = AttributeType::Invalid;
|
||||||
|
|
||||||
// determine the type from the attribute name
|
// determine the type from the attribute name
|
||||||
if( !aMap.lookup( rAttrName,
|
if( !aMap.lookup( rAttrName,
|
||||||
eAttributeType ) )
|
eAttributeType ) )
|
||||||
{
|
{
|
||||||
SAL_WARN("slideshow", "mapAttributeName(): attribute name not found in map: " << rAttrName);
|
SAL_WARN("slideshow", "mapAttributeName(): attribute name not found in map: " << rAttrName);
|
||||||
return ATTRIBUTE_INVALID;
|
return AttributeType::Invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
return eAttributeType;
|
return eAttributeType;
|
||||||
|
@@ -33,36 +33,35 @@ namespace slideshow
|
|||||||
This enum describes the type of an animated
|
This enum describes the type of an animated
|
||||||
attribute.
|
attribute.
|
||||||
*/
|
*/
|
||||||
enum AttributeType
|
enum class AttributeType
|
||||||
{
|
{
|
||||||
ATTRIBUTE_INVALID,
|
Invalid,
|
||||||
ATTRIBUTE_CHAR_COLOR,
|
CharColor,
|
||||||
ATTRIBUTE_CHAR_FONT_NAME,
|
CharFontName,
|
||||||
ATTRIBUTE_CHAR_HEIGHT,
|
CharHeight,
|
||||||
ATTRIBUTE_CHAR_POSTURE,
|
CharPosture,
|
||||||
ATTRIBUTE_CHAR_ROTATION,
|
CharUnderline,
|
||||||
ATTRIBUTE_CHAR_UNDERLINE,
|
CharWeight,
|
||||||
ATTRIBUTE_CHAR_WEIGHT,
|
Color,
|
||||||
ATTRIBUTE_COLOR,
|
DimColor,
|
||||||
ATTRIBUTE_DIMCOLOR,
|
FillColor,
|
||||||
ATTRIBUTE_FILL_COLOR,
|
FillStyle,
|
||||||
ATTRIBUTE_FILL_STYLE,
|
Height,
|
||||||
ATTRIBUTE_HEIGHT,
|
LineColor,
|
||||||
ATTRIBUTE_LINE_COLOR,
|
LineStyle,
|
||||||
ATTRIBUTE_LINE_STYLE,
|
Opacity,
|
||||||
ATTRIBUTE_OPACITY,
|
Rotate,
|
||||||
ATTRIBUTE_ROTATE,
|
SkewX,
|
||||||
ATTRIBUTE_SKEW_X,
|
SkewY,
|
||||||
ATTRIBUTE_SKEW_Y,
|
Visibility,
|
||||||
ATTRIBUTE_VISIBILITY,
|
Width,
|
||||||
ATTRIBUTE_WIDTH,
|
PosX,
|
||||||
ATTRIBUTE_POS_X,
|
PosY
|
||||||
ATTRIBUTE_POS_Y
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Map attribute name to AttributeType enum
|
/** Map attribute name to AttributeType enum
|
||||||
|
|
||||||
@returns ATTRIBUTE_INVALID, if name was not found in the
|
@returns AttributeType::Invalid, if name was not found in the
|
||||||
mapping table.
|
mapping table.
|
||||||
*/
|
*/
|
||||||
AttributeType mapAttributeName( const OUString& rAttrName );
|
AttributeType mapAttributeName( const OUString& rAttrName );
|
||||||
|
Reference in New Issue
Block a user