diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | b6edfe41c9395f2e20784cbf0e630af6426950a3 (patch) | |
tree | 56ed9b871d4296e6c15949c24e16420be1b28697 /kpresenter/KPrDocument.cpp | |
parent | ef39e8e4178a8f98cf5f154916ba0f03e4855206 (diff) | |
download | koffice-b6edfe41c9395f2e20784cbf0e630af6426950a3.tar.gz koffice-b6edfe41c9395f2e20784cbf0e630af6426950a3.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpresenter/KPrDocument.cpp')
-rw-r--r-- | kpresenter/KPrDocument.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/kpresenter/KPrDocument.cpp b/kpresenter/KPrDocument.cpp index 0b33a507..1a884752 100644 --- a/kpresenter/KPrDocument.cpp +++ b/kpresenter/KPrDocument.cpp @@ -616,7 +616,7 @@ TQDomDocument KPrDocument::saveXML() TQValueListIterator<KPrPage*> itPage ; for( itPage = ( *it ).begin(); itPage != ( *it ).end(); ++itPage ) { - int posPage = m_pageList.tqfind( *itPage ); + int posPage = m_pageList.find( *itPage ); if ( posPage != -1 ) { if ( itPage != ( *it ).begin() ) @@ -715,9 +715,9 @@ void KPrDocument::saveEmbeddedObject(KPrPage *page, const TQPtrList<KoDocumentCh TQPtrListIterator<KoDocumentChild> chl( childList ); double offset = 0.0; // we need no offset for objects on the master page and when we copy a page - if ( m_pageList.tqfindRef( page ) ) + if ( m_pageList.findRef( page ) ) { - offset=m_pageList.tqfindRef(page)*page->getPageRect().height(); + offset=m_pageList.findRef(page)*page->getPageRect().height(); } for( ; chl.current(); ++chl ) saveEmbeddedObject(page, chl.current(),doc,presenter, offset ); @@ -890,7 +890,7 @@ TQDomElement KPrDocument::saveAttribute( TQDomDocument &doc ) int activePage=0; if ( m_initialActivePage ) - activePage=m_pageList.tqfindRef(m_initialActivePage); + activePage=m_pageList.findRef(m_initialActivePage); activePage = TQMAX( activePage, 0); attributes.setAttribute("activePage",activePage ); attributes.setAttribute("gridx", m_gridX ); @@ -907,7 +907,7 @@ TQDomElement KPrDocument::saveUsedSoundFileToXML( TQDomDocument &_doc, TQStringL TQStringList::Iterator it = _list.begin(); for ( ; it != _list.end(); ++it ) { TQString soundFileName = *it; - int position = soundFileName.tqfindRev( '.' ); + int position = soundFileName.findRev( '.' ); TQString format = soundFileName.right( soundFileName.length() - position - 1 ); TQString _name = TQString( "sounds/sound%1.%2" ).tqarg( ++i ).tqarg( format.lower() ); @@ -953,7 +953,7 @@ void KPrDocument::saveUsedSoundFileToStore( KoStore *_store, TQStringList _list TQStringList::Iterator it = _list.begin(); for ( ; it != _list.end(); ++it ) { TQString soundFileName = *it; - int position = soundFileName.tqfindRev( '.' ); + int position = soundFileName.findRev( '.' ); TQString format = soundFileName.right( soundFileName.length() - position - 1 ); TQString _storeURL = TQString( "sounds/sound%1.%2" ).tqarg( ++i ).tqarg( format.lower() ); @@ -1301,7 +1301,7 @@ void KPrDocument::saveOasisSettings( KoXmlWriter &settingsWriter ) //store first view parameter. int activePage=0; if ( m_initialActivePage ) - activePage=m_pageList.tqfindRef(m_initialActivePage); + activePage=m_pageList.findRef(m_initialActivePage); activePage = TQMAX( activePage, 0); settingsWriter.addConfigItem( "SelectedPage", activePage ); @@ -1406,7 +1406,7 @@ void KPrDocument::loadOasisPresentationCustomSlideShow( TQDomNode &settingsDoc ) TQValueList<KPrPage *> pageList; for ( TQStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it ) { - if ( m_loadingInfo->m_name2page.tqcontains( *it ) ) + if ( m_loadingInfo->m_name2page.contains( *it ) ) { kdDebug(33001) << "slide show " << name << " page = " << *it << endl; pageList.push_back( m_loadingInfo->m_name2page[*it] ); @@ -1450,7 +1450,7 @@ void KPrDocument::saveOasisPresentationCustomSlideShow( KoXmlWriter &contentTmpW TQValueListIterator<KPrPage*> itPage ; for( itPage = ( *it ).begin(); itPage != ( *it ).end(); ++itPage ) { - int posPage = m_pageList.tqfind(*itPage ); + int posPage = m_pageList.find(*itPage ); if ( posPage != -1 ) { if ( itPage != ( *it ).begin() ) @@ -2314,7 +2314,7 @@ void KPrDocument::insertEmbedded( KoStore *store, TQDomElement topElem, KMacroCo kppartobject = 0L; return; } - int index = m_pageList.tqfindRef(page); + int index = m_pageList.findRef(page); int pageIndex = (int)(offset/__pgLayout.ptHeight)+index; int newPos=(int)((offset+index*__pgLayout.ptHeight)-pageIndex*__pgLayout.ptHeight); kppartobject->setOrig(kppartobject->getOrig().x(),newPos); @@ -2644,7 +2644,7 @@ bool KPrDocument::loadXML( const TQDomDocument &doc ) TQValueList<KPrPage *> pageList; for ( TQStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it ) { - if ( name2page.tqcontains( *it ) ) + if ( name2page.contains( *it ) ) { kdDebug(33001) << "slide show " << slide.attribute( "name" ) << " page = " << *it << endl; pageList.push_back( name2page[*it] ); @@ -3225,7 +3225,7 @@ void KPrDocument::loadUsedSoundFileFromStore( KoStore *_store, TQStringList _lis char *data = new char[size]; dev.readBlock( data, size ); - int position = soundFile.tqfindRev( '.' ); + int position = soundFile.findRev( '.' ); TQString format = soundFile.right( soundFile.length() - position ); KTempFile *tmpFile = new KTempFile( TQString(), format ); tmpFile->setAutoDelete( true ); @@ -3391,13 +3391,13 @@ void KPrDocument::setEmpty() // If we then load a document, it will override that date. } -void KPrDocument::setGridValue( double _x, double _y, bool _tqreplace ) +void KPrDocument::setGridValue( double _x, double _y, bool _replace ) { oldGridX = m_gridX; oldGridY = m_gridY; m_gridX=_x; m_gridY=_y; - if ( _tqreplace ) + if ( _replace ) replaceObjs(); } @@ -3505,7 +3505,7 @@ void KPrDocument::deletePage( int _page ) void KPrDocument::insertPage( KPrPage *page, int currentPageNum, int insertPageNum ) { // check if page was allready deleted - int pos = m_deletedPageList.tqfindRef( page ); + int pos = m_deletedPageList.findRef( page ); if ( pos != -1 ) m_deletedPageList.take( pos ); @@ -3533,7 +3533,7 @@ void KPrDocument::insertPage( KPrPage *page, int currentPageNum, int insertPageN void KPrDocument::takePage( KPrPage *page, int pageNum ) { - int pos = m_pageList.tqfindRef( page ); + int pos = m_pageList.findRef( page ); m_pageList.take( pos ); m_deletedPageList.append( page ); @@ -3821,17 +3821,17 @@ void KPrDocument::makeUsedSoundFileList() TQPtrListIterator<KPrPage> it( m_pageList ); for ( ; it.current(); ++it ) { TQString _file = it.current()->getPageSoundFileName(); - if ( !_file.isEmpty() && usedSoundFile.tqfindIndex( _file ) == -1 ) + if ( !_file.isEmpty() && usedSoundFile.findIndex( _file ) == -1 ) usedSoundFile.append( _file ); TQPtrListIterator<KPrObject> oIt( it.current()->objectList() ); for ( ; oIt.current(); ++oIt ) { _file = oIt.current()->getAppearSoundEffectFileName(); - if ( !_file.isEmpty() && usedSoundFile.tqfindIndex( _file ) == -1 ) + if ( !_file.isEmpty() && usedSoundFile.findIndex( _file ) == -1 ) usedSoundFile.append( _file ); _file = oIt.current()->getDisappearSoundEffectFileName(); - if ( !_file.isEmpty() && usedSoundFile.tqfindIndex( _file ) == -1 ) + if ( !_file.isEmpty() && usedSoundFile.findIndex( _file ) == -1 ) usedSoundFile.append( _file ); } } @@ -3861,7 +3861,7 @@ void KPrDocument::paintContent( TQPainter& painter, const TQRect& rect, if( m_initialActivePage ) page = m_initialActivePage; - int pageNum = m_pageList.tqfindRef( page ); + int pageNum = m_pageList.findRef( page ); if ( page->displayBackground() ) page->background()->drawBackground( &painter, zoomHandler(), rect, false ); @@ -4009,7 +4009,7 @@ void KPrDocument::selectPage( int pgNum /* 0-based */, bool select ) KPrPage * KPrDocument::findPage(KPrObject *object) { TQPtrList<KPrObject> masterObjects( m_masterPage->objectList() ); - if ( masterObjects.tqfindRef( object ) != -1 ) + if ( masterObjects.findRef( object ) != -1 ) { //kdDebug(33001) << "Object is on the master page" << endl; return m_masterPage; @@ -4017,8 +4017,8 @@ KPrPage * KPrDocument::findPage(KPrObject *object) TQPtrListIterator<KPrPage> it( m_pageList ); for ( ; it.current(); ++it ) { TQPtrList<KPrObject> list( it.current()->objectList() ); - if ( list.tqfindRef( object ) != -1 ) { - //kdDebug(33001) << "Object is on page " << m_pageList.tqfindRef(it.current()) + 1 << endl; + if ( list.findRef( object ) != -1 ) { + //kdDebug(33001) << "Object is on page " << m_pageList.findRef(it.current()) + 1 << endl; return it.current(); } } @@ -4031,7 +4031,7 @@ KPrPage * KPrDocument::findPage(TQPtrList<KPrObject> &objects) KPrObject *object; for ( object = objects.first(); object; object=objects.next() ) { TQPtrList<KPrObject> list( m_masterPage->objectList() ); - if ( list.tqfindRef( object ) != -1 ) + if ( list.findRef( object ) != -1 ) { //kdDebug(33001) << "Object is on the master page" << endl; return m_masterPage; @@ -4040,8 +4040,8 @@ KPrPage * KPrDocument::findPage(TQPtrList<KPrObject> &objects) object = objects.first(); for ( KPrPage *page=m_pageList.first(); page; page=m_pageList.next() ) { TQPtrList<KPrObject> list( page->objectList() ); - if ( list.tqfindRef( object ) != -1 ) { - //kdDebug(33001) << "The Objects are on page " << m_pageList.tqfindRef(page) + 1 << endl; + if ( list.findRef( object ) != -1 ) { + //kdDebug(33001) << "The Objects are on page " << m_pageList.findRef(page) + 1 << endl; return page; } } @@ -4070,7 +4070,7 @@ TQValueList<int> KPrDocument::listOfDisplaySelectedSlides( const TQValueList<KPr TQValueListConstIterator<KPrPage*> itPageEnd = lst.end(); for( itPage = lst.begin() ; itPage != itPageEnd; ++itPage ) { - int pageNum = m_pageList.tqfind(*itPage ); + int pageNum = m_pageList.find(*itPage ); if ( pageNum != -1 ) { kdDebug()<<" KPrDocument::displaySelectedSlide : add slide number :"<<pageNum<<endl; @@ -4254,7 +4254,7 @@ void KPrDocument::insertObjectInPage(double offset, KPrObject *_obj, int pos) void KPrDocument::insertPixmapKey( KoPictureKey key ) { - if ( !usedPictures.tqcontains( key ) ) + if ( !usedPictures.contains( key ) ) usedPictures.append( key ); } @@ -4601,7 +4601,7 @@ void KPrDocument::setSpellCheckIgnoreList( const TQStringList& lst ) void KPrDocument::addSpellCheckIgnoreWord( const TQString & word ) { // ### missing: undo/redo support - if( m_spellCheckIgnoreList.tqfindIndex( word ) == -1 ) + if( m_spellCheckIgnoreList.findIndex( word ) == -1 ) m_spellCheckIgnoreList.append( word ); setSpellCheckIgnoreList( m_spellCheckIgnoreList ); } @@ -4777,7 +4777,7 @@ void KPrDocument::addWordToDictionary( const TQString & word) { if ( m_bgSpellCheck ) { - if( m_spellCheckPersonalDict.tqfindIndex( word ) == -1 ) + if( m_spellCheckPersonalDict.findIndex( word ) == -1 ) m_spellCheckPersonalDict.append( word ); m_bgSpellCheck->settings()->setCurrentIgnoreList( m_spellCheckIgnoreList + m_spellCheckPersonalDict ); if ( backgroundSpellCheckEnabled() ) |