summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-12-12 15:05:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-12-13 06:10:04 +0000
commita005fbeddc4e615cfff56a9bd84355f8d42c1c8c (patch)
treef7e561a362b6aa005ceea7e6176e35f05790462a /oox
parent81f2a9f46451492d4d879573bc9ac7f2e44abedb (diff)
OSL_TRACE->SAL in framework..sal
Change-Id: I9a897af88aa9f6f7ca98ce521c69b5a4ee8462e9 Reviewed-on: https://gerrit.libreoffice.org/31903 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/customshapegeometry.cxx2
-rw-r--r--oox/source/drawingml/diagram/datamodelcontext.cxx3
-rw-r--r--oox/source/drawingml/diagram/diagram.cxx4
-rw-r--r--oox/source/drawingml/diagram/diagramdefinitioncontext.cxx1
-rw-r--r--oox/source/drawingml/diagram/diagramlayoutatoms.cxx27
-rw-r--r--oox/source/drawingml/diagram/layoutnodecontext.cxx6
-rw-r--r--oox/source/drawingml/hyperlinkcontext.cxx2
-rw-r--r--oox/source/drawingml/textfield.cxx8
-rw-r--r--oox/source/drawingml/textparagraphproperties.cxx2
-rw-r--r--oox/source/drawingml/textparagraphpropertiescontext.cxx4
-rw-r--r--oox/source/drawingml/textrun.cxx8
-rw-r--r--oox/source/export/drawingml.cxx2
-rw-r--r--oox/source/export/shapes.cxx4
-rw-r--r--oox/source/ole/axcontrol.cxx4
-rw-r--r--oox/source/ppt/pptimport.cxx2
-rw-r--r--oox/source/ppt/slidepersist.cxx1
-rw-r--r--oox/source/ppt/slidetransition.cxx2
-rw-r--r--oox/source/ppt/timenodelistcontext.cxx9
18 files changed, 28 insertions, 63 deletions
diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx
index 56d00f322c04..c40502967e4c 100644
--- a/oox/source/drawingml/customshapegeometry.cxx
+++ b/oox/source/drawingml/customshapegeometry.cxx
@@ -409,7 +409,7 @@ static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCu
}
else
{
- OSL_TRACE("error: unhandled value '%s'", OUStringToOString( rValue, RTL_TEXTENCODING_ASCII_US ).getStr());
+ SAL_WARN("oox", "error: unhandled value " << rValue);
aRet.Value = Any( rValue );
}
}
diff --git a/oox/source/drawingml/diagram/datamodelcontext.cxx b/oox/source/drawingml/diagram/datamodelcontext.cxx
index c438445ea93d..55627c4c0ec2 100644
--- a/oox/source/drawingml/diagram/datamodelcontext.cxx
+++ b/oox/source/drawingml/diagram/datamodelcontext.cxx
@@ -227,16 +227,13 @@ public:
case DGM_TOKEN( extLst ):
return nullptr;
case DGM_TOKEN( prSet ):
- OSL_TRACE( "diagram property set for point");
return new PropertiesContext( *this, mrPoint, rAttribs );
case DGM_TOKEN( spPr ):
- OSL_TRACE( "shape props for point");
if( !mrPoint.mpShape )
mrPoint.mpShape.reset( new Shape() );
return new ShapePropertiesContext( *this, *(mrPoint.mpShape) );
case DGM_TOKEN( t ):
{
- OSL_TRACE( "shape text body for point");
TextBodyPtr xTextBody( new TextBody );
if( !mrPoint.mpShape )
mrPoint.mpShape.reset( new Shape() );
diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx
index 7749d5ecdabe..c4dc45d54700 100644
--- a/oox/source/drawingml/diagram/diagram.cxx
+++ b/oox/source/drawingml/diagram/diagram.cxx
@@ -73,10 +73,10 @@ DiagramData::DiagramData()
void DiagramData::dump()
{
- OSL_TRACE("Dgm: DiagramData # of cnx: %zu", maConnections.size() );
+ SAL_INFO("oox", "Dgm: DiagramData # of cnx: " << maConnections.size() );
std::for_each( maConnections.begin(), maConnections.end(),
[] (dgm::Connection & rConnection) { rConnection.dump(); } );
- OSL_TRACE("Dgm: DiagramData # of pt: %zu", maPoints.size() );
+ SAL_INFO("oox", "Dgm: DiagramData # of pt: " << maPoints.size() );
std::for_each( maPoints.begin(), maPoints.end(),
[] (dgm::Point & rPoint) { rPoint.dump(); } );
}
diff --git a/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx b/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx
index d17708c10d4d..51cf114ea369 100644
--- a/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx
+++ b/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx
@@ -37,7 +37,6 @@ DiagramDefinitionContext::DiagramDefinitionContext( ContextHandler2Helper& rPare
: ContextHandler2( rParent )
, mpLayout( pLayout )
{
- OSL_TRACE( "OOX: DiagramDefinitionContext::DiagramDefinitionContext()" );
mpLayout->setDefStyle( rAttributes.getString( XML_defStyle ).get() );
OUString sValue = rAttributes.getString( XML_minVer ).get();
if( sValue.isEmpty() )
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index 2df07c20d86d..d379bda4ada4 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -80,9 +80,7 @@ void ConditionAttr::loadFromXAttr( const Reference< XFastAttributeList >& xAttr
void LayoutAtom::dump(int level)
{
- OSL_TRACE( "level = %d - %s of type %s", level,
- OUSTRING_TO_CSTR( msName ),
- typeid(*this).name() );
+ SAL_INFO("oox", "level = " << level << " - " << msName << " of type " << typeid(*this).name() );
const std::vector<LayoutAtomPtr>& rChildren=getChildren();
std::for_each( rChildren.begin(), rChildren.end(),
[level] (LayoutAtomPtr const& pAtom) { pAtom->dump(level + 1); } );
@@ -469,34 +467,14 @@ bool LayoutNode::setupShape( const ShapePtr& rShape, const Diagram& rDgm, sal_uI
// now, but docs are a bit unclear on this
if( !msStyleLabel.isEmpty() )
{
- SAL_INFO(
- "oox.drawingml", "setting style with label " << msStyleLabel);
-
const DiagramQStyleMap::const_iterator aStyle=rDgm.getStyles().find(msStyleLabel);
if( aStyle != rDgm.getStyles().end() )
{
rShape->getShapeStyleRefs()[XML_fillRef] = aStyle->second.maFillStyle;
- SAL_INFO(
- "oox.drawingml",
- "added fill style with id "
- << aStyle->second.maFillStyle.mnThemedIdx);
rShape->getShapeStyleRefs()[XML_lnRef] = aStyle->second.maLineStyle;
- SAL_INFO(
- "oox.drawingml",
- "added line style with id "
- << aStyle->second.maLineStyle.mnThemedIdx);
rShape->getShapeStyleRefs()[XML_effectRef] = aStyle->second.maEffectStyle;
- SAL_INFO(
- "oox.drawingml",
- "added effect style with id "
- << aStyle->second.maEffectStyle.mnThemedIdx);
rShape->getShapeStyleRefs()[XML_fontRef] = aStyle->second.maTextStyle;
- SAL_INFO(
- "oox.drawingml",
- "added fontref style with id "
- << aStyle->second.maTextStyle.mnThemedIdx);
Color aColor=aStyle->second.maTextStyle.maPhClr;
- OSL_TRACE("added fontref color with alpha %d", aColor.getTransparency() );
}
const DiagramColorMap::const_iterator aColor=rDgm.getColors().find(msStyleLabel);
@@ -665,8 +643,7 @@ void ShapeCreationVisitor::visit(LayoutNode& rAtom)
}
else
{
- OSL_TRACE("ShapeCreationVisitor::visit: no shape set while processing layoutnode named %s",
- OUSTRING_TO_CSTR( rAtom.getName() ) );
+ SAL_WARN("oox", "ShapeCreationVisitor::visit: no shape set while processing layoutnode named " << rAtom.getName() );
}
// set new parent for children
diff --git a/oox/source/drawingml/diagram/layoutnodecontext.cxx b/oox/source/drawingml/diagram/layoutnodecontext.cxx
index a028d334416f..7aa33617e371 100644
--- a/oox/source/drawingml/diagram/layoutnodecontext.cxx
+++ b/oox/source/drawingml/diagram/layoutnodecontext.cxx
@@ -120,7 +120,7 @@ public:
}
else
{
- OSL_TRACE( "ignoring second else clause" );
+ SAL_WARN("oox", "ignoring second else clause" );
}
break;
default:
@@ -269,7 +269,7 @@ LayoutNodeContext::onCreateContext( ::sal_Int32 aElement,
}
else
{
- OSL_TRACE( "OOX: encountered a shape in a non layoutNode context" );
+ SAL_WARN("oox", "OOX: encountered a shape in a non layoutNode context" );
}
break;
}
@@ -324,7 +324,7 @@ LayoutNodeContext::onCreateContext( ::sal_Int32 aElement,
}
else
{
- OSL_TRACE( "OOX: encountered a varLst in a non layoutNode context" );
+ SAL_WARN("oox", "OOX: encountered a varLst in a non layoutNode context" );
}
break;
}
diff --git a/oox/source/drawingml/hyperlinkcontext.cxx b/oox/source/drawingml/hyperlinkcontext.cxx
index 1e88e68b5bd2..d0d807989066 100644
--- a/oox/source/drawingml/hyperlinkcontext.cxx
+++ b/oox/source/drawingml/hyperlinkcontext.cxx
@@ -46,11 +46,9 @@ HyperLinkContext::HyperLinkContext( ContextHandler2Helper& rParent,
OUString aRelId = rAttribs.getString( R_TOKEN( id ) ).get();
if ( !aRelId.isEmpty() )
{
- OSL_TRACE("OOX: URI rId %s", OUStringToOString (aRelId, RTL_TEXTENCODING_UTF8).pData->buffer);
sHref = getRelations().getExternalTargetFromRelId( aRelId );
if( !sHref.isEmpty() )
{
- OSL_TRACE("OOX: URI href %s", OUStringToOString (sHref, RTL_TEXTENCODING_UTF8).pData->buffer);
sURL = getFilter().getAbsoluteUrl( sHref );
}
else
diff --git a/oox/source/drawingml/textfield.cxx b/oox/source/drawingml/textfield.cxx
index 73fc3c23e206..8594f8ebe821 100644
--- a/oox/source/drawingml/textfield.cxx
+++ b/oox/source/drawingml/textfield.cxx
@@ -69,7 +69,7 @@ void lclCreateTextFields( std::list< Reference< XTextField > > & aFields,
bool bIsDate = true;
int idx = p.toInt32();
sal_uInt16 nNumFmt;
-// OSL_TRACE( "OOX: p = %s, %d", p.pData->buffer, idx );
+// SAL_WARNx("oox", "OOX: p = %s, %d", p.pData->buffer, idx );
xIface = xFactory->createInstance( "com.sun.star.text.TextField.DateTime" );
aFields.push_back( Reference< XTextField > ( xIface, UNO_QUERY ) );
Reference< XPropertySet > xProps( xIface, UNO_QUERY_THROW );
@@ -132,7 +132,7 @@ void lclCreateTextFields( std::list< Reference< XTextField > > & aFields,
}
catch(Exception & e)
{
- OSL_TRACE( "Exception %s", OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
+ SAL_WARN("oox", "Exception " << e.Message );
}
}
else if ( sType == "slidenum" )
@@ -236,7 +236,7 @@ sal_Int32 TextField::insertAt(
}
catch( const Exception& )
{
- OSL_TRACE("OOX: TextField::insertAt() exception");
+ SAL_WARN("oox", "OOX: TextField::insertAt() exception");
}
return nCharHeight;
@@ -244,4 +244,4 @@ sal_Int32 TextField::insertAt(
} }
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx
index aa6225359387..fb9e3e3064ab 100644
--- a/oox/source/drawingml/textparagraphproperties.cxx
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -120,7 +120,7 @@ void BulletList::setSuffixMinusRight()
void BulletList::setType( sal_Int32 nType )
{
OSL_ASSERT((nType & sal_Int32(0xFFFF0000))==0);
-// OSL_TRACE( "OOX: set list numbering type %d", nType);
+// SAL_WARNx("oox", "OOX: set list numbering type %d", nType);
switch( nType )
{
case XML_alphaLcParenBoth:
diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx b/oox/source/drawingml/textparagraphpropertiescontext.cxx
index 460bc2e2d4d6..f040a9846ce9 100644
--- a/oox/source/drawingml/textparagraphpropertiescontext.cxx
+++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx
@@ -220,7 +220,7 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl
}
catch(SAXException& /* e */ )
{
- OSL_TRACE("OOX: SAXException in XML_buAutoNum");
+ SAL_WARN("oox", "OOX: SAXException in XML_buAutoNum");
}
break;
}
@@ -232,7 +232,7 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl
}
catch(SAXException& /* e */)
{
- OSL_TRACE("OOX: SAXException in XML_buChar");
+ SAL_WARN("oox", "OOX: SAXException in XML_buChar");
}
break;
case A_TOKEN( buBlip ): // CT_TextBlipBullet
diff --git a/oox/source/drawingml/textrun.cxx b/oox/source/drawingml/textrun.cxx
index 8d36dfc4bb02..92cfebe8811b 100644
--- a/oox/source/drawingml/textrun.cxx
+++ b/oox/source/drawingml/textrun.cxx
@@ -75,7 +75,7 @@ sal_Int32 TextRun::insertAt(
{
if( mbIsLineBreak )
{
- OSL_TRACE( "OOX: TextRun::insertAt() insert line break" );
+ SAL_WARN("oox", "OOX: TextRun::insertAt() insert line break" );
xText->insertControlCharacter( xStart, ControlCharacter::LINE_BREAK, false );
}
else
@@ -138,7 +138,7 @@ sal_Int32 TextRun::insertAt(
}
else
{
- OSL_TRACE( "OOX: URL field" );
+ SAL_WARN("oox", "OOX: URL field" );
Reference< XMultiServiceFactory > xFactory( rFilterBase.getModel(), UNO_QUERY );
Reference< XTextField > xField( xFactory->createInstance( "com.sun.star.text.TextField.URL" ), UNO_QUERY );
if( xField.is() )
@@ -169,14 +169,14 @@ sal_Int32 TextRun::insertAt(
}
else
{
- OSL_TRACE( "OOX: URL field couldn't be created" );
+ SAL_WARN("oox", "OOX: URL field couldn't be created" );
xText->insertString( xStart, getText(), false );
}
}
}
catch( const Exception& )
{
- OSL_TRACE("OOX: TextRun::insertAt() exception");
+ SAL_WARN("oox", "OOX: TextRun::insertAt() exception");
}
return nCharHeight;
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 6bd90d5c3550..136570ae0351 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -903,7 +903,7 @@ OUString DrawingML::WriteImage( const Graphic& rGraphic , bool bRelPathToMedia )
}
else
{
- OSL_TRACE( "unhandled graphic type" );
+ SAL_WARN("oox", "unhandled graphic type" );
/*Earlier, even in case of unhandled graphic types we were
proceeding to write the image, which would eventually
write an empty image with a zero size, and return a valid
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 7bd85a8cd39f..11b482d2a7a2 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -1466,8 +1466,6 @@ ShapeExport& ShapeExport::WriteTextBox( const Reference< XInterface >& xIface, s
void ShapeExport::WriteTable( const Reference< XShape >& rXShape )
{
- OSL_TRACE("write table");
-
Reference< XTable > xTable;
Reference< XPropertySet > xPropSet( rXShape, UNO_QUERY );
@@ -1747,8 +1745,6 @@ ShapeExport& ShapeExport::WriteTableShape( const Reference< XShape >& xShape )
{
FSHelperPtr pFS = GetFS();
- OSL_TRACE("write table shape");
-
pFS->startElementNS( mnXmlNamespace, XML_graphicFrame, FSEND );
pFS->startElementNS( mnXmlNamespace, XML_nvGraphicFramePr, FSEND );
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index b6ea8a2726e6..7e5dcb061f31 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -2598,8 +2598,8 @@ HtmlTextBoxModel::importBinaryModel( BinaryInputStream& rInStrm )
OUString sStringContents = rInStrm.readUnicodeArray( rInStrm.size() );
// in msocximex ( where this is ported from, it appears *nothing* is read
// from the control stream ), surely there is some useful info there ?
- OSL_TRACE("HtmlTextBoxModel::importBinaryModel - string contents of stream :");
- OSL_TRACE("%s", OUStringToOString( sStringContents, RTL_TEXTENCODING_UTF8 ).getStr() );
+ SAL_WARNx("oox", "HtmlTextBoxModel::importBinaryModel - string contents of stream :");
+ SAL_WARNx("oox", "%s", OUStringToOString( sStringContents, RTL_TEXTENCODING_UTF8 ).getStr() );
#else
(void) rInStrm;
#endif
diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx
index d2764b865372..140d3b665534 100644
--- a/oox/source/ppt/pptimport.cxx
+++ b/oox/source/ppt/pptimport.cxx
@@ -132,7 +132,7 @@ sal_Int32 PowerPointImport::getSchemeColor( sal_Int32 nToken ) const
}
else
{
- OSL_TRACE("OOX: PowerPointImport::mpThemePtr is NULL");
+ SAL_WARN("oox", "OOX: PowerPointImport::mpThemePtr is NULL");
}
}
}
diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index ec7932548824..3de25a809e2c 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -316,7 +316,6 @@ void SlidePersist::hideShapesAsMasterShapes()
PPTShape* pPPTShape = dynamic_cast< PPTShape* >( (*aChildIter++).get() );
if (!pPPTShape)
continue;
- OSL_TRACE("hide shape with id: %s", OUStringToOString(pPPTShape->getId(), RTL_TEXTENCODING_UTF8 ).getStr());
pPPTShape->setHiddenMasterShape( true );
}
}
diff --git a/oox/source/ppt/slidetransition.cxx b/oox/source/ppt/slidetransition.cxx
index 9ae715fa49c0..b0b95c0ac43a 100644
--- a/oox/source/ppt/slidetransition.cxx
+++ b/oox/source/ppt/slidetransition.cxx
@@ -294,7 +294,7 @@ namespace oox { namespace ppt {
mnTransitionType = TransitionType::BARWIPE;
mnTransitionSubType = TransitionSubType::FADEOVERCOLOR;
}
- OSL_TRACE( "OOX: cut transition fallback." );
+ SAL_WARN("oox", "OOX: cut transition fallback." );
break;
case PPT_TOKEN( fade ):
mnTransitionType = TransitionType::FADE;
diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx
index 483442faac2e..6d169960c59f 100644
--- a/oox/source/ppt/timenodelistcontext.cxx
+++ b/oox/source/ppt/timenodelistcontext.cxx
@@ -188,10 +188,9 @@ namespace oox { namespace ppt {
OUString aString;
if( maTo >>= aString )
{
- OSL_TRACE( "Magic conversion %s", OUSTRING_TO_CSTR( aString ) );
maTo = makeAny( aString == "visible" );
if( !maTo.has<sal_Bool>() )
- OSL_TRACE( "conversion failed" );
+ SAL_WARN("oox", "conversion failed" );
}
mpNode->setTo( maTo );
}
@@ -295,7 +294,7 @@ namespace oox { namespace ppt {
mpNode->getNodeProperties()[ NP_COMMAND ] = makeAny((sal_Int16)nCommand);
if( nCommand == EffectCommands::CUSTOM )
{
- OSL_TRACE("OOX: CmdTimeNodeContext::endFastElement(), unknown command!");
+ SAL_WARN("oox", "OOX: CmdTimeNodeContext::endFastElement(), unknown command!");
aParamValue.Name = "UserDefined";
aParamValue.Value <<= msCommand;
}
@@ -307,7 +306,7 @@ namespace oox { namespace ppt {
}
catch( RuntimeException& )
{
- OSL_TRACE( "OOX: Exception in CmdTimeNodeContext::endFastElement()" );
+ SAL_WARN("oox", "OOX: Exception in CmdTimeNodeContext::endFastElement()" );
}
}
}
@@ -982,7 +981,7 @@ namespace oox { namespace ppt {
break;
case PPT_TOKEN( video ):
nNodeType = AnimationNodeType::AUDIO;
- OSL_TRACE( "OOX: video requested, gave Audio instead" );
+ SAL_WARN("oox", "OOX: video requested, gave Audio instead" );
break;
default: