[Libreoffice-commits] core.git: Branch 'libreoffice-5-3-1' - sw/source

Justin Luth justin_luth at sil.org
Wed Mar 1 12:57:46 UTC 2017


 sw/source/filter/xml/xmlimpit.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6a170ee831a116b2aeb1506986fca4c672c75368
Author: Justin Luth <justin_luth at sil.org>
Date:   Wed Jan 18 15:52:33 2017 +0300

    tdf#77111 odt import: treat PAGEDESC_PAGENUMOFFSET==0 as auto
    
    Ever since 2010 commit 7edaf190 zeroes have been saved as XML_AUTO.
    Ever since 2014 commit c2ccd20c, a numoffset of zero is no longer
    considered to be auto (for MS compatibility) but is still treated
    as auto during xml export. Thus, any older documents that had been
    saved with a zero should still xml import as auto instead of as 0.
    
    Change-Id: I1a0df32a8e2f1b30b2bedbf4c9bb07ebec239637
    Reviewed-on: https://gerrit.libreoffice.org/33267
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit e36f0860f00af139a8fa94d36302f7b0c56383fe)
    Reviewed-on: https://gerrit.libreoffice.org/34694
    (cherry picked from commit ae225329435cb49e61e3c9fc76129aa4e334598a)
    Reviewed-on: https://gerrit.libreoffice.org/34698
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
    Tested-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index bb0f51e..058c951 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -786,7 +786,7 @@ bool SvXMLImportItemMapper::PutXMLValue(
                 sal_Int32 nVal;
                 bOk = ::sax::Converter::convertNumber(
                         nVal, rValue, 0, USHRT_MAX);
-                if( bOk )
+                if( bOk && nVal > 0 )
                     rPageDesc.SetNumOffset( (sal_uInt16)nVal );
             }
         }


More information about the Libreoffice-commits mailing list