summaryrefslogtreecommitdiff
path: root/idl/source/prj/svidl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'idl/source/prj/svidl.cxx')
-rw-r--r--idl/source/prj/svidl.cxx142
1 files changed, 0 insertions, 142 deletions
diff --git a/idl/source/prj/svidl.cxx b/idl/source/prj/svidl.cxx
index 94a6e538f7d7..852b6bacf524 100644
--- a/idl/source/prj/svidl.cxx
+++ b/idl/source/prj/svidl.cxx
@@ -105,13 +105,7 @@ inline OUString tempFileHelper(OUString const & fname)
int main ( int argc, char ** argv)
{
- OUString aTmpListFile;
OUString aTmpSlotMapFile;
- OUString aTmpSfxItemFile;
- OUString aTmpDataBaseFile;
- OUString aTmpHelpIdFile;
- OUString aTmpCSVFile;
- OUString aTmpDocuFile;
OUString aTmpDepFile;
SvCommand aCommand( argc, argv );
@@ -134,30 +128,6 @@ int main ( int argc, char ** argv)
if( ReadIdl( pDataBase, aCommand ) )
{
- if( nExit == 0 && !aCommand.aDocuFile.isEmpty() )
- {
- aTmpDocuFile = tempFileHelper(aCommand.aDocuFile);
- SvFileStream aOutStm( aTmpDocuFile, STREAM_READWRITE | STREAM_TRUNC );
- if( !pDataBase->WriteDocumentation( aOutStm ) )
- {
- nExit = -1;
- OStringBuffer aStr("cannot write documentation file: ");
- aStr.append(OUStringToOString(aCommand.aDocuFile, RTL_TEXTENCODING_UTF8));
- fprintf(stderr, "%s\n", aStr.getStr());
- }
- }
- if( nExit == 0 && !aCommand.aListFile.isEmpty() )
- {
- aTmpListFile = tempFileHelper(aCommand.aListFile);
- SvFileStream aOutStm( aTmpListFile, STREAM_READWRITE | STREAM_TRUNC );
- if( !pDataBase->WriteSvIdl( aOutStm ) )
- {
- nExit = -1;
- OStringBuffer aStr("cannot write list file: ");
- aStr.append(OUStringToOString(aCommand.aListFile, RTL_TEXTENCODING_UTF8));
- fprintf(stderr, "%s\n", aStr.getStr());
- }
- }
if( nExit == 0 && !aCommand.aSlotMapFile.isEmpty() )
{
aTmpSlotMapFile = tempFileHelper(aCommand.aSlotMapFile);
@@ -170,55 +140,6 @@ int main ( int argc, char ** argv)
fprintf(stderr, "%s\n", aStr.getStr());
}
}
- if( nExit == 0 && !aCommand.aHelpIdFile.isEmpty() )
- {
- aTmpHelpIdFile = tempFileHelper(aCommand.aHelpIdFile);
- SvFileStream aStm( aTmpHelpIdFile, STREAM_READWRITE | STREAM_TRUNC );
- if (!pDataBase->WriteHelpIds( aStm ) )
- {
- nExit = -1;
- OStringBuffer aStr("cannot write help ID file: ");
- aStr.append(OUStringToOString(aCommand.aHelpIdFile, RTL_TEXTENCODING_UTF8));
- fprintf(stderr, "%s\n", aStr.getStr());
- }
- }
- if( nExit == 0 && !aCommand.aCSVFile.isEmpty() )
- {
- aTmpCSVFile = tempFileHelper(aCommand.aCSVFile);
- SvFileStream aStm( aTmpCSVFile, STREAM_READWRITE | STREAM_TRUNC );
- if (!pDataBase->WriteCSV( aStm ) )
- {
- nExit = -1;
- OStringBuffer aStr("cannot write CSV file: ");
- aStr.append(OUStringToOString(aCommand.aCSVFile, RTL_TEXTENCODING_UTF8));
- fprintf(stderr, "%s\n", aStr.getStr());
- }
- }
- if( nExit == 0 && !aCommand.aSfxItemFile.isEmpty() )
- {
- aTmpSfxItemFile = tempFileHelper(aCommand.aSfxItemFile);
- SvFileStream aOutStm( aTmpSfxItemFile, STREAM_READWRITE | STREAM_TRUNC );
- if( !pDataBase->WriteSfxItem( aOutStm ) )
- {
- nExit = -1;
- OStringBuffer aStr("cannot write item file: ");
- aStr.append(OUStringToOString(aCommand.aSfxItemFile, RTL_TEXTENCODING_UTF8));
- fprintf(stderr, "%s\n", aStr.getStr());
- }
- }
- if( nExit == 0 && !aCommand.aDataBaseFile.isEmpty() )
- {
- aTmpDataBaseFile = tempFileHelper(aCommand.aDataBaseFile);
- SvFileStream aOutStm( aTmpDataBaseFile, STREAM_READWRITE | STREAM_TRUNC );
- pDataBase->Save( aOutStm, aCommand.nFlags );
- if( aOutStm.GetError() != SVSTREAM_OK )
- {
- nExit = -1;
- OStringBuffer aStr("cannot write database file: ");
- aStr.append(OUStringToOString(aCommand.aDataBaseFile, RTL_TEXTENCODING_UTF8));
- fprintf(stderr, "%s\n", aStr.getStr());
- }
- }
if (nExit == 0 && !aCommand.m_DepFile.isEmpty())
{
aTmpDepFile = tempFileHelper(aCommand.m_DepFile);
@@ -241,14 +162,6 @@ int main ( int argc, char ** argv)
bool bErr = false;
bool bDoMove = aCommand.aTargetFile.isEmpty();
OUString aErrFile, aErrFile2;
- if( !bErr && !aCommand.aListFile.isEmpty() )
- {
- bErr |= !FileMove_Impl( aCommand.aListFile, aTmpListFile, bDoMove );
- if( bErr ) {
- aErrFile = aCommand.aListFile;
- aErrFile2 = aTmpListFile;
- }
- }
if( !bErr && !aCommand.aSlotMapFile.isEmpty() )
{
bErr |= !FileMove_Impl( aCommand.aSlotMapFile, aTmpSlotMapFile, bDoMove );
@@ -257,46 +170,6 @@ int main ( int argc, char ** argv)
aErrFile2 = aTmpSlotMapFile;
}
}
- if( !bErr && !aCommand.aSfxItemFile.isEmpty() )
- {
- bErr |= !FileMove_Impl( aCommand.aSfxItemFile, aTmpSfxItemFile, bDoMove );
- if( bErr ) {
- aErrFile = aCommand.aSfxItemFile;
- aErrFile2 = aTmpSfxItemFile;
- }
- }
- if( !bErr && !aCommand.aDataBaseFile.isEmpty() )
- {
- bErr |= !FileMove_Impl( aCommand.aDataBaseFile, aTmpDataBaseFile, bDoMove );
- if( bErr ) {
- aErrFile = aCommand.aDataBaseFile;
- aErrFile2 = aTmpDataBaseFile;
- }
- }
- if( !bErr && !aCommand.aHelpIdFile.isEmpty() )
- {
- bErr |= !FileMove_Impl( aCommand.aHelpIdFile, aTmpHelpIdFile, bDoMove );
- if( bErr ) {
- aErrFile = aCommand.aHelpIdFile;
- aErrFile2 = aTmpHelpIdFile;
- }
- }
- if( !bErr && !aCommand.aCSVFile.isEmpty() )
- {
- bErr |= !FileMove_Impl( aCommand.aCSVFile, aTmpCSVFile, bDoMove );
- if( bErr ) {
- aErrFile = aCommand.aCSVFile;
- aErrFile2 = aTmpCSVFile;
- }
- }
- if( !bErr && !aCommand.aDocuFile.isEmpty() )
- {
- bErr |= !FileMove_Impl( aCommand.aDocuFile, aTmpDocuFile, bDoMove );
- if( bErr ) {
- aErrFile = aCommand.aDocuFile;
- aErrFile2 = aTmpDocuFile;
- }
- }
if (!bErr && !aCommand.m_DepFile.isEmpty())
{
bErr |= !FileMove_Impl( aCommand.m_DepFile, aTmpDepFile, bDoMove );
@@ -330,26 +203,11 @@ int main ( int argc, char ** argv)
if( nExit != 0 )
{
- if( !aCommand.aListFile.isEmpty() )
- {
- osl::FileBase::getSystemPathFromFileURL( aTmpListFile, aTmpListFile );
- osl::File::remove( aTmpListFile );
- }
if( !aCommand.aSlotMapFile.isEmpty() )
{
osl::FileBase::getSystemPathFromFileURL( aTmpSlotMapFile, aTmpSlotMapFile );
osl::File::remove( aTmpSlotMapFile );
}
- if( !aCommand.aSfxItemFile.isEmpty() )
- {
- osl::FileBase::getSystemPathFromFileURL( aTmpSfxItemFile, aTmpSfxItemFile );
- osl::File::remove( aTmpSfxItemFile );
- }
- if( !aCommand.aDataBaseFile.isEmpty() )
- {
- osl::FileBase::getSystemPathFromFileURL( aTmpDataBaseFile, aTmpDataBaseFile );
- osl::File::remove( aTmpDataBaseFile );
- }
}
delete pDataBase;