summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-23 11:47:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-23 14:38:14 +0200
commit5e028ad5dccc6ff1a9250baf2196f7a2f235e314 (patch)
tree6c6992e6fccf43b60141fb6ae32a6ad8e37cb84d /sc
parentf905d6056606234ba53a26a3e4105ad3560d4b7b (diff)
simplify some string handling in tracing calls
Change-Id: I0fb76562429e691400a02216019c7f96791cf9b3 Reviewed-on: https://gerrit.libreoffice.org/39159 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/attarray.cxx9
-rw-r--r--sc/source/core/data/formulacell.cxx11
-rw-r--r--sc/source/core/tool/parclass.cxx9
-rw-r--r--sc/source/ui/docshell/docsh3.cxx5
4 files changed, 9 insertions, 25 deletions
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 7ef3044ed633..5214180f0d80 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -116,14 +116,7 @@ void ScAttrArray::TestData() const
if ( nPos && pData[nPos-1].nRow != MAXROW )
++nErr;
- if (nErr)
- {
- OStringBuffer aMsg;
- aMsg.append(static_cast<sal_Int32>(nErr));
- aMsg.append(" errors in attribute array, column ");
- aMsg.append(static_cast<sal_Int32>(nCol));
- OSL_FAIL(aMsg.getStr());
- }
+ SAL_WARN_IF( nErr, "sc", nErr << " errors in attribute array, column " << nCol );
}
#endif
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index b0c5752f3f5a..7494f567bb24 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -2715,13 +2715,10 @@ sc::MatrixEdge ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos ) const
else
{
#if OSL_DEBUG_LEVEL > 0
- OStringBuffer aMsg("broken Matrix, no MatFormula at origin, Pos: ");
- OUString aTmp(aPos.Format(ScRefFlags::COL_VALID | ScRefFlags::ROW_VALID, pDocument));
- aMsg.append(OUStringToOString(aTmp, RTL_TEXTENCODING_ASCII_US));
- aMsg.append(", MatOrg: ");
- aTmp = aOrg.Format(ScRefFlags::COL_VALID | ScRefFlags::ROW_VALID, pDocument);
- aMsg.append(OUStringToOString(aTmp, RTL_TEXTENCODING_ASCII_US));
- OSL_FAIL(aMsg.getStr());
+ SAL_WARN( "sc", "broken Matrix, no MatFormula at origin, Pos: "
+ << aPos.Format(ScRefFlags::COL_VALID | ScRefFlags::ROW_VALID, pDocument)
+ << ", MatOrg: "
+ << aOrg.Format(ScRefFlags::COL_VALID | ScRefFlags::ROW_VALID, pDocument) );
#endif
return sc::MatrixEdge::Nothing;
}
diff --git a/sc/source/core/tool/parclass.cxx b/sc/source/core/tool/parclass.cxx
index d4b425a905f1..3835af788984 100644
--- a/sc/source/core/tool/parclass.cxx
+++ b/sc/source/core/tool/parclass.cxx
@@ -489,12 +489,9 @@ void ScParameterClassification::MergeArgumentsFromFunctionResource()
}
if ( nArgs > CommonData::nMaxParams )
{
- OStringBuffer aBuf;
- aBuf.append("ScParameterClassification::Init: too many arguments in listed function: ");
- aBuf.append(OUStringToOString(*(pDesc->pFuncName), RTL_TEXTENCODING_UTF8));
- aBuf.append(": ");
- aBuf.append(sal_Int32(nArgs));
- OSL_FAIL( aBuf.getStr());
+ SAL_WARN( "sc", "ScParameterClassification::Init: too many arguments in listed function: "
+ << *(pDesc->pFuncName)
+ << ": " << nArgs );
nArgs = CommonData::nMaxParams - 1;
pRun->aData.nRepeatLast = 1;
}
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index e6b547a6ceee..b20ad11cde30 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -922,10 +922,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
OUString aValue;
if ( eSourceType == SC_CAT_CONTENT )
static_cast<const ScChangeActionContent*>(pSourceAction)->GetNewString( aValue, &aDocument );
- OStringBuffer aError(OUStringToOString(aValue,
- osl_getThreadTextEncoding()));
- aError.append(" weggelassen");
- OSL_FAIL( aError.getStr() );
+ SAL_WARN( "sc", aValue << " omitted");
#endif
}
else