diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2012-01-30 12:06:41 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-01-30 14:10:48 +0100 |
commit | 6b2e9ebf77879a8df330310f9b67f11322e8bc3e (patch) | |
tree | fd12237570043f0f85a0588bd897d4f4608bd038 | |
parent | a1275f841a1ca601cadd2e6ec130af0703a328e5 (diff) |
fprintf -> SAL_INFO
-rw-r--r-- | starmath/source/ooxmlexport.cxx | 15 | ||||
-rw-r--r-- | starmath/source/ooxmlimport.cxx | 7 |
2 files changed, 12 insertions, 10 deletions
diff --git a/starmath/source/ooxmlexport.cxx b/starmath/source/ooxmlexport.cxx index fd12301cc9ce..846863032e34 100644 --- a/starmath/source/ooxmlexport.cxx +++ b/starmath/source/ooxmlexport.cxx @@ -30,6 +30,7 @@ #include "ooxmlexport.hxx" #include <oox/token/tokens.hxx> +#include <rtl/oustringostreaminserter.hxx> using namespace oox; using namespace oox::core; @@ -58,7 +59,7 @@ bool SmOoxmlExport::ConvertFromStarMath( ::sax_fastparser::FSHelperPtr serialize void SmOoxmlExport::HandleNode( const SmNode* pNode, int nLevel ) { -// fprintf(stderr,"XX %d %d %d\n", nLevel, pNode->GetType(), pNode->GetNumSubNodes()); + SAL_INFO( "starmath.ooxml", "Node: " << nLevel << " " << int( pNode->GetType()) << " " << pNode->GetNumSubNodes()); switch(pNode->GetType()) { case NATTRIBUT: @@ -202,7 +203,7 @@ void SmOoxmlExport::HandleText( const SmNode* pNode, int /*nLevel*/) } m_pSerializer->startElementNS( XML_m, XML_t, FSNS( XML_xml, XML_space ), "preserve", FSEND ); SmTextNode* pTemp=(SmTextNode* )pNode; -// fprintf(stderr, "T %s\n", rtl::OUStringToOString( pTemp->GetText(), RTL_TEXTENCODING_UTF8 ).getStr()); + SAL_INFO( "starmath.ooxml", "Text:" << rtl::OUStringToOString( pTemp->GetText(), RTL_TEXTENCODING_UTF8 ).getStr()); for(xub_StrLen i=0;i<pTemp->GetText().Len();i++) { #if 0 @@ -281,7 +282,7 @@ void SmOoxmlExport::HandleFractions( const SmNode* pNode, int nLevel, const char void SmOoxmlExport::HandleUnaryOperation( const SmUnHorNode* pNode, int nLevel ) { // update HandleMath() when adding new items -// fprintf(stderr,"UNARY %d\n", pNode->GetToken().eType ); + SAL_INFO( "starmath.ooxml", "Unary: " << int( pNode->GetToken().eType )); // Avoid MSVC warning C4065: switch statement contains 'default' but no 'case' labels // switch( pNode->GetToken().eType ) @@ -294,7 +295,7 @@ void SmOoxmlExport::HandleUnaryOperation( const SmUnHorNode* pNode, int nLevel ) void SmOoxmlExport::HandleBinaryOperation( const SmBinHorNode* pNode, int nLevel ) { -// fprintf(stderr,"BINARY %d\n", pNode->Symbol()->GetToken().eType ); + SAL_INFO( "starmath.ooxml", "Binary: " << int( pNode->Symbol()->GetToken().eType )); // update HandleMath() when adding new items switch( pNode->Symbol()->GetToken().eType ) { @@ -372,7 +373,7 @@ void SmOoxmlExport::HandleAttribute( const SmAttributNode* pNode, int nLevel ) void SmOoxmlExport::HandleMath( const SmNode* pNode, int nLevel ) { -// fprintf(stderr,"MATH %d\n", pNode->GetToken().eType); + SAL_INFO( "starmath.ooxml", "Math: " << int( pNode->GetToken().eType )); switch( pNode->GetToken().eType ) { case TDIVIDEBY: @@ -418,7 +419,7 @@ static rtl::OString mathSymbolToString( const SmNode* node ) void SmOoxmlExport::HandleOperator( const SmOperNode* pNode, int nLevel ) { -// fprintf( stderr, "OPER %d\n", pNode->GetToken().eType ); + SAL_INFO( "starmath.ooxml", "Operator: " << int( pNode->GetToken().eType )); switch( pNode->GetToken().eType ) { case TINT: @@ -678,7 +679,7 @@ void SmOoxmlExport::HandleBrace( const SmBraceNode* pNode, int nLevel ) void SmOoxmlExport::HandleVerticalBrace( const SmVerticalBraceNode* pNode, int nLevel ) { -// fprintf( stderr, "VERT %d\n", pNode->GetToken().eType ); + SAL_INFO( "starmath.ooxml", "Vertical: " << int( pNode->GetToken().eType )); switch( pNode->GetToken().eType ) { case TOVERBRACE: diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx index 6d4037509f6d..a092462a0a85 100644 --- a/starmath/source/ooxmlimport.cxx +++ b/starmath/source/ooxmlimport.cxx @@ -32,6 +32,7 @@ #include <comphelper/string.hxx> #include <oox/token/tokens.hxx> #include <oox/token/namespaces.hxx> +#include <rtl/oustringostreaminserter.hxx> using namespace oox; using namespace oox::formulaimport; @@ -88,7 +89,7 @@ OUString SmOoxmlImport::handleStream() // And as a result, empty parts of the formula that are not placeholders are written out // as a single space, so fix that up too. ret = comphelper::string::searchAndReplaceAllAsciiWithAscii( ret, "{ }", "{}" ); -// fprintf(stderr, "FORMULA: %s\n", rtl::OUStringToOString( ret, RTL_TEXTENCODING_UTF8 ).getStr()); + SAL_INFO( "starmath.ooxml", "Formula: " << ret ); return ret; } @@ -232,7 +233,7 @@ OUString SmOoxmlImport::handleAcc() break; default: acc = STR( "acute" ); -// fprintf( stderr, "Unknown m:chr in m:acc '%d'\n", accChr ); + SAL_WARN( "starmath.ooxml", "Unknown m:chr in m:acc \'" << accChr << "\'" ); break; } OUString e = readOMathArgInElement( M_TOKEN( e )); @@ -558,7 +559,7 @@ OUString SmOoxmlImport::handleNary() ret = STR( "sum" ); break; default: -// fprintf( stderr, "Unknown m:nary chr '%d'\n", chr ); + SAL_WARN( "starmath.ooxml", "Unknown m:nary chr \'" << chr << "\'" ); break; } if( !subHide ) |