diff options
Diffstat (limited to 'dtrans/source/cnttype/wbench/testcnttype.cxx')
-rw-r--r-- | dtrans/source/cnttype/wbench/testcnttype.cxx | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/dtrans/source/cnttype/wbench/testcnttype.cxx b/dtrans/source/cnttype/wbench/testcnttype.cxx index dc569a8446d1..c2972036c2dd 100644 --- a/dtrans/source/cnttype/wbench/testcnttype.cxx +++ b/dtrans/source/cnttype/wbench/testcnttype.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -31,7 +31,7 @@ //_________________________________________________________________________________________________________________________ -// other includes +// other includes //_________________________________________________________________________________________________________________________ #include <cppuhelper/servicefactory.hxx> #include <com/sun/star/lang/XTypeProvider.hpp> @@ -56,19 +56,19 @@ #define RDB_SYSPATH "d:\\projects\\src621\\dtrans\\wntmsci7\\bin\\applicat.rdb" //------------------------------------------------------------ -// namesapces +// namesapces //------------------------------------------------------------ -using namespace ::rtl; +using namespace ::rtl; using namespace ::std; using namespace ::cppu; using namespace ::com::sun::star::datatransfer; using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::lang; using namespace ::com::sun::star::container; //------------------------------------------------------------ -// globales +// globales //------------------------------------------------------------ //################################################################ @@ -81,7 +81,7 @@ void CheckMimeContentType( const OUString& aCntType, const OUString& aType, cons OSL_ASSERT( aType == xMimeCntType->getMediaType ( ) ); OSL_ASSERT( aSubtype == xMimeCntType->getMediaSubtype ( ) ); - + try { Sequence< OUString > seqParam = xMimeCntType->getParameters( ); @@ -105,13 +105,13 @@ void CheckMimeContentType( const OUString& aCntType, const OUString& aType, cons } catch( NoSuchElementException& ) { - + } } */ //---------------------------------------------------------------- -// +// //---------------------------------------------------------------- void ShutdownServiceMgr( Reference< XMultiServiceFactory >& SrvMgr ) @@ -121,7 +121,7 @@ void ShutdownServiceMgr( Reference< XMultiServiceFactory >& SrvMgr ) if ( !xComponent.is() ) OSL_ENSURE(sal_False, "Error shuting down"); - + // Dispose and clear factory xComponent->dispose(); SrvMgr.clear(); @@ -129,7 +129,7 @@ void ShutdownServiceMgr( Reference< XMultiServiceFactory >& SrvMgr ) } //---------------------------------------------------------------- -// +// //---------------------------------------------------------------- sal_Bool readCntTypesFromFileIntoVector( char* fname, vector< string >& vecData ) @@ -145,7 +145,7 @@ sal_Bool readCntTypesFromFileIntoVector( char* fname, vector< string >& vecData char line[1024]; while ( fscanf( fstream, "%[^\n]s", line ) != EOF ) - { + { vecData.push_back( line ); fgetc( fstream ); } @@ -156,7 +156,7 @@ sal_Bool readCntTypesFromFileIntoVector( char* fname, vector< string >& vecData } //---------------------------------------------------------------- -// +// //---------------------------------------------------------------- sal_Bool processCntTypesAndWriteResultIntoFile( char* fname, vector< string >& vecData, Reference< XMimeContentTypeFactory > cnttypeFactory ) @@ -174,7 +174,7 @@ sal_Bool processCntTypesAndWriteResultIntoFile( char* fname, vector< string >& v const char* pStr = NULL; for ( vector< string >::iterator iter = vecData.begin( ); iter != iter_end; ++iter ) - { + { try { fprintf( fstream, "Gelesen: %s\n", iter->c_str( ) ); @@ -191,14 +191,14 @@ sal_Bool processCntTypesAndWriteResultIntoFile( char* fname, vector< string >& v { fwprintf( fstream, OUString::createFromAscii("PName: %s\n" ), seqParam[i].getStr( ) ); fwprintf( fstream, OUString::createFromAscii("PValue: %s\n" ), xMCntTyp->getParameterValue( seqParam[i] ).getStr( ) ); - } + } } catch( IllegalArgumentException& ex ) { - fwprintf( fstream, OUString::createFromAscii( "Fehlerhafter Content-Type gelesen!!!\n\n" ) ); + fwprintf( fstream, OUString::createFromAscii( "Fehlerhafter Content-Type gelesen!!!\n\n" ) ); } catch( NoSuchElementException& ) - { + { fwprintf( fstream, OUString::createFromAscii( "Parameterwert nicht vorhanden\n" ) ); } catch( ... ) @@ -210,12 +210,12 @@ sal_Bool processCntTypesAndWriteResultIntoFile( char* fname, vector< string >& v } fclose( fstream ); - + return sal_True; } //---------------------------------------------------------------- -// main +// main //---------------------------------------------------------------- int SAL_CALL main( int nArgc, char* argv[] ) @@ -245,7 +245,7 @@ int SAL_CALL main( int nArgc, char* argv[] ) ShutdownServiceMgr( g_xFactory ); } - Reference< XMimeContentTypeFactory > + Reference< XMimeContentTypeFactory > xMCntTypeFactory( g_xFactory->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.MimeContentTypeFactory" ) ), UNO_QUERY ); if ( !xMCntTypeFactory.is( ) ) @@ -266,7 +266,7 @@ int SAL_CALL main( int nArgc, char* argv[] ) ShutdownServiceMgr( g_xFactory ); - return 0; + return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |