diff options
author | Bernhard Widl <bernhard.widl@cib.de> | 2017-06-28 17:00:01 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-07-18 13:24:51 +0200 |
commit | b0210c34dcaa5fc44956078ffa1dfe734d379224 (patch) | |
tree | 8fec004c83b23263037a933b744d7f68e675d8aa | |
parent | 42c8000e68ab9d04f12a71bdaacb3718cb35bbd3 (diff) |
fdo#43157 convert OSL_ASSERT to assert in sc/source/filter
Change-Id: I3d6d3da69ed7539dacf7eaf82fa7633f85619b39
Reviewed-on: https://gerrit.libreoffice.org/39366
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
-rw-r--r-- | sc/source/filter/dif/difexp.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/excel/excimp8.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/xml/XMLExportDatabaseRanges.cxx | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/sc/source/filter/dif/difexp.cxx b/sc/source/filter/dif/difexp.cxx index 4d0371285f0e..27bda9ea9fda 100644 --- a/sc/source/filter/dif/difexp.cxx +++ b/sc/source/filter/dif/difexp.cxx @@ -141,14 +141,14 @@ void ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc, for( nRowCnt = rRange.aStart.Row() ; nRowCnt <= nEndRow ; nRowCnt++ ) { - OSL_ASSERT(aOS.getLength() == 0); + SAL_WARN_IF(!aOS.isEmpty(), "sc.filter", "aOS should be empty"); aOS.append(pSpecDataType_LF); aOS.append(pKeyBOT); aOS.append('\n'); rOut.WriteUnicodeOrByteText(aOS.makeStringAndClear()); for( nColCnt = rRange.aStart.Col() ; nColCnt <= nEndCol ; nColCnt++ ) { - OSL_ASSERT(aOS.getLength() == 0); + SAL_WARN_IF(!aOS.isEmpty(), "sc.filter", "aOS should be empty"); bool bWriteStringData = false; ScRefCellValue aCell(*pDoc, ScAddress(nColCnt, nRowCnt, nTab)); @@ -196,7 +196,7 @@ void ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc, // sc/source/ui/docsh.cxx:ScDocShell::AsciiSave() // In fact we should create a common method if this would be // needed just one more time.. - OSL_ASSERT(aOS.getLength() == 0); + SAL_WARN_IF(!aOS.isEmpty(), "sc.filter", "aOS should be empty"); OUString aTmpStr = aString; aOS.append(pStringData); rOut.WriteUnicodeOrByteText(aOS.makeStringAndClear(), eCharSet); @@ -257,7 +257,7 @@ void ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc, aPrgrsBar.SetState( nRowCnt ); } - OSL_ASSERT(aOS.getLength() == 0); + SAL_WARN_IF(!aOS.isEmpty(), "sc.filter", "aOS should be empty"); aOS.append(pSpecDataType_LF); aOS.append(pKeyEOD); aOS.append('\n'); diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx index 2fcd0aedb8dd..69d450a747e8 100644 --- a/sc/source/filter/excel/excimp8.cxx +++ b/sc/source/filter/excel/excimp8.cxx @@ -717,7 +717,7 @@ void XclImpAutoFilterData::ReadAutoFilter( } else { - OSL_ASSERT(eConn == SC_OR); + SAL_WARN_IF(eConn != SC_OR, "sc.filter", "eConn should be SC_AND or SC_OR"); // Import only when both conditions are for simple equality, else // import only the 1st condition due to conflict with the ordering of // conditions. #i39464#. diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx index 177bb7ea6799..bafeb1a538b5 100644 --- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx +++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx @@ -262,7 +262,7 @@ void ScChangeTrackingExportHelper::SetValueAttributes(const double& fValue, cons void ScChangeTrackingExportHelper::WriteValueCell(const ScCellValue& rCell, const OUString& sValue) { - OSL_ASSERT(rCell.meType == CELLTYPE_VALUE); + assert(rCell.meType == CELLTYPE_VALUE); SetValueAttributes(rCell.mfValue, sValue); SvXMLElementExport aElemC(rExport, XML_NAMESPACE_TABLE, XML_CHANGE_TRACK_TABLE_CELL, true, true); @@ -270,7 +270,7 @@ void ScChangeTrackingExportHelper::WriteValueCell(const ScCellValue& rCell, cons void ScChangeTrackingExportHelper::WriteStringCell(const ScCellValue& rCell) { - OSL_ASSERT(rCell.meType == CELLTYPE_STRING); + assert(rCell.meType == CELLTYPE_STRING); rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_STRING); SvXMLElementExport aElemC(rExport, XML_NAMESPACE_TABLE, XML_CHANGE_TRACK_TABLE_CELL, true, true); @@ -284,7 +284,7 @@ void ScChangeTrackingExportHelper::WriteStringCell(const ScCellValue& rCell) void ScChangeTrackingExportHelper::WriteEditCell(const ScCellValue& rCell) { - OSL_ASSERT(rCell.meType == CELLTYPE_EDIT); + assert(rCell.meType == CELLTYPE_EDIT); OUString sString; if (rCell.mpEditText) @@ -307,7 +307,7 @@ void ScChangeTrackingExportHelper::WriteEditCell(const ScCellValue& rCell) void ScChangeTrackingExportHelper::WriteFormulaCell(const ScCellValue& rCell, const OUString& sValue) { - OSL_ASSERT(rCell.meType == CELLTYPE_FORMULA); + assert(rCell.meType == CELLTYPE_FORMULA); ScFormulaCell* pFormulaCell = rCell.mpFormula; OUString sAddress; diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx index b388df8cc8b7..2a6e94905e71 100644 --- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx +++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx @@ -466,7 +466,7 @@ private: else { // Multi-item condition. - OSL_ASSERT(rItems.size() > 1); + SAL_WARN_IF(rItems.size() <= 1, "sc.filter", "rItems should have more than 1 element"); // Store the 1st value for backward compatibility. const ScQueryEntry::Item& rItem = rItems.front(); |