diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2016-01-17 15:10:38 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2016-01-17 15:32:16 +0000 |
commit | 74063b259e7da402ede7761194639462b1b24759 (patch) | |
tree | 80562b76706a2a79c991f0608de1c881d8b13724 /sc | |
parent | 15a43283b83dd3179347c255b42aba0d116cb71b (diff) |
cppcheck: fix 2 variableScope reports in sc
Change-Id: Iea1f8b851d3d9b5c9b22165f1a33e124212d8e80
Reviewed-on: https://gerrit.libreoffice.org/21535
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/html/htmlexp.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/docfunc.cxx | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx index 7b06e985225d..668c7022a427 100644 --- a/sc/source/filter/html/htmlexp.cxx +++ b/sc/source/filter/html/htmlexp.cxx @@ -1289,7 +1289,6 @@ bool ScHTMLExport::WriteFieldText( const EditTextObject* pData ) void ScHTMLExport::CopyLocalFileToINet( OUString& rFileNm, const OUString& rTargetNm, bool bFileToFile ) { - bool bRet = false; INetURLObject aFileUrl, aTargetUrl; aFileUrl.SetSmartURL( rFileNm ); aTargetUrl.SetSmartURL( rTargetNm ); @@ -1314,6 +1313,7 @@ void ScHTMLExport::CopyLocalFileToINet( OUString& rFileNm, pFileNameMap.reset( new std::map<OUString, OUString>() ); } + bool bRet = false; SvFileStream aTmp( aFileUrl.PathToFileName(), StreamMode::READ ); OUString aSrc = rFileNm; diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index d5d0ccb0a49c..4cc3fd25e228 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -5157,8 +5157,6 @@ void ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd SCROW nStartRow = rOldRange.aStart.Row(); SCTAB nTab = rOldRange.aStart.Tab(); - bool bRet = false; - OUString aFormula; rDoc.GetFormula( nStartCol, nStartRow, nTab, aFormula ); if ( aFormula.startsWith("{") && aFormula.endsWith("}") ) @@ -5178,8 +5176,7 @@ void ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd if ( DeleteContents( aMark, InsertDeleteFlags::CONTENTS, true, bApi ) ) { // GRAM_PODF_A1 for API compatibility. - bRet = EnterMatrix( aNewRange, &aMark, nullptr, aFormula, bApi, false, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_PODF_A1 ); - if (!bRet) + if (!EnterMatrix( aNewRange, &aMark, nullptr, aFormula, bApi, false, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_PODF_A1 )) { // versuchen, alten Zustand wiederherzustellen EnterMatrix( rOldRange, &aMark, nullptr, aFormula, bApi, false, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_PODF_A1 ); |