summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorRadu Ioan <ioan.radu.g@gmail.com>2013-03-10 23:05:25 +0200
committerFridrich Strba <fridrich@documentfoundation.org>2013-03-12 23:14:49 +0000
commita3d299e15526fdcbcaae269e33a83a9c0b187a5a (patch)
tree39773640def2972c4922b559c425be41f13cde7f /oox
parentf92a5927052f1e96ed864dd6bc6326531db4fd1f (diff)
fdo#43157 - Clean up OSL_ASSERT, DBG_ASSERT
- replaced OSL_TRACE with SAL_INFO - replaced OSL_ENSURE with SAL_WARN_IF Change-Id: Ie30fbc9c720d8b93d6093e2c95f61dceea8aae2f Reviewed-on: https://gerrit.libreoffice.org/2651 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/ppt/animationspersist.cxx12
-rw-r--r--oox/source/ppt/commonbehaviorcontext.cxx7
-rw-r--r--oox/source/ppt/pptshape.cxx25
3 files changed, 19 insertions, 25 deletions
diff --git a/oox/source/ppt/animationspersist.cxx b/oox/source/ppt/animationspersist.cxx
index 74a920871e18..d905c0e2bb9d 100644
--- a/oox/source/ppt/animationspersist.cxx
+++ b/oox/source/ppt/animationspersist.cxx
@@ -60,12 +60,12 @@ namespace oox { namespace ppt {
{
case XML_charRg:
// TODO calculate the corresponding paragraph for the text range....
- OSL_TRACE( "OOX: TODO calculate the corresponding paragraph for the text range..." );
+ SAL_INFO("oox.ppt", "OOX: TODO calculate the corresponding paragraph for the text range..." );
break;
case XML_pRg:
aParaTarget.Paragraph = static_cast< sal_Int16 >( maRange.start );
// TODO what to do with more than one.
- OSL_TRACE( "OOX: TODO what to do with more than one" );
+ SAL_INFO("oox.ppt", "OOX: TODO what to do with more than one" );
break;
}
rTarget = makeAny( aParaTarget );
@@ -86,11 +86,11 @@ namespace oox { namespace ppt {
{
case XML_inkTgt:
// TODO
- OSL_TRACE( "OOX: TODO inkTgt" );
+ SAL_INFO("oox.ppt", "OOX: TODO inkTgt" );
break;
case XML_sldTgt:
// TODO
- OSL_TRACE( "OOX: TODO sldTgt" );
+ SAL_INFO("oox.ppt", "OOX: TODO sldTgt" );
break;
case XML_sndTgt:
aTarget = makeAny(msValue);
@@ -99,11 +99,11 @@ namespace oox { namespace ppt {
{
Any rTarget;
::oox::drawingml::ShapePtr pShape = pSlide->getShape(msValue);
- OSL_ENSURE( pShape, "failed to locate Shape");
+ SAL_WARN_IF( !pShape, "oox.ppt", "failed to locate Shape");
if( pShape )
{
Reference< XShape > xShape( pShape->getXShape() );
- OSL_ENSURE( xShape.is(), "fail to get XShape from shape" );
+ SAL_WARN_IF( !xShape.is(), "oox.ppt", "fail to get XShape from shape" );
if( xShape.is() )
{
rTarget <<= xShape;
diff --git a/oox/source/ppt/commonbehaviorcontext.cxx b/oox/source/ppt/commonbehaviorcontext.cxx
index 14c6c6ba0477..ffaeef5e38b3 100644
--- a/oox/source/ppt/commonbehaviorcontext.cxx
+++ b/oox/source/ppt/commonbehaviorcontext.cxx
@@ -19,7 +19,6 @@
#include "comphelper/anytostring.hxx"
#include "cppuhelper/exc_hlp.hxx"
-#include <osl/diagnose.h>
#include <rtl/ustrbuf.hxx>
#include <com/sun/star/animations/XTimeContainer.hpp>
@@ -98,9 +97,7 @@ namespace oox { namespace ppt {
RTL_TEXTENCODING_ASCII_US );
attr.type = attrConv->meAttribute;
maAttributes.push_back( attr );
- OSL_TRACE( "OOX: attrName is %s -> %s",
- OUSTRING_TO_CSTR( msCurrentAttribute ),
- attrConv->mpAPIName );
+ SAL_INFO("oox.ppt", "OOX: attrName is " << OUSTRING_TO_CSTR( msCurrentAttribute ) << " -> " << attrConv->mpAPIName );
break;
}
attrConv++;
@@ -143,7 +140,7 @@ namespace oox { namespace ppt {
}
else
{
- OSL_TRACE( "OOX: Attribute Name outside an Attribute List" );
+ SAL_INFO("oox.ppt", "OOX: Attribute Name outside an Attribute List" );
}
return this;
}
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index 6da39d3a26e7..6bf64984db7b 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -84,7 +84,7 @@ oox::drawingml::TextListStylePtr PPTShape::getSubTypeTextListStyle( const SlideP
{
oox::drawingml::TextListStylePtr pTextListStyle;
- OSL_TRACE( "subtype style: %s", lclDebugSubType( nSubType ) );
+ SAL_INFO("oox.ppt", "subtype style: " << lclDebugSubType( nSubType ) );
switch( nSubType )
{
@@ -116,7 +116,7 @@ void PPTShape::addShape(
const awt::Rectangle* pShapeRect,
::oox::drawingml::ShapeIdMap* pShapeMap )
{
- OSL_TRACE("add shape id: %s location: %s subtype: %d service: %s", OUStringToOString(msId, RTL_TEXTENCODING_UTF8 ).getStr(), meShapeLocation == Master ? "master" : meShapeLocation == Slide ? "slide" : meShapeLocation == Layout ? "layout" : "other", mnSubType, OUStringToOString(msServiceName, RTL_TEXTENCODING_UTF8 ).getStr());
+ SAL_INFO("oox.ppt","add shape id: " << msId << " location: " << ((meShapeLocation == Master) ? "master" : ((meShapeLocation == Slide) ? "slide" : ((meShapeLocation == Layout) ? "layout" : "other"))) << " subtype: " << mnSubType << " service: " << msServiceName);
// only placeholder from layout are being inserted
if ( mnSubType && ( meShapeLocation == Master ) )
return;
@@ -133,7 +133,7 @@ void PPTShape::addShape(
sServiceName != "com.sun.star.drawing.OLE2Shape" )
{
const OUString sOutlinerShapeService( "com.sun.star.presentation.OutlinerShape" );
- OSL_TRACE("has master: %p", rSlidePersist.getMasterPersist().get());
+ SAL_INFO("oox.ppt","has master: " << std::hex << rSlidePersist.getMasterPersist().get());
switch( mnSubType )
{
case XML_ctrTitle :
@@ -223,7 +223,7 @@ void PPTShape::addShape(
}
}
- OSL_TRACE("shape service: %s", OUStringToOString(sServiceName, RTL_TEXTENCODING_UTF8 ).getStr());
+ SAL_INFO("oox.ppt","shape service: " << sServiceName);
if( mnSubType && getSubTypeIndex().has() && meShapeLocation == Layout ) {
oox::drawingml::ShapePtr pPlaceholder = PPTShape::findPlaceholderByIndex( getSubTypeIndex().get(), rSlidePersist.getShapes()->getChildren(), true );
@@ -258,7 +258,7 @@ void PPTShape::addShape(
pPlaceholder.reset();
if( pPlaceholder.get()) {
- OSL_TRACE("found placeholder with index: %d and type: %s", getSubTypeIndex().get(), lclDebugSubType( mnSubType ));
+ SAL_INFO("oox.ppt","found placeholder with index: " << getSubTypeIndex().get() << " and type: " << lclDebugSubType( mnSubType ));
}
if( pPlaceholder.get() ) {
PPTShape* pPPTPlaceholder = dynamic_cast< PPTShape* >( pPlaceholder.get() );
@@ -270,21 +270,18 @@ void PPTShape::addShape(
if( pPlaceholder->getMasterTextListStyle().get() )
pNewTextListStyle->apply( *pPlaceholder->getMasterTextListStyle() );
- // OSL_TRACE("placeholder body style");
+ // SAL_INFO("oox.ppt","placeholder body style");
// pPlaceholder->getTextBody()->getTextListStyle().dump();
- // OSL_TRACE("master text list style");
+ // SAL_INFO("oox.ppt","master text list style");
// pPlaceholder->getMasterTextListStyle()->dump();
aMasterTextListStyle = pNewTextListStyle;
- // OSL_TRACE("combined master text list style");
+ // SAL_INFO("oox.ppt","combined master text list style");
// aMasterTextListStyle->dump();
}
if( pPPTPlaceholder->mpPlaceholder.get() ) {
- OSL_TRACE("placeholder has parent placeholder: %s type: %s index: %d",
- OUStringToOString( pPPTPlaceholder->mpPlaceholder->getId(), RTL_TEXTENCODING_UTF8 ).getStr(),
- lclDebugSubType( pPPTPlaceholder->mpPlaceholder->getSubType() ),
- pPPTPlaceholder->mpPlaceholder->getSubTypeIndex().get() );
- OSL_TRACE("has textbody %d", pPPTPlaceholder->mpPlaceholder->getTextBody() != NULL );
+ SAL_INFO("oox.ppt","placeholder has parent placeholder: " << pPPTPlaceholder->mpPlaceholder->getId() << " type: " << lclDebugSubType( pPPTPlaceholder->mpPlaceholder->getSubType() ) << " index: " << pPPTPlaceholder->mpPlaceholder->getSubTypeIndex().get() );
+ SAL_INFO("oox.ppt","has textbody " << (pPPTPlaceholder->mpPlaceholder->getTextBody() != NULL) );
TextListStylePtr pPlaceholderStyle = getSubTypeTextListStyle( rSlidePersist, pPPTPlaceholder->mpPlaceholder->getSubType() );
if( pPPTPlaceholder->mpPlaceholder->getTextBody() )
pNewTextListStyle->apply( pPPTPlaceholder->mpPlaceholder->getTextBody()->getTextListStyle() );
@@ -296,7 +293,7 @@ void PPTShape::addShape(
} else if( !mpPlaceholder.get() ) {
aMasterTextListStyle.reset();
}
- OSL_TRACE("placeholder id: %s", pPlaceholder.get() ? OUStringToOString(pPlaceholder->getId(), RTL_TEXTENCODING_UTF8 ).getStr() : "not found");
+ SAL_INFO("oox.ppt","placeholder id: " << (pPlaceholder.get() ? pPlaceholder->getId() : "not found"));
}
if ( !sServiceName.isEmpty() )