[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/filters/kword/rtf/export
From: Boudewijn Rempt <boud () valdyas ! org>
Date: 2009-08-03 18:42:05
Message-ID: 1249324925.743083.8835.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1006430 by rempt:
Small q3 cleanup
Remove superfluous protected variable and includes
M +36 -38 ExportFilter.cc
M +9 -11 ExportFilter.h
--- trunk/koffice/filters/kword/rtf/export/ExportFilter.cc #1006429:1006430
@@ -26,12 +26,10 @@
#include <QFileInfo>
#include <qfontinfo.h>
#include <QFontDatabase>
-#include <q3picture.h>
#include <QImage>
#include <QRegExp>
#include <QColor>
#include <QDateTime>
-//Added by qt3to4:
#include <QTextStream>
#include <QList>
@@ -173,7 +171,7 @@
QString endOfParagraph;
QList<ParaData> *paraList = (*itCell).paraList;
QList<ParaData>::ConstIterator it;
- QList<ParaData>::ConstIterator end(paraList->end());
+ QList<ParaData>::ConstIterator end(paraList->end());
for (it=paraList->begin();it!=end;++it)
{
rowText += endOfParagraph;
@@ -453,11 +451,11 @@
else
{
if (layout.counter.numbering!=0)
- {
- markup += "\\pnlvl";
- markup += QString::number(layout.counter.depth + 1);
- markup += "\\pnprev1";
- }
+ {
+ markup += "\\pnlvl";
+ markup += QString::number(layout.counter.depth + 1);
+ markup += "\\pnprev1";
+ }
else if (layout.counter.style==1)
{
markup += "\\pnlvlbody";
@@ -572,7 +570,7 @@
//Retrieve text
partialText=paraText.mid ( (*paraFormatDataIt).pos, \
(*paraFormatDataIt).len );
content +=formatTextParagraph(partialText, formatRef, \
*paraFormatDataIt);
- }
+ }
else if (4==(*paraFormatDataIt).id)
{
// ### TODO: put date/time fields into own method.
@@ -758,32 +756,32 @@
kDebug(30515) <<"Found an anchor of type:" << \
(*paraFormatDataIt).frameAnchor.type; // We have an image, a clipart or a table
- if (6==(*paraFormatDataIt).frameAnchor.type)
+ if (6==(*paraFormatDataIt).frameAnchor.type)
{
- if (!content.isEmpty())
- {
- str += m_prefix;
- str += markup;
- str += " {";
- str += content;
- str += '}';
- str += m_eol;
- content.clear();
- if (!m_inTable)
- {
- m_prefix = "\\par";
- }
- }
- str += makeTable((*paraFormatDataIt).frameAnchor);
- }
+ if (!content.isEmpty())
+ {
+ str += m_prefix;
+ str += markup;
+ str += " {";
+ str += content;
+ str += '}';
+ str += m_eol;
+ content.clear();
+ if (!m_inTable)
+ {
+ m_prefix = "\\par";
+ }
+ }
+ str += makeTable((*paraFormatDataIt).frameAnchor);
+ }
else if ((2==(*paraFormatDataIt).frameAnchor.type) || \
(5==(*paraFormatDataIt).frameAnchor.type)) {
content += makeImage((*paraFormatDataIt).frameAnchor);
}
- }
+ }
}
}
@@ -793,14 +791,14 @@
if (!content.isEmpty())
{
str += m_prefix;
- str += markup;
- str += " {";
- str += content;
- str += '}';
- str += m_eol;
- if (m_inTable==false)
- {
- m_prefix = "\\par";
+ str += markup;
+ str += " {";
+ str += content;
+ str += '}';
+ str += m_eol;
+ if (m_inTable==false)
+ {
+ m_prefix = "\\par";
}
}
if (str.isEmpty())
@@ -842,7 +840,7 @@
str += " {";
QList<ParaData>::ConstIterator it;
- QList<ParaData>::ConstIterator end(header.para.end());
+ QList<ParaData>::ConstIterator end(header.para.end());
for (it=header.para.begin();it!=end;++it)
content += ProcessParagraphData( \
(*it).text,(*it).layout,(*it).formattingList);
@@ -877,7 +875,7 @@
str += " {";
QList<ParaData>::ConstIterator it;
- QList<ParaData>::ConstIterator end(footer.para.end());
+ QList<ParaData>::ConstIterator end(footer.para.end());
for (it=footer.para.begin();it!=end;++it)
content += ProcessParagraphData( \
(*it).text,(*it).layout,(*it).formattingList);
@@ -1702,7 +1700,7 @@
QString strMarkup("\\s"); // Holds RTF markup for the style
QList < LayoutData > ::ConstIterator it;
- QList < LayoutData > ::ConstIterator end(m_styleList.end());
+ QList < LayoutData > ::ConstIterator end(m_styleList.end());
// search color table for this color
for( it = m_styleList.begin(); it != end; counter++, ++it )
--- trunk/koffice/filters/kword/rtf/export/ExportFilter.h #1006429:1006430
@@ -21,10 +21,8 @@
#ifndef EXPORTFILTERFULLPOWER_H
#define EXPORTFILTERFULLPOWER_H
-#include <q3valuestack.h>
#include <QList>
#include <QStringList>
-//Added by qt3to4:
#include <QTextStream>
#include <KWEFBaseWorker.h>
@@ -47,14 +45,14 @@
virtual bool doOpenDocument(void);
virtual bool doCloseDocument(void);
virtual bool doFullParagraph(const QString& paraText, const LayoutData& layout,
- const ValueListFormatData& paraFormatDataList);
+ const ValueListFormatData& paraFormatDataList);
virtual bool doFullDocumentInfo(const KWEFDocumentInfo& docInfo);
virtual bool doOpenTextFrameSet(void);
virtual bool doCloseTextFrameSet(void);
virtual bool doFullPaperFormat(const int format,
- const double width, const double height, const int orientation);
+ const double width, const double height, const \
int orientation); virtual bool doFullPaperBorders (const double top, const double \
left,
- const double bottom, const double right);
+ const double bottom, const double right);
virtual bool doFullDefineStyle(LayoutData& layout);
virtual bool doHeader(const HeaderData& header);
virtual bool doFooter(const FooterData& footer);
@@ -63,7 +61,7 @@
private:
QString openSpan(const FormatData& formatOrigin, const FormatData& format);
QString closeSpan(const FormatData& formatOrigin, const FormatData& format);
- /**
+ /**
* Encodes the @p text into
* RTF seven bit ASCII. This affects any 8 bit characters.
* They are encoded either with \\' or with \\u
@@ -71,9 +69,9 @@
*/
QString escapeRtfText ( const QString& text ) const;
QString ProcessParagraphData ( const QString ¶Text,
- const LayoutData& layout, const ValueListFormatData ¶FormatDataList);
+ const LayoutData& layout, const \
ValueListFormatData ¶FormatDataList); QString formatTextParagraph(const QString& \
strText,
- const FormatData& formatOrigin, const FormatData& format);
+ const FormatData& formatOrigin, const FormatData& \
format); QString makeTable(const FrameAnchor& anchor);
bool convertUnknownPicture(const QString& strName, const QString& extension, \
QByteArray& image); QString makeImage(const FrameAnchor& anchor);
@@ -81,9 +79,9 @@
void writeColorData(void);
void writeStyleData(void);
QString textFormatToRtf(const TextFormatting& formatOrigin,
- const TextFormatting& formatData, const bool force);
+ const TextFormatting& formatData, const bool force);
QString layoutToRtf(const LayoutData& layoutOrigin,
- const LayoutData& layout, const bool force);
+ const LayoutData& layout, const bool force);
QString lookupFont(const QString& markup, const QString& fontName);
QString lookupColor(const QString& markup, const QColor& color);
QString lookupStyle(const QString& styleName, LayoutData& returnLayout);
@@ -97,7 +95,7 @@
QString m_textPage;
QString m_textBody;
QString m_fileName; ///< Name of the output file
- Q3ValueStack<ListInfo> m_listStack; ///< Stack for list information
+
QStringList m_fontList;
QList<QColor> m_colorList;
QList<LayoutData> m_styleList;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic