public DocumentType classify( )
{
XServiceInfo xSI = (XServiceInfo)UnoRuntime.queryInterface(
XServiceInfo.class, m_documentComponent );
if ( xSI.supportsService( "com.sun.star.text.TextDocument" ) )
return DocumentType.WRITER;
else if ( xSI.supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) )
return DocumentType.CALC;
else if ( xSI.supportsService( "com.sun.star.drawing.DrawingDocument" ) )
return DocumentType.DRAWING;