Kaydet (Commit) 9cf1ea36 authored tarafından Chris Sherlock's avatar Chris Sherlock

tdf#43157: convert xmloff module away from OSL_ASSERT to assert

Change-Id: I7eb36a11a7de5f7cf35ce97b59c8b461b64385a7
üst 74fa31e1
......@@ -217,7 +217,7 @@ namespace DOM
if (!m_aNodePtr) { return; }
if (m_pNamespace.get()) {
OSL_ASSERT(!m_aNodePtr->parent);
assert(!m_aNodePtr->parent);
m_pNamespace->second =
OUStringToOString(prefix, RTL_TEXTENCODING_UTF8);
} else {
......@@ -232,7 +232,7 @@ namespace DOM
if (!m_aNodePtr) { return OUString(); }
if (m_pNamespace.get()) {
OSL_ASSERT(!m_aNodePtr->parent);
assert(!m_aNodePtr->parent);
OUString const ret(OStringToOUString(
m_pNamespace->second, RTL_TEXTENCODING_UTF8));
return ret;
......@@ -248,7 +248,7 @@ namespace DOM
if (!m_aNodePtr) { return OUString(); }
if (m_pNamespace.get()) {
OSL_ASSERT(!m_aNodePtr->parent);
assert(!m_aNodePtr->parent);
OUString const ret(OStringToOUString(
m_pNamespace->first, RTL_TEXTENCODING_UTF8));
return ret;
......
......@@ -173,7 +173,7 @@ namespace DOM
if (xNode.is())
{
::rtl::Reference<CNode> ret(i->second.second);
OSL_ASSERT(ret.is());
assert(ret.is());
return ret;
}
}
......@@ -265,7 +265,7 @@ namespace DOM
::std::make_pair(WeakReference<XNode>(pCNode.get()),
pCNode.get()))
).second;
OSL_ASSERT(bInserted);
assert(bInserted);
if (!bInserted) {
// if insertion failed, delete new instance and return null
return nullptr;
......@@ -939,7 +939,7 @@ namespace DOM
{
::osl::MutexGuard const g(m_rMutex);
OSL_ASSERT(nullptr != m_aNodePtr);
assert(nullptr != m_aNodePtr);
if (nullptr == m_aNodePtr) {
return nullptr;
}
......
......@@ -141,7 +141,7 @@ namespace DOM
? &const_cast<CDocument&>(rDocument) : nullptr )
, m_rMutex(const_cast< ::osl::Mutex & >(rMutex))
{
OSL_ASSERT(m_aNodePtr);
assert(m_aNodePtr);
}
void CNode::invalidate()
......@@ -181,7 +181,7 @@ namespace DOM
CDocument & CNode::GetOwnerDocument()
{
OSL_ASSERT(m_xDocument.is());
assert(m_xDocument.is());
return *m_xDocument; // needs overriding in CDocument!
}
......
......@@ -972,7 +972,7 @@ void SchXMLChartContext::EndElement()
void SchXMLChartContext::MergeSeriesForStockChart()
{
OSL_ASSERT( mbIsStockChart );
assert( mbIsStockChart );
try
{
uno::Reference< chart::XChartDocument > xOldDoc( mrImportHelper.GetChartDocument());
......@@ -1009,7 +1009,7 @@ void SchXMLChartContext::MergeSeriesForStockChart()
const sal_Int32 nSeriesCount( aSeriesSeq.getLength());
const sal_Int32 nSeriesPerCandleStick = bHasJapaneseCandlestick ? 4: 3;
sal_Int32 nCandleStickCount = nSeriesCount / nSeriesPerCandleStick;
OSL_ASSERT( nSeriesPerCandleStick * nCandleStickCount == nSeriesCount );
assert( nSeriesPerCandleStick * nCandleStickCount == nSeriesCount );
uno::Sequence< uno::Reference< chart2::XDataSeries > > aNewSeries( nCandleStickCount );
for( sal_Int32 i=0; i<nCandleStickCount; ++i )
{
......@@ -1120,7 +1120,7 @@ SvXMLImportContext* SchXMLChartContext::CreateChildContext(
{
if( !msColTrans.isEmpty() )
{
OSL_ASSERT( msRowTrans.isEmpty() );
assert( msRowTrans.isEmpty() );
pTableContext->setColumnPermutation( lcl_getNumberSequenceFromString( msColTrans, true ));
msColTrans.clear();
}
......
......@@ -2896,7 +2896,7 @@ void SchXMLExportHelper_Impl::exportRegressionCurve(
const awt::Size& rPageSize,
bool bExportContent )
{
OSL_ASSERT( mxExpPropMapper.is());
assert( mxExpPropMapper.is());
std::vector< XMLPropertyState > aPropertyStates;
std::vector< XMLPropertyState > aEquationPropertyStates;
......
......@@ -160,7 +160,7 @@ void SvXMLAttributeList::Clear()
{
m_pImpl->vecAttribute.clear();
OSL_ASSERT( ! getLength() );
assert( ! getLength() );
}
void SvXMLAttributeList::RemoveAttribute( const OUString& sName )
......@@ -177,7 +177,7 @@ void SvXMLAttributeList::RemoveAttribute( const OUString& sName )
void SvXMLAttributeList::AppendAttributeList( const uno::Reference< css::xml::sax::XAttributeList > &r )
{
OSL_ASSERT( r.is() );
assert( r.is() );
sal_Int16 nMax = r->getLength();
SvXMLAttributeList_Impl::size_type nTotalSize =
......@@ -190,7 +190,7 @@ void SvXMLAttributeList::AppendAttributeList( const uno::Reference< css::xml::sa
r->getValueByIndex( i )));
}
OSL_ASSERT( nTotalSize == (SvXMLAttributeList_Impl::size_type)getLength());
assert( nTotalSize == (SvXMLAttributeList_Impl::size_type)getLength());
}
void SvXMLAttributeList::SetValueByIndex( sal_Int16 i,
......
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