summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2017-05-07 12:57:42 +1000
committerChris Sherlock <chris.sherlock79@gmail.com>2017-05-07 12:57:42 +1000
commit48de83aa42166f0107ad5d98fce491d21173741f (patch)
tree3ec729d2bc0fccbbb51b19b1650427d88f16df62
parentfbea669c74f686f5a75aa80384bbfeff98680f8d (diff)
tdf#43157: convert filter module away from OSL_ASSERT to assert
Change-Id: Ib8abde011f2cf58c0e2fefbf68823bb0016265ff
-rw-r--r--filter/source/flash/swfexporter.cxx6
-rw-r--r--filter/source/flash/swffilter.cxx2
-rw-r--r--filter/source/msfilter/escherex.cxx6
-rw-r--r--filter/source/msfilter/mscodec.cxx4
-rw-r--r--filter/source/odfflatxml/OdfFlatXml.cxx6
-rw-r--r--filter/source/svg/svgimport.cxx2
-rw-r--r--filter/source/svg/svgreader.cxx6
-rw-r--r--filter/source/t602/t602filter.cxx2
-rw-r--r--filter/source/xsltfilter/LibXSLTTransformer.cxx8
-rw-r--r--filter/source/xsltfilter/OleHandler.cxx2
-rw-r--r--filter/source/xsltfilter/XSLTFilter.cxx12
11 files changed, 28 insertions, 28 deletions
diff --git a/filter/source/flash/swfexporter.cxx b/filter/source/flash/swfexporter.cxx
index 34d7d10bb9f9..c163df0e9224 100644
--- a/filter/source/flash/swfexporter.cxx
+++ b/filter/source/flash/swfexporter.cxx
@@ -160,7 +160,7 @@ bool FlashExporter::exportAll( const Reference< XComponent >& xDoc, Reference< X
}
catch( const Exception& )
{
- OSL_ASSERT( false );
+ assert( false );
return false; // no writer, no cookies
}
@@ -289,7 +289,7 @@ bool FlashExporter::exportSlides( const Reference< XDrawPage >& xDrawPage, Refer
}
catch( const Exception& )
{
- OSL_ASSERT( false );
+ assert( false );
}
exportDrawPageContents(xDrawPage, true, false);
@@ -631,7 +631,7 @@ void FlashExporter::exportShape( const Reference< XShape >& xShape, bool bMaster
}
catch( const Exception& )
{
- OSL_ASSERT(false);
+ assert(false);
}
}
diff --git a/filter/source/flash/swffilter.cxx b/filter/source/flash/swffilter.cxx
index 459bc8da3bbc..4dc4eec9f8fb 100644
--- a/filter/source/flash/swffilter.cxx
+++ b/filter/source/flash/swffilter.cxx
@@ -450,7 +450,7 @@ bool FlashExportFilter::ExportAsSingleFile(const Sequence< PropertyValue >& aDes
if (!xOutputStream.is() )
{
- OSL_ASSERT ( false );
+ assert ( false );
return false;
}
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index ee786573f1a0..32b2c787e596 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1731,7 +1731,7 @@ bool EscherPropertyContainer::CreateGraphicProperties(
// write out link to graphic
else
{
- OSL_ASSERT(aGraphicUrl.getLength());
+ assert(aGraphicUrl.getLength());
AddOpt( ESCHER_Prop_pibName, aGraphicUrl );
sal_uInt32 nPibFlags=0;
@@ -2075,7 +2075,7 @@ sal_Int32 lcl_GetAdjustValueCount( const XPolygon& rPoly )
sal_Int32 lcl_GetConnectorAdjustValue ( const XPolygon& rPoly, sal_uInt16 nIndex )
{
sal_uInt16 k = rPoly.GetSize();
- OSL_ASSERT ( k >= ( 3 + nIndex ) );
+ assert ( k >= ( 3 + nIndex ) );
Point aPt;
Point aStart = rPoly[0];
@@ -2355,7 +2355,7 @@ sal_Int32 EscherPropertyContainer::GetValueForEnhancedCustomShapeParameter( cons
case css::drawing::EnhancedCustomShapeParameterType::EQUATION :
{
size_t nIndex = (size_t) nValue;
- OSL_ASSERT(nIndex < rEquationOrder.size());
+ assert(nIndex < rEquationOrder.size());
if ( nIndex < rEquationOrder.size() )
{
nValue = (sal_uInt16)rEquationOrder[ nIndex ];
diff --git a/filter/source/msfilter/mscodec.cxx b/filter/source/msfilter/mscodec.cxx
index 83dee6c37223..b32a8a2e14b9 100644
--- a/filter/source/msfilter/mscodec.cxx
+++ b/filter/source/msfilter/mscodec.cxx
@@ -44,7 +44,7 @@ namespace {
template< typename Type >
inline void lclRotateLeft( Type& rnValue, int nBits )
{
- OSL_ASSERT(
+ assert(
nBits >= 0 &&
sal::static_int_cast< unsigned int >(nBits) < sizeof( Type ) * 8 );
rnValue = static_cast< Type >( (rnValue << nBits) | (rnValue >> (sizeof( Type ) * 8 - nBits)) );
@@ -54,7 +54,7 @@ inline void lclRotateLeft( Type& rnValue, int nBits )
template< typename Type >
inline void lclRotateLeft( Type& rnValue, sal_uInt8 nBits, sal_uInt8 nWidth )
{
- OSL_ASSERT( (nBits < nWidth) && (nWidth < sizeof( Type ) * 8) );
+ assert( (nBits < nWidth) && (nWidth < sizeof( Type ) * 8) );
Type nMask = static_cast< Type >( (1UL << nWidth) - 1 );
rnValue = static_cast< Type >(
((rnValue << nBits) | ((rnValue & nMask) >> (nWidth - nBits))) & nMask );
diff --git a/filter/source/odfflatxml/OdfFlatXml.cxx b/filter/source/odfflatxml/OdfFlatXml.cxx
index 685d6ebce9eb..e91cbc523c12 100644
--- a/filter/source/odfflatxml/OdfFlatXml.cxx
+++ b/filter/source/odfflatxml/OdfFlatXml.cxx
@@ -126,7 +126,7 @@ OdfFlatXml::importer(
sourceData[paramIdx].Value >>= url;
}
- OSL_ASSERT(inputStream.is());
+ assert(inputStream.is());
if (!inputStream.is())
return false;
@@ -186,10 +186,10 @@ OdfFlatXml::exporter(const Sequence< PropertyValue >& sourceData,
}
// get data source interface ...
Reference<XActiveDataSource> dataSource(getDelegate(), UNO_QUERY);
- OSL_ASSERT(dataSource.is());
+ assert(dataSource.is());
if (!dataSource.is())
return false;
- OSL_ASSERT(outputStream.is());
+ assert(outputStream.is());
if (!outputStream.is())
return false;
dataSource->setOutputStream(outputStream);
diff --git a/filter/source/svg/svgimport.cxx b/filter/source/svg/svgimport.cxx
index 445d233fe6d5..4927facc3c98 100644
--- a/filter/source/svg/svgimport.cxx
+++ b/filter/source/svg/svgimport.cxx
@@ -85,7 +85,7 @@ bool SVGFilter::implImport(const Sequence< PropertyValue >& rDescriptor)
xSeek->seek(0);
}
- OSL_ASSERT(xInputStream.is());
+ assert(xInputStream.is());
if(!xInputStream.is())
return false;
diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx
index 0546eea3132e..fad6cbd5b6a7 100644
--- a/filter/source/svg/svgreader.cxx
+++ b/filter/source/svg/svgreader.cxx
@@ -595,7 +595,7 @@ struct AnnotatingVisitor
aBuf.append( sal_Int32(nBlue), 16 );
// TODO(F3): respect alpha transparency (polygons etc.)
- OSL_ASSERT(rColor.a == 1.0);
+ assert(rColor.a == 1.0);
return aBuf.makeStringAndClear();
}
@@ -1253,11 +1253,11 @@ struct AnnotatingVisitor
nDummyIndex=0;
OUString aCurrAttrib(
aCurrToken.getToken(0,':',nDummyIndex).trim());
- OSL_ASSERT(nDummyIndex!=-1);
+ assert(nDummyIndex!=-1);
nDummyIndex=0;
OUString aCurrValue(
aCurrToken.getToken(1,':',nDummyIndex).trim());
- OSL_ASSERT(nDummyIndex==-1);
+ assert(nDummyIndex==-1);
// recurse into normal attribute parsing
parseAttribute( getTokenId(aCurrAttrib),
diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx
index 45ebedc2d900..2ca25e8190a2 100644
--- a/filter/source/t602/t602filter.cxx
+++ b/filter/source/t602/t602filter.cxx
@@ -258,7 +258,7 @@ bool SAL_CALL T602ImportFilter::importImpl( const Sequence< css::beans::Property
if ( !mxInputStream.is() )
{
- OSL_ASSERT( false );
+ assert( false );
return false;
}
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx
index d828cbd91991..bdfa6387c6e7 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.cxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx
@@ -268,10 +268,10 @@ namespace XSLT
void
Reader::execute()
{
- OSL_ASSERT(m_transformer != nullptr);
- OSL_ASSERT(m_transformer->getInputStream().is());
- OSL_ASSERT(m_transformer->getOutputStream().is());
- OSL_ASSERT(!m_transformer->getStyleSheetURL().isEmpty());
+ assert(m_transformer != nullptr);
+ assert(m_transformer->getInputStream().is());
+ assert(m_transformer->getOutputStream().is());
+ assert(!m_transformer->getStyleSheetURL().isEmpty());
::std::map<const char*, OString>::iterator pit;
::std::map<const char*, OString> pmap = m_transformer->getParameters();
::std::vector< const char* > params( pmap.size() * 2 + 1 ); // build parameters
diff --git a/filter/source/xsltfilter/OleHandler.cxx b/filter/source/xsltfilter/OleHandler.cxx
index 6564d2ea88a9..ed54f2e34d67 100644
--- a/filter/source/xsltfilter/OleHandler.cxx
+++ b/filter/source/xsltfilter/OleHandler.cxx
@@ -53,7 +53,7 @@ namespace XSLT
{
Reference<XStream> SAL_CALL OleHandler::createTempFile() {
Reference<XStream> tempFile( TempFile::create(m_xContext), UNO_QUERY);
- OSL_ASSERT(tempFile.is());
+ assert(tempFile.is());
return tempFile;
}
diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx
index 47d9e380ae14..d64ae15f21b9 100644
--- a/filter/source/xsltfilter/XSLTFilter.cxx
+++ b/filter/source/xsltfilter/XSLTFilter.cxx
@@ -296,7 +296,7 @@ namespace XSLT
else if ( aName == "InteractionHandler" )
value >>= xInterActionHandler;
}
- OSL_ASSERT(xInputStream.is());
+ assert(xInputStream.is());
if (!xInputStream.is())
return false;
@@ -320,9 +320,9 @@ namespace XSLT
m_tcontrol = impl_createTransformer(msUserData[1], args);
- OSL_ASSERT(xHandler.is());
- OSL_ASSERT(xInputStream.is());
- OSL_ASSERT(m_tcontrol.is());
+ assert(xHandler.is());
+ assert(xInputStream.is());
+ assert(m_tcontrol.is());
if (xHandler.is() && xInputStream.is() && m_tcontrol.is())
{
try
@@ -473,8 +473,8 @@ namespace XSLT
m_tcontrol = impl_createTransformer(msUserData[1], args);
- OSL_ASSERT(m_rOutputStream.is());
- OSL_ASSERT(m_tcontrol.is());
+ assert(m_rOutputStream.is());
+ assert(m_tcontrol.is());
if (m_tcontrol.is() && m_rOutputStream.is())
{
// we want to be notfied when the processing is done...