[3/5] msxml3: Fix xml declaration output when it's specified in loaded document (in case of file)

Nikolay Sivov nsivov at codeweavers.com
Mon Jul 9 00:07:59 CDT 2012


Fix xml declaration output when it's specified in loaded document (in 
case of file)
-------------- next part --------------
>From e9751e73f507d4ecc8d91f94a0b7ff8bec8092f3 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <nsivov at codeweavers.com>
Date: Sun, 8 Jul 2012 22:51:52 +0400
Subject: [PATCH 3/5] Fix xml declaration output when it's specified in loaded document (in case of file)

---
 dlls/msxml3/domdoc.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c
index 5ac03e1..5711daf 100644
--- a/dlls/msxml3/domdoc.c
+++ b/dlls/msxml3/domdoc.c
@@ -2403,6 +2403,8 @@ static HRESULT WINAPI domdoc_save(
     case VT_BSTR:
     case VT_BSTR | VT_BYREF:
         {
+            int options = get_doc(This)->standalone == -1 ? XML_SAVE_NO_DECL : 0;
+
             /* save with file path */
             HANDLE handle = CreateFileW( (V_VT(&destination) & VT_BYREF)? *V_BSTRREF(&destination) : V_BSTR(&destination),
                                          GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL );
@@ -2414,7 +2416,7 @@ static HRESULT WINAPI domdoc_save(
 
             /* disable top XML declaration */
             ctx = xmlSaveToIO(domdoc_save_writecallback, domdoc_save_closecallback,
-                              handle, NULL, XML_SAVE_NO_DECL);
+                              handle, NULL, options);
             if (!ctx)
             {
                 CloseHandle(handle);
-- 
1.5.6.5




More information about the wine-patches mailing list