Bug 77987 - Vertical guidelines X-coordinate in edit window =0 for any guideline with X<0
Summary: Vertical guidelines X-coordinate in edit window =0 for any guideline with X<0
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
4.2.2.1 release
Hardware: x86 (IA32) Windows (All)
: low trivial
Assignee: Katarina Behrens
URL:
Whiteboard: target:4.4.0
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-27 06:51 UTC by Sergey Homenko
Modified: 2014-06-09 22:31 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Homenko 2014-04-27 06:51:07 UTC

    
Comment 1 Sergey Homenko 2014-04-27 07:13:01 UTC
Horisontal guidelines similarly
And show "-" sign on rules for coordinates<0, please
Comment 2 Regina Henschel 2014-04-27 11:41:07 UTC
Showing minus sign is an enhancement request. Please write an additional issue for it.

I can confirm the error with version 4.2.2 and version 4.3.0. The error does not only appear for snap lines outside the page, but too, when you have moved the origin. [To move the origin, grab the intersection of the rulers and drag it down-right.]

It is a LibreOffice error. AOO shows the coordinates correctly.
Comment 3 Julien Nabet 2014-04-27 12:11:03 UTC
On pc Debian x86-64 with master sources updated today, I opened Draw, create a Basic shape then "View/Snap Lines/Display Snap Lines" but don't understand what's the problem. Indeed at the very bottom of Draw window, I can see coordinates (X and Y) which seem ok.

Regina: could you explain a bit or give me a link to a doc?
Comment 4 Regina Henschel 2014-04-27 13:25:19 UTC
Snap lines are described in chapter "Snap points and lines", page 49 in the Draw Guide 4.1, https://www.libreoffice.org/get-help/documentation/. Moving the origin is described in topic "Rulers" in the help.

You get the "Edit" dialog, when you right click a snap line or a snap point. It is similar to the dialog in menu Insert > Insert Snap Point/Line.

Snap points have the same error.

The New Snap Point/Line dialog has the error too. A negative entry is turned to zero.

You need negative values not only, when you use a shifted origin. For example the control points of a curve can have negative coordinates although the curve itself is totally inside the page area.

The status bar do not show snap point/line coordinates, but mouse position.
Comment 5 Julien Nabet 2014-04-27 14:18:03 UTC
Thank you for your feedback Regina.

At least about edit dialog, I can reproduce this.
Code pointer: sd/source/ui/dlg/dlgsnap.cxx in ctor SdSnapLineDlg::SdSnapLineDlg
min and max value for X and Y depend on work area (via aLeftTop and aRightBottom vars)

Now I don't know what should be done here.
Comment 6 Regina Henschel 2014-04-27 15:02:40 UTC
In SdSnapLineDlg::GetAttr(SfxItemSet& rOutAttrs) in /core/sd/source/ui/dlg/dlgsnap.cxx I see

    rOutAttrs.Put(SfxUInt32Item(ATTR_SNAPLINE_X, nXValue));
    rOutAttrs.Put(SfxUInt32Item(ATTR_SNAPLINE_Y, nYValue));

SfxUInt32Item looks suspicious to me, I expect SfxInt32Item. But I have got no build environment for LibreOffice and therefore cannot text my guess.
Comment 7 Regina Henschel 2014-04-27 15:57:09 UTC
Or not, AOO has the same code in that place, so the error is likely at another place.
Comment 8 Commit Notification 2014-06-09 22:13:15 UTC
Katarina Behrens committed a patch related to this issue.
It has been pushed to "master":

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

fdo#77987, part 1: set min&max values of spinboxes



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 9 Commit Notification 2014-06-09 22:13:28 UTC
Katarina Behrens committed a patch related to this issue.
It has been pushed to "master":

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

fdo#77987, part 2: snap line coordinates can be negative



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 10 Commit Notification 2014-06-09 22:27:33 UTC
Katarina Behrens committed a patch related to this issue.
It has been pushed to "master":

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

fdo#77987, part 3: use signed ints consistently



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 11 Katarina Behrens 2014-06-09 22:31:13 UTC
Setting this to fixed -- someone pls test it w/ daily build, I've some trouble displaying snap points w/ my build, thus can't really verify myself