Bug 44990 - Grid misalignment in Copy and Paste (regression in 3.5.0 wrt 3.4.x)
Summary: Grid misalignment in Copy and Paste (regression in 3.5.0 wrt 3.4.x)
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
3.5.0 RC1
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: (target:3.6.2)
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-20 06:30 UTC by Callegar
Modified: 2016-05-22 18:57 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Test case (8.13 KB, application/vnd.oasis.opendocument.graphics)
2012-01-23 01:02 UTC, Callegar
Details
Screenshot before copy and paste - 1 object, on grid (61.14 KB, image/png)
2012-01-23 01:02 UTC, Callegar
Details
Screenshot after copy and paste - two objects, one of them is the copied one, off grid (61.44 KB, image/png)
2012-01-23 01:03 UTC, Callegar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Callegar 2012-01-20 06:30:53 UTC
Suppose that I am drawing something with the grid on and that I have carefully aligned an object on grid.  Now suppose that I need to duplicate such object.

In 3.4.x I can copy the object (select + ctrl+c) and paste (ctrl+v). The so pasted objects does perfectly overlap the original object and can then be moved to its final location.

LibO 3.5.0beta3 when pasting tries to improve over 3.4 behavior by assuring that the pasted object does not perfectly overlap the original one. This can be convenient in that it avoids having identical overlapping objects that hide each other.

However, the logic used by LibO 3.5 to achieve this behavior is flawed and ends up being extremely inconvenient (and thus a regression wrt 3.4.x). In fact, the pasted object is not anymore aligned on grid, which makes it a pain to put it in its final location.

LibO, when pasting should assure that things that are aligned to grid remain aligned to grid. Specifically, a skew is inserted to avoid overlapping objects, this should be a multiple of the grid step.
Comment 1 Callegar 2012-01-23 01:02:08 UTC
Created attachment 56014 [details]
Test case

This is a test case for the bug.

Open the file. Check the object position and size. Top left is at x=8cm, y=1.6cm, on grid.

Select object, copy (ctrl+c) and paste (ctrl+v).

Check the copied object position and size. Top left is at x=7.95, y=1.55, off grid.

Note: seems to only happen with lines with special terminations and when such terminations have specific sizes.
Comment 2 Callegar 2012-01-23 01:02:49 UTC
Created attachment 56015 [details]
Screenshot before copy and paste - 1 object, on grid
Comment 3 Callegar 2012-01-23 01:03:29 UTC
Created attachment 56016 [details]
Screenshot after copy and paste - two objects, one of them is the copied one, off grid
Comment 4 martinstingl 2012-06-04 06:08:29 UTC
It may has something to do with the line width.
A duplicated line with width=0,00 keeps exactly its position. (pressing ctrl+c ant ctrl+v).
A duplicated line with width=0,10 gets shiftet by x=-0.05, y=-0.05 for example.
Comment 5 Callegar 2012-06-28 02:36:23 UTC
Yes, it definitely has to do with line width.

Recently I need to make drawings with a minimal line width set to 0.2 mm
(We have some printers that declare a super resolution of 1200 dpi, but then with
0.0, namely minimal width lines, do not print anything.)

In this condition working with libreoffice is simply impossible. Whenever you copy+paste or cut+paste alignment to the grid is lost.
Comment 6 martinstingl 2012-10-16 11:24:06 UTC
I cannot reproduce the bug with LO Version 3.6.2.2 (Windows) anymore.
Seems to be fixed at least for 3.6.2.2.
Comment 7 Rainer Bielefeld Retired 2013-04-10 04:49:04 UTC
Fix not known
<https://wiki.documentfoundation.org/BugReport_Details#Whiteboard>