summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-02-07 10:57:55 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-02-07 11:18:12 +0100
commit41324964f5a2200fd5763a51204b20ff0fa1034b (patch)
tree3b73fcac01e506927d1d64d079bd6508f13d3468 /oox
parent160cc0f6a5718bb7267b4a214c10c34eb5e08ee7 (diff)
oox: make sure debug output appears on stderr
So that profiling unit tests (finding out the largets test documents based on the CSV output on stdout) is possible again. Change-Id: Ib870d6f424c3219f37715daef5400a0181867be7
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/drawingml.cxx26
-rw-r--r--oox/source/export/shapes.cxx38
2 files changed, 32 insertions, 32 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 4571146ed8e0..11fd26afd01f 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -570,7 +570,7 @@ void DrawingML::WriteOutline( Reference< XPropertySet > rXPropSet )
if( aLineDash.Style == DashStyle_ROUND || aLineDash.Style == DashStyle_ROUNDRELATIVE )
cap = "rnd";
- DBG(printf("dash dots: %d dashes: %d dotlen: %d dashlen: %d distance: %d\n",
+ DBG(fprintf(stderr, "dash dots: %d dashes: %d dotlen: %d dashlen: %d distance: %d\n",
int( aLineDash.Dots ), int( aLineDash.Dashes ), int( aLineDash.DotLen ), int( aLineDash.DashLen ), int( aLineDash.Distance )));
}
/* fallthru intended */
@@ -670,7 +670,7 @@ OUString DrawingML::WriteImage( const OUString& rURL )
if ( index != -1 )
{
- DBG(printf ("begin: %ld %s\n", long( sizeof( aURLBegin ) ), USS( rURL ) + RTL_CONSTASCII_LENGTH( aURLBegin ) ));
+ DBG(fprintf (stderr, "begin: %ld %s\n", long( sizeof( aURLBegin ) ), USS( rURL ) + RTL_CONSTASCII_LENGTH( aURLBegin ) ));
Graphic aGraphic = GraphicObject( aURLBS.copy(RTL_CONSTASCII_LENGTH(aURLBegin)) ).GetTransformedGraphic ();
return WriteImage( aGraphic );
@@ -821,7 +821,7 @@ void DrawingML::WriteBlipMode( Reference< XPropertySet > rXPropSet )
if (GetProperty( rXPropSet, "FillBitmapMode" ) )
mAny >>= eBitmapMode;
- DBG(printf("fill bitmap mode: %d\n", eBitmapMode));
+ DBG(fprintf(stderr, "fill bitmap mode: %d\n", eBitmapMode));
switch (eBitmapMode) {
case BitmapMode_REPEAT:
@@ -848,7 +848,7 @@ void DrawingML::WriteBlipFill( Reference< XPropertySet > rXPropSet, OUString sUR
OUString aURL;
mAny >>= aURL;
- DBG(printf ("URL: %s\n", OUStringToOString( aURL, RTL_TEXTENCODING_UTF8 ).getStr() ));
+ DBG(fprintf (stderr, "URL: %s\n", OUStringToOString( aURL, RTL_TEXTENCODING_UTF8 ).getStr() ));
if( aURL.isEmpty() )
return;
@@ -924,7 +924,7 @@ void DrawingML::WriteTransformation( const Rectangle& rRect,
void DrawingML::WriteShapeTransformation( Reference< XShape > rXShape, sal_Int32 nXmlNamespace, sal_Bool bFlipH, sal_Bool bFlipV, sal_Bool bSuppressRotation )
{
- DBG(printf( "write shape transformation\n" ));
+ DBG(fprintf(stderr, "write shape transformation\n" ));
sal_Int32 nRotation=0;
awt::Point aPos = rXShape->getPosition();
@@ -1076,7 +1076,7 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, sal_Bool bIs
// mso doesn't like text color to be placed after typeface
if( GETAD( CharColor ) ) {
sal_uInt32 color = *((sal_uInt32*) mAny.getValue());
- DBG(printf("run color: %x auto: %x\n", static_cast<unsigned int>( color ), static_cast<unsigned int>( COL_AUTO )));
+ DBG(fprintf(stderr, "run color: %x auto: %x\n", static_cast<unsigned int>( color ), static_cast<unsigned int>( COL_AUTO )));
if( color == COL_AUTO ) { // nCharColor depends to the background color
sal_Bool bIsDark = sal_False;
@@ -1154,7 +1154,7 @@ const char* DrawingML::GetFieldType( ::com::sun::star::uno::Reference< ::com::su
if( GETA( TextPortionType ) ) {
aFieldType = OUString( *(OUString*)mAny.getValue() );
- DBG(printf ("field type: %s\n", USS(aFieldType) ));
+ DBG(fprintf (stderr, "field type: %s\n", USS(aFieldType) ));
}
if( aFieldType == "TextField" ) {
@@ -1165,7 +1165,7 @@ const char* DrawingML::GetFieldType( ::com::sun::star::uno::Reference< ::com::su
rXPropSet.set( rXTextField, UNO_QUERY );
if( rXPropSet.is() ) {
OUString aFieldKind( rXTextField->getPresentation( sal_True ) );
- DBG(printf ("field kind: %s\n", USS(aFieldKind) ));
+ DBG(fprintf (stderr, "field kind: %s\n", USS(aFieldKind) ));
if( aFieldKind == "Page" ) {
return "slidenum";
}
@@ -1308,7 +1308,7 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa
if ( ( mAny >>= rXIndexAccess ) && nLevel < rXIndexAccess->getCount() )
{
- DBG(printf ("numbering rules\n"));
+ DBG(fprintf (stderr, "numbering rules\n"));
Sequence< PropertyValue > aPropertySequence;
rXIndexAccess->getByIndex( nLevel ) >>= aPropertySequence;
@@ -1333,7 +1333,7 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa
const void* pValue = pPropValue[ i ].Value.getValue();
if ( pValue ) {
OUString aPropName( pPropValue[ i ].Name );
- DBG(printf ("pro name: %s\n", OUStringToOString( aPropName, RTL_TEXTENCODING_UTF8 ).getStr()));
+ DBG(fprintf (stderr, "pro name: %s\n", OUStringToOString( aPropName, RTL_TEXTENCODING_UTF8 ).getStr()));
if ( aPropName == "NumberingType" )
nNumberingType = *( (sal_Int16*)pValue );
else if ( aPropName == "Prefix" ) {
@@ -1365,7 +1365,7 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa
nBulletRelSize = *( (sal_Int16*)pValue );
} else if ( aPropName == "GraphicURL" ) {
aGraphicURL = ( *(OUString*)pValue );
- DBG(printf ("graphic url: %s\n", OUStringToOString( aGraphicURL, RTL_TEXTENCODING_UTF8 ).getStr()));
+ DBG(fprintf (stderr, "graphic url: %s\n", OUStringToOString( aGraphicURL, RTL_TEXTENCODING_UTF8 ).getStr()));
} else if ( aPropName == "GraphicSize" )
{
if ( pPropValue[ i ].Value.getValueType() == ::getCppuType( (awt::Size*)0) )
@@ -1375,7 +1375,7 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa
pPropValue[ i ].Value >>= aSize;
//aBuGraSize.nA = aSize.Width;
//aBuGraSize.nB = aSize.Height;
- DBG(printf("graphic size: %dx%d\n", int( aSize.Width ), int( aSize.Height )));
+ DBG(fprintf(stderr, "graphic size: %dx%d\n", int( aSize.Width ), int( aSize.Height )));
}
}
}
@@ -1699,7 +1699,7 @@ void DrawingML::WritePresetShape( const char* pShape, MSO_SPT eShapeType, sal_Bo
&& eShapeType != mso_sptActionButtonForwardNext // we have adjustments values for these type of shape, but MSO doesn't like them
&& eShapeType != mso_sptActionButtonBackPrevious // so they are now disabled
) {
- DBG(printf("adj seq len: %d\n", int( aAdjustmentSeq.getLength() )));
+ DBG(fprintf(stderr, "adj seq len: %d\n", int( aAdjustmentSeq.getLength() )));
if ( bPredefinedHandlesUsed )
EscherPropertyContainer::LookForPolarHandles( eShapeType, nAdjustmentsWhichNeedsToBeConverted );
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 90b7ffa7e268..cd94303f6c87 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -160,7 +160,7 @@ sal_Bool ShapeExport::NonEmptyText( Reference< XInterface > xIface )
sal_Bool bIsEmptyPresObj = sal_False;
if ( xPropSet->getPropertyValue( "IsEmptyPresentationObject" ) >>= bIsEmptyPresObj )
{
- DBG(printf("empty presentation object %d, props:\n", bIsEmptyPresObj));
+ DBG(fprintf(stderr, "empty presentation object %d, props:\n", bIsEmptyPresObj));
if( bIsEmptyPresObj )
return sal_True;
}
@@ -171,7 +171,7 @@ sal_Bool ShapeExport::NonEmptyText( Reference< XInterface > xIface )
sal_Bool bIsPresObj = sal_False;
if ( xPropSet->getPropertyValue( "IsPresentationObject" ) >>= bIsPresObj )
{
- DBG(printf("presentation object %d, props:\n", bIsPresObj));
+ DBG(fprintf(stderr, "presentation object %d, props:\n", bIsPresObj));
if( bIsPresObj )
return sal_True;
}
@@ -189,7 +189,7 @@ sal_Bool ShapeExport::NonEmptyText( Reference< XInterface > xIface )
ShapeExport& ShapeExport::WriteBezierShape( Reference< XShape > xShape, sal_Bool bClosed )
{
- DBG(printf("write open bezier shape\n"));
+ DBG(fprintf(stderr, "write open bezier shape\n"));
FSHelperPtr pFS = GetFS();
pFS->startElementNS( mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX ? XML_sp : XML_wsp), FSEND );
@@ -199,7 +199,7 @@ ShapeExport& ShapeExport::WriteBezierShape( Reference< XShape > xShape, sal_Bool
#if OSL_DEBUG_LEVEL > 0
awt::Size size = MapSize( awt::Size( aRect.GetWidth(), aRect.GetHeight() ) );
- DBG(printf("poly count %d\nsize: %d x %d", aPolyPolygon.Count(), int( size.Width ), int( size.Height )));
+ DBG(fprintf(stderr, "poly count %d\nsize: %d x %d", aPolyPolygon.Count(), int( size.Width ), int( size.Height )));
#endif
// non visual shape properties
@@ -290,7 +290,7 @@ ShapeExport& ShapeExport::WriteGroupShape(uno::Reference<drawing::XShape> xShape
ShapeExport& ShapeExport::WriteCustomShape( Reference< XShape > xShape )
{
- DBG(printf("write custom shape\n"));
+ DBG(fprintf(stderr, "write custom shape\n"));
Reference< XPropertySet > rXPropSet( xShape, UNO_QUERY );
sal_Bool bPredefinedHandlesUsed = sal_True;
@@ -300,7 +300,7 @@ ShapeExport& ShapeExport::WriteCustomShape( Reference< XShape > xShape )
SdrObjCustomShape* pShape = (SdrObjCustomShape*) GetSdrObjectFromXShape( xShape );
sal_Bool bIsDefaultObject = EscherPropertyContainer::IsDefaultObject( pShape, eShapeType );
const char* sPresetShape = msfilter::util::GetOOXMLPresetGeometry( USS( sShapeType ) );
- DBG(printf("custom shape type: %s ==> %s\n", USS( sShapeType ), sPresetShape));
+ DBG(fprintf(stderr, "custom shape type: %s ==> %s\n", USS( sShapeType ), sPresetShape));
Sequence< PropertyValue > aGeometrySeq;
sal_Int32 nAdjustmentValuesIndex = -1;
@@ -308,13 +308,13 @@ ShapeExport& ShapeExport::WriteCustomShape( Reference< XShape > xShape )
sal_Bool bFlipV = false;
if( GETA( CustomShapeGeometry ) ) {
- DBG(printf("got custom shape geometry\n"));
+ DBG(fprintf(stderr, "got custom shape geometry\n"));
if( mAny >>= aGeometrySeq ) {
- DBG(printf("got custom shape geometry sequence\n"));
+ DBG(fprintf(stderr, "got custom shape geometry sequence\n"));
for( int i = 0; i < aGeometrySeq.getLength(); i++ ) {
const PropertyValue& rProp = aGeometrySeq[ i ];
- DBG(printf("geometry property: %s\n", USS( rProp.Name )));
+ DBG(fprintf(stderr, "geometry property: %s\n", USS( rProp.Name )));
if ( rProp.Name == "MirroredX" )
rProp.Value >>= bFlipH;
@@ -391,7 +391,7 @@ ShapeExport& ShapeExport::WriteCustomShape( Reference< XShape > xShape )
ShapeExport& ShapeExport::WriteEllipseShape( Reference< XShape > xShape )
{
- DBG(printf("write ellipse shape\n"));
+ DBG(fprintf(stderr, "write ellipse shape\n"));
FSHelperPtr pFS = GetFS();
@@ -443,7 +443,7 @@ ShapeExport& ShapeExport::WriteGraphicObjectShape( Reference< XShape > xShape )
void ShapeExport::WriteGraphicObjectShapePart( Reference< XShape > xShape, const Graphic* pGraphic )
{
- DBG(printf("write graphic object shape\n"));
+ DBG(fprintf(stderr, "write graphic object shape\n"));
if( NonEmptyText( xShape ) )
{
@@ -452,7 +452,7 @@ void ShapeExport::WriteGraphicObjectShapePart( Reference< XShape > xShape, const
if( xText.is() && xText->getString().getLength() )
{
- DBG(printf("graphicObject: wrote only text\n"));
+ DBG(fprintf(stderr, "graphicObject: wrote only text\n"));
WriteTextShape( xShape );
@@ -461,13 +461,13 @@ void ShapeExport::WriteGraphicObjectShapePart( Reference< XShape > xShape, const
}
}
- DBG(printf("graphicObject without text\n"));
+ DBG(fprintf(stderr, "graphicObject without text\n"));
OUString sGraphicURL;
Reference< XPropertySet > xShapeProps( xShape, UNO_QUERY );
if( !pGraphic && ( !xShapeProps.is() || !( xShapeProps->getPropertyValue( "GraphicURL" ) >>= sGraphicURL ) ) )
{
- DBG(printf("no graphic URL found\n"));
+ DBG(fprintf(stderr, "no graphic URL found\n"));
return;
}
@@ -538,7 +538,7 @@ ShapeExport& ShapeExport::WriteConnectorShape( Reference< XShape > xShape )
sal_Bool bFlipH = false;
sal_Bool bFlipV = false;
- DBG(printf("write connector shape\n"));
+ DBG(fprintf(stderr, "write connector shape\n"));
FSHelperPtr pFS = GetFS();
@@ -629,7 +629,7 @@ ShapeExport& ShapeExport::WriteLineShape( Reference< XShape > xShape )
sal_Bool bFlipH = false;
sal_Bool bFlipV = false;
- DBG(printf("write line shape\n"));
+ DBG(fprintf(stderr, "write line shape\n"));
FSHelperPtr pFS = GetFS();
@@ -695,7 +695,7 @@ ShapeExport& ShapeExport::WriteNonVisualProperties( Reference< XShape > )
ShapeExport& ShapeExport::WriteRectangleShape( Reference< XShape > xShape )
{
- DBG(printf("write rectangle shape\n"));
+ DBG(fprintf(stderr, "write rectangle shape\n"));
FSHelperPtr pFS = GetFS();
@@ -792,11 +792,11 @@ static const NameToConvertMapType& lcl_GetConverters(DrawingML::DocumentType eDo
ShapeExport& ShapeExport::WriteShape( Reference< XShape > xShape )
{
OUString sShapeType = xShape->getShapeType();
- DBG( printf( "write shape: %s\n", USS( sShapeType ) ) );
+ DBG( fprintf( stderr, "write shape: %s\n", USS( sShapeType ) ) );
NameToConvertMapType::const_iterator aConverter = lcl_GetConverters(GetDocumentType()).find( USS( sShapeType ) );
if( aConverter == lcl_GetConverters(GetDocumentType()).end() )
{
- DBG( printf( "unknown shape\n" ) );
+ DBG( fprintf( stderr, "unknown shape\n" ) );
return WriteUnknownShape( xShape );
}
(this->*(aConverter->second))( xShape );