cui/source/tabpages/bbdlg.cxx | 2 - extensions/source/update/check/download.cxx | 2 + external/curl/ExternalProject_curl.mk | 13 ++++--- external/curl/UnpackedTarball_curl.mk | 1 external/curl/curl-msvc-disable-protocols.patch.1 | 24 +++++++++++++ filter/source/graphicfilter/itiff/itiff.cxx | 9 ++--- hwpfilter/source/hwpread.cxx | 7 ++++ sal/textenc/tcvtkr6.tab | 4 +- sc/qa/unit/data/slk/pass/numfmt-2.slk | 1 sc/qa/unit/data/slk/pass/numfmt.slk | 2 + svl/source/numbers/zforscan.cxx | 38 ++++++++++++---------- sw/source/core/docnode/ndnotxt.cxx | 18 +--------- sw/source/filter/ww8/ww8scan.cxx | 2 - vcl/source/filter/jpeg/jpegc.cxx | 6 +-- vcl/source/gdi/graph.cxx | 24 +++++++------ xmlscript/source/xmldlg_imexp/xmldlg_export.cxx | 2 - 16 files changed, 96 insertions(+), 59 deletions(-)
New commits: commit 34d1d02d6972367247bf0ac3c622ac8dd2650fe4 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Aug 10 11:25:14 2017 +0200 tdf#109177: Fix expected type of Orientation attr Regression introduced with 7e781aa15ab8c6bb727ccf290db7768bc9ba6245 "Clean up uses of Any::getValue() in xmlscript" Change-Id: I66df1c5aacab1d697438c57418c9100f9dba627a (cherry picked from commit 1fc6b2f745300eae03373a1beb5d5ff79cf7de10) Reviewed-on: https://gerrit.libreoffice.org/40956 Reviewed-by: Michael Stahl <mst...@redhat.com> Tested-by: Jenkins <c...@libreoffice.org> (cherry picked from commit 4b2dcb3eb74038f6e4c25cc1f1ee4ef2f0d25e11) diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx index b352053c8ee6..43c0db80ad8e 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx @@ -861,7 +861,7 @@ void ElementDescriptor::readOrientationAttr( OUString const & rPropName, OUStrin if (beans::PropertyState_DEFAULT_VALUE != _xPropState->getPropertyState( rPropName )) { Any a( _xProps->getPropertyValue( rPropName ) ); - if (auto n = o3tl::tryAccess<sal_Int16>(a)) + if (auto n = o3tl::tryAccess<sal_Int32>(a)) { switch (*n) { commit 1422b89e076fec84cab9a732648833ce03f09caa Author: Michael Stahl <mst...@redhat.com> Date: Wed Aug 9 17:38:14 2017 +0200 desktop,extensions: updater: only allow redirects to HTTP/HTTPS Configure curl to prevent redirects to other protocols. Change-Id: Ied73b3d9a062ea6e0a1d594f4c12162dffd6c4a7 (cherry picked from commit bd60bbfbdfbeb2687297e4512ddbea62a394ae67) Reviewed-on: https://gerrit.libreoffice.org/40940 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> (cherry picked from commit 3dceaeee4ff511f4c4b67846bdc5b87fda4a3633) diff --git a/extensions/source/update/check/download.cxx b/extensions/source/update/check/download.cxx index 43320b51fbdc..3a822dd81c87 100644 --- a/extensions/source/update/check/download.cxx +++ b/extensions/source/update/check/download.cxx @@ -238,6 +238,8 @@ bool curl_run(const OUString& rURL, OutData& out, const OString& aProxyHost, sal // enable redirection curl_easy_setopt(pCURL, CURLOPT_FOLLOWLOCATION, 1); + // only allow redirect to http:// and https:// + curl_easy_setopt(pCURL, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); // write function curl_easy_setopt(pCURL, CURLOPT_WRITEDATA, &out); commit 0e1a0b99565cc6b9cf63802e5a3ae26de67bdc5b Author: Michael Stahl <mst...@redhat.com> Date: Wed Aug 9 16:52:18 2017 +0200 curl: disable protocols nobody needs in MSVC build These are disabled via configure on other platforms. Change-Id: I4e27865396f3817ceb5645ab8589c21fdaa5afab (cherry picked from commit 152a1d279cbc81e7b5f076a2c4b20c12c6929ce6) Reviewed-on: https://gerrit.libreoffice.org/40939 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> (cherry picked from commit 34b0c0a07acf8dda6941260c750a171bee6e90dc) diff --git a/external/curl/UnpackedTarball_curl.mk b/external/curl/UnpackedTarball_curl.mk index 536474d4a30b..51e67dc56a0e 100644 --- a/external/curl/UnpackedTarball_curl.mk +++ b/external/curl/UnpackedTarball_curl.mk @@ -19,6 +19,7 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,curl,\ $(eval $(call gb_UnpackedTarball_add_patches,curl,\ external/curl/curl-msvc.patch.1 \ + external/curl/curl-msvc-disable-protocols.patch.1 \ external/curl/curl-msvc-schannel.patch.1 \ external/curl/curl-7.26.0_mingw.patch \ external/curl/curl-7.26.0_win-proxy.patch \ diff --git a/external/curl/curl-msvc-disable-protocols.patch.1 b/external/curl/curl-msvc-disable-protocols.patch.1 new file mode 100644 index 000000000000..38ff5ccb5ac0 --- /dev/null +++ b/external/curl/curl-msvc-disable-protocols.patch.1 @@ -0,0 +1,24 @@ +disable protocols nobody needs in MSVC build + +--- curl/lib/config-win32.h.orig 2017-08-09 16:43:29.464000000 +0200 ++++ curl/lib/config-win32.h 2017-08-09 16:47:38.549200000 +0200 +@@ -733,4 +733,19 @@ + # define ENABLE_IPV6 1 + #endif + ++#define CURL_DISABLE_DICT 1 ++#define CURL_DISABLE_FILE 1 ++//#undef CURL_DISABLE_FTP ++#define CURL_DISABLE_GOPHER 1 ++//#undef CURL_DISABLE_HTTP ++#define CURL_DISABLE_IMAP 1 ++#define CURL_DISABLE_LDAP 1 ++#define CURL_DISABLE_LDAPS 1 ++#define CURL_DISABLE_POP3 1 ++#define CURL_DISABLE_RTSP 1 ++#define CURL_DISABLE_SMB 1 ++#define CURL_DISABLE_SMTP 1 ++#define CURL_DISABLE_TELNET 1 ++#define CURL_DISABLE_TFTP 1 ++ + #endif /* HEADER_CURL_CONFIG_WIN32_H */ commit 4d9d6ead48d820d9809e30d8811c7d603d707171 Author: Michael Stahl <mst...@redhat.com> Date: Wed Aug 9 17:14:11 2017 +0200 curl: disable more unnecessary stuff Only HTTP and FTP should be required. Add --without-libpsl --disable-ares --disable-rtsp --disable-smb, and --without-libidn was replaced with --without-libidn2. Change-Id: Icf6afc8bff4cc7ad7a5a95b0c3f9a345a7cf67a3 (cherry picked from commit 9fd26734d3cbbd9b58f4b08058a75063632f57d1) Reviewed-on: https://gerrit.libreoffice.org/40938 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> (cherry picked from commit 3866238ace2bf6b5edde2bb3caaef463669c6925) diff --git a/external/curl/ExternalProject_curl.mk b/external/curl/ExternalProject_curl.mk index 76b4a4556103..5151d75c3f88 100644 --- a/external/curl/ExternalProject_curl.mk +++ b/external/curl/ExternalProject_curl.mk @@ -46,11 +46,14 @@ $(call gb_ExternalProject_get_state_target,curl,build): --with-darwinssl,\ --with-nss$(if $(SYSTEM_NSS),,="$(call gb_UnpackedTarball_get_dir,nss)/dist/out")) \ --without-ssl --without-gnutls --without-polarssl --without-cyassl --without-axtls \ - --without-libidn --enable-ftp --enable-ipv6 --enable-http --disable-gopher \ - --disable-file --disable-ldap --disable-telnet --disable-dict --without-libssh2 \ - --without-librtmp --disable-ldaps --disable-tftp --disable-pop3 \ - --disable-imap --disable-smtp --disable-manual --without-metalink \ - --without-nghttp2 \ + --enable-ftp --enable-http --enable-ipv6 \ + --without-libidn2 --without-libpsl --without-librtmp \ + --without-libssh2 --without-metalink --without-nghttp2 \ + --disable-ares \ + --disable-dict --disable-file --disable-gopher --disable-imap \ + --disable-ldap --disable-ldaps --disable-manual --disable-pop3 \ + --disable-rtsp --disable-smb --disable-smtp --disable-telnet \ + --disable-tftp \ $(if $(filter LINUX,$(OS)),--without-ca-bundle --without-ca-path) \ $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),--disable-shared,--disable-static) \ commit 20de750a5652709b04e68d49924756525453e219 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Aug 9 14:54:05 2017 +0100 Resolves: tdf#99286 for jpeg dpi use apis that know about MapUnit::MapPixel move the code which can do this from sw to vcl Change-Id: I9940fb80ecdbfe8f70afc500c691288ed0993701 Reviewed-on: https://gerrit.libreoffice.org/40932 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <mst...@redhat.com> (cherry picked from commit 939538e6a8d35c8ab4412908482feb053386bf3d) diff --git a/sw/source/core/docnode/ndnotxt.cxx b/sw/source/core/docnode/ndnotxt.cxx index 5ff587ef6b7f..91b923cb097f 100644 --- a/sw/source/core/docnode/ndnotxt.cxx +++ b/sw/source/core/docnode/ndnotxt.cxx @@ -121,21 +121,9 @@ const tools::PolyPolygon *SwNoTextNode::HasContour() const { if ( !bPixelGrf && bPixelContour ) { - const Size aGrfPixelSize( GetGraphic().GetSizePixel() ); - const Size aGrfPrefMapModeSize( GetGraphic().GetPrefSize() ); - if ( aGrfMap.GetMapUnit() == MapUnit::MapInch ) - { - nGrfDPIx = aGrfPixelSize.Width() / ( (double)aGrfMap.GetScaleX() * aGrfPrefMapModeSize.Width() ); - nGrfDPIy = aGrfPixelSize.Height() / ( (double)aGrfMap.GetScaleY() * aGrfPrefMapModeSize.Height() ); - } - else - { - const Size aGrf1000thInchSize = - OutputDevice::LogicToLogic( aGrfPrefMapModeSize, - aGrfMap, MapUnit::Map1000thInch ); - nGrfDPIx = 1000.0 * aGrfPixelSize.Width() / aGrf1000thInchSize.Width(); - nGrfDPIy = 1000.0 * aGrfPixelSize.Height() / aGrf1000thInchSize.Height(); - } + basegfx::B2DSize aDPI = GetGraphic().GetPPI(); + nGrfDPIx = aDPI.getX(); + nGrfDPIy = aDPI.getY(); } } OSL_ENSURE( !bPixelGrf || aGrfMap == aContourMap, diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx index 8fc0ed83b8bf..3353fe9c247a 100644 --- a/vcl/source/filter/jpeg/jpegc.cxx +++ b/vcl/source/filter/jpeg/jpegc.cxx @@ -251,7 +251,7 @@ void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, long* pLines, } bool WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream, - long nWidth, long nHeight, basegfx::B2DSize const & aPPI, bool bGreys, + long nWidth, long nHeight, basegfx::B2DSize const & rPPI, bool bGreys, long nQualityPercent, long aChromaSubsampling, css::uno::Reference<css::task::XStatusIndicator> const & status ) { @@ -290,8 +290,8 @@ bool WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream, jpeg_set_quality( &cinfo, (int) nQualityPercent, FALSE ); cinfo.density_unit = 1; - cinfo.X_density = aPPI.getX(); - cinfo.Y_density = aPPI.getY(); + cinfo.X_density = rPPI.getX(); + cinfo.Y_density = rPPI.getY(); if ( ( nWidth > 128 ) || ( nHeight > 128 ) ) jpeg_simple_progression( &cinfo ); diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index db4f1a7d0363..f0ce35e0aaee 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <tools/fract.hxx> #include <vcl/outdev.hxx> #include <vcl/svapp.hxx> #include <vcl/graph.hxx> @@ -401,24 +402,25 @@ void Graphic::SetPrefMapMode( const MapMode& rPrefMapMode ) basegfx::B2DSize Graphic::GetPPI() const { - MapMode aMapMode = GetPrefMapMode(); + double nGrfDPIx; + double nGrfDPIy; - double fWidthInches = ( GetPrefSize().Width() * aMapMode.GetUnitMultiplier() ) / 2540; - double fHeightInches = ( GetPrefSize().Height() * aMapMode.GetUnitMultiplier() ) / 2540; - double fPpiX = 0; - double fPpiY = 0; - - if ( fWidthInches > 0 || fHeightInches > 0 ) // we don't want a divide by 0 situation + const MapMode aGrfMap(GetPrefMapMode()); + const Size aGrfPixelSize(GetSizePixel()); + const Size aGrfPrefMapModeSize(GetPrefSize()); + if (aGrfMap.GetMapUnit() == MapUnit::MapInch) { - fPpiX = GetSizePixel().Width() / fWidthInches; - fPpiY = GetSizePixel().Height() / fHeightInches; + nGrfDPIx = aGrfPixelSize.Width() / ( (double)aGrfMap.GetScaleX() * aGrfPrefMapModeSize.Width() ); + nGrfDPIy = aGrfPixelSize.Height() / ( (double)aGrfMap.GetScaleY() * aGrfPrefMapModeSize.Height() ); } else { - SAL_WARN("vcl", "PPI X is " << fPpiX << " and PPI Y is " << fPpiY << ": thus we are making this 0 DPI. This is unlikely."); + const Size aGrf1000thInchSize = OutputDevice::LogicToLogic(aGrfPrefMapModeSize, aGrfMap, MapUnit::Map1000thInch); + nGrfDPIx = 1000.0 * aGrfPixelSize.Width() / aGrf1000thInchSize.Width(); + nGrfDPIy = 1000.0 * aGrfPixelSize.Height() / aGrf1000thInchSize.Height(); } - return basegfx::B2DSize( fPpiX, fPpiY ); + return basegfx::B2DSize(nGrfDPIx, nGrfDPIy); } Size Graphic::GetSizePixel( const OutputDevice* pRefDevice ) const commit 01fd957466413c20583ff6bb3ef6671fa4968ec0 Author: Julien Nabet <serval2...@yahoo.fr> Date: Sun Aug 6 01:20:13 2017 +0200 tdf#109863: use SID_PATTERN_LIST after bitmap tab converting instead of SID_BITMAP_LIST Regression from https://cgit.freedesktop.org/libreoffice/core/commit/?id=76585ae33f3ca75c05c0ccbf6a621b6e2d42bc00 Change-Id: I880ca149d5865ed5b80c57d7c5b390cc5606d66c Reviewed-on: https://gerrit.libreoffice.org/40798 Reviewed-by: Julien Nabet <serval2...@yahoo.fr> Tested-by: Julien Nabet <serval2...@yahoo.fr> Reviewed-on: https://gerrit.libreoffice.org/40806 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Katarina Behrens <katarina.behr...@cib.de> (cherry picked from commit 7529bbb238e932a35e5790a038e3cb6af4493393) diff --git a/cui/source/tabpages/bbdlg.cxx b/cui/source/tabpages/bbdlg.cxx index 23422c352118..8bbced32a2d2 100644 --- a/cui/source/tabpages/bbdlg.cxx +++ b/cui/source/tabpages/bbdlg.cxx @@ -75,7 +75,7 @@ void SvxBorderBackgroundDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPa { SfxItemSet aNew( *GetInputSetImpl()->GetPool(), - SID_COLOR_TABLE, SID_BITMAP_LIST, + SID_COLOR_TABLE, SID_PATTERN_LIST, SID_OFFER_IMPORT, SID_OFFER_IMPORT, 0, 0); commit 3d3175997e884924728ab2d3766ecc6287193797 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Aug 7 19:24:37 2017 +0100 ofz#2877: crash in SVTB16Short sal_uInt16 wraparound Change-Id: Ifd791bdd5f1b96576fdd4ca6665bb972fb8b1e4c Reviewed-on: https://gerrit.libreoffice.org/40853 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> (cherry picked from commit 19925f85fd3f9cf0cf82e8bcb0a4e90922879dc7) diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index ec3dc11da85c..0026ade52132 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -3509,7 +3509,7 @@ bool WW8PLCFx_SEPX::Find4Sprms(sal_uInt16 nId1,sal_uInt16 nId2,sal_uInt16 nId3,s p4 = nullptr; sal_uInt8* pSp = pSprms; - sal_uInt16 i=0; + size_t i = 0; while (i + maSprmParser.MinSprmLen() <= nSprmSiz) { // Sprm found? commit 390598fea6bb84e7e01cdd830261a66a0c56ef3a Author: Caolán McNamara <caol...@redhat.com> Date: Sat Aug 5 19:15:36 2017 +0100 ofz#2867 null deref Reviewed-on: https://gerrit.libreoffice.org/40792 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit 42b894f80a6d0c39bb0f7092eb204a15c22c4f38) Change-Id: If856473683685d79d88b024f7fafa2920b403bb7 Reviewed-on: https://gerrit.libreoffice.org/40794 Reviewed-by: Michael Stahl <mst...@redhat.com> Tested-by: Jenkins <c...@libreoffice.org> (cherry picked from commit 12569ca783263be8797ff19b532a9f03c34b4c2a) diff --git a/sc/qa/unit/data/slk/pass/numfmt-2.slk b/sc/qa/unit/data/slk/pass/numfmt-2.slk new file mode 100644 index 000000000000..5989cdc3e64e --- /dev/null +++ b/sc/qa/unit/data/slk/pass/numfmt-2.slk @@ -0,0 +1 @@ +P;Pÿ ÿ ÿ ÿ ÿ dÿ Sÿ0 \ No newline at end of file diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx index 2f08c600730d..4098fc9e85b3 100644 --- a/svl/source/numbers/zforscan.cxx +++ b/svl/source/numbers/zforscan.cxx @@ -2503,17 +2503,20 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString ) nTypeArray[i] = NF_SYMBOLTYPE_DIGIT; OUString& rStr = sStrArray[i]; i++; - nPos = nPos + sStrArray[i].getLength(); - nCounter++; - while (i < nAnzStrings && - sStrArray[i][0] == '0') + if (i < nAnzStrings) { - rStr += sStrArray[i]; nPos = nPos + sStrArray[i].getLength(); - nTypeArray[i] = NF_SYMBOLTYPE_EMPTY; - nAnzResStrings--; nCounter++; - i++; + while (i < nAnzStrings && + sStrArray[i][0] == '0') + { + rStr += sStrArray[i]; + nPos = nPos + sStrArray[i].getLength(); + nTypeArray[i] = NF_SYMBOLTYPE_EMPTY; + nAnzResStrings--; + nCounter++; + i++; + } } } else commit d0022ee68767d98c2e69f8d02d6dbc331ecd520a Author: Caolán McNamara <caol...@redhat.com> Date: Fri Aug 4 09:45:40 2017 +0100 ofz#2852 korean table entries start at 0xF not 0x7 Change-Id: Iaf3ed48d0eb0e5a57770af057c565a7310bb96d4 Reviewed-on: https://gerrit.libreoffice.org/40763 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <mst...@redhat.com> (cherry picked from commit c28ceacf6a1aedb4c965a513c72f7570244fbb6f) diff --git a/sal/textenc/tcvtkr6.tab b/sal/textenc/tcvtkr6.tab index de68d624f8b2..e03f3405e811 100644 --- a/sal/textenc/tcvtkr6.tab +++ b/sal/textenc/tcvtkr6.tab @@ -388,7 +388,7 @@ static ImplUniToDBCSHighTab const aKSC5601DBCSHighTab[256] = { 0x07, 0xFE, aImplUniToDBCSTab_KSC5601_5D }, /* 0x5D */ { 0x02, 0xFB, aImplUniToDBCSTab_KSC5601_5E }, /* 0x5E */ { 0x01, 0xFF, aImplUniToDBCSTab_KSC5601_5F }, /* 0x5F */ - { 0x07, 0xFB, aImplUniToDBCSTab_KSC5601_60 }, /* 0x60 */ + { 0x0F, 0xFB, aImplUniToDBCSTab_KSC5601_60 }, /* 0x60 */ { 0x01, 0xFF, aImplUniToDBCSTab_KSC5601_61 }, /* 0x61 */ { 0x00, 0xFF, aImplUniToDBCSTab_KSC5601_62 }, /* 0x62 */ { 0x01, 0xF7, aImplUniToDBCSTab_KSC5601_63 }, /* 0x63 */ @@ -1020,7 +1020,7 @@ static ImplUniToDBCSHighTab const aJOHABDBCSHighTab[256] = { 0x07, 0xFE, aImplUniToDBCSTab_JOHAB_5D }, /* 0x5D */ { 0x02, 0xFB, aImplUniToDBCSTab_JOHAB_5E }, /* 0x5E */ { 0x01, 0xFF, aImplUniToDBCSTab_JOHAB_5F }, /* 0x5F */ - { 0x07, 0xFB, aImplUniToDBCSTab_JOHAB_60 }, /* 0x60 */ + { 0x0F, 0xFB, aImplUniToDBCSTab_JOHAB_60 }, /* 0x60 */ { 0x01, 0xFF, aImplUniToDBCSTab_JOHAB_61 }, /* 0x61 */ { 0x00, 0xFF, aImplUniToDBCSTab_JOHAB_62 }, /* 0x62 */ { 0x01, 0xF7, aImplUniToDBCSTab_JOHAB_63 }, /* 0x63 */ commit 01a652679db4592f5d45d126b81be76840fa499f Author: Caolán McNamara <caol...@redhat.com> Date: Wed Aug 2 09:39:43 2017 +0100 Resolves: ofz#2833 null deref Change-Id: I021a716aa76d430a1d3c6fac2dddec4daa01e563 Reviewed-on: https://gerrit.libreoffice.org/40669 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <mst...@redhat.com> (cherry picked from commit 40ca8f569c9c7f24e94af3688ff32f5679c2f8f8) diff --git a/sc/qa/unit/data/slk/pass/numfmt.slk b/sc/qa/unit/data/slk/pass/numfmt.slk new file mode 100644 index 000000000000..85ea7b65c8f2 --- /dev/null +++ b/sc/qa/unit/data/slk/pass/numfmt.slk @@ -0,0 +1,2 @@ + +P;Pÿ s ÿ0 0 \ No newline at end of file diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx index 363a6219137e..2f08c600730d 100644 --- a/svl/source/numbers/zforscan.cxx +++ b/svl/source/numbers/zforscan.cxx @@ -2350,17 +2350,20 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString ) nTypeArray[i] = NF_SYMBOLTYPE_DIGIT; OUString& rStr = sStrArray[i]; i++; - nPos = nPos + sStrArray[i].getLength(); - nCounter++; - while (i < nAnzStrings && - sStrArray[i][0] == '0') + if (i < nAnzStrings) { - rStr += sStrArray[i]; nPos = nPos + sStrArray[i].getLength(); - nTypeArray[i] = NF_SYMBOLTYPE_EMPTY; - nAnzResStrings--; nCounter++; - i++; + while (i < nAnzStrings && + sStrArray[i][0] == '0') + { + rStr += sStrArray[i]; + nPos = nPos + sStrArray[i].getLength(); + nTypeArray[i] = NF_SYMBOLTYPE_EMPTY; + nAnzResStrings--; + nCounter++; + i++; + } } } else commit 286e84b2bf619dcdb14760d5dee1c3c532501069 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 3 14:37:30 2017 +0100 ofz#2846 null deref Change-Id: I88b61d7a4faaed118db8df6f99cef08310c1f2eb Reviewed-on: https://gerrit.libreoffice.org/40726 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <mst...@redhat.com> (cherry picked from commit c349ea47a72c92d39aed4649afe493dc7911229e) diff --git a/hwpfilter/source/hwpread.cxx b/hwpfilter/source/hwpread.cxx index 608fd0371da2..72aee0f3974a 100644 --- a/hwpfilter/source/hwpread.cxx +++ b/hwpfilter/source/hwpread.cxx @@ -431,6 +431,13 @@ bool Picture::Read(HWPFile & hwpf) UpdateBBox(this); if( pictype != PICTYPE_DRAW ) style.cell = reserved3; + else + { + //picinfo.picun read above is unioned with + //picinfo.picdraw and so wrote to the hdo pointer + //value, which is definitely not useful to us + picinfo.picdraw.hdo = nullptr; + } if (follow_block_size != 0) { commit 2cae2622fcf21d3c453dabacf78d3c36c1b038ac Author: Caolán McNamara <caol...@redhat.com> Date: Fri Jul 28 10:07:50 2017 +0100 ofz#2766 ensure palette is large enough for all colors Change-Id: I4669b473f5975ac74a37025f7c936f13bcfea420 Reviewed-on: https://gerrit.libreoffice.org/40513 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <mst...@redhat.com> (cherry picked from commit 133010a0efc8715f95e0ea0f66c22352dd55654a) diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx index db1ddccd1e64..7031d7daee30 100644 --- a/filter/source/graphicfilter/itiff/itiff.cxx +++ b/filter/source/graphicfilter/itiff/itiff.cxx @@ -1111,7 +1111,7 @@ void TIFFReader::MakePalCol() { if ( nDstBitsPerPixel <= 8 ) { - sal_uLong i, nVal, n0RGB; + sal_uLong nVal, n0RGB; if ( pColorMap == nullptr ) pColorMap = new sal_uLong[ 256 ]; if ( nPhotometricInterpretation <= 1 ) @@ -1124,8 +1124,8 @@ void TIFFReader::MakePalCol() SAL_WARN("filter.tiff", "palette has less entries that largest index used. Expanding palette to match"); nNumColors = nLargestPixelIndex + 1; } - pAcc->SetPaletteEntryCount( (sal_uInt16)nNumColors ); - for ( i = 0; i < nNumColors; i++ ) + + for (sal_uLong i = 0; i < nNumColors; ++i) { nVal = ( i * 255 / ( nNumColors - 1 ) ) & 0xff; n0RGB = nVal | ( nVal << 8 ) | ( nVal << 16 ); @@ -1135,7 +1135,8 @@ void TIFFReader::MakePalCol() pColorMap[ nNumColors - i - 1 ] = n0RGB; } } - for ( i = 0; i < nNumColors; i++ ) + pAcc->SetPaletteEntryCount(std::max<sal_uInt16>(nNumColors, pAcc->GetPaletteEntryCount())); + for (sal_uLong i = 0; i < nNumColors; ++i) { pAcc->SetPaletteColor( (sal_uInt16)i, BitmapColor( (sal_uInt8)( pColorMap[ i ] >> 16 ), (sal_uInt8)( pColorMap[ i ] >> 8 ), (sal_uInt8)pColorMap[ i ] ) );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits