[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-16 21:53:08
[Download RAW message or body]
CVS commit by goutte:
- write \* mergeformat correctly like MS Word (not like OOWriter 1.0.x)
- prepare wrting of date formats
(However date/time formats are more difficult than I thought.)
M +23 -10 ExportFilter.cc 2.81
--- koffice/filters/kword/rtf/export/ExportFilter.cc #2.80:2.81
@@ -432,5 +432,18 @@ QString RTFWorker::ProcessParagraphData
{
// ### TODO: fixed/variable date, exact custom formats
- str += "{\\field{\\*\\fldinst DATE \\\\* MERGEFORMAT }{\\fldrslt ";
+ QString key((*paraFormatDataIt).variable.m_key.mid(4));
+ if (key == "locale")
+ key = QString::null; // ###TODO
+ str += "{\\field{\\*\\fldinst DATE ";
+ if (!key.isEmpty())
+ {
+ kdDebug(30515) << "Date format: " << key << endl;
+#if 0
+ str += "\\@ \"";
+ str += key;
+ str += "\" ";
+#endif
+ }
+ str += "\\* MERGEFORMAT }{\\fldrslt ";
str += escapeRtfText((*paraFormatDataIt).variable.m_text);
str += "}}";
@@ -439,5 +452,5 @@ QString RTFWorker::ProcessParagraphData
{
// ### TODO: fixed/variable time, exact custom formats
- str += "{\\field{\\*\\fldinst TIME \\\\* MERGEFORMAT }{\\fldrslt ";
+ str += "{\\field{\\*\\fldinst TIME \\* MERGEFORMAT }{\\fldrslt ";
str += escapeRtfText((*paraFormatDataIt).variable.m_text);
str += "}}";
@@ -448,5 +461,5 @@ QString RTFWorker::ProcessParagraphData
if ((*paraFormatDataIt).variable.isPageNumber())
{
- str += "{\\field{\\*\\fldinst PAGE \\\\* MERGEFORMAT }{\\fldrslt ";
+ str += "{\\field{\\*\\fldinst PAGE \\* MERGEFORMAT }{\\fldrslt ";
str += escapeRtfText((*paraFormatDataIt).variable.m_text);
str += "}}";
@@ -454,5 +467,5 @@ QString RTFWorker::ProcessParagraphData
else if ((*paraFormatDataIt).variable.isPageCount())
{
- str += "{\\field{\\*\\fldinst NUMPAGES \\\\* MERGEFORMAT }{\\fldrslt ";
+ str += "{\\field{\\*\\fldinst NUMPAGES \\* MERGEFORMAT }{\\fldrslt ";
str += escapeRtfText((*paraFormatDataIt).variable.m_text);
str += "}}";
@@ -479,5 +492,5 @@ QString RTFWorker::ProcessParagraphData
str += "{\\*\\fldinst ";
str += rtfField;
- str += " \\\\* MERGEFORMAT }";
+ str += " \\* MERGEFORMAT }";
str += "{\\fldrslt {";
str += value;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic