SVN commit 651880 by zander: EBN fixes * don't use String::null * Fix duplicate include * fix spello M +1 -1 part/KWDocument.cpp M +10 -10 part/KWOpenDocumentLoader.cpp M +1 -1 plugins/scripting/Module.h M +0 -1 plugins/scripting/Tool.h --- trunk/koffice/kword/part/KWDocument.cpp #651879:651880 @@ -568,7 +568,7 @@ else if(page->pageSide() == KWPage::PageSpread) { side = "[PageSpread]"; pgnum++; - num += "-" + QString::number(pgnum); + num += '-' + QString::number(pgnum); } kDebug(32001) << "Page " << num << side << " width=" << page->width() << " height=" << page->height() << endl; } --- trunk/koffice/kword/part/KWOpenDocumentLoader.cpp #651879:651880 @@ -269,7 +269,7 @@ Q_ASSERT( styles.masterPages().contains(masterPageName) ); const QDomElement* masterPage = styles.masterPages()[ masterPageName ]; Q_ASSERT( masterPage ); - const QDomElement *masterPageStyle = masterPage ? styles.findStyle( masterPage->attributeNS( KoXmlNS::style, "page-layout-name", QString::null ) ) : 0; + const QDomElement *masterPageStyle = masterPage ? styles.findStyle( masterPage->attributeNS( KoXmlNS::style, "page-layout-name", QString() ) ) : 0; Q_ASSERT( masterPageStyle ); if ( masterPageStyle ) { KoPageLayout pageLayout = KoPageLayout::standardLayout(); @@ -337,7 +337,7 @@ const KoOasisStyles& styles = context.oasisStyles(); Q_ASSERT( styles.masterPages().contains(masterPageName) ); const QDomElement *masterPage = styles.masterPages()[ masterPageName ]; - const QDomElement *masterPageStyle = masterPage ? styles.findStyle( masterPage->attributeNS( KoXmlNS::style, "page-layout-name", QString::null ) ) : 0; + const QDomElement *masterPageStyle = masterPage ? styles.findStyle( masterPage->attributeNS( KoXmlNS::style, "page-layout-name", QString() ) ) : 0; #if 0 //1.6: // This check is done here and not in loadOasisPageLayout in case the Standard master-page // has no page information but the first paragraph points to a master-page that does (#129585) @@ -417,8 +417,8 @@ Q_ASSERT( !styleElem->isNull() ); //1.6: KoParagStyle::loadStyle - QString name = styleElem->attributeNS( KoXmlNS::style, "name", QString::null ); - QString displayName = styleElem->attributeNS( KoXmlNS::style, "display-name", QString::null ); + QString name = styleElem->attributeNS( KoXmlNS::style, "name", QString() ); + QString displayName = styleElem->attributeNS( KoXmlNS::style, "display-name", QString() ); if ( displayName.isEmpty() ) displayName = name; @@ -663,11 +663,11 @@ } //1.6: KWTextParag::loadOasis - QString styleName = parent.attributeNS( KoXmlNS::text, "style-name", QString::null ); + QString styleName = parent.attributeNS( KoXmlNS::text, "style-name", QString() ); kDebug()<<"==> PARAGRAPH styleName="<attributeNS( KoXmlNS::style, "master-page-name", QString::null ) : QString::null; + QString masterPageName = paragraphStyle ? paragraphStyle->attributeNS( KoXmlNS::style, "master-page-name", QString() ) : QString(); if ( masterPageName.isEmpty() ) masterPageName = "Standard"; @@ -748,7 +748,7 @@ } #else //1.6: KWTextParag::loadOasis - const QString styleName = parent.attributeNS( KoXmlNS::text, "style-name", QString::null ); + const QString styleName = parent.attributeNS( KoXmlNS::text, "style-name", QString() ); kDebug()<<"==> HEADING styleName="<document->styleManager()->paragraphStyle(styleName); @@ -985,7 +985,7 @@ //context.fillStyleStack( ts, KoXmlNS::text, "style-name", "text" ); context.styleStack().setTypeProperties( "text"/*"paragraph"*/ ); //const QString textStyleName = ts.attributeNS( KoXmlNS::text, "style-name", QString::null ); - const QString textStyleName = parent.attributeNS( KoXmlNS::text, "style-name", QString::null ); + const QString textStyleName = parent.attributeNS( KoXmlNS::text, "style-name", QString() ); const KoXmlElement* textStyleElem = textStyleName.isEmpty() ? 0 : context.oasisStyles().findStyle( textStyleName, "text"/*"paragraph"*/ ); KoCharacterStyle *charstyle1 = 0; if( textStyleElem ) { @@ -1058,7 +1058,7 @@ { int howmany = 1; if (ts.hasAttributeNS( KoXmlNS::text, "c")) - howmany = ts.attributeNS( KoXmlNS::text, "c", QString::null).toInt(); + howmany = ts.attributeNS( KoXmlNS::text, "c", QString()).toInt(); cursor.insertText( QString().fill(32, howmany) ); } else if ( isTextNS && localName == "tab" ) // text:tab --- trunk/koffice/kword/plugins/scripting/Module.h #651879:651880 @@ -60,7 +60,7 @@ * \endcode * * Python example that prints the documents Url and some other - * meta informations; + * meta information; * \code * import KWord * print KWord.document().url() --- trunk/koffice/kword/plugins/scripting/Tool.h #651879:651880 @@ -31,7 +31,6 @@ #include #include #include -#include //#include #include #include