summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-26 10:58:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-28 19:44:08 +0200
commitef513fd4b049b214a03fbe6e62a5ea43680a7a9b (patch)
tree82f2ce93bc8e5fde6dce8685b633c3d643c9f069 /sw/source/core
parent826f1bca40a01f0a249d5b6cbb7c39c11638a060 (diff)
remove unnecessary use of OString::getStr
Change-Id: I0490efedf459190521f4339854b3394d57765fdb Reviewed-on: https://gerrit.libreoffice.org/38058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/crsr/crsrsh.cxx24
-rw-r--r--sw/source/core/layout/dbg_lay.cxx3
2 files changed, 14 insertions, 13 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index d88d76272a56..90a5c310d48a 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -1161,19 +1161,21 @@ OUString SwCursorShell::getPageRectangles()
{
CurrShell aCurr(this);
SwRootFrame* pLayout = GetLayout();
- std::vector<OString> v;
+ OUStringBuffer aBuf;
for (const SwFrame* pFrame = pLayout->GetLower(); pFrame; pFrame = pFrame->GetNext())
{
- std::vector<OString> aRectangle
- {
- OString::number(pFrame->Frame().Left()),
- OString::number(pFrame->Frame().Top()),
- OString::number(pFrame->Frame().Width()),
- OString::number(pFrame->Frame().Height())
- };
- v.push_back(comphelper::string::join(", ", aRectangle));
- }
- return OUString::fromUtf8(comphelper::string::join("; ", v).getStr());
+ aBuf.append(pFrame->Frame().Left());
+ aBuf.append(", ");
+ aBuf.append(pFrame->Frame().Top());
+ aBuf.append(", ");
+ aBuf.append(pFrame->Frame().Width());
+ aBuf.append(", ");
+ aBuf.append(pFrame->Frame().Height());
+ aBuf.append("; ");
+ }
+ if (!aBuf.isEmpty())
+ aBuf.setLength( aBuf.getLength() - 2); // remove the last "; "
+ return aBuf.makeStringAndClear();
}
void SwCursorShell::NotifyCursor(SfxViewShell* pOtherShell) const
diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx
index 718048d383ba..16b5776c1d7b 100644
--- a/sw/source/core/layout/dbg_lay.cxx
+++ b/sw/source/core/layout/dbg_lay.cxx
@@ -346,8 +346,7 @@ void SwImplProtocol::CheckLine( OString& rLine )
}
if( !aTok.isEmpty() )
{
- long nVal;
- sscanf( aTok.getStr(), "%li", &nVal );
+ sal_Int64 nVal = aTok.toInt64();
switch ( nInitFile )
{
case 1: InsertFrame( sal_uInt16( nVal ) ); // add FrameId