Created attachment 122412 [details] Writer file with chart and macro On Windows 7 LO 5.0.4, after changing the data in a chart through the API, an infinite chart redraw loop results. To reproduce: Open the attached document and run the macro. The line oChart.ExtendedControlOverEmbeddedObject.changeState(1) triggers the redraw loop. But without this line the diagram will not show the changed data. The bug is NOT present on Ubuntu 14.04 LO 4.2 and Apache OO 4.1.2. The bug is also present when executing the following code from a C++ extension after changing the chart data: Reference < XEmbeddedObjectSupplier > xEOS(xChart, UNO_QUERY_THROW); Reference < ::com::sun::star::chart::XChartDocument > cDoc(xEOS->getEmbeddedObject(), UNO_QUERY_THROW); Reference< XPropertySet > dProperties(cDoc->getDiagram(), UNO_QUERY_THROW); Any type = dProperties->getPropertyValue(OU("SplineType")); dProperties->setPropertyValue(OU("SplineType"), makeAny(sal_uInt32(0))); dProperties->setPropertyValue(OU("SplineType"), makeAny(sal_uInt32(1))); dProperties->setPropertyValue(OU("SplineType"), type); Here changing the SplineType triggers the redraw loop. Note: This bug was found as a result of trying to get the chart to update when the data was changed. The line of code given above seems to be the only way to achieve this.
Repro. Works ok in 4.3 Win 7 Pro 64-bit Version: 5.2.0.0.alpha0+ Build ID: a6f876d45bd4e41a7143594a6cb11b6893a0f620 CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; TinderBox: Win-x86@39, Branch:master, Time: 2016-02-11_00:07:38 Locale: fi-FI (fi_FI) 4.3.0.1
bibisect-win32-5.0, oldest version contains bug too. git checkout oldest: Version: 4.5.0.0.alpha0+ Build ID: 57d6b92b69a31260dea0d84fcd1fc5866ada7adb
This seems to have begun at the below commit. Adding Cc: to Miklos Vajna ; Could you possibly take a look at this one? Thanks 4c13bb774851dcbf148fb625c88a307cde710f55 is the first bad commit commit 4c13bb774851dcbf148fb625c88a307cde710f55 Author: Matthew Francis <mjay.francis@gmail.com> Date: Sat Mar 14 20:55:22 2015 +0800 source-hash-e2b260fc98e833d4e64426b90992094f2da0498c commit e2b260fc98e833d4e64426b90992094f2da0498c Author: Miklos Vajna <vmiklos@collabora.co.uk> AuthorDate: Tue Jun 3 12:44:37 2014 +0200 Commit: Miklos Vajna <vmiklos@collabora.co.uk> CommitDate: Tue Jun 3 13:10:36 2014 +0200 sw: let layout not mark embedded object as modified The problem was that right after the import, the document wasn't marked as modified, but as layout settled, it got marked as modified. Given that we already have code to avoid modification when updating the replacement image, do something similar here: when setting the view area, make sure the embedded object's component is not marked as modified. Change-Id: I88a42829ec48db54178553661863a571cd2a268b :040000 040000 42998b78fbd5ea1b21c0ca161f235a2d765b6154 31aca97a24ffd3533d0c299c5fd7109fffb09394 M opt
Based on the bibisect result this is a pure writer issue.
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=078c00e3a3c971ac83154948d5f08462532b9dc6 tdf#97601 sw: don't mark an already modified chart as modified It will be available in 5.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Miklos Vajna committed a patch related to this issue. It has been pushed to "libreoffice-5-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=0be4633755e1e2d3639866e074a456e1de0de3a8&h=libreoffice-5-1 tdf#97601 sw: don't mark an already modified chart as modified It will be available in 5.1.3. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Miklos Vajna committed a patch related to this issue. It has been pushed to "libreoffice-5-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=707c8cc24ddb8df805947472f5438f8f9c866d2a&h=libreoffice-5-0 tdf#97601 sw: don't mark an already modified chart as modified It will be available in 5.0.6. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.