[Libreoffice-commits] core.git: sc/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Wed May 22 13:54:52 UTC 2019
sc/source/ui/view/viewfun5.cxx | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
New commits:
commit 40e2a0d7039eee9c5377996da3949680903e1016
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed May 22 13:37:05 2019 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed May 22 15:54:07 2019 +0200
Turn pointers into references
...to avoid the upcoming loplugin:data asking to replace just the initial
&aStrs[0] with aStrs.begin() and leave the rest alone, which would make the
result look odd.
Change-Id: I37a86fc494c47afc56de041f3d803356fb97317d
Reviewed-on: https://gerrit.libreoffice.org/72762
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index 77184add68a5..a02dbd0e60c9 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -714,9 +714,9 @@ bool ScViewFunc::PasteLink( const uno::Reference<datatransfer::XTransferable>& r
if (aStrs.size() < 3)
return false;
- const OUString* pApp = &aStrs[0];
- const OUString* pTopic = &aStrs[1];
- const OUString* pItem = &aStrs[2];
+ const OUString& pApp = aStrs[0];
+ const OUString& pTopic = aStrs[1];
+ const OUString& pItem = aStrs[2];
const OUString* pExtra = nullptr;
if (aStrs.size() > 3)
pExtra = &aStrs[3];
@@ -727,8 +727,8 @@ bool ScViewFunc::PasteLink( const uno::Reference<datatransfer::XTransferable>& r
// uses Calc A1 syntax even when another formula syntax is specified
// in the UI.
EnterMatrix("='"
- + ScGlobal::GetAbsDocName(*pTopic, GetViewData().GetDocument()->GetDocumentShell())
- + "'#" + *pItem
+ + ScGlobal::GetAbsDocName(pTopic, GetViewData().GetDocument()->GetDocumentShell())
+ + "'#" + pItem
, ::formula::FormulaGrammar::GRAM_NATIVE);
return true;
}
@@ -739,11 +739,11 @@ bool ScViewFunc::PasteLink( const uno::Reference<datatransfer::XTransferable>& r
// TODO: we could define ocQuote for "
EnterMatrix("=" + ScCompiler::GetNativeSymbol(ocDde)
+ ScCompiler::GetNativeSymbol(ocOpen)
- + "\"" + *pApp + "\""
+ + "\"" + pApp + "\""
+ ScCompiler::GetNativeSymbol(ocSep)
- + "\"" + *pTopic + "\""
+ + "\"" + pTopic + "\""
+ ScCompiler::GetNativeSymbol(ocSep)
- + "\"" + *pItem + "\""
+ + "\"" + pItem + "\""
+ ScCompiler::GetNativeSymbol(ocClose)
, ::formula::FormulaGrammar::GRAM_NATIVE);
}
More information about the Libreoffice-commits
mailing list