summaryrefslogtreecommitdiffstats
path: root/kspread/kspread_sheet.cc
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:32:11 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:32:11 -0600
commit94844816550ad672ccfcdc25659c625546239998 (patch)
treee35fc60fd736c645d59f6408af032774ad8023d3 /kspread/kspread_sheet.cc
parent2a811c38c74c03648ecf857e566c44483cbad706 (diff)
downloadkoffice-94844816550ad672ccfcdc25659c625546239998.tar.gz
koffice-94844816550ad672ccfcdc25659c625546239998.zip
Rename a number of old tq methods that are no longer tq specific
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 09abcf8a..d0eb13d7 100644
--- a/kspread/kspread_sheet.cc
+++ b/kspread/kspread_sheet.cc
@@ -29,9 +29,9 @@
#include <tqapplication.h>
#include <tqcheckbox.h>
-#include <tqclipboard.h>
+#include <clipboard.h>
#include <tqlabel.h>
-#include <tqlayout.h>
+#include <layout.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->tqgeometry().toTQRect();
+ const TQRect chartGeometry = m_child->geometry().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 tqrepaint this chart */
+ /** TODO - replace the call below with something that will repaint this chart */
#endif
// sheet()->emit_polygonInvalidated( m_child->framePointArray() );
}
@@ -222,12 +222,12 @@ TextDrag::~TextDrag()
}
-TQByteArray TextDrag::tqencodedData( const char * mime ) const
+TQByteArray TextDrag::encodedData( const char * mime ) const
{
if ( strcmp( selectionMimeType(), mime ) == 0)
return m_kspread;
else
- return TQTextDrag::tqencodedData( mime );
+ return TQTextDrag::encodedData( 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.tqat(0).upper()+tmp.right(len-1)) );
+ cell->setCellText( (tmp.at(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 tqlayout
+ // In fact we copy only content and no layout
// 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::tqclipboard()->setData( kd );
+ TQApplication::clipboard()->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::tqclipboard()->setData( kd );
+ TQApplication::clipboard()->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::tqclipboard()->data( clipboardMode );
+ TQMimeSource * mime = TQApplication::clipboard()->data( clipboardMode );
if ( !mime )
return;
@@ -5125,13 +5125,13 @@ void Sheet::paste( const TQRect& pasteArea, bool makeUndo,
if ( mime->provides( TextDrag::selectionMimeType() ) )
{
- b = mime->tqencodedData( TextDrag::selectionMimeType() );
+ b = mime->encodedData( TextDrag::selectionMimeType() );
}
else if( mime->provides( "text/plain" ) )
{
- // Note: TQClipboard::text() seems to do a better job than tqencodedData( "text/plain" )
+ // Note: TQClipboard::text() seems to do a better job than encodedData( "text/plain" )
// In particular it handles charsets (in the mimetype). Copied from KPresenter ;-)
- TQString _text = TQApplication::tqclipboard()->text( clipboardMode );
+ TQString _text = TQApplication::clipboard()->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->tqencodedData( "text/plain" ));
+// tmp= TQString::fromLocal8Bit(_mime->encodedData( "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::tqclipboard()->data( TQClipboard::Clipboard );
+ TQMimeSource* mime = TQApplication::clipboard()->data( TQClipboard::Clipboard );
if ( !mime )
return false;
TQByteArray b;
if ( mime->provides( "application/x-kspread-snippet" ) )
- b = mime->tqencodedData( "application/x-kspread-snippet" );
+ b = mime->encodedData( "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()->tqgeometry();
+ rect |= it.current()->geometry();
}
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 tqgeometry = it.current()->tqgeometry();
- tqgeometry.moveBy( -canvas->xOffset(), -canvas->yOffset() );
- TQRect br = doc()->zoomRect( tqgeometry/*it.current()->tqgeometry()*/ );
+ KoRect geometry = it.current()->geometry();
+ geometry.moveBy( -canvas->xOffset(), -canvas->yOffset() );
+ TQRect br = doc()->zoomRect( geometry/*it.current()->geometry()*/ );
br.moveBy( doc()->zoomItX( diffx ), doc()->zoomItY( diffy ) );
br.moveBy( doc()->zoomItX( -canvas->xOffset() ), doc()->zoomItY( -canvas->yOffset() ) );
- canvas->tqrepaint( br ); // Previous position
+ canvas->repaint( 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 tqgeometry = it.current()->tqgeometry();
- tqgeometry.moveBy( -canvas->xOffset(), -canvas->yOffset() );
- TQRect oldBoundingRect = doc()->zoomRect( tqgeometry );
+ KoRect geometry = it.current()->geometry();
+ geometry.moveBy( -canvas->xOffset(), -canvas->yOffset() );
+ TQRect oldBoundingRect = doc()->zoomRect( geometry );
- KoRect r = it.current()->tqgeometry();
+ KoRect r = it.current()->geometry();
r.moveBy( _move.x(), _move.y() );
it.current()->setGeometry( r );
_objects.append( it.current() );
- canvas->tqrepaint( oldBoundingRect );
+ canvas->repaint( 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)").tqarg( count );
+ objectName += TQString(" (%1)").arg( 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-tqlayout-name" ) )
+ if ( masterStyle->hasAttributeNS( KoXmlNS::style, "page-layout-name" ) )
{
- TQString masterPageLayoutStyleName = masterStyle->attributeNS( KoXmlNS::style, "page-tqlayout-name", TQString() );
+ TQString masterPageLayoutStyleName = masterStyle->attributeNS( KoXmlNS::style, "page-layout-name", TQString() );
//kdDebug()<<"masterPageLayoutStyleName :"<<masterPageLayoutStyleName<<endl;
const TQDomElement *masterLayoutStyle = oasisContext.oasisStyles().findStyle( masterPageLayoutStyleName );
if ( masterLayoutStyle )
{
//kdDebug()<<"masterLayoutStyle :"<<masterLayoutStyle<<endl;
KoStyleStack styleStack;
- styleStack.setTypeProperties( "page-tqlayout" );
+ styleStack.setTypeProperties( "page-layout" );
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() == "tqshapes" )
+ else if ( rowElement.localName() == "shapes" )
loadOasisObjects( rowElement, oasisContext );
}
}
@@ -6564,7 +6564,7 @@ void Sheet::loadOasisMasterLayoutPage( KoStyleStack &styleStack )
TQString orientation = "Portrait";
TQString format;
- // Laurent : Why we stored tqlayout information as Millimeter ?!!!!!
+ // Laurent : Why we stored layout 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" ).tqarg( width ).tqarg( height );
+ format = TQString( "%1x%2" ).arg( width ).arg( 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 tqlayout( this , doc()->styleManager()->defaultStyle() );
+ Format layout( 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 )
{
- tqlayout.setStyle( style );
+ layout.setStyle( style );
isNonDefaultColumn = true;
}
}
@@ -6799,7 +6799,7 @@ bool Sheet::loadColumnFormat(const TQDomElement& column, const KoOasisStyles& oa
{
columnFormat = this->columnFormat( indexCol );
}
- columnFormat->copy( tqlayout );
+ columnFormat->copy( layout );
++indexCol;
}
@@ -6828,7 +6828,7 @@ bool Sheet::loadRowFormat( const TQDomElement& row, int &rowIndex, KoOasisLoadin
}
styleStack.setTypeProperties( "table-row" );
- Format tqlayout( this , doc()->styleManager()->defaultStyle() );
+ Format layout( 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 )
{
- tqlayout.setStyle( style );
+ layout.setStyle( style );
isNonDefaultRow = true;
}
}
@@ -6908,7 +6908,7 @@ bool Sheet::loadRowFormat( const TQDomElement& row, int &rowIndex, KoOasisLoadin
{
rowFormat = this->rowFormat( rowIndex );
}
- rowFormat->copy( tqlayout );
+ rowFormat->copy( layout );
++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::tqcurrentDate().toString() ) );
+ t.appendChild( dd.createTextNode( TQDate::currentDate().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-tqlayout-name", d->print->saveOasisSheetStyleLayout( mainStyles ) );
+ pageMaster.addAttribute( "style:page-layout-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 tqlayout for column
+ //style default layout 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 tqlayout
+ // Load the paper layout
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 tqrepaint )
+void Sheet::emit_updateRow( RowFormat *_format, int _row, bool repaint )
{
if ( doc()->isLoading() )
return;
@@ -8081,7 +8081,7 @@ void Sheet::emit_updateRow( RowFormat *_format, int _row, bool tqrepaint )
if ( c->row() == _row )
c->setLayoutDirtyFlag( true );
- if ( tqrepaint )
+ if ( repaint )
{
//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" ).tqarg( _path ).tqarg( i++ );
+ TQString path = TQString( "%1/%2" ).arg( _path ).arg( 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:tqshapes" );
+ xmlWriter.startElement( "table:shapes" );
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]").tqarg( cell->value().asString() );
+ cellDescr += TQString(" [result: %1]").arg( cell->value().asString() );
kdDebug(36001) << cellDescr << endl;
}
}