ChartShape: Handle resize in a reasonable way

Authored by danders on Jan 31 2017, 2:37 PM.

Description

ChartShape: Handle resize in a reasonable way

Summary:
The chart shape can now be resized without having to resize and reposition
the different parts of the chart manually.

This patch:

  • Adds a cosmetic border to indicate to user the extent of the chart shape. (Only shown in words atm)
  • Introduces a ChartResizeStrategy class to the default tool that knows how to handle the contents of a chart shape.

Imo the ChartResizeStrategy should have been part of the chartshape
but this would have required BIC (and big) changes.
Adding it to the default tool makes it a small, non-disruptive change.
Making it a generic solution should imho wait for next major release.

Test Plan:
Create a shart in words.
Resize it.
Do some undo/redos.
Move some parts (axis titles, legend around).
Resize the chart.
More undo/redos.
Apply share/rotation to chart
Resize.
More undo/redos.
Save/load
Repeat above exercises
Load chart from libreoffice
Repeate above exercises.

Reviewers: boemann, mecir

Tags: #calligra:_3.0

Differential Revision: https://phabricator.kde.org/D4403

Details