Created attachment 185855 [details] test document Steps: 1. Open Writer or Calc 2. Insert > Chart (use defaults) 3. Exist chart editing mode 4. Draw a drawing object (e.g. a line) that is wider than the width of the chart area, copy it 5. Enter chart edit mode and paste the drawing object (or use attachment to directly copy-paste object into chart) Results: Object overflows, goes beyond the chart area. This means that at least one of the handle is not reachable, and that the rest of the chart is scaled down to fit the drawing object when exiting edit mode. Expected: Drawing object is scaled down to fit the chart area. Notes: - Also reproducible with pasting a Fontwork object - MS Office, when following the same steps, scales down the object so it fits in the chart area. - We already make it hard to end up with a drawing object bigger than the chart area, by blocking movement when it reaches the edges, and by automatically resetting size values when change by hand. - If this is fixed, Bug 154065 would probably also be fixed (unless there is another way to end up with an overflowing drawing object) - We need to consider what to do with files that already have this kind of chart. MS Office removes the overflowing object from the chart at fileopen (tested both ODF and OOXML), which makes this issue a risk of dataloss. I feel like scaling it down is less problematic, and would be consistent with what should happen when pasting it in. Repro in: Version: 6.0.0.3 Build ID: 64a0f66915f38c6217de274f0aa8e15618924765 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk2; Locale: en-AU (en_AU.UTF-8); Calc: group And in recent master build: Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 288c0920a8475f9f2c537212e04aa7649192ad8c CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded In OOo 3.3, we could already paste the unchanged object in the chart, but the chart would not be squished when exiting edit mode. OpenOffice.org 3.3.0 OOO330m20 (Build:9567)
> Expected: > Drawing object is scaled down to fit the chart area. Or the extent of the "chart" needs to expand, so the full set of objects (and things like calculated text placement) is carried into the paste.
Seems there would be several ways to adjust things: Can increase the extent of the "chart" Can clip/trim the objects that extend beyond base extent of the "chart" Can scale the object to bring its end points within the "chart" The least "jarring" would be to extent the extent of the chart and deliver the same draw object(s) with the pasted chart.
Repro Arch Linux 64-bit, X11 Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 2ca71b5c6e0374254e7c75c75e54fa6a8caebfde CPU threads: 8; OS: Linux 6.2; UI render: default; VCL: kf5 (cairo+xcb) Locale: fi-FI (fi_FI.UTF-8); UI: en-US Calc: threaded Built on 30 March 2023
Seems related to bug 145599 and its dupes. Something not fully correct with its tweak? https://gerrit.libreoffice.org/c/core/+/143526