1. 10 Jan, 2018 1 commit
  2. 13 Sep, 2017 1 commit
  3. 16 Jun, 2017 1 commit
    • Dmitry Kazakov's avatar
      Implement KoShape::updateAbsolute() for complex transformation updates · 6f51599f
      Dmitry Kazakov authored
      Historically, transformation code uses extremely weird method of shape
      updates that rely on the event loop. This patch implements a framework
      for moving away from this strategy.
      
      The problem:
      
      When one transforms a shape he needs to update both areas: bounding
      rect of the shape *before* the transform and a bounding rect of the shape
      *after* the transform. Before the patch, the transformation code used the
      system like that:
      
      shape->update();
      shape->setTransformation(newTransform);
      shape->update();
      
      That works only with assumption that the first update() call will *not*
      be executed before setTransform() call. That should be true atm, but it
      is not guaranteed to be so in the future. Therefore, now the update happens
      like that:
      
      const QRectF oldDirtyRect = shape->boundingRect();
      shape->setTransformation(newTransform);
      shape->updateAbsolute(oldDirtyRect | shape->boundingRect());
      6f51599f
  4. 02 Jun, 2017 2 commits
  5. 23 Dec, 2016 1 commit
    • Dmitry Kazakov's avatar
      A huge KoFlake refactoring to make shape transformations work correctly · 01c32383
      Dmitry Kazakov authored
      1) KoSelection is completely refactored. Now it is always *recursive*.
         More than that, now it automatically tracks the transformation changes
         of the containing shapes (using KoShape::ShapeChangeListener)
      
      2) The size of KoSelection is now automatically tracked as well.
      
      3) A lot of small fixes in DefaultTool transformation strategies. Now
         you can easily transform everything: single shapes, multiple
         selections and groups.
      
      There is still one bug: scaling of multi-object selection works weirdly.
      01c32383
  6. 29 Nov, 2016 1 commit
    • Dmitry Kazakov's avatar
      Implement KoShape::cloneShape() · 7699443c
      Dmitry Kazakov authored
      This is a mandatory function to be able to load shapes from SVG,
      because the same shape may be instantiated from different places.
      We still need to discuss whether we need to really "share" the
      shape template, but for now I just deep-copy them (which is the
      easiest because of shape normalization problem we have).
      
      There are the following drawbacks/hacks in this patch:
      
      1) Not all the shapes have KoShape::cloneShape() implemented! Basically,
         it is defined only for group shape and all the descendants of a path
         shape (which are the only shapes used in SVG). Other shapes use the
         default implementation which simply returns null.
      
         Ideally, there should be no default implementation and all the shapes
         should define it. But, given that we are going to deprecate quite a lot
         of stuff, I'll keep them just unimplemented for now.
      
      2) The following shape properties are not yet copied during cloning:
      
         * toolDelegates
         * dependees
         * shadow
         * border
         * filterEffectStack
      
         All the properties, except of tool delegates will probably be
         deprecated soon. And for the tool delegates we need to invent
         something ingenious to handle the pointers to recover pointers
         to the *cloned* shapes.
      
      3) I cannot guarantee TextShape's work anymore. I just blindly
         refactored it to use QScopedPointer to QTextDocument instead of
         the previous raw pointers trickery and never tested it. Hope it
         still works...
      7699443c
  7. 16 Nov, 2016 1 commit
    • Dmitry Kazakov's avatar
      Implemented clipping mask feature of SVG · deb9431b
      Dmitry Kazakov authored
      Still not implemented:
      1) Blending using linear RGB
      2) Doesn't work if a shape has a filter stack
      3) Shapes are leaking... but it should be fixed on the later
         stages of implementing SVG support. Right now shape ownership
         rules are not quite clear to me.
      4) Clip mask will not be found if placed into <def> category. *But*
         at the moment the <def> feature is implemented incorrectly. The
         inheritance of the 'def' elements should come from 'def', but not
         from the place of instantiation. So this part should be refactored
         anyway.
      deb9431b
  8. 30 Jan, 2016 1 commit
  9. 19 Nov, 2015 1 commit
  10. 02 Feb, 2015 1 commit
  11. 27 Sep, 2014 1 commit
  12. 02 Aug, 2013 1 commit
    • Inge Wallin's avatar
      Merge the branch flake-shapeborders-ingwa · aabdbedd
      Inge Wallin authored
      This branch contains:
       - Borders for shapes
       - Painting of borders in KoBorder instead of other places
       - Handling of padding inside borders
      
      Code by me (ingwa) and Camilla Boemann
      
      REVIEW: 111044
      
      FEATURE: Shape borders
      FEATURE: Padding inside borders
      
      Squashed commit of the following:
      
      commit ffab6ec0f8c3d41b881eaaffc6abba7245a703bf
      Merge: 33e3bc8 5ff12bb
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Thu Aug 1 19:26:12 2013 +0200
      
          Merge branch 'master' into flake-shapeborders-ingwa
      
          Conflicts:
          	libs/flake/KoShape.h
      
      commit 33e3bc8f902175c728b06ddbc804a0558aadac29
      Merge: 5429aa2 6648461
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Tue Jul 30 17:27:47 2013 +0200
      
          Merge remote-tracking branch 'origin/flake-shapeborders-ingwa' into flake-shapeborders-ingwa
      
          Conflicts:
          	libs/flake/KoShape.h
      
      commit 6648461572ca845fe0372780ddc8545363dc5521
      Author: C. Boemann <cbo@boemann.dk>
      Date:   Tue Jul 30 16:16:27 2013 +0200
      
          Only paint when there really is a border - or we would end up painting a cosmetic line
      
          also loading a file with all individually specified borders would still report it hadn't any borders
      
      commit 300a98b9b45c77df1ae1fd55ba367e484b074f3d
      Merge: a32fd98 3b4d668
      Author: C. Boemann <cbo@boemann.dk>
      Date:   Mon Jul 29 11:19:00 2013 +0200
      
          Merge branch 'master' into flake-shapeborders-ingwa
      
      commit 5429aa2f4f40e750459dd08c1bac3d9d8919cb6d
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sun Jul 28 09:32:11 2013 +0200
      
          Add a missing method to KoBorder.
      
      commit 78dc4d134e3581bc6abecc8061898e9e1ee99a46
      Merge: a32fd98 3350bba
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sat Jul 27 15:28:19 2013 +0200
      
          Merge branch 'master' into flake-shapeborders-ingwa
      
          Conflicts:
          	libs/flake/KoShape.h
      
      commit a32fd9886c719a9d019c7d13925a862801ad675d
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Thu Jul 18 23:38:54 2013 +0200
      
          Fix the build.
      
          Seems that boemann is not building the tests.  Booo!
      
          The test now builds but I don't know if the suggested rects make sense.
      
      commit 7335fcf876a19c4e636a2b44a333099b532ecef1
      Merge: 92c5bce 35ca4ac
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Thu Jul 18 23:04:02 2013 +0200
      
          Merge branch 'master' into flake-shapeborders-ingwa
      
      commit 92c5bcef0961405765d8faae787cf68580be60d4
      Author: C. Boemann <cbo@boemann.dk>
      Date:   Thu Jun 20 22:17:00 2013 +0200
      
          Take padding and border into account when doing anchor placement
      
          Also We need to give the page for page-anchored shapes, otherwise sub objects will not be placed
      
          Also don't scale the border twice
      
      commit 8b674a8e2b5e500040695fff93d76ea43ae4e520
      Merge: cb26e25 05b3301
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sat Jun 22 13:17:40 2013 +0700
      
          Merge branch 'flake-shapeborders-ingwa' of ssh://git.kde.org/calligra into flake-shapeborders-ingwa
      
          Conflicts:
          	libs/flake/KoShape.cpp
      
      commit cb26e2567be0a84649d1457d9d3fc45c84fa7b8a
      Merge: 21e69bf 04a624e
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sat Jun 22 13:09:55 2013 +0700
      
          Merge branch 'master' into flake-shapeborders-ingwa
      
      commit 21e69bf563a7d58535f6c339270b5ce3cdbfd180
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sat Jun 22 12:43:32 2013 +0700
      
          Fix border width bug for page borders.
      
          KoShape::paintBorder() now assumes that all view tranformations are
          already applied to the painter.
      
      commit a5a566c3ce168d71c46afa48aae73f14229500f2
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sat Jun 22 12:04:27 2013 +0700
      
          Fix faulty indentation.
      
      commit 05b330131120e419fd24e9529e15d4b74f8f619d
      Author: C. Boemann <cbo@boemann.dk>
      Date:   Thu Jun 20 22:10:55 2013 +0200
      
          fix scaling being applied twice for the text
      
      commit 83bcd122d2610a48cf27b0bf4f257dd67c43b71d
      Merge: e921d88 5a4fdc6
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Thu Jun 20 23:58:21 2013 +0700
      
          Merge branch 'master' into flake-shapeborders-ingwa
      
      commit e921d887275347cbb94f76b876e413be5c1611e0
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Thu Jun 20 11:45:16 2013 +0700
      
          A better way to set the dash style of the QPainter.
      
      commit ec0bf5760a1cb4939874d8473e84a1ff93347668
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Thu Jun 20 04:26:39 2013 +0700
      
          Treat border="none" the same as no mention of border at all.
      
      commit 7fd9926672f32431f63b5b016a2995e43f086db7
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Mon Jun 17 21:15:13 2013 +0200
      
          Remove unuzed parameters.
      
      commit 4a24367c17b35e26556706de59cc86a688fbbec7
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Mon Jun 17 21:07:10 2013 +0200
      
          Improve the old loading code for borders.
      
          The old code didn't check for individual edges (-top, -bottom, -left,
          -right) when there was a common border definition.
      
      commit f5c0652d8f877905bd5252f3b2f92a87d6259950
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Mon Jun 17 20:30:15 2013 +0200
      
          Use painter scaling instead of explicit zoom parameters.
      
      commit 637d674acb3c9ae6940a0f70e3fd9dab70ecbb7c
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sat Jun 15 20:06:10 2013 +0200
      
          Fix a bug visible only with thick inner borders.
      
          Also remove some remaining kdebugs.
      
      commit e0d9c69478262151199f6e6f516a02d0134f3383
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sat Jun 15 18:03:16 2013 +0200
      
          Fix another small pasto bug
      
      commit 2d09674fcbf613ecfaeae430fe9132caae090c1d
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sat Jun 15 17:25:50 2013 +0200
      
          Fix a small bug
      
      commit b105ffcfdcffcbe7a906dbb7104bd1782d1cc470
      Merge: cf97de5 4021e36
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sat Jun 15 17:07:24 2013 +0200
      
          Merge branch 'master' into flake-shapeborders-ingwa
      
      commit cf97de5aeca89e6da10e296d164eb2c60fe7854e
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sat Jun 15 17:04:38 2013 +0200
      
          Simplify the painting of borders significantly.
      
      commit 71be183148c87ebc46b825bf1256aa130ef44816
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sat Jun 15 10:28:37 2013 +0200
      
          Make double borders work in the corners.
      
          Unfortunately I had to refactor the drawing a bit to make this work.
          But I know how to simplify it back so I'll do that next.
      
      commit b306709efe4a2aefe8a6d0ccb519f6f448e17948
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Fri Jun 14 10:04:42 2013 +0200
      
          Make KoBorder able to paint on the designated rect or inside it.
      
      commit c2de625bc4696ca5b1372070349c454180164b4f
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Thu Jun 13 20:56:31 2013 +0200
      
          Remove an unneded parameter.
      
      commit 1293e44e60e97ebba01f2d7d6fcc7f97e4b4880f
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Thu Jun 13 07:30:32 2013 +0200
      
          Remove old border painting code in KWCanvasBase.
      
      commit 8c56fd221cc706028e00667599b7ac6ac8430eee
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Thu Jun 13 06:37:17 2013 +0200
      
          Fix all scaling problems.
      
          The borders are now drawn in all the correct places.
          Still some things to do to get the corners right.
      
      commit 2fcb972323852aa993779675f7fea6b4991b2904
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Wed Jun 12 14:12:38 2013 +0200
      
          Put the border inside the available area instead of having the center line at the boundary of the area.
      
      commit a0213a361b28dbe1a74e4a9abb5f081c64bd1fc0
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Wed Jun 12 05:23:08 2013 +0200
      
          Implement painting of borders in KoShape and call this from the pictureshape and the textshape.
      
          Still some kdebugs that we need to remove later.
      
      commit d455047e34a9351a558656c7e6fd3b5501d9ad9b
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Tue Jun 11 18:17:17 2013 +0200
      
          Implement painting in KoBorder and call it from KWCanvasBase.
      
      commit c6e73db52ead4aab98469b9bc969a9b0c2e0caae
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sun Jun 9 23:23:08 2013 +0200
      
          Initialize the border field of the private class.
      
      commit 04d431b0bc08c81bb857a938a61ee7b68876fb40
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sun Jun 9 18:58:47 2013 +0200
      
          Implement saving of borders in KoShape
      
          This was easier than I expected...
      
      commit cd0268f499aca9ede9f38be82dc04917cfeeab02
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sun Jun 9 18:44:40 2013 +0200
      
          Implement loading of borders in KoShape
      
      commit 9ff1e5e91f439a738894abf573bcdc7e8d9bf91e
      Author: Inge Wallin <inge@lysator.liu.se>
      Date:   Sun Jun 9 17:51:18 2013 +0200
      
          Add ODF loading from KoStyleStack too.
      aabdbedd
  13. 30 Jul, 2013 1 commit
    • Boudewijn Rempt's avatar
      Wrap KoShapeBackground in QSharedPointer · 1bd83f16
      Boudewijn Rempt authored
      This patch wraps KoShapeBackground in a QPointer instead of doing manual
      refcounting. Bug 321714 shows, imo, that the manual refcounting is
      fragile and sometimes breaks. I don't remember why we weren't supposed
      to use QPointer (other than that it gets a little ugly with subclassing),
      but it seems a good fit here.
      
      There are other classes that do manual refcounting, and I think those
      should be converted, too -- but in another patch.
      1bd83f16
  14. 28 Jul, 2013 1 commit
  15. 24 Jul, 2013 1 commit
    • Boudewijn Rempt's avatar
      Wrap KoShapeBackground in QPointer · ef6f3c06
      Boudewijn Rempt authored
      This patch wraps KoShapeBackground in a QPointer instead of doing manual
      refcounting. Bug 321714 shows, imo, that the manual refcounting is
      fragile and sometimes breaks. I don't remember why we weren't supposed
      to use QPointer (other than that it gets a little ugly with subclassing),
      but it seems a good fit here.
      
      There are other classes that do manual refcounting, and I think those
      should be converted, too -- but in another patch.
      
      BUG: 321714
      ef6f3c06
  16. 23 Jul, 2013 1 commit
    • Boudewijn Rempt's avatar
      Wrap KoShapeBackground in QPointer · b301dbc5
      Boudewijn Rempt authored
      This patch wraps KoShapeBackground in a QPointer instead of doing manual
      refcounting. Bug 321714 shows, imo, that the manual refcounting is
      fragile and sometimes breaks. I don't remember why we weren't supposed
      to use QPointer (other than that it gets a little ugly with subclassing),
      but it seems a good fit here.
      
      There are other classes that do manual refcounting, and I think those
      should be converted, too -- but in another patch.
      
      BUG: 321714
      b301dbc5
  17. 21 Jul, 2013 1 commit
    • Boudewijn Rempt's avatar
      Wrap KoShapeBackground in QPointer · 6d455bc1
      Boudewijn Rempt authored
      This patch wraps KoShapeBackground in a QPointer instead of doing manual
      refcounting. Bug 321714 shows, imo, that the manual refcounting is
      fragile and sometimes breaks. I don't remember why we weren't supposed
      to use QPointer (other than that it gets a little ugly with subclassing),
      but it seems a good fit here.
      
      There are other classes that do manual refcounting, and I think those
      should be converted, too -- but in another patch.
      
      BUG: 321714
      6d455bc1
  18. 15 Feb, 2013 1 commit
  19. 18 Jan, 2013 1 commit
  20. 15 Jun, 2012 1 commit
  21. 13 May, 2012 1 commit
    • C. Boemann's avatar
      Load and save the contour-polygon and contour-path elements. · 493ae41f
      C. Boemann authored
      They are stored as KoClipPath in the engine. Previously the engine only
      had support for loading and saving KoClipPath in svg
      
      Load and save the style frame style attributes that turn contoured text run around
      (wrapping) on and off. wrap-contour and wrap-contour-mode
      
      Use this new technology to do tight run around (simple change only requesting what we already had)
      
      This commit also adds a method to pictureshape to create a tightfitting outline path of the image.
      It's tested and works, but is not used yet to create a KoClipPath out of it.
      
      REVIEW: 104873
      493ae41f
  22. 26 Mar, 2012 1 commit
    • Inge Wallin's avatar
      Rename KoShapeBorderModel.cpp -> KoShapeStrokeModel.cpp · 09e08d65
      Inge Wallin authored
      As written in the review request:
      
      There are 2 reasons for this change:
      
       1. It increases the way the name describes what it actually is
          for. There are many places in the code that looks like:
            KoShapeBorderModel *stroke = ...
          so naming it "...Stroke..." is both closer to the odf tags and
          also to the rest of the code.
       2. It reduces the confusion between KoShapeBorderModel and KoBorder
          which don't have anything to do with each other.
      
      REVIEW: 104405
      09e08d65
  23. 24 Sep, 2011 1 commit
    • Thorsten Zachmann's avatar
      Cache the size of the KoShapeGroup · 6f7436f4
      Thorsten Zachmann authored
      This speeds up handling of groups with a lot of child shapes. This is especially noticable for
      page changes in stage. Before the change it could take more then 10 seconds and it is not instantly.
      
      REVIEW:102645
      6f7436f4
  24. 20 Sep, 2011 1 commit
    • Casper Boemann's avatar
      Store KoTextAnchor in KWFrame. · 6c6db691
      Casper Boemann authored
      And we always create KoTextAnchor even if page anchored so we load the info.
      Let KoTextAnchor store the pagenumber too and make sure every frame has a KoTextAnchor attached
      Don't save anchored shapes twice
      REVIEW:102666
      6c6db691
  25. 20 May, 2011 1 commit
  26. 14 May, 2011 1 commit
  27. 01 Apr, 2011 1 commit
    • Boudewijn Rempt's avatar
      Remove the shape caching · 966cc6b4
      Boudewijn Rempt authored
      Shape caching did not work correctly in many cases (like embedded images
      in text documents, shapes that paint outside their bounds), so it was
      not very useful.
      966cc6b4
  28. 04 Feb, 2011 1 commit
  29. 28 Jan, 2011 5 commits
  30. 10 Jan, 2011 1 commit
  31. 28 Dec, 2010 1 commit
  32. 22 Dec, 2010 1 commit
  33. 30 Nov, 2010 1 commit
  34. 26 Nov, 2010 2 commits