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

« back to all changes in this revision

Viewing changes to kword/part/KWViewMode.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:
1
1
/* This file is part of the KDE project
2
2
 * Copyright (C) 2001 David Faure <faure@kde.org>
3
3
 * Copyright (C) 2005-2006 Thomas Zander <zander@kde.org>
 
4
 * Copyright (C) 2010 Boudewijn Rempt <boud@kogmbh.com>
4
5
 *
5
6
 * This library is free software; you can redistribute it and/or
6
7
 * modify it under the terms of the GNU Library General Public
20
21
 
21
22
#include "KWViewMode.h"
22
23
 
23
 
#include "KWCanvas.h"
 
24
#include <KoCanvasBase.h>
24
25
 
 
26
#include "KWDocument.h"
25
27
#include "KWViewModeNormal.h"
26
28
#include "KWViewModePreview.h"
27
29
 
58
60
}
59
61
 
60
62
// static
61
 
KWViewMode *KWViewMode::create(const QString &viewModeType, KWCanvas *canvas)
 
63
KWViewMode *KWViewMode::create(const QString &viewModeType, KWDocument *document, KoCanvasBase *canvas)
62
64
{
63
65
    KWViewMode * vm = 0;
64
66
    if (viewModeType == KWViewModePreview::viewMode())
66
68
    if (vm == 0)
67
69
        vm = new KWViewModeNormal();
68
70
 
69
 
    vm->setPageManager(canvas->document()->pageManager());
 
71
    vm->setPageManager(document->pageManager());
70
72
    vm->setViewConverter(canvas->viewConverter());
71
73
    return vm;
72
74
}