[Libreoffice-commits] core.git: sd/source
Noel Grandin
noel at peralex.com
Fri Jun 19 03:53:23 PDT 2015
sd/source/ui/inc/ViewShell.hxx | 2 +-
sd/source/ui/view/viewshel.cxx | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
New commits:
commit a61e55a2c8b1c555de905986834462f3ce31621c
Author: Noel Grandin <noel at peralex.com>
Date: Fri Jun 19 12:51:57 2015 +0200
loplugin:passstuffbyref
Change-Id: Ic889efaca00ad9600b1b5c8452aa7ee819e63c89
diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx
index d3dfadb..b0a8682 100644
--- a/sd/source/ui/inc/ViewShell.hxx
+++ b/sd/source/ui/inc/ViewShell.hxx
@@ -452,7 +452,7 @@ public:
/// Allows adjusting the point or mark of the selection to a document coordinate.
void SetCursorMm100Position(const Point& rPosition, bool bPoint, bool bClearMark);
/// Gets the currently selected text.
- OString GetTextSelection(OString aMimeType);
+ OString GetTextSelection(const OString& aMimeType);
/// Allows starting or ending a graphic move or resize action.
void SetGraphicMm100Position(bool bStart, const Point& rPosition);
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index c66405b..e3b8314 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -553,7 +553,7 @@ void ViewShell::SetCursorMm100Position(const Point& rPosition, bool bPoint, bool
}
}
-OString ViewShell::GetTextSelection(OString aMimeType)
+OString ViewShell::GetTextSelection(const OString& _aMimeType)
{
SdrView* pSdrView = GetView();
if (!pSdrView)
@@ -568,6 +568,7 @@ OString ViewShell::GetTextSelection(OString aMimeType)
// Take care of UTF-8 text here.
bool bConvert = false;
sal_Int32 nIndex = 0;
+ OString aMimeType = _aMimeType;
if (aMimeType.getToken(0, ';', nIndex) == "text/plain")
{
if (aMimeType.getToken(0, ';', nIndex) == "charset=utf-8")
More information about the Libreoffice-commits
mailing list