merge the formfield patch from ooo-build
[ooovba.git] / applied_patches / 0204-desktop-cmdhelp-stdout.diff
blob3d725e35c142b6deefcae25ce028e3a2717a2121
1 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=desktop.vpj desktop.clean/source/app/cmdlinehelp.cxx desktop/source/app/cmdlinehelp.cxx
2 --- desktop.clean/source/app/cmdlinehelp.cxx 2008-02-07 22:11:46.000000000 -0500
3 +++ desktop/source/app/cmdlinehelp.cxx 2008-02-07 22:23:07.000000000 -0500
4 @@ -143,18 +143,19 @@ namespace desktop
5 aHelpMessage_head.SearchAndReplaceAscii( "%CMDNAME", String( "soffice", RTL_TEXTENCODING_ASCII_US) );
6 #ifdef UNX
7 // on unix use console for output
8 - fprintf(stderr, "%s\n", ByteString(aHelpMessage_head,
9 - RTL_TEXTENCODING_ASCII_US).GetBuffer());
10 + FILE* fs = stdout;
11 + fprintf(fs, "%s\n", ByteString(aHelpMessage_head,
12 + RTL_TEXTENCODING_ASCII_US).GetBuffer());
13 // merge left and right column
14 int n = aHelpMessage_left.GetTokenCount ('\n');
15 ByteString bsLeft(aHelpMessage_left, RTL_TEXTENCODING_ASCII_US);
16 ByteString bsRight(aHelpMessage_right, RTL_TEXTENCODING_ASCII_US);
17 for ( int i = 0; i < n; i++ )
19 - fprintf(stderr, "%s", bsLeft.GetToken(i, '\n').GetBuffer());
20 - fprintf(stderr, "%s\n", bsRight.GetToken(i, '\n').GetBuffer());
21 + fprintf(fs, "%s", bsLeft.GetToken(i, '\n').GetBuffer());
22 + fprintf(fs, "%s\n", bsRight.GetToken(i, '\n').GetBuffer());
24 - fprintf(stderr, "%s", ByteString(aHelpMessage_bottom,
25 + fprintf(fs, "%s", ByteString(aHelpMessage_bottom,
26 RTL_TEXTENCODING_ASCII_US).GetBuffer());
27 #else
28 // rest gets a dialog box