external/expat/UnpackedTarball_expat.mk | 1 external/expat/expat.getrandom_detection.patch.1 | 40 +++++++++++++++++++++++ sc/source/core/data/formulacell.cxx | 6 ++- svgio/inc/svgusenode.hxx | 2 + svgio/source/svgreader/svgusenode.cxx | 7 ++-- 5 files changed, 52 insertions(+), 4 deletions(-)
New commits: commit 7b0c7ca2ea294a14f09609b8b2e28cad0d715c99 Author: Dennis Francis <dennis.fran...@collabora.co.uk> Date: Thu Jul 13 11:35:41 2017 +0530 tdf#108758 : do not write to undo document when... ...updating references during a block move, for formula cells that are in the target range of the move operation. The fix is for formula cells that are not grouped. For the grouped case, it was already doing correctly. Added two unit tests in ucalc_formula.cxx for grouped formula and non-grouped formula cases. Reviewed-on: https://gerrit.libreoffice.org/39883 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Eike Rathke <er...@redhat.com> (cherry picked from commit 2caaf9bfe8d3f81517467daf36de0bd8ddd6b543) Conflicts: sc/qa/unit/ucalc.hxx sc/qa/unit/ucalc_formula.cxx Backported, excluding conflicting unit tests. Change-Id: I9f4d988f5e154f56670bd1c0cc366ee6704fb858 Reviewed-on: https://gerrit.libreoffice.org/39922 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Jenkins <c...@libreoffice.org> (cherry picked from commit 951af0302f60dfd5fc082552d85d8ddb522fc5a2) diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 4c6471f781a0..73d31106ab19 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -3211,7 +3211,9 @@ bool ScFormulaCell::UpdateReferenceOnMove( aUndoPos = *pUndoCellPos; ScAddress aOldPos( aPos ); - if (rCxt.maRange.In(aPos)) + bool bCellInMoveTarget = rCxt.maRange.In(aPos); + + if ( bCellInMoveTarget ) { // The cell is being moved or copied to a new position. I guess the // position has been updated prior to this call? Determine @@ -3300,7 +3302,7 @@ bool ScFormulaCell::UpdateReferenceOnMove( (bValChanged && bHasRelName ) || bOnRefMove) bNeedDirty = true; - if (pUndoDoc && (bValChanged || bRefModified || bOnRefMove)) + if (pUndoDoc && !bCellInMoveTarget && (bValChanged || bRefModified || bOnRefMove)) setOldCodeToUndo(pUndoDoc, aUndoPos, pOldCode.get(), eTempGrammar, cMatrixFlag); bValChanged = false; commit 5508e6b1f77da2e2333c1f62e87927309d111c63 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Jul 13 16:23:32 2017 +0100 Resolves: tdf#108903 avoid recurse to death Change-Id: Iadde719a024c5fce97aa0f4c58947a5012639a84 Reviewed-on: https://gerrit.libreoffice.org/39921 Reviewed-by: Michael Stahl <mst...@redhat.com> Tested-by: Jenkins <c...@libreoffice.org> (cherry picked from commit 2f64f2871d4e4091061d791db647de57ed390109) diff --git a/svgio/inc/svgusenode.hxx b/svgio/inc/svgusenode.hxx index a6eccaa05cd0..26c915b6ee2a 100644 --- a/svgio/inc/svgusenode.hxx +++ b/svgio/inc/svgusenode.hxx @@ -43,6 +43,8 @@ namespace svgio /// link to content. If maXLink is set, the node can be fetched // on demand OUString maXLink; + /// detect if maXLink causes a loop to ourself during decomposing + mutable bool mbDecomposingSvgNode; public: SvgUseNode( diff --git a/svgio/source/svgreader/svgusenode.cxx b/svgio/source/svgreader/svgusenode.cxx index 7495c2b1d5ad..7fdae9b3f68a 100644 --- a/svgio/source/svgreader/svgusenode.cxx +++ b/svgio/source/svgreader/svgusenode.cxx @@ -35,7 +35,8 @@ namespace svgio maY(), maWidth(), maHeight(), - maXLink() + maXLink(), + mbDecomposingSvgNode(false) { } @@ -143,7 +144,7 @@ namespace svgio // try to access link to content const SvgNode* pXLink = getDocument().findSvgNodeById(maXLink); - if(pXLink && Display_none != pXLink->getDisplay()) + if (pXLink && Display_none != pXLink->getDisplay() && !mbDecomposingSvgNode) { // decompose children drawinglayer::primitive2d::Primitive2DContainer aNewTarget; @@ -151,9 +152,11 @@ namespace svgio // todo: in case mpXLink is a SVGTokenSvg or SVGTokenSymbol the // SVG docs want the getWidth() and getHeight() from this node // to be valid for the subtree. + mbDecomposingSvgNode = true; const_cast< SvgNode* >(pXLink)->setAlternativeParent(this); pXLink->decomposeSvgNode(aNewTarget, true); const_cast< SvgNode* >(pXLink)->setAlternativeParent(); + mbDecomposingSvgNode = false; if(!aNewTarget.empty()) { commit 5d032804bce64ded3ddd3cec931dc9fca087a73b Author: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> Date: Thu Jul 13 15:23:32 2017 +0200 fix getrandom check in expat's configure https://github.com/libexpat/libexpat/issues/52 fixes /usr/include/sys/random.h:37:22: error: expected ')' misdetection of random.h feature, already fixed upstream: https://github.com/libexpat/libexpat/commit/602e6c78ca750c082b72f8cdf4a38839b312959f (cherry picked from commit f78ed1ec528604f6db9bdd2a07462c5e99e0ab99) Change-Id: I65e4aebaa838d2931a60cb34806d87b88861c4d8 Reviewed-on: https://gerrit.libreoffice.org/39908 Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <mst...@redhat.com> (cherry picked from commit d336ac35a60c8cb86d36c9aa6057f4e494cbbd87) diff --git a/external/expat/UnpackedTarball_expat.mk b/external/expat/UnpackedTarball_expat.mk index 60e933d76090..5d803dcf303a 100644 --- a/external/expat/UnpackedTarball_expat.mk +++ b/external/expat/UnpackedTarball_expat.mk @@ -13,6 +13,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,expat,$(EXPAT_TARBALL))) $(eval $(call gb_UnpackedTarball_add_patches,expat,\ external/expat/expat-winapi.patch \ + external/expat/expat.getrandom_detection.patch.1 \ )) # This is a bit hackish. diff --git a/external/expat/expat.getrandom_detection.patch.1 b/external/expat/expat.getrandom_detection.patch.1 new file mode 100644 index 000000000000..eaf25df767dd --- /dev/null +++ b/external/expat/expat.getrandom_detection.patch.1 @@ -0,0 +1,40 @@ +https://github.com/libexpat/libexpat/issues/52 + +fixes /usr/include/sys/random.h:37:22: error: expected ')' +misdetection of random.h feature, already fixed upstream: +https://github.com/libexpat/libexpat/commit/602e6c78ca750c082b72f8cdf4a38839b312959f + +diff -ur expat.org/configure expat/configure +--- expat.org/configure 2017-07-12 17:04:34.000000000 +0200 ++++ expat/configure 2017-07-12 17:05:59.000000000 +0200 +@@ -16341,7 +16341,7 @@ + } + + _ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : ++if ac_fn_c_try_link "$LINENO"; then : + + + $as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h +@@ -16386,7 +16386,8 @@ + conftest$ac_exeext conftest.$ac_ext + + fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + + + for ac_header in fcntl.h unistd.h +diff -ur expat.org/configure.ac expat/configure.ac +--- expat.org/configure.ac 2017-07-12 17:04:34.000000000 +0200 ++++ expat/configure.ac 2017-07-12 17:05:31.000000000 +0200 +@@ -130,7 +130,7 @@ + + + AC_MSG_CHECKING([for getrandom (Linux 3.17+, glibc 2.25+)]) +-AC_COMPILE_IFELSE([AC_LANG_SOURCE([ ++AC_LINK_IFELSE([AC_LANG_SOURCE([ + #include <stdlib.h> /* for NULL */ + #include <sys/random.h> + int main() {
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits