move some OSL_* macros to SAL_WARN

Change-Id: I8a5e158eabdbb92eec27a5753004e4f5e826c412
This commit is contained in:
Markus Mohrhard
2013-01-09 04:45:22 +01:00
parent 46c8aadec3
commit d5b628720d

View File

@@ -513,9 +513,10 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
com::sun::star::awt::Point* pRefPoint /* = NULL */, com::sun::star::awt::Point* pRefPoint /* = NULL */,
SvXMLAttributeList* pAttrList /* = NULL */ ) SvXMLAttributeList* pAttrList /* = NULL */ )
{ {
SAL_WARN("xmloff", xShape->getShapeType());
if( maCurrentShapesIter == maShapesInfos.end() ) if( maCurrentShapesIter == maShapesInfos.end() )
{ {
OSL_FAIL( "XMLShapeExport::exportShape(): no auto styles where collected before export" ); SAL_WARN( "xmloff", "XMLShapeExport::exportShape(): no auto styles where collected before export" );
return; return;
} }
sal_Int32 nZIndex = 0; sal_Int32 nZIndex = 0;
@@ -548,7 +549,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
} }
catch(const uno::Exception&) catch(const uno::Exception&)
{ {
OSL_FAIL("XMLShapeExport::exportShape(): exception during hyperlink export"); SAL_WARN("xmloff", "XMLShapeExport::exportShape(): exception during hyperlink export");
} }
@@ -559,7 +560,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
if( (sal_Int32)aShapeInfoVector.size() <= nZIndex ) if( (sal_Int32)aShapeInfoVector.size() <= nZIndex )
{ {
OSL_FAIL( "XMLShapeExport::exportShape(): no shape info collected for a given shape" ); SAL_WARN( "xmloff", "XMLShapeExport::exportShape(): no shape info collected for a given shape" );
return; return;
} }
@@ -586,7 +587,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
XmlShapeType eShapeType(XmlShapeTypeNotYetSet); XmlShapeType eShapeType(XmlShapeTypeNotYetSet);
ImpCalcShapeType(xShape, eShapeType); ImpCalcShapeType(xShape, eShapeType);
DBG_ASSERT( eShapeType == aShapeInfo.meShapeType, "exportShape callings do not correspond to collectShapeAutoStyles calls!" ); SAL_WARN_IF( eShapeType != aShapeInfo.meShapeType, "xmloff", "exportShape callings do not correspond to collectShapeAutoStyles calls!: " << xShape->getShapeType() );
} }
#endif #endif
@@ -915,7 +916,7 @@ void XMLShapeExport::collectShapesAutoStyles( const uno::Reference < drawing::XS
for(sal_Int32 nShapeId = 0; nShapeId < nShapeCount; nShapeId++) for(sal_Int32 nShapeId = 0; nShapeId < nShapeCount; nShapeId++)
{ {
xShapes->getByIndex(nShapeId) >>= xShape; xShapes->getByIndex(nShapeId) >>= xShape;
DBG_ASSERT( xShape.is(), "Shape without a XShape?" ); SAL_WARN_IF( !xShape.is(), "xmloff", "Shape without a XShape?" );
if(!xShape.is()) if(!xShape.is())
continue; continue;
@@ -938,7 +939,7 @@ void XMLShapeExport::exportShapes( const uno::Reference < drawing::XShapes >& xS
for(sal_Int32 nShapeId = 0; nShapeId < nShapeCount; nShapeId++) for(sal_Int32 nShapeId = 0; nShapeId < nShapeCount; nShapeId++)
{ {
xShapes->getByIndex(nShapeId) >>= xShape; xShapes->getByIndex(nShapeId) >>= xShape;
DBG_ASSERT( xShape.is(), "Shape without a XShape?" ); SAL_WARN_IF( !xShape.is(), "xmloff", "Shape without a XShape?" );
if(!xShape.is()) if(!xShape.is())
continue; continue;
@@ -1142,7 +1143,7 @@ void XMLShapeExport::ImpCalcShapeType(const uno::Reference< drawing::XShape >& x
} }
catch(const uno::Exception&) catch(const uno::Exception&)
{ {
OSL_FAIL( "XMLShapeExport::ImpCalcShapeType(), expected ole shape to have the CLSID property?" ); SAL_WARN( "xmloff", "XMLShapeExport::ImpCalcShapeType(), expected ole shape to have the CLSID property?" );
} }
} }
else if(aType.match("Chart", 26)) { eShapeType = XmlShapeTypePresChartShape; } else if(aType.match("Chart", 26)) { eShapeType = XmlShapeTypePresChartShape; }