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

« back to all changes in this revision

Viewing changes to kspread/ui/HyperlinkStrategy.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-09-21 15:36:35 UTC
  • mfrom: (1.4.1 upstream) (60.2.11 maverick)
  • Revision ID: james.westby@ubuntu.com-20100921153635-6tejqkiro2u21ydi
Tags: 1:2.2.2-0ubuntu3
Add kubuntu_03_fix-crash-on-closing-sqlite-connection-2.2.2.diff and
kubuntu_04_support-large-memo-values-for-msaccess-2.2.2.diff as
recommended by upstream http://kexi-
project.org/wiki/wikiview/index.php@Kexi2.2_Patches.html#sqlite_stab
ility

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#include <KoCanvasBase.h>
27
27
#include <KoSelection.h>
28
28
#include <KoShapeManager.h>
29
 
#include <KoTool.h>
 
29
#include <KoToolBase.h>
30
30
 
31
31
#include <KMessageBox>
32
32
#include <KMimeType>
45
45
    QString url;
46
46
};
47
47
 
48
 
HyperlinkStrategy::HyperlinkStrategy(KoTool* parent, KoCanvasBase* m_canvas, Selection* selection,
 
48
HyperlinkStrategy::HyperlinkStrategy(KoToolBase* parent, Selection* selection,
49
49
                                     const QPointF documentPos, Qt::KeyboardModifiers modifiers,
50
50
                                     const QString& url, const QRectF& textRect)
51
 
    : AbstractSelectionStrategy(parent, m_canvas, selection, documentPos, modifiers)
52
 
    , d(new Private)
 
51
        : AbstractSelectionStrategy(parent, selection, documentPos, modifiers)
 
52
        , d(new Private)
53
53
{
54
54
    d->lastPoint = documentPos;
55
55
    d->textRect = textRect;
106
106
                                              "Are you sure that you want to run this program?", d->url);
107
107
                // this will also start local programs, so adding a "don't warn again"
108
108
                // checkbox will probably be too dangerous
109
 
                const int answer = KMessageBox::warningYesNo(m_canvas->canvasWidget(), question,
110
 
                                                                i18n("Open Link?"));
 
109
                const int answer = KMessageBox::warningYesNo(tool()->canvas()->canvasWidget(), question,
 
110
                                   i18n("Open Link?"));
111
111
                if (answer != KMessageBox::Yes) {
112
112
                    return;
113
113
                }
114
114
            }
115
 
            new KRun(url, m_canvas->canvasWidget(), 0, url.isLocalFile());
 
115
            new KRun(url, tool()->canvas()->canvasWidget(), 0, url.isLocalFile());
116
116
        }
117
117
    }
118
118
 
119
119
    QTimer::singleShot(0, notify, SLOT(sendEvent()));
120
 
    m_parent->repaintDecorations();
 
120
    tool()->repaintDecorations();
121
121
}