Nikolay Sivov : xmllite/writer: Fix formatted output with WriteFullEndElement().

Alexandre Julliard julliard at winehq.org
Fri Jul 15 09:07:04 CDT 2016


Module: wine
Branch: master
Commit: 099eda8eadfb9e7ee55aabb4dc5ef9913a929be2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=099eda8eadfb9e7ee55aabb4dc5ef9913a929be2

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Thu Jul 14 12:43:32 2016 +0300

xmllite/writer: Fix formatted output with WriteFullEndElement().

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/xmllite/writer.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/dlls/xmllite/writer.c b/dlls/xmllite/writer.c
index 699095b..bcc0e85 100644
--- a/dlls/xmllite/writer.c
+++ b/dlls/xmllite/writer.c
@@ -414,7 +414,6 @@ static HRESULT writer_close_starttag(xmlwriter *writer)
     if (!writer->starttagopen) return S_OK;
     hr = write_output_buffer(writer->output, gtW, ARRAY_SIZE(gtW));
     writer->starttagopen = FALSE;
-    writer->state = XmlWriterState_Content;
     return hr;
 }
 
@@ -958,6 +957,12 @@ static HRESULT WINAPI xmlwriter_WriteFullEndElement(IXmlWriter *iface)
     writer_close_starttag(This);
     writer_dec_indent(This);
 
+    /* don't force full end tag to the next line */
+    if (This->state == XmlWriterState_ElemStarted)
+        This->state = XmlWriterState_Content;
+    else
+        write_node_indent(This);
+
     /* write full end tag */
     write_output_buffer(This->output, closeelementW, ARRAY_SIZE(closeelementW));
     write_output_buffer(This->output, element->qname, element->len);




More information about the wine-cvs mailing list