summaryrefslogtreecommitdiff
path: root/src/xmlcomposer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmlcomposer.cpp')
-rw-r--r--src/xmlcomposer.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/xmlcomposer.cpp b/src/xmlcomposer.cpp
index c081764..f10ce0c 100644
--- a/src/xmlcomposer.cpp
+++ b/src/xmlcomposer.cpp
@@ -384,6 +384,7 @@ void XmlComposer::BaseAnalyser::applyParaFormatting(RtfFormatting* format,
if(DO_EXTRAS())
{
+ // Paragraph alignment
switch(format->paraAlign())
{
case RtfFormatting::CENTER:
@@ -396,6 +397,10 @@ void XmlComposer::BaseAnalyser::applyParaFormatting(RtfFormatting* format,
el.setAttribute(kAtAlign, kValJustify);
break;
};
+
+ // Paragraph left indent
+ if(format->paraIndent() != 0)
+ el.setAttribute(kAtIndent, formatInt(format->paraIndent()));
}
// These fix elements are later picked up in XmlFixups::fixBlocks
@@ -484,6 +489,10 @@ bool XmlComposer::BaseAnalyser::processTextContent(const string& cw, int flags,
else if(cw == "qj")
format.paraSetAlign(RtfFormatting::JUSTIFY);
+ // Paragraph indent
+ else if(cw == "li")
+ format.paraSetIndent(param / 20); // Convert from twips to points
+
// A line break
else if(cw == "line")
el = m_composer->createElement(kElLine);