summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2017-02-27 16:55:15 +0200
committerTor Lillqvist <tml@collabora.com>2017-02-27 19:47:52 +0200
commit575db750f18f2e6d645e03f45534c2e03dddcb76 (patch)
treed881e4ecd67a341f2e0ad4e9070642928bfff4b4 /oox
parent6fd8f380423e7e3d711cb240957e81142fd11d6f (diff)
Clean up a few SAL_INFOs a bit and add useful note about the ==cscode== etc
I dislike OSL_THIS_FUNC, it is too verbose, at least with Clang on Linux. Just use the Class::Name without parameters and namespaces. Change-Id: Ic8722a131463762ab70ff35d64ae7040c67bf595
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/customshapeproperties.cxx2
-rw-r--r--oox/source/drawingml/graphicshapecontext.cxx10
-rw-r--r--oox/source/drawingml/shape.cxx25
3 files changed, 19 insertions, 18 deletions
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index 5fddf1961c4a..b791e2b8ad1d 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -390,6 +390,8 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
aPropertyMap.setProperty( PROP_Handles, aHandles);
#ifdef DEBUG
+ // Note that the script oox/source/drawingml/customshapes/generatePresetsData.pl looks
+ // for these ==cscode== and ==csdata== markers, so don't "clean up" these SAL_INFOs.
SAL_INFO("oox.cscode", "==cscode== begin");
aPropertyMap.dumpCode( aPropertyMap.makePropertySet() );
SAL_INFO("oox.cscode", "==cscode== end");
diff --git a/oox/source/drawingml/graphicshapecontext.cxx b/oox/source/drawingml/graphicshapecontext.cxx
index ab0d4746d5bf..7bfcbe9a8b53 100644
--- a/oox/source/drawingml/graphicshapecontext.cxx
+++ b/oox/source/drawingml/graphicshapecontext.cxx
@@ -263,14 +263,12 @@ ContextHandlerRef DiagramGraphicDataContext::onCreateContext( ::sal_Int32 aEleme
getFragmentPathFromRelId( msLo ),
getFragmentPathFromRelId( msQs ),
getFragmentPathFromRelId( msCs ));
- SAL_INFO("oox.drawingml", OSL_THIS_FUNC
- << "diagram added shape " << mpShapePtr->getName()
+ SAL_INFO("oox.drawingml", "DiagramGraphicDataContext::onCreateContext: added shape " << mpShapePtr->getName()
<< " of type " << mpShapePtr->getServiceName()
- << ", size (" << mpShapePtr->getPosition().X
+ << ", position: " << mpShapePtr->getPosition().X
<< "," << mpShapePtr->getPosition().Y
- << "," << mpShapePtr->getSize().Width
- << "," << mpShapePtr->getSize().Height
- <<")");
+ << ", size: " << mpShapePtr->getSize().Width
+ << "x" << mpShapePtr->getSize().Height);
// No DrawingML fallback, need to warn the user at the end.
if (mpShapePtr->getExtDrawings().empty())
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 54ebdfc33247..01d79c08ec96 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -246,7 +246,7 @@ void Shape::addShape(
const awt::Rectangle* pShapeRect,
ShapeIdMap* pShapeMap )
{
- SAL_INFO("oox.drawingml", OSL_THIS_FUNC << " id: " << msId);
+ SAL_INFO("oox.drawingml", "Shape::getShapeStyleRef: id='" << msId << "'");
try
{
@@ -275,7 +275,7 @@ void Shape::addShape(
}
catch( const Exception& e )
{
- SAL_WARN( "oox.drawingml", OSL_THIS_FUNC << "Exception: " << e.Message );
+ SAL_WARN( "oox.drawingml", "Shape::addShape: Exception: " << e.Message );
}
}
@@ -296,7 +296,7 @@ void Shape::setTextBox(bool bTextBox)
void Shape::applyShapeReference( const Shape& rReferencedShape, bool bUseText )
{
- SAL_INFO("oox.drawingml", OSL_THIS_FUNC << "apply shape reference: " << rReferencedShape.msId << " to shape id: " << msId);
+ SAL_INFO("oox.drawingml", "Shape::applyShapeReference: apply '" << rReferencedShape.msId << "' to '" << msId << "'");
if ( rReferencedShape.mpTextBody.get() && bUseText )
mpTextBody = std::make_shared<TextBody>( *rReferencedShape.mpTextBody.get() );
@@ -379,7 +379,7 @@ void Shape::addChildren(
aChildTransformation.translate(aTranslate.getX(), aTranslate.getY());
}
- SAL_INFO("oox.drawingml", OSL_THIS_FUNC << "parent matrix:\n"
+ SAL_INFO("oox.drawingml", "Shape::addChildren: parent matrix:\n"
<< aChildTransformation.get(0, 0) << " "
<< aChildTransformation.get(0, 1) << " "
<< aChildTransformation.get(0, 2) << "\n"
@@ -409,7 +409,7 @@ Reference< XShape > const & Shape::createAndInsert(
FillProperties& rShapeOrParentShapeFillProps )
{
bool bIsEmbMedia = false;
- SAL_INFO("oox.drawingml", OSL_THIS_FUNC << " id: " << msId);
+ SAL_INFO("oox.drawingml", "Shape::createAndInsert: id='" << msId << "' service='" << rServiceName << "'");
formulaimport::XmlStreamBuilder * pMathXml(nullptr);
if (mpTextBody.get())
@@ -619,7 +619,7 @@ Reference< XShape > const & Shape::createAndInsert(
if ( mbHidden || mbHiddenMasterShape )
{
- SAL_INFO("oox.drawingml", OSL_THIS_FUNC << "invisible shape with id: " << msId);
+ SAL_INFO("oox.drawingml", "Shape::createAndInsert: invisible shape with id='" << msId << "'");
const OUString sVisible( "Visible" );
xSet->setPropertyValue( sVisible, Any( false ) );
}
@@ -1085,6 +1085,8 @@ Reference< XShape > const & Shape::createAndInsert(
mpCustomShapePropertiesPtr->setTextRotateAngle( -1 * nTextRotateAngle / 60000 );
}
+ // Note that the script oox/source/drawingml/customshapes/generatePresetsData.pl looks
+ // for these ==cscode== and ==csdata== markers, so don't "clean up" these SAL_INFOs
SAL_INFO("oox.cscode", "==cscode== shape name: '" << msName << "'");
SAL_INFO("oox.csdata", "==csdata== shape name: '" << msName << "'");
mpCustomShapePropertiesPtr->pushToPropSet( rFilterBase, xSet, mxShape, maSize );
@@ -1115,7 +1117,7 @@ Reference< XShape > const & Shape::createAndInsert(
if( pTheme )
if( const TextCharacterProperties* pCharProps = pTheme->getFontStyle( pFontRef->mnThemedIdx ) )
aCharStyleProperties.assignUsed( *pCharProps );
- SAL_INFO("oox.drawingml", OSL_THIS_FUNC << "use font color");
+ SAL_INFO("oox.drawingml", "Shape::createAndInsert: use font color");
if ( pFontRef->maPhClr.isUsed() )
{
aCharStyleProperties.maFillProperties.maFillColor = pFontRef->maPhClr;
@@ -1191,7 +1193,7 @@ void Shape::keepDiagramCompatibilityInfo( XmlFilterBase& rFilterBase )
}
catch( const Exception& e )
{
- SAL_WARN( "oox.drawingml", OSL_THIS_FUNC << "Exception: " << e.Message );
+ SAL_WARN( "oox.drawingml", "Shape::keepDiagramCompatibilityInfo: Exception: " << e.Message );
}
}
@@ -1248,8 +1250,7 @@ Reference < XShape > Shape::renderDiagramToGraphic( XmlFilterBase& rFilterBase )
GraphicFilter aFilter( false );
if ( aFilter.ImportGraphic( aGraphic, "", aTempStream, GRFILTER_FORMAT_NOTFOUND, nullptr, GraphicFilterImportFlags::NONE, static_cast < Sequence < PropertyValue >* > ( nullptr ) ) != GRFILTER_OK )
{
- SAL_WARN( "oox.drawingml", OSL_THIS_FUNC
- << "Unable to import rendered stream into graphic object" );
+ SAL_WARN( "oox.drawingml", "Shape::renderDiagramToGraphic: Unable to import rendered stream into graphic object" );
return xShape;
}
@@ -1264,7 +1265,7 @@ Reference < XShape > Shape::renderDiagramToGraphic( XmlFilterBase& rFilterBase )
}
catch( const Exception& e )
{
- SAL_WARN( "oox.drawingml", OSL_THIS_FUNC << "Exception: " << e.Message );
+ SAL_WARN( "oox.drawingml", "Shape::renderDiagramToGraphic: Exception: " << e.Message );
}
return xShape;
@@ -1277,7 +1278,7 @@ void Shape::setTextBody(const TextBodyPtr & pTextBody)
void Shape::setMasterTextListStyle( const TextListStylePtr& pMasterTextListStyle )
{
- SAL_INFO("oox.drawingml", OSL_THIS_FUNC << "set master text list style to shape id: " << msId);
+ SAL_INFO("oox.drawingml", "Shape::setMasterTextListStyle: Set master text list style to shape id='" << msId << "'");
mpMasterTextListStyle = pMasterTextListStyle;
}