Karbon: Enable multi page capability
AbandonedPublic

Authored by anthonyfieroni on Feb 26 2019, 7:27 AM.

Details

Reviewers
danders
Summary

Since odg spec supports multiple pages, I feel karbon also needs to support it.

Ported to use pageapp classes.

Karbon has config group "Interface" that is not precent in other apps.
Some of the options have been disabled atm. Imho they should be
harmonized with other apps and/or moved to View menu.

A lot of code was duplicated between pageapp and karbon
and has been removed from karbon:

  • Save/load
  • Layers docker and all layer operations
  • Grid, guides, rulers and zoom
  • Event handlers
  • Printing
  • Show page margins has been moved to pageapp

In general, import/export needs review to determine how to
handle multiple pages when e.g. exporting to a format that
does not support pages.

Known bugs:

  • "Separate paths" command:
    • Execute command, the shape disappears.
    • Undo crashes. Note: Afaics this code is not touched so probably a libs bug.
  • Snap to grid does not work
  • Number of recent files does not work properly
Test Plan

I am not an avid user of karbon, so would be nice if some that where could test.
Also, do not have all types of different format docs for filter testing.
Some that work are pdf, svg, jpg and karbon files.

Diff Detail

Repository
R8 Calligra
Branch
karbon_multipage_danders
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 8855
Build 8873: arc lint + arc unit
danders requested review of this revision.Feb 26 2019, 7:27 AM
danders created this revision.
anthonyfieroni added inline comments.Mar 7 2019, 6:33 PM
karbon/ui/KarbonView.cpp
429–433

Can we append layers?

462–465

Remove

483

Use static_cast when we don't check against nullptr, dynamic_cast is waste of time.

878–879

If we don't need this - remove.

karbon/ui/widgets/KarbonConfigInterfacePage.cpp
85–87

We can keep canvas color, after all

122–126

Also we can keep.

anthonyfieroni commandeered this revision.Jun 4 2019, 8:35 PM
anthonyfieroni abandoned this revision.
anthonyfieroni edited reviewers, added: danders; removed: anthonyfieroni.

In flavor of D20400