~smartboyhw/ubuntu/raring/calligra/2.6.0-0ubuntu1

« back to all changes in this revision

Viewing changes to stage/part/animations/strategy/KPrAttributeHeight.cpp

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2012-10-23 21:09:16 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20121023210916-m82w6zxnxhaxz7va
Tags: 1:2.5.90-0ubuntu1
* New upstream alpha release (LP: #1070436)
  - Add libkactivities-dev and libopenimageio-dev to build-depends
  - Add kubuntu_build_calligraactive.diff to build calligraactive by default
  - Add package for calligraauthor and move files that are shared between
    calligrawords and calligraauthor to calligrawords-common
* Document the patches
* Remove numbers from patches so they follow the same naming scheme as
  the rest of our patches.
* calligra-data breaks replaces krita-data (<< 1:2.5.3) (LP: #1071686)

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include "../KPrAnimationCache.h"
22
22
#include "KoShape.h"
23
23
#include "KPrShapeAnimations.h"
24
 
#include "KoTextBlockData.h"
25
24
#include "KoTextShapeData.h"
26
25
#include <QTextDocument>
27
26
#include <QTextLayout>
34
33
{
35
34
    qreal tx = 0.0, ty = 0.0;
36
35
    KoShape * shape = shapeAnimation->shape();
37
 
    KoTextBlockData * textBlockData = shapeAnimation->textBlockData();
 
36
    QTextBlockUserData *textBlockData = shapeAnimation->textBlockUserData();
38
37
    QTransform transform;
39
38
    if (textBlockData) {
40
39
        if (KoTextShapeData *textShapeData = dynamic_cast<KoTextShapeData*>(shape->userData())) {
55
54
        tx = shape->size().width() * cache->zoom() / 2;
56
55
        ty = shape->size().height() * cache->zoom() / 2;
57
56
    }    transform.translate(tx, ty).scale(1, value).translate(-tx, -ty);
58
 
    cache->update(shape, shapeAnimation->textBlockData(), "transform", transform);
 
57
    cache->update(shape, textBlockData, "transform", transform);
59
58
}
60
59
 
61
60
void KPrAttributeHeight::initCache(KPrAnimationCache *animationCache, int step, KPrShapeAnimation * shapeAnimation, qreal startValue, qreal endValue)
62
61
{
63
62
    qreal v1 = 0.0, v2 = 0.0, tx = 0.0, ty = 0.0;
64
63
    KoShape * shape = shapeAnimation->shape();
65
 
    KoTextBlockData * textBlockData = shapeAnimation->textBlockData();
 
64
    QTextBlockUserData *textBlockData = shapeAnimation->textBlockUserData();
66
65
 
67
66
    if (textBlockData) {
68
67
        if (KoTextShapeData *textShapeData = dynamic_cast<KoTextShapeData*>(shape->userData())) {