diff options
-rw-r--r-- | idl/inc/command.hxx | 1 | ||||
-rw-r--r-- | idl/inc/database.hxx | 7 | ||||
-rw-r--r-- | idl/source/prj/command.cxx | 10 | ||||
-rw-r--r-- | idl/source/prj/database.cxx | 6 | ||||
-rw-r--r-- | idl/source/prj/svidl.cxx | 8 |
5 files changed, 24 insertions, 8 deletions
diff --git a/idl/inc/command.hxx b/idl/inc/command.hxx index 6829edcebe60..fa978119d810 100644 --- a/idl/inc/command.hxx +++ b/idl/inc/command.hxx @@ -65,6 +65,7 @@ public: String aCSVFile; String aExportFile; String aDocuFile; + UINT32 nVerbosity; UINT32 nFlags; SvCommand( int argc, char ** argv ); diff --git a/idl/inc/database.hxx b/idl/inc/database.hxx index 4d334bba000c..d0e6c92e349e 100644 --- a/idl/inc/database.hxx +++ b/idl/inc/database.hxx @@ -39,6 +39,8 @@ /************************************************************************* *************************************************************************/ +class SvCommand; + #ifdef IDL_COMPILER /******************** class SvIdlError ***********************************/ class SvIdlError @@ -70,6 +72,7 @@ class SvIdlDataBase BOOL bExport; String aExportFile; sal_uInt32 nUniqueId; + sal_uInt32 nVerbosity; String aDataBaseFile; SvFileStream * pStm; BOOL bIsModified; @@ -96,7 +99,7 @@ protected: } #endif public: - SvIdlDataBase(); + explicit SvIdlDataBase( const SvCommand& rCmd ); ~SvIdlDataBase(); static BOOL IsBinaryFormat( SvStream & rInStm ); @@ -165,7 +168,7 @@ public: class SvIdlWorkingBase : public SvIdlDataBase { public: - SvIdlWorkingBase(); + explicit SvIdlWorkingBase( const SvCommand& rCmd ); BOOL ReadSvIdl( SvTokenStream &, BOOL bImported, const String & rPath ); BOOL WriteSvIdl( SvStream & ); diff --git a/idl/source/prj/command.cxx b/idl/source/prj/command.cxx index 66790b457334..29c49199dc30 100644 --- a/idl/source/prj/command.cxx +++ b/idl/source/prj/command.cxx @@ -258,7 +258,7 @@ static BOOL ResponseFile( StringList * pList, int argc, char ** argv ) |* Beschreibung *************************************************************************/ SvCommand::SvCommand( int argc, char ** argv ) - : nFlags( 0 ) + : nVerbosity(1), nFlags( 0 ) { StringList aList; @@ -353,6 +353,14 @@ SvCommand::SvCommand( int argc, char ** argv ) { // Hilfe printf( "%s", CommandLineSyntax ); } + else if( aParam.EqualsIgnoreCaseAscii( "quiet" ) ) + { + nVerbosity = 0; + } + else if( aParam.EqualsIgnoreCaseAscii( "verbose" ) ) + { + nVerbosity = 2; + } else if( aParam.EqualsIgnoreCaseAscii( "syntax" ) ) { // Hilfe int j = 0; diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx index 8933156bfc69..3c6d07f19921 100644 --- a/idl/source/prj/database.cxx +++ b/idl/source/prj/database.cxx @@ -58,9 +58,10 @@ void PrimeNumber(){ } */ -SvIdlDataBase::SvIdlDataBase() +SvIdlDataBase::SvIdlDataBase( const SvCommand& rCmd ) : bExport( FALSE ) , nUniqueId( 0 ) + , nVerbosity( rCmd.nVerbosity ) , bIsModified( FALSE ) , aPersStream( *IDLAPP->pClassMgr, NULL ) , pIdTable( NULL ) @@ -700,6 +701,7 @@ SvMetaClass * SvIdlDataBase::ReadKnownClass( SvTokenStream & rInStm ) void SvIdlDataBase::Write( const ByteString & rText ) { #ifndef W31 + if( nVerbosity != 0 ) fprintf( stdout, "%s", rText.GetBuffer() ); #endif } @@ -803,7 +805,7 @@ void SvIdlDataBase::WriteError( SvTokenStream & rInStm ) |* |* Beschreibung *************************************************************************/ -SvIdlWorkingBase::SvIdlWorkingBase() +SvIdlWorkingBase::SvIdlWorkingBase(const SvCommand& rCmd) : SvIdlDataBase(rCmd) { } diff --git a/idl/source/prj/svidl.cxx b/idl/source/prj/svidl.cxx index 16706e936f30..8ae94ae896f5 100644 --- a/idl/source/prj/svidl.cxx +++ b/idl/source/prj/svidl.cxx @@ -112,8 +112,6 @@ int cdecl main ( int argc, char ** argv) { #endif - printf( "StarView Interface Definition Language (IDL) Compiler 3.0\n" ); - /* pStr = ::ResponseFile( &aCmdLine, argv, argc ); if( pStr ) @@ -136,8 +134,12 @@ int cdecl main ( int argc, char ** argv) String aTmpDocuFile; SvCommand aCommand( argc, argv ); + + if( aCommand.nVerbosity != 0 ) + printf( "StarView Interface Definition Language (IDL) Compiler 3.0\n" ); + Init(); - SvIdlWorkingBase * pDataBase = new SvIdlWorkingBase(); + SvIdlWorkingBase * pDataBase = new SvIdlWorkingBase(aCommand); int nExit = 0; if( aCommand.aExportFile.Len() ) |