summaryrefslogtreecommitdiffstats
path: root/kspread/kspread_undo.cc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kspread/kspread_undo.cc
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kspread/kspread_undo.cc')
-rw-r--r--kspread/kspread_undo.cc512
1 files changed, 256 insertions, 256 deletions
diff --git a/kspread/kspread_undo.cc b/kspread/kspread_undo.cc
index a8518b0f..ae075fe6 100644
--- a/kspread/kspread_undo.cc
+++ b/kspread/kspread_undo.cc
@@ -33,7 +33,7 @@
using namespace KSpread;
-bool operator < (const QPoint& pointA , const QPoint& pointB)
+bool operator < (const TQPoint& pointA , const TQPoint& pointB)
{
if (pointA.y() == pointB.y())
return ( pointA.x() < pointB.x() );
@@ -149,18 +149,18 @@ bool Undo::isLocked() const
return m_pDoc->undoLocked();
}
-QString Undo::getRedoName()
+TQString Undo::getRedoName()
{
if ( m_stckRedo.isEmpty() )
- return QString("");
+ return TQString("");
return m_stckRedo.current()->getName();
}
-QString Undo::getUndoName()
+TQString Undo::getUndoName()
{
if ( m_stckUndo.isEmpty() )
- return QString("");
+ return TQString("");
return m_stckUndo.current()->getName();
}
@@ -169,7 +169,7 @@ QString Undo::getUndoName()
* MacroUndoAction
*
***************************************************************************/
-MacroUndoAction::MacroUndoAction( Doc *_doc, const QString& _name ):
+MacroUndoAction::MacroUndoAction( Doc *_doc, const TQString& _name ):
UndoAction( _doc )
{
name=_name;
@@ -187,14 +187,14 @@ void MacroUndoAction::addCommand(UndoAction *command)
void MacroUndoAction::undo()
{
- QPtrListIterator<UndoAction> it(m_commands);
+ TQPtrListIterator<UndoAction> it(m_commands);
for ( ; it.current() ; ++it )
it.current()->undo();
}
void MacroUndoAction::redo()
{
- QPtrListIterator<UndoAction> it(m_commands);
+ TQPtrListIterator<UndoAction> it(m_commands);
for ( ; it.current() ; ++it )
it.current()->redo();
}
@@ -216,18 +216,18 @@ UndoInsertRemoveAction::~UndoInsertRemoveAction()
}
void UndoInsertRemoveAction::saveFormulaReference( Sheet *_sheet,
- int col, int row, QString & formula )
+ int col, int row, TQString & formula )
{
if ( _sheet == 0 )
return;
- QString sheetName = _sheet->sheetName();
+ TQString sheetName = _sheet->sheetName();
m_lstFormulaCells.append( FormulaOfCell( sheetName, col, row, formula ) );
}
void UndoInsertRemoveAction::undoFormulaReference()
{
- QValueList<FormulaOfCell>::iterator it;
+ TQValueList<FormulaOfCell>::iterator it;
for ( it = m_lstFormulaCells.begin(); it != m_lstFormulaCells.end(); ++it )
{
Sheet* sheet = doc()->map()->findSheet( (*it).sheetName() );
@@ -257,19 +257,19 @@ UndoRemoveColumn::UndoRemoveColumn( Doc *_doc, Sheet *_sheet, int _column,int _n
m_iNbCol = _nbCol;
m_printRange = _sheet->print()->printRange();
m_printRepeatColumns = _sheet->print()->printRepeatColumns();
- QRect selection;
+ TQRect selection;
selection.setCoords( _column, 1, _column+m_iNbCol, KS_rowMax );
- QDomDocument doc = _sheet->saveCellRegion( selection );
+ TQDomDocument doc = _sheet->saveCellRegion( selection );
// Save to buffer
- QString buffer;
- QTextStream str( &buffer, IO_WriteOnly );
+ TQString buffer;
+ TQTextStream str( &buffer, IO_WriteOnly );
str << doc;
- // This is a terrible hack to store unicode
- // data in a QCString in a way that
- // QCString::length() == QCString().size().
- // This allows us to treat the QCString like a QByteArray later on.
+ // This is a terrible hack to store tqunicode
+ // data in a TQCString in a way that
+ // TQCString::length() == TQCString().size().
+ // This allows us to treat the TQCString like a TQByteArray later on.
m_data = buffer.utf8();
int len = m_data.length();
char tmp = m_data[ len - 1 ];
@@ -291,8 +291,8 @@ void UndoRemoveColumn::undo()
sheet->insertColumn( m_iColumn,m_iNbCol);
- QPoint pastePoint( m_iColumn, 1 );
- sheet->paste( m_data, QRect( pastePoint, pastePoint ) );
+ TQPoint pastePoint( m_iColumn, 1 );
+ sheet->paste( m_data, TQRect( pastePoint, pastePoint ) );
if(sheet->getAutoCalc()) sheet->recalc();
sheet->print()->setPrintRange( m_printRange );
@@ -376,19 +376,19 @@ UndoRemoveRow::UndoRemoveRow( Doc *_doc, Sheet *_sheet, int _row,int _nbRow) :
m_printRange=_sheet->print()->printRange();
m_printRepeatRows = _sheet->print()->printRepeatRows();
- QRect selection;
+ TQRect selection;
selection.setCoords( 1, _row, KS_colMax, _row+m_iNbRow );
- QDomDocument doc = _sheet->saveCellRegion( selection );
+ TQDomDocument doc = _sheet->saveCellRegion( selection );
// Save to buffer
- QString buffer;
- QTextStream str( &buffer, IO_WriteOnly );
+ TQString buffer;
+ TQTextStream str( &buffer, IO_WriteOnly );
str << doc;
- // This is a terrible hack to store unicode
- // data in a QCString in a way that
- // QCString::length() == QCString().size().
- // This allows us to treat the QCString like a QByteArray later on.
+ // This is a terrible hack to store tqunicode
+ // data in a TQCString in a way that
+ // TQCString::length() == TQCString().size().
+ // This allows us to treat the TQCString like a TQByteArray later on.
m_data = buffer.utf8();
int len = m_data.length();
char tmp = m_data[ len - 1 ];
@@ -416,8 +416,8 @@ void UndoRemoveRow::undo()
sheet->insertRow( m_iRow,m_iNbRow );
- QPoint pastePoint( 1, m_iRow );
- sheet->paste( m_data, QRect(pastePoint, pastePoint) );
+ TQPoint pastePoint( 1, m_iRow );
+ sheet->paste( m_data, TQRect(pastePoint, pastePoint) );
sheet->print()->setPrintRange( m_printRange );
sheet->print()->setPrintRepeatRows( m_printRepeatRows );
@@ -492,7 +492,7 @@ void UndoInsertRow::redo()
*
***************************************************************************/
-/*UndoHideRow::UndoHideRow( Doc *_doc, Sheet *_sheet, int _row, int _nbRow , QValueList<int>_listRow) :
+/*UndoHideRow::UndoHideRow( Doc *_doc, Sheet *_sheet, int _row, int _nbRow , TQValueList<int>_listRow) :
UndoAction( _doc )
{
name=i18n("Hide Rows");
@@ -502,14 +502,14 @@ void UndoInsertRow::redo()
if(m_iNbRow!=-1)
createList( listRow ,_sheet );
else
- listRow=QValueList<int>(_listRow);
+ listRow=TQValueList<int>(_listRow);
}
UndoHideRow::~UndoHideRow()
{
}
-void UndoHideRow::createList( QValueList<int>&list,Sheet *tab )
+void UndoHideRow::createList( TQValueList<int>&list,Sheet *tab )
{
RowFormat *rl;
for(int i=m_iRow;i<=(m_iRow+m_iNbRow);i++)
@@ -548,7 +548,7 @@ void UndoHideRow::redo()
*
***************************************************************************/
-/*UndoHideColumn::UndoHideColumn( Doc *_doc, Sheet *_sheet, int _column, int _nbCol, QValueList<int>_listCol ) :
+/*UndoHideColumn::UndoHideColumn( Doc *_doc, Sheet *_sheet, int _column, int _nbCol, TQValueList<int>_listCol ) :
UndoAction( _doc )
{
name=i18n("Hide Columns");
@@ -559,14 +559,14 @@ void UndoHideRow::redo()
if(m_iNbCol!=-1)
createList( listCol ,_sheet );
else
- listCol=QValueList<int>(_listCol);
+ listCol=TQValueList<int>(_listCol);
}
UndoHideColumn::~UndoHideColumn()
{
}
-void UndoHideColumn::createList( QValueList<int>&list,Sheet *tab )
+void UndoHideColumn::createList( TQValueList<int>&list,Sheet *tab )
{
ColumnFormat *cl;
for(int i=m_iColumn;i<=(m_iColumn+m_iNbCol);i++)
@@ -605,7 +605,7 @@ void UndoHideColumn::redo()
*
***************************************************************************/
-/*UndoShowRow::UndoShowRow( Doc *_doc, Sheet *_sheet, int _row, int _nbRow, QValueList<int>_listRow ) :
+/*UndoShowRow::UndoShowRow( Doc *_doc, Sheet *_sheet, int _row, int _nbRow, TQValueList<int>_listRow ) :
UndoAction( _doc )
{
name=i18n("Show Rows");
@@ -616,14 +616,14 @@ void UndoHideColumn::redo()
if(m_iNbRow!=-1)
createList( listRow ,_sheet );
else
- listRow=QValueList<int>(_listRow);
+ listRow=TQValueList<int>(_listRow);
}
UndoShowRow::~UndoShowRow()
{
}
-void UndoShowRow::createList( QValueList<int>&list,Sheet *tab )
+void UndoShowRow::createList( TQValueList<int>&list,Sheet *tab )
{
RowFormat *rl;
for(int i=m_iRow;i<=(m_iRow+m_iNbRow);i++)
@@ -662,7 +662,7 @@ void UndoShowRow::redo()
*
***************************************************************************/
-/*UndoShowColumn::UndoShowColumn( Doc *_doc, Sheet *_sheet, int _column, int _nbCol,QValueList<int>_listCol ) :
+/*UndoShowColumn::UndoShowColumn( Doc *_doc, Sheet *_sheet, int _column, int _nbCol,TQValueList<int>_listCol ) :
UndoAction( _doc )
{
name=i18n("Show Columns");
@@ -673,14 +673,14 @@ void UndoShowRow::redo()
if(m_iNbCol!=-1)
createList( listCol ,_sheet );
else
- listCol=QValueList<int>(_listCol);
+ listCol=TQValueList<int>(_listCol);
}
UndoShowColumn::~UndoShowColumn()
{
}
-void UndoShowColumn::createList( QValueList<int>&list,Sheet *tab )
+void UndoShowColumn::createList( TQValueList<int>&list,Sheet *tab )
{
ColumnFormat *cl;
for(int i=m_iColumn;i<=(m_iColumn+m_iNbCol);i++)
@@ -838,7 +838,7 @@ void UndoPaperLayout::redo()
*
***************************************************************************/
-UndoSetText::UndoSetText( Doc *_doc, Sheet *_sheet, const QString& _text, int _column, int _row,FormatType _formatType ) :
+UndoSetText::UndoSetText( Doc *_doc, Sheet *_sheet, const TQString& _text, int _column, int _row,FormatType _formatType ) :
UndoAction( _doc )
{
name=i18n("Change Text");
@@ -871,7 +871,7 @@ void UndoSetText::undo()
cell->setCellText( "" );
else
cell->setCellText( m_strText );
- sheet->updateView( QRect( m_iColumn, m_iRow, 1, 1 ) );
+ sheet->updateView( TQRect( m_iColumn, m_iRow, 1, 1 ) );
doc()->undoUnlock();
}
@@ -891,7 +891,7 @@ void UndoSetText::redo()
else
cell->setCellText( m_strRedoText );
cell->format()->setFormatType(m_eFormatTypeRedo);
- sheet->updateView( QRect( m_iColumn, m_iRow, 1, 1 ) );
+ sheet->updateView( TQRect( m_iColumn, m_iRow, 1, 1 ) );
doc()->undoUnlock();
}
@@ -904,7 +904,7 @@ void UndoSetText::redo()
UndoCellFormat::UndoCellFormat( Doc * _doc,
Sheet * _sheet,
const Region & _selection,
- const QString & _name ) :
+ const TQString & _name ) :
UndoAction( _doc )
{
if ( _name.isEmpty())
@@ -917,12 +917,12 @@ UndoCellFormat::UndoCellFormat( Doc * _doc,
copyFormat( m_lstFormats, m_lstColFormats, m_lstRowFormats, _sheet );
}
-void UndoCellFormat::copyFormat(QValueList<layoutCell> & list,
- QValueList<layoutColumn> & listCol,
- QValueList<layoutRow> & listRow,
+void UndoCellFormat::copyFormat(TQValueList<tqlayoutCell> & list,
+ TQValueList<tqlayoutColumn> & listCol,
+ TQValueList<tqlayoutRow> & listRow,
Sheet * sheet )
{
- QValueList<layoutCell>::Iterator it2;
+ TQValueList<tqlayoutCell>::Iterator it2;
for ( it2 = list.begin(); it2 != list.end(); ++it2 )
{
delete (*it2).l;
@@ -933,7 +933,7 @@ void UndoCellFormat::copyFormat(QValueList<layoutCell> & list,
Region::ConstIterator endOfList(m_region.constEnd());
for (Region::ConstIterator it = m_region.constBegin(); it != endOfList; ++it)
{
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
int bottom = range.bottom();
int right = range.right();
@@ -942,20 +942,20 @@ void UndoCellFormat::copyFormat(QValueList<layoutCell> & list,
/* Don't need to go through the loop twice...
for (int i = range.left(); i <= right; ++i)
{
- layoutColumn tmplayout;
- tmplayout.col = i;
- tmplayout.l = new ColumnFormat( sheet, i );
- tmplayout.l->copy( *(sheet->columnFormat( i )) );
- listCol.append(tmplayout);
+ tqlayoutColumn tmptqlayout;
+ tmptqlayout.col = i;
+ tmptqlayout.l = new ColumnFormat( sheet, i );
+ tmptqlayout.l->copy( *(sheet->columnFormat( i )) );
+ listCol.append(tmptqlayout);
}
*/
for ( int c = range.left(); c <= right; ++c )
{
- layoutColumn tmplayout;
- tmplayout.col = c;
- tmplayout.l = new ColumnFormat( sheet, c );
- tmplayout.l->copy( *(sheet->columnFormat( c )) );
- listCol.append(tmplayout);
+ tqlayoutColumn tmptqlayout;
+ tmptqlayout.col = c;
+ tmptqlayout.l = new ColumnFormat( sheet, c );
+ tmptqlayout.l->copy( *(sheet->columnFormat( c )) );
+ listCol.append(tmptqlayout);
cell = sheet->getFirstCellColumn( c );
while ( cell )
@@ -966,12 +966,12 @@ void UndoCellFormat::copyFormat(QValueList<layoutCell> & list,
continue;
}
- layoutCell tmplayout;
- tmplayout.col = c;
- tmplayout.row = cell->row();
- tmplayout.l = new Format( sheet, 0 );
- tmplayout.l->copy( *(sheet->cellAt( tmplayout.col, tmplayout.row )->format()) );
- list.append(tmplayout);
+ tqlayoutCell tmptqlayout;
+ tmptqlayout.col = c;
+ tmptqlayout.row = cell->row();
+ tmptqlayout.l = new Format( sheet, 0 );
+ tmptqlayout.l->copy( *(sheet->cellAt( tmptqlayout.col, tmptqlayout.row )->format()) );
+ list.append(tmptqlayout);
cell = sheet->getNextCellDown( c, cell->row() );
}
@@ -984,12 +984,12 @@ void UndoCellFormat::copyFormat(QValueList<layoutCell> & list,
if ( range.left() <= col && right >= col
&& !c->isPartOfMerged())
{
- layoutCell tmplayout;
- tmplayout.col = c->column();
- tmplayout.row = c->row();
- tmplayout.l = new Format( sheet, 0 );
- tmplayout.l->copy( *(sheet->cellAt( tmplayout.col, tmplayout.row )) );
- list.append(tmplayout);
+ tqlayoutCell tmptqlayout;
+ tmptqlayout.col = c->column();
+ tmptqlayout.row = c->row();
+ tmptqlayout.l = new Format( sheet, 0 );
+ tmptqlayout.l->copy( *(sheet->cellAt( tmptqlayout.col, tmptqlayout.row )) );
+ list.append(tmptqlayout);
}
}
*/
@@ -998,11 +998,11 @@ void UndoCellFormat::copyFormat(QValueList<layoutCell> & list,
{
for ( int row = range.top(); row <= bottom; ++row )
{
- layoutRow tmplayout;
- tmplayout.row = row;
- tmplayout.l = new RowFormat( sheet, row );
- tmplayout.l->copy( *(sheet->rowFormat( row )) );
- listRow.append(tmplayout);
+ tqlayoutRow tmptqlayout;
+ tmptqlayout.row = row;
+ tmptqlayout.l = new RowFormat( sheet, row );
+ tmptqlayout.l->copy( *(sheet->rowFormat( row )) );
+ listRow.append(tmptqlayout);
cell = sheet->getFirstCellRow( row );
while ( cell )
@@ -1012,12 +1012,12 @@ void UndoCellFormat::copyFormat(QValueList<layoutCell> & list,
cell = sheet->getNextCellRight( cell->column(), row );
continue;
}
- layoutCell tmplayout;
- tmplayout.col = cell->column();
- tmplayout.row = row;
- tmplayout.l = new Format( sheet, 0 );
- tmplayout.l->copy( *(sheet->cellAt( cell->column(), row )->format()) );
- list.append(tmplayout);
+ tqlayoutCell tmptqlayout;
+ tmptqlayout.col = cell->column();
+ tmptqlayout.row = row;
+ tmptqlayout.l = new Format( sheet, 0 );
+ tmptqlayout.l->copy( *(sheet->cellAt( cell->column(), row )->format()) );
+ list.append(tmptqlayout);
cell = sheet->getNextCellRight( cell->column(), row );
}
@@ -1030,12 +1030,12 @@ void UndoCellFormat::copyFormat(QValueList<layoutCell> & list,
if ( range.top() <= row && bottom >= row
&& !c->isPartOfMerged())
{
- layoutCell tmplayout;
- tmplayout.col = c->column();
- tmplayout.row = c->row();
- tmplayout.l = new Format( sheet, 0 );
- tmplayout.l->copy( *(sheet->cellAt( tmplayout.col, tmplayout.row )) );
- list.append(tmplayout);
+ tqlayoutCell tmptqlayout;
+ tmptqlayout.col = c->column();
+ tmptqlayout.row = c->row();
+ tmptqlayout.l = new Format( sheet, 0 );
+ tmptqlayout.l->copy( *(sheet->cellAt( tmptqlayout.col, tmptqlayout.row )) );
+ list.append(tmptqlayout);
}
}
*/
@@ -1048,12 +1048,12 @@ void UndoCellFormat::copyFormat(QValueList<layoutCell> & list,
Cell * cell = sheet->nonDefaultCell( x, y );
if ( !cell->isPartOfMerged() )
{
- layoutCell tmplayout;
- tmplayout.col = x;
- tmplayout.row = y;
- tmplayout.l = new Format( sheet, 0 );
- tmplayout.l->copy( *(sheet->cellAt( x, y )->format()) );
- list.append(tmplayout);
+ tqlayoutCell tmptqlayout;
+ tmptqlayout.col = x;
+ tmptqlayout.row = y;
+ tmptqlayout.l = new Format( sheet, 0 );
+ tmptqlayout.l->copy( *(sheet->cellAt( x, y )->format()) );
+ list.append(tmptqlayout);
}
}
}
@@ -1062,7 +1062,7 @@ void UndoCellFormat::copyFormat(QValueList<layoutCell> & list,
UndoCellFormat::~UndoCellFormat()
{
- QValueList<layoutCell>::Iterator it2;
+ TQValueList<tqlayoutCell>::Iterator it2;
for ( it2 = m_lstFormats.begin(); it2 != m_lstFormats.end(); ++it2 )
{
delete (*it2).l;
@@ -1075,7 +1075,7 @@ UndoCellFormat::~UndoCellFormat()
}
m_lstRedoFormats.clear();
- QValueList<layoutColumn>::Iterator it3;
+ TQValueList<tqlayoutColumn>::Iterator it3;
for ( it3 = m_lstColFormats.begin(); it3 != m_lstColFormats.end(); ++it3 )
{
delete (*it3).l;
@@ -1088,7 +1088,7 @@ UndoCellFormat::~UndoCellFormat()
}
m_lstRedoColFormats.clear();
- QValueList<layoutRow>::Iterator it4;
+ TQValueList<tqlayoutRow>::Iterator it4;
for ( it4 = m_lstRowFormats.begin(); it4 != m_lstRowFormats.end(); ++it4 )
{
delete (*it4).l;
@@ -1116,10 +1116,10 @@ void UndoCellFormat::undo()
Region::ConstIterator endOfList(m_region.constEnd());
for (Region::ConstIterator it = m_region.constBegin(); it != endOfList; ++it)
{
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
if( util_isColumnSelected( range ) )
{
- QValueList<layoutColumn>::Iterator it2;
+ TQValueList<tqlayoutColumn>::Iterator it2;
for ( it2 = m_lstColFormats.begin(); it2 != m_lstColFormats.end(); ++it2 )
{
ColumnFormat * col = sheet->nonDefaultColumnFormat( (*it2).col );
@@ -1128,7 +1128,7 @@ void UndoCellFormat::undo()
}
else if( util_isRowSelected( range ) )
{
- QValueList<layoutRow>::Iterator it2;
+ TQValueList<tqlayoutRow>::Iterator it2;
for ( it2 = m_lstRowFormats.begin(); it2 != m_lstRowFormats.end(); ++it2 )
{
RowFormat * row = sheet->nonDefaultRowFormat( (*it2).row );
@@ -1136,7 +1136,7 @@ void UndoCellFormat::undo()
}
}
- QValueList<layoutCell>::Iterator it2;
+ TQValueList<tqlayoutCell>::Iterator it2;
for ( it2 = m_lstFormats.begin(); it2 != m_lstFormats.end(); ++it2 )
{
Cell *cell = sheet->nonDefaultCell( (*it2).col,(*it2).row );
@@ -1164,10 +1164,10 @@ void UndoCellFormat::redo()
Region::ConstIterator endOfList(m_region.constEnd());
for (Region::ConstIterator it = m_region.constBegin(); it != endOfList; ++it)
{
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
if ( util_isColumnSelected( range ) )
{
- QValueList<layoutColumn>::Iterator it2;
+ TQValueList<tqlayoutColumn>::Iterator it2;
for ( it2 = m_lstRedoColFormats.begin(); it2 != m_lstRedoColFormats.end(); ++it2 )
{
ColumnFormat * col = sheet->nonDefaultColumnFormat( (*it2).col );
@@ -1176,7 +1176,7 @@ void UndoCellFormat::redo()
}
else if( util_isRowSelected( range ) )
{
- QValueList<layoutRow>::Iterator it2;
+ TQValueList<tqlayoutRow>::Iterator it2;
for ( it2 = m_lstRedoRowFormats.begin(); it2 != m_lstRedoRowFormats.end(); ++it2 )
{
RowFormat * row = sheet->nonDefaultRowFormat( (*it2).row );
@@ -1184,7 +1184,7 @@ void UndoCellFormat::redo()
}
}
- QValueList<layoutCell>::Iterator it2;
+ TQValueList<tqlayoutCell>::Iterator it2;
for ( it2 = m_lstRedoFormats.begin(); it2 != m_lstRedoFormats.end(); ++it2 )
{
Cell * cell = sheet->nonDefaultCell( (*it2).col,(*it2).row );
@@ -1212,7 +1212,7 @@ UndoChangeAngle::UndoChangeAngle( Doc * _doc,
UndoAction( _doc )
{
name = i18n("Change Angle");
- m_layoutUndo = new UndoCellFormat( _doc, _sheet, _selection, QString::null );
+ m_layoutUndo = new UndoCellFormat( _doc, _sheet, _selection, TQString() );
m_resizeUndo = new UndoResizeColRow( _doc, _sheet, _selection );
}
@@ -1240,7 +1240,7 @@ void UndoChangeAngle::redo()
*
***************************************************************************/
-UndoSort::UndoSort( Doc * _doc, Sheet * _sheet, const QRect & _selection ) :
+UndoSort::UndoSort( Doc * _doc, Sheet * _sheet, const TQRect & _selection ) :
UndoAction( _doc )
{
name = i18n("Sort");
@@ -1250,10 +1250,10 @@ UndoSort::UndoSort( Doc * _doc, Sheet * _sheet, const QRect & _selection ) :
copyAll( m_lstFormats, m_lstColFormats, m_lstRowFormats, _sheet );
}
-void UndoSort::copyAll(QValueList<layoutTextCell> & list, QValueList<layoutColumn> & listCol,
- QValueList<layoutRow> & listRow, Sheet * sheet )
+void UndoSort::copyAll(TQValueList<tqlayoutTextCell> & list, TQValueList<tqlayoutColumn> & listCol,
+ TQValueList<tqlayoutRow> & listRow, Sheet * sheet )
{
- QValueList<layoutTextCell>::Iterator it2;
+ TQValueList<tqlayoutTextCell>::Iterator it2;
for ( it2 = list.begin(); it2 != list.end(); ++it2 )
{
delete (*it2).l;
@@ -1265,24 +1265,24 @@ void UndoSort::copyAll(QValueList<layoutTextCell> & list, QValueList<layoutColum
Cell * c;
for (int col = m_rctRect.left(); col <= m_rctRect.right(); ++col)
{
- layoutColumn tmplayout;
- tmplayout.col = col;
- tmplayout.l = new ColumnFormat( sheet, col );
- tmplayout.l->copy( *(sheet->columnFormat( col )) );
- listCol.append(tmplayout);
+ tqlayoutColumn tmptqlayout;
+ tmptqlayout.col = col;
+ tmptqlayout.l = new ColumnFormat( sheet, col );
+ tmptqlayout.l->copy( *(sheet->columnFormat( col )) );
+ listCol.append(tmptqlayout);
c = sheet->getFirstCellColumn( col );
while ( c )
{
if ( !c->isPartOfMerged() )
{
- layoutTextCell tmplayout;
- tmplayout.col = col;
- tmplayout.row = c->row();
- tmplayout.l = new Format( sheet, 0 );
- tmplayout.l->copy( *(sheet->cellAt( tmplayout.col, tmplayout.row )->format()) );
- tmplayout.text = c->text();
- list.append(tmplayout);
+ tqlayoutTextCell tmptqlayout;
+ tmptqlayout.col = col;
+ tmptqlayout.row = c->row();
+ tmptqlayout.l = new Format( sheet, 0 );
+ tmptqlayout.l->copy( *(sheet->cellAt( tmptqlayout.col, tmptqlayout.row )->format()) );
+ tmptqlayout.text = c->text();
+ list.append(tmptqlayout);
}
c = sheet->getNextCellDown( col, c->row() );
@@ -1294,24 +1294,24 @@ void UndoSort::copyAll(QValueList<layoutTextCell> & list, QValueList<layoutColum
Cell * c;
for ( int row = m_rctRect.top(); row <= m_rctRect.bottom(); ++row)
{
- layoutRow tmplayout;
- tmplayout.row = row;
- tmplayout.l = new RowFormat( sheet, row );
- tmplayout.l->copy( *(sheet->rowFormat( row )) );
- listRow.append(tmplayout);
+ tqlayoutRow tmptqlayout;
+ tmptqlayout.row = row;
+ tmptqlayout.l = new RowFormat( sheet, row );
+ tmptqlayout.l->copy( *(sheet->rowFormat( row )) );
+ listRow.append(tmptqlayout);
c = sheet->getFirstCellRow( row );
while ( c )
{
if ( !c->isPartOfMerged() )
{
- layoutTextCell tmplayout;
- tmplayout.col = c->column();
- tmplayout.row = row;
- tmplayout.l = new Format( sheet, 0 );
- tmplayout.l->copy( *(sheet->cellAt( tmplayout.col, tmplayout.row )->format()) );
- tmplayout.text = c->text();
- list.append(tmplayout);
+ tqlayoutTextCell tmptqlayout;
+ tmptqlayout.col = c->column();
+ tmptqlayout.row = row;
+ tmptqlayout.l = new Format( sheet, 0 );
+ tmptqlayout.l->copy( *(sheet->cellAt( tmptqlayout.col, tmptqlayout.row )->format()) );
+ tmptqlayout.text = c->text();
+ list.append(tmptqlayout);
}
c = sheet->getNextCellRight( c->column(), row );
}
@@ -1328,13 +1328,13 @@ void UndoSort::copyAll(QValueList<layoutTextCell> & list, QValueList<layoutColum
cell = sheet->nonDefaultCell( x, y );
if (!cell->isPartOfMerged())
{
- layoutTextCell tmplayout;
- tmplayout.col = x;
- tmplayout.row = y;
- tmplayout.l = new Format( sheet, 0 );
- tmplayout.l->copy( *(sheet->cellAt( x, y )->format()) );
- tmplayout.text = cell->text();
- list.append(tmplayout);
+ tqlayoutTextCell tmptqlayout;
+ tmptqlayout.col = x;
+ tmptqlayout.row = y;
+ tmptqlayout.l = new Format( sheet, 0 );
+ tmptqlayout.l->copy( *(sheet->cellAt( x, y )->format()) );
+ tmptqlayout.text = cell->text();
+ list.append(tmptqlayout);
}
}
}
@@ -1342,7 +1342,7 @@ void UndoSort::copyAll(QValueList<layoutTextCell> & list, QValueList<layoutColum
UndoSort::~UndoSort()
{
- QValueList<layoutTextCell>::Iterator it2;
+ TQValueList<tqlayoutTextCell>::Iterator it2;
for ( it2 = m_lstFormats.begin(); it2 != m_lstFormats.end(); ++it2 )
{
delete (*it2).l;
@@ -1355,7 +1355,7 @@ UndoSort::~UndoSort()
}
m_lstRedoFormats.clear();
- QValueList<layoutColumn>::Iterator it3;
+ TQValueList<tqlayoutColumn>::Iterator it3;
for ( it3 = m_lstColFormats.begin(); it3 != m_lstColFormats.end(); ++it3 )
{
delete (*it3).l;
@@ -1368,7 +1368,7 @@ UndoSort::~UndoSort()
}
m_lstRedoColFormats.clear();
- QValueList<layoutRow>::Iterator it4;
+ TQValueList<tqlayoutRow>::Iterator it4;
for ( it4 = m_lstRowFormats.begin(); it4 != m_lstRowFormats.end(); ++it4 )
{
delete (*it4).l;
@@ -1397,7 +1397,7 @@ void UndoSort::undo()
if ( util_isColumnSelected( m_rctRect ) )
{
- QValueList<layoutColumn>::Iterator it2;
+ TQValueList<tqlayoutColumn>::Iterator it2;
for ( it2 = m_lstColFormats.begin(); it2 != m_lstColFormats.end(); ++it2 )
{
ColumnFormat * col = sheet->nonDefaultColumnFormat( (*it2).col );
@@ -1406,7 +1406,7 @@ void UndoSort::undo()
}
else if( util_isRowSelected( m_rctRect ) )
{
- QValueList<layoutRow>::Iterator it2;
+ TQValueList<tqlayoutRow>::Iterator it2;
for ( it2 = m_lstRowFormats.begin(); it2 != m_lstRowFormats.end(); ++it2 )
{
RowFormat *row= sheet->nonDefaultRowFormat( (*it2).row );
@@ -1414,7 +1414,7 @@ void UndoSort::undo()
}
}
- QValueList<layoutTextCell>::Iterator it2;
+ TQValueList<tqlayoutTextCell>::Iterator it2;
for ( it2 = m_lstFormats.begin(); it2 != m_lstFormats.end(); ++it2 )
{
Cell *cell = sheet->nonDefaultCell( (*it2).col,(*it2).row );
@@ -1449,7 +1449,7 @@ void UndoSort::redo()
if( util_isColumnSelected( m_rctRect ) )
{
- QValueList<layoutColumn>::Iterator it2;
+ TQValueList<tqlayoutColumn>::Iterator it2;
for ( it2 = m_lstRedoColFormats.begin(); it2 != m_lstRedoColFormats.end(); ++it2 )
{
ColumnFormat *col= sheet->nonDefaultColumnFormat( (*it2).col );
@@ -1458,7 +1458,7 @@ void UndoSort::redo()
}
else if( util_isRowSelected( m_rctRect ) )
{
- QValueList<layoutRow>::Iterator it2;
+ TQValueList<tqlayoutRow>::Iterator it2;
for ( it2 = m_lstRedoRowFormats.begin(); it2 != m_lstRedoRowFormats.end(); ++it2 )
{
RowFormat *row= sheet->nonDefaultRowFormat( (*it2).row );
@@ -1466,7 +1466,7 @@ void UndoSort::redo()
}
}
- QValueList<layoutTextCell>::Iterator it2;
+ TQValueList<tqlayoutTextCell>::Iterator it2;
for ( it2 = m_lstRedoFormats.begin(); it2 != m_lstRedoFormats.end(); ++it2 )
{
Cell *cell = sheet->nonDefaultCell( (*it2).col,(*it2).row );
@@ -1508,14 +1508,14 @@ UndoDelete::~UndoDelete()
{
}
-void UndoDelete::createListCell( QCString &listCell,QValueList<columnSize> &listCol,QValueList<rowSize> &listRow, Sheet* sheet )
+void UndoDelete::createListCell( TQCString &listCell,TQValueList<columnSize> &listCol,TQValueList<rowSize> &listRow, Sheet* sheet )
{
listRow.clear();
listCol.clear();
Region::ConstIterator endOfList = m_region.constEnd();
for (Region::ConstIterator it = m_region.constBegin(); it != endOfList; ++it)
{
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
// copy column(s)
if ((*it)->isColumn())
{
@@ -1551,16 +1551,16 @@ void UndoDelete::createListCell( QCString &listCell,QValueList<columnSize> &list
}
//save all cells in area
- QDomDocument doc = sheet->saveCellRegion( m_region );
+ TQDomDocument doc = sheet->saveCellRegion( m_region );
// Save to buffer
- QString buffer;
- QTextStream str( &buffer, IO_WriteOnly );
+ TQString buffer;
+ TQTextStream str( &buffer, IO_WriteOnly );
str << doc;
- // This is a terrible hack to store unicode
- // data in a QCString in a way that
- // QCString::length() == QCString().size().
- // This allows us to treat the QCString like a QByteArray later on.
+ // This is a terrible hack to store tqunicode
+ // data in a TQCString in a way that
+ // TQCString::length() == TQCString().size().
+ // This allows us to treat the TQCString like a TQByteArray later on.
listCell = buffer.utf8();
int len = listCell.length();
char tmp = listCell[ len - 1 ];
@@ -1580,7 +1580,7 @@ void UndoDelete::undo()
doc()->emitBeginOperation();
{
- QValueList<columnSize>::Iterator it2;
+ TQValueList<columnSize>::Iterator it2;
for ( it2 = m_lstColumn.begin(); it2 != m_lstColumn.end(); ++it2 )
{
ColumnFormat *cl=sheet->nonDefaultColumnFormat((*it2).columnNumber);
@@ -1589,7 +1589,7 @@ void UndoDelete::undo()
}
{
- QValueList<rowSize>::Iterator it2;
+ TQValueList<rowSize>::Iterator it2;
for ( it2 = m_lstRow.begin(); it2 != m_lstRow.end(); ++it2 )
{
RowFormat *rw=sheet->nonDefaultRowFormat((*it2).rowNumber);
@@ -1616,7 +1616,7 @@ void UndoDelete::redo()
doc()->emitBeginOperation();
{
- QValueList<columnSize>::Iterator it2;
+ TQValueList<columnSize>::Iterator it2;
for ( it2 = m_lstRedoColumn.begin(); it2 != m_lstRedoColumn.end(); ++it2 )
{
ColumnFormat *cl=sheet->nonDefaultColumnFormat((*it2).columnNumber);
@@ -1625,7 +1625,7 @@ void UndoDelete::redo()
}
{
- QValueList<rowSize>::Iterator it2;
+ TQValueList<rowSize>::Iterator it2;
for ( it2 = m_lstRedoRow.begin(); it2 != m_lstRedoRow.end(); ++it2 )
{
RowFormat *rw=sheet->nonDefaultRowFormat((*it2).rowNumber);
@@ -1669,13 +1669,13 @@ UndoDragDrop::~UndoDragDrop()
{
}
-void UndoDragDrop::saveCellRect( QCString & cells, Sheet * sheet,
+void UndoDragDrop::saveCellRect( TQCString & cells, Sheet * sheet,
const Region& region )
{
- QDomDocument doc = sheet->saveCellRegion(region);
+ TQDomDocument doc = sheet->saveCellRegion(region);
// Save to buffer
- QString buffer;
- QTextStream str( &buffer, IO_WriteOnly );
+ TQString buffer;
+ TQTextStream str( &buffer, IO_WriteOnly );
str << doc;
cells = buffer.utf8();
@@ -1754,14 +1754,14 @@ UndoResizeColRow::UndoResizeColRow( Doc *_doc, Sheet *_sheet, const Region &_sel
createList( m_lstColumn,m_lstRow, _sheet );
}
-void UndoResizeColRow::createList( QValueList<columnSize> &listCol,QValueList<rowSize> &listRow, Sheet* sheet )
+void UndoResizeColRow::createList( TQValueList<columnSize> &listCol,TQValueList<rowSize> &listRow, Sheet* sheet )
{
listCol.clear();
listRow.clear();
Region::ConstIterator endOfList(m_region.constEnd());
for (Region::ConstIterator it = m_region.constBegin(); it != endOfList; ++it)
{
- QRect m_rctRect = (*it)->rect().normalize();
+ TQRect m_rctRect = (*it)->rect().normalize();
if( util_isColumnSelected( m_rctRect ) ) // entire column(s)
{
@@ -1837,11 +1837,11 @@ void UndoResizeColRow::undo()
Region::ConstIterator endOfList(m_region.constEnd());
for (Region::ConstIterator it = m_region.constBegin(); it != endOfList; ++it)
{
- QRect m_rctRect = (*it)->rect().normalize();
+ TQRect m_rctRect = (*it)->rect().normalize();
if( util_isColumnSelected( m_rctRect ) ) // complete column(s)
{
- QValueList<columnSize>::Iterator it2;
+ TQValueList<columnSize>::Iterator it2;
for ( it2 = m_lstColumn.begin(); it2 != m_lstColumn.end(); ++it2 )
{
ColumnFormat *cl=sheet->columnFormat((*it2).columnNumber);
@@ -1850,7 +1850,7 @@ void UndoResizeColRow::undo()
}
else if( util_isRowSelected( m_rctRect ) ) // complete row(s)
{
- QValueList<rowSize>::Iterator it2;
+ TQValueList<rowSize>::Iterator it2;
for ( it2 = m_lstRow.begin(); it2 != m_lstRow.end(); ++it2 )
{
RowFormat *rw=sheet->rowFormat((*it2).rowNumber);
@@ -1859,13 +1859,13 @@ void UndoResizeColRow::undo()
}
else // row and column
{
- QValueList<columnSize>::Iterator it2;
+ TQValueList<columnSize>::Iterator it2;
for ( it2 = m_lstColumn.begin(); it2 != m_lstColumn.end(); ++it2 )
{
ColumnFormat *cl=sheet->columnFormat((*it2).columnNumber);
cl->setDblWidth((*it2).columnWidth);
}
- QValueList<rowSize>::Iterator it1;
+ TQValueList<rowSize>::Iterator it1;
for ( it1 = m_lstRow.begin(); it1 != m_lstRow.end(); ++it1 )
{
RowFormat *rw=sheet->rowFormat((*it1).rowNumber);
@@ -1888,11 +1888,11 @@ void UndoResizeColRow::redo()
Region::ConstIterator endOfList(m_region.constEnd());
for (Region::ConstIterator it = m_region.constBegin(); it != endOfList; ++it)
{
- QRect m_rctRect = (*it)->rect().normalize();
+ TQRect m_rctRect = (*it)->rect().normalize();
if( util_isColumnSelected( m_rctRect ) ) // complete column(s)
{
- QValueList<columnSize>::Iterator it2;
+ TQValueList<columnSize>::Iterator it2;
for ( it2 = m_lstRedoColumn.begin(); it2 != m_lstRedoColumn.end(); ++it2 )
{
ColumnFormat *cl=sheet->columnFormat((*it2).columnNumber);
@@ -1901,7 +1901,7 @@ void UndoResizeColRow::redo()
}
else if( util_isRowSelected( m_rctRect ) ) // complete row(s)
{
- QValueList<rowSize>::Iterator it2;
+ TQValueList<rowSize>::Iterator it2;
for ( it2 = m_lstRedoRow.begin(); it2 != m_lstRedoRow.end(); ++it2 )
{
RowFormat *rw=sheet->rowFormat((*it2).rowNumber);
@@ -1910,13 +1910,13 @@ void UndoResizeColRow::redo()
}
else // row and column
{
- QValueList<columnSize>::Iterator it2;
+ TQValueList<columnSize>::Iterator it2;
for ( it2 = m_lstRedoColumn.begin(); it2 != m_lstRedoColumn.end(); ++it2 )
{
ColumnFormat *cl=sheet->columnFormat((*it2).columnNumber);
cl->setDblWidth((*it2).columnWidth);
}
- QValueList<rowSize>::Iterator it1;
+ TQValueList<rowSize>::Iterator it1;
for ( it1 = m_lstRedoRow.begin(); it1 != m_lstRedoRow.end(); ++it1 )
{
RowFormat *rw=sheet->rowFormat((*it1).rowNumber);
@@ -1946,14 +1946,14 @@ UndoChangeAreaTextCell::UndoChangeAreaTextCell( Doc *_doc, Sheet *_sheet, const
createList( m_lstTextCell, _sheet );
}
-void UndoChangeAreaTextCell::createList( QMap<QPoint,QString> &map, Sheet* sheet )
+void UndoChangeAreaTextCell::createList( TQMap<TQPoint,TQString> &map, Sheet* sheet )
{
map.clear();
Region::ConstIterator endOfList(m_region.constEnd());
for (Region::ConstIterator it = m_region.constBegin(); it != endOfList; ++it)
{
- QRect m_rctRect = (*it)->rect().normalize();
+ TQRect m_rctRect = (*it)->rect().normalize();
int bottom = m_rctRect.bottom();
int right = m_rctRect.right();
@@ -1971,7 +1971,7 @@ void UndoChangeAreaTextCell::createList( QMap<QPoint,QString> &map, Sheet* sheet
//tmpText.col = col;
//tmpText.row = c->row();
//tmpText.text = c->text();
- map.insert( QPoint(col,c->row()) , c->text() );
+ map.insert( TQPoint(col,c->row()) , c->text() );
}
c = sheet->getNextCellDown( col, c->row() );
}
@@ -1991,7 +1991,7 @@ void UndoChangeAreaTextCell::createList( QMap<QPoint,QString> &map, Sheet* sheet
//tmpText.col = c->column();
//tmpText.row = row;
//tmpText.text = c->text();
- map.insert( QPoint(c->column(),row) , c->text() );
+ map.insert( TQPoint(c->column(),row) , c->text() );
}
c = sheet->getNextCellRight( c->column(), row );
}
@@ -2013,7 +2013,7 @@ void UndoChangeAreaTextCell::createList( QMap<QPoint,QString> &map, Sheet* sheet
//tmpText.col = x;
//tmpText.row = cell->row();
//tmpText.text = cell->text();
- map.insert( QPoint(x,cell->row()) , cell->text());
+ map.insert( TQPoint(x,cell->row()) , cell->text());
}
cell = sheet->getNextCellDown( x, cell->row() );
}
@@ -2043,7 +2043,7 @@ void UndoChangeAreaTextCell::undo()
Region::ConstIterator endOfList(m_region.constEnd());
for (Region::ConstIterator it = m_region.constBegin(); it != endOfList; ++it)
{
- QRect m_rctRect = (*it)->rect().normalize();
+ TQRect m_rctRect = (*it)->rect().normalize();
if ( !util_isRowSelected( m_rctRect )
&& !util_isColumnSelected( m_rctRect ) )
@@ -2053,15 +2053,15 @@ void UndoChangeAreaTextCell::undo()
{
Cell* cell = sheet->nonDefaultCell( x, y );
- const QPoint location(x,y);
+ const TQPoint location(x,y);
- if ( m_lstTextCell.contains(location) )
+ if ( m_lstTextCell.tqcontains(location) )
cell->setCellText( m_lstTextCell[location] );
else
cell->setCellText( "",true );
/*bool found = false;
- QValueList<textOfCell>::Iterator it;
+ TQValueList<textOfCell>::Iterator it;
for( it = m_lstTextCell.begin(); it != m_lstTextCell.end(); ++it )
if ( (*it).col == x && (*it).row == y && !found )
{
@@ -2075,7 +2075,7 @@ void UndoChangeAreaTextCell::undo()
}
else
{
- QMap<QPoint,QString>::Iterator it2;
+ TQMap<TQPoint,TQString>::Iterator it2;
for ( it2 = m_lstTextCell.begin(); it2 != m_lstTextCell.end(); ++it2 )
{
Cell *cell = sheet->nonDefaultCell( it2.key().x(), it2.key().y() );
@@ -2109,7 +2109,7 @@ void UndoChangeAreaTextCell::redo()
Region::ConstIterator endOfList(m_region.constEnd());
for (Region::ConstIterator it = m_region.constBegin(); it != endOfList; ++it)
{
- QRect m_rctRect = (*it)->rect().normalize();
+ TQRect m_rctRect = (*it)->rect().normalize();
if ( !util_isRowSelected( m_rctRect )
&& !util_isColumnSelected( m_rctRect ) )
@@ -2119,14 +2119,14 @@ void UndoChangeAreaTextCell::redo()
{
Cell* cell = sheet->nonDefaultCell( x, y );
- const QPoint location(x,y);
+ const TQPoint location(x,y);
- if (m_lstRedoTextCell.contains(location))
+ if (m_lstRedoTextCell.tqcontains(location))
cell->setCellText( m_lstRedoTextCell[location] );
else
cell->setCellText( "" , true );
/*bool found = false;
- QValueList<textOfCell>::Iterator it;
+ TQValueList<textOfCell>::Iterator it;
for( it = m_lstRedoTextCell.begin(); it != m_lstRedoTextCell.end(); ++it )
if ( (*it).col == x && (*it).row == y && !found )
{
@@ -2140,7 +2140,7 @@ void UndoChangeAreaTextCell::redo()
}
else
{
- QMap<QPoint,QString>::Iterator it2;
+ TQMap<TQPoint,TQString>::Iterator it2;
for ( it2 = m_lstRedoTextCell.begin(); it2 != m_lstRedoTextCell.end(); ++it2 )
{
Cell *cell = sheet->nonDefaultCell( it2.key().x(), it2.key().y() );
@@ -2220,7 +2220,7 @@ void UndoMergedCell::redo()
*
***************************************************************************/
-UndoAutofill::UndoAutofill( Doc *_doc, Sheet* sheet, const QRect & _selection)
+UndoAutofill::UndoAutofill( Doc *_doc, Sheet* sheet, const TQRect & _selection)
: UndoAction( _doc )
{
name=i18n("Autofill");
@@ -2235,18 +2235,18 @@ UndoAutofill::~UndoAutofill()
{
}
-void UndoAutofill::createListCell( QCString &list, Sheet* sheet )
+void UndoAutofill::createListCell( TQCString &list, Sheet* sheet )
{
- QDomDocument doc = sheet->saveCellRegion( m_selection );
+ TQDomDocument doc = sheet->saveCellRegion( m_selection );
// Save to buffer
- QString buffer;
- QTextStream str( &buffer, IO_WriteOnly );
+ TQString buffer;
+ TQTextStream str( &buffer, IO_WriteOnly );
str << doc;
- // This is a terrible hack to store unicode
- // data in a QCString in a way that
- // QCString::length() == QCString().size().
- // This allows us to treat the QCString like a QByteArray later on.
+ // This is a terrible hack to store tqunicode
+ // data in a TQCString in a way that
+ // TQCString::length() == TQCString().size().
+ // This allows us to treat the TQCString like a TQByteArray later on.
list = buffer.utf8();
int len = list.length();
char tmp = list[ len - 1 ];
@@ -2300,7 +2300,7 @@ void UndoAutofill::redo()
*
***************************************************************************/
-UndoInsertCellRow::UndoInsertCellRow( Doc *_doc, Sheet *_sheet, const QRect &_rect ) :
+UndoInsertCellRow::UndoInsertCellRow( Doc *_doc, Sheet *_sheet, const TQRect &_rect ) :
UndoInsertRemoveAction( _doc )
{
name=i18n("Insert Cell");
@@ -2344,7 +2344,7 @@ void UndoInsertCellRow::redo()
***************************************************************************/
-UndoInsertCellCol::UndoInsertCellCol( Doc *_doc, Sheet *_sheet, const QRect &_rect ) :
+UndoInsertCellCol::UndoInsertCellCol( Doc *_doc, Sheet *_sheet, const TQRect &_rect ) :
UndoInsertRemoveAction( _doc )
{
name=i18n("Insert Cell");
@@ -2387,23 +2387,23 @@ void UndoInsertCellCol::redo()
*
***************************************************************************/
-UndoRemoveCellRow::UndoRemoveCellRow( Doc *_doc, Sheet *_sheet, const QRect &rect ) :
+UndoRemoveCellRow::UndoRemoveCellRow( Doc *_doc, Sheet *_sheet, const TQRect &rect ) :
UndoInsertRemoveAction( _doc )
{
name=i18n("Remove Cell");
m_sheetName = _sheet->sheetName();
m_rect=rect;
- QDomDocument doc = _sheet->saveCellRegion( m_rect );
+ TQDomDocument doc = _sheet->saveCellRegion( m_rect );
// Save to buffer
- QString buffer;
- QTextStream str( &buffer, IO_WriteOnly );
+ TQString buffer;
+ TQTextStream str( &buffer, IO_WriteOnly );
str << doc;
- // This is a terrible hack to store unicode
- // data in a QCString in a way that
- // QCString::length() == QCString().size().
- // This allows us to treat the QCString like a QByteArray later on.
+ // This is a terrible hack to store tqunicode
+ // data in a TQCString in a way that
+ // TQCString::length() == TQCString().size().
+ // This allows us to treat the TQCString like a TQByteArray later on.
m_data = buffer.utf8();
int len = m_data.length();
char tmp = m_data[ len - 1 ];
@@ -2446,23 +2446,23 @@ void UndoRemoveCellRow::redo()
*
***************************************************************************/
-UndoRemoveCellCol::UndoRemoveCellCol( Doc *_doc, Sheet *_sheet, const QRect &_rect ) :
+UndoRemoveCellCol::UndoRemoveCellCol( Doc *_doc, Sheet *_sheet, const TQRect &_rect ) :
UndoInsertRemoveAction( _doc )
{
name=i18n("Remove Cell");
m_sheetName = _sheet->sheetName();
m_rect=_rect;
- QDomDocument doc = _sheet->saveCellRegion( m_rect );
+ TQDomDocument doc = _sheet->saveCellRegion( m_rect );
// Save to buffer
- QString buffer;
- QTextStream str( &buffer, IO_WriteOnly );
+ TQString buffer;
+ TQTextStream str( &buffer, IO_WriteOnly );
str << doc;
- // This is a terrible hack to store unicode
- // data in a QCString in a way that
- // QCString::length() == QCString().size().
- // This allows us to treat the QCString like a QByteArray later on.
+ // This is a terrible hack to store tqunicode
+ // data in a TQCString in a way that
+ // TQCString::length() == TQCString().size().
+ // This allows us to treat the TQCString like a TQByteArray later on.
m_data = buffer.utf8();
int len = m_data.length();
char tmp = m_data[ len - 1 ];
@@ -2520,19 +2520,19 @@ UndoConditional::~UndoConditional()
{
}
-void UndoConditional::createListCell( QCString &list, Sheet* sheet )
+void UndoConditional::createListCell( TQCString &list, Sheet* sheet )
{
// Save to buffer
- QString buffer;
- QTextStream str( &buffer, IO_WriteOnly );
+ TQString buffer;
+ TQTextStream str( &buffer, IO_WriteOnly );
- QDomDocument doc = sheet->saveCellRegion( m_region );
+ TQDomDocument doc = sheet->saveCellRegion( m_region );
str << doc;
- // This is a terrible hack to store unicode
- // data in a QCString in a way that
- // QCString::length() == QCString().size().
- // This allows us to treat the QCString like a QByteArray later on.
+ // This is a terrible hack to store tqunicode
+ // data in a TQCString in a way that
+ // TQCString::length() == TQCString().size().
+ // This allows us to treat the TQCString like a TQByteArray later on.
list = buffer.utf8();
int len = list.length();
char tmp = list[ len - 1 ];
@@ -2608,9 +2608,9 @@ UndoCellPaste::~UndoCellPaste()
{
}
-void UndoCellPaste::createListCell(QCString& listCell,
- QValueList<columnSize>& listCol,
- QValueList<rowSize>& listRow,
+void UndoCellPaste::createListCell(TQCString& listCell,
+ TQValueList<columnSize>& listCol,
+ TQValueList<rowSize>& listRow,
Sheet* sheet)
{
listCol.clear();
@@ -2621,7 +2621,7 @@ void UndoCellPaste::createListCell(QCString& listCell,
{
int nbCol = 0;
int nbRow = 0;
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
if ((*it)->isColumn())
{
nbCol = range.width();
@@ -2665,16 +2665,16 @@ void UndoCellPaste::createListCell(QCString& listCell,
}
}
//save all cells in area
- QDomDocument doc = sheet->saveCellRegion(m_region);
+ TQDomDocument doc = sheet->saveCellRegion(m_region);
// Save to buffer
- QString buffer;
- QTextStream str( &buffer, IO_WriteOnly );
+ TQString buffer;
+ TQTextStream str( &buffer, IO_WriteOnly );
str << doc;
- // This is a terrible hack to store unicode
- // data in a QCString in a way that
- // QCString::length() == QCString().size().
- // This allows us to treat the QCString like a QByteArray later on.
+ // This is a terrible hack to store tqunicode
+ // data in a TQCString in a way that
+ // TQCString::length() == TQCString().size().
+ // This allows us to treat the TQCString like a TQByteArray later on.
listCell = buffer.utf8();
int len = listCell.length();
char tmp = listCell[ len - 1 ];
@@ -2699,13 +2699,13 @@ void UndoCellPaste::undo()
Region::ConstIterator endOfList = m_region.constEnd();
for (Region::ConstIterator it = --m_region.constEnd(); it != endOfList; --it)
{
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
if ((*it)->isColumn())
{
if (!b_insert)
{
- QValueList<columnSize>::Iterator it2;
+ TQValueList<columnSize>::Iterator it2;
for ( it2 = m_lstColumn.begin(); it2 != m_lstColumn.end(); ++it2 )
{
ColumnFormat *cl=sheet->nonDefaultColumnFormat((*it2).columnNumber);
@@ -2721,7 +2721,7 @@ void UndoCellPaste::undo()
{
if (!b_insert)
{
- QValueList<rowSize>::Iterator it2;
+ TQValueList<rowSize>::Iterator it2;
for ( it2 = m_lstRow.begin(); it2 != m_lstRow.end(); ++it2 )
{
RowFormat *rw=sheet->nonDefaultRowFormat((*it2).rowNumber);
@@ -2742,7 +2742,7 @@ void UndoCellPaste::undo()
if (b_insert) // with insertion
{
- QRect rect = m_region.boundingRect();
+ TQRect rect = m_region.boundingRect();
if (m_iInsertTo == -1 && numCols == 0 && numRows == 0)
{
// substract already removed columns
@@ -2794,7 +2794,7 @@ void UndoCellPaste::redo()
Region::ConstIterator endOfList(m_region.constEnd());
for (Region::ConstIterator it = m_region.constBegin(); it != endOfList; ++it)
{
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
if ((*it)->isColumn())
{
@@ -2815,7 +2815,7 @@ void UndoCellPaste::redo()
if (b_insert)
{
- QRect rect = m_region.boundingRect();
+ TQRect rect = m_region.boundingRect();
if (m_iInsertTo == -1 && numCols == 0 && numRows == 0)
{
rect.setWidth(rect.width());
@@ -2842,7 +2842,7 @@ void UndoCellPaste::redo()
{
if ((*it)->isColumn())
{
- QValueList<columnSize>::Iterator it2;
+ TQValueList<columnSize>::Iterator it2;
for ( it2 = m_lstRedoColumn.begin(); it2 != m_lstRedoColumn.end(); ++it2 )
{
ColumnFormat *cl=sheet->nonDefaultColumnFormat((*it2).columnNumber);
@@ -2851,7 +2851,7 @@ void UndoCellPaste::redo()
}
else if ((*it)->isRow())
{
- QValueList<rowSize>::Iterator it2;
+ TQValueList<rowSize>::Iterator it2;
for ( it2 = m_lstRedoRow.begin(); it2 != m_lstRedoRow.end(); ++it2 )
{
RowFormat *rw=sheet->nonDefaultRowFormat((*it2).rowNumber);
@@ -2878,7 +2878,7 @@ void UndoCellPaste::redo()
*
***************************************************************************/
-UndoStyleCell::UndoStyleCell( Doc *_doc, Sheet* sheet, const QRect & _selection)
+UndoStyleCell::UndoStyleCell( Doc *_doc, Sheet* sheet, const TQRect & _selection)
: UndoAction( _doc )
{
name=i18n("Style of Cell");
@@ -2893,7 +2893,7 @@ UndoStyleCell::~UndoStyleCell()
{
}
-void UndoStyleCell::createListCell( QValueList<styleCell> &listCell, Sheet* sheet )
+void UndoStyleCell::createListCell( TQValueList<styleCell> &listCell, Sheet* sheet )
{
int bottom = m_selection.bottom();
int right = m_selection.right();
@@ -2962,7 +2962,7 @@ void UndoStyleCell::undo()
doc()->emitBeginOperation();
- QValueList<styleCell>::Iterator it2;
+ TQValueList<styleCell>::Iterator it2;
for ( it2 = m_lstStyleCell.begin(); it2 != m_lstStyleCell.end(); ++it2 )
{
sheet->nonDefaultCell( (*it2).col, (*it2).row);
@@ -2983,7 +2983,7 @@ void UndoStyleCell::redo()
doc()->undoLock();
doc()->emitBeginOperation();
- QValueList<styleCell>::Iterator it2;
+ TQValueList<styleCell>::Iterator it2;
for ( it2 = m_lstRedoStyleCell.begin(); it2 != m_lstRedoStyleCell.end(); ++it2 )
{
sheet->nonDefaultCell( (*it2).col, (*it2).row);
@@ -2994,7 +2994,7 @@ void UndoStyleCell::redo()
doc()->undoUnlock();
}
-UndoInsertData::UndoInsertData( Doc * _doc, Sheet * _sheet, QRect & _selection )
+UndoInsertData::UndoInsertData( Doc * _doc, Sheet * _sheet, TQRect & _selection )
: UndoChangeAreaTextCell( _doc, _sheet, _selection )
{
name = i18n("Insert Data From Database");