From kde-commits Sat May 27 18:09:30 2006 From: Laurent Montel Date: Sat, 27 May 2006 18:09:30 +0000 To: kde-commits Subject: koffice/kpresenter Message-Id: <1148753370.991172.21031.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=114875338501690 SVN commit 545535 by mlaurent: Continue to port kpresenter M +11 -12 KPrConfig.cpp M +14 -5 KPrTextObject.cpp M +1 -1 KPrView.cpp M +1 -1 KPrView.h --- trunk/koffice/kpresenter/KPrConfig.cpp #545534:545535 @@ -265,7 +265,7 @@ double newIndent = KoUnit::fromUserValue( indent->value(), doc->unit() ); if( newIndent != doc->getIndentValue() ) { - config->writeEntry( "Indent", newIndent, true, false, 'g', DBL_DIG /* 6 is not enough */ ); + config->writeEntry( "Indent", newIndent ); doc->setIndentValue( newIndent ); } int nbRecent=recentFiles->value(); @@ -600,8 +600,8 @@ m_oldHyphenation = config->readBoolEntry( "hyphenation", m_oldHyphenation); } - QVGroupBox* gbDocumentDefaults = new QVGroupBox( i18n("Document Defaults"), this, "GroupBox" ); - gbDocumentDefaults->setMargin( KDialog::marginHint() ); + Q3GroupBox* gbDocumentDefaults = new Q3GroupBox( i18n("Document Defaults"), this, "GroupBox" ); + //gbDocumentDefaults->setMargin( KDialog::marginHint() ); gbDocumentDefaults->setInsideSpacing( 5 ); QWidget *fontContainer = new QWidget(gbDocumentDefaults); @@ -650,9 +650,9 @@ box->addWidget(gbDocumentDefaults); - QVGroupBox* gbDocumentSettings = new QVGroupBox( i18n("Document Settings"), this ); - gbDocumentSettings->setMargin( KDialog::marginHint() ); - gbDocumentSettings->setInsideSpacing( KDialog::spacingHint() ); + Q3GroupBox* gbDocumentSettings = new Q3GroupBox( i18n("Document Settings"), this ); + //gbDocumentSettings->setMargin( KDialog::marginHint() ); + //gbDocumentSettings->setInsideSpacing( KDialog::spacingHint() ); m_createBackupFile = new QCheckBox( i18n("Create backup file"), gbDocumentSettings); Q3WhatsThis::add(m_createBackupFile, i18n( "If checked, this will create a ..kpr.autosave.kpr in the folder where your file is. This backup file can then be used in case of a problem.\nThe backup file is updated every time you save your document or every time there is an autosave." ) ); @@ -683,9 +683,9 @@ Q3WhatsThis::add(m_tabStopWidth, i18n( "Each KPresenter document has a default set of tab stops. If you add tab stops to your document, the newly added tab stops override the default ones. You can use this text box to define the spacing between default tab stops. As an example, if you enter 1.5 in this text box, and the unit of measurement is in centimeters, the first default tab stop will be located 1.5 cm to the right of the frame's left-hand margin. The second default tab stop will be located at 3 cm from the left-hand margin, and so on." ) ); box->addWidget(gbDocumentSettings); - QVGroupBox* gbDocumentCursor = new QVGroupBox( i18n("Cursor"), this ); - gbDocumentCursor->setMargin( KDialog::marginHint() ); - gbDocumentCursor->setInsideSpacing( KDialog::spacingHint() ); + Q3GroupBox* gbDocumentCursor = new Q3GroupBox( i18n("Cursor"), this ); + //gbDocumentCursor->setMargin( KDialog::marginHint() ); + //gbDocumentCursor->setInsideSpacing( KDialog::spacingHint() ); m_cursorInProtectedArea= new QCheckBox(i18n("Cursor in protected area"),gbDocumentCursor); m_cursorInProtectedArea->setChecked(doc->cursorInProtectedArea()); @@ -791,7 +791,7 @@ void KPrConfigureDefaultDocPage::selectNewDefaultFont() { QStringList list; KFontChooser::getFontList(list, KFontChooser::SmoothScalableFonts); - KFontDialog dlg( this, "Font Selector", false, true, list, true ); + KFontDialog dlg( this, false, true, list, true ); dlg.setFont(*font); int result = dlg.exec(); if (KDialog::Accepted == result) { @@ -964,8 +964,7 @@ { if ( item->text(0)==i18n("Picture Path")) { - KUrlRequesterDlg * dlg = new KUrlRequesterDlg( item->text(1), 0L, - "picture path dlg"); + KUrlRequesterDlg * dlg = new KUrlRequesterDlg( item->text(1), 0L); dlg->fileDialog()->setMode(KFile::Directory | KFile::LocalOnly); if ( dlg->exec() ) item->setText( 1, dlg->selectedURL().path()); --- trunk/koffice/kpresenter/KPrTextObject.cpp #545534:545535 @@ -2249,7 +2249,8 @@ else { bool singleWord= false; - actionList = dataToolActionList(view->kPresenterDoc()->instance(), word, singleWord); +#warning "kde4: port it!!!!!!!!!!" + //actionList = dataToolActionList(view->kPresenterDoc()->instance(), word, singleWord); //kDebug(33001) << "KWView::openPopupMenuInsideFrame plugging actionlist with " << actionList.count() << " actions" << endl; KoLinkVariable* linkVar = dynamic_cast( var ); Q3PopupMenu * popup; @@ -2370,7 +2371,9 @@ bool KPrTextView::canDecode( QMimeSource *e ) { - return kpTextObject()->kPresenterDocument()->isReadWrite() && ( KoTextObject::providesOasis( e->mimeData() ) || Q3TextDrag::canDecode( e ) ); +#warning "kde4 port it"; + return false; + //return kpTextObject()->kPresenterDocument()->isReadWrite() && ( KoTextObject::providesOasis( e->mimeData() ) || Q3TextDrag::canDecode( e ) ); } Q3DragObject * KPrTextView::newDrag( QWidget * parent ) @@ -2422,7 +2425,8 @@ return false; delete store; - +#warning "kde4: port it!" +#if 0 KMultipleDrag* multiDrag = new KMultipleDrag( parent ); if ( !plainText.isEmpty() ) multiDrag->addDragObject( new Q3TextDrag( plainText, 0 ) ); @@ -2431,6 +2435,8 @@ storeDrag->setEncodedData( buffer.buffer() ); multiDrag->addDragObject( storeDrag ); return multiDrag; +#endif + return 0L; } void KPrTextView::dragEnterEvent( QDragEnterEvent *e ) @@ -2498,7 +2504,9 @@ QString returnedTypeMime = KoTextObject::providesOasis( e->mimeData() ); if ( !returnedTypeMime.isEmpty() ) { - QByteArray arr = e->data( returnedTypeMime ); +#warning "kde4: port it !" +#if 0 + QByteArray arr = e->data( returnedTypeMime ); if ( arr.size() ) { KCommand *cmd = kpTextObject()->pasteOasis( cursor(), arr, false ); @@ -2508,7 +2516,8 @@ addMacroCmd = true; } } - } +#endif + } else { QString text; --- trunk/koffice/kpresenter/KPrView.cpp #545534:545535 @@ -6356,7 +6356,7 @@ KoView::slotChildActivated( a ); } -Broker *KPrView::broker() const +KSpell2::Broker::Ptr KPrView::broker() const { return m_broker; } --- trunk/koffice/kpresenter/KPrView.h #545534:545535 @@ -187,7 +187,7 @@ /** * Returns the KPresenter global KSpell2 Broker object. */ - KSpell2::Broker *broker() const; + KSpell2::Broker::Ptr broker() const; bool editMaster() const { return m_editMaster;} signals: