Nikolay Sivov : msxml3: Fix xml declaration output when it' s specified in loaded document (in case of file).

Alexandre Julliard julliard at winehq.org
Mon Jul 9 14:56:38 CDT 2012


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

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Sun Jul  8 22:51:52 2012 +0400

msxml3: 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);




More information about the wine-cvs mailing list