~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to kformula/flake/tests/TestCursor.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-10-27 17:52:57 UTC
  • mfrom: (0.12.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20101027175257-s04zqqk5bs8ckm9o
Tags: 1:2.2.83-0ubuntu1
* Merge with Debian git remaining changes:
 - Add build-deps on librcps-dev, opengtl-dev, libqtgtl-dev, freetds-dev,
   create-resources, libspnav-dev
 - Remove needless build-dep on libwv2-dev
 - koffice-libs recommends create-resources
 - krita recommends pstoedit
 - Keep our patches
* New upstream release 2.3 beta 3
  - Remove debian/patches fixed by upstream
  - Update install files

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
    bool snapToGrid() const  {
50
50
        return false;
51
51
    }
52
 
    
 
52
 
53
53
    void addCommand(QUndoCommand* c) {
54
54
//         c->redo();
55
55
        stack->push(c);
74
74
        return KoUnit(KoUnit::Millimeter);
75
75
    }
76
76
    void updateInputMethodInfo() {}
 
77
    void setCursor(const QCursor &) {}
77
78
};
78
79
 
79
80
void TestCursor::moveCursor()
80
81
{
81
82
    MockCanvas* canvas=new MockCanvas();
82
 
    KoFormulaShape* shape = new KoFormulaShape();
83
 
    canvas->shapeManager()->add(shape);
 
83
    KoFormulaShape* shape = new KoFormulaShape(NULL); // FIXME: Do we need a real resourceManager here?
 
84
    canvas->shapeManager()->addShape(shape);
84
85
    canvas->shapeManager()->selection()->select(shape);
85
86
    QCOMPARE(canvas->shapeManager()->selection()->count(),1);
86
87
    KoFormulaTool* tool= new KoFormulaTool(canvas);