Bug 124553 - Add adjustX method to B2DPoint
Summary: Add adjustX method to B2DPoint
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-04 17:28 UTC by Alexander Farrow
Modified: 2019-04-05 17:46 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 Alexander Farrow 2019-04-04 17:28:20 UTC
Description:
Recently I have been looking into resolving https://bugs.documentfoundation.org/show_bug.cgi?id=103322

This involves changing the types of variables from tools::Point to basegfx::B2DPoint.

tools::Point has a method called AdjustX(long nHorzMove), which adds nHorzMove to x.

basegfx::B2DPoint does not have such a method. So calls to AdjustX(nHorzMove) are being replaced by something like setX(getX() + nHorzMove).

It works fine of course but I think adjustX looks cleaner and it feels like a step backwards when moving from tools::Point to basegfx::B2DPoint. 

A quick OpenGrok search for AdjustX reveals it is used frequently in the codebase, so it makes sense to add it to B2DPoint.

If it is agreed that we should add such a method I would like to try to implement it.


Actual Results:
basegfx::B2DPoint does not have a method similar to tools::Point AdjustX method. 

Expected Results:
basegfx::B2DPoint has a method like tools::Point AdjustX.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Regina Henschel 2019-04-05 17:34:36 UTC
Perhaps the dev mailing list is more suitable than the bug tracker for such a problem?
Comment 2 Alexander Farrow 2019-04-05 17:46:18 UTC
(In reply to Regina Henschel from comment #1)
> Perhaps the dev mailing list is more suitable than the bug tracker for such
> a problem?

Sorry, I'm new to LibreOffice. I wasn't sure where the best place was for a developer question. I'll send an email to the mailing list now.

Thanks for your help