summaryrefslogtreecommitdiffstats
path: root/kword/KWView.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commitb6edfe41c9395f2e20784cbf0e630af6426950a3 (patch)
tree56ed9b871d4296e6c15949c24e16420be1b28697 /kword/KWView.cpp
parentef39e8e4178a8f98cf5f154916ba0f03e4855206 (diff)
downloadkoffice-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 'kword/KWView.cpp')
-rw-r--r--kword/KWView.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/kword/KWView.cpp b/kword/KWView.cpp
index 03f6ba6d..f23e634a 100644
--- a/kword/KWView.cpp
+++ b/kword/KWView.cpp
@@ -161,7 +161,7 @@ class TableInfo {
if(cell->protectContent())
m_protectContent=true;
- if(! tableRows.tqcontains(fs->groupmanager())) { // create empty lists.
+ if(! tableRows.contains(fs->groupmanager())) { // create empty lists.
TQValueList<unsigned int> rows;
for(unsigned int i=fs->groupmanager()->getRows(); i != 0; i--)
rows.append(0);
@@ -421,7 +421,7 @@ KWView::~KWView()
if ( m_specialCharDlg )
m_specialCharDlg->closeDialog(); // will call slotSpecialCharDlgClosed
- // Abort any tqfind/tqreplace
+ // Abort any find/replace
delete m_findReplace;
// Delete gui while we still exist ( it needs documentDeleted() )
delete m_gui;
@@ -575,10 +575,10 @@ void KWView::setupActions()
m_actionEditCut = KStdAction::cut( TQT_TQOBJECT(this), TQT_SLOT( editCut() ), actionCollection(), "edit_cut" );
m_actionEditCopy = KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT( editCopy() ), actionCollection(), "edit_copy" );
m_actionEditPaste = KStdAction::paste( TQT_TQOBJECT(this), TQT_SLOT( editPaste() ), actionCollection(), "edit_paste" );
- m_actionEditFind = KStdAction::find( TQT_TQOBJECT(this), TQT_SLOT( editFind() ), actionCollection(), "edit_tqfind" );
+ m_actionEditFind = KStdAction::find( TQT_TQOBJECT(this), TQT_SLOT( editFind() ), actionCollection(), "edit_find" );
m_actionEditFindNext = KStdAction::findNext( TQT_TQOBJECT(this), TQT_SLOT( editFindNext() ), actionCollection(), "edit_findnext" );
m_actionEditFindPrevious = KStdAction::findPrev( TQT_TQOBJECT(this), TQT_SLOT( editFindPrevious() ), actionCollection(), "edit_findprevious" );
- m_actionEditReplace = KStdAction::replace( TQT_TQOBJECT(this), TQT_SLOT( editReplace() ), actionCollection(), "edit_tqreplace" );
+ m_actionEditReplace = KStdAction::replace( TQT_TQOBJECT(this), TQT_SLOT( editReplace() ), actionCollection(), "edit_replace" );
m_actionEditSelectAll = KStdAction::selectAll( TQT_TQOBJECT(this), TQT_SLOT( editSelectAll() ), actionCollection(), "edit_selectall" );
new KAction( i18n( "Select All Frames" ), 0, TQT_TQOBJECT(this), TQT_SLOT( editSelectAllFrames() ), actionCollection(), "edit_selectallframes" );
m_actionEditSelectCurrentFrame = new KAction( i18n( "Select Frame" ), 0,
@@ -1492,7 +1492,7 @@ void KWView::createExpressionActions( KActionMenu * parentMenu,const TQString& f
KAction * act = new KAction( text, 0, TQT_TQOBJECT(this), TQT_SLOT( insertExpression() ),
actionCollection(),
TQString("expression-action_%1").tqarg(i).latin1() );
- if ( personalShortCut.tqcontains(text) )
+ if ( personalShortCut.contains(text) )
act->setShortcut( personalShortCut[text] );
i++;
act->setGroup("expression-action");
@@ -1580,7 +1580,7 @@ void KWView::refreshCustomMenu()
if ( var->type() == VT_CUSTOM )
{
varName=( (KoCustomVariable*) var )->name();
- if ( !lst.tqcontains( varName) )
+ if ( !lst.contains( varName) )
{
lst.append( varName );
TQCString name = TQString("custom-action_%1").tqarg(i).latin1();
@@ -1744,9 +1744,9 @@ int KWView::checkClipboard( TQMimeSource *data )
if ( TQImageDrag::canDecode( data ) )
provides |= ProvidesImage;
- if ( formats.tqfindIndex( KFormula::MimeSource::selectionMimeType() ) != -1 )
+ if ( formats.findIndex( KFormula::MimeSource::selectionMimeType() ) != -1 )
provides |= ProvidesFormula;
- if ( formats.tqfindIndex( "text/plain" ) != -1 )
+ if ( formats.findIndex( "text/plain" ) != -1 )
provides |= ProvidesPlainText;
TQCString returnedTypeMime = KoTextObject::providesOasis( data );
if ( !returnedTypeMime.isEmpty() )
@@ -2122,7 +2122,7 @@ void KWView::updateReadWrite( bool readwrite )
act->setEnabled( true );
// In fact the new view could be readwrite, so this is too dangerous
- // (e.g. during spellchecking or during search-n-tqreplace)
+ // (e.g. during spellchecking or during search-n-replace)
//act = actionCollection()->action("view_newview");
//if (act)
// act->setEnabled( true );
@@ -2198,7 +2198,7 @@ void KWView::updateStyleList()
TQString currentStyle = m_actionFormatStyle->currentText();
// Generate list of styles
const TQStringList lst = m_doc->styleCollection()->displayNameList();
- const int pos = lst.tqfindIndex( currentStyle );
+ const int pos = lst.findIndex( currentStyle );
// Fill the combo - using a KSelectAction
m_actionFormatStyle->setItems( lst );
if ( pos > -1 )
@@ -2261,7 +2261,7 @@ void KWView::updateFrameStyleList()
const TQString currentStyle = m_actionFrameStyle->currentText();
// Generate list of styles
const TQStringList lst = m_doc->frameStyleCollection()->displayNameList();
- const int pos = lst.tqfindIndex( currentStyle );
+ const int pos = lst.findIndex( currentStyle );
// Fill the combo
m_actionFrameStyle->setItems( lst );
if ( pos > -1 )
@@ -2314,7 +2314,7 @@ void KWView::updateTableStyleList()
const TQString currentStyle = m_actionTableStyle->currentText();
// Generate list of styles
const TQStringList lst = m_doc->tableStyleCollection()->displayNameList();
- const int pos = lst.tqfindIndex( currentStyle );
+ const int pos = lst.findIndex( currentStyle );
// Fill the combo
m_actionTableStyle->setItems( lst );
if ( pos > -1 )
@@ -2503,7 +2503,7 @@ void KWView::editFind()
bool hasSelection = edit && edit->textFrameSet()->hasSelection();
bool hasCursor = edit != 0L;
- KoSearchDia dialog( m_gui->canvasWidget(), "tqfind", m_searchEntry, hasSelection, hasCursor );
+ KoSearchDia dialog( m_gui->canvasWidget(), "find", m_searchEntry, hasSelection, hasCursor );
if ( dialog.exec() == TQDialog::Accepted )
{
delete m_findReplace;
@@ -2523,7 +2523,7 @@ void KWView::editReplace()
bool hasSelection = edit && edit->textFrameSet()->hasSelection();
bool hasCursor = edit != 0L;
- KoReplaceDia dialog( m_gui->canvasWidget(), "tqreplace", m_searchEntry, m_replaceEntry, hasSelection, hasCursor );
+ KoReplaceDia dialog( m_gui->canvasWidget(), "replace", m_searchEntry, m_replaceEntry, hasSelection, hasCursor );
if ( dialog.exec() == TQDialog::Accepted )
{
delete m_findReplace;
@@ -2568,7 +2568,7 @@ void KWView::adjustZOrderOfSelectedFrames(MoveFrameType moveType) {
if(table) {
for (TQPtrListIterator<KWFrame> cellIt(table->frameIterator() ); cellIt.current() ; ++cellIt ) {
KWFrame *frame = cellIt.current();
- if(page->rect().tqcontains(*frame) && !frames.tqcontains(frame))
+ if(page->rect().contains(*frame) && !frames.contains(frame))
frames.append(frame);
}
}
@@ -2642,7 +2642,7 @@ void KWView::adjustZOrderOfSelectedFrames(MoveFrameType moveType) {
void KWView::increaseAllZOrdersAbove(int refZOrder, int pageNum, const TQPtrList<KWFrame>& frameSelection) {
TQPtrList<KWFrame> framesInPage = m_doc->framesInPage( pageNum, false );
for ( TQPtrListIterator<KWFrame> frameIt( framesInPage ); frameIt.current(); ++frameIt ) {
- if(frameSelection.tqcontains(frameIt.current()) > 0) continue; // ignore frames we selected.
+ if(frameSelection.contains(frameIt.current()) > 0) continue; // ignore frames we selected.
if(frameIt.current()->zOrder() >= refZOrder) {
frameIt.current()->setZOrder( frameIt.current()->zOrder() + 1 );
}
@@ -2653,7 +2653,7 @@ void KWView::increaseAllZOrdersAbove(int refZOrder, int pageNum, const TQPtrList
void KWView::decreaseAllZOrdersUnder(int refZOrder, int pageNum, const TQPtrList<KWFrame>& frameSelection) {
TQPtrList<KWFrame> framesInPage = m_doc->framesInPage( pageNum, false );
for ( TQPtrListIterator<KWFrame> frameIt( framesInPage ); frameIt.current(); ++frameIt ) {
- if(frameSelection.tqcontains(frameIt.current()) > 0) continue; // ignore frames we selected.
+ if(frameSelection.contains(frameIt.current()) > 0) continue; // ignore frames we selected.
if(frameIt.current()->zOrder() <= refZOrder) {
frameIt.current()->setZOrder( frameIt.current()->zOrder() - 1 );
}
@@ -2665,7 +2665,7 @@ int KWView::raiseFrame(const TQPtrList<KWFrame>& frameSelection, const KWFrame *
TQValueList<int> zorders;
TQPtrList<KWFrame> framesInPage = m_doc->framesInPage( frame->pageNumber(), false );
for ( TQPtrListIterator<KWFrame> frameIt( framesInPage ); frameIt.current(); ++frameIt ) {
- if(frameSelection.tqcontains(frameIt.current()) > 0) continue; // ignore other frames we selected.
+ if(frameSelection.contains(frameIt.current()) > 0) continue; // ignore other frames we selected.
if(! frameIt.current()->intersects(*frame)) continue; // only frames that I intersect with.
int z = frameIt.current()->zOrder();
if(z > frame->zOrder()) {
@@ -2675,7 +2675,7 @@ int KWView::raiseFrame(const TQPtrList<KWFrame>& frameSelection, const KWFrame *
}
if(newZOrder==10000) return frame->zOrder();
// Ensure that newZOrder is "free"
- if ( zorders.tqfind( newZOrder ) != zorders.end() )
+ if ( zorders.find( newZOrder ) != zorders.end() )
increaseAllZOrdersAbove( newZOrder, frame->pageNumber(), frameSelection );
return newZOrder;
}
@@ -2685,7 +2685,7 @@ int KWView::lowerFrame(const TQPtrList<KWFrame>& frameSelection, const KWFrame *
TQValueList<int> zorders;
TQPtrList<KWFrame> framesInPage = m_doc->framesInPage( frame->pageNumber(), false );
for ( TQPtrListIterator<KWFrame> frameIt( framesInPage ); frameIt.current(); ++frameIt ) {
- if(frameSelection.tqcontains(frameIt.current()) > 0) continue; // ignore other frames we selected.
+ if(frameSelection.contains(frameIt.current()) > 0) continue; // ignore other frames we selected.
if(frameIt.current()->frameSet()->isMainFrameset()) continue; // ignore main frameset.
if(! frameIt.current()->intersects(*frame)) continue; // only frames that I intersect with.
int z = frameIt.current()->zOrder();
@@ -2696,7 +2696,7 @@ int KWView::lowerFrame(const TQPtrList<KWFrame>& frameSelection, const KWFrame *
}
if(newZOrder==-10000) return frame->zOrder();
// Ensure that newZOrder is "free"
- if ( zorders.tqfind( newZOrder ) != zorders.end() )
+ if ( zorders.find( newZOrder ) != zorders.end() )
decreaseAllZOrdersUnder( newZOrder, frame->pageNumber(), frameSelection );
return newZOrder;
}
@@ -2705,7 +2705,7 @@ int KWView::bringToFront(const TQPtrList<KWFrame>& frameSelection, const KWFrame
int newZOrder = frame->zOrder();
TQPtrList<KWFrame> framesInPage = m_doc->framesInPage( frame->pageNumber(), false );
for ( TQPtrListIterator<KWFrame> frameIt( framesInPage ); frameIt.current(); ++frameIt ) {
- if(frameSelection.tqcontains(frameIt.current()) > 0) continue; // ignore other frames we selected.
+ if(frameSelection.contains(frameIt.current()) > 0) continue; // ignore other frames we selected.
if(! frameIt.current()->intersects(*frame)) continue; // only frames that I intersect with.
newZOrder=TQMAX(newZOrder, frameIt.current()->zOrder()+1);
}
@@ -2716,7 +2716,7 @@ int KWView::sendToBack(const TQPtrList<KWFrame>& frameSelection, const KWFrame *
int newZOrder = frame->zOrder();
TQPtrList<KWFrame> framesInPage = m_doc->framesInPage( frame->pageNumber(), false );
for ( TQPtrListIterator<KWFrame> frameIt( framesInPage ); frameIt.current(); ++frameIt ) {
- if(frameSelection.tqcontains(frameIt.current()) > 0) continue; // ignore other frames we selected.
+ if(frameSelection.contains(frameIt.current()) > 0) continue; // ignore other frames we selected.
if(frameIt.current()->frameSet()->isMainFrameset()) continue; // ignore main frameset.
if(! frameIt.current()->intersects(*frame)) continue; // only frames that I intersect with.
newZOrder=TQMIN(newZOrder, frameIt.current()->zOrder()-1);
@@ -3063,12 +3063,12 @@ void KWView::changeZoomMenu( int zoom )
regexp.search(*it);
const int val=regexp.cap(1).toInt(&ok);
//zoom : limit inferior=10
- if(ok && val>9 && list.tqcontains(val)==0)
+ if(ok && val>9 && list.contains(val)==0)
list.append( val );
}
//necessary at the beginning when we read config
//this value is not in combo list
- if(list.tqcontains(zoom)==0)
+ if(list.contains(zoom)==0)
list.append( zoom );
qHeapSort( list );
@@ -3098,13 +3098,13 @@ void KWView::showZoom( int zoom )
{
TQStringList list = m_actionViewZoom->items();
TQString zoomStr( i18n("%1%").tqarg( zoom ) );
- m_actionViewZoom->setCurrentItem( list.tqfindIndex(zoomStr) );
+ m_actionViewZoom->setCurrentItem( list.findIndex(zoomStr) );
}
void KWView::showZoom( const TQString& zoom )
{
TQStringList list = m_actionViewZoom->items();
- m_actionViewZoom->setCurrentItem( list.tqfindIndex( zoom ) );
+ m_actionViewZoom->setCurrentItem( list.findIndex( zoom ) );
}
void KWView::slotViewFormattingChars()
@@ -3530,7 +3530,7 @@ void KWView::insertLink()
if ( edit->textFrameSet()->hasSelection() )
{
TQString selectedText = edit->textFrameSet()->textObject()->selectedText();
- if ( edit->textFrameSet()->textObject()->selectionHasCustomItems() || selectedText.tqcontains('\n') )
+ if ( edit->textFrameSet()->textObject()->selectionHasCustomItems() || selectedText.contains('\n') )
return;
if ( selectedText.startsWith( "mailto:/" ) ||
selectedText.startsWith( "ftp:/" ) ||
@@ -3581,7 +3581,7 @@ void KWView::insertVariable()
if ( edit )
{
KAction * act = (KAction *)(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender())));
- VariableDefMap::Iterator it = m_variableDefMap.tqfind( act );
+ VariableDefMap::Iterator it = m_variableDefMap.find( act );
if ( it == m_variableDefMap.end() )
kdWarning() << "Action not found in m_variableDefMap." << endl;
else
@@ -4763,7 +4763,7 @@ TQPtrList<KoTextFormatInterface> KWView::applicableTextInterfaces() const
TQValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin();
while(framesIterator != selectedFrames.end()) {
KWTextFrameSet* fs = dynamic_cast<KWTextFrameSet *>( (*framesIterator)->frame()->frameSet() );
- if ( fs && !lst.tqcontains( fs )&& !fs->protectContent() )
+ if ( fs && !lst.contains( fs )&& !fs->protectContent() )
lst.append( fs );
++framesIterator;
}
@@ -5572,7 +5572,7 @@ void KWView::startKSpell()
TQObject::connect( m_spell.dlg, TQT_SIGNAL(misspelling(const TQString&, int)),
TQT_TQOBJECT(this), TQT_SLOT(spellCheckerMisspelling(const TQString&, int)) );
- TQObject::connect( m_spell.dlg, TQT_SIGNAL(tqreplace(const TQString&, int, const TQString&)),
+ TQObject::connect( m_spell.dlg, TQT_SIGNAL(replace(const TQString&, int, const TQString&)),
TQT_TQOBJECT(this), TQT_SLOT(spellCheckerCorrected(const TQString&, int, const TQString&)) );
TQObject::connect( m_spell.dlg, TQT_SIGNAL(done(const TQString&) ),
TQT_TQOBJECT(this), TQT_SLOT(spellCheckerDone(const TQString&)) );
@@ -6934,7 +6934,7 @@ void KWView::insertFile(const KURL& url)
TQString name = framesetElem.attribute( "name" );
TQString grpMgr = framesetElem.attribute( "grpMgr" );
- if ( !inlineFsNames.tqcontains(name) && !inlineFsNames.tqcontains(grpMgr) )
+ if ( !inlineFsNames.contains(name) && !inlineFsNames.contains(grpMgr) )
{ // fixed frameset
if ( !grpMgr.isEmpty() )
{ // Table cell
@@ -6973,7 +6973,7 @@ void KWView::insertFile(const KURL& url)
TQString name = framesetElem.attribute("name");
TQString grpMgr = framesetElem.attribute( "grpMgr" );
// We skip headers, footers and framsets/tables inside theese
- if ( !fsInHeader.tqcontains(name) && !fsInHeader.tqcontains(grpMgr) &&
+ if ( !fsInHeader.contains(name) && !fsInHeader.contains(grpMgr) &&
!( frameSetType == FT_TEXT &&
(info == KWFrameSet::FI_FIRST_HEADER ||
info == KWFrameSet::FI_EVEN_HEADER ||
@@ -7347,12 +7347,12 @@ void KWView::addPersonalExpression()
doc = TQDomDocument( "KWordExpression" );
TQDomElement begin = doc.createElement( "KWordExpression" );
doc.appendChild( begin );
- TQMapIterator<TQString, TQStringList> itPersonalExp = lstOfPersonalExp.tqfind(i18n("Normal"));
+ TQMapIterator<TQString, TQStringList> itPersonalExp = lstOfPersonalExp.find(i18n("Normal"));
if ( itPersonalExp != lstOfPersonalExp.end())
{
list = itPersonalExp.data();
list<<newExpression;
- lstOfPersonalExp.tqreplace( i18n("Normal"), list);
+ lstOfPersonalExp.replace( i18n("Normal"), list);
}
else
{
@@ -7441,7 +7441,7 @@ TQPtrList<KAction> KWView::listOfResultOfCheckWord( const TQString &word )
TQPtrList<KAction> listAction;
DefaultDictionary *dict = m_broker->defaultDictionary();
const TQStringList lst = dict->suggest( word );
- if ( !lst.tqcontains( word ) )
+ if ( !lst.contains( word ) )
{
TQStringList::ConstIterator it = lst.begin();
const TQStringList::ConstIterator end = lst.end();