summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-08-04 11:37:34 +0200
committerMichael Meeks <michael.meeks@collabora.com>2021-09-16 19:01:07 +0200
commit712c5d7090abea828aff57f199879a7897211680 (patch)
treed2e24d74769c1fbc8cd448bbcb4a15169cc44519 /svx
parentd65e177242f2e7359e17161af5f5092daacc34eb (diff)
improve LOK notifyInvalidation
(*) tweak buffer in SfxLokHelper::notifyInvalidation to be a bit larger, so we avoid the cost of a resize&copy (*) use our optimised OString concatentation instead of going via std::stringstream (*) pass down a pointer to rectangle, instead of a string. later we will use this to avoid doing the stringify until later Change-Id: Ia3e3042bc919d9b9cb80e47a93704eb236438605 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119994 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120072 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 417f881d20cafe88a02b64894ba4483875fb9460) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122123
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/sdrpagewindow.cxx2
-rw-r--r--svx/source/svdraw/svdmrkv.cxx8
2 files changed, 5 insertions, 5 deletions
diff --git a/svx/source/svdraw/sdrpagewindow.cxx b/svx/source/svdraw/sdrpagewindow.cxx
index c3230b12285d..ccb133d10af9 100644
--- a/svx/source/svdraw/sdrpagewindow.cxx
+++ b/svx/source/svdraw/sdrpagewindow.cxx
@@ -464,7 +464,7 @@ void SdrPageWindow::InvalidatePageWindow(const basegfx::B2DRange& rRange)
const tools::Rectangle aRectTwips = OutputDevice::LogicToLogic(aRect100thMM, MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip));
if (SfxViewShell* pViewShell = SfxViewShell::Current())
- SfxLokHelper::notifyInvalidation(pViewShell, aRectTwips.toString());
+ SfxLokHelper::notifyInvalidation(pViewShell, &aRectTwips);
}
}
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index bab58248fa9d..6ca400399f5c 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -232,9 +232,9 @@ void SdrMarkView::ModelHasChanged()
//TODO: Is MarkedObjRect valid at this point?
tools::Rectangle aSelection(GetMarkedObjRect());
- OString sSelection;
+ tools::Rectangle* pResultSelection;
if (aSelection.IsEmpty())
- sSelection = "EMPTY";
+ pResultSelection = nullptr;
else
{
sal_uInt32 nTotalPaintWindows = this->PaintWindowCount();
@@ -263,11 +263,11 @@ void SdrMarkView::ModelHasChanged()
}
}
- sSelection = aSelection.toString();
+ pResultSelection = &aSelection;
}
if(SfxViewShell* pViewShell = GetSfxViewShell())
- SfxLokHelper::notifyInvalidation(pViewShell, sSelection);
+ SfxLokHelper::notifyInvalidation(pViewShell, pResultSelection);
}