summaryrefslogtreecommitdiffstats
path: root/kspread/kspread_sheetprint.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kspread/kspread_sheetprint.cc')
-rw-r--r--kspread/kspread_sheetprint.cc344
1 files changed, 172 insertions, 172 deletions
diff --git a/kspread/kspread_sheetprint.cc b/kspread/kspread_sheetprint.cc
index 8b4ce0cc..e66e7b2f 100644
--- a/kspread/kspread_sheetprint.cc
+++ b/kspread/kspread_sheetprint.cc
@@ -34,7 +34,7 @@
#include <kprinter.h>
#include <kdebug.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <pwd.h>
#include <unistd.h>
@@ -69,15 +69,15 @@ SheetPrint::SheetPrint( Sheet* sheet )
m_orientation = PG_PORTRAIT;
m_paperWidth = MM_TO_POINT( KoPageFormat::width( m_paperFormat, m_orientation ) );
m_paperHeight = MM_TO_POINT( KoPageFormat::height( m_paperFormat, m_orientation ) );
- m_printRange = QRect( QPoint( 1, 1 ), QPoint( KS_colMax, KS_rowMax ) );
+ m_printRange = TQRect( TQPoint( 1, 1 ), TQPoint( KS_colMax, KS_rowMax ) );
m_lnewPageListX.append( 1 );
m_lnewPageListY.append( 1 );
m_maxCheckedNewPageX = 1;
m_maxCheckedNewPageY = 1;
m_dPrintRepeatColumnsWidth = 0.0;
m_dPrintRepeatRowsHeight = 0.0;
- m_printRepeatColumns = qMakePair( 0, 0 );
- m_printRepeatRows = qMakePair( 0, 0 );
+ m_printRepeatColumns = tqMakePair( 0, 0 );
+ m_printRepeatRows = tqMakePair( 0, 0 );
m_dZoom = 1.0;
m_iPageLimitX = 0;
m_iPageLimitY = 0;
@@ -90,7 +90,7 @@ SheetPrint::~SheetPrint()
// nothing todo yet
}
-QString SheetPrint::saveOasisSheetStyleLayout( KoGenStyles &mainStyles )
+TQString SheetPrint::saveOasisSheetStyleLayout( KoGenStyles &mainStyles )
{
KoGenStyle pageLayout( KoGenStyle::STYLE_PAGELAYOUT );
//pageLayout.addAttribute( "style:page-usage", "all" ); FIXME
@@ -108,10 +108,10 @@ QString SheetPrint::saveOasisSheetStyleLayout( KoGenStyles &mainStyles )
}
-QRect SheetPrint::cellsPrintRange()
+TQRect SheetPrint::cellsPrintRange()
{
// Find maximum right/bottom cell with content
- QRect cell_range;
+ TQRect cell_range;
cell_range.setCoords( 1, 1, 1, 1 );
Cell* c = m_pSheet->firstCell();
@@ -126,14 +126,14 @@ QRect SheetPrint::cellsPrintRange()
}
}
- // Now look at the children
- QPtrListIterator<KoDocumentChild> cit( m_pDoc->children() );
+ // Now look at the tqchildren
+ TQPtrListIterator<KoDocumentChild> cit( m_pDoc->tqchildren() );
double dummy;
int i;
for( ; cit.current(); ++cit )
{
- //QRect, because KoChild doesn't use KoRect yet
- QRect bound = cit.current()->boundingRect();
+ //TQRect, because KoChild doesn't use KoRect yet
+ TQRect bound = cit.current()->boundingRect();
i = m_pSheet->leftColumn( bound.right(), dummy );
if ( i > cell_range.right() )
@@ -148,7 +148,7 @@ QRect SheetPrint::cellsPrintRange()
return cell_range;
}
-int SheetPrint::pagesX( const QRect& cellsPrintRange )
+int SheetPrint::pagesX( const TQRect& cellsPrintRange )
{
int pages = 0;
@@ -162,7 +162,7 @@ int SheetPrint::pagesX( const QRect& cellsPrintRange )
return pages;
}
-int SheetPrint::pagesY( const QRect& cellsPrintRange )
+int SheetPrint::pagesY( const TQRect& cellsPrintRange )
{
int pages = 0;
@@ -177,7 +177,7 @@ int SheetPrint::pagesY( const QRect& cellsPrintRange )
}
-bool SheetPrint::pageNeedsPrinting( QRect& page_range )
+bool SheetPrint::pageNeedsPrinting( TQRect& page_range )
{
// bool filled = false;
@@ -190,19 +190,19 @@ bool SheetPrint::pageNeedsPrinting( QRect& page_range )
}
// filled = true;
- //Page empty, but maybe children on it?
+ //Page empty, but maybe tqchildren on it?
- QRect intView = QRect( QPoint( m_pDoc->zoomItX( m_pSheet->dblColumnPos( page_range.left() ) ),
+ TQRect intView = TQRect( TQPoint( m_pDoc->zoomItX( m_pSheet->dblColumnPos( page_range.left() ) ),
m_pDoc->zoomItY( m_pSheet->dblRowPos( page_range.top() ) ) ),
- QPoint( m_pDoc->zoomItX( m_pSheet->dblColumnPos( page_range.right() ) +
+ TQPoint( m_pDoc->zoomItX( m_pSheet->dblColumnPos( page_range.right() ) +
m_pSheet->columnFormat( page_range.right() )->dblWidth() ),
m_pDoc->zoomItY( m_pSheet->dblRowPos( page_range.bottom() ) +
m_pSheet->rowFormat( page_range.bottom() )->dblHeight() ) ) );
- QPtrListIterator<KoDocumentChild> it( m_pDoc->children() );
+ TQPtrListIterator<KoDocumentChild> it( m_pDoc->tqchildren() );
for( ;it.current(); ++it )
{
- QRect bound = it.current()->boundingRect();
+ TQRect bound = it.current()->boundingRect();
if ( bound.intersects( intView ) )
{
return true;
@@ -215,20 +215,20 @@ bool SheetPrint::pageNeedsPrinting( QRect& page_range )
return false;
}
-bool SheetPrint::print( QPainter &painter, KPrinter *_printer )
+bool SheetPrint::print( TQPainter &painter, KPrinter *_printer )
{
kdDebug(36001)<<"PRINTING ...."<<endl;
// Override the current grid pen setting, when set to disable
- QPen gridPen;
+ TQPen gridPen;
bool oldShowGrid = m_pSheet->getShowGrid();
m_pSheet->setShowGrid( m_bPrintGrid );
if ( !m_bPrintGrid )
{
- gridPen = QPen( m_pDoc->gridColor(), 1, Qt::SolidLine );
- QPen nopen;
- nopen.setStyle( NoPen );
- m_pDoc->setGridColor( Qt::white );
+ gridPen = TQPen( m_pDoc->gridColor(), 1, TQt::SolidLine );
+ TQPen nopen;
+ nopen.setStyle( Qt::NoPen );
+ m_pDoc->setGridColor( TQt::white );
}
//Update m_dPrintRepeatColumnsWidth for repeated columns
@@ -242,7 +242,7 @@ bool SheetPrint::print( QPainter &painter, KPrinter *_printer )
updatePrintRepeatRowsHeight();
//Calculate the range to be printed
- QRect cell_range = cellsPrintRange();
+ TQRect cell_range = cellsPrintRange();
kdDebug()<<"cellsPrintRange() :"<<cellsPrintRange()<<endl;
//Ensure, that our newPage lists are generated for the whole sheet to print
//For this we add to the lists the width/height of 1 page
@@ -251,18 +251,18 @@ bool SheetPrint::print( QPainter &painter, KPrinter *_printer )
// Find out how many pages need printing
// and which cells to print on which page.
- QValueList<QRect> page_list; //contains the cols and rows of a page
- QValueList<KoRect> page_frame_list; //contains the coordinate range of a page
- QValueList<KoPoint> page_frame_list_offset; //contains the offset of the not repeated area
+ TQValueList<TQRect> page_list; //contains the cols and rows of a page
+ TQValueList<KoRect> page_frame_list; //contains the coordinate range of a page
+ TQValueList<KoPoint> page_frame_list_offset; //contains the offset of the not repeated area
- QValueList<PrintNewPageEntry>::iterator itX;
- QValueList<PrintNewPageEntry>::iterator itY;
+ TQValueList<PrintNewPageEntry>::iterator itX;
+ TQValueList<PrintNewPageEntry>::iterator itY;
for( itX = m_lnewPageListX.begin(); itX != m_lnewPageListX.end(); ++itX )
{
for( itY = m_lnewPageListY.begin(); itY != m_lnewPageListY.end(); ++itY )
{
- QRect page_range( QPoint( (*itX).startItem(), (*itY).startItem() ),
- QPoint( (*itX).endItem(), (*itY).endItem() ) );
+ TQRect page_range( TQPoint( (*itX).startItem(), (*itY).startItem() ),
+ TQPoint( (*itX).endItem(), (*itY).endItem() ) );
kdDebug()<<" page_range :"<<page_range<<endl;
//Append page when there is something to print
if ( pageNeedsPrinting( page_range ) )
@@ -285,8 +285,8 @@ bool SheetPrint::print( QPainter &painter, KPrinter *_printer )
m_uprintPages = page_list.count();
- //Cache all object so they only need to be repainted once.
- QPtrListIterator<EmbeddedObject> itObject( m_pDoc->embeddedObjects() );
+ //Cache all object so they only need to be tqrepainted once.
+ TQPtrListIterator<EmbeddedObject> itObject( m_pDoc->embeddedObjects() );
for ( ; itObject.current(); ++itObject )
{
EmbeddedObject *obj = itObject.current();
@@ -295,10 +295,10 @@ bool SheetPrint::print( QPainter &painter, KPrinter *_printer )
( obj->getType() == OBJECT_CHART && m_bPrintCharts ) ) )
continue;
- QRect zoomRect = m_pDoc->zoomRect( itObject.current()->geometry() );
- QPixmap *p = new QPixmap( zoomRect.size() );
- QPainter painter(p);
- painter.fillRect( p->rect(), QColor("white") );
+ TQRect zoomRect = m_pDoc->zoomRect( itObject.current()->tqgeometry() );
+ TQPixmap *p = new TQPixmap( zoomRect.size() );
+ TQPainter painter(p);
+ painter.fillRect( p->rect(), TQColor("white") );
painter.translate( -zoomRect.x(), -zoomRect.y() ); //we cant to paint at (0,0)
bool const isSelected = itObject.current()->isSelected();
itObject.current()->setSelected( false );
@@ -315,7 +315,7 @@ bool SheetPrint::print( QPainter &painter, KPrinter *_printer )
if ( page_list.count() == 0 )
{
// nothing to print
- painter.setPen( QPen( Qt::black, 1 ) );
+ painter.setPen( TQPen( TQt::black, 1 ) );
painter.drawPoint( 1, 1 );
}
else
@@ -326,9 +326,9 @@ bool SheetPrint::print( QPainter &painter, KPrinter *_printer )
//
// Print all pages in the list
//
- QValueList<QRect>::Iterator it = page_list.begin();
- QValueList<KoRect>::Iterator fit = page_frame_list.begin();
- QValueList<KoPoint>::Iterator fito = page_frame_list_offset.begin();
+ TQValueList<TQRect>::Iterator it = page_list.begin();
+ TQValueList<KoRect>::Iterator fit = page_frame_list.begin();
+ TQValueList<KoPoint>::Iterator fito = page_frame_list_offset.begin();
for( ; it != page_list.end(); ++it, ++fit, ++fito, ++pageNo )
{
@@ -357,7 +357,7 @@ bool SheetPrint::print( QPainter &painter, KPrinter *_printer )
}
m_pSheet->setShowGrid( oldShowGrid );
- QValueList<PrintObject *>::iterator it;
+ TQValueList<PrintObject *>::iterator it;
for ( it = m_printObjects.begin(); it != m_printObjects.end(); ++it )
delete (*it)->p;
m_printObjects.clear();
@@ -365,7 +365,7 @@ bool SheetPrint::print( QPainter &painter, KPrinter *_printer )
return ( page_list.count() > 0 );
}
-void SheetPrint::printPage( QPainter &_painter, const QRect& page_range,
+void SheetPrint::printPage( TQPainter &_painter, const TQRect& page_range,
const KoRect& view, const KoPoint _childOffset )
{
kdDebug(36001) << "Rect x=" << page_range.left() << " y=" << page_range.top() << ", r="
@@ -373,7 +373,7 @@ void SheetPrint::printPage( QPainter &_painter, const QRect& page_range,
<< " offsety: " << _childOffset.y() <<" view-x: "<<view.x()<< endl;
//Don't paint on the page borders
- QRegion clipRegion( m_pDoc->zoomItX( leftBorderPts() ),
+ TQRegion clipRegion( m_pDoc->zoomItX( leftBorderPts() ),
m_pDoc->zoomItY( topBorderPts() ),
m_pDoc->zoomItX( view.width() + _childOffset.x() ),
m_pDoc->zoomItY( view.height() + _childOffset.y() ) );
@@ -385,8 +385,8 @@ void SheetPrint::printPage( QPainter &_painter, const QRect& page_range,
//Check if we have to repeat some rows and columns (top left rect)
if ( ( _childOffset.x() != 0.0 ) && ( _childOffset.y() != 0.0 ) )
{
- //QRect(left,top,width,height) <<<< WIDTH AND HEIGHT!!!
- QRect _printRect( m_printRepeatColumns.first, m_printRepeatRows.first,
+ //TQRect(left,top,width,height) <<<< WIDTH AND HEIGHT!!!
+ TQRect _printRect( m_printRepeatColumns.first, m_printRepeatRows.first,
m_printRepeatColumns.second - m_printRepeatColumns.first + 1,
m_printRepeatRows.second - m_printRepeatRows.first + 1);
KoPoint _topLeft( 0.0, 0.0 );
@@ -397,7 +397,7 @@ void SheetPrint::printPage( QPainter &_painter, const QRect& page_range,
//Check if we have to repeat some rows (left rect)
if ( _childOffset.y() != 0 )
{
- QRect _printRect( page_range.left(), m_printRepeatRows.first,
+ TQRect _printRect( page_range.left(), m_printRepeatRows.first,
page_range.right() - page_range.left() + 1,
m_printRepeatRows.second - m_printRepeatRows.first + 1);
KoPoint _topLeft( _childOffset.x(), 0.0 );
@@ -408,7 +408,7 @@ void SheetPrint::printPage( QPainter &_painter, const QRect& page_range,
//Check if we have to repeat some columns (top right rect)
if ( _childOffset.x() != 0 )
{
- QRect _printRect( m_printRepeatColumns.first, page_range.top(),
+ TQRect _printRect( m_printRepeatColumns.first, page_range.top(),
m_printRepeatColumns.second - m_printRepeatColumns.first + 1,
page_range.bottom() - page_range.top() + 1);
KoPoint _topLeft( 0.0, _childOffset.y() );
@@ -424,9 +424,9 @@ void SheetPrint::printPage( QPainter &_painter, const QRect& page_range,
}
-void SheetPrint::printRect( QPainter& painter, const KoPoint& topLeft,
- const QRect& printRect, const KoRect& view,
- QRegion &clipRegion )
+void SheetPrint::printRect( TQPainter& painter, const KoPoint& topLeft,
+ const TQRect& printRect, const KoRect& view,
+ TQRegion &clipRegion )
{
//
// Draw the cells.
@@ -453,7 +453,7 @@ void SheetPrint::printRect( QPainter& painter, const KoPoint& topLeft,
+ m_pSheet->rowFormat( y )->dblHeight() );
KoRect rect( topLeft, bottomRight );
- QValueList<QPoint> mergedCellsPainted;
+ TQValueList<TQPoint> mergedCellsPainted;
for ( int y = regionTop; y <= regionBottom; ++y )
{
row_lay = m_pSheet->rowFormat( y );
@@ -470,10 +470,10 @@ void SheetPrint::printRect( QPainter& painter, const KoPoint& topLeft,
bool paintBordersLeft = false;
bool paintBordersTop = false;
- QPen rightPen = cell->effRightBorderPen( x, y );
- QPen leftPen = cell->effLeftBorderPen( x, y );
- QPen bottomPen = cell->effBottomBorderPen( x, y );
- QPen topPen = cell->effTopBorderPen( x, y );
+ TQPen rightPen = cell->effRightBorderPen( x, y );
+ TQPen leftPen = cell->effLeftBorderPen( x, y );
+ TQPen bottomPen = cell->effBottomBorderPen( x, y );
+ TQPen topPen = cell->effTopBorderPen( x, y );
// paint right border if rightmost cell or if the pen is more "worth" than the left border pen
// of the cell on the left or if the cell on the right is not painted. In the latter case get
@@ -552,18 +552,18 @@ void SheetPrint::printRect( QPainter& painter, const KoPoint& topLeft,
if (paintBordersTop) paintBorder |= Cell::Border_Top;
if (paintBordersBottom) paintBorder |= Cell::Border_Bottom;
- QPen highlightPen;
+ TQPen highlightPen;
- if ( m_pSheet->layoutDirection()==Sheet::RightToLeft )
+ if ( m_pSheet->tqlayoutDirection()==Sheet::RightToLeft )
cell->paintCell( rect, painter, NULL,
KoPoint( view.width() - xpos -
- col_lay->dblWidth(), ypos ), QPoint( x, y ),
+ col_lay->dblWidth(), ypos ), TQPoint( x, y ),
paintBorder,
rightPen, bottomPen, leftPen, topPen,
mergedCellsPainted);
else
cell->paintCell( rect, painter, NULL,
- KoPoint( xpos, ypos ), QPoint( x, y ),
+ KoPoint( xpos, ypos ), TQPoint( x, y ),
paintBorder,
rightPen, bottomPen, leftPen, topPen,
mergedCellsPainted);
@@ -575,25 +575,25 @@ void SheetPrint::printRect( QPainter& painter, const KoPoint& topLeft,
}
//
- // Draw the children
+ // Draw the tqchildren
//
- QRect zoomedView = m_pDoc->zoomRect( view );
- //QPtrListIterator<KoDocumentChild> it( m_pDoc->children() );
- //QPtrListIterator<EmbeddedObject> itObject( m_pDoc->embeddedObjects() );
+ TQRect zoomedView = m_pDoc->zoomRect( view );
+ //TQPtrListIterator<KoDocumentChild> it( m_pDoc->tqchildren() );
+ //TQPtrListIterator<EmbeddedObject> itObject( m_pDoc->embeddedObjects() );
- QValueList<PrintObject *>::iterator itObject;
+ TQValueList<PrintObject *>::iterator itObject;
for ( itObject = m_printObjects.begin(); itObject != m_printObjects.end(); ++itObject ) {
EmbeddedObject *obj = (*itObject)->obj;
-// QString tmp=QString("Testing child %1/%2 %3/%4 against view %5/%6 %7/%8")
-// .arg(it.current()->contentRect().left())
-// .arg(it.current()->contentRect().top())
-// .arg(it.current()->contentRect().right())
-// .arg(it.current()->contentRect().bottom())
-// .arg(view.left()).arg(view.top()).arg(zoomedView.right()).arg(zoomedView.bottom());
+// TQString tmp=TQString("Testing child %1/%2 %3/%4 against view %5/%6 %7/%8")
+// .tqarg(it.current()->contentRect().left())
+// .tqarg(it.current()->contentRect().top())
+// .tqarg(it.current()->contentRect().right())
+// .tqarg(it.current()->contentRect().bottom())
+// .tqarg(view.left()).tqarg(view.top()).tqarg(zoomedView.right()).tqarg(zoomedView.bottom());
// kdDebug(36001)<<tmp<<" offset "<<_childOffset.x()<<"/"<<_childOffset.y()<<endl;
- KoRect const bound = obj->geometry();
- QRect zoomedBound = m_pDoc->zoomRect( KoRect(bound.left(), bound.top(),
+ KoRect const bound = obj->tqgeometry();
+ TQRect zoomedBound = m_pDoc->zoomRect( KoRect(bound.left(), bound.top(),
bound.width(),
bound.height() ) );
#if 1
@@ -614,15 +614,15 @@ void SheetPrint::printRect( QPainter& painter, const KoPoint& topLeft,
-zoomedView.top() + m_pDoc->zoomItY( topLeft.y() ) );
//obj->draw( &painter );
- painter.drawPixmap( m_pDoc->zoomRect( obj->geometry() ).topLeft(), *(*itObject)->p ); //draw the cached object
+ painter.drawPixmap( m_pDoc->zoomRect( obj->tqgeometry() ).topLeft(), *(*itObject)->p ); //draw the cached object
- //painter.fillRect(zoomedBound, QBrush("red")); //for debug purpose
+ //painter.fillRect(zoomedBound, TQBrush("red")); //for debug purpose
painter.restore();
}
}
- //Don't let obscuring cells and children overpaint this area
- clipRegion -= QRegion ( m_pDoc->zoomItX( leftBorderPts() + topLeft.x() ),
+ //Don't let obscuring cells and tqchildren overpaint this area
+ clipRegion -= TQRegion ( m_pDoc->zoomItX( leftBorderPts() + topLeft.x() ),
m_pDoc->zoomItY( topBorderPts() + topLeft.y() ),
m_pDoc->zoomItX( xpos ),
m_pDoc->zoomItY( ypos ) );
@@ -630,15 +630,15 @@ void SheetPrint::printRect( QPainter& painter, const KoPoint& topLeft,
}
-void SheetPrint::printHeaderFooter( QPainter &painter, int pageNo )
+void SheetPrint::printHeaderFooter( TQPainter &painter, int pageNo )
{
double w;
double headFootDistance = MM_TO_POINT( 10.0 /*mm*/ ) / m_dZoom;
- QFont font( "Times" );
+ TQFont font( "Times" );
font.setPointSizeFloat( 0.01 * m_pDoc->zoom() *
/* Font size of 10 */ 10.0 / m_dZoom );
painter.setFont( font );
- QFontMetrics fm = painter.fontMetrics();
+ TQFontMetrics fm = painter.fontMetrics();
// print head line left
w = fm.width( headLeft( pageNo, m_pSheet->sheetName() ) ) / m_dZoom;
@@ -705,7 +705,7 @@ bool SheetPrint::isOnNewPageX( int _column )
}
//Now check if we find the column already in the list
- if ( m_lnewPageListX.findIndex( _column ) != -1 )
+ if ( m_lnewPageListX.tqfindIndex( _column ) != -1 )
{
if( _column > m_maxCheckedNewPageX )
m_maxCheckedNewPageX = _column;
@@ -767,7 +767,7 @@ void SheetPrint::updateNewPageX( int _column )
m_lnewPageListX.append( col );
//Now store into the previous entry the enditem and the width
- QValueList<PrintNewPageEntry>::iterator it;
+ TQValueList<PrintNewPageEntry>::iterator it;
it = findNewPageColumn( startCol );
(*it).setEndItem( col - 1 );
(*it).setSize( x - m_pSheet->columnFormat( col )->dblWidth() );
@@ -820,7 +820,7 @@ bool SheetPrint::isOnNewPageY( int _row )
}
//Now check if we find the row already in the list
- if ( m_lnewPageListY.findIndex( _row ) != -1 )
+ if ( m_lnewPageListY.tqfindIndex( _row ) != -1 )
{
if( _row > m_maxCheckedNewPageY )
m_maxCheckedNewPageY = _row;
@@ -883,7 +883,7 @@ void SheetPrint::updateNewPageY( int _row )
m_lnewPageListY.append( row );
//Now store into the previous entry the enditem and the width
- QValueList<PrintNewPageEntry>::iterator it;
+ TQValueList<PrintNewPageEntry>::iterator it;
it = findNewPageRow( startRow );
(*it).setEndItem( row - 1 );
(*it).setSize( y - m_pSheet->rowFormat( row )->dblHeight() );
@@ -933,12 +933,12 @@ void SheetPrint::updateNewPageListX( int _col )
if ( _col < m_lnewPageListX.last().startItem() )
{
//Find the page entry for this column
- QValueList<PrintNewPageEntry>::iterator it;
- it = m_lnewPageListX.find( _col );
+ TQValueList<PrintNewPageEntry>::iterator it;
+ it = m_lnewPageListX.tqfind( _col );
while ( ( it == m_lnewPageListX.end() ) && _col > 0 )
{
_col--;
- it = m_lnewPageListX.find( _col );
+ it = m_lnewPageListX.tqfind( _col );
}
//Remove later pages
@@ -968,12 +968,12 @@ void SheetPrint::updateNewPageListY( int _row )
if ( _row < m_lnewPageListY.last().startItem() )
{
//Find the page entry for this row
- QValueList<PrintNewPageEntry>::iterator it;
- it = m_lnewPageListY.find( _row );
+ TQValueList<PrintNewPageEntry>::iterator it;
+ it = m_lnewPageListY.tqfind( _row );
while ( ( it == m_lnewPageListY.end() ) && _row > 0 )
{
_row--;
- it = m_lnewPageListY.find( _row );
+ it = m_lnewPageListY.tqfind( _row );
}
//Remove later pages
@@ -1002,18 +1002,18 @@ void SheetPrint::resetPrintRange ()
{
KCommand* command = new DefinePrintRangeCommand( m_pSheet );
m_pDoc->addCommand( command );
- setPrintRange( QRect( QPoint( 1, 1 ), QPoint( KS_colMax, KS_rowMax ) ) );
+ setPrintRange( TQRect( TQPoint( 1, 1 ), TQPoint( KS_colMax, KS_rowMax ) ) );
}
-void SheetPrint::replaceHeadFootLineMacro ( QString &_text, const QString &_search, const QString &_replace )
+void SheetPrint::replaceHeadFootLineMacro ( TQString &_text, const TQString &_search, const TQString &_tqreplace )
{
- if ( _search != _replace )
- _text.replace ( QString( "<" + _search + ">" ), "<" + _replace + ">" );
+ if ( _search != _tqreplace )
+ _text.tqreplace ( TQString( "<" + _search + ">" ), "<" + _tqreplace + ">" );
}
-QString SheetPrint::localizeHeadFootLine ( const QString &_text )
+TQString SheetPrint::localizeHeadFootLine ( const TQString &_text )
{
- QString tmp = _text;
+ TQString tmp = _text;
/*
i18n:
@@ -1035,9 +1035,9 @@ QString SheetPrint::localizeHeadFootLine ( const QString &_text )
}
-QString SheetPrint::delocalizeHeadFootLine ( const QString &_text )
+TQString SheetPrint::delocalizeHeadFootLine ( const TQString &_text )
{
- QString tmp = _text;
+ TQString tmp = _text;
/*
i18n:
@@ -1073,8 +1073,8 @@ KoHeadFoot SheetPrint::headFootLine() const
}
-void SheetPrint::setHeadFootLine( const QString &_headl, const QString &_headm, const QString &_headr,
- const QString &_footl, const QString &_footm, const QString &_footr )
+void SheetPrint::setHeadFootLine( const TQString &_headl, const TQString &_headm, const TQString &_headr,
+ const TQString &_footl, const TQString &_footm, const TQString &_footr )
{
if ( m_pSheet->isProtected() )
NO_MODIFICATION_POSSIBLE;
@@ -1137,11 +1137,11 @@ void SheetPrint::setPaperLayout( float _leftBorder, float _topBorder,
setPaperOrientation( _orientation ); //calcPaperSize() is done here already
-// QPtrListIterator<KoView> it( views() );
+// TQPtrListIterator<KoView> it( views() );
// for( ;it.current(); ++it )
// {
// View *v = static_cast<View *>( it.current() );
- // We need to trigger the appropriate repaintings in the cells near the
+ // We need to trigger the appropriate tqrepaintings in the cells near the
// border of the page. The easiest way for this is to turn the borders
// off and on (or on and off if they were off).
// bool bBorderWasShown = v->activeSheet()->isShowPageBorders();
@@ -1154,8 +1154,8 @@ void SheetPrint::setPaperLayout( float _leftBorder, float _topBorder,
void SheetPrint::setPaperLayout( float _leftBorder, float _topBorder,
float _rightBorder, float _bottomBorder,
- const QString& _paper,
- const QString& _orientation )
+ const TQString& _paper,
+ const TQString& _orientation )
{
if ( m_pSheet->isProtected() )
NO_MODIFICATION_POSSIBLE;
@@ -1169,10 +1169,10 @@ void SheetPrint::setPaperLayout( float _leftBorder, float _topBorder,
newOrientation = PG_LANDSCAPE;
- QString paper( _paper );
+ TQString paper( _paper );
if ( paper[0].isDigit() ) // Custom format
{
- const int i = paper.find( 'x' );
+ const int i = paper.tqfind( 'x' );
if ( i < 0 )
{
// We have nothing useful, so assume ISO A4
@@ -1208,22 +1208,22 @@ void SheetPrint::calcPaperSize()
}
}
-QValueList<PrintNewPageEntry>::iterator SheetPrint::findNewPageColumn( int col )
+TQValueList<PrintNewPageEntry>::iterator SheetPrint::findNewPageColumn( int col )
{
- QValueList<PrintNewPageEntry>::iterator it;
+ TQValueList<PrintNewPageEntry>::iterator it;
for( it = m_lnewPageListX.begin(); it != m_lnewPageListX.end(); ++it )
{
if( (*it).startItem() == col )
return it;
}
return it;
-// QValueList<PrintNewPageEntry>::iterator it;
-// it = m_lnewPageListX.find( startCol );
+// TQValueList<PrintNewPageEntry>::iterator it;
+// it = m_lnewPageListX.tqfind( startCol );
}
-QValueList<PrintNewPageEntry>::iterator SheetPrint::findNewPageRow( int row )
+TQValueList<PrintNewPageEntry>::iterator SheetPrint::findNewPageRow( int row )
{
- QValueList<PrintNewPageEntry>::iterator it;
+ TQValueList<PrintNewPageEntry>::iterator it;
for( it = m_lnewPageListY.begin(); it != m_lnewPageListY.end(); ++it )
{
if( (*it).startItem() == row )
@@ -1233,11 +1233,11 @@ QValueList<PrintNewPageEntry>::iterator SheetPrint::findNewPageRow( int row )
}
-QString SheetPrint::paperFormatString()const
+TQString SheetPrint::paperFormatString()const
{
if ( m_paperFormat == PG_CUSTOM )
{
- QString tmp;
+ TQString tmp;
tmp.sprintf( "%fx%f", m_paperWidth, m_paperHeight );
return tmp;
}
@@ -1259,31 +1259,31 @@ const char* SheetPrint::orientationString() const
return 0;
}
-QString SheetPrint::completeHeading( const QString &_data, int _page, const QString &_sheet ) const
+TQString SheetPrint::completeHeading( const TQString &_data, int _page, const TQString &_sheet ) const
{
- QString page( QString::number( _page) );
- QString pages( QString::number( m_uprintPages ) );
+ TQString page( TQString::number( _page) );
+ TQString pages( TQString::number( m_uprintPages ) );
- QString pathFileName(m_pDoc->url().path());
+ TQString pathFileName(m_pDoc->url().path());
if ( pathFileName.isNull() )
pathFileName="";
- QString fileName(m_pDoc->url().fileName());
+ TQString fileName(m_pDoc->url().fileName());
if( fileName.isNull())
fileName="";
- QString t(QTime::currentTime().toString());
- QString d(QDate::currentDate().toString());
- QString ta;
+ TQString t(TQTime::currentTime().toString());
+ TQString d(TQDate::tqcurrentDate().toString());
+ TQString ta;
if ( !_sheet.isEmpty() )
ta = _sheet;
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
- QString full_name;
- QString email_addr;
- QString organization;
- QString tmp;
+ TQString full_name;
+ TQString email_addr;
+ TQString organization;
+ TQString tmp;
if ( !authorPage )
kdWarning() << "Author information not found in Document Info !" << endl;
else
@@ -1303,44 +1303,44 @@ QString SheetPrint::completeHeading( const QString &_data, int _page, const QStr
full_name=p->pw_gecos;
if( email_addr.isEmpty())
- email_addr = QString("%1@%2").arg(p->pw_name).arg(hostname);
+ email_addr = TQString("%1@%2").tqarg(p->pw_name).tqarg(hostname);
tmp = _data;
int pos = 0;
- while ( ( pos = tmp.find( "<page>", pos ) ) != -1 )
- tmp.replace( pos, 6, page );
+ while ( ( pos = tmp.tqfind( "<page>", pos ) ) != -1 )
+ tmp.tqreplace( pos, 6, page );
pos = 0;
- while ( ( pos = tmp.find( "<pages>", pos ) ) != -1 )
- tmp.replace( pos, 7, pages );
+ while ( ( pos = tmp.tqfind( "<pages>", pos ) ) != -1 )
+ tmp.tqreplace( pos, 7, pages );
pos = 0;
- while ( ( pos = tmp.find( "<file>", pos ) ) != -1 )
- tmp.replace( pos, 6, pathFileName );
+ while ( ( pos = tmp.tqfind( "<file>", pos ) ) != -1 )
+ tmp.tqreplace( pos, 6, pathFileName );
pos = 0;
- while ( ( pos = tmp.find( "<name>", pos ) ) != -1 )
- tmp.replace( pos, 6, fileName );
+ while ( ( pos = tmp.tqfind( "<name>", pos ) ) != -1 )
+ tmp.tqreplace( pos, 6, fileName );
pos = 0;
- while ( ( pos = tmp.find( "<time>", pos ) ) != -1 )
- tmp.replace( pos, 6, t );
+ while ( ( pos = tmp.tqfind( "<time>", pos ) ) != -1 )
+ tmp.tqreplace( pos, 6, t );
pos = 0;
- while ( ( pos = tmp.find( "<date>", pos ) ) != -1 )
- tmp.replace( pos, 6, d );
+ while ( ( pos = tmp.tqfind( "<date>", pos ) ) != -1 )
+ tmp.tqreplace( pos, 6, d );
pos = 0;
- while ( ( pos = tmp.find( "<author>", pos ) ) != -1 )
- tmp.replace( pos, 8, full_name );
+ while ( ( pos = tmp.tqfind( "<author>", pos ) ) != -1 )
+ tmp.tqreplace( pos, 8, full_name );
pos = 0;
- while ( ( pos = tmp.find( "<email>", pos ) ) != -1 )
- tmp.replace( pos, 7, email_addr );
+ while ( ( pos = tmp.tqfind( "<email>", pos ) ) != -1 )
+ tmp.tqreplace( pos, 7, email_addr );
pos = 0;
- while ( ( pos = tmp.find( "<org>", pos ) ) != -1 )
- tmp.replace( pos, 5, organization );
+ while ( ( pos = tmp.tqfind( "<org>", pos ) ) != -1 )
+ tmp.tqreplace( pos, 5, organization );
pos = 0;
- while ( ( pos = tmp.find( "<sheet>", pos ) ) != -1 )
- tmp.replace( pos, 7, ta );
+ while ( ( pos = tmp.tqfind( "<sheet>", pos ) ) != -1 )
+ tmp.tqreplace( pos, 7, ta );
return tmp;
}
-void SheetPrint::setPrintRange( const QRect &_printRange )
+void SheetPrint::setPrintRange( const TQRect &_printRange )
{
if ( m_pSheet->isProtected() )
NO_MODIFICATION_POSSIBLE;
@@ -1355,9 +1355,9 @@ void SheetPrint::setPrintRange( const QRect &_printRange )
//Refresh calculation of stored page breaks, the lower one of old and new
if ( oldLeft != _printRange.left() )
- updateNewPageListX( QMIN( oldLeft, _printRange.left() ) );
+ updateNewPageListX( TQMIN( oldLeft, _printRange.left() ) );
if ( oldTop != _printRange.top() )
- updateNewPageListY( QMIN( oldTop, _printRange.top() ) );
+ updateNewPageListY( TQMIN( oldTop, _printRange.top() ) );
m_pDoc->setModified( true );
@@ -1408,7 +1408,7 @@ void SheetPrint::calculateZoomForPageLimitX()
if( m_dZoom < 1.0 )
m_dZoom = 1.0;
- QRect printRange = cellsPrintRange();
+ TQRect printRange = cellsPrintRange();
updateNewPageX( m_pSheet->rightColumn( m_pSheet->dblColumnPos( printRange.right() ) + prinsheetWidthPts() ) );
int currentPages = pagesX( printRange );
@@ -1470,7 +1470,7 @@ void SheetPrint::calculateZoomForPageLimitY()
if( m_dZoom < 1.0 )
m_dZoom = 1.0;
- QRect printRange = cellsPrintRange();
+ TQRect printRange = cellsPrintRange();
updateNewPageY( m_pSheet->bottomRow( m_pSheet->dblRowPos( printRange.bottom() ) + prinsheetHeightPts() ) );
int currentPages = pagesY( printRange );
@@ -1598,7 +1598,7 @@ void SheetPrint::updatePrintRepeatRowsHeight()
}
-void SheetPrint::setPrintRepeatColumns( QPair<int, int> _printRepeatColumns )
+void SheetPrint::setPrintRepeatColumns( TQPair<int, int> _printRepeatColumns )
{
//Bring arguments in order
if ( _printRepeatColumns.first > _printRepeatColumns.second )
@@ -1619,7 +1619,7 @@ void SheetPrint::setPrintRepeatColumns( QPair<int, int> _printRepeatColumns )
updatePrintRepeatColumnsWidth();
//Refresh calculation of stored page breaks, the lower one of old and new
- updateNewPageListX( QMIN( oldFirst, _printRepeatColumns.first ) );
+ updateNewPageListX( TQMIN( oldFirst, _printRepeatColumns.first ) );
//Refresh view, if page borders are shown
if ( m_pSheet->isShowPageBorders() )
@@ -1628,7 +1628,7 @@ void SheetPrint::setPrintRepeatColumns( QPair<int, int> _printRepeatColumns )
m_pDoc->setModified( true );
}
-void SheetPrint::setPrintRepeatRows( QPair<int, int> _printRepeatRows )
+void SheetPrint::setPrintRepeatRows( TQPair<int, int> _printRepeatRows )
{
//Bring arguments in order
if ( _printRepeatRows.first > _printRepeatRows.second )
@@ -1649,7 +1649,7 @@ void SheetPrint::setPrintRepeatRows( QPair<int, int> _printRepeatRows )
updatePrintRepeatRowsHeight();
//Refresh calculation of stored page breaks, the lower one of old and new
- updateNewPageListY( QMIN( oldFirst, _printRepeatRows.first ) );
+ updateNewPageListY( TQMIN( oldFirst, _printRepeatRows.first ) );
//Refresh view, if page borders are shown
if ( m_pSheet->isShowPageBorders() )
@@ -1661,7 +1661,7 @@ void SheetPrint::setPrintRepeatRows( QPair<int, int> _printRepeatRows )
void SheetPrint::insertColumn( int col, int nbCol )
{
//update print range, when it has been defined
- if ( m_printRange != QRect( QPoint(1, 1), QPoint(KS_colMax, KS_rowMax) ) )
+ if ( m_printRange != TQRect( TQPoint(1, 1), TQPoint(KS_colMax, KS_rowMax) ) )
{
int left = m_printRange.left();
int right = m_printRange.right();
@@ -1674,15 +1674,15 @@ void SheetPrint::insertColumn( int col, int nbCol )
//Validity checks
if ( left > KS_colMax ) left = KS_colMax;
if ( right > KS_colMax ) right = KS_colMax;
- setPrintRange( QRect( QPoint( left, m_printRange.top() ),
- QPoint( right, m_printRange.bottom() ) ) );
+ setPrintRange( TQRect( TQPoint( left, m_printRange.top() ),
+ TQPoint( right, m_printRange.bottom() ) ) );
}
}
void SheetPrint::insertRow( int row, int nbRow )
{
//update print range, when it has been defined
- if ( m_printRange != QRect( QPoint(1, 1), QPoint(KS_colMax, KS_rowMax) ) )
+ if ( m_printRange != TQRect( TQPoint(1, 1), TQPoint(KS_colMax, KS_rowMax) ) )
{
int top = m_printRange.top();
int bottom = m_printRange.bottom();
@@ -1695,15 +1695,15 @@ void SheetPrint::insertRow( int row, int nbRow )
//Validity checks
if ( top > KS_rowMax ) top = KS_rowMax;
if ( bottom > KS_rowMax ) bottom = KS_rowMax;
- setPrintRange( QRect( QPoint( m_printRange.left(), top ),
- QPoint( m_printRange.right(), bottom ) ) );
+ setPrintRange( TQRect( TQPoint( m_printRange.left(), top ),
+ TQPoint( m_printRange.right(), bottom ) ) );
}
}
void SheetPrint::removeColumn( int col, int nbCol )
{
//update print range, when it has been defined
- if ( m_printRange != QRect( QPoint(1, 1), QPoint(KS_colMax, KS_rowMax) ) )
+ if ( m_printRange != TQRect( TQPoint(1, 1), TQPoint(KS_colMax, KS_rowMax) ) )
{
int left = m_printRange.left();
int right = m_printRange.right();
@@ -1716,8 +1716,8 @@ void SheetPrint::removeColumn( int col, int nbCol )
//Validity checks
if ( left < 1 ) left = 1;
if ( right < 1 ) right = 1;
- setPrintRange( QRect( QPoint( left, m_printRange.top() ),
- QPoint( right, m_printRange.bottom() ) ) );
+ setPrintRange( TQRect( TQPoint( left, m_printRange.top() ),
+ TQPoint( right, m_printRange.bottom() ) ) );
}
//update repeat columns, when it has been defined
@@ -1734,14 +1734,14 @@ void SheetPrint::removeColumn( int col, int nbCol )
//Validity checks
if ( left < 1 ) left = 1;
if ( right < 1 ) right = 1;
- setPrintRepeatColumns ( qMakePair( left, right ) );
+ setPrintRepeatColumns ( tqMakePair( left, right ) );
}
}
void SheetPrint::removeRow( int row, int nbRow )
{
//update print range, when it has been defined
- if ( m_printRange != QRect( QPoint(1, 1), QPoint(KS_colMax, KS_rowMax) ) )
+ if ( m_printRange != TQRect( TQPoint(1, 1), TQPoint(KS_colMax, KS_rowMax) ) )
{
int top = m_printRange.top();
int bottom = m_printRange.bottom();
@@ -1754,8 +1754,8 @@ void SheetPrint::removeRow( int row, int nbRow )
//Validity checks
if ( top < 1 ) top = 1;
if ( bottom < 1 ) bottom = 1;
- setPrintRange( QRect( QPoint( m_printRange.left(), top ),
- QPoint( m_printRange.right(), bottom ) ) );
+ setPrintRange( TQRect( TQPoint( m_printRange.left(), top ),
+ TQPoint( m_printRange.right(), bottom ) ) );
}
//update repeat rows, when it has been defined
@@ -1772,7 +1772,7 @@ void SheetPrint::removeRow( int row, int nbRow )
//Validity checks
if ( top < 1 ) top = 1;
if ( bottom < 1 ) bottom = 1;
- setPrintRepeatRows( qMakePair( top, bottom ) );
+ setPrintRepeatRows( tqMakePair( top, bottom ) );
}
}