Replaced various '#define' with actual strings - part 5

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/57/head
Michele Calgaro 12 months ago
parent d7ae9fb514
commit fb6b4d204d
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -287,7 +287,7 @@ bool KisBrush::save()
{ {
TQFile file(filename()); TQFile file(filename());
file.open(IO_WriteOnly | IO_Truncate); file.open(IO_WriteOnly | IO_Truncate);
bool ok = saveToDevice(TQT_TQIODEVICE(&file)); bool ok = saveToDevice(&file);
file.close(); file.close();
return ok; return ok;
} }

@ -265,7 +265,7 @@ bool KisImagePipeBrush::save()
{ {
TQFile file(filename()); TQFile file(filename());
file.open(IO_WriteOnly | IO_Truncate); file.open(IO_WriteOnly | IO_Truncate);
bool ok = saveToDevice(TQT_TQIODEVICE(&file)); bool ok = saveToDevice(&file);
file.close(); file.close();
return ok; return ok;
} }

@ -66,7 +66,7 @@ void KGradientSlider::paintEvent(TQPaintEvent *)
/*if (!m_dragging) {*/ /*if (!m_dragging) {*/
TQPixmap pm(size()); TQPixmap pm(size());
TQPainter p1; TQPainter p1;
p1.begin(TQT_TQPAINTDEVICE(&pm), this); p1.begin(&pm, this);
pm.fill(); pm.fill();

@ -133,7 +133,7 @@ void KCurve::paintEvent(TQPaintEvent *)
TQPixmap pm(size()); TQPixmap pm(size());
TQPainter p1; TQPainter p1;
p1.begin(TQT_TQPAINTDEVICE(&pm), this); p1.begin(&pm, this);
// draw background // draw background
if(m_pix) if(m_pix)

@ -26,7 +26,7 @@
TQPixmap KisBoundaryPainter::createPixmap(const KisBoundary& boundary, int w, int h) TQPixmap KisBoundaryPainter::createPixmap(const KisBoundary& boundary, int w, int h)
{ {
TQPixmap target(w, h); TQPixmap target(w, h);
KisCanvasPainter painter(TQT_TQPAINTDEVICE(&target)); KisCanvasPainter painter(&target);
painter.eraseRect(0, 0, w, h); painter.eraseRect(0, 0, w, h);

@ -735,7 +735,7 @@ void KisCanvasWidget::X11TabletDevice::writeSettingsToConfig()
void KisCanvasWidget::X11TabletDevice::enableEvents(TQWidget *widget) const void KisCanvasWidget::X11TabletDevice::enableEvents(TQWidget *widget) const
{ {
if (!m_eventClassList.isEmpty()) { if (!m_eventClassList.isEmpty()) {
int result = XSelectExtensionEvent(TQT_TQPAINTDEVICE(widget)->x11AppDisplay(), widget->handle(), int result = XSelectExtensionEvent(widget->x11AppDisplay(), widget->handle(),
const_cast<XEventClass*>(&m_eventClassList[0]), const_cast<XEventClass*>(&m_eventClassList[0]),
m_eventClassList.count()); m_eventClassList.count());

@ -82,7 +82,7 @@ void KisClipboard::setClip(KisPaintDeviceSP selection)
// We'll create a store (ZIP format) in memory // We'll create a store (ZIP format) in memory
TQBuffer buffer; TQBuffer buffer;
TQCString mimeType("application/x-chalk-selection"); TQCString mimeType("application/x-chalk-selection");
KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Write, mimeType ); KoStore* store = KoStore::createStore( &buffer, KoStore::Write, mimeType );
Q_ASSERT( store ); Q_ASSERT( store );
Q_ASSERT( !store->bad() ); Q_ASSERT( !store->bad() );
@ -146,7 +146,7 @@ KisPaintDeviceSP KisClipboard::clip()
if(cbData && cbData->provides(mimeType)) if(cbData && cbData->provides(mimeType))
{ {
TQBuffer buffer(cbData->encodedData(mimeType)); TQBuffer buffer(cbData->encodedData(mimeType));
KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Read, mimeType ); KoStore* store = KoStore::createStore( &buffer, KoStore::Read, mimeType );
KisProfile *profile=0; KisProfile *profile=0;
if (store->hasFile("profile.icc")) { if (store->hasFile("profile.icc")) {
@ -244,7 +244,7 @@ TQSize KisClipboard::clipSize()
if(cbData && cbData->provides(mimeType)) { if(cbData && cbData->provides(mimeType)) {
TQBuffer buffer(cbData->encodedData(mimeType)); TQBuffer buffer(cbData->encodedData(mimeType));
KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Read, mimeType ); KoStore* store = KoStore::createStore( &buffer, KoStore::Read, mimeType );
KisProfile *profile=0; KisProfile *profile=0;
if (store->hasFile("profile.icc")) { if (store->hasFile("profile.icc")) {

@ -108,7 +108,7 @@ bool KisTQPaintDeviceCanvasWidget::x11Event(XEvent *event)
KisCanvasWidgetPainter *KisTQPaintDeviceCanvasWidget::createPainter() KisCanvasWidgetPainter *KisTQPaintDeviceCanvasWidget::createPainter()
{ {
return new KisTQPaintDeviceCanvasPainter(TQT_TQPAINTDEVICE(this)); return new KisTQPaintDeviceCanvasPainter(this);
} }
#if defined(EXTENDED_X11_TABLET_SUPPORT) #if defined(EXTENDED_X11_TABLET_SUPPORT)

@ -38,7 +38,7 @@ bool KisTQPaintDeviceCanvasPainter::begin(KisCanvasWidget *canvasWidget, bool un
TQWidget *widget = dynamic_cast<TQWidget *>(canvasWidget); TQWidget *widget = dynamic_cast<TQWidget *>(canvasWidget);
if (widget != 0) { if (widget != 0) {
return m_painter.begin(TQT_TQPAINTDEVICE(widget), unclipped); return m_painter.begin(widget, unclipped);
} else { } else {
return false; return false;
} }

@ -87,7 +87,7 @@ KoFilter::ConversionStatus GenericFilter::doImport()
TQFile tempFile(temp.name()); TQFile tempFile(temp.name());
m_out = KoStore::createStore(TQT_TQIODEVICE(&tempFile), KoStore::Write); m_out = KoStore::createStore(&tempFile, KoStore::Write);
if (!m_out || !m_out->open("root")) if (!m_out || !m_out->open("root"))
{ {

@ -73,7 +73,7 @@ AiImport::convert( const TQCString& from, const TQCString& to )
TQDomDocument doc ("DOC"); TQDomDocument doc ("DOC");
KarbonAIParserBase parser; KarbonAIParserBase parser;
if (!parser.parse (*TQT_TQIODEVICE(&fileIn), doc)) if (!parser.parse(fileIn, doc))
{ {
fileIn.close(); fileIn.close();
return KoFilter::CreationError; return KoFilter::CreationError;

@ -81,7 +81,7 @@ EpsImport::convert( const TQCString& from, const TQCString& to )
if ( file.open(IO_ReadOnly) ) if ( file.open(IO_ReadOnly) )
{ {
extractor.parse (*TQT_TQIODEVICE(&file)); extractor.parse(file);
llx = extractor.llx(); llx = extractor.llx();
lly = extractor.lly(); lly = extractor.lly();
urx = extractor.urx(); urx = extractor.urx();

@ -152,7 +152,7 @@ KoFilter::ConversionStatus ImageExport::convert(const TQCString& from, const TQC
TQPixmap pixmap = TQPixmap(size); TQPixmap pixmap = TQPixmap(size);
pixmap.fill(TQt::white); pixmap.fill(TQt::white);
KivioScreenPainter kpainter; KivioScreenPainter kpainter;
kpainter.start(TQT_TQPAINTDEVICE(&pixmap)); kpainter.start(&pixmap);
float translationX = border; float translationX = border;
float translationY = border; float translationY = border;

@ -56,7 +56,7 @@ void Document::generate()
if(_file.open(IO_WriteOnly)) if(_file.open(IO_WriteOnly))
{ {
kdDebug(30522) << "GENERATION" << endl; kdDebug(30522) << "GENERATION" << endl;
_out.setDevice(TQT_TQIODEVICE(&_file)); _out.setDevice(&_file);
_document.generate(_out, !isEmbeded()); _document.generate(_out, !isEmbeded());
//_out << getDocument(); //_out << getDocument();
_file.close(); _file.close();

@ -43,7 +43,7 @@ KoFilter::ConversionStatus KugarNOPImport::convert( const TQCString& /*from*/, c
} }
KoDocument *doc=m_chain->outputDocument(); KoDocument *doc=m_chain->outputDocument();
doc->loadXML(TQT_TQIODEVICE(&in),TQDomDocument()); doc->loadXML(&in,TQDomDocument());
in.close(); in.close();
doc->resetURL(); doc->resetURL();

@ -72,7 +72,7 @@ bool AmiProWorker::doCloseFile(void)
if( !out.open( IO_WriteOnly ) ) if( !out.open( IO_WriteOnly ) )
return FALSE; return FALSE;
TQTextStream stream; TQTextStream stream;
stream.setDevice( TQT_TQIODEVICE(&out) ); stream.setDevice( &out );
stream << result; stream << result;
return TRUE; return TRUE;
} }

@ -134,7 +134,7 @@ bool AmiProParser::process( const TQString& filename )
return setResult( FileError ); return setResult( FileError );
TQTextStream stream; TQTextStream stream;
stream.setDevice( TQT_TQIODEVICE(&in) ); stream.setDevice( &in );
// the first should be "[ver]" // the first should be "[ver]"
line = stream.readLine(); line = stream.readLine();

@ -120,7 +120,7 @@ private:
bool ASCIIWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*/) bool ASCIIWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*/)
{ {
m_ioDevice = TQT_TQIODEVICE(new TQFile(filenameOut)); m_ioDevice = new TQFile(filenameOut);
if (!m_ioDevice) if (!m_ioDevice)
{ {

@ -172,7 +172,7 @@ TQByteArray HancomWordImport::Private::createContent()
TQBuffer contentBuffer( contentData ); TQBuffer contentBuffer( contentData );
contentBuffer.open( IO_WriteOnly ); contentBuffer.open( IO_WriteOnly );
contentWriter = new KoXmlWriter( TQT_TQIODEVICE(&contentBuffer) ); contentWriter = new KoXmlWriter( &contentBuffer );
contentWriter->startDocument( "office:document-content" ); contentWriter->startDocument( "office:document-content" );
contentWriter->startElement( "office:document-content" ); contentWriter->startElement( "office:document-content" );
@ -224,7 +224,7 @@ TQByteArray HancomWordImport::Private::createStyles()
TQBuffer stylesBuffer( stylesData ); TQBuffer stylesBuffer( stylesData );
stylesBuffer.open( IO_WriteOnly ); stylesBuffer.open( IO_WriteOnly );
stylesWriter = new KoXmlWriter( TQT_TQIODEVICE(&stylesBuffer) ); stylesWriter = new KoXmlWriter( &stylesBuffer );
stylesWriter->startDocument( "office:document-styles" ); stylesWriter->startDocument( "office:document-styles" );
stylesWriter->startElement( "office:document-styles" ); stylesWriter->startElement( "office:document-styles" );
@ -280,7 +280,7 @@ TQByteArray HancomWordImport::Private::createManifest()
TQBuffer manifestBuffer( manifestData ); TQBuffer manifestBuffer( manifestData );
manifestBuffer.open( IO_WriteOnly ); manifestBuffer.open( IO_WriteOnly );
manifestWriter = new KoXmlWriter( TQT_TQIODEVICE(&manifestBuffer) ); manifestWriter = new KoXmlWriter( &manifestBuffer );
manifestWriter->startDocument( "manifest:manifest" ); manifestWriter->startDocument( "manifest:manifest" );
manifestWriter->startElement( "manifest:manifest" ); manifestWriter->startElement( "manifest:manifest" );

@ -472,7 +472,7 @@ bool HtmlWorker::doFullParagraph(const TQString& paraText,
bool HtmlWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*/) bool HtmlWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*/)
{ {
m_ioDevice=TQT_TQIODEVICE(new TQFile(filenameOut)); m_ioDevice=new TQFile(filenameOut);
if (!m_ioDevice) if (!m_ioDevice)
{ {

@ -199,7 +199,7 @@ KoFilter::ConversionStatus KWord13Import::convert( const TQCString& from, const
TQFile file( fileName ); TQFile file( fileName );
file.open( IO_ReadOnly ); file.open( IO_ReadOnly );
if ( ! parseRoot( TQT_TQIODEVICE(&file), kwordDocument ) ) if ( ! parseRoot( &file, kwordDocument ) )
{ {
kdError(30520) << "Could not process document! Aborting!" << endl; kdError(30520) << "Could not process document! Aborting!" << endl;
file.close(); file.close();

@ -107,7 +107,7 @@ void KWord13OasisGenerator::preparePageLayout( void )
// ### TODO: test // ### TODO: test
TQBuffer buffer; TQBuffer buffer;
buffer.open( IO_WriteOnly ); buffer.open( IO_WriteOnly );
KoXmlWriter element ( TQT_TQIODEVICE(&buffer) ); KoXmlWriter element ( &buffer );
element.startElement("style:columns"); element.startElement("style:columns");
element.addAttribute( "fo:column-count", columns ); element.addAttribute( "fo:column-count", columns );
element.addAttributePt( "fo:column-gap", positiveNumberOrNull( m_kwordDocument->getProperty( "PAPER:columnspacing", "PAPER:ptColumnspc" ) ) ); element.addAttributePt( "fo:column-gap", positiveNumberOrNull( m_kwordDocument->getProperty( "PAPER:columnspacing", "PAPER:ptColumnspc" ) ) );
@ -932,7 +932,7 @@ bool KWord13OasisGenerator::generate ( const TQString& fileName, KWord13Document
TQByteArray manifestData; TQByteArray manifestData;
TQBuffer manifestBuffer( manifestData ); TQBuffer manifestBuffer( manifestData );
manifestBuffer.open( IO_WriteOnly ); manifestBuffer.open( IO_WriteOnly );
m_manifestWriter = new KoXmlWriter( TQT_TQIODEVICE(&manifestBuffer) ); m_manifestWriter = new KoXmlWriter( &manifestBuffer );
m_manifestWriter->startDocument( "manifest:manifest" ); m_manifestWriter->startDocument( "manifest:manifest" );
m_manifestWriter->startElement( "manifest:manifest" ); m_manifestWriter->startElement( "manifest:manifest" );
m_manifestWriter->addAttribute( "xmlns:manifest", "urn:oasis:names:tc:openoffice:xmlns:manifest:1.0" ); m_manifestWriter->addAttribute( "xmlns:manifest", "urn:oasis:names:tc:openoffice:xmlns:manifest:1.0" );

@ -60,7 +60,7 @@ void Xml2LatexParser::generate()
if(_file.open(IO_WriteOnly)) if(_file.open(IO_WriteOnly))
{ {
kdDebug(30522) << "GENERATION" << endl; kdDebug(30522) << "GENERATION" << endl;
_out.setDevice(TQT_TQIODEVICE(&_file)); _out.setDevice(&_file);
if(!Config::instance()->isEmbeded()) if(!Config::instance()->isEmbeded())
FileHeader::instance()->generate(_out); FileHeader::instance()->generate(_out);
_document.generate(_out, !Config::instance()->isEmbeded()); _document.generate(_out, !Config::instance()->isEmbeded());

@ -136,7 +136,7 @@ bool KWEFBaseWorker::loadAndConvertToImage(const TQString& strName, const TQStri
return false; return false;
} }
imageIO.setIODevice(TQT_TQIODEVICE(&buffer)); imageIO.setIODevice(&buffer);
imageIO.setFormat(outExtension.utf8()); imageIO.setFormat(outExtension.utf8());
if (!imageIO.write()) if (!imageIO.write())

@ -1413,7 +1413,7 @@ KoFilter::ConversionStatus KWEFKWordLeader::convert( KoFilterChain* chain,
else else
{ {
TQFile file( filename ); TQFile file( filename );
if ( ! ProcessStoreFile( TQT_TQIODEVICE(&file), ProcessDocTag, this ) ) if ( ! ProcessStoreFile( &file, ProcessDocTag, this ) )
{ {
kdError(30508) << "Could not process document! Aborting!" << endl; kdError(30508) << "Could not process document! Aborting!" << endl;
doAbortFile(); doAbortFile();

@ -1188,7 +1188,7 @@ public:
outBuffer.open (IO_WriteOnly); outBuffer.open (IO_WriteOnly);
// write BMP // write BMP
imageIO.setIODevice (TQT_TQIODEVICE(&outBuffer)); imageIO.setIODevice (&outBuffer);
imageIO.setFormat ("BMP"); imageIO.setFormat ("BMP");
if (!imageIO.write ()) if (!imageIO.write ())
{ {

@ -1400,7 +1400,7 @@ bool OOWriterWorker::makePicture( const FrameAnchor& anchor, const AnchorType an
TQBuffer buffer( image.copy() ); // Be more safe than sorry and do not allow shallow copy TQBuffer buffer( image.copy() ); // Be more safe than sorry and do not allow shallow copy
KoPicture pic; KoPicture pic;
buffer.open( IO_ReadOnly ); buffer.open( IO_ReadOnly );
if ( pic.load( TQT_TQIODEVICE(&buffer), strExtension ) ) if ( pic.load( &buffer, strExtension ) )
{ {
const TQSize size ( pic.getOriginalSize() ); const TQSize size ( pic.getOriginalSize() );
height = size.height(); height = size.height();

@ -888,7 +888,7 @@ bool RTFWorker::doFooter(const FooterData& footer)
bool RTFWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*/) bool RTFWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*/)
{ {
m_ioDevice=TQT_TQIODEVICE(new TQFile(filenameOut)); m_ioDevice=new TQFile(filenameOut);
if (!m_ioDevice) if (!m_ioDevice)
{ {

@ -71,7 +71,7 @@ bool WMLWorker::doCloseFile(void)
if( !out.open( IO_WriteOnly ) ) if( !out.open( IO_WriteOnly ) )
return FALSE; return FALSE;
TQTextStream stream; TQTextStream stream;
stream.setDevice( TQT_TQIODEVICE(&out) ); stream.setDevice( &out );
stream << result; stream << result;
return TRUE; return TRUE;
} }

@ -429,7 +429,7 @@ WMLLayout& WMLLayout::operator=( const WMLLayout& l )
void WMLParser::parse( const char* filename ) void WMLParser::parse( const char* filename )
{ {
TQFile f( filename ); TQFile f( filename );
TQXmlInputSource source( TQT_TQIODEVICE(&f) ); TQXmlInputSource source( &f );
TQXmlSimpleReader reader; TQXmlSimpleReader reader;
WMLHandler handler( this ); WMLHandler handler( this );
reader.setContentHandler( &handler ); reader.setContentHandler( &handler );

@ -200,7 +200,7 @@ VGradient::saveOasis( KoGenStyles &mainStyles ) const
gradientStyle.addAttribute( "svg:spreadMethod", "pad" ); gradientStyle.addAttribute( "svg:spreadMethod", "pad" );
TQBuffer buffer; TQBuffer buffer;
buffer.open( IO_WriteOnly ); buffer.open( IO_WriteOnly );
KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
// save stops // save stops
VColorStop* colorstop; VColorStop* colorstop;

@ -175,7 +175,7 @@ VDocumentPreview::paintEvent( TQPaintEvent* )
{ {
delete m_docpixmap; delete m_docpixmap;
m_docpixmap = new TQPixmap( width(), height() ); m_docpixmap = new TQPixmap( width(), height() );
VKoPainter p( TQT_TQPAINTDEVICE(m_docpixmap), width(), height() ); VKoPainter p( m_docpixmap, width(), height() );
p.clear( TQColor( 195, 194, 193 ) ); p.clear( TQColor( 195, 194, 193 ) );
p.setWorldMatrix( TQWMatrix( 1, 0, 0, -1, xoffset * scaleFactor, height() - yoffset * scaleFactor ) ); p.setWorldMatrix( TQWMatrix( 1, 0, 0, -1, xoffset * scaleFactor, height() - yoffset * scaleFactor ) );
p.setZoomFactor( scaleFactor ); p.setZoomFactor( scaleFactor );
@ -334,7 +334,7 @@ VObjectListViewItem::update()
// draw thumb preview (16x16) // draw thumb preview (16x16)
TQPixmap preview; TQPixmap preview;
preview.resize( 16, 16 ); preview.resize( 16, 16 );
VKoPainter p( TQT_TQPAINTDEVICE(&preview), 16, 16, false ); VKoPainter p( &preview, 16, 16, false );
// Y mirroring // Y mirroring
TQWMatrix mat; TQWMatrix mat;
mat.scale( 1, -1 ); mat.scale( 1, -1 );
@ -390,7 +390,7 @@ VLayerListViewItem::update()
// draw thumb preview (16x16) // draw thumb preview (16x16)
TQPixmap preview; TQPixmap preview;
preview.resize( 16, 16 ); preview.resize( 16, 16 );
VKoPainter p( TQT_TQPAINTDEVICE(&preview), 16, 16, false ); VKoPainter p( &preview, 16, 16, false );
// Y mirroring // Y mirroring
TQWMatrix mat; TQWMatrix mat;
mat.scale( 1, -1 ); mat.scale( 1, -1 );

@ -377,7 +377,7 @@ KarbonPart::saveOasis( KoStore *store, KoXmlWriter *manifestWriter )
KTempFile contentTmpFile; KTempFile contentTmpFile;
contentTmpFile.setAutoDelete( true ); contentTmpFile.setAutoDelete( true );
TQFile* tmpFile = contentTmpFile.file(); TQFile* tmpFile = contentTmpFile.file();
KoXmlWriter contentTmpWriter( TQT_TQIODEVICE(tmpFile), 1 ); KoXmlWriter contentTmpWriter( tmpFile, 1 );
contentTmpWriter.startElement( "office:body" ); contentTmpWriter.startElement( "office:body" );
contentTmpWriter.startElement( "office:drawing" ); contentTmpWriter.startElement( "office:drawing" );
@ -398,7 +398,7 @@ KarbonPart::saveOasis( KoStore *store, KoXmlWriter *manifestWriter )
// And now we can copy over the contents from the tempfile to the real one // And now we can copy over the contents from the tempfile to the real one
tmpFile->close(); tmpFile->close();
docWriter->addCompleteElement( TQT_TQIODEVICE(tmpFile) ); docWriter->addCompleteElement( tmpFile );
contentTmpFile.close(); contentTmpFile.close();
docWriter->endElement(); // Root element docWriter->endElement(); // Root element

@ -510,7 +510,7 @@ VClipartIconItem::VClipartIconItem( const VObject* clipart, double width, double
m_clipart->setState( VObject::normal ); m_clipart->setState( VObject::normal );
m_pixmap.resize( 64, 64 ); m_pixmap.resize( 64, 64 );
VKoPainter p( TQT_TQPAINTDEVICE(&m_pixmap), 64, 64 ); VKoPainter p( &m_pixmap, 64, 64 );
TQWMatrix mat( 64., 0, 0, 64., 0, 0 ); TQWMatrix mat( 64., 0, 0, 64., 0, 0 );
VTransformCmd trafo( 0L, mat ); VTransformCmd trafo( 0L, mat );
@ -524,7 +524,7 @@ VClipartIconItem::VClipartIconItem( const VObject* clipart, double width, double
p.end(); p.end();
m_thumbPixmap.resize( 32, 32 ); m_thumbPixmap.resize( 32, 32 );
VKoPainter p2( TQT_TQPAINTDEVICE(&m_thumbPixmap), 32, 32 ); VKoPainter p2( &m_thumbPixmap, 32, 32 );
mat.setMatrix( 32., 0, 0, 32., 0, 0 ); mat.setMatrix( 32., 0, 0, 32., 0, 0 );
trafo.setMatrix( mat ); trafo.setMatrix( mat );

@ -177,8 +177,8 @@ KarbonView::KarbonView( KarbonPart* p, TQWidget* parent, const char* name )
// set up factory // set up factory
m_painterFactory = new VPainterFactory; m_painterFactory = new VPainterFactory;
m_painterFactory->setPainter( TQT_TQPAINTDEVICE(canvasWidget()->pixmap()), width(), height() ); m_painterFactory->setPainter( canvasWidget()->pixmap(), width(), height() );
m_painterFactory->setEditPainter( TQT_TQPAINTDEVICE(canvasWidget()->viewport()), width(), height() ); m_painterFactory->setEditPainter( canvasWidget()->viewport(), width(), height() );
if( shell() ) if( shell() )
{ {
@ -759,9 +759,9 @@ KarbonView::viewModeChanged()
canvasWidget()->pixmap()->fill(); canvasWidget()->pixmap()->fill();
if( m_viewAction->currentItem() == 1 ) if( m_viewAction->currentItem() == 1 )
m_painterFactory->setWireframePainter( TQT_TQPAINTDEVICE(canvasWidget()->pixmap()), width(), height() ); m_painterFactory->setWireframePainter( canvasWidget()->pixmap(), width(), height() );
else else
m_painterFactory->setPainter( TQT_TQPAINTDEVICE(canvasWidget()->pixmap()), width(), height() ); m_painterFactory->setPainter( canvasWidget()->pixmap(), width(), height() );
m_canvas->repaintAll(); m_canvas->repaintAll();
} }

@ -112,7 +112,7 @@ ShadowPreview::paintEvent( TQPaintEvent* )
int a = 360 - m_parent->shadowAngle(); int a = 360 - m_parent->shadowAngle();
TQPixmap pm( w, h ); TQPixmap pm( w, h );
VKoPainter p( TQT_TQPAINTDEVICE(&pm), w, h ); VKoPainter p( &pm, w, h );
VColor color( VColor::rgb ); VColor color( VColor::rgb );
VFill fill; VFill fill;

@ -43,7 +43,7 @@ VGradientListItem::VGradientListItem( const VGradient& gradient, TQString filena
m_gradient = new VGradient( gradient ); m_gradient = new VGradient( gradient );
m_pixmap.resize( 200, 16 ); m_pixmap.resize( 200, 16 );
VKoPainter gp( TQT_TQPAINTDEVICE(&m_pixmap), m_pixmap.width(), m_pixmap.height() ); VKoPainter gp( &m_pixmap, m_pixmap.width(), m_pixmap.height() );
gp.setRasterOp( TQt::XorROP ); gp.setRasterOp( TQt::XorROP );
gp.newPath(); gp.newPath();
VGradient grad( *m_gradient ); VGradient grad( *m_gradient );
@ -114,7 +114,7 @@ VGradientPreview::~VGradientPreview()
void VGradientPreview::paintEvent( TQPaintEvent* ) void VGradientPreview::paintEvent( TQPaintEvent* )
{ {
TQPixmap pixmap( width(), height() ); TQPixmap pixmap( width(), height() );
VKoPainter gp( TQT_TQPAINTDEVICE(&pixmap), width(), height() ); VKoPainter gp( &pixmap, width(), height() );
gp.setRasterOp( TQt::XorROP ); gp.setRasterOp( TQt::XorROP );
gp.newPath(); gp.newPath();
VGradient gradient( *m_gradient ); VGradient gradient( *m_gradient );

@ -96,7 +96,7 @@ void VGradientWidget::paintEvent( TQPaintEvent* )
int gh = h - ph; // gradient area height int gh = h - ph; // gradient area height
TQPixmap pixmap( width(), height() ); TQPixmap pixmap( width(), height() );
VKoPainter gp( TQT_TQPAINTDEVICE(&pixmap), width(), height() ); VKoPainter gp( &pixmap, width(), height() );
gp.setRasterOp( TQt::XorROP ); gp.setRasterOp( TQt::XorROP );
VGradient gradient( *m_gradient ); VGradient gradient( *m_gradient );
gradient.setType( VGradient::linear ); gradient.setType( VGradient::linear );

@ -97,7 +97,7 @@ VSmallPreview::drawFill( const VFill &f )
TQPixmap m_pixmap; TQPixmap m_pixmap;
m_pixmap.resize( m_fillFrame->width(), m_fillFrame->height() ); m_pixmap.resize( m_fillFrame->width(), m_fillFrame->height() );
VKoPainter* m_painter = new VKoPainter( TQT_TQPAINTDEVICE(&m_pixmap), m_fillFrame->width(), m_fillFrame->height() ); VKoPainter* m_painter = new VKoPainter( &m_pixmap, m_fillFrame->width(), m_fillFrame->height() );
m_painter->begin(); m_painter->begin();
m_painter->setPen( TQt::NoPen ); m_painter->setPen( TQt::NoPen );
@ -192,7 +192,7 @@ VSmallPreview::drawStroke( const VStroke &s )
TQPixmap m_pixmap; TQPixmap m_pixmap;
m_pixmap.resize( m_fillFrame->width(), m_fillFrame->height() ); m_pixmap.resize( m_fillFrame->width(), m_fillFrame->height() );
VKoPainter* m_painter = new VKoPainter( TQT_TQPAINTDEVICE(&m_pixmap), m_fillFrame->width(), m_fillFrame->height() ); VKoPainter* m_painter = new VKoPainter( &m_pixmap, m_fillFrame->width(), m_fillFrame->height() );
m_painter->begin(); m_painter->begin();
m_painter->setPen( TQt::NoPen ); m_painter->setPen( TQt::NoPen );

@ -62,7 +62,7 @@ VStrokeFillPreview::VStrokeFillPreview(
installEventFilter( this ); installEventFilter( this );
m_pixmap.resize( int( PANEL_SIZEX ), int( PANEL_SIZEY ) ); m_pixmap.resize( int( PANEL_SIZEX ), int( PANEL_SIZEY ) );
m_painter = new VKoPainter( TQT_TQPAINTDEVICE(&m_pixmap), uint( PANEL_SIZEX ), uint( PANEL_SIZEY ) ); m_painter = new VKoPainter( &m_pixmap, uint( PANEL_SIZEX ), uint( PANEL_SIZEY ) );
} }
VStrokeFillPreview::~VStrokeFillPreview() VStrokeFillPreview::~VStrokeFillPreview()

@ -300,7 +300,7 @@ void KexiUtils::drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect,
} }
pixmapBuffer.convertFromImage(img); pixmapBuffer.convertFromImage(img);
if (!fast) { if (!fast) {
p2.begin(TQT_TQPAINTDEVICE(&pixmapBuffer), p.device()); p2.begin(&pixmapBuffer, p.device());
} }
else else
target->drawPixmap(pos, pixmapBuffer); target->drawPixmap(pos, pixmapBuffer);
@ -308,7 +308,7 @@ void KexiUtils::drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect,
else { else {
if (!fast) { if (!fast) {
pixmapBuffer.resize(rect.size()-TQSize(lineWidth, lineWidth)); pixmapBuffer.resize(rect.size()-TQSize(lineWidth, lineWidth));
p2.begin(TQT_TQPAINTDEVICE(&pixmapBuffer), p.device()); p2.begin(&pixmapBuffer, p.device());
p2.drawPixmap(TQRect(rect.x(), rect.y(), w, h), pixmap); p2.drawPixmap(TQRect(rect.x(), rect.y(), w, h), pixmap);
} }
else else

@ -52,7 +52,7 @@ void KexiSimplePrintPreviewView::paintEvent( TQPaintEvent *pe )
return; return;
TQPixmap pm(size()); //dbl buffered TQPixmap pm(size()); //dbl buffered
TQPainter p; TQPainter p;
p.begin(TQT_TQPAINTDEVICE(&pm), this); p.begin(&pm, this);
//! @todo only for screen! //! @todo only for screen!
p.fillRect(TQRect(TQPoint(0,0),pm.size()), TQBrush(white));//pe->rect(), TQBrush(white)); p.fillRect(TQRect(TQPoint(0,0),pm.size()), TQBrush(white));//pe->rect(), TQBrush(white));
if (m_window->currentPage()>=0) if (m_window->currentPage()>=0)

@ -148,7 +148,7 @@ void
KexiDBForm::drawRects(const TQValueList<TQRect> &list, int type) KexiDBForm::drawRects(const TQValueList<TQRect> &list, int type)
{ {
TQPainter p; TQPainter p;
p.begin(TQT_TQPAINTDEVICE(this), true); p.begin(this, true);
bool unclipped = testWFlags( WPaintUnclipped ); bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped ); setWFlags( WPaintUnclipped );
@ -192,7 +192,7 @@ void
KexiDBForm::clearForm() KexiDBForm::clearForm()
{ {
TQPainter p; TQPainter p;
p.begin(TQT_TQPAINTDEVICE(this), true); p.begin(this, true);
bool unclipped = testWFlags( WPaintUnclipped ); bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped ); setWFlags( WPaintUnclipped );
@ -216,7 +216,7 @@ KexiDBForm::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint &poi
toPoint = to->parentWidget()->mapTo(this, to->pos()); toPoint = to->parentWidget()->mapTo(this, to->pos());
TQPainter p; TQPainter p;
p.begin(TQT_TQPAINTDEVICE(this), true); p.begin(this, true);
bool unclipped = testWFlags( WPaintUnclipped ); bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped ); setWFlags( WPaintUnclipped );

@ -640,7 +640,7 @@ void KexiDBImageBox::paintEvent( TQPaintEvent *pe )
if (m_designMode && pixmap().isNull()) { if (m_designMode && pixmap().isNull()) {
TQPixmap pm(size()-TQSize(m, m)); TQPixmap pm(size()-TQSize(m, m));
TQPainter p2; TQPainter p2;
p2.begin(TQT_TQPAINTDEVICE(&pm), this); p2.begin(&pm, this);
p2.fillRect(0,0,width(),height(), bg); p2.fillRect(0,0,width(),height(), bg);
updatePixmap(); updatePixmap();

@ -98,16 +98,16 @@ KexiFlowLayout::~KexiFlowLayout()
void void
KexiFlowLayout::addItem(TQLayoutItem *item) KexiFlowLayout::addItem(TQLayoutItem *item)
{ {
m_list.append(TQT_TQLAYOUTITEM(item)); m_list.append(item);
} }
void void
KexiFlowLayout::addSpacing(int size) KexiFlowLayout::addSpacing(int size)
{ {
if (m_orientation ==TQt::Horizontal) if (m_orientation ==TQt::Horizontal)
addItem( TQT_TQLAYOUTITEM(new TQSpacerItem( size, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum )) ); addItem( new TQSpacerItem( size, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum ) );
else else
addItem( TQT_TQLAYOUTITEM(new TQSpacerItem( 0, size, TQSizePolicy::Minimum, TQSizePolicy::Fixed )) ); addItem( new TQSpacerItem( 0, size, TQSizePolicy::Minimum, TQSizePolicy::Fixed ) );
} }
TQLayoutIterator TQLayoutIterator

@ -104,7 +104,7 @@ bool KFormulaDoc::saveOasis( KoStore* store, KoXmlWriter* manifestWriter )
formula->saveMathML( stream, true ); formula->saveMathML( stream, true );
tmpFile->close(); tmpFile->close();
contentWriter->addCompleteElement( TQT_TQIODEVICE(tmpFile) ); contentWriter->addCompleteElement( tmpFile );
contentTmpFile.close(); contentTmpFile.close();

@ -331,7 +331,7 @@ void KivioCanvas::paintEvent( TQPaintEvent* ev )
// Draw content // Draw content
KivioScreenPainter kpainter; KivioScreenPainter kpainter;
kpainter.start(TQT_TQPAINTDEVICE(m_buffer)); kpainter.start(m_buffer);
kpainter.translateBy(-m_iXOffset + m_pageOffsetX, -m_iYOffset + m_pageOffsetY); kpainter.translateBy(-m_iXOffset + m_pageOffsetX, -m_iYOffset + m_pageOffsetY);
m_pDoc->paintContent(kpainter, paintRect, false, page, TQPoint(0, 0), m_pView->zoomHandler(), showConnectorTargets(), true); m_pDoc->paintContent(kpainter, paintRect, false, page, TQPoint(0, 0), m_pView->zoomHandler(), showConnectorTargets(), true);
kpainter.stop(); kpainter.stop();
@ -706,7 +706,7 @@ void KivioCanvas::beginUnclippedSpawnerPainter()
unclippedSpawnerPainter = new KivioScreenPainter(); unclippedSpawnerPainter = new KivioScreenPainter();
// Tell it to start (allocates a Qpainter object) // Tell it to start (allocates a Qpainter object)
unclippedSpawnerPainter->start(TQT_TQPAINTDEVICE(this)); unclippedSpawnerPainter->start(this);
// Uhhhhh?? // Uhhhhh??
if( !unclipped ) if( !unclipped )

@ -204,7 +204,7 @@ void KivioPage::saveOasis(KoStore* /*store*/, KoXmlWriter* docWriter, KoGenStyle
TQBuffer layerBuffer; TQBuffer layerBuffer;
layerBuffer.open(IO_WriteOnly); layerBuffer.open(IO_WriteOnly);
KoXmlWriter layerWriter(TQT_TQIODEVICE(&layerBuffer)); KoXmlWriter layerWriter(&layerBuffer);
layerWriter.startElement("draw:layer-set"); layerWriter.startElement("draw:layer-set");
// Iterate through all layers // Iterate through all layers

@ -160,7 +160,7 @@ TQByteArray KivioDragObject::imageEncoded(const char* mimetype) const
TQPixmap buffer(zoomHandler.zoomItX(m_stencilRect.width()), zoomHandler.zoomItY(m_stencilRect.height())); TQPixmap buffer(zoomHandler.zoomItX(m_stencilRect.width()), zoomHandler.zoomItY(m_stencilRect.height()));
buffer.fill(TQt::white); buffer.fill(TQt::white);
KivioScreenPainter p; KivioScreenPainter p;
p.start( TQT_TQPAINTDEVICE(&buffer) ); p.start( &buffer );
p.setTranslation(-zoomHandler.zoomItX(m_stencilRect.x()), -zoomHandler.zoomItY(m_stencilRect.y())); p.setTranslation(-zoomHandler.zoomItX(m_stencilRect.x()), -zoomHandler.zoomItY(m_stencilRect.y()));
KivioIntraStencilData data; KivioIntraStencilData data;
data.painter = &p; data.painter = &p;

@ -1305,7 +1305,7 @@ TQPixmap Kivio::generatePixmapFromStencil(int width, int height, KivioStencil* s
TQPixmap pix(width, height); TQPixmap pix(width, height);
pix.fill(TQt::white); pix.fill(TQt::white);
KivioScreenPainter kpainter; KivioScreenPainter kpainter;
kpainter.start(TQT_TQPAINTDEVICE(&pix)); kpainter.start(&pix);
kpainter.translateBy(-rect.x() + ((width - rect.width()) / 2), -rect.y() + ((height - rect.height()) / 2)); kpainter.translateBy(-rect.x() + ((width - rect.width()) / 2), -rect.y() + ((height - rect.height()) / 2));
KivioIntraStencilData data; KivioIntraStencilData data;
data.painter = &kpainter; data.painter = &kpainter;

@ -150,7 +150,7 @@ void KivioBirdEyePanel::updateView()
TQRect rect(TQPoint(0,0),s1); TQRect rect(TQPoint(0,0),s1);
KivioScreenPainter kpainter; KivioScreenPainter kpainter;
kpainter.start(TQT_TQPAINTDEVICE(m_buffer)); kpainter.start(m_buffer);
kpainter.painter()->fillRect(rect, TDEApplication::palette().active().brush(TQColorGroup::Mid)); kpainter.painter()->fillRect(rect, TDEApplication::palette().active().brush(TQColorGroup::Mid));
kpainter.painter()->fillRect(px0, py0, pw, ph, white); kpainter.painter()->fillRect(px0, py0, pw, ph, white);

@ -985,7 +985,7 @@ void View::slotExportGantt() {
TQString fn = KFileDialog::getSaveFileName( TQString(), TQString(), this ); TQString fn = KFileDialog::getSaveFileName( TQString(), TQString(), this );
if (!fn.isEmpty()) { if (!fn.isEmpty()) {
TQFile f(fn); TQFile f(fn);
m_ganttview->exportGantt(TQT_TQIODEVICE(&f)); m_ganttview->exportGantt(&f);
} }
} }

@ -452,7 +452,7 @@ void KPrBackGround::load( const TQDomElement &element )
TQByteArray rawData=_data.utf8(); // XPM is normally ASCII, therefore UTF-8 TQByteArray rawData=_data.utf8(); // XPM is normally ASCII, therefore UTF-8
rawData[rawData.size()-1]=char(10); // Replace the NULL character by a LINE FEED rawData[rawData.size()-1]=char(10); // Replace the NULL character by a LINE FEED
TQBuffer buffer(rawData); TQBuffer buffer(rawData);
backPicture.loadXpm(TQT_TQIODEVICE(&buffer)); backPicture.loadXpm(&buffer);
} }
#if 0 #if 0

@ -291,7 +291,7 @@ void KPrCanvas::paintEvent( TQPaintEvent* paintEvent )
{ {
//kdDebug(33001) << "KPrCanvas::paintEvent" << endl; //kdDebug(33001) << "KPrCanvas::paintEvent" << endl;
TQPainter bufPainter; TQPainter bufPainter;
bufPainter.begin( TQT_TQPAINTDEVICE(&buffer), this ); // double-buffering - (the buffer is as big as the widget) bufPainter.begin( &buffer, this ); // double-buffering - (the buffer is as big as the widget)
bufPainter.translate( -diffx(), -diffy() ); bufPainter.translate( -diffx(), -diffy() );
bufPainter.setBrushOrigin( -diffx(), -diffy() ); bufPainter.setBrushOrigin( -diffx(), -diffy() );
@ -3107,7 +3107,7 @@ bool KPrCanvas::pNext( bool gotoNextPage )
if ( m_pageEffect ) if ( m_pageEffect )
finishPageEffect(); finishPageEffect();
m_pageEffect = new KPrPageEffects( TQT_TQPAINTDEVICE(this), _pix2, _pageEffect, page->getPageEffectSpeed() ); m_pageEffect = new KPrPageEffects( this, _pix2, _pageEffect, page->getPageEffectSpeed() );
if ( m_pageEffect->doEffect() ) if ( m_pageEffect->doEffect() )
{ {
delete m_pageEffect; delete m_pageEffect;
@ -3438,7 +3438,7 @@ void KPrCanvas::doObjEffects( bool isAllreadyPainted )
} }
//TODO add global presentation speed //TODO add global presentation speed
m_effectHandler = new KPrEffectHandler( m_step, goingBack, TQT_TQPAINTDEVICE(this), &screen_orig, allObjects, m_view, 1 ); m_effectHandler = new KPrEffectHandler( m_step, goingBack, this, &screen_orig, allObjects, m_view, 1 );
if ( m_effectHandler->doEffect() ) if ( m_effectHandler->doEffect() )
{ {
delete m_effectHandler; delete m_effectHandler;
@ -4141,7 +4141,7 @@ void KPrCanvas::copyOasisObjs()
TQDragObject* dragObject = kd; TQDragObject* dragObject = kd;
TQByteArray arr; TQByteArray arr;
TQBuffer buffer(arr); TQBuffer buffer(arr);
KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Write, "application/vnd.oasis.opendocument.presentation" ); KoStore* store = KoStore::createStore( &buffer, KoStore::Write, "application/vnd.oasis.opendocument.presentation" );
delete store; delete store;
kd->setEncodedData( arr ); kd->setEncodedData( arr );
@ -4163,7 +4163,7 @@ void KPrCanvas::copyObjs()
TQDragObject* dragObject = kd; TQDragObject* dragObject = kd;
TQByteArray arr; TQByteArray arr;
TQBuffer buffer(arr); TQBuffer buffer(arr);
KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Write, "application/x-kpresenter" ); KoStore* store = KoStore::createStore( &buffer, KoStore::Write, "application/x-kpresenter" );
m_activePage->getAllEmbeddedObjectSelected(embeddedObjectsActivePage ); m_activePage->getAllEmbeddedObjectSelected(embeddedObjectsActivePage );

@ -1895,7 +1895,7 @@ KoTextCursor * KPrOasisPasteTextCommand::execute( KoTextCursor *c )
c->setIndex( m_idx ); c->setIndex( m_idx );
TQBuffer buffer( m_data ); TQBuffer buffer( m_data );
KoStore * store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Read ); KoStore * store = KoStore::createStore( &buffer, KoStore::Read );
if ( store->bad() || !store->hasFile( "content.xml" ) ) if ( store->bad() || !store->hasFile( "content.xml" ) )
{ {

@ -1019,14 +1019,14 @@ bool KPrDocument::saveOasis( KoStore* store, KoXmlWriter* manifestWriter )
KTempFile contentTmpFile; KTempFile contentTmpFile;
contentTmpFile.setAutoDelete( true ); contentTmpFile.setAutoDelete( true );
TQFile* tmpFile = contentTmpFile.file(); TQFile* tmpFile = contentTmpFile.file();
KoXmlWriter contentTmpWriter( TQT_TQIODEVICE(tmpFile), 1 ); KoXmlWriter contentTmpWriter( tmpFile, 1 );
//For sticky objects //For sticky objects
KTempFile stickyTmpFile; KTempFile stickyTmpFile;
stickyTmpFile.setAutoDelete( true ); stickyTmpFile.setAutoDelete( true );
TQFile* masterStyles = stickyTmpFile.file(); TQFile* masterStyles = stickyTmpFile.file();
KoXmlWriter stickyTmpWriter( TQT_TQIODEVICE(masterStyles), 1 ); KoXmlWriter stickyTmpWriter( masterStyles, 1 );
contentTmpWriter.startElement( "office:body" ); contentTmpWriter.startElement( "office:body" );
@ -1083,7 +1083,7 @@ bool KPrDocument::saveOasis( KoStore* store, KoXmlWriter* manifestWriter )
// And now we can copy over the contents from the tempfile to the real one // And now we can copy over the contents from the tempfile to the real one
tmpFile->close(); tmpFile->close();
contentWriter->addCompleteElement( TQT_TQIODEVICE(tmpFile) ); contentWriter->addCompleteElement( tmpFile );
contentTmpFile.close(); contentTmpFile.close();
contentWriter->endElement(); // root element contentWriter->endElement(); // root element
@ -1552,7 +1552,7 @@ void KPrDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyl
if ( masterStyles ) if ( masterStyles )
{ {
stylesWriter->startElement( "office:master-styles" ); stylesWriter->startElement( "office:master-styles" );
stylesWriter->addCompleteElement( TQT_TQIODEVICE(masterStyles) ); stylesWriter->addCompleteElement( masterStyles );
stylesWriter->endElement(); stylesWriter->endElement();
} }
} }

@ -130,7 +130,7 @@ void KPrPage::saveOasisObject( KoStore *store, KoXmlWriter &xmlWriter, KoSavingC
KTempFile animationTmpFile; KTempFile animationTmpFile;
animationTmpFile.setAutoDelete( true ); animationTmpFile.setAutoDelete( true );
TQFile* tmpFile = animationTmpFile.file(); TQFile* tmpFile = animationTmpFile.file();
KoXmlWriter animationTmpWriter( TQT_TQIODEVICE(tmpFile) ); KoXmlWriter animationTmpWriter( tmpFile );
lstMap listObjectAnimation; lstMap listObjectAnimation;
TQPtrListIterator<KPrObject> it( m_objectList ); TQPtrListIterator<KPrObject> it( m_objectList );
for ( ; it.current() ; ++it ) for ( ; it.current() ; ++it )
@ -228,7 +228,7 @@ void KPrPage::saveOasisObject( KoStore *store, KoXmlWriter &xmlWriter, KoSavingC
} }
animationTmpWriter.endElement();//close "presentation:animations" animationTmpWriter.endElement();//close "presentation:animations"
tmpFile->close(); tmpFile->close();
xmlWriter.addCompleteElement( TQT_TQIODEVICE(tmpFile) ); xmlWriter.addCompleteElement( tmpFile );
} }
else else
@ -626,7 +626,7 @@ TQString KPrPage::saveOasisPageStyle( KoStore *, KoGenStyles& mainStyles ) const
{ {
TQBuffer buffer; TQBuffer buffer;
buffer.open( IO_WriteOnly ); buffer.open( IO_WriteOnly );
KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
elementWriter.startElement( "presentation:sound" ); elementWriter.startElement( "presentation:sound" );
elementWriter.addAttribute( "xlink:href", m_soundFileName ); elementWriter.addAttribute( "xlink:href", m_soundFileName );
elementWriter.addAttribute( "xlink:type", "simple" ); elementWriter.addAttribute( "xlink:type", "simple" );
@ -1006,7 +1006,7 @@ void KPrPage::pasteObjs( const TQByteArray & data,int nbCopy, double angle,
if ( !data.size() ) if ( !data.size() )
return; return;
TQBuffer buffer( data ); TQBuffer buffer( data );
KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Read ); KoStore* store = KoStore::createStore( &buffer, KoStore::Read );
int nbNewObject = -1 ; int nbNewObject = -1 ;
KMacroCommand *macro = 0L; KMacroCommand *macro = 0L;
if ( !store->bad() ) if ( !store->bad() )

@ -435,7 +435,7 @@ double KPrPixmapObject::load(const TQDomElement &element)
TQByteArray rawData=_data.utf8(); // XPM is normally ASCII, therefore UTF-8 TQByteArray rawData=_data.utf8(); // XPM is normally ASCII, therefore UTF-8
rawData[rawData.size()-1]=char(10); // Replace the NULL character by a LINE FEED rawData[rawData.size()-1]=char(10); // Replace the NULL character by a LINE FEED
TQBuffer buffer(rawData); // ### TODO: open? TQBuffer buffer(rawData); // ### TODO: open?
image.loadXpm(TQT_TQIODEVICE(&buffer)); image.loadXpm(&buffer);
} }
} }
} }

@ -200,7 +200,7 @@ void KPrSlideTransitionDia::preview()
m_dialog->previewPixmap->repaint(); m_dialog->previewPixmap->repaint();
} }
m_pageEffect = new KPrPageEffects( TQT_TQPAINTDEVICE(m_dialog->previewPixmap), m_target, effect, effectSpeed ); m_pageEffect = new KPrPageEffects( m_dialog->previewPixmap, m_target, effect, effectSpeed );
if ( m_pageEffect->doEffect() ) if ( m_pageEffect->doEffect() )
{ {
delete m_pageEffect; delete m_pageEffect;

@ -2368,7 +2368,7 @@ TQDragObject * KPrTextView::newDrag( TQWidget * parent )
{ {
TQBuffer buffer; TQBuffer buffer;
const TQCString mimeType = "application/vnd.oasis.opendocument.text"; const TQCString mimeType = "application/vnd.oasis.opendocument.text";
KoStore * store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Write, mimeType ); KoStore * store = KoStore::createStore( &buffer, KoStore::Write, mimeType );
Q_ASSERT( store ); Q_ASSERT( store );
Q_ASSERT( !store->bad() ); Q_ASSERT( !store->bad() );

@ -108,7 +108,7 @@ void KPrEffectPreview::run( PageEffect effect, EffectSpeed speed )
TQLabel::repaint(); TQLabel::repaint();
} }
m_pageEffect = new KPrPageEffects( TQT_TQPAINTDEVICE(this), m_target, effect, speed ); m_pageEffect = new KPrPageEffects( this, m_target, effect, speed );
if ( m_pageEffect->doEffect() ) if ( m_pageEffect->doEffect() )
{ {
delete m_pageEffect; delete m_pageEffect;

@ -822,7 +822,7 @@ void KPrView::savePicture( const TQString& oldName, KoPicture& picture)
TQFile file( url.path() ); TQFile file( url.path() );
if ( file.open( IO_ReadWrite ) ) if ( file.open( IO_ReadWrite ) )
{ {
picture.save( TQT_TQIODEVICE(&file) ); picture.save( &file );
file.close(); file.close();
} }
else else
@ -841,7 +841,7 @@ void KPrView::savePicture( const TQString& oldName, KoPicture& picture)
TQFile file( tempFile.name() ); TQFile file( tempFile.name() );
if ( file.open( IO_ReadWrite ) ) if ( file.open( IO_ReadWrite ) )
{ {
picture.save( TQT_TQIODEVICE(&file) ); picture.save( &file );
file.close(); file.close();
if ( !TDEIO::NetAccess::upload( tempFile.name(), url, this ) ) if ( !TDEIO::NetAccess::upload( tempFile.name(), url, this ) )
{ {

@ -3848,7 +3848,7 @@ void Canvas::copyOasisObjects()
// We'll create a store (ZIP format) in memory // We'll create a store (ZIP format) in memory
TQBuffer buffer; TQBuffer buffer;
TQCString mimeType = "application/vnd.oasis.opendocument.spreadsheet"; TQCString mimeType = "application/vnd.oasis.opendocument.spreadsheet";
KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Write, mimeType ); KoStore* store = KoStore::createStore( &buffer, KoStore::Write, mimeType );
Q_ASSERT( store ); Q_ASSERT( store );
Q_ASSERT( !store->bad() ); Q_ASSERT( !store->bad() );
KoOasisStore oasisStore( store ); KoOasisStore oasisStore( store );

@ -648,7 +648,7 @@ bool Doc::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, SaveFlag
contentTmpFile.setAutoDelete( true ); contentTmpFile.setAutoDelete( true );
TQFile* tmpFile = contentTmpFile.file(); TQFile* tmpFile = contentTmpFile.file();
KoXmlWriter contentTmpWriter( TQT_TQIODEVICE(tmpFile), 1 ); KoXmlWriter contentTmpWriter( tmpFile, 1 );
@ -765,7 +765,7 @@ bool Doc::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, SaveFlag
// And now we can copy over the contents from the tempfile to the real one // And now we can copy over the contents from the tempfile to the real one
tmpFile->close(); tmpFile->close();
contentWriter->addCompleteElement( TQT_TQIODEVICE(tmpFile) ); contentWriter->addCompleteElement( tmpFile );
contentTmpFile.close(); contentTmpFile.close();

@ -216,7 +216,7 @@ bool Map::saveOasis( KoXmlWriter & xmlWriter, KoGenStyles & mainStyles, KoStore
bodyTmpFile.setAutoDelete( true ); bodyTmpFile.setAutoDelete( true );
TQFile* tmpFile = bodyTmpFile.file(); TQFile* tmpFile = bodyTmpFile.file();
KoXmlWriter bodyTmpWriter( TQT_TQIODEVICE(tmpFile) ); KoXmlWriter bodyTmpWriter( tmpFile );
TQPtrListIterator<Sheet> it( m_lstSheets ); TQPtrListIterator<Sheet> it( m_lstSheets );
@ -229,7 +229,7 @@ bool Map::saveOasis( KoXmlWriter & xmlWriter, KoGenStyles & mainStyles, KoStore
tmpFile->close(); tmpFile->close();
xmlWriter.addCompleteElement( TQT_TQIODEVICE(tmpFile) ); xmlWriter.addCompleteElement( tmpFile );
bodyTmpFile.close(); bodyTmpFile.close();
return true; return true;

@ -7359,7 +7359,7 @@ TQString Sheet::saveOasisSheetStyleName( KoGenStyles &mainStyles )
TQBuffer buffer; TQBuffer buffer;
buffer.open( IO_WriteOnly ); buffer.open( IO_WriteOnly );
KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
saveOasisHeaderFooter(elementWriter); saveOasisHeaderFooter(elementWriter);
TQString elementContents = TQString::fromUtf8( buffer.buffer(), buffer.buffer().size() ); TQString elementContents = TQString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
@ -8220,14 +8220,14 @@ bool Sheet::insertPicture( const KoPoint& point, const TQPixmap& pixmap )
TQBuffer buffer(data); TQBuffer buffer(data);
buffer.open( IO_ReadWrite ); buffer.open( IO_ReadWrite );
pixmap.save( TQT_TQIODEVICE(&buffer) , "PNG" ); pixmap.save( &buffer , "PNG" );
//Reset the buffer so that KoPicture reads the whole file from the beginning //Reset the buffer so that KoPicture reads the whole file from the beginning
//(at the moment the read/write position is at the end) //(at the moment the read/write position is at the end)
buffer.reset(); buffer.reset();
KoPicture picture; KoPicture picture;
picture.load( TQT_TQIODEVICE(&buffer) , "PNG" ); picture.load( &buffer , "PNG" );
doc()->pictureCollection()->insertPicture(picture); doc()->pictureCollection()->insertPicture(picture);

@ -4147,7 +4147,7 @@ void View::paste()
if( arr.isEmpty() ) if( arr.isEmpty() )
return; return;
TQBuffer buffer( arr ); TQBuffer buffer( arr );
KoStore * store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Read ); KoStore * store = KoStore::createStore( &buffer, KoStore::Read );
KoOasisStore oasisStore( store ); KoOasisStore oasisStore( store );
TQDomDocument doc; TQDomDocument doc;

@ -214,7 +214,7 @@ void KugarPart::slotPreferredTemplate( const TQString &tpl )
{ {
/* kdDebug() << "RawXML" << endl;*/ /* kdDebug() << "RawXML" << endl;*/
f.open( IO_ReadOnly ); f.open( IO_ReadOnly );
if ( !m_reportEngine -> setReportTemplate( TQT_TQIODEVICE(&f) ) ) if ( !m_reportEngine -> setReportTemplate( &f ) )
KMessageBox::sorry( 0, i18n( "Invalid template file: %1" ).arg( localtpl ) ); KMessageBox::sorry( 0, i18n( "Invalid template file: %1" ).arg( localtpl ) );
else else
{ {

@ -269,7 +269,7 @@ KoTextCursor * KWOasisPasteCommand::execute( KoTextCursor *c )
TQBuffer buffer( m_data ); TQBuffer buffer( m_data );
KoStore * store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Read ); KoStore * store = KoStore::createStore( &buffer, KoStore::Read );
KWDocument* kwdoc = textdoc->textFrameSet()->kWordDocument(); KWDocument* kwdoc = textdoc->textFrameSet()->kWordDocument();
KWOasisLoader loader( kwdoc ); KWOasisLoader loader( kwdoc );
loader.insertOasisData( store, c ); loader.insertOasisData( store, c );

@ -2843,7 +2843,7 @@ bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, S
// storing the content into a buffer. // storing the content into a buffer.
TQBuffer buffer( headerFooterContent ); TQBuffer buffer( headerFooterContent );
buffer.open( IO_WriteOnly ); buffer.open( IO_WriteOnly );
KoXmlWriter headerFooterTmpWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level KoXmlWriter headerFooterTmpWriter( &buffer ); // TODO pass indentation level
// The order we write out header, header-left, etc. is important. So, we go here // The order we write out header, header-left, etc. is important. So, we go here
// the dirty way to collect them first and then flush them ordered out. // the dirty way to collect them first and then flush them ordered out.
@ -3021,7 +3021,7 @@ TQDragObject* KWDocument::dragSelectedPrivate( TQWidget *parent, const TQValueLi
// We'll create a store (ZIP format) in memory // We'll create a store (ZIP format) in memory
TQBuffer buffer; TQBuffer buffer;
TQCString mimeType = KWOasisSaver::selectionMimeType(); TQCString mimeType = KWOasisSaver::selectionMimeType();
KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Write, mimeType ); KoStore* store = KoStore::createStore( &buffer, KoStore::Write, mimeType );
Q_ASSERT( store ); Q_ASSERT( store );
Q_ASSERT( !store->bad() ); Q_ASSERT( !store->bad() );
KoOasisStore oasisStore( store ); KoOasisStore oasisStore( store );
@ -3189,7 +3189,7 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle
TQBuffer buffer; TQBuffer buffer;
buffer.open( IO_WriteOnly ); buffer.open( IO_WriteOnly );
KoXmlWriter footnoteSepTmpWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level KoXmlWriter footnoteSepTmpWriter( &buffer ); // TODO pass indentation level
footnoteSepTmpWriter.startElement( "style:footnote-sep" ); footnoteSepTmpWriter.startElement( "style:footnote-sep" );
TQString tmp; TQString tmp;
switch( m_footNoteSeparatorLinePos ) switch( m_footNoteSeparatorLinePos )
@ -3237,7 +3237,7 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle
if ( m_pageColumns.columns > 1 ) { if ( m_pageColumns.columns > 1 ) {
buffer.setBuffer(TQByteArray()); // clear data buffer.setBuffer(TQByteArray()); // clear data
buffer.open( IO_WriteOnly ); buffer.open( IO_WriteOnly );
KoXmlWriter columnsTmpWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level KoXmlWriter columnsTmpWriter( &buffer ); // TODO pass indentation level
columnsTmpWriter.startElement( "style:columns" ); columnsTmpWriter.startElement( "style:columns" );
columnsTmpWriter.addAttribute( "fo:column-count", m_pageColumns.columns ); columnsTmpWriter.addAttribute( "fo:column-count", m_pageColumns.columns );
columnsTmpWriter.addAttributePt( "fo:column-gap", m_pageColumns.ptColumnSpacing ); columnsTmpWriter.addAttributePt( "fo:column-gap", m_pageColumns.ptColumnSpacing );

@ -275,7 +275,7 @@ void KWFormulaFrameSet::saveOasis(KoXmlWriter& writer, KoSavingContext& context,
writer.startElement( "draw:object" ); writer.startElement( "draw:object" );
writer.startElement( "math:math" ); writer.startElement( "math:math" );
writer.addCompleteElement( TQT_TQIODEVICE(tmpFile) ); writer.addCompleteElement( tmpFile );
writer.endElement(); // math:math writer.endElement(); // math:math
writer.endElement(); // draw:object writer.endElement(); // draw:object
writer.endElement(); // draw:frame writer.endElement(); // draw:frame

@ -27,7 +27,7 @@ KWOasisSaver::KWOasisSaver( KWDocument* doc )
: m_doc( doc ) : m_doc( doc )
{ {
const TQCString mimeType = selectionMimeType(); const TQCString mimeType = selectionMimeType();
m_store = KoStore::createStore( TQT_TQIODEVICE(&m_buffer), KoStore::Write, mimeType ); m_store = KoStore::createStore( &m_buffer, KoStore::Write, mimeType );
Q_ASSERT( m_store ); Q_ASSERT( m_store );
Q_ASSERT( !m_store->bad() ); Q_ASSERT( !m_store->bad() );

@ -2435,7 +2435,7 @@ void KWView::pasteData( TQMimeSource* data, bool drop )
if( !arr.isEmpty() ) if( !arr.isEmpty() )
{ {
TQBuffer buffer( arr ); TQBuffer buffer( arr );
KoStore * store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Read ); KoStore * store = KoStore::createStore( &buffer, KoStore::Read );
KWOasisLoader oasisLoader( m_doc ); KWOasisLoader oasisLoader( m_doc );
TQValueList<KWFrame *> frames = oasisLoader.insertOasisData( store, 0 /* no cursor */ ); TQValueList<KWFrame *> frames = oasisLoader.insertOasisData( store, 0 /* no cursor */ );
delete store; delete store;
@ -6118,7 +6118,7 @@ void KWView::savePicture()
TQFile file( url.path() ); TQFile file( url.path() );
if ( file.open( IO_ReadWrite ) ) if ( file.open( IO_ReadWrite ) )
{ {
picture.save( TQT_TQIODEVICE(&file) ); picture.save( &file );
file.close(); file.close();
} }
else else
@ -6137,7 +6137,7 @@ void KWView::savePicture()
TQFile file( tempFile.name() ); TQFile file( tempFile.name() );
if ( file.open( IO_ReadWrite ) ) if ( file.open( IO_ReadWrite ) )
{ {
picture.save( TQT_TQIODEVICE(&file) ); picture.save( &file );
file.close(); file.close();
if ( !TDEIO::NetAccess::upload( tempFile.name(), url, this ) ) if ( !TDEIO::NetAccess::upload( tempFile.name(), url, this ) )
{ {

@ -978,7 +978,7 @@ bool KoDocument::saveNativeFormat( const TQString & file )
TQFile f( file ); TQFile f( file );
if ( f.open( IO_WriteOnly | IO_Translate ) ) if ( f.open( IO_WriteOnly | IO_Translate ) )
{ {
bool success = saveToStream( TQT_TQIODEVICE(&f) ); bool success = saveToStream( &f );
f.close(); f.close();
return success; return success;
} }
@ -1727,7 +1727,7 @@ bool KoDocument::loadNativeFormat( const TQString & file )
bool res; bool res;
if ( doc.setContent( &in, true, &errorMsg, &errorLine, &errorColumn ) ) if ( doc.setContent( &in, true, &errorMsg, &errorLine, &errorColumn ) )
{ {
res = loadXML( TQT_TQIODEVICE(&in), doc ); res = loadXML( &in, doc );
if ( res ) if ( res )
res = completeLoading( 0L ); res = completeLoading( 0L );
} }

@ -71,7 +71,7 @@ int KoEmbeddingFilter::embedPart( const TQCString& from, TQCString& to,
KTempFile tempIn; KTempFile tempIn;
tempIn.setAutoDelete( true ); tempIn.setAutoDelete( true );
savePartContents( TQT_TQIODEVICE(tempIn.file()) ); savePartContents( tempIn.file() );
tempIn.file()->close(); tempIn.file()->close();
KoFilterManager *manager = new KoFilterManager( tempIn.name(), from, m_chain ); KoFilterManager *manager = new KoFilterManager( tempIn.name(), from, m_chain );

@ -78,7 +78,7 @@ KoXmlWriter* KoOasisStore::bodyWriter()
Q_ASSERT( !m_contentTmpFile ); Q_ASSERT( !m_contentTmpFile );
m_contentTmpFile = new KTempFile; m_contentTmpFile = new KTempFile;
m_contentTmpFile->setAutoDelete( true ); m_contentTmpFile->setAutoDelete( true );
m_bodyWriter = new KoXmlWriter( TQT_TQIODEVICE(m_contentTmpFile->file()), 1 ); m_bodyWriter = new KoXmlWriter( m_contentTmpFile->file(), 1 );
} }
return m_bodyWriter; return m_bodyWriter;
} }
@ -92,7 +92,7 @@ bool KoOasisStore::closeContentWriter()
// copy over the contents from the tempfile to the real one // copy over the contents from the tempfile to the real one
TQFile* tmpFile = m_contentTmpFile->file(); TQFile* tmpFile = m_contentTmpFile->file();
tmpFile->close(); tmpFile->close();
m_contentWriter->addCompleteElement( TQT_TQIODEVICE(tmpFile) ); m_contentWriter->addCompleteElement( tmpFile );
m_contentTmpFile->close(); m_contentTmpFile->close();
delete m_contentTmpFile; m_contentTmpFile = 0; delete m_contentTmpFile; m_contentTmpFile = 0;
@ -113,7 +113,7 @@ KoXmlWriter* KoOasisStore::manifestWriter( const char* mimeType )
// the pointer to the buffer is already stored in the KoXmlWriter, no need to store it here as well // the pointer to the buffer is already stored in the KoXmlWriter, no need to store it here as well
TQBuffer *manifestBuffer = new TQBuffer; TQBuffer *manifestBuffer = new TQBuffer;
manifestBuffer->open( IO_WriteOnly ); manifestBuffer->open( IO_WriteOnly );
m_manifestWriter = new KoXmlWriter( TQT_TQIODEVICE(manifestBuffer) ); m_manifestWriter = new KoXmlWriter( manifestBuffer );
m_manifestWriter->startDocument( "manifest:manifest" ); m_manifestWriter->startDocument( "manifest:manifest" );
m_manifestWriter->startElement( "manifest:manifest" ); m_manifestWriter->startElement( "manifest:manifest" );
m_manifestWriter->addAttribute( "xmlns:manifest", KoXmlNS::manifest ); m_manifestWriter->addAttribute( "xmlns:manifest", KoXmlNS::manifest );
@ -126,7 +126,7 @@ bool KoOasisStore::closeManifestWriter()
{ {
m_manifestWriter->endElement(); m_manifestWriter->endElement();
m_manifestWriter->endDocument(); m_manifestWriter->endDocument();
TQBuffer* buffer = TQT_TQBUFFER( static_cast<TQIODevice*>(m_manifestWriter->device()) ); TQBuffer* buffer = static_cast<TQBuffer*>(m_manifestWriter->device());
delete m_manifestWriter; m_manifestWriter = 0; delete m_manifestWriter; m_manifestWriter = 0;
bool ok = false; bool ok = false;
if ( m_store->open( "META-INF/manifest.xml" ) ) if ( m_store->open( "META-INF/manifest.xml" ) )

@ -664,7 +664,7 @@ TQString KoOasisStyles::saveOasisTimeStyle( KoGenStyles &mainStyles, const TQStr
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_TIME ); KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_TIME );
TQBuffer buffer; TQBuffer buffer;
buffer.open( IO_WriteOnly ); buffer.open( IO_WriteOnly );
KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
TQString text; TQString text;
if ( klocaleFormat ) if ( klocaleFormat )
{ {
@ -819,7 +819,7 @@ TQString KoOasisStyles::saveOasisDateStyle( KoGenStyles &mainStyles, const TQStr
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_DATE ); KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_DATE );
TQBuffer buffer; TQBuffer buffer;
buffer.open( IO_WriteOnly ); buffer.open( IO_WriteOnly );
KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
TQString text; TQString text;
if ( klocaleFormat ) if ( klocaleFormat )
{ {
@ -993,7 +993,7 @@ TQString KoOasisStyles::saveOasisFractionStyle( KoGenStyles &mainStyles, const T
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_FRACTION ); KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_FRACTION );
TQBuffer buffer; TQBuffer buffer;
buffer.open( IO_WriteOnly ); buffer.open( IO_WriteOnly );
KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
TQString text; TQString text;
int integer = 0; int integer = 0;
int numerator = 0; int numerator = 0;
@ -1057,7 +1057,7 @@ TQString KoOasisStyles::saveOasisNumberStyle( KoGenStyles &mainStyles, const TQS
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_NUMBER ); KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_NUMBER );
TQBuffer buffer; TQBuffer buffer;
buffer.open( IO_WriteOnly ); buffer.open( IO_WriteOnly );
KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
TQString text; TQString text;
int decimalplaces = 0; int decimalplaces = 0;
int integerdigits = 0; int integerdigits = 0;
@ -1106,7 +1106,7 @@ TQString KoOasisStyles::saveOasisPercentageStyle( KoGenStyles &mainStyles, const
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_PERCENTAGE ); KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_PERCENTAGE );
TQBuffer buffer; TQBuffer buffer;
buffer.open( IO_WriteOnly ); buffer.open( IO_WriteOnly );
KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
TQString text; TQString text;
int decimalplaces = 0; int decimalplaces = 0;
int integerdigits = 0; int integerdigits = 0;
@ -1160,7 +1160,7 @@ TQString KoOasisStyles::saveOasisScientificStyle( KoGenStyles &mainStyles, const
int decimalplace = 0; int decimalplace = 0;
int integerdigits = 0; int integerdigits = 0;
int exponentdigits = 0; int exponentdigits = 0;
KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
TQString text; TQString text;
bool beforeSeparator = true; bool beforeSeparator = true;
bool exponential = false; bool exponential = false;
@ -1236,7 +1236,7 @@ TQString KoOasisStyles::saveOasisCurrencyStyle( KoGenStyles &mainStyles,
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_CURRENCY ); KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_CURRENCY );
TQBuffer buffer; TQBuffer buffer;
buffer.open( IO_WriteOnly ); buffer.open( IO_WriteOnly );
KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
TQString text; TQString text;
int decimalplaces = 0; int decimalplaces = 0;
int integerdigits = 0; int integerdigits = 0;
@ -1292,7 +1292,7 @@ TQString KoOasisStyles::saveOasisTextStyle( KoGenStyles &mainStyles, const TQStr
KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_TEXT ); KoGenStyle currentStyle( KoGenStyle::STYLE_NUMERIC_TEXT );
TQBuffer buffer; TQBuffer buffer;
buffer.open( IO_WriteOnly ); buffer.open( IO_WriteOnly );
KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
TQString text; TQString text;
do do
{ {

@ -95,7 +95,7 @@ bool KoPictureBase::saveAsBase64( KoXmlWriter& writer ) const
{ {
TQBuffer buffer; TQBuffer buffer;
buffer.open(IO_ReadWrite); buffer.open(IO_ReadWrite);
if ( !save( TQT_TQIODEVICE(&buffer) ) ) if ( !save( &buffer ) )
return false; return false;
TQCString encoded = KCodecs::base64Encode( buffer.buffer() ); TQCString encoded = KCodecs::base64Encode( buffer.buffer() );
writer.addTextNode( encoded ); writer.addTextNode( encoded );

@ -208,7 +208,7 @@ bool KoPictureShared::identifyAndLoad( TQByteArray array )
TQBuffer buffer(array); TQBuffer buffer(array);
buffer.open(IO_ReadOnly); buffer.open(IO_ReadOnly);
const bool flag = loadCompressed( TQT_TQIODEVICE(&buffer), "application/x-gzip", "tmp" ); const bool flag = loadCompressed( &buffer, "application/x-gzip", "tmp" );
buffer.close(); buffer.close();
return flag; return flag;
} }
@ -217,7 +217,7 @@ bool KoPictureShared::identifyAndLoad( TQByteArray array )
// BZip2 // BZip2
TQBuffer buffer(array); TQBuffer buffer(array);
buffer.open(IO_ReadOnly); buffer.open(IO_ReadOnly);
const bool flag = loadCompressed( TQT_TQIODEVICE(&buffer), "application/x-bzip2", "tmp" ); const bool flag = loadCompressed( &buffer, "application/x-bzip2", "tmp" );
buffer.close(); buffer.close();
return flag; return flag;
} }
@ -252,7 +252,7 @@ bool KoPictureShared::identifyAndLoad( TQByteArray array )
return false; return false;
} }
imageIO.setIODevice(TQT_TQIODEVICE(&buf)); imageIO.setIODevice(&buf);
imageIO.setFormat("PNG"); imageIO.setFormat("PNG");
if (!imageIO.write()) if (!imageIO.write())
@ -309,7 +309,7 @@ bool KoPictureShared::loadXpm(TQIODevice* io)
m_base=new KoPictureImage(); m_base=new KoPictureImage();
TQBuffer buffer(array); TQBuffer buffer(array);
bool check = m_base->load(TQT_TQIODEVICE(&buffer),"xpm"); bool check = m_base->load(&buffer,"xpm");
setExtension("xpm"); setExtension("xpm");
return check; return check;
} }
@ -441,13 +441,13 @@ bool KoPictureShared::loadFromFile(const TQString& fileName)
{ {
kdDebug(30003) << "File with no extension!" << endl; kdDebug(30003) << "File with no extension!" << endl;
// As we have no extension, consider it like a temporary file // As we have no extension, consider it like a temporary file
flag = loadTmp( TQT_TQIODEVICE(&file) ); flag = loadTmp( &file );
} }
else else
{ {
const TQString extension( fileName.mid( pos+1 ) ); const TQString extension( fileName.mid( pos+1 ) );
// ### TODO: check if the extension if gz or bz2 and find the previous extension // ### TODO: check if the extension if gz or bz2 and find the previous extension
flag = load( TQT_TQIODEVICE(&file), extension ); flag = load( &file, extension );
} }
file.close(); file.close();
return flag; return flag;

@ -97,7 +97,7 @@ bool KoPictureWmf::loadData(const TQByteArray& array, const TQString& /* extensi
} }
m_originalSize = wmf.boundingRect().size(); m_originalSize = wmf.boundingRect().size();
// draw wmf file with relative coordinate // draw wmf file with relative coordinate
wmf.play(*TQT_TQPAINTDEVICE(&m_clipart), true); wmf.play(m_clipart, true);
return true; return true;
} }

@ -660,7 +660,7 @@ void KoTabBar::paintEvent( TQPaintEvent* )
TQPainter painter; TQPainter painter;
TQPixmap pm( size() ); TQPixmap pm( size() );
pm.fill( colorGroup().background() ); pm.fill( colorGroup().background() );
painter.begin( TQT_TQPAINTDEVICE(&pm), this ); painter.begin( &pm, this );
painter.setPen( colorGroup().dark() ); painter.setPen( colorGroup().dark() );
painter.drawLine( 0, 0, width(), 0 ); painter.drawLine( 0, 0, width(), 0 );

@ -269,7 +269,7 @@ void KoParagCounter::saveOasis( KoGenStyle& listStyle, bool savingStyle ) const
// Prepare a sub-xmlwriter for the list-level-style-* element // Prepare a sub-xmlwriter for the list-level-style-* element
TQBuffer buffer; TQBuffer buffer;
buffer.open( IO_WriteOnly ); buffer.open( IO_WriteOnly );
KoXmlWriter listLevelWriter( TQT_TQIODEVICE(&buffer), 3 /*indentation*/ ); KoXmlWriter listLevelWriter( &buffer, 3 /*indentation*/ );
const char* tagName = isBullet() ? "text:list-level-style-bullet" : "text:list-level-style-number"; const char* tagName = isBullet() ? "text:list-level-style-bullet" : "text:list-level-style-number";
listLevelWriter.startElement( tagName ); listLevelWriter.startElement( tagName );

@ -843,7 +843,7 @@ void KoParagLayout::saveOasis( KoGenStyle& gs, KoSavingContext& context, bool sa
TQBuffer buffer; TQBuffer buffer;
buffer.open( IO_WriteOnly ); buffer.open( IO_WriteOnly );
KoXmlWriter tabsWriter( TQT_TQIODEVICE(&buffer), 4 ); // indent==4: root,autostyle,style,parag-props KoXmlWriter tabsWriter( &buffer, 4 ); // indent==4: root,autostyle,style,parag-props
tabsWriter.startElement( "style:tab-stops" ); tabsWriter.startElement( "style:tab-stops" );
KoTabulatorList::ConstIterator it = m_tabList.begin(); KoTabulatorList::ConstIterator it = m_tabList.begin();
for ( ; it != m_tabList.end() ; it++ ) for ( ; it != m_tabList.end() ; it++ )

@ -71,7 +71,7 @@ bool KoDirectoryStore::openReadOrWrite( const TQString& name, int iomode )
if ( !ret ) if ( !ret )
return false; return false;
} }
m_stream = TQT_TQIODEVICE(new TQFile( m_basePath + name )); m_stream = new TQFile( m_basePath + name );
if ( !m_stream->open( iomode ) ) if ( !m_stream->open( iomode ) )
{ {
delete m_stream; delete m_stream;

@ -69,7 +69,7 @@ KoStore* KoStore::createStore( const TQString& fileName, Mode mode, const TQCStr
{ {
TQFile file( fileName ); TQFile file( fileName );
if ( file.open( IO_ReadOnly ) ) if ( file.open( IO_ReadOnly ) )
backend = determineBackend( TQT_TQIODEVICE(&file) ); backend = determineBackend( &file );
else else
backend = DefaultFormat; // will create a "bad" store (bad()==true) backend = DefaultFormat; // will create a "bad" store (bad()==true)
} }
@ -143,7 +143,7 @@ KoStore* KoStore::createStore( TQWidget* window, const KURL& url, Mode mode, con
TQFile file( tmpFile ); TQFile file( tmpFile );
if ( file.open( IO_ReadOnly ) ) if ( file.open( IO_ReadOnly ) )
{ {
backend = determineBackend( TQT_TQIODEVICE(&file) ); backend = determineBackend( &file );
file.close(); file.close();
} }
} }

@ -126,7 +126,7 @@ bool KoTarStore::openWrite( const TQString& /*name*/ )
{ {
// Prepare memory buffer for writing // Prepare memory buffer for writing
m_byteArray.resize( 0 ); m_byteArray.resize( 0 );
m_stream = TQT_TQIODEVICE(new TQBuffer( m_byteArray )); m_stream = new TQBuffer( m_byteArray );
m_stream->open( IO_WriteOnly ); m_stream->open( IO_WriteOnly );
return true; return true;
} }

Loading…
Cancel
Save