Commit 0b77445d authored by Laurent Montel's avatar Laurent Montel 😁

Adapt to new KWarning/kFatal/kDebug api

svn path=/trunk/koffice/; revision=695926
parent a1880a22
......@@ -42,7 +42,7 @@ void KoParameterShape::moveHandle( int handleId, const QPointF & point, Qt::Keyb
{
if ( handleId >= m_handles.size() )
{
kWarning(30006) << "handleId out of bounds" << endl;
kWarning(30006) << "handleId out of bounds";
return;
}
......
......@@ -713,7 +713,7 @@ QTextCodec* KoCsvImportDialog::Private::updateCodec() const
if ( !codec || !ok )
{
// Default: UTF-8
kWarning(30502) << "Cannot find encoding:" << strCodec << endl;
kWarning(30502) << "Cannot find encoding:" << strCodec;
// ### TODO: what parent to use?
KMessageBox::error( 0, i18n("Cannot find encoding: %1", strCodec ) );
return 0;
......
......@@ -120,7 +120,7 @@ void KoLayoutVisitor::relayout() {
int row, column, rowSpan, columnSpan;
layout->getItemPosition(index, &row, &column, &rowSpan, &columnSpan);
if(columnSpan > 1)
kWarning() << "Attention, colSpan for " << label->text() << " is " << columnSpan << endl;
kWarning() << "Attention, colSpan for " << label->text() << " is " << columnSpan;
layout->setColumnMinimumWidth(column, right -label->mapToGlobal(QPoint(0,0)).x());
}
column.clear();
......
......@@ -447,7 +447,7 @@ void KoTemplateChooseDia::slotOk()
}
else
{
kWarning(30003) << "Unsupported template chooser result: " << d->m_returnType << endl;
kWarning(30003) << "Unsupported template chooser result: " << d->m_returnType;
grp.writeEntry( "LastReturnType", QString() );
}
slotButtonClicked( KDialog::Ok );
......
......@@ -279,7 +279,7 @@ void KoTemplateCreateDia::slotOk() {
if ( pos > -1 )
ext = m_file.mid( pos );
else
kWarning(30004) << "Template extension not found!" << endl;
kWarning(30004) << "Template extension not found!";
KUrl dest;
dest.setPath(templateDir+file+ext);
......@@ -333,7 +333,7 @@ void KoTemplateCreateDia::slotOk() {
else if(!d->m_customPixmap.isNull())
d->m_customPixmap.save(icon, "PNG");
else
kWarning(30004) << "Could not save the preview picture!" << endl;
kWarning(30004) << "Could not save the preview picture!";
}
// if there's a .directory file, we copy this one, too
......@@ -488,7 +488,7 @@ void KoTemplateCreateDia::updatePixmap() {
d->m_customPixmap=t.loadPicture(d->m_tree->componentData());
}
else
kWarning(30004) << "Trying to load picture" << endl;
kWarning(30004) << "Trying to load picture";
if(!d->m_customPixmap.isNull())
d->m_preview->setPixmap(d->m_customPixmap);
......
......@@ -115,7 +115,7 @@ QValidator::State KoUnitDoubleSpinBox::validate(QString &input, int &pos) const
}
else
{
kWarning(30004) << "Not a number: " << number << endl;
kWarning(30004) << "Not a number: " << number;
return QValidator::Invalid;
}
newVal = KoUnit::ptToUnit( newVal, d->unit );
......@@ -205,7 +205,7 @@ double KoUnitDoubleSpinBox::valueFromText( const QString& str ) const
if ( ok )
kDebug(30004) <<"valueFromText:" << str <<": => :" << str2 <<": =>" << QString::number( dbl, 'f', 12 );
else
kWarning(30004) << "valueFromText error:" << str << ": => :" << str2 << ":" << endl;
kWarning(30004) << "valueFromText error:" << str << ": => :" << str2 << ":";
return dbl;
}
......
......@@ -147,13 +147,13 @@ KoInlineTextObjectManager *KoTextDocumentLayout::inlineObjectTextManager() {
QRectF KoTextDocumentLayout::blockBoundingRect(const QTextBlock &block) const {
// nobody calls this code and I have no way of implementing it anyway...
Q_UNUSED(block);
kWarning() << "KoTextDocumentLayout::blockBoundingRect is not implemented"<< endl;
kWarning() << "KoTextDocumentLayout::blockBoundingRect is not implemented";
return QRectF(0, 0, 10, 10);
}
QSizeF KoTextDocumentLayout::documentSize() const {
// nobody calls this code and I have no way of implementing it anyway...
kWarning() << "KoTextDocumentLayout::documentSize is not implemented"<< endl;
kWarning() << "KoTextDocumentLayout::documentSize is not implemented";
return QSizeF(10, 10);
}
......@@ -170,7 +170,7 @@ void KoTextDocumentLayout::draw ( QPainter * painter, const KoTextDocumentLayout
QRectF KoTextDocumentLayout::frameBoundingRect(QTextFrame *frame) const {
Q_UNUSED(frame);
// nobody calls this code and I have no way of implementing it anyway...
kWarning() << "KoTextDocumentLayout::frameBoundingRect is not implemented"<< endl;
kWarning() << "KoTextDocumentLayout::frameBoundingRect is not implemented";
return QRectF(0, 0, 10, 10);
}
......
......@@ -740,7 +740,7 @@ void KoAutoFormat::saveConfig()
else
f.setFileName(KStandardDirs::locateLocal("data", "koffice/autocorrect/"+m_autoFormatLanguage + ".xml",m_doc->componentData()));
if(!f.open(QIODevice::WriteOnly)) {
kWarning()<<"Error during saving autoformat to " << f.fileName() << endl;
kWarning()<<"Error during saving autoformat to " << f.fileName();
return;
}
QTextStream ts(&f);
......
......@@ -48,7 +48,7 @@ bool KoOasisContext::pushListLevelStyle( const QString& listStyleName, int level
{
KoXmlElement* fullListStyle = oasisStyles().listStyles()[listStyleName];
if ( !fullListStyle ) {
kWarning(32500) << "List style " << listStyleName << " not found!" << endl;
kWarning(32500) << "List style " << listStyleName << " not found!";
return false;
}
else
......@@ -72,7 +72,7 @@ bool KoOasisContext::pushListLevelStyle( const QString& listStyleName, // for de
--i;
}
if ( listLevelStyle.isNull() ) {
kWarning(32500) << "List level style for level " << level << " in list style " << listStyleName << " not found!" << endl;
kWarning(32500) << "List level style for level " << level << " in list style " << listStyleName << " not found!";
return false;
}
//kDebug(32500) <<"Pushing list-level-style from list-style" << listStyleName <<" level" << level;
......
......@@ -847,7 +847,7 @@ QString KoParagCounter::makeRomanNumber( int n )
RNTens[ ( n / 10 ) % 10 ] +
RNUnits[ ( n ) % 10 ] );
else { // should never happen, but better not crash if it does
kWarning(32500) << "makeRomanNumber: n=" << n << endl;
kWarning(32500) << "makeRomanNumber: n=" << n;
return QString::number( n );
}
}
......
......@@ -1933,7 +1933,7 @@ void KoParagTabulatorsWidget::setCurrentTab( double tabPos ) {
setActiveItem( i );
return;
}
kWarning() << "KoParagTabulatorsWidget::setCurrentTab: no tab found at pos=" << tabPos << endl;
kWarning() << "KoParagTabulatorsWidget::setCurrentTab: no tab found at pos=" << tabPos;
}
QString KoParagTabulatorsWidget::tabToString(const KoTabulator &tab) {
......
......@@ -196,7 +196,7 @@ void KoParagLayout::loadParagLayout( KoParagLayout& layout, const KoXmlElement&
else if ( dir == "R" )
layout.direction = QChar::DirR;
else
kWarning() << "Unexpected value for paragraph direction: " << dir << endl;
kWarning() << "Unexpected value for paragraph direction: " << dir;
}
} else {
flow = element.attribute( "value" ); // KWord-0.8
......@@ -515,7 +515,7 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& layout, KoOasisContext&
// kotext has "at least" but that's for the linespacing, not for the entire line height!
// Strange. kotext also has "at least" for the whole line height....
// Did we make the wrong choice in kotext?
//kWarning() << "Unimplemented support for style:line-height-at-least: " << value << endl;
//kWarning() << "Unimplemented support for style:line-height-at-least: " << value;
// Well let's see if this makes a big difference.
layout.lineSpacingType = KoParagLayout::LS_AT_LEAST;
layout.lineSpacing = KoUnit::parseValue( value );
......@@ -672,7 +672,7 @@ void KoParagLayout::saveParagLayout( QDomElement & parentElem, int alignment ) c
if ( layout.style )
element.setAttribute( "value", layout.style->displayName() );
//else
// kWarning() << "KoParagLayout::saveParagLayout: style==0!" << endl;
// kWarning() << "KoParagLayout::saveParagLayout: style==0!";
element = doc.createElement( "FLOW" );
parentElem.appendChild( element );
......
......@@ -116,7 +116,7 @@ void KoParagStyle::loadStyle( KoXmlElement & parentElem, int docVersion )
m_name = nameElem.attribute("value");
m_displayName = i18nc( "Style name", m_name.toUtf8() );
} else
kWarning() << "No NAME tag in LAYOUT -> no name for this style!" << endl;
kWarning() << "No NAME tag in LAYOUT -> no name for this style!";
// The followingStyle stuff has to be done after loading all styles.
......
......@@ -154,7 +154,7 @@ KoTextCursor *KoTextDocDeleteCommand::execute( KoTextCursor *c )
{
KoTextParag *s = doc->paragAt( id );
if ( !s ) {
kWarning(32500) << "can't locate parag at " << id << ", last parag: " << doc->lastParag()->paragId() << endl;
kWarning(32500) << "can't locate parag at " << id << ", last parag: " << doc->lastParag()->paragId();
return 0;
}
......@@ -178,7 +178,7 @@ KoTextCursor *KoTextDocDeleteCommand::unexecute( KoTextCursor *c )
{
KoTextParag *s = doc->paragAt( id );
if ( !s ) {
kWarning(32500) << "can't locate parag at " << id << ", last parag: " << doc->lastParag()->paragId() << endl;
kWarning(32500) << "can't locate parag at " << id << ", last parag: " << doc->lastParag()->paragId();
return 0;
}
......@@ -1632,7 +1632,7 @@ void KoTextParag::insertLineStart( int index, KoTextParagLineStart *ls )
if ( ( it = lineStarts.find( index ) ) == lineStarts.end() ) {
lineStarts.insert( index, ls );
} else {
kWarning(32500) << "insertLineStart: there's already a line for char index=" << index << endl;
kWarning(32500) << "insertLineStart: there's already a line for char index=" << index;
delete *it;
lineStarts.erase( it );
lineStarts.insert( index, ls );
......
......@@ -78,7 +78,7 @@ int KoStyleCollection::loadOasisStyles( KoOasisContext& context )
++stylesLoaded;
}
else
kWarning() << "Found duplicate style declaration, overwriting former " << sty->name() << endl;
kWarning() << "Found duplicate style declaration, overwriting former " << sty->name();
}
if( followingStyles.count() != styleList().count() ) {
......
......@@ -311,7 +311,7 @@ int KoStyleDialog::styleIndex( int pos ) {
return i;
++p;
}
kWarning() << "KoStyleDialog::styleIndex no style found at pos " << pos << endl;
kWarning() << "KoStyleDialog::styleIndex no style found at pos " << pos;
#ifdef __GNUC__#ifdef __GNUC__
#warning implement undo/redo
......
......@@ -84,7 +84,7 @@ KoTextCursor * KoTextDeleteCommand::unexecute( KoTextCursor *c )
KoTextParag *s = doc ? doc->paragAt( id ) : parag;
if ( !s ) {
kWarning() << "can't locate parag at " << id << ", last parag: " << (doc ? doc->lastParag()->paragId() : -1) << endl;
kWarning() << "can't locate parag at " << id << ", last parag: " << (doc ? doc->lastParag()->paragId() : -1);
return 0;
}
cursor.setParag( s );
......@@ -131,7 +131,7 @@ KoTextCursor * KoTextParagCommand::execute( KoTextCursor *c )
KoTextParag *p = doc->paragAt( firstParag );
if ( !p )
{
kWarning() << "KoTextParagCommand::execute paragraph " << firstParag << "not found" << endl;
kWarning() << "KoTextParagCommand::execute paragraph " << firstParag << "not found";
return c;
}
while ( p ) {
......
......@@ -1506,7 +1506,7 @@ KoTextParag* KoTextDocument::loadOasisText( const KoXmlElement& bodyElem, KoOasi
}
else if ( !loadOasisBodyTag( tag, context, lastParagraph, styleColl, nextParagraph ) )
{
kWarning(32500) << "Unsupported body element '" << localName << "'" << endl;
kWarning(32500) << "Unsupported body element '" << localName << "'";
}
context.styleStack().restore(); // remove the styles added by the paragraph or list
......
......@@ -371,7 +371,7 @@ static void importUnderline( const QString& in,
} else if( in == "bold" ) {
underline = KoTextFormat::U_SIMPLE_BOLD;
} else
kWarning() << k_funcinfo << " unsupported text-underline value: " << in << endl;
kWarning() << k_funcinfo << " unsupported text-underline value: " << in;
}
void KoTextFormat::load( KoOasisContext& context )
......@@ -1424,7 +1424,7 @@ void KoTextFormat::parseShadowFromCss( const QString& _css )
{
QStringList tokens = css.split(' ', QString::SkipEmptyParts);
if ( tokens.isEmpty() ) {
kWarning(32500) << "Parse error in text-shadow: " << css << endl;
kWarning(32500) << "Parse error in text-shadow: " << css;
return;
}
// Check which token looks like a color
......@@ -1835,7 +1835,7 @@ KoTextFormat *KoTextFormatCollection::format( const QFont &f, const QColor &c, c
cachedFormat->collection = this;
cKey.insert( cachedFormat->key(), cachedFormat );
if ( cachedFormat->key() != key )
kWarning() << "ASSERT: keys for format not identical: '" << cachedFormat->key() << " '" << key << "'" << endl;
kWarning() << "ASSERT: keys for format not identical: '" << cachedFormat->key() << " '" << key << "'";
#ifdef DEBUG_COLLECTION
kDebug(32500) <<" format of font and col '" << cachedFormat->key() <<"' - worst case";
#endif
......
......@@ -54,7 +54,7 @@ void KoTextIterator::init( const Q3ValueList<KoTextObject *> & lstObjects, KoTex
} else {
// !? FromCursor option can't work
m_options &= ~KFind::FromCursor;
kWarning(32500) << "FromCursor specified, but no textview?" << endl;
kWarning(32500) << "FromCursor specified, but no textview?";
}
} // no else here !
......@@ -92,7 +92,7 @@ void KoTextIterator::init( const Q3ValueList<KoTextObject *> & lstObjects, KoTex
m_lstObjects.pop_front();
m_lstObjects.push_back( textobj );
if ( m_lstObjects.first() == initialFirst ) { // safety
kWarning(32500) << "Didn't manage to find " << textView->textObject() << " in the list of textobjects!!!" << endl;
kWarning(32500) << "Didn't manage to find " << textView->textObject() << " in the list of textobjects!!!";
break;
}
}
......@@ -102,7 +102,7 @@ void KoTextIterator::init( const Q3ValueList<KoTextObject *> & lstObjects, KoTex
m_lstObjects.pop_back();
m_lstObjects.push_front( textobj );
if ( m_lstObjects.first() == initialFirst ) { // safety
kWarning(32500) << "Didn't manage to find " << textView->textObject() << " in the list of textobjects!!!" << endl;
kWarning(32500) << "Didn't manage to find " << textView->textObject() << " in the list of textobjects!!!";
break;
}
}
......
......@@ -1730,7 +1730,7 @@ void KoTextObject::ensureFormatted( KoTextParag * parag, bool emitAfterFormattin
while ( !parag->isValid() )
{
if ( !m_lastFormatted ) {
kWarning() << "ensureFormatted for parag " << parag << " " << parag->paragId() << " still not formatted, but m_lastFormatted==0" << endl;
kWarning() << "ensureFormatted for parag " << parag << " " << parag->paragId() << " still not formatted, but m_lastFormatted==0";
return;
}
// The paragid diff is "a good guess". The >=1 is a safety measure ;)
......@@ -1826,10 +1826,10 @@ bool KoTextObject::formatMore( int count /* = 10 */, bool emitAfterFormatting /*
}
if ( parag != m_lastFormatted )
kWarning() << "Some code changed m_lastFormatted during formatting! Was " << parag->paragId() << ", is now " << m_lastFormatted->paragId() << endl;
kWarning() << "Some code changed m_lastFormatted during formatting! Was " << parag->paragId() << ", is now " << m_lastFormatted->paragId();
#if 0 // This happens now that formatting can 'abort' (e.g. due to page not yet created)
else if (!parag->isValid())
kWarning() << "PARAGRAPH " << parag->paragId() << " STILL INVALID AFTER FORMATTING" << endl;
kWarning() << "PARAGRAPH " << parag->paragId() << " STILL INVALID AFTER FORMATTING";
#endif
m_lastFormatted = parag->next();
}
......
......@@ -482,7 +482,7 @@ int KoTextParag::lineHeightOfChar( int i, int *bl, int *y ) const
--it;
}
kWarning(32500) << "KoTextParag::lineHeightOfChar: couldn't find lh for " << i << endl;
kWarning(32500) << "KoTextParag::lineHeightOfChar: couldn't find lh for " << i;
return 15;
}
......@@ -508,7 +508,7 @@ KoTextStringChar *KoTextParag::lineStartOfChar( int i, int *index, int *line ) c
--l;
}
kWarning(32500) << "KoTextParag::lineStartOfChar: couldn't find " << i << endl;
kWarning(32500) << "KoTextParag::lineStartOfChar: couldn't find " << i;
return 0;
}
......@@ -535,7 +535,7 @@ KoTextStringChar *KoTextParag::lineStartOfLine( int line, int *index ) const
return &str->at( i );
}
kWarning(32500) << "KoTextParag::lineStartOfLine: couldn't find " << line << endl;
kWarning(32500) << "KoTextParag::lineStartOfLine: couldn't find " << line;
return 0;
}
......@@ -768,7 +768,7 @@ bool KoTextParag::fullSelected( int id ) const
int KoTextParag::lineY( int l ) const
{
if ( l > (int)lineStarts.count() - 1 ) {
kWarning(32500) << "KoTextParag::lineY: line " << l << " out of range!" << endl;
kWarning(32500) << "KoTextParag::lineY: line " << l << " out of range!";
return 0;
}
......@@ -784,7 +784,7 @@ int KoTextParag::lineY( int l ) const
int KoTextParag::lineBaseLine( int l ) const
{
if ( l > (int)lineStarts.count() - 1 ) {
kWarning(32500) << "KoTextParag::lineBaseLine: line " << l << " out of range!" << endl;
kWarning(32500) << "KoTextParag::lineBaseLine: line " << l << " out of range!";
return 10;
}
......@@ -800,7 +800,7 @@ int KoTextParag::lineBaseLine( int l ) const
int KoTextParag::lineHeight( int l ) const
{
if ( l > (int)lineStarts.count() - 1 ) {
kWarning(32500) << "KoTextParag::lineHeight: line " << l << " out of range!" << endl;
kWarning(32500) << "KoTextParag::lineHeight: line " << l << " out of range!";
return 15;
}
......@@ -816,7 +816,7 @@ int KoTextParag::lineHeight( int l ) const
void KoTextParag::lineInfo( int l, int &y, int &h, int &bl ) const
{
if ( l > (int)lineStarts.count() - 1 ) {
kWarning(32500) << "KoTextParag::lineInfo: line " << l << " out of range!" << endl;
kWarning(32500) << "KoTextParag::lineInfo: line " << l << " out of range!";
kDebug(32500) << (int)lineStarts.count() - 1 <<"" << l;
y = 0;
h = 15;
......@@ -913,7 +913,7 @@ void KoTextCursor::setIndex( int i, bool /*restore*/ )
// cursor, but this needs to be checked somewhere else.
if ( i < 0 || i > string->length() ) {
#if defined(QT_CHECK_RANGE)
kWarning(32500) << "KoTextCursor::setIndex: " << i << " out of range" << endl;
kWarning(32500) << "KoTextCursor::setIndex: " << i << " out of range";
//abort();
#endif
i = i < 0 ? 0 : string->length() - 1;
......@@ -1379,7 +1379,7 @@ int KoTextParag::calculateLineSpacing( int line, int startChar, int lastChar ) c
break;
}
}
kWarning() << "Unhandled linespacing type : " << m_layout.lineSpacingType << endl;
kWarning() << "Unhandled linespacing type : " << m_layout.lineSpacingType;
return 0+shadow;
}
......@@ -2010,7 +2010,7 @@ void KoTextParag::drawParagStringInternal( QPainter &painter, const QString &s,
bool KoTextParag::lineHyphenated( int l ) const
{
if ( l > (int)lineStarts.count() - 1 ) {
kWarning() << "KoTextParag::lineHyphenated: line " << l << " out of range!" << endl;
kWarning() << "KoTextParag::lineHyphenated: line " << l << " out of range!";
return false;
}
......@@ -2056,7 +2056,7 @@ void KoTextParag::copyParagData( KoTextParag *parag )
}
// This should never happen in KWord, but it happens in KPresenter
//else
// kWarning() << "Paragraph has no style " << paragId() << endl;
// kWarning() << "Paragraph has no style " << paragId();
// No "following style" setting, or same style -> copy layout & format of previous paragraph
if (!styleApplied)
......@@ -2332,9 +2332,9 @@ void KoTextParag::printRTDebug( int info )
<< specialFlags
<< "] ------------------ " << endl;
if ( prev() && prev()->paragId() + 1 != paragId() )
kWarning() << " Previous paragraph " << prev() << " has ID " << prev()->paragId() << endl;
kWarning() << " Previous paragraph " << prev() << " has ID " << prev()->paragId();
if ( next() && next()->paragId() != paragId() + 1 )
kWarning() << " Next paragraph " << next() << " has ID " << next()->paragId() << endl;
kWarning() << " Next paragraph " << next() << " has ID " << next()->paragId();
//if ( !next() )
// kDebug(32500) <<" next is 0L";
kDebug(32500) <<" Style:" << style() <<"" << ( style() ? style()->name().toLocal8Bit().data() :"NO STYLE" );
......@@ -2765,7 +2765,7 @@ void KoTextParag::loadOasisSpan( const KoXmlElement& parent, KoOasisContext& con
textData, customItem );
if ( !handled )
{
kWarning(32500) << "Ignoring tag " << ts.tagName() << endl;
kWarning(32500) << "Ignoring tag " << ts.tagName();
context.styleStack().restore();
continue;
}
......
......@@ -491,7 +491,7 @@ inline void KoTextParag::setParagId( int i )
inline int KoTextParag::paragId() const
{
//if ( id == -1 )
// kWarning() << "invalid parag id!!!!!!!! (" << (void*)this << ")" << endl;
// kWarning() << "invalid parag id!!!!!!!! (" << (void*)this << ")";
return id;
}
......
......@@ -1146,7 +1146,7 @@ void KoTextView::slotToolActivated( const KDataToolInfo & info, const QString &
KDataTool* tool = info.createTool( );
if ( !tool )
{
kWarning() << "Could not create Tool !" << endl;
kWarning() << "Could not create Tool !";
return;
}
......
......@@ -152,7 +152,7 @@ void KoUserStyleCollection::updateStyleListOrder( const QStringList &lst )
if( style )
orderStyle.append( style );
else
kWarning(32500) << "updateStyleListOrder: style " << tmpString << " not found!" << endl;
kWarning(32500) << "updateStyleListOrder: style " << tmpString << " not found!";
}
// we'll lose (and leak) styles if the list didn't have all the styles
Q_ASSERT( m_styleList.count() == orderStyle.count() );
......
......@@ -1800,7 +1800,7 @@ void KoMailMergeVariable::loadOasis( const KoXmlElement &/*elem*/, KoOasisContex
void KoMailMergeVariable::saveOasis( KoXmlWriter& /*writer*/, KoTextSavingContext& /*context*/ ) const
{
kWarning(32500) << "Not implemented: OASIS saving of mail merge variables" << endl;
kWarning(32500) << "Not implemented: OASIS saving of mail merge variables";
}
......@@ -2091,10 +2091,10 @@ void KoFieldVariable::load( KoXmlElement& elem )
{
m_subtype = e.attribute( "subtype" ).toInt();
if ( m_subtype == VST_NONE )
kWarning() << "Field subtype of -1 found in the file !" << endl;
kWarning() << "Field subtype of -1 found in the file !";
m_varValue = QVariant( e.attribute( "value" ) );
} else
kWarning() << "FIELD element not found !" << endl;
kWarning() << "FIELD element not found !";
}
void KoFieldVariable::loadOasis( const KoXmlElement &elem, KoOasisContext& /*context*/ )
......@@ -2239,7 +2239,7 @@ void KoFieldVariable::recalc()
QString value;
switch( m_subtype ) {
case VST_NONE:
kWarning() << "KoFieldVariable::recalc() called with m_subtype = VST_NONE !" << endl;
kWarning() << "KoFieldVariable::recalc() called with m_subtype = VST_NONE !";
break;
case VST_FILENAME:
value = m_doc->url().fileName();
......@@ -2276,7 +2276,7 @@ void KoFieldVariable::recalc()
{
KoDocumentInfo * info = m_doc->documentInfo();
if ( !info )
kWarning() << "Author information not found in documentInfo !" << endl;
kWarning() << "Author information not found in documentInfo !";
else
{
if ( m_subtype == VST_AUTHORNAME )
......@@ -2316,7 +2316,7 @@ void KoFieldVariable::recalc()
KoDocumentInfo * info = m_doc->documentInfo();
if ( !info )
kWarning() << "'About' page not found in documentInfo !" << endl;
kWarning() << "'About' page not found in documentInfo !";
else
{
if ( m_subtype == VST_TITLE )
......
......@@ -95,7 +95,7 @@ void KoTextFrameLoader::loadFrame(KoTextLoadingContext& context, const KoXmlElem
loadImage(context, frameElem, ts, cursor);
}
else {
kWarning(32500) << "KoTextFrameLoader::loadFrame Unhandled frame: " << localName << endl;
kWarning(32500) << "KoTextFrameLoader::loadFrame Unhandled frame: " << localName;
}
}
}
......@@ -106,7 +106,7 @@ void KoTextFrameLoader::loadImage(KoTextLoadingContext& context, const KoXmlElem
const KoXmlElement imageElem = _imageElem;
KoShape* shape = loadImageShape(context, frameElem, imageElem, cursor);
if( ! shape ) {
kWarning(32500) << "KoTextFrameLoader::loadImage Failed to create picture shape" << endl;
kWarning(32500) << "KoTextFrameLoader::loadImage Failed to create picture shape";
return;
}
}
......
......@@ -169,7 +169,7 @@ void KoTextLoader::loadStyles(KoTextLoadingContext& context, QList<KoXmlElement*
followingStyles.append( following );
++stylesLoaded;
}
else kWarning() << "Found duplicate style declaration, overwriting former " << sty->name() << endl;
else kWarning() << "Found duplicate style declaration, overwriting former " << sty->name();
}
if( followingStyles.count() != styleList().count() ) kDebug(32500) <<"Ouch," << followingStyles.count() <<" following-styles, but" << styleList().count() <<" styles in styleList";
unsigned int i = 0;
......@@ -315,7 +315,7 @@ void KoTextLoader::loadBody(KoTextLoadingContext& context, const KoXmlElement& b
loadSection(context, tag, cursor);
}
else {
kWarning(32500)<<"KoTextLoader::loadBody unhandled text::"<<localName<<endl;
kWarning(32500)<<"KoTextLoader::loadBody unhandled text::"<<localName;
}
}
else if( tag.namespaceURI() == KoXmlNS::draw ) {
......@@ -323,7 +323,7 @@ void KoTextLoader::loadBody(KoTextLoadingContext& context, const KoXmlElement& b
loadFrame(context, tag, cursor);
}
else {
kWarning(32500)<<"KoTextLoader::loadBody unhandled draw::"<<localName<<endl;
kWarning(32500)<<"KoTextLoader::loadBody unhandled draw::"<<localName;
}
} else if( tag.namespaceURI() == KoXmlNS::table ) {
if ( localName == "table" ) {
......@@ -383,7 +383,7 @@ void KoTextLoader::loadBody(KoTextLoadingContext& context, const KoXmlElement& b
cursor.movePosition(QTextCursor::Right, QTextCursor::MoveAnchor, 1);
}
else {
kWarning(32500)<<"KoTextLoader::loadBody unhandled table::"<<localName<<endl;
kWarning(32500)<<"KoTextLoader::loadBody unhandled table::"<<localName;
}
}
context.styleStack().restore(); // remove the styles added by the paragraph or list
......@@ -970,7 +970,7 @@ void KoTextLoader::loadSpan(KoTextLoadingContext& context, const KoXmlElement& p
if ( !handled ) {
handled = textDocument()->loadSpanTag( ts, context, this, pos, textData, customItem );
if ( !handled ) {
kWarning(32500) << "Ignoring tag " << ts.tagName() << endl;
kWarning(32500) << "Ignoring tag " << ts.tagName();
context.styleStack().restore();
continue;
}
......
......@@ -77,7 +77,7 @@ bool KoOasisContext::pushListLevelStyle( const QString& listStyleName, int level
{
KoXmlElement* fullListStyle = oasisStyles().listStyles()[listStyleName];
if ( !fullListStyle ) {
kWarning(32500) << "List style " << listStyleName << " not found!" << endl;
kWarning(32500) << "List style " << listStyleName << " not found!";
return false;
}
else
......@@ -101,7 +101,7 @@ bool KoOasisContext::pushListLevelStyle( const QString& listStyleName, // for de
--i;
}
if ( listLevelStyle.isNull() ) {
kWarning(32500) << "List level style for level " << level << " in list style " << listStyleName << " not found!" << endl;
kWarning(32500) << "List level style for level " << level << " in list style " << listStyleName << " not found!";
return false;
}
//kDebug(32500) <<"Pushing list-level-style from list-style" << listStyleName <<" level" << level;
......
......@@ -105,7 +105,7 @@ void KoStyleManager::alteredStyle(const KoParagraphStyle *style) {
Q_ASSERT(style);
int id = style->styleId();
if(id <= 0) {
kWarning(32500) << "alteredStyle received from a non registered style!" << endl;
kWarning(32500) << "alteredStyle received from a non registered style!";
return;
}
if(! d->updateQueue.contains(id))
......@@ -123,7 +123,7 @@ void KoStyleManager::alteredStyle(const KoCharacterStyle *style) {
Q_ASSERT(style);
int id = style->styleId();
if(id <= 0) {
kWarning(32500) << "alteredStyle received from a non registered style!" << endl;
kWarning(32500) << "alteredStyle received from a non registered style!";
return;
}
if(! d->updateQueue.contains(id))
......
......@@ -1194,7 +1194,7 @@ bool KoDocument::saveToStream( QIODevice * dev )
dev->open( QIODevice::WriteOnly );
int nwritten = dev->write( s.data(), s.size() );
if ( nwritten != (int)s.size() )
kWarning(30003) << "KoDocument::saveToStream wrote " << nwritten << " - expected " << s.size() << endl;
kWarning(30003) << "KoDocument::saveToStream wrote " << nwritten << " - expected " << s.size();
return nwritten == (int)s.size();
}
......@@ -1446,7 +1446,7 @@ bool KoDocument::openURL( const KUrl & _url )
{
// We have no koffice shell when we are being embedded as a readonly part.
//if ( d->m_shells.isEmpty() )
// kWarning(30003) << "KoDocument::openURL no shell yet !" << endl;
// kWarning(30003) << "KoDocument::openURL no shell yet !";
// Add to recent actions list in our shells
Q3PtrListIterator<KoMainWindow> it( d->m_shells );
for (; it.current(); ++it )
......@@ -1678,7 +1678,7 @@ bool KoDocument::oldLoadAndParse(KoStore* store, const QString& filename, KoXmlD
if (!store->open(filename))
{
kWarning(30003) << "Entry " << filename << " not found!" << endl;
kWarning(30003) << "Entry " << filename << " not found!";
d->lastErrorMessage = i18n( "Could not find %1",filename );
return false;
}
......@@ -1954,7 +1954,7 @@ bool KoDocument::loadFromStore( KoStore* _store, const QString& url )
}
_store->close();
} else {
kWarning() << "couldn't open " << url << endl;
kWarning() << "couldn't open " << url;
}
_store->pushDirectory();
......@@ -2380,18 +2380,18 @@ QByteArray KoDocument::nativeFormatMimeType() const
{
KService::Ptr service = const_cast<KoDocument *>(this)->nativeService();
if ( !service ) {
kWarning(30003) << "No native service defined to read NativeMimeType from desktop file!" << endl;