summaryrefslogtreecommitdiff
path: root/l10ntools/source/helpex.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'l10ntools/source/helpex.cxx')
-rw-r--r--l10ntools/source/helpex.cxx68
1 files changed, 34 insertions, 34 deletions
diff --git a/l10ntools/source/helpex.cxx b/l10ntools/source/helpex.cxx
index abe5acd41024..753fbff995be 100644
--- a/l10ntools/source/helpex.cxx
+++ b/l10ntools/source/helpex.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
@@ -35,18 +35,18 @@
#include "helpmerge.hxx"
// defines to parse command line
-#define STATE_NON 0x0001
-#define STATE_INPUT 0x0002
-#define STATE_OUTPUT 0x0003
-#define STATE_PRJ 0x0004
-#define STATE_ROOT 0x0005
-#define STATE_SDFFILE 0x0006
-#define STATE_ERRORLOG 0x0007
-#define STATE_BREAKHELP 0x0008
-#define STATE_UNMERGE 0x0009
-#define STATE_UTF8 0x000A
-#define STATE_LANGUAGES 0x000B
-#define STATE_FORCE_LANGUAGES 0x000C
+#define STATE_NON 0x0001
+#define STATE_INPUT 0x0002
+#define STATE_OUTPUT 0x0003
+#define STATE_PRJ 0x0004
+#define STATE_ROOT 0x0005
+#define STATE_SDFFILE 0x0006
+#define STATE_ERRORLOG 0x0007
+#define STATE_BREAKHELP 0x0008
+#define STATE_UNMERGE 0x0009
+#define STATE_UTF8 0x000A
+#define STATE_LANGUAGES 0x000B
+#define STATE_FORCE_LANGUAGES 0x000C
#define STATE_OUTPUTX 0xfe
#define STATE_OUTPUTY 0xff
@@ -97,9 +97,9 @@ BOOL ParseCommandLine( int argc, char* argv[])
nState = STATE_PRJ; // next token specifies the cur. project
}
else if ( ByteString( argv[ i ]).ToUpperAscii() == "-LF" ) {
- nState = STATE_FORCE_LANGUAGES;
+ nState = STATE_FORCE_LANGUAGES;
}
-
+
else if ( ByteString( argv[ i ]).ToUpperAscii() == "-R" ) {
nState = STATE_ROOT; // next token specifies path to project root
}
@@ -124,7 +124,7 @@ BOOL ParseCommandLine( int argc, char* argv[])
else {
switch ( nState ) {
case STATE_NON: {
- return FALSE; // no valid command line
+ return FALSE; // no valid command line
}
//break;
case STATE_INPUT: {
@@ -146,7 +146,7 @@ BOOL ParseCommandLine( int argc, char* argv[])
break;
case STATE_PRJ: {
sPrj = argv[ i ];
-// sPrj.ToLowerAscii(); // the project
+// sPrj.ToLowerAscii(); // the project
}
break;
case STATE_ROOT: {
@@ -217,19 +217,19 @@ int _cdecl main( int argc, char *argv[] )
//sal_uInt32 startfull = Export::startMessure();
bool hasInputList = sInputFile.GetBuffer()[0]=='@';
-// printf("x = %s , y = %s , o = %s\n", sOutputFileX.GetBuffer(), sOutputFileY.GetBuffer() , sOutputFile.GetBuffer() );
+// printf("x = %s , y = %s , o = %s\n", sOutputFileX.GetBuffer(), sOutputFileY.GetBuffer() , sOutputFile.GetBuffer() );
bool hasNoError = true;
-
+
if ( sOutputFile.Len() ){ // Merge single file ?
//printf("DBG: Inputfile = %s\n",sInputFile.GetBuffer());
HelpParser aParser( sInputFile, bUTF8 , false );
-
+
if ( bMergeMode )
{
-
+
//sal_uInt64 startreadloc = Export::startMessure();
- MergeDataFile aMergeDataFile( sSDFFile, sInputFile , FALSE, RTL_TEXTENCODING_MS_1252 );
- //MergeDataFile aMergeDataFile( sSDFFile, sInputFile , FALSE, RTL_TEXTENCODING_MS_1252, false );
+ MergeDataFile aMergeDataFile( sSDFFile, sInputFile , FALSE, RTL_TEXTENCODING_MS_1252 );
+ //MergeDataFile aMergeDataFile( sSDFFile, sInputFile , FALSE, RTL_TEXTENCODING_MS_1252, false );
//Export::stopMessure( ByteString("read localize.sdf") , startreadloc );
hasNoError = aParser.Merge( sSDFFile, sOutputFile , Export::sLanguages , aMergeDataFile );
@@ -238,14 +238,14 @@ int _cdecl main( int argc, char *argv[] )
hasNoError = aParser.CreateSDF( sOutputFile, sPrj, sPrjRoot, sInputFile, new XMLFile( '0' ), "help" );
}else if ( sOutputFileX.Len() && sOutputFileY.Len() && hasInputList ) { // Merge multiple files ?
if ( bMergeMode ){
-
+
ifstream aFStream( sInputFile.Copy( 1 , sInputFile.Len() ).GetBuffer() , ios::in );
-
+
if( !aFStream ){
cerr << "ERROR: - helpex - Can't open the file " << sInputFile.Copy( 1 , sInputFile.Len() ).GetBuffer() << "\n";
exit(-1);
}
-
+
vector<ByteString> filelist;
rtl::OStringBuffer filename;
sal_Char aChar;
@@ -256,24 +256,24 @@ int _cdecl main( int argc, char *argv[] )
else
filename.append( aChar );
}
- if( filename.getLength() > 0 )
+ if( filename.getLength() > 0 )
filelist.push_back( ByteString ( filename.makeStringAndClear().getStr() ) );
-
+
aFStream.close();
ByteString sHelpFile(""); // dummy
//MergeDataFile aMergeDataFile( sSDFFile, sHelpFile , FALSE, RTL_TEXTENCODING_MS_1252, false );
- MergeDataFile aMergeDataFile( sSDFFile, sHelpFile , FALSE, RTL_TEXTENCODING_MS_1252 );
+ MergeDataFile aMergeDataFile( sSDFFile, sHelpFile , FALSE, RTL_TEXTENCODING_MS_1252 );
//aMergeDataFile.Dump();
std::vector<ByteString> aLanguages;
HelpParser::parse_languages( aLanguages , aMergeDataFile );
-
+
bool bCreateDir = true;
for( vector<ByteString>::iterator pos = filelist.begin() ; pos != filelist.end() ; ++pos )
{
- sHelpFile = *pos;
+ sHelpFile = *pos;
cout << ".";cout.flush();
-
+
HelpParser aParser( sHelpFile , bUTF8 , true );
hasNoError = aParser.Merge( sSDFFile , sOutputFileX , sOutputFileY , true , aLanguages , aMergeDataFile , bCreateDir );
bCreateDir = false;
@@ -281,11 +281,11 @@ int _cdecl main( int argc, char *argv[] )
}
} else
cerr << "helpex ERROR: Wrong input parameters!\n";
-
+
//Export::stopMessure( ByteString("full cycle") , startfull );
if( hasNoError )
return 0;
- else
+ else
return 1;
}
#endif