Kaydet (Commit) 40e2a0d7 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

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: 's avatarStephan Bergmann <sbergman@redhat.com>
üst e5cb863b
...@@ -714,9 +714,9 @@ bool ScViewFunc::PasteLink( const uno::Reference<datatransfer::XTransferable>& r ...@@ -714,9 +714,9 @@ bool ScViewFunc::PasteLink( const uno::Reference<datatransfer::XTransferable>& r
if (aStrs.size() < 3) if (aStrs.size() < 3)
return false; return false;
const OUString* pApp = &aStrs[0]; const OUString& pApp = aStrs[0];
const OUString* pTopic = &aStrs[1]; const OUString& pTopic = aStrs[1];
const OUString* pItem = &aStrs[2]; const OUString& pItem = aStrs[2];
const OUString* pExtra = nullptr; const OUString* pExtra = nullptr;
if (aStrs.size() > 3) if (aStrs.size() > 3)
pExtra = &aStrs[3]; pExtra = &aStrs[3];
...@@ -727,8 +727,8 @@ bool ScViewFunc::PasteLink( const uno::Reference<datatransfer::XTransferable>& r ...@@ -727,8 +727,8 @@ bool ScViewFunc::PasteLink( const uno::Reference<datatransfer::XTransferable>& r
// uses Calc A1 syntax even when another formula syntax is specified // uses Calc A1 syntax even when another formula syntax is specified
// in the UI. // in the UI.
EnterMatrix("='" EnterMatrix("='"
+ ScGlobal::GetAbsDocName(*pTopic, GetViewData().GetDocument()->GetDocumentShell()) + ScGlobal::GetAbsDocName(pTopic, GetViewData().GetDocument()->GetDocumentShell())
+ "'#" + *pItem + "'#" + pItem
, ::formula::FormulaGrammar::GRAM_NATIVE); , ::formula::FormulaGrammar::GRAM_NATIVE);
return true; return true;
} }
...@@ -739,11 +739,11 @@ bool ScViewFunc::PasteLink( const uno::Reference<datatransfer::XTransferable>& r ...@@ -739,11 +739,11 @@ bool ScViewFunc::PasteLink( const uno::Reference<datatransfer::XTransferable>& r
// TODO: we could define ocQuote for " // TODO: we could define ocQuote for "
EnterMatrix("=" + ScCompiler::GetNativeSymbol(ocDde) EnterMatrix("=" + ScCompiler::GetNativeSymbol(ocDde)
+ ScCompiler::GetNativeSymbol(ocOpen) + ScCompiler::GetNativeSymbol(ocOpen)
+ "\"" + *pApp + "\"" + "\"" + pApp + "\""
+ ScCompiler::GetNativeSymbol(ocSep) + ScCompiler::GetNativeSymbol(ocSep)
+ "\"" + *pTopic + "\"" + "\"" + pTopic + "\""
+ ScCompiler::GetNativeSymbol(ocSep) + ScCompiler::GetNativeSymbol(ocSep)
+ "\"" + *pItem + "\"" + "\"" + pItem + "\""
+ ScCompiler::GetNativeSymbol(ocClose) + ScCompiler::GetNativeSymbol(ocClose)
, ::formula::FormulaGrammar::GRAM_NATIVE); , ::formula::FormulaGrammar::GRAM_NATIVE);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment