summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2017-01-18 15:52:33 +0300
committerAndras Timar <andras.timar@collabora.com>2017-03-06 17:52:52 +0100
commit4a9d48a3af0d703bad27fd40e7db26f4e843d7d5 (patch)
tree022b0ed35a2776bfd78a6ec8f3ff7617b7ff6f02 /sw/source
parent4caa4877daeb98e90f993ac5b4778bdd6f45e6dc (diff)
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@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit e36f0860f00af139a8fa94d36302f7b0c56383fe) Reviewed-on: https://gerrit.libreoffice.org/34695 (cherry picked from commit 1f87318abb50e164aa4125747493c5ee02e8687c)
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/filter/xml/xmlimpit.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index afc8004e0035..05e609d69b4c 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -785,7 +785,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 );
}
}