Karbon: Enable multi page capability

Desktop / KDE / Calligra - Dag Andersen [get2net.dk] - 5 November 2019 08:50 EST

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

The main things that has changed: 1) Since multiple pages is supported, adding/copying/deleting pages is now possible. 2) The page background color is now set with a tool in the tool box. The entry for background color in the Settings dialog is superflous and has been removed.

Ported to use pageapp classes.

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.

Reviewers: anthonyfieroni

Reviewed By: anthonyfieroni

Subscribers: rjvbb, Calligra-Devel-list

Tags: #calligra:_3.0

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

5a9a18f484a Karbon: Enable multi page capability
CalligraProducts.cmake | 2 +-
filters/karbon/CMakeLists.txt | 1 +
filters/karbon/image/CMakeLists.txt | 5 +-
filters/karbon/image/ImageExport.cpp | 8 +-
filters/karbon/svg/CMakeLists.txt | 4 +-
filters/karbon/svg/SvgExport.cpp | 10 +-
filters/karbon/svg/SvgImport.cpp | 51 +-
filters/karbon/wmf/CMakeLists.txt | 2 +-
filters/karbon/wmf/WmfExport.cpp | 12 +-
karbon/CMakeLists.txt | 1 +
karbon/data/karbon.rc | 20 +-
karbon/ui/CMakeLists.txt | 13 +-
karbon/ui/KarbonDocument.cpp | 580 +--------------------
karbon/ui/KarbonDocument.h | 160 +-----
karbon/ui/KarbonDocumentMergeCommand.cpp | 124 +++--
karbon/ui/KarbonDocumentMergeCommand.h | 12 +-
karbon/ui/KarbonFactory.cpp | 1 +
karbon/ui/KarbonPart.cpp | 42 +-
karbon/ui/KarbonPart.h | 9 -
karbon/ui/KarbonPrintJob.cpp | 81 ---
karbon/ui/KarbonPrintJob.h | 48 --
karbon/ui/KarbonView.cpp | 573 ++++++--------------
karbon/ui/KarbonView.h | 41 +-
karbon/ui/ProxyView.cpp | 76 +++
.../KarbonLayerSortingModel.h => ProxyView.h} | 36 +-
karbon/ui/dockers/KarbonLayerDocker.cpp | 492 -----------------
karbon/ui/dockers/KarbonLayerDocker.h | 91 ----
karbon/ui/dockers/KarbonLayerModel.cpp | 535 -------------------
karbon/ui/dockers/KarbonLayerModel.h | 81 ---
karbon/ui/dockers/KarbonLayerSortingModel.cpp | 76 ---
karbon/ui/widgets/KarbonCanvas.cpp | 469 -----------------
karbon/ui/widgets/KarbonCanvas.h | 173 ------
karbon/ui/widgets/KarbonConfigInterfacePage.cpp | 15 +-
karbon/ui/widgets/KarbonSmallStylePreview.h | 2 +-
libs/pageapp/KoPADocument.cpp | 2 +-
libs/pageapp/KoPADocument.h | 2 +-
libs/pageapp/KoPAView.cpp | 13 +-
libs/pageapp/KoPAView.h | 25 +-
libs/pageapp/widgets/KoPageNavigator.cpp | 19 +-
libs/pageapp/widgets/KoPageNavigator.h | 2 +
40 files changed, 530 insertions(+), 3379 deletions(-)

Upstream: quickgit.kde.org


  • Share