summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-10-08 08:37:12 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-10-08 08:37:58 +0200
commit1cb13d87b5d887718f6d81a842444b7251dc64cf (patch)
treee83682166d2ed0a978351715d27f47f586bd4cfa /sc
parentfce720b3e4691eb3b7deef1d005d76b23123a5cb (diff)
editeng, sw, sc: use comphelper::string::join()
Change-Id: I9b0a32271a965bc4089720ccb61b26b67ceab7b2
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/gridwin.cxx13
1 files changed, 4 insertions, 9 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index aba40ff66f90..395c4b5c4a0d 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -134,6 +134,7 @@
#include <svx/sdr/overlay/overlaymanager.hxx>
#include <vcl/svapp.hxx>
#include <svx/sdr/overlay/overlayselection.hxx>
+#include <comphelper/string.hxx>
#define LOK_USE_UNSTABLE_API
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
@@ -5895,9 +5896,8 @@ static void updateLibreOfficeKitSelection(ScViewData* pViewData, ScDrawLayer* pD
double nPPTY = pViewData->GetPPTY();
Rectangle aBoundingBox;
- std::stringstream ss;
+ std::vector<OString> aRectangles;
- bool bIsFirst = true;
for (auto aRectangle : rRectangles)
{
aRectangle.Right() += 1;
@@ -5905,14 +5905,9 @@ static void updateLibreOfficeKitSelection(ScViewData* pViewData, ScDrawLayer* pD
aBoundingBox.Union(aRectangle);
- if (bIsFirst)
- bIsFirst = false;
- else
- ss << "; ";
-
Rectangle aRect(aRectangle.Left() / nPPTX, aRectangle.Top() / nPPTY,
aRectangle.Right() / nPPTX, aRectangle.Bottom() / nPPTY);
- ss << aRect.toString().getStr();
+ aRectangles.push_back(aRect.toString());
}
// selection start handle
@@ -5926,7 +5921,7 @@ static void updateLibreOfficeKitSelection(ScViewData* pViewData, ScDrawLayer* pD
pDrawLayer->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION_END, aEnd.toString().getStr());
// the selection itself
- pDrawLayer->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION, ss.str().c_str());
+ pDrawLayer->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION, comphelper::string::join("; ", aRectangles).getStr());
}
void ScGridWindow::UpdateCursorOverlay()