kword
KWordViewIface.cpp00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "KWordViewIface.h"
00021
00022 #include <kurl.h>
00023
00024 #include "KWView.h"
00025 #include "KWCanvas.h"
00026 #include "KWDocument.h"
00027 #include "KWFrameSet.h"
00028
00029 #include <dcopclient.h>
00030
00031 KWordViewIface::KWordViewIface( KWView *view_ )
00032 : KoViewIface( view_ )
00033 {
00034 view = view_;
00035 }
00036
00037 void KWordViewIface::fileStatistics()
00038 {
00039 view->fileStatistics();
00040 }
00041
00042 void KWordViewIface::editFind()
00043 {
00044 view->editFind();
00045 }
00046
00047 void KWordViewIface::editReplace()
00048 {
00049 view->editReplace();
00050 }
00051
00052 void KWordViewIface::editCustomVars()
00053 {
00054 view->editCustomVars();
00055 }
00056
00057 void KWordViewIface::editMailMergeDataBase()
00058 {
00059 view->editMailMergeDataBase();
00060 }
00061
00062 void KWordViewIface::viewPageMode()
00063 {
00064 view->viewPageMode();
00065 }
00066
00067 void KWordViewIface::viewPreviewMode()
00068 {
00069 view->viewPreviewMode();
00070 }
00071
00072 void KWordViewIface::configure()
00073 {
00074 view->configure();
00075 }
00076
00077 void KWordViewIface::spelling()
00078 {
00079 view->slotSpellCheck();
00080 }
00081
00082 void KWordViewIface::autoFormat()
00083 {
00084 view->extraAutoFormat();
00085 }
00086
00087 void KWordViewIface::stylist()
00088 {
00089 view->extraStylist();
00090 }
00091
00092 void KWordViewIface::createTemplate()
00093 {
00094 view->extraCreateTemplate();
00095 }
00096
00097 void KWordViewIface::insertTable()
00098 {
00099 view->insertTable();
00100 }
00101
00102 void KWordViewIface::insertPicture()
00103 {
00104 view->insertPicture();
00105 }
00106
00107 static KoPicture picture( const QString& fileName )
00108 {
00109 KoPicture picture;
00110 KoPictureKey key;
00111 key.setKeyFromFile( fileName );
00112 picture.setKey( key );
00113 picture.loadFromFile( fileName );
00114 return picture;
00115 }
00116
00117 void KWordViewIface::insertPictureFromFile( QString fileName, double x, double y, int w, int h )
00118 {
00119 view->getGUI()->canvasWidget()->insertPictureDirect( picture( fileName ), KoPoint( x, y ), QSize(w, h) );
00120 }
00121
00122 void KWordViewIface::insertInlinePicture( QString fileName, int w, int h )
00123 {
00124 view->insertPicture( picture( fileName ), true , true , w, h );
00125 view->getGUI()->canvasWidget()->insertInlinePicture();
00126 }
00127
00128 void KWordViewIface::formatPage()
00129 {
00130 view->formatPage();
00131 }
00132
00133 void KWordViewIface::toolsPart()
00134 {
00135 view->toolsPart();
00136 }
00137
00138 double KWordViewIface::zoom()
00139 {
00140 return view->kWordDocument()->zoom();
00141 }
00142
00143
00144 void KWordViewIface::setZoom( int zoom)
00145 {
00146 view->showZoom( zoom );
00147 view->setZoom( zoom,true);
00148 view->kWordDocument()->updateZoomRuler();
00149 }
00150
00151 void KWordViewIface::editPersonalExpression()
00152 {
00153 view->editPersonalExpr();
00154 }
00155
00156 void KWordViewIface::insertLink()
00157 {
00158 view->insertLink();
00159 }
00160
00161 void KWordViewIface::insertFormula()
00162 {
00163 view->insertFormula();
00164 }
00165
00166 void KWordViewIface::formatFont()
00167 {
00168 view->formatFont();
00169 }
00170
00171 void KWordViewIface::formatParagraph()
00172 {
00173 view->formatParagraph();
00174 }
00175
00176 void KWordViewIface::raiseFrame()
00177 {
00178 view->raiseFrame();
00179 }
00180
00181 void KWordViewIface::lowerFrame()
00182 {
00183 view->lowerFrame();
00184 }
00185
00186 void KWordViewIface::bringToFront()
00187 {
00188 view->bringToFront();
00189 }
00190
00191 void KWordViewIface::sendToBack()
00192 {
00193 view->sendToBack();
00194 }
00195
00196
00197 void KWordViewIface::applyAutoFormat()
00198 {
00199 view->applyAutoFormat();
00200 }
00201
00202
00203 void KWordViewIface::createStyleFromSelection()
00204 {
00205 view->createStyleFromSelection();
00206 }
00207
00208 int KWordViewIface::tableSelectCell(const QString &name, uint row, uint col)
00209 {
00210 return view->tableSelectCell(name, row, col);
00211 }
00212
00213 void KWordViewIface::tableInsertRow()
00214 {
00215 view->tableInsertRow();
00216 }
00217
00218 void KWordViewIface::tableInsertRow(uint row)
00219 {
00220 view->tableInsertRow(row);
00221 }
00222
00223 void KWordViewIface::tableInsertCol()
00224 {
00225 view->tableInsertCol();
00226 }
00227
00228 void KWordViewIface::tableInsertCol(uint col)
00229 {
00230 view->tableInsertCol(col);
00231 }
00232
00233 void KWordViewIface::tableResizeCol()
00234 {
00235 view->tableResizeCol();
00236 }
00237
00238 void KWordViewIface::tableDeleteRow()
00239 {
00240 view->tableDeleteRow();
00241 }
00242
00243 int KWordViewIface::tableDeleteRow(uint row)
00244 {
00245 QValueList<uint> list;
00246 list.append(row);
00247 return view->tableDeleteRow(list);
00248 }
00249
00250 void KWordViewIface::tableDeleteCol()
00251 {
00252 view->tableDeleteCol();
00253 }
00254
00255 int KWordViewIface::tableDeleteCol(uint col)
00256 {
00257 QValueList<uint> list;
00258 list.append(col);
00259 return view->tableDeleteCol(list);
00260 }
00261
00262 void KWordViewIface::tableJoinCells()
00263 {
00264 view->tableJoinCells();
00265 }
00266
00267 void KWordViewIface::tableSplitCells()
00268 {
00269 view->tableSplitCells();
00270 }
00271
00272 void KWordViewIface::tableSplitCells(uint rows, uint cols)
00273 {
00274 view->tableSplitCells(cols, rows);
00275 }
00276
00277 void KWordViewIface::tableUngroupTable()
00278 {
00279 view->tableUngroupTable();
00280 }
00281
00282 void KWordViewIface::insertFootNote()
00283 {
00284 view->insertFootNote();
00285 }
00286
00287 int KWordViewIface::configTableRows() const
00288 {
00289 return (int)view->getGUI()->canvasWidget()->tableRows();
00290 }
00291
00292 int KWordViewIface::configTableCols() const
00293 {
00294 return (int)view->getGUI()->canvasWidget()->tableCols();
00295 }
00296
00297 bool KWordViewIface::configTableIsFloating() const
00298 {
00299 return view->getGUI()->canvasWidget()->tableIsFloating();
00300 }
00301
00302 QString KWordViewIface::configTableTemplateName() const
00303 {
00304 return view->getGUI()->canvasWidget()->tableTemplateName();
00305 }
00306
00307 void KWordViewIface::setConfigTableTemplateName(const QString &_name)
00308 {
00309 view->getGUI()->canvasWidget()->setTableTemplateName( _name );
00310 }
00311
00312 void KWordViewIface::selectAllFrames()
00313 {
00314 view->getGUI()->canvasWidget()->selectAllFrames(true);
00315 }
00316
00317 void KWordViewIface::unSelectAllFrames()
00318 {
00319 view->getGUI()->canvasWidget()->selectAllFrames(false);
00320 }
00321
00322
00323 void KWordViewIface::editFootEndNote()
00324 {
00325 view->editFootEndNote();
00326 }
00327
00328 void KWordViewIface::savePicture()
00329 {
00330 view->savePicture();
00331 }
00332
00333 void KWordViewIface::insertFile()
00334 {
00335 view->insertFile();
00336 }
00337
00338 void KWordViewIface::tableStylist()
00339 {
00340 view->tableStylist();
00341 }
00342
00343 void KWordViewIface::addBookmark()
00344 {
00345 view->addBookmark();
00346 }
00347
00348 void KWordViewIface::selectBookmark()
00349 {
00350 view->selectBookmark();
00351 }
00352
00353 void KWordViewIface::tableProperties()
00354 {
00355 view->tableProperties();
00356 }
00357
00358 void KWordViewIface::importStyle()
00359 {
00360 view->importStyle();
00361 }
00362
00363
00364 void KWordViewIface::insertFile(const QString & path)
00365 {
00366
00367 KURL url;
00368 url.setPath( path );
00369 view->insertFile( url );
00370 }
00371
00372 void KWordViewIface::createFrameStyle()
00373 {
00374 view->createFrameStyle();
00375 }
00376
00377 void KWordViewIface::setPictureInline( bool _inline)
00378 {
00379 view->getGUI()->canvasWidget()->setPictureInline( _inline);
00380 }
00381
00382 bool KWordViewIface::pictureInline() const
00383 {
00384 return view->getGUI()->canvasWidget()->pictureInline();
00385 }
00386
00387 void KWordViewIface::setPictureKeepRatio( bool _keep)
00388 {
00389 view->getGUI()->canvasWidget()->setPictureKeepRatio( _keep);
00390 }
00391
00392 bool KWordViewIface::pictureKeepRatio() const
00393 {
00394 return view->getGUI()->canvasWidget()->pictureKeepRatio();
00395 }
00396
00397 void KWordViewIface::changeAutoSpellCheckStatus(bool b)
00398 {
00399 view->autoSpellCheck(b);
00400 }
00401
00402 void KWordViewIface::deselectAllFrames()
00403 {
00404 view->deselectAllFrames();
00405 }
00406
00407 int KWordViewIface::currentPage()
00408 {
00409 return view->currentPage();
00410 }
00411
00412 void KWordViewIface::convertTableToText()
00413 {
00414 view->convertTableToText();
00415 }
00416
00417 void KWordViewIface::convertToTextBox()
00418 {
00419 view->convertToTextBox();
00420 }
00421
00422 void KWordViewIface::addIgnoreAllWord()
00423 {
00424 view->slotAddIgnoreAllWord();
00425 }
00426
00427 void KWordViewIface::addPersonalExpression()
00428 {
00429 view->addPersonalExpression();
00430 }
00431
00432 void KWordViewIface::addWordToDictionary()
00433 {
00434 view->addWordToDictionary();
00435 }
00436
00437 void KWordViewIface::sortText()
00438 {
00439 view->sortText();
00440 }
00441
00442 void KWordViewIface::insertPage()
00443 {
00444 view->insertPage();
00445 }
00446
00447 void KWordViewIface::createLinkedFrame()
00448 {
00449 view->createLinkedFrame();
00450 }
00451
00452
00453 void KWordViewIface::lineBreak()
00454 {
00455 view->slotLineBreak();
00456 }
00457
00458 void KWordViewIface::increaseNumberingLevel()
00459 {
00460 view->slotIncreaseNumberingLevel();
00461 }
00462
00463 void KWordViewIface::decreaseNumberingLevel()
00464 {
00465 view->slotDecreaseNumberingLevel();
00466 }
|