summaryrefslogtreecommitdiff
path: root/slideshow/source/engine/shapeattributelayer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'slideshow/source/engine/shapeattributelayer.cxx')
-rw-r--r--slideshow/source/engine/shapeattributelayer.cxx206
1 files changed, 103 insertions, 103 deletions
diff --git a/slideshow/source/engine/shapeattributelayer.cxx b/slideshow/source/engine/shapeattributelayer.cxx
index a86c7c916326..c17da20a408e 100644
--- a/slideshow/source/engine/shapeattributelayer.cxx
+++ b/slideshow/source/engine/shapeattributelayer.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -56,7 +56,7 @@ namespace slideshow
namespace internal
{
/** Update state ids
-
+
This method updates all state IDs from possible
children. Whenever a child's state ID changed, we
increment ours.
@@ -86,10 +86,10 @@ namespace slideshow
appropriately combining it with children values (by
evaluating the mnAdditiveMode member).
*/
- template< typename T > T ShapeAttributeLayer::calcValue( const T& rCurrValue,
- bool bThisInstanceValid,
+ template< typename T > T ShapeAttributeLayer::calcValue( const T& rCurrValue,
+ bool bThisInstanceValid,
bool (ShapeAttributeLayer::*pIsValid)() const,
- T (ShapeAttributeLayer::*pGetValue)() const ) const
+ T (ShapeAttributeLayer::*pGetValue)() const ) const
{
// deviated from the (*shared_ptr).*mpFuncPtr notation
// here, since gcc does not seem to parse that as a member
@@ -110,10 +110,10 @@ namespace slideshow
case animations::AnimationAdditiveMode::BASE:
// FALTHROUGH intended
case animations::AnimationAdditiveMode::REPLACE:
- // TODO(F2): reverse-engineer the semantics of these
+ // TODO(F2): reverse-engineer the semantics of these
// values
-
- // currently, treat them the same and replace
+
+ // currently, treat them the same and replace
// the child value by our own
return rCurrValue;
@@ -126,16 +126,16 @@ namespace slideshow
}
else
{
- // this object is the only one defining
+ // this object is the only one defining
// the value, so take it
return rCurrValue;
}
}
else
{
- return bChildInstanceValueValid ?
- ((*mpChild).*pGetValue)() :
- T(); // pass on child value, regardless
+ return bChildInstanceValueValid ?
+ ((*mpChild).*pGetValue)() :
+ T(); // pass on child value, regardless
// if it's valid or not. If not, it's
// a default anyway
}
@@ -160,7 +160,7 @@ namespace slideshow
meFillStyle( drawing::FillStyle_NONE ),
meLineStyle( drawing::LineStyle_NONE ),
- meCharPosture( awt::FontSlant_NONE ),
+ meCharPosture( awt::FontSlant_NONE ),
mnUnderlineMode(),
maDimColor(),
@@ -179,33 +179,33 @@ namespace slideshow
mbVisibility( false ),
- mbWidthValid( false ),
- mbHeightValid( false ),
- mbPosXValid( false ),
- mbPosYValid( false ),
- mbClipValid( false ),
+ mbWidthValid( false ),
+ mbHeightValid( false ),
+ mbPosXValid( false ),
+ mbPosYValid( false ),
+ mbClipValid( false ),
- mbFontFamilyValid( false ),
+ mbFontFamilyValid( false ),
- mbRotationAngleValid( false ),
- mbShearXAngleValid( false ),
- mbShearYAngleValid( false ),
+ mbRotationAngleValid( false ),
+ mbShearXAngleValid( false ),
+ mbShearYAngleValid( false ),
- mbAlphaValid( false ),
+ mbAlphaValid( false ),
mbCharRotationAngleValid( false ),
- mbCharScaleValid( false ),
-
- mbDimColorValid( false ),
- mbFillColorValid( false ),
- mbLineColorValid( false ),
- mbCharColorValid( false ),
-
- mbFillStyleValid( false ),
- mbLineStyleValid( false ),
- mbCharWeightValid( false ),
- mbUnderlineModeValid( false ),
- mbCharPostureValid( false ),
+ mbCharScaleValid( false ),
+
+ mbDimColorValid( false ),
+ mbFillColorValid( false ),
+ mbLineColorValid( false ),
+ mbCharColorValid( false ),
+
+ mbFillStyleValid( false ),
+ mbLineStyleValid( false ),
+ mbCharWeightValid( false ),
+ mbUnderlineModeValid( false ),
+ mbCharPostureValid( false ),
mbVisibilityValid( false )
{
}
@@ -223,7 +223,7 @@ namespace slideshow
// we have it - replace by removed child's sibling.
mpChild = rChildLayer->getChildLayer();
- // if we're now the first one, defensively increment _all_
+ // if we're now the first one, defensively increment _all_
// state ids: possibly all underlying attributes have now
// changed to default
if( !haveChild() )
@@ -234,8 +234,8 @@ namespace slideshow
++mnClipState;
++mnAlphaState;
++mnPositionState;
- ++mnContentState;
- ++mnVisibilityState;
+ ++mnContentState;
+ ++mnVisibilityState;
}
}
else
@@ -250,12 +250,12 @@ namespace slideshow
return true;
}
-
+
ShapeAttributeLayerSharedPtr ShapeAttributeLayer::getChildLayer() const
{
return mpChild;
}
-
+
void ShapeAttributeLayer::setAdditiveMode( sal_Int16 nMode )
{
if( mnAdditiveMode != nMode )
@@ -263,15 +263,15 @@ namespace slideshow
// TODO(P1): Check whether it pays off to check more
// detailed, which attributes really change
- // defensively increment all states - possibly each of them
+ // defensively increment all states - possibly each of them
// will change with different additive mode
++mnTransformationState;
++mnClipState;
++mnAlphaState;
++mnPositionState;
- ++mnContentState;
- ++mnVisibilityState;
- }
+ ++mnContentState;
+ ++mnVisibilityState;
+ }
mnAdditiveMode = nMode;
}
@@ -280,13 +280,13 @@ namespace slideshow
{
return mbWidthValid ? true : haveChild() ? mpChild->isWidthValid() : false;
}
-
+
double ShapeAttributeLayer::getWidth() const
{
- return calcValue< double >(
+ return calcValue< double >(
maSize.getX(),
mbWidthValid,
- &ShapeAttributeLayer::isWidthValid,
+ &ShapeAttributeLayer::isWidthValid,
&ShapeAttributeLayer::getWidth );
}
@@ -304,13 +304,13 @@ namespace slideshow
{
return mbHeightValid ? true : haveChild() ? mpChild->isHeightValid() : false;
}
-
+
double ShapeAttributeLayer::getHeight() const
{
- return calcValue< double >(
+ return calcValue< double >(
maSize.getY(),
mbHeightValid,
- &ShapeAttributeLayer::isHeightValid,
+ &ShapeAttributeLayer::isHeightValid,
&ShapeAttributeLayer::getHeight );
}
@@ -342,10 +342,10 @@ namespace slideshow
double ShapeAttributeLayer::getPosX() const
{
- return calcValue< double >(
+ return calcValue< double >(
maPosition.getX(),
mbPosXValid,
- &ShapeAttributeLayer::isPosXValid,
+ &ShapeAttributeLayer::isPosXValid,
&ShapeAttributeLayer::getPosX );
}
@@ -366,10 +366,10 @@ namespace slideshow
double ShapeAttributeLayer::getPosY() const
{
- return calcValue< double >(
+ return calcValue< double >(
maPosition.getY(),
mbPosYValid,
- &ShapeAttributeLayer::isPosYValid,
+ &ShapeAttributeLayer::isPosYValid,
&ShapeAttributeLayer::getPosY );
}
@@ -397,10 +397,10 @@ namespace slideshow
double ShapeAttributeLayer::getRotationAngle() const
{
- return calcValue< double >(
+ return calcValue< double >(
mnRotationAngle,
mbRotationAngleValid,
- &ShapeAttributeLayer::isRotationAngleValid,
+ &ShapeAttributeLayer::isRotationAngleValid,
&ShapeAttributeLayer::getRotationAngle );
}
@@ -421,7 +421,7 @@ namespace slideshow
double ShapeAttributeLayer::getShearXAngle() const
{
- return calcValue( mnShearXAngle,
+ return calcValue( mnShearXAngle,
mbShearXAngleValid,
&ShapeAttributeLayer::isShearXAngleValid,
&ShapeAttributeLayer::getShearXAngle );
@@ -444,7 +444,7 @@ namespace slideshow
double ShapeAttributeLayer::getShearYAngle() const
{
- return calcValue( mnShearYAngle,
+ return calcValue( mnShearYAngle,
mbShearYAngleValid,
&ShapeAttributeLayer::isShearYAngleValid,
&ShapeAttributeLayer::getShearYAngle );
@@ -467,7 +467,7 @@ namespace slideshow
double ShapeAttributeLayer::getAlpha() const
{
- return calcValue( mnAlpha,
+ return calcValue( mnAlpha,
mbAlphaValid,
&ShapeAttributeLayer::isAlphaValid,
&ShapeAttributeLayer::getAlpha );
@@ -482,7 +482,7 @@ namespace slideshow
mbAlphaValid = true;
++mnAlphaState;
}
-
+
bool ShapeAttributeLayer::isClipValid() const
{
return mbClipValid ? true : haveChild() ? mpChild->isClipValid() : false;
@@ -510,10 +510,10 @@ namespace slideshow
{
return mbDimColorValid ? true : haveChild() ? mpChild->isDimColorValid() : false;
}
-
+
RGBColor ShapeAttributeLayer::getDimColor() const
{
- return calcValue( maDimColor,
+ return calcValue( maDimColor,
mbDimColorValid,
&ShapeAttributeLayer::isDimColorValid,
&ShapeAttributeLayer::getDimColor );
@@ -530,10 +530,10 @@ namespace slideshow
{
return mbFillColorValid ? true : haveChild() ? mpChild->isFillColorValid() : false;
}
-
+
RGBColor ShapeAttributeLayer::getFillColor() const
{
- return calcValue( maFillColor,
+ return calcValue( maFillColor,
mbFillColorValid,
&ShapeAttributeLayer::isFillColorValid,
&ShapeAttributeLayer::getFillColor );
@@ -553,7 +553,7 @@ namespace slideshow
RGBColor ShapeAttributeLayer::getLineColor() const
{
- return calcValue( maLineColor,
+ return calcValue( maLineColor,
mbLineColorValid,
&ShapeAttributeLayer::isLineColorValid,
&ShapeAttributeLayer::getLineColor );
@@ -570,10 +570,10 @@ namespace slideshow
{
return mbFillStyleValid ? true : haveChild() ? mpChild->isFillStyleValid() : false;
}
-
+
sal_Int16 ShapeAttributeLayer::getFillStyle() const
{
- // mnAdditiveMode is ignored, cannot combine strings in
+ // mnAdditiveMode is ignored, cannot combine strings in
// any sensible way
if( mbFillStyleValid )
return sal::static_int_cast<sal_Int16>(meFillStyle);
@@ -598,7 +598,7 @@ namespace slideshow
sal_Int16 ShapeAttributeLayer::getLineStyle() const
{
- // mnAdditiveMode is ignored, cannot combine strings in
+ // mnAdditiveMode is ignored, cannot combine strings in
// any sensible way
if( mbLineStyleValid )
return sal::static_int_cast<sal_Int16>(meLineStyle);
@@ -647,7 +647,7 @@ namespace slideshow
RGBColor ShapeAttributeLayer::getCharColor() const
{
- return calcValue( maCharColor,
+ return calcValue( maCharColor,
mbCharColorValid,
&ShapeAttributeLayer::isCharColorValid,
&ShapeAttributeLayer::getCharColor );
@@ -659,7 +659,7 @@ namespace slideshow
mbCharColorValid = true;
++mnContentState;
}
-
+
bool ShapeAttributeLayer::isCharRotationAngleValid() const
{
return mbCharRotationAngleValid ? true : haveChild() ? mpChild->isCharRotationAngleValid() : false;
@@ -667,7 +667,7 @@ namespace slideshow
double ShapeAttributeLayer::getCharRotationAngle() const
{
- return calcValue( mnCharRotationAngle,
+ return calcValue( mnCharRotationAngle,
mbCharRotationAngleValid,
&ShapeAttributeLayer::isCharRotationAngleValid,
&ShapeAttributeLayer::getCharRotationAngle );
@@ -690,7 +690,7 @@ namespace slideshow
double ShapeAttributeLayer::getCharWeight() const
{
- // mnAdditiveMode is ignored, cannot combine strings in
+ // mnAdditiveMode is ignored, cannot combine strings in
// any sensible way
if( mbCharWeightValid )
return mnCharWeight;
@@ -707,7 +707,7 @@ namespace slideshow
mbCharWeightValid = true;
++mnContentState;
}
-
+
bool ShapeAttributeLayer::isUnderlineModeValid() const
{
return mbUnderlineModeValid ? true : haveChild() ? mpChild->isUnderlineModeValid() : false;
@@ -740,7 +740,7 @@ namespace slideshow
::rtl::OUString ShapeAttributeLayer::getFontFamily() const
{
- // mnAdditiveMode is ignored, cannot combine strings in
+ // mnAdditiveMode is ignored, cannot combine strings in
// any sensible way
if( mbFontFamilyValid )
return maFontFamily;
@@ -764,7 +764,7 @@ namespace slideshow
sal_Int16 ShapeAttributeLayer::getCharPosture() const
{
- // mnAdditiveMode is ignored, cannot combine strings in
+ // mnAdditiveMode is ignored, cannot combine strings in
// any sensible way
if( mbCharPostureValid )
return sal::static_int_cast<sal_Int16>(meCharPosture);
@@ -789,7 +789,7 @@ namespace slideshow
double ShapeAttributeLayer::getCharScale() const
{
- return calcValue( mnCharScale,
+ return calcValue( mnCharScale,
mbCharScaleValid,
&ShapeAttributeLayer::isCharScaleValid,
&ShapeAttributeLayer::getCharScale );
@@ -805,54 +805,54 @@ namespace slideshow
++mnContentState;
}
- State::StateId ShapeAttributeLayer::getTransformationState() const
- {
- return haveChild() ?
+ State::StateId ShapeAttributeLayer::getTransformationState() const
+ {
+ return haveChild() ?
::std::max( mnTransformationState,
- mpChild->getTransformationState() ) :
- mnTransformationState;
+ mpChild->getTransformationState() ) :
+ mnTransformationState;
}
State::StateId ShapeAttributeLayer::getClipState() const
- {
- return haveChild() ?
+ {
+ return haveChild() ?
::std::max( mnClipState,
- mpChild->getClipState() ) :
- mnClipState;
+ mpChild->getClipState() ) :
+ mnClipState;
}
State::StateId ShapeAttributeLayer::getAlphaState() const
- {
- return haveChild() ?
+ {
+ return haveChild() ?
::std::max( mnAlphaState,
- mpChild->getAlphaState() ) :
- mnAlphaState;
+ mpChild->getAlphaState() ) :
+ mnAlphaState;
}
State::StateId ShapeAttributeLayer::getPositionState() const
- {
- return haveChild() ?
+ {
+ return haveChild() ?
::std::max( mnPositionState,
- mpChild->getPositionState() ) :
- mnPositionState;
+ mpChild->getPositionState() ) :
+ mnPositionState;
}
State::StateId ShapeAttributeLayer::getContentState() const
- {
- return haveChild() ?
+ {
+ return haveChild() ?
::std::max( mnContentState,
- mpChild->getContentState() ) :
- mnContentState;
+ mpChild->getContentState() ) :
+ mnContentState;
}
-
+
State::StateId ShapeAttributeLayer::getVisibilityState() const
- {
- return haveChild() ?
+ {
+ return haveChild() ?
::std::max( mnVisibilityState,
- mpChild->getVisibilityState() ) :
- mnVisibilityState;
+ mpChild->getVisibilityState() ) :
+ mnVisibilityState;
}
-
+
}
}