summaryrefslogtreecommitdiff
path: root/oox/source/mathml
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2011-12-02 16:17:12 +0100
committerLuboš Luňák <l.lunak@suse.cz>2011-12-07 14:47:11 +0100
commit1e4fb45c03e1787a6f73a93a1d9a68911d17a4e6 (patch)
tree3ecd3983a528e4bab079013c71a9dfff6cadd5e2 /oox/source/mathml
parentcc39235d47719193d27565ba47c00c9a91ecbce8 (diff)
disable error logs for now, until the new log macros get sorted out
Diffstat (limited to 'oox/source/mathml')
-rw-r--r--oox/source/mathml/importutils.cxx46
1 files changed, 24 insertions, 22 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;
}