[Libreoffice-commits] core.git: sw/qa sw/source

Miklos Vajna vmiklos at collabora.co.uk
Sun Nov 2 09:52:21 PST 2014


 sw/qa/core/exportdata/ooxml/pass/abi9930.odt |binary
 sw/source/filter/ww8/docxattributeoutput.cxx |    2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d72237741ed1d8f976032ff2ee5d2a8702d3380e
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Sun Nov 2 18:22:16 2014 +0100

    abi#9930 DocxAttributeOutput::AddToAttrList: avoid duplicated attributes
    
    Change-Id: Ia799fc8b1b0e9bc6852b21194b71e1f3e683955e

diff --git a/sw/qa/core/exportdata/ooxml/pass/abi9930.odt b/sw/qa/core/exportdata/ooxml/pass/abi9930.odt
new file mode 100644
index 0000000..04638df
Binary files /dev/null and b/sw/qa/core/exportdata/ooxml/pass/abi9930.odt differ
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 90ba7b0..2c50867 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -8422,7 +8422,7 @@ void DocxAttributeOutput::AddToAttrList( ::sax_fastparser::FastAttributeList* &p
     {
         sal_Int32 nName = va_arg( args, sal_Int32 );
         const char* pValue = va_arg( args, const char* );
-        if( pValue )
+        if( pValue && !pAttrList->hasAttribute(nName) )
             pAttrList->add( nName, pValue );
     }
     va_end( args );


More information about the Libreoffice-commits mailing list