Issue 15251 - "Snap to Grid" doesn't work correctly
Summary: "Snap to Grid" doesn't work correctly
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 Beta2
Hardware: PC All
: P3 Trivial with 4 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Keywords: oooqa
: 71200 94711 (view as issue list)
Depends on:
Reported: 2003-06-03 18:05 UTC by gieschke
Modified: 2013-08-07 14:38 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description gieschke 2003-06-03 18:05:51 UTC
How to make it appear:

Create a new Text Document.

Enable "Snap to Grid" (+ "Visible Grid") with Resoultion horizontal "1cm", 
vertical "1cm" (+ "Synchronize axes") and Subdivison both hor. and vert. "0 

Set page to "A4" with no margins.

Draw a frame on the first page, change anchor to page.
Now move the frame around vertically.

[It will snap to 0cm, 1cm, 2cm, ...]

Insert a "manual page break" and draw another frame.
Now move the frame around vertically.

[It will snap to 0cm, 0.8cm, 1.8cm, 2.8cm, ... (NOT 0cm, 1cm, 2cm, ...!)]

Repeat the same for the next pages.

You will get these differences to the "normal" values:

Page 1: +0cm
Page 2: +0.8cm
Page 3: +0.6cm
Page 4: +0.41cm
Page 5: +0.21cm
Page 6: +0.01cm
Page 7: +0.81cm

[Note: I think the 0.01cm are caused by a conversion to inches, ...
But I can't find a reason for the other differences.]

If you change to height "29cm", you will get:

Page 1: +0cm
Page 2: +0.5cm
Page 3: +0cm
Page 4: +0.51cm

It's even more strange, if you take another Grid (e.g. 0.8cm).

[Note: There's no problem with the *horizontal* snap with *0.5cm* Grid,
BUT with *0.8cm* there's a problem with both the hor. and vert. snap.]

[Note: This problem only occurs in a text document, not in a drawing, e.g.]

I've tested it with:
OOo 1.1 beta 2, English
Windows ME, German

But it also occurs on every (windows) version of OOo before 1.1 beta 2.

(I will try to test it on Linux soon.)

This bug is very annoying when using register-true text togehter with frames 
and using Grids as a *workaround* for register-trueness in frames. Nothing will 
be anymore register-true!
Comment 1 jensja 2003-06-03 21:47:35 UTC
Duplicated on Windows 2000 with OOo1.1beta2.
Tried with page height 27.7cm (a4), 30cm and 25.4cm (roughly 10").

The grid origin is wrong for all but the first page. 

Looks as if the grid origin is set to the upper left corner of the
first page and does not take into account the gap which is displayed
between two pages.

Searching for duplicates...
Comment 2 jensja 2003-06-03 21:57:38 UTC
Comment 3 h.ilter 2003-06-04 11:03:20 UTC
HI->AMA: Reproducible.
Comment 4 andreas.martens 2003-06-04 15:04:48 UTC
Yes, you're right. For drawing objects we use only one grid for the
whole document (since the beginning of the Writer). This grid doesn't
know anything about pages and page breaks. The visible grid is
restarted at every page which may be the wished feature but doesn't
show the reality. This could be fixed but will not solve the problem
We have to restart the snapping grid at every page as well. But this
is unfortunately a big effort. So I retarget this bug for OOo 2.0.
BTW: Another interesting idea was to use different gaps between pages
so that the pages snaps to the grid?!
Comment 5 gieschke 2003-06-04 16:01:38 UTC
I've just tested it on Linux (Knoppix 3.2 - 2003-04-10) with German 
version of OOo 1.0.2.

It also occurs on Linux with exactly the same behaviour 
(same "difference values", ...).

So, OS should porbably be "All".
Comment 6 gieschke 2003-06-04 16:04:47 UTC
> BTW: Another interesting idea was to use different gaps between
> pages
> so that the pages snaps to the grid?!

Is this possible in the current version of OOo?
Would be a *really* working solution for me.

(Of course, it would't be the perfect solution...)
Comment 7 andreas.martens 2003-06-04 16:59:59 UTC
Unfortunately this "solution" (pages snaps to grid) would be a high
effort, too. From my point of view the effort is too high for this result.
Comment 8 gieschke 2003-06-04 19:41:52 UTC
What about an option only to set the space between two pages 
*manually* and *generally*?
Comment 9 andreas.martens 2003-06-05 08:43:59 UTC
Same ol' story: in several parts of our code we use the fixed value
for page distance. We have to change this into a calculated value
(depending on grid and/or options). And we have to take care of
recalculation of all pages when something has changed (grid and/or
options). And the result will be the different distances between pages
which I don't like very much :-(
Comment 10 andreas.martens 2003-09-12 14:08:03 UTC
Comment 11 stefan.baltzer 2003-10-13 11:14:32 UTC
SBA: According to the roadmap 
(see this issue was retargeted to 
"OOo Later".
Comment 12 michael.ruess 2006-11-07 14:38:44 UTC
*** Issue 71200 has been marked as a duplicate of this issue. ***
Comment 13 michael.ruess 2008-10-06 20:25:56 UTC
*** Issue 94711 has been marked as a duplicate of this issue. ***
Comment 14 juanitogan 2009-04-11 18:56:55 UTC
Still an issue in version 3.0.1.