summaryrefslogtreecommitdiffstats
path: root/kspread/kspread_sheet.cc
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:56:31 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:56:31 -0600
commitc9cb4f487428aad5d8cda5e3a4b9ad87390d7e54 (patch)
tree1ee1912ac4bb966475f0db0f2a78678661b4b4a5 /kspread/kspread_sheet.cc
parent94844816550ad672ccfcdc25659c625546239998 (diff)
downloadkoffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.tar.gz
koffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 94844816550ad672ccfcdc25659c625546239998.
Diffstat (limited to 'kspread/kspread_sheet.cc')
-rw-r--r--kspread/kspread_sheet.cc98
1 files changed, 49 insertions, 49 deletions
diff --git a/kspread/kspread_sheet.cc b/kspread/kspread_sheet.cc
index d0eb13d7..09abcf8a 100644
--- a/kspread/kspread_sheet.cc
+++ b/kspread/kspread_sheet.cc
@@ -29,9 +29,9 @@
#include <tqapplication.h>
#include <tqcheckbox.h>
-#include <clipboard.h>
+#include <tqclipboard.h>
#include <tqlabel.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqlineedit.h>
#include <tqpicture.h>
#include <tqregexp.h>
@@ -151,7 +151,7 @@ void ChartBinding::cellChanged( Cell* /*changedCell*/ )
//Ensure display gets updated by marking all cells underneath the chart as
//dirty
- const TQRect chartGeometry = m_child->geometry().toTQRect();
+ const TQRect chartGeometry = m_child->tqgeometry().toTQRect();
double tmp;
int left = sheet()->leftColumn( chartGeometry.left() , tmp );
@@ -201,7 +201,7 @@ void ChartBinding::cellChanged( Cell* /*changedCell*/ )
// Force a redraw of the chart on all views
- /** TODO - replace the call below with something that will repaint this chart */
+ /** TODO - replace the call below with something that will tqrepaint this chart */
#endif
// sheet()->emit_polygonInvalidated( m_child->framePointArray() );
}
@@ -222,12 +222,12 @@ TextDrag::~TextDrag()
}
-TQByteArray TextDrag::encodedData( const char * mime ) const
+TQByteArray TextDrag::tqencodedData( const char * mime ) const
{
if ( strcmp( selectionMimeType(), mime ) == 0)
return m_kspread;
else
- return TQTextDrag::encodedData( mime );
+ return TQTextDrag::tqencodedData( mime );
}
bool TextDrag::canDecode( TQMimeSource* e )
@@ -1819,7 +1819,7 @@ struct SetSelectionFirstLetterUpperWorker : public Sheet::CellWorker
cell->setDisplayDirtyFlag();
TQString tmp = cell->text();
int len = tmp.length();
- cell->setCellText( (tmp.at(0).upper()+tmp.right(len-1)) );
+ cell->setCellText( (tmp.tqat(0).upper()+tmp.right(len-1)) );
cell->clearDisplayDirtyFlag();
}
};
@@ -3940,7 +3940,7 @@ void Sheet::swapCells( int x1, int y1, int x2, int y2, bool cpFormat )
}
// Dummy cell used for swapping cells.
- // In fact we copy only content and no layout
+ // In fact we copy only content and no tqlayout
// information. Imagine sorting in a sheet. Swapping
// the format while sorting is not what you would expect
// as a user.
@@ -5088,7 +5088,7 @@ void Sheet::copySelection( Selection* selectionInfo )
kd->setPlain( copyAsText(selectionInfo) );
kd->setKSpread( buffer.buffer() );
- TQApplication::clipboard()->setData( kd );
+ TQApplication::tqclipboard()->setData( kd );
}
void Sheet::cutSelection( Selection* selectionInfo )
@@ -5107,7 +5107,7 @@ void Sheet::cutSelection( Selection* selectionInfo )
kd->setPlain( copyAsText(selectionInfo) );
kd->setKSpread( buffer.buffer() );
- TQApplication::clipboard()->setData( kd );
+ TQApplication::tqclipboard()->setData( kd );
deleteSelection( selectionInfo, true );
}
@@ -5117,7 +5117,7 @@ void Sheet::paste( const TQRect& pasteArea, bool makeUndo,
bool insert, int insertTo, bool pasteFC,
TQClipboard::Mode clipboardMode )
{
- TQMimeSource * mime = TQApplication::clipboard()->data( clipboardMode );
+ TQMimeSource * mime = TQApplication::tqclipboard()->data( clipboardMode );
if ( !mime )
return;
@@ -5125,13 +5125,13 @@ void Sheet::paste( const TQRect& pasteArea, bool makeUndo,
if ( mime->provides( TextDrag::selectionMimeType() ) )
{
- b = mime->encodedData( TextDrag::selectionMimeType() );
+ b = mime->tqencodedData( TextDrag::selectionMimeType() );
}
else if( mime->provides( "text/plain" ) )
{
- // Note: TQClipboard::text() seems to do a better job than encodedData( "text/plain" )
+ // Note: TQClipboard::text() seems to do a better job than tqencodedData( "text/plain" )
// In particular it handles charsets (in the mimetype). Copied from KPresenter ;-)
- TQString _text = TQApplication::clipboard()->text( clipboardMode );
+ TQString _text = TQApplication::tqclipboard()->text( clipboardMode );
doc()->emitBeginOperation();
pasteTextPlain( _text, pasteArea );
emit sig_updateView( this );
@@ -5152,7 +5152,7 @@ void Sheet::paste( const TQRect& pasteArea, bool makeUndo,
void Sheet::pasteTextPlain( TQString &_text, TQRect pasteArea)
{
// TQString tmp;
-// tmp= TQString::fromLocal8Bit(_mime->encodedData( "text/plain" ));
+// tmp= TQString::fromLocal8Bit(_mime->tqencodedData( "text/plain" ));
if( _text.isEmpty() )
return;
@@ -5523,14 +5523,14 @@ void Sheet::loadSelectionUndo(const TQDomDocument& d, const TQRect& loadArea,
bool Sheet::testAreaPasteInsert()const
{
- TQMimeSource* mime = TQApplication::clipboard()->data( TQClipboard::Clipboard );
+ TQMimeSource* mime = TQApplication::tqclipboard()->data( TQClipboard::Clipboard );
if ( !mime )
return false;
TQByteArray b;
if ( mime->provides( "application/x-kspread-snippet" ) )
- b = mime->encodedData( "application/x-kspread-snippet" );
+ b = mime->tqencodedData( "application/x-kspread-snippet" );
else
return false;
@@ -6129,7 +6129,7 @@ KoRect Sheet::getRealRect( bool all )
{
if ( all || ( it.current()->isSelected() && ! it.current()->isProtect() ) )
- rect |= it.current()->geometry();
+ rect |= it.current()->tqgeometry();
}
return rect;
@@ -6149,12 +6149,12 @@ KCommand *Sheet::moveObject(View *_view, double diffx, double diffy)
if ( it.current()->isSelected() && !it.current()->isProtect())
{
_objects.append( it.current() );
- KoRect geometry = it.current()->geometry();
- geometry.moveBy( -canvas->xOffset(), -canvas->yOffset() );
- TQRect br = doc()->zoomRect( geometry/*it.current()->geometry()*/ );
+ KoRect tqgeometry = it.current()->tqgeometry();
+ tqgeometry.moveBy( -canvas->xOffset(), -canvas->yOffset() );
+ TQRect br = doc()->zoomRect( tqgeometry/*it.current()->tqgeometry()*/ );
br.moveBy( doc()->zoomItX( diffx ), doc()->zoomItY( diffy ) );
br.moveBy( doc()->zoomItX( -canvas->xOffset() ), doc()->zoomItY( -canvas->yOffset() ) );
- canvas->repaint( br ); // Previous position
+ canvas->tqrepaint( br ); // Previous position
canvas->repaintObject( it.current() ); // New position
createCommand=true;
}
@@ -6179,18 +6179,18 @@ KCommand *Sheet::moveObject(View *_view,const KoPoint &_move,bool key)
{
if ( it.current()->isSelected() && !it.current()->isProtect()) {
- KoRect geometry = it.current()->geometry();
- geometry.moveBy( -canvas->xOffset(), -canvas->yOffset() );
- TQRect oldBoundingRect = doc()->zoomRect( geometry );
+ KoRect tqgeometry = it.current()->tqgeometry();
+ tqgeometry.moveBy( -canvas->xOffset(), -canvas->yOffset() );
+ TQRect oldBoundingRect = doc()->zoomRect( tqgeometry );
- KoRect r = it.current()->geometry();
+ KoRect r = it.current()->tqgeometry();
r.moveBy( _move.x(), _move.y() );
it.current()->setGeometry( r );
_objects.append( it.current() );
- canvas->repaint( oldBoundingRect );
+ canvas->tqrepaint( oldBoundingRect );
canvas->repaintObject( it.current() );
}
}
@@ -6235,7 +6235,7 @@ void Sheet::unifyObjectName( EmbeddedObject *object ) {
if ( rx.search( objectName ) != -1 ) {
objectName.remove( rx );
}
- objectName += TQString(" (%1)").arg( count );
+ objectName += TQString(" (%1)").tqarg( count );
object->setObjectName( objectName );
}
}
@@ -6418,16 +6418,16 @@ bool Sheet::loadOasis( const TQDomElement& sheetElement, KoOasisLoadingContext&
if ( masterStyle )
{
loadSheetStyleFormat( masterStyle );
- if ( masterStyle->hasAttributeNS( KoXmlNS::style, "page-layout-name" ) )
+ if ( masterStyle->hasAttributeNS( KoXmlNS::style, "page-tqlayout-name" ) )
{
- TQString masterPageLayoutStyleName = masterStyle->attributeNS( KoXmlNS::style, "page-layout-name", TQString() );
+ TQString masterPageLayoutStyleName = masterStyle->attributeNS( KoXmlNS::style, "page-tqlayout-name", TQString() );
//kdDebug()<<"masterPageLayoutStyleName :"<<masterPageLayoutStyleName<<endl;
const TQDomElement *masterLayoutStyle = oasisContext.oasisStyles().findStyle( masterPageLayoutStyleName );
if ( masterLayoutStyle )
{
//kdDebug()<<"masterLayoutStyle :"<<masterLayoutStyle<<endl;
KoStyleStack styleStack;
- styleStack.setTypeProperties( "page-layout" );
+ styleStack.setTypeProperties( "page-tqlayout" );
styleStack.push( *masterLayoutStyle );
loadOasisMasterLayoutPage( styleStack );
}
@@ -6479,7 +6479,7 @@ bool Sheet::loadOasis( const TQDomElement& sheetElement, KoOasisLoadingContext&
loadRowFormat( rowElement, rowIndex, oasisContext, /*rowNode.isNull() ,*/ styleMap );
kdDebug()<<" table-row found :index row after "<<rowIndex<<endl;
}
- else if ( rowElement.localName() == "shapes" )
+ else if ( rowElement.localName() == "tqshapes" )
loadOasisObjects( rowElement, oasisContext );
}
}
@@ -6564,7 +6564,7 @@ void Sheet::loadOasisMasterLayoutPage( KoStyleStack &styleStack )
TQString orientation = "Portrait";
TQString format;
- // Laurent : Why we stored layout information as Millimeter ?!!!!!
+ // Laurent : Why we stored tqlayout information as Millimeter ?!!!!!
// kspread used point for all other attribute
// I don't understand :(
if ( styleStack.hasAttributeNS( KoXmlNS::fo, "page-width" ) )
@@ -6685,7 +6685,7 @@ void Sheet::loadOasisMasterLayoutPage( KoStyleStack &styleStack )
kdDebug()<<" table-centering unknown :"<<str<<endl;
#endif
}
- format = TQString( "%1x%2" ).arg( width ).arg( height );
+ format = TQString( "%1x%2" ).tqarg( width ).tqarg( height );
kdDebug()<<" format : "<<format<<endl;
d->print->setPaperLayout( left, top, right, bottom, format, orientation );
@@ -6717,7 +6717,7 @@ bool Sheet::loadColumnFormat(const TQDomElement& column, const KoOasisStyles& oa
kdDebug() << "Repeated: " << number << endl;
}
- Format layout( this , doc()->styleManager()->defaultStyle() );
+ Format tqlayout( this , doc()->styleManager()->defaultStyle() );
if ( column.hasAttributeNS( KoXmlNS::table, "default-cell-style-name" ) )
{
const TQString styleName = column.attributeNS( KoXmlNS::table, "default-cell-style-name", TQString() );
@@ -6726,7 +6726,7 @@ bool Sheet::loadColumnFormat(const TQDomElement& column, const KoOasisStyles& oa
Style* const style = styleMap[ styleName ];
if ( style )
{
- layout.setStyle( style );
+ tqlayout.setStyle( style );
isNonDefaultColumn = true;
}
}
@@ -6799,7 +6799,7 @@ bool Sheet::loadColumnFormat(const TQDomElement& column, const KoOasisStyles& oa
{
columnFormat = this->columnFormat( indexCol );
}
- columnFormat->copy( layout );
+ columnFormat->copy( tqlayout );
++indexCol;
}
@@ -6828,7 +6828,7 @@ bool Sheet::loadRowFormat( const TQDomElement& row, int &rowIndex, KoOasisLoadin
}
styleStack.setTypeProperties( "table-row" );
- Format layout( this , doc()->styleManager()->defaultStyle() );
+ Format tqlayout( this , doc()->styleManager()->defaultStyle() );
if ( row.hasAttributeNS( KoXmlNS::table,"default-cell-style-name" ) )
{
const TQString styleName = row.attributeNS( KoXmlNS::table, "default-cell-style-name", TQString() );
@@ -6837,7 +6837,7 @@ bool Sheet::loadRowFormat( const TQDomElement& row, int &rowIndex, KoOasisLoadin
Style* const style = styleMap[ styleName ];
if ( style )
{
- layout.setStyle( style );
+ tqlayout.setStyle( style );
isNonDefaultRow = true;
}
}
@@ -6908,7 +6908,7 @@ bool Sheet::loadRowFormat( const TQDomElement& row, int &rowIndex, KoOasisLoadin
{
rowFormat = this->rowFormat( rowIndex );
}
- rowFormat->copy( layout );
+ rowFormat->copy( tqlayout );
++rowIndex;
}
@@ -7171,7 +7171,7 @@ void Sheet::convertPart( const TQString & part, KoXmlWriter & xmlWriter ) const
TQDomElement t = dd.createElement( "text:date" );
t.setAttribute( "text:date-value", "0-00-00" );
// todo: "style:data-style-name", "N2"
- t.appendChild( dd.createTextNode( TQDate::currentDate().toString() ) );
+ t.appendChild( dd.createTextNode( TQDate::tqcurrentDate().toString() ) );
parent.appendChild( t );
#endif
}
@@ -7355,7 +7355,7 @@ TQString Sheet::saveOasisSheetStyleName( KoGenStyles &mainStyles )
KoGenStyle pageStyle( Doc::STYLE_PAGE, "table"/*FIXME I don't know if name is sheet*/ );
KoGenStyle pageMaster( Doc::STYLE_PAGEMASTER );
- pageMaster.addAttribute( "style:page-layout-name", d->print->saveOasisSheetStyleLayout( mainStyles ) );
+ pageMaster.addAttribute( "style:page-tqlayout-name", d->print->saveOasisSheetStyleLayout( mainStyles ) );
TQBuffer buffer;
buffer.open( IO_WriteOnly );
@@ -7391,7 +7391,7 @@ void Sheet::saveOasisColRowCell( KoXmlWriter& xmlWriter, KoGenStyles &mainStyles
currentColumnStyle.addPropertyPt( "style:column-width", column->dblWidth() );
currentColumnStyle.addProperty( "fo:break-before", "auto" );/*FIXME auto or not ?*/
- //style default layout for column
+ //style default tqlayout for column
KoGenStyle currentDefaultCellStyle; // the type is determined in saveOasisCellStyle
TQString currentDefaultCellStyleName = column->saveOasisCellStyle( currentDefaultCellStyle, mainStyles );
@@ -7774,7 +7774,7 @@ bool Sheet::loadXML( const TQDomElement& sheet )
// we just ignore 'ok' - if it didn't work, go on
}
- // Load the paper layout
+ // Load the paper tqlayout
TQDomElement paper = sheet.namedItem( "paper" ).toElement();
if ( !paper.isNull() )
{
@@ -8071,7 +8071,7 @@ void Sheet::updateCell( Cell */*cell*/, int _column, int _row )
updateCellArea(cellArea);
}
-void Sheet::emit_updateRow( RowFormat *_format, int _row, bool repaint )
+void Sheet::emit_updateRow( RowFormat *_format, int _row, bool tqrepaint )
{
if ( doc()->isLoading() )
return;
@@ -8081,7 +8081,7 @@ void Sheet::emit_updateRow( RowFormat *_format, int _row, bool repaint )
if ( c->row() == _row )
c->setLayoutDirtyFlag( true );
- if ( repaint )
+ if ( tqrepaint )
{
//All the cells in this row, or below this row will need to be repainted
//So add that region of the sheet to the paint dirty list.
@@ -8256,7 +8256,7 @@ bool Sheet::saveChildren( KoStore* _store, const TQString &_path )
{
if ( it.current()->sheet() == this && ( it.current()->getType() == OBJECT_KOFFICE_PART || it.current()->getType() == OBJECT_CHART ) )
{
- TQString path = TQString( "%1/%2" ).arg( _path ).arg( i++ );
+ TQString path = TQString( "%1/%2" ).tqarg( _path ).tqarg( i++ );
if ( !dynamic_cast<EmbeddedKOfficeObject*>( it.current() )->embeddedObject()->document()->saveToStore( _store, path ) )
return false;
}
@@ -8279,7 +8279,7 @@ bool Sheet::saveOasisObjects( KoStore */*store*/, KoXmlWriter &xmlWriter, KoGenS
{
if ( !objectFound )
{
- xmlWriter.startElement( "table:shapes" );
+ xmlWriter.startElement( "table:tqshapes" );
objectFound = true;
}
if ( !it.current()->saveOasisObject(sc) )
@@ -8565,7 +8565,7 @@ void Sheet::printDebug()
cellDescr += " | ";
cellDescr += cell->text();
if ( cell->isFormula() )
- cellDescr += TQString(" [result: %1]").arg( cell->value().asString() );
+ cellDescr += TQString(" [result: %1]").tqarg( cell->value().asString() );
kdDebug(36001) << cellDescr << endl;
}
}