cURL: follow redirects
[LibreOffice.git] / starmath / source / rtfexport.cxx
blobb0e947d15b818354d6b55531f6ed731206ef13f2
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
11 #include "rtfexport.hxx"
13 #include <svtools/rtfkeywd.hxx>
14 #include <filter/msfilter/rtfutil.hxx>
16 SmRtfExport::SmRtfExport(const SmNode* pIn)
17 : SmWordExportBase(pIn)
18 , m_pBuffer(nullptr)
19 , m_nEncoding(RTL_TEXTENCODING_DONTKNOW)
23 void SmRtfExport::ConvertFromStarMath(OStringBuffer& rBuffer, rtl_TextEncoding nEncoding)
25 if (!m_pTree)
26 return;
27 m_pBuffer = &rBuffer;
28 m_nEncoding = nEncoding;
29 m_pBuffer->append("{" OOO_STRING_SVTOOLS_RTF_IGNORE LO_STRING_SVTOOLS_RTF_MOMATH " ");
30 HandleNode(m_pTree, 0);
31 m_pBuffer->append("}"); // moMath
34 // NOTE: This is still work in progress and unfinished, but it already covers a good
35 // part of the rtf math stuff.
37 void SmRtfExport::HandleVerticalStack(const SmNode* pNode, int nLevel)
39 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MEQARR " ");
40 int size = pNode->GetNumSubNodes();
41 for (int i = 0; i < size; ++i)
43 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_ME " ");
44 HandleNode(pNode->GetSubNode(i), nLevel + 1);
45 m_pBuffer->append("}"); // me
47 m_pBuffer->append("}"); // meqArr
50 void SmRtfExport::HandleText(const SmNode* pNode, int /*nLevel*/)
52 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MR " ");
54 if (pNode->GetToken().eType == TTEXT) // literal text
55 m_pBuffer->append(LO_STRING_SVTOOLS_RTF_MNOR " ");
57 const SmTextNode* pTemp = static_cast<const SmTextNode*>(pNode);
58 SAL_INFO("starmath.rtf", "Text: " << pTemp->GetText());
59 for (sal_Int32 i = 0; i < pTemp->GetText().getLength(); i++)
61 sal_uInt16 nChar = pTemp->GetText()[i];
62 OUString aValue(SmTextNode::ConvertSymbolToUnicode(nChar));
63 m_pBuffer->append(msfilter::rtfutil::OutString(aValue, m_nEncoding));
66 m_pBuffer->append("}"); // mr
69 void SmRtfExport::HandleFractions(const SmNode* pNode, int nLevel, const char* type)
71 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MF " ");
72 if (type)
74 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MFPR " ");
75 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MTYPE " ");
76 m_pBuffer->append(type);
77 m_pBuffer->append("}"); // mtype
78 m_pBuffer->append("}"); // mfPr
80 assert(pNode->GetNumSubNodes() == 3);
81 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MNUM " ");
82 HandleNode(pNode->GetSubNode(0), nLevel + 1);
83 m_pBuffer->append("}"); // mnum
84 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MDEN " ");
85 HandleNode(pNode->GetSubNode(2), nLevel + 1);
86 m_pBuffer->append("}"); // mden
87 m_pBuffer->append("}"); // mf
90 void SmRtfExport::HandleAttribute(const SmAttributNode* pNode, int nLevel)
92 switch (pNode->Attribute()->GetToken().eType)
94 case TCHECK:
95 case TACUTE:
96 case TGRAVE:
97 case TBREVE:
98 case TCIRCLE:
99 case TVEC:
100 case TTILDE:
101 case THAT:
102 case TDOT:
103 case TDDOT:
104 case TDDDOT:
105 case TWIDETILDE:
106 case TWIDEHAT:
107 case TWIDEVEC:
108 case TBAR:
110 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MACC " ");
111 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MACCPR " ");
112 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MCHR " ");
113 OUString aValue(pNode->Attribute()->GetToken().cMathChar);
114 m_pBuffer->append(msfilter::rtfutil::OutString(aValue, m_nEncoding));
115 m_pBuffer->append("}"); // mchr
116 m_pBuffer->append("}"); // maccPr
117 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_ME " ");
118 HandleNode(pNode->Body(), nLevel + 1);
119 m_pBuffer->append("}"); // me
120 m_pBuffer->append("}"); // macc
121 break;
123 case TOVERLINE:
124 case TUNDERLINE:
125 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MBAR " ");
126 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MBARPR " ");
127 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MPOS " ");
128 m_pBuffer->append((pNode->Attribute()->GetToken().eType == TUNDERLINE) ? "bot" : "top");
129 m_pBuffer->append("}"); // mpos
130 m_pBuffer->append("}"); // mbarPr
131 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_ME " ");
132 HandleNode(pNode->Body(), nLevel + 1);
133 m_pBuffer->append("}"); // me
134 m_pBuffer->append("}"); // mbar
135 break;
136 case TOVERSTRIKE:
137 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MBORDERBOX " ");
138 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MBORDERBOXPR " ");
139 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MHIDETOP " 1}");
140 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MHIDEBOT " 1}");
141 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MHIDELEFT " 1}");
142 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MHIDERIGHT " 1}");
143 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MSTRIKEH " 1}");
144 m_pBuffer->append("}"); // mborderBoxPr
145 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_ME " ");
146 HandleNode(pNode->Body(), nLevel + 1);
147 m_pBuffer->append("}"); // me
148 m_pBuffer->append("}"); // mborderBox
149 break;
150 default:
151 HandleAllSubNodes(pNode, nLevel);
152 break;
156 void SmRtfExport::HandleRoot(const SmRootNode* pNode, int nLevel)
158 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MRAD " ");
159 if (const SmNode* argument = pNode->Argument())
161 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MDEG " ");
162 HandleNode(argument, nLevel + 1);
163 m_pBuffer->append("}"); // mdeg
165 else
167 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MRADPR " ");
168 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MDEGHIDE " 1}");
169 m_pBuffer->append("}"); // mradPr
170 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MDEG " }"); // empty but present
172 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_ME " ");
173 HandleNode(pNode->Body(), nLevel + 1);
174 m_pBuffer->append("}"); // me
175 m_pBuffer->append("}"); // mrad
178 namespace
180 OString mathSymbolToString(const SmNode* node, rtl_TextEncoding nEncoding)
182 assert(node->GetType() == NMATH || node->GetType() == NMATHIDENT);
183 const SmTextNode* txtnode = static_cast<const SmTextNode*>(node);
184 if (txtnode->GetText().isEmpty())
185 return OString();
186 assert(txtnode->GetText().getLength() == 1);
187 sal_Unicode chr = SmTextNode::ConvertSymbolToUnicode(txtnode->GetText()[0]);
188 OUString aValue(chr);
189 return msfilter::rtfutil::OutString(aValue, nEncoding);
193 void SmRtfExport::HandleOperator(const SmOperNode* pNode, int nLevel)
195 SAL_INFO("starmath.rtf", "Operator: " << int(pNode->GetToken().eType));
196 switch (pNode->GetToken().eType)
198 case TINT:
199 case TINTD:
200 case TIINT:
201 case TIIINT:
202 case TLINT:
203 case TLLINT:
204 case TLLLINT:
205 case TPROD:
206 case TCOPROD:
207 case TSUM:
209 const SmSubSupNode* subsup = pNode->GetSubNode(0)->GetType() == NSUBSUP ? static_cast<const SmSubSupNode*>(pNode->GetSubNode(0)) : nullptr;
210 const SmNode* operation = subsup ? subsup->GetBody() : pNode->GetSubNode(0);
211 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MNARY " ");
212 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MNARYPR " ");
213 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MCHR " ");
214 m_pBuffer->append(mathSymbolToString(operation, m_nEncoding));
215 m_pBuffer->append("}"); // mchr
216 if (!subsup || !subsup->GetSubSup(CSUB))
217 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MSUBHIDE " 1}");
218 if (!subsup || !subsup->GetSubSup(CSUP))
219 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MSUPHIDE " 1}");
220 m_pBuffer->append("}"); // mnaryPr
221 if (!subsup || !subsup->GetSubSup(CSUB))
222 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MSUB " }");
223 else
225 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MSUB " ");
226 HandleNode(subsup->GetSubSup(CSUB), nLevel + 1);
227 m_pBuffer->append("}"); // msub
229 if (!subsup || !subsup->GetSubSup(CSUP))
230 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MSUP " }");
231 else
233 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MSUP " ");
234 HandleNode(subsup->GetSubSup(CSUP), nLevel + 1);
235 m_pBuffer->append("}"); // msup
237 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_ME " ");
238 HandleNode(pNode->GetSubNode(1), nLevel + 1); // body
239 m_pBuffer->append("}"); // me
240 m_pBuffer->append("}"); // mnary
241 break;
243 case TLIM:
244 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MFUNC " ");
245 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MFNAME " ");
246 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MLIMLOW " ");
247 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_ME " ");
248 HandleNode(pNode->GetSymbol(), nLevel + 1);
249 m_pBuffer->append("}"); // me
250 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MLIM " ");
251 if (const SmSubSupNode* subsup = pNode->GetSubNode(0)->GetType() == NSUBSUP ? static_cast<const SmSubSupNode*>(pNode->GetSubNode(0)) : nullptr)
252 if (subsup->GetSubSup(CSUB))
253 HandleNode(subsup->GetSubSup(CSUB), nLevel + 1);
254 m_pBuffer->append("}"); // mlim
255 m_pBuffer->append("}"); // mlimLow
256 m_pBuffer->append("}"); // mfName
257 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_ME " ");
258 HandleNode(pNode->GetSubNode(1), nLevel + 1); // body
259 m_pBuffer->append("}"); // me
260 m_pBuffer->append("}"); // mfunc
261 break;
262 default:
263 SAL_INFO("starmath.rtf", "TODO: " << OSL_THIS_FUNC << " unhandled oper type");
264 break;
268 void SmRtfExport::HandleSubSupScriptInternal(const SmSubSupNode* pNode, int nLevel, int flags)
270 // rtf supports only a certain combination of sub/super scripts, but LO can have any,
271 // so try to merge it using several tags if necessary
272 if (flags == 0) // none
273 return;
274 if ((flags & (1 << RSUP | 1 << RSUB)) == (1 << RSUP | 1 << RSUB))
276 // m:sSubSup
277 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MSSUBSUP " ");
278 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_ME " ");
279 flags &= ~(1 << RSUP | 1 << RSUB);
280 if (flags == 0)
281 HandleNode(pNode->GetBody(), nLevel + 1);
282 else
283 HandleSubSupScriptInternal(pNode, nLevel, flags);
284 m_pBuffer->append("}"); // me
285 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MSUB " ");
286 HandleNode(pNode->GetSubSup(RSUB), nLevel + 1);
287 m_pBuffer->append("}"); // msub
288 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MSUP " ");
289 HandleNode(pNode->GetSubSup(RSUP), nLevel + 1);
290 m_pBuffer->append("}"); // msup
291 m_pBuffer->append("}"); // msubSup
293 else if ((flags & (1 << RSUB)) == 1 << RSUB)
295 // m:sSub
296 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MSSUB " ");
297 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_ME " ");
298 flags &= ~(1 << RSUB);
299 if (flags == 0)
300 HandleNode(pNode->GetBody(), nLevel + 1);
301 else
302 HandleSubSupScriptInternal(pNode, nLevel, flags);
303 m_pBuffer->append("}"); // me
304 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MSUB " ");
305 HandleNode(pNode->GetSubSup(RSUB), nLevel + 1);
306 m_pBuffer->append("}"); // msub
307 m_pBuffer->append("}"); // msSub
309 else if ((flags & (1 << RSUP)) == 1 << RSUP)
311 // m:sSup
312 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MSSUP " ");
313 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_ME " ");
314 flags &= ~(1 << RSUP);
315 if (flags == 0)
316 HandleNode(pNode->GetBody(), nLevel + 1);
317 else
318 HandleSubSupScriptInternal(pNode, nLevel, flags);
319 m_pBuffer->append("}"); // me
320 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MSUP " ");
321 HandleNode(pNode->GetSubSup(RSUP), nLevel + 1);
322 m_pBuffer->append("}"); // msup
323 m_pBuffer->append("}"); // msSup
325 else if ((flags & (1 << LSUP | 1 << LSUB)) == (1 << LSUP | 1 << LSUB))
327 // m:sPre
328 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MSPRE " ");
329 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MSUB " ");
330 HandleNode(pNode->GetSubSup(LSUB), nLevel + 1);
331 m_pBuffer->append("}"); // msub
332 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MSUP " ");
333 HandleNode(pNode->GetSubSup(LSUP), nLevel + 1);
334 m_pBuffer->append("}"); // msup
335 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_ME " ");
336 flags &= ~(1 << LSUP | 1 << LSUB);
337 if (flags == 0)
338 HandleNode(pNode->GetBody(), nLevel + 1);
339 else
340 HandleSubSupScriptInternal(pNode, nLevel, flags);
341 m_pBuffer->append("}"); // me
342 m_pBuffer->append("}"); // msPre
344 else if ((flags & (1 << CSUB)) == (1 << CSUB))
346 // m:limLow looks like a good element for central superscript
347 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MLIMLOW " ");
348 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_ME " ");
349 flags &= ~(1 << CSUB);
350 if (flags == 0)
351 HandleNode(pNode->GetBody(), nLevel + 1);
352 else
353 HandleSubSupScriptInternal(pNode, nLevel, flags);
354 m_pBuffer->append("}"); // me
355 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MLIM " ");
356 HandleNode(pNode->GetSubSup(CSUB), nLevel + 1);
357 m_pBuffer->append("}"); // mlim
358 m_pBuffer->append("}"); // mlimLow
360 else if ((flags & (1 << CSUP)) == (1 << CSUP))
362 // m:limUpp looks like a good element for central superscript
363 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MLIMUPP " ");
364 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_ME " ");
365 flags &= ~(1 << CSUP);
366 if (flags == 0)
367 HandleNode(pNode->GetBody(), nLevel + 1);
368 else
369 HandleSubSupScriptInternal(pNode, nLevel, flags);
370 m_pBuffer->append("}"); // me
371 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MLIM " ");
372 HandleNode(pNode->GetSubSup(CSUP), nLevel + 1);
373 m_pBuffer->append("}"); // mlim
374 m_pBuffer->append("}"); // mlimUpp
376 else
377 SAL_INFO("starmath.rtf", "TODO: " << OSL_THIS_FUNC << " unhandled subsup type");
380 void SmRtfExport::HandleMatrix(const SmMatrixNode* pNode, int nLevel)
382 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MM " ");
383 for (int row = 0; row < pNode->GetNumRows(); ++row)
385 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MMR " ");
386 for (int col = 0; col < pNode->GetNumCols(); ++col)
388 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_ME " ");
389 if (const SmNode* node = pNode->GetSubNode(row * pNode->GetNumCols() + col))
390 HandleNode(node, nLevel + 1);
391 m_pBuffer->append("}"); // me
393 m_pBuffer->append("}"); // mmr
395 m_pBuffer->append("}"); // mm
398 void SmRtfExport::HandleBrace(const SmBraceNode* pNode, int nLevel)
400 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MD " ");
401 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MDPR " ");
402 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MBEGCHR " ");
403 m_pBuffer->append(mathSymbolToString(pNode->OpeningBrace(), m_nEncoding));
404 m_pBuffer->append("}"); // mbegChr
405 std::vector< const SmNode* > subnodes;
406 if (pNode->Body()->GetType() == NBRACEBODY)
408 const SmBracebodyNode* body = static_cast<const SmBracebodyNode*>(pNode->Body());
409 bool separatorWritten = false; // assume all separators are the same
410 for (int i = 0; i < body->GetNumSubNodes(); ++i)
412 const SmNode* subnode = body->GetSubNode(i);
413 if (subnode->GetType() == NMATH || subnode->GetType() == NMATHIDENT)
415 // do not write, but write what separator it is
416 const SmMathSymbolNode* math = static_cast<const SmMathSymbolNode*>(subnode);
417 if (!separatorWritten)
419 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MSEPCHR " ");
420 m_pBuffer->append(mathSymbolToString(math, m_nEncoding));
421 m_pBuffer->append("}"); // msepChr
422 separatorWritten = true;
425 else
426 subnodes.push_back(subnode);
429 else
430 subnodes.push_back(pNode->Body());
431 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MENDCHR " ");
432 m_pBuffer->append(mathSymbolToString(pNode->ClosingBrace(), m_nEncoding));
433 m_pBuffer->append("}"); // mendChr
434 m_pBuffer->append("}"); // mdPr
435 for (const SmNode* subnode : subnodes)
437 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_ME " ");
438 HandleNode(subnode, nLevel + 1);
439 m_pBuffer->append("}"); // me
441 m_pBuffer->append("}"); // md
444 void SmRtfExport::HandleVerticalBrace(const SmVerticalBraceNode* pNode, int nLevel)
446 SAL_INFO("starmath.rtf", "Vertical: " << int(pNode->GetToken().eType));
447 switch (pNode->GetToken().eType)
449 case TOVERBRACE:
450 case TUNDERBRACE:
452 bool top = (pNode->GetToken().eType == TOVERBRACE);
453 if (top)
454 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MLIMUPP " ");
455 else
456 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MLIMLOW " ");
457 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_ME " ");
458 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MGROUPCHR " ");
459 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MGROUPCHRPR " ");
460 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MCHR " ");
461 m_pBuffer->append(mathSymbolToString(pNode->Brace(), m_nEncoding));
462 m_pBuffer->append("}"); // mchr
463 // TODO not sure if pos and vertJc are correct
464 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MPOS " ").append(top ? "top" : "bot").append("}");
465 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MVERTJC " ").append(top ? "bot" : "top").append("}");
466 m_pBuffer->append("}"); // mgroupChrPr
467 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_ME " ");
468 HandleNode(pNode->Body(), nLevel + 1);
469 m_pBuffer->append("}"); // me
470 m_pBuffer->append("}"); // mgroupChr
471 m_pBuffer->append("}"); // me
472 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MLIM " ");
473 HandleNode(pNode->Script(), nLevel + 1);
474 m_pBuffer->append("}"); // mlim
475 m_pBuffer->append("}"); // mlimUpp or mlimLow
476 break;
478 default:
479 SAL_INFO("starmath.rtf", "TODO: " << OSL_THIS_FUNC << " unhandled vertical brace type");
480 break;
484 void SmRtfExport::HandleBlank()
486 m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_MR " ");
487 m_pBuffer->append(" ");
488 m_pBuffer->append("}"); // mr
491 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */