Bug 38144 - Functionality request:UI Option in Writer to enable snap to grid in ruler
Summary: Functionality request:UI Option in Writer to enable snap to grid in ruler
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.2 release
Hardware: All All
: medium enhancement
Assignee: Tomaz Vajngerl
URL:
Whiteboard: target:4.2.0
Keywords:
: 48800 (view as bug list)
Depends on:
Blocks: Rulers
  Show dependency treegraph
 
Reported: 2011-06-10 02:45 UTC by Chris Peñalver
Modified: 2017-09-15 18:12 UTC (History)
12 users (show)

See Also:
Crash report or crash signature:


Attachments
Example-Table_with_non-snapping_table-columns.odt (35.38 KB, application/vnd.oasis.opendocument.text)
2013-08-08 08:23 UTC, Knuth Posern
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Peñalver 2011-06-10 02:45:49 UTC
Downstream bug may be found at:
https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/370034

OOo bug may be found at:
http://openoffice.org/bugzilla/show_bug.cgi?id=24070

1) lsb_release -rd
Description: Ubuntu 11.04
Release: 11.04

2) apt-cache policy libreoffice-writer
libreoffice-writer:
  Installed: 1:3.3.2-1ubuntu5
  Candidate: 1:3.3.2-1ubuntu5
  Version table:
 *** 1:3.3.2-1ubuntu5 0
        500 http://us.archive.ubuntu.com/ubuntu/ natty-updates/main i386 Packages
        100 /var/lib/dpkg/status
     1:3.3.2-1ubuntu4 0
        500 http://us.archive.ubuntu.com/ubuntu/ natty/main i386 Packages

3) What is expected to happen is when one clicks the horizontal ruler in effort to set up consistent margins, tab stops, and paragraph indents, it snaps to the markers.

4) What happens instead is they have complete freedom of movement.

WORKAROUND: Click Format -> Paragraph... -> Indent & Spacing tab and choose desired indents.
Comment 1 Björn Michaelsen 2011-12-23 12:24:27 UTC Comment hidden (obsolete)
Comment 2 sasha.libreoffice 2012-01-06 02:20:57 UTC
Copy-paste explanation of functionality request:
On the ruler, one can setup tab stops.  However, the tab stops are not snapping
at specific intervals like if there was a grid.  They are free floating, which
make them difficult to manage and set them at a proper place, specially when
working on a high resolution screen.  By default, they should snap, snapping
should be an option that can be enabled/disabled and the interval for the snap
grid should be configurable.
Comment 3 vitriol 2012-04-16 23:25:21 UTC
*** Bug 48800 has been marked as a duplicate of this bug. ***
Comment 4 Emir Sarı 2013-02-27 03:33:26 UTC
I think this is one of the areas that MS Office switchers would find LO lacking. It is so convenient to be able to set pre-defined indents via the ruler. If no one opposes, setting importance to "MEDIUM".
Comment 5 Marco Menardi 2013-02-27 14:51:34 UTC
I totally agree, I raised the issue YEARS ago in OOo, founded (with a small donation as a "thank you" and convincing a developer) the implementation of the snap in Koffice, and today, with 4.0 out, I feel really sad that to set visually the margin at 2cm I can't do with drag and drop. Basic UI design principles dictate that "gizmos" must be manipulated in a useful and reasonable way, having the ruler be moved of 1/100 millimetre makes no sense, if I want 1/100 precision I will use the "indent and spacing", for all the rest I must be able to drag the ruler.
Comment 6 Emir Sarı 2013-02-27 17:28:11 UTC
I remember, that I could do this in Word 95. It is very basic functionality in fact, and it is sad to see that LO does not have this feature.
Comment 7 johnrieley 2013-04-20 18:44:08 UTC
Remarkable that ruler snap-to-grid, such a fundamental, orderly, feature has not been added in years. I appeal for its addition, for ease and purity of formatting
Comment 8 Emir Sarı 2013-04-23 22:02:27 UTC
It seems there is some activity on the AOO side about this subject. Hopefully a fix from AOO could be implemented with ease.
Comment 9 Emir Sarı 2013-07-18 12:02:52 UTC
Could this be an easy hack?
Comment 10 Emir Sarı 2013-07-22 15:10:06 UTC
Okay, now I will try to explain why this is so important for LibreOffice from the point of view of a MS Office switcher. I cannot *comfortably* suggest LO to MS Office users, especially heavy Word users, because first thing they will notice is the lack of this feature. And I know that they will bug about this, because I've had this conversation already several times. 

Imagine, you are writing a nice report, something or whatever, it is not important. You want your document to look nice with paragraphs nicely stacked and listed. You have lots of sub-sections on your document, lots of lists, bullets, numberings etc. The first thing you will want to do is arrange these sections, so that one reading your document will understand what is going on there. Eventually you have a ruler, so you will want to use it first. You were already using this ruler for years in MS Word, because it allowed you to arrange document elements with ease and with 0.0 pixel perfection. But when you start to drag the ruler in Writer, you will notice something odd, ruler is not snapping to grids in LO. What?! So you won't be able to arrange items with pre-set length variables, you have to go to Paragraph dialog box, and set each thing manually, - without any or less visual aid. I don't even mention the number of extra clicks to do this. 

This is probably one of the biggest usability and UX issues LO (OOo, AOO) ever had. Speaking of novice users, no one will bother to look for the Paragraph dialog box, instead they will get irritated about this and probably they will switch back to MS Office, if they have no sense of FOSS or if they do not have financial concerns. 

I hope this will get some attention from the developers' side, because this is really a serious issue, and it is simply unbelievable to see this wasn't addressed in 20 years. At least this could be an Easy Hack. There has been some noise about this on AOO side, it is possible to check with them also. 

I hope there is someone with some free time to hack on this. :) 

I rest my case... 
Best regards,
Emir
Comment 11 Tomaz Vajngerl 2013-07-22 15:31:28 UTC
Interesting. 
I don't think this is very hard to implement and it makes sense. I will look into this. 

Regards, Tomaž
Comment 12 Tomaz Vajngerl 2013-07-23 09:03:35 UTC
Hi,

I managed to implement this for most scenarios. The only problem for now are the tables. I will commit the change without tables today so you can test this in daily build.

Regards, Tomaž
Comment 13 Emir Sarı 2013-07-23 09:09:51 UTC
@Tomaz, 

Thank you very much, it is a great job in such a short amount of time. I am personally grateful. :)
Comment 14 Commit Notification 2013-07-23 19:02:50 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=98608e57f21820ec1d2c6cd77f433b6963e249a6

fdo#38144 In ruler snap to markers for tab stops, margins, etc.



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.
Comment 15 sasha.libreoffice 2013-07-24 11:31:28 UTC
Thanks for fixing this bug and for improving code. Code becomes now more understandable for me.
Comment 16 Emir Sarı 2013-07-24 11:42:47 UTC
@Joel, I've added you to CC, since there are no master builds for OS X right at the moment, could you please test this feature?

Thanks in advance. :)
Comment 17 Miklos Vajna 2013-07-25 14:55:00 UTC
FWIW, Norbert kindly said he'll tweak MacOSX-10.8_21-10.7SDK to upload daily builds for master/-4-1.
Comment 18 Commit Notification 2013-07-25 22:13:08 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bfa3f8584b2f2492f5c0573f22e4ebd96d9a8af5

fdo#38144 Enhance snapping to markers, also snap to frame margins



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.
Comment 19 Commit Notification 2013-07-28 09:59:11 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=fbd059fb60fc0afca20eec7ea26e0ae9beb384e4

fdo#38144 Fix calculation of tick size in snapping to frame margin



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.
Comment 20 Emir Sarı 2013-08-01 08:34:24 UTC
Works great. Thank you very much Tomaz for this great functionality once more.

Do you plan to add any more functionality or we can close this thread?
Comment 21 Tomaz Vajngerl 2013-08-01 09:37:20 UTC
There are some issues left - when you have a table and move any text margin slider, the left and right text margin changes after you finish with dragging. This was working correctly before. 

One thing that is not done yet is the ability to get the previous "snapless" behavior when you hold ALT, as this is possible in other word processors. 

I would also like to show the new margin value while dragging, so you have even better indication to what value you will change the margins.
Comment 22 Knuth Posern 2013-08-05 20:51:10 UTC
Hi.

Is there any way to also make the colums of tables *snap* ?

Or is there a way assuring a /straight/ table column border when changing the widths of cells (most common use case: after /splitting/ a cell you often want to readjust the width and also often you want it to match the width of an already existing cell above and/or below.

In case my description was not clear, I am referring to this feature:
http://ask.libreoffice.org/en/question/9864/how-to-snap-table-borders-to-grid-when-resizing-table-columnrow/

And would hope this BUG could be the solution.

Thanks for any feedback on this!

Tormen
Comment 23 Knuth Posern 2013-08-05 21:03:40 UTC
Another huge downside of *not* having ruler-snapping for table columns...

...is that without it can very easily happen that you accidentily shift your table column by a mm left or right just because you clicked in the area for other editing purposes.

A ruler snap would only lead to the column width being changed if I really drag the column border FURTHER than any (most) accidental clicks will be able to reach (given a reasonable ruler snap-width).

Knuth (aka Tormen)
Comment 24 Tomaz Vajngerl 2013-08-07 19:13:05 UTC
Columns of tables already snap to ruler marks.. or should snap. There is currently a bug that makes snapping erratic but I will fix this sooner or later.
Comment 25 Knuth Posern 2013-08-08 08:23:29 UTC
Created attachment 83815 [details]
Example-Table_with_non-snapping_table-columns.odt

Hmm...

For me snapping of the table columns isn't remotely working in this example file.

I am using Version 4.0.3.3 (Build ID: 400m0(Build:3))
libreoffice  1:4.0.3-2~bpo70+1  amd64  from debian wheezy backports

Is this version maybe to old for it to work ?
Comment 26 Emir Sarı 2013-08-08 10:52:13 UTC
(In reply to comment #25)
> Created attachment 83815 [details]
> Example-Table_with_non-snapping_table-columns.odt
> 
> Hmm...
> 
> For me snapping of the table columns isn't remotely working in this example
> file.
> 
> I am using Version 4.0.3.3 (Build ID: 400m0(Build:3))
> libreoffice  1:4.0.3-2~bpo70+1  amd64  from debian wheezy backports
> 
> Is this version maybe to old for it to work ?

This feature is only available in master builds for the moment. 

http://dev-builds.libreoffice.org/daily/master/
Comment 27 Julien Nabet 2013-08-21 19:53:10 UTC
Knuth: just to bring some extra info, "target:4.2.0" in "Whiteboard" part means it's fixed on 4.2.0 (see https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Whiteboard#Releases)
Comment 28 Commit Notification 2013-08-29 16:48:22 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8c8b165f54399aa5a4f1c26f29101d4482eb9339

fdo#38144 more stable ruler actions on tables



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.
Comment 29 Tomaz Vajngerl 2013-09-20 10:53:24 UTC
OK, I think I can close this now. Create a new bug if there are any issues.
Comment 30 Michael Meeks 2013-09-20 11:59:00 UTC
Great work Tomaz ! :-) thanks so much for implementing that. Any chance of a nice screenshot at:

https://wiki.documentfoundation.org/ReleaseNotes/4.2#Writer