kspread

KSpreadViewIface.cpp
1/* This file is part of the KDE project
2
3 Copyright 2004 Ariya Hidayat <ariya@kde.org>
4 Copyright 2002-2003 Joseph Wenninger <jowenn@kde.org>
5 Copyright 2002 John Dailey <dailey@vt.edu>
6 Copyright 2001-2002 Laurent Montel <montel@kde.org>
7 Copyright 2001 Philipp Mueller <philipp.mueller@gmx.de>
8 Copyright 2000 Simon Hausmann <hausmann@kde.org>
9 Copyright 1999 Torben Weis <weis@kde.org>
10
11 This library is free software; you can redistribute it and/or
12 modify it under the terms of the GNU Library General Public
13 License as published by the Free Software Foundation; either
14 version 2 of the License, or (at your option) any later version.
15
16 This library is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 Library General Public License for more details.
20
21 You should have received a copy of the GNU Library General Public License
22 along with this library; see the file COPYING.LIB. If not, write to
23 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 * Boston, MA 02110-1301, USA.
25*/
26
27#include <dcopclient.h>
28#include <dcopref.h>
29#include <tdeapplication.h>
30
31#include "kspread_doc.h"
32#include "kspread_map.h"
33#include "selection.h"
34#include "kspread_sheet.h"
35#include "kspread_view.h"
36
37#include "KSpreadViewIface.h"
38
39using namespace KSpread;
40
41/************************************************
42 *
43 * ViewIface
44 *
45 ************************************************/
46
47ViewIface::ViewIface( View* t )
48 : KoViewIface( t )
49{
50 m_view = t;
51}
52
53ViewIface::~ViewIface()
54{
55}
56
57DCOPRef ViewIface::doc() const
58{
59 return DCOPRef( kapp->dcopClient()->appId(), m_view->doc()->dcopObject()->objId() );
60}
61
62DCOPRef ViewIface::map() const
63{
64 return DCOPRef( kapp->dcopClient()->appId(), m_view->doc()->map()->dcopObject()->objId() );
65}
66
67DCOPRef ViewIface::sheet() const
68{
69 return DCOPRef( kapp->dcopClient()->appId(), m_view->activeSheet()->dcopObject()->objId() );
70}
71
72void ViewIface::changeNbOfRecentFiles(int _nb)
73{
74 if(_nb<0)
75 return;
76 m_view->changeNbOfRecentFiles(_nb);
77}
78
79
80void ViewIface::hide()
81{
82 m_view->hide();
83}
84
85void ViewIface::show()
86{
87 m_view->show();
88}
89
90void ViewIface::find()
91{
92 m_view->find();
93}
94
95void ViewIface::replace()
96{
97 m_view->replace();
98}
99
100void ViewIface::conditional()
101{
102 m_view->conditional();
103}
104
105void ViewIface::validity()
106{
107 m_view->validity();
108}
109
110void ViewIface::insertSeries()
111{
112 m_view->insertSeries();
113}
114
115void ViewIface::insertHyperlink()
116{
117 m_view->insertHyperlink();
118}
119
120void ViewIface::gotoCell()
121{
122 m_view->gotoCell();
123}
124
125void ViewIface::changeAngle()
126{
127 m_view->changeAngle();
128}
129
130void ViewIface::preference()
131{
132 m_view->preference();
133}
134
135void ViewIface::nextSheet()
136{
137 m_view->nextSheet();
138}
139
140bool ViewIface::showSheet(TQString sheetName)
141{
142 return m_view->showSheet(sheetName);
143}
144
145void ViewIface::previousSheet()
146{
147 m_view->previousSheet();
148}
149
150void ViewIface::sortList()
151{
152 m_view->sortList();
153}
154
155void ViewIface::setAreaName()
156{
157 m_view->setAreaName();
158}
159
160void ViewIface::showAreaName()
161{
162 m_view->showAreaName();
163}
164
165void ViewIface::mergeCell()
166{
167 m_view->mergeCell();
168}
169
170void ViewIface::dissociateCell()
171{
172 m_view->dissociateCell();
173}
174
175void ViewIface::consolidate()
176{
177 m_view->consolidate();
178}
179
180void ViewIface::deleteColumn()
181{
182 m_view->deleteColumn();
183}
184
185void ViewIface::insertColumn()
186{
187 m_view->insertColumn();
188}
189
190void ViewIface::deleteRow()
191{
192 m_view->deleteRow();
193}
194
195void ViewIface::insertRow()
196{
197 m_view->insertRow();
198}
199
200void ViewIface::hideRow()
201{
202 m_view->hideRow();
203}
204
205void ViewIface::showRow()
206{
207 m_view->showRow();
208}
209
210void ViewIface::hideColumn()
211{
212 m_view->hideColumn();
213}
214
215void ViewIface::showColumn()
216{
217 m_view->showColumn();
218}
219
220void ViewIface::upper()
221{
222 m_view->upper();
223}
224
225void ViewIface::lower()
226{
227 m_view->lower();
228}
229
230void ViewIface::equalizeColumn()
231{
232 m_view->equalizeColumn();
233}
234
235void ViewIface::equalizeRow()
236{
237 m_view->equalizeRow();
238}
239
240void ViewIface::clearTextSelection()
241{
242 m_view->clearTextSelection();
243}
244
245void ViewIface::clearCommentSelection()
246{
247 m_view->clearCommentSelection();
248}
249
250void ViewIface::clearValiditySelection()
251{
252 m_view->clearValiditySelection();
253}
254
255void ViewIface::clearConditionalSelection()
256{
257 m_view->clearConditionalSelection();
258}
259
260void ViewIface::goalSeek()
261{
262 m_view->goalSeek();
263}
264
265void ViewIface::insertFromDatabase()
266{
267 m_view->insertFromDatabase();
268}
269
270void ViewIface::insertFromTextfile()
271{
272 m_view->insertFromTextfile();
273}
274
275void ViewIface::insertFromClipboard()
276{
277 m_view->insertFromClipboard();
278}
279
280void ViewIface::textToColumns()
281{
282 m_view->textToColumns();
283}
284
285void ViewIface::copyAsText()
286{
287 m_view->copyAsText();
288}
289
290void ViewIface::setSelection(TQRect selection)
291{
292 m_view->selectionInfo()->initialize(selection);//,m_view->activeSheet());
293}
294
295TQRect ViewIface::selection()
296{
297 return m_view->selectionInfo()->selection();
298}
299
300void ViewIface::setSelectionMoneyFormat( bool b )
301{
302 m_view->moneyFormat(b);
303}
304
305void ViewIface::setSelectionPrecision( int delta )
306{
307 m_view->setSelectionPrecision(delta);
308}
309
310void ViewIface::setSelectionPercent( bool b )
311{
312 m_view->percent(b);
313}
314
315void ViewIface::setSelectionMultiRow( bool enable )
316{
317 m_view->wrapText(enable);
318}
319
320void ViewIface::setSelectionSize(int size)
321{
322 m_view->setSelectionFontSize(size);
323}
324
325void ViewIface::setSelectionUpper()
326{
327 m_view->upper();
328}
329
330void ViewIface::setSelectionLower()
331{
332 m_view->lower();
333}
334
335void ViewIface::setSelectionFirstLetterUpper()
336{
337 m_view->firstLetterUpper();
338}
339
340void ViewIface::setSelectionVerticalText(bool enable)
341{
342 m_view->verticalText(enable);
343}
344
345void ViewIface::setSelectionComment(TQString comment)
346{
347 m_view->setSelectionComment(comment);
348}
349
350void ViewIface::setSelectionAngle(int value)
351{
352 m_view->setSelectionAngle(value);
353}
354
355void ViewIface::setSelectionTextColor( TQColor txtColor )
356{
357 m_view->setSelectionTextColor(txtColor);
358}
359
360void ViewIface::setSelectionBgColor( TQColor bgColor )
361{
362 m_view->setSelectionBackgroundColor(bgColor);
363}
364
365void ViewIface::setSelectionBorderColor( TQColor bdColor )
366{
367 m_view->setSelectionBorderColor(bdColor);
368}
369
370void ViewIface::deleteSelection()
371{
372 m_view->clearTextSelection();
373}
374
375void ViewIface::copySelection()
376{
377 m_view->copySelection();
378}
379
380void ViewIface::cutSelection()
381{
382 m_view->cutSelection();
383}
384
385void ViewIface::setLeftBorderColor(TQColor color)
386{
387 m_view->setSelectionLeftBorderColor(color);
388}
389
390void ViewIface::setTopBorderColor(TQColor color)
391{
392 m_view->setSelectionTopBorderColor(color);
393}
394
395void ViewIface::setRightBorderColor(TQColor color)
396{
397 m_view->setSelectionRightBorderColor(color);
398}
399
400void ViewIface::setBottomBorderColor(TQColor color)
401{
402 m_view->setSelectionBottomBorderColor(color);
403}
404
405void ViewIface::setAllBorderColor(TQColor color)
406{
407 m_view->setSelectionAllBorderColor(color);
408}
409
410void ViewIface::setOutlineBorderColor(TQColor color)
411{
412 m_view->setSelectionOutlineBorderColor(color);
413}
414
415void ViewIface::removeBorder()
416{
417 m_view->borderRemove();
418}
419
420void ViewIface::increaseIndent()
421{
422 m_view->increaseIndent();
423}
424
425void ViewIface::decreaseIndent()
426{
427 m_view->increaseIndent();
428}
429
430void ViewIface::subtotals()
431{
432 m_view->subtotals();
433}
434
435void ViewIface::sortInc()
436{
437 m_view->sortInc();
438}
439
440void ViewIface::sortDec()
441{
442 m_view->sortDec();
443}
444
445void ViewIface::layoutDlg()
446{
447 m_view->layoutDlg();
448}
449
450
451void ViewIface::increaseFontSize()
452{
453 m_view->increaseFontSize();
454}
455
456void ViewIface::decreaseFontSize()
457{
458 m_view->decreaseFontSize();
459}
The View class displays a KSpread document.
The KSpread namespace.
Definition commands.h:39