diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-05-22 13:37:05 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-05-22 15:54:07 +0200 |
commit | 40e2a0d7039eee9c5377996da3949680903e1016 (patch) | |
tree | dce2e6fff33878835f0e2b7d55990ed0725f48f0 | |
parent | e5cb863bb9c8e59f6c8251342ba6f48915fb46fa (diff) |
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@redhat.com>
-rw-r--r-- | sc/source/ui/view/viewfun5.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
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); } |