diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2011-12-02 16:17:12 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2011-12-07 14:47:11 +0100 |
commit | 1e4fb45c03e1787a6f73a93a1d9a68911d17a4e6 (patch) | |
tree | 3ecd3983a528e4bab079013c71a9dfff6cadd5e2 | |
parent | process element in endFastElement(), not in dtor (diff) | |
download | core-1e4fb45c03e1787a6f73a93a1d9a68911d17a4e6.tar.gz core-1e4fb45c03e1787a6f73a93a1d9a68911d17a4e6.zip |
disable error logs for now, until the new log macros get sorted out
-rw-r--r-- | oox/source/mathml/importutils.cxx | 46 | ||||
-rw-r--r-- | starmath/source/ooxmlimport.cxx | 6 |
2 files changed, 27 insertions, 25 deletions
diff --git a/oox/source/mathml/importutils.cxx b/oox/source/mathml/importutils.cxx index d09eebd4cb2f..61f04a97e716 100644 --- a/oox/source/mathml/importutils.cxx +++ b/oox/source/mathml/importutils.cxx @@ -82,6 +82,7 @@ AttributeListBuilder::AttributeListBuilder( const uno::Reference< xml::sax::XFas } } +#if 0 static OUString tokenToString( int token ) { OUString tokenname = StaticTokenMap::get().getUnicodeTokenName( token & TOKEN_MASK ); @@ -114,6 +115,7 @@ static OUString tokenToString( int token ) // just the name itself, not specified whether opening or closing return namespacename + STR( ":" ) + tokenname; } +#endif } // namespace @@ -141,7 +143,7 @@ bool XmlStream::AttributeList::attribute( int token, bool def ) const if( find->second.equalsIgnoreAsciiCaseAscii( "false" ) || find->second.equalsIgnoreAsciiCaseAscii( "off" ) || find->second.equalsIgnoreAsciiCaseAscii( "f" ) || find->second.equalsIgnoreAsciiCaseAscii( "0" )) return false; - fprintf( stderr, "Cannot convert \'%s\' to bool.\n", CSTR( find->second )); +// fprintf( stderr, "Cannot convert \'%s\' to bool.\n", CSTR( find->second )); } return def; } @@ -153,8 +155,8 @@ sal_Unicode XmlStream::AttributeList::attribute( int token, sal_Unicode def ) co { if( find->second.getLength() >= 1 ) { - if( find->second.getLength() != 1 ) - fprintf( stderr, "Cannot convert \'%s\' to sal_Unicode, stripping.\n", CSTR( find->second )); +// if( find->second.getLength() != 1 ) +// fprintf( stderr, "Cannot convert \'%s\' to sal_Unicode, stripping.\n", CSTR( find->second )); return find->second[ 0 ]; } } @@ -247,7 +249,7 @@ XmlStream::Tag XmlStream::checkTag( int token, bool optional ) pos = savedPos; return Tag(); } - fprintf( stderr, "Expected tag %s not found.\n", CSTR( tokenToString( token ))); +// fprintf( stderr, "Expected tag %s not found.\n", CSTR( tokenToString( token ))); return Tag(); } @@ -256,7 +258,7 @@ bool XmlStream::recoverAndFindTag( int token ) return recoverAndFindTagInternal( token, false ); } -bool XmlStream::recoverAndFindTagInternal( int token, bool silent ) +bool XmlStream::recoverAndFindTagInternal( int token, bool /*silent*/ ) { int depth = 0; for(; @@ -267,20 +269,20 @@ bool XmlStream::recoverAndFindTagInternal( int token, bool silent ) { if( currentToken() == OPENING( currentToken())) { - if( !silent ) - fprintf( stderr, "Skipping tag %s\n", CSTR( tokenToString( currentToken()))); +// if( !silent ) +// fprintf( stderr, "Skipping tag %s\n", CSTR( tokenToString( currentToken()))); ++depth; } else if( currentToken() == CLOSING( currentToken())) { - if( !silent ) - fprintf( stderr, "Skipping tag %s\n", CSTR( tokenToString( currentToken()))); +// if( !silent ) +// fprintf( stderr, "Skipping tag %s\n", CSTR( tokenToString( currentToken()))); --depth; } else { - if( !silent ) - fprintf( stderr, "Malformed token %d (%s)\n", currentToken(), CSTR( tokenToString( currentToken()))); +// if( !silent ) +// fprintf( stderr, "Malformed token %d (%s)\n", currentToken(), CSTR( tokenToString( currentToken()))); abort(); } continue; @@ -291,15 +293,15 @@ bool XmlStream::recoverAndFindTagInternal( int token, bool silent ) return false; // that would be leaving current element, so not found if( currentToken() == OPENING( currentToken())) { - if( !silent ) - fprintf( stderr, "Skipping tag %s\n", CSTR( tokenToString( currentToken()))); +// if( !silent ) +// fprintf( stderr, "Skipping tag %s\n", CSTR( tokenToString( currentToken()))); ++depth; } else abort(); } - if( !silent ) - fprintf( stderr, "Unexpected end of stream reached.\n" ); +// if( !silent ) +// fprintf( stderr, "Unexpected end of stream reached.\n" ); return false; } @@ -308,23 +310,23 @@ void XmlStream::skipElement( int token ) return skipElementInternal( token, true ); // no debug about skipping if called from outside } -void XmlStream::skipElementInternal( int token, bool silent ) +void XmlStream::skipElementInternal( int token, bool /*silent*/ ) { int closing = ( token & ~TAG_OPENING ) | TAG_CLOSING; // make it a closing tag assert( currentToken() == OPENING( token )); - if( !silent ) - fprintf( stderr, "Skipping unexpected element %s\n", CSTR( tokenToString( currentToken()))); +// if( !silent ) +// fprintf( stderr, "Skipping unexpected element %s\n", CSTR( tokenToString( currentToken()))); moveToNextTag(); // and just find the matching closing tag if( recoverAndFindTag( closing )) { - if( !silent ) - fprintf( stderr, "Skipped unexpected element %s\n", CSTR( tokenToString( token ))); +// if( !silent ) +// fprintf( stderr, "Skipped unexpected element %s\n", CSTR( tokenToString( token ))); moveToNextTag(); // and skip it too return; } // this one is an unexpected problem, do not silent it - fprintf( stderr, "Expected end of element %s not found.\n", CSTR( tokenToString( token ))); +// fprintf( stderr, "Expected end of element %s not found.\n", CSTR( tokenToString( token ))); } void XmlStream::handleUnexpectedTag() @@ -333,7 +335,7 @@ void XmlStream::handleUnexpectedTag() return; if( currentToken() == CLOSING( currentToken())) { - fprintf( stderr, "Skipping unexpected tag %s\n", CSTR( tokenToString( currentToken()))); +// fprintf( stderr, "Skipping unexpected tag %s\n", CSTR( tokenToString( currentToken()))); moveToNextTag(); // just skip it return; } diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx index 233334d1f94b..c776163de16a 100644 --- a/starmath/source/ooxmlimport.cxx +++ b/starmath/source/ooxmlimport.cxx @@ -88,7 +88,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()); +// fprintf(stderr, "FORMULA: %s\n", rtl::OUStringToOString( ret, RTL_TEXTENCODING_UTF8 ).getStr()); return ret; } @@ -226,7 +226,7 @@ OUString SmOoxmlImport::handleAcc() break; default: acc = STR( "acute" ); - fprintf( stderr, "Unknown m:chr in m:acc '%d'\n", accChr ); +// fprintf( stderr, "Unknown m:chr in m:acc '%d'\n", accChr ); break; } OUString e = readOMathArgInElement( M_TOKEN( e )); @@ -533,7 +533,7 @@ OUString SmOoxmlImport::handleNary() ret = STR( "sum" ); break; default: - fprintf( stderr, "Unknown m:nary chr '%d'\n", chr ); +// fprintf( stderr, "Unknown m:nary chr '%d'\n", chr ); break; } if( !subHide ) |