summaryrefslogtreecommitdiff
path: root/svx/source/unodraw
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2019-07-01 18:20:02 +0200
committerKatarina Behrens <Katarina.Behrens@cib.de>2019-10-25 16:27:04 +0200
commita8b1699ca9c7e8c43eff79467451fd1fcb4fde9b (patch)
tree685f005a1b6c417c3b582d80dce51d0138970cff /svx/source/unodraw
parentedcc3d66f9a107b8d9ffb3c5899e7863cf508484 (diff)
speed-up shape import if shapes need z-order rearranging
setting z-order individually on each shape and broadcasting is O(n^2) (remaining shapes also need reordering) and this is bad bad bad for performance Change-Id: Ic9c9137a097f6ff524192693910f221885f77cc4 Reviewed-on: https://gerrit.libreoffice.org/75055 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'svx/source/unodraw')
-rw-r--r--svx/source/unodraw/unopage.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index 5fca5403d042..28082f35e75f 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -27,6 +27,7 @@
#include <osl/mutex.hxx>
#include <sfx2/dispatch.hxx>
#include <comphelper/classids.hxx>
+#include <comphelper/sequence.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <sfx2/objsh.hxx>
@@ -330,6 +331,12 @@ void SAL_CALL SvxDrawPage::remove( const Reference< drawing::XShape >& xShape )
mpModel->SetChanged();
}
+void SvxDrawPage::sort( const css::uno::Sequence< sal_Int32 >& sortOrder )
+{
+ auto newOrder = comphelper::sequenceToContainer<std::vector<sal_Int32>>(sortOrder);
+ mpPage->sort(newOrder);
+}
+
// css::container::XIndexAccess
sal_Int32 SAL_CALL SvxDrawPage::getCount()
{