Commit e67f3d94 authored by Jan Hambrecht's avatar Jan Hambrecht

fix typo

svn path=/trunk/koffice/; revision=740694
parent 7b5f918d
......@@ -332,9 +332,9 @@ QPointF KoConnectionShape::escapeDirection( int handleId ) const
QPointF handlePoint = absoluteMatrix.map( m_handles[handleId] );
QPointF centerPoint;
if( handleId == 0 )
centerPoint = d->shape1->absolutePosition( KoFlake::CenteredPositon );
centerPoint = d->shape1->absolutePosition( KoFlake::CenteredPosition );
else
centerPoint = d->shape2->absolutePosition( KoFlake::CenteredPositon );
centerPoint = d->shape2->absolutePosition( KoFlake::CenteredPosition );
double angle = atan2( handlePoint.y()-centerPoint.y(), handlePoint.x()-centerPoint.x() );
if( angle < 0.0 )
......
......@@ -60,7 +60,7 @@ public:
TopRightCorner, ///< the top right corner
BottomLeftCorner, ///< the bottom left corner
BottomRightCorner, ///< the bottom right corner
CenteredPositon ///< the centred corner
CenteredPosition ///< the centred corner
};
......
......@@ -375,7 +375,7 @@ QPointF KoShape::absolutePosition(KoFlake::Position anchor) const {
case KoFlake::TopRightCorner: point = QPointF(size().width(), 0.0); break;
case KoFlake::BottomLeftCorner: point = QPointF(0.0, size().height()); break;
case KoFlake::BottomRightCorner: point = QPointF(size().width(), size().height()); break;
case KoFlake::CenteredPositon: point = QPointF(size().width() / 2.0, size().height() / 2.0); break;
case KoFlake::CenteredPosition: point = QPointF(size().width() / 2.0, size().height() / 2.0); break;
}
return absoluteTransformation(0).map(point);
}
......
......@@ -459,7 +459,7 @@ public:
* @param anchor The place on the (unaltered) shape that you want the position of.
* @return the point that is the absolute, centered position of this shape.
*/
QPointF absolutePosition(KoFlake::Position anchor = KoFlake::CenteredPositon) const;
QPointF absolutePosition(KoFlake::Position anchor = KoFlake::CenteredPosition) const;
/**
* Move this shape to an absolute position where the end location will be the same
......@@ -475,7 +475,7 @@ public:
* @param newPosition the new absolute center of the shape.
* @param anchor The place on the (unaltered) shape that you set the position of.
*/
void setAbsolutePosition(QPointF newPosition, KoFlake::Position anchor = KoFlake::CenteredPositon);
void setAbsolutePosition(QPointF newPosition, KoFlake::Position anchor = KoFlake::CenteredPosition);
/**
* Set a data object on the shape to be used by an application.
......
......@@ -72,7 +72,7 @@ void TestPosition::testAbsolutePosition() {
shape1->setPosition(QPointF(10, 10));
QCOMPARE(shape1->absolutePosition(), QPointF(10 + 25, 10 + 25) );
QCOMPARE(shape1->absolutePosition(KoFlake::CenteredPositon), QPointF(10 + 25, 10 + 25) );
QCOMPARE(shape1->absolutePosition(KoFlake::CenteredPosition), QPointF(10 + 25, 10 + 25) );
QCOMPARE(shape1->absolutePosition(KoFlake::TopLeftCorner), QPointF(10 + 50, 10) );
QCOMPARE(shape1->absolutePosition(KoFlake::BottomRightCorner), QPointF(10, 10 + 50) );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment