Kaydet (Commit) d6fdebc5 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1000852 Uncaught exception

Change-Id: Iaab0c992497b7d6b2da67cf65ade099c784c7a94
üst f177ab81
...@@ -275,45 +275,53 @@ ReadResponseFile(std::vector<INetURLObject> & rFiles, OUString const& rInput) ...@@ -275,45 +275,53 @@ ReadResponseFile(std::vector<INetURLObject> & rFiles, OUString const& rInput)
int GalApp::Main() int GalApp::Main()
{ {
OUString aPath, aDestDir; try
OUString aName( "Default name" );
std::vector<INetURLObject> aFiles;
for( sal_uInt32 i = 0; i < GetCommandLineParamCount(); i++ )
{ {
OUString aParam = GetCommandLineParam( i ); OUString aPath, aDestDir;
OUString aName( "Default name" );
std::vector<INetURLObject> aFiles;
if ( aParam.startsWith( "-env:" ) ) for( sal_uInt32 i = 0; i < GetCommandLineParamCount(); i++ )
continue;
else if ( aParam == "--help" || aParam == "-h" )
return PrintHelp();
else if ( aParam == "--build-tree" )
{ {
mbRelativeURLs = true; OUString aParam = GetCommandLineParam( i );
mbInBuildTree = true;
if ( aParam.startsWith( "-env:" ) )
continue;
else if ( aParam == "--help" || aParam == "-h" )
return PrintHelp();
else if ( aParam == "--build-tree" )
{
mbRelativeURLs = true;
mbInBuildTree = true;
}
else if ( aParam == "--name" )
aName = GetCommandLineParam( ++i );
else if ( aParam == "--path" )
aPath = Smartify( GetCommandLineParam( ++i ) ).
GetMainURL(INetURLObject::NO_DECODE);
else if ( aParam == "--destdir" )
aDestDir = GetCommandLineParam( ++i );
else if ( aParam == "--relative-urls" )
mbRelativeURLs = true;
else if ( aParam == "--number-from" )
fprintf ( stderr, "--number-from is deprecated, themes now "
"have filenames based on their names\n" );
else if ( aParam == "--filenames" )
ReadResponseFile(aFiles, GetCommandLineParam(++i));
else
aFiles.push_back( Smartify( aParam ) );
} }
else if ( aParam == "--name" )
aName = GetCommandLineParam( ++i );
else if ( aParam == "--path" )
aPath = Smartify( GetCommandLineParam( ++i ) ).
GetMainURL(INetURLObject::NO_DECODE);
else if ( aParam == "--destdir" )
aDestDir = GetCommandLineParam( ++i );
else if ( aParam == "--relative-urls" )
mbRelativeURLs = true;
else if ( aParam == "--number-from" )
fprintf ( stderr, "--number-from is deprecated, themes now "
"have filenames based on their names\n" );
else if ( aParam == "--filenames" )
ReadResponseFile(aFiles, GetCommandLineParam(++i));
else
aFiles.push_back( Smartify( aParam ) );
}
if( aFiles.empty() ) if( aFiles.empty() )
return PrintHelp(); return PrintHelp();
createTheme( aName, aPath, aDestDir, aFiles, mbRelativeURLs ); createTheme( aName, aPath, aDestDir, aFiles, mbRelativeURLs );
}
catch (const uno::Exception& e)
{
SAL_WARN("vcl.app", "Fatal exception: " << e.Message);
return EXIT_FAILURE;
}
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment