diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-26 10:58:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-28 19:44:08 +0200 |
commit | ef513fd4b049b214a03fbe6e62a5ea43680a7a9b (patch) | |
tree | 82f2ce93bc8e5fde6dce8685b633c3d643c9f069 /sc | |
parent | 826f1bca40a01f0a249d5b6cbb7c39c11638a060 (diff) |
remove unnecessary use of OString::getStr
Change-Id: I0490efedf459190521f4339854b3394d57765fdb
Reviewed-on: https://gerrit.libreoffice.org/38058
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/dpcache.cxx | 5 | ||||
-rw-r--r-- | sc/source/core/data/formulacell.cxx | 25 | ||||
-rw-r--r-- | sc/source/filter/starcalc/scflt.cxx | 7 |
4 files changed, 10 insertions, 29 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index fe8d35aeeb09..9cb6f345ee1b 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -864,7 +864,7 @@ bool checkHorizontalIterator(ScDocument* pDoc, const char* pData[][Size], size_t if (OUString::createFromAscii(pChecks[i].pVal) != pCell->getString(pDoc)) { cerr << "String mismatch " << pChecks[i].pVal << " vs. " << - OUStringToOString(pCell->getString(pDoc), RTL_TEXTENCODING_UTF8).getStr() << endl; + pCell->getString(pDoc) << endl; return false; } } diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx index 461ffdc14bc6..b65cdaae1bad 100644 --- a/sc/source/core/data/dpcache.cxx +++ b/sc/source/core/data/dpcache.cxx @@ -1223,11 +1223,6 @@ sal_Int32 ScDPCache::GetGroupType(long nDim) const namespace { -std::ostream& operator<< (::std::ostream& os, const OUString& str) -{ - return os << OUStringToOString(str, RTL_TEXTENCODING_UTF8).getStr(); -} - void dumpItems(const ScDPCache& rCache, long nDim, const ScDPCache::ScDPItemDataVec& rItems, size_t nOffset) { for (size_t i = 0; i < rItems.size(); ++i) diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 0fe70dbcafeb..581c28a3232b 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -2759,26 +2759,17 @@ sc::MatrixEdge ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos ) const if ( nEdges == sc::MatrixEdge::Nothing ) nEdges = sc::MatrixEdge::Inside; } -#if OSL_DEBUG_LEVEL > 0 else { - OStringBuffer aMsg( "broken Matrix, Pos: " ); - OUString aTmp(aPos.Format(ScRefFlags::COL_VALID | ScRefFlags::ROW_VALID, pDocument)); - aMsg.append(OUStringToOString(aTmp, RTL_TEXTENCODING_UTF8 )); - aMsg.append(", MatOrg: "); - aTmp = aOrg.Format(ScRefFlags::COL_VALID | ScRefFlags::ROW_VALID, pDocument); - aMsg.append(OUStringToOString(aTmp, RTL_TEXTENCODING_UTF8 )); - aMsg.append(", MatCols: "); - aMsg.append(static_cast<sal_Int32>( nC )); - aMsg.append(", MatRows: "); - aMsg.append(static_cast<sal_Int32>( nR )); - aMsg.append(", DiffCols: "); - aMsg.append(static_cast<sal_Int32>( dC )); - aMsg.append(", DiffRows: "); - aMsg.append(static_cast<sal_Int32>( dR )); - OSL_FAIL( aMsg.makeStringAndClear().getStr()); + SAL_WARN( "sc", "broken Matrix, Pos: " + << aPos.Format(ScRefFlags::COL_VALID | ScRefFlags::ROW_VALID, pDocument) + << ", MatOrg: " + << aOrg.Format(ScRefFlags::COL_VALID | ScRefFlags::ROW_VALID, pDocument) + << ", MatCols: " << static_cast<sal_Int32>( nC ) + << ", MatRows: " << static_cast<sal_Int32>( nR ) + << ", DiffCols: " << static_cast<sal_Int32>( dC ) + << ", DiffRows: " << static_cast<sal_Int32>( dR )); } -#endif return nEdges; } default: diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx index a2ba6a178531..25f05968c553 100644 --- a/sc/source/filter/starcalc/scflt.cxx +++ b/sc/source/filter/starcalc/scflt.cxx @@ -973,12 +973,7 @@ sal_uLong Sc10Import::Import() if (!nError) { ImportNameCollection(); pPrgrsBar->Progress(); } pDoc->SetViewOptions( aSc30ViewOpt ); -#if OSL_DEBUG_LEVEL > 0 - if (nError) - { - OSL_FAIL( OString::number(nError).getStr()); - } -#endif + SAL_WARN_IF( nError, "sc", nError); delete pPrgrsBar; #if OSL_DEBUG_LEVEL > 0 |