[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/filters/kword/rtf/export
From: Nicolas Goutte <nicolasg () snafu ! de>
Date: 2003-09-26 18:49:48
[Download RAW message or body]
CVS commit by goutte:
Add a parameter for the keyword to lookupFont (like lookupColor)
M +9 -9 ExportFilter.cc 2.94
M +2 -2 ExportFilter.h 2.17
--- koffice/filters/kword/rtf/export/ExportFilter.cc #2.93:2.94
@@ -384,5 +384,5 @@ if (layout.counter.style)
markup += "\\fs";
markup += QString::number((2 * layout.formatData.text.fontSize));
- markup += lookupFont(layout.formatData.text.fontName);
+ markup += lookupFont("\\f",layout.formatData.text.fontName);
}
markup += " ";
@@ -519,7 +519,7 @@ if (layout.counter.style)
}
- if( layout.formatData.text.fontName != "" )
+ if( !layout.formatData.text.fontName.isEmpty() )
{
- markup += lookupFont(layout.formatData.text.fontName).insert( 1, "pn" );
+ markup += lookupFont("\\pnf", layout.formatData.text.fontName);
}
@@ -1233,5 +1233,5 @@ bool RTFWorker::doFullDefineStyle(Layout
// Now we must register a few things (with help of the lookup methods.)
- lookupFont(layout.formatData.text.fontName);
+ lookupFont("\\f", layout.formatData.text.fontName);
lookupColor(QString::null, layout.formatData.text.fgColor);
lookupColor(QString::null, layout.formatData.text.bgColor);
@@ -1291,5 +1291,5 @@ QString RTFWorker::textFormatToRtf(const
&& (force || (formatOrigin.fontName!=formatData.fontName)))
{
- strElement+=lookupFont(fontName);
+ strElement+=lookupFont("\\f", fontName);
}
@@ -1572,5 +1572,5 @@ QString RTFWorker::layoutToRtf(const Lay
-QString RTFWorker::lookupFont(const QString& fontName)
+QString RTFWorker::lookupFont(const QString& markup, const QString& fontName)
{
if (fontName.isEmpty())
@@ -1588,5 +1588,5 @@ QString RTFWorker::lookupFont(const QStr
uint counter=0; // counts position in font table (starts at 0)
- QString strFont("\\f"); // markup for font selection
+ QString strFont(markup); // markup for font selection
QStringList::ConstIterator it;
--- koffice/filters/kword/rtf/export/ExportFilter.h #2.16:2.17
@@ -79,5 +79,5 @@ private:
QString layoutToRtf(const LayoutData& layoutOrigin,
const LayoutData& layout, const bool force);
- QString lookupFont(const QString& fontName);
+ QString lookupFont(const QString& markup, const QString& fontName);
QString lookupColor(const QString& markup, const QColor& color);
QString lookupStyle(const QString& styleName, LayoutData& returnLayout);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic