Commits

Anonymous committed e3375f5

CWS-TOOLING: integrate CWS gh16
2009-03-24 11:26:56 +0100 gh r269930 : #i100151#
2009-03-24 11:26:18 +0100 gh r269928 : #i100151#fix a renaming issue
2009-03-20 12:31:00 +0100 gh r269795 : #i100356# some fixes required
2009-03-19 17:20:02 +0100 gh r269760 : #i100151# generate UserFeedback names
2009-03-19 17:17:49 +0100 gh r269759 : #i100151# deliver *.win files
2009-03-19 17:15:10 +0100 gh r269758 : #i100151# generate UserFeedback names and deliver them
2009-03-19 11:38:53 +0100 gh r269737 : #i100356# write logs to stdout. enable with switch -printlog
2009-03-12 14:15:48 +0100 gh r269408 : #i98580# build failed when debug enabled
2009-03-12 13:55:50 +0100 gh r269404 : #i61192#fix lineendings in hid.lst

Comments (0)

Files changed (10)

basic/source/app/brkpnts.cxx

 	{
 		pModule->SetBP( (USHORT)pBrk->nLine );
 #if OSL_DEBUG_LEVEL > 1
-		DBG_ASSERT( !pModule->IsCompiled() || pModule->IsBP( (USHORT)pBrk->nLine ), "Brechpunkt wurde nicht gesetzt" )
+		DBG_ASSERT( !pModule->IsCompiled() || pModule->IsBP( (USHORT)pBrk->nLine ), "Brechpunkt wurde nicht gesetzt" );
 #endif
 		pBrk = Next();
 	}
 	if ( pModule->SetBP( nLine ) )
 	{
 #if OSL_DEBUG_LEVEL > 1
-		DBG_ASSERT( !pModule->IsCompiled() || pModule->IsBP( nLine ), "Brechpunkt wurde nicht gesetzt" )
+		DBG_ASSERT( !pModule->IsCompiled() || pModule->IsBP( nLine ), "Brechpunkt wurde nicht gesetzt" );
 #endif
 		if ( StarBASIC::IsRunning() )
 		{
 		}
 	}
 #if OSL_DEBUG_LEVEL > 1
-	DBG_ASSERT( !pModule->IsCompiled() || pModule->IsBP( nLine ), "Brechpunkt wurde nicht gesetzt" )
+	DBG_ASSERT( !pModule->IsCompiled() || pModule->IsBP( nLine ), "Brechpunkt wurde nicht gesetzt" );
 #endif
 }
 
 	while ( pBrk )
 	{
 #if OSL_DEBUG_LEVEL > 1
-		DBG_ASSERT( !pModule->IsCompiled() || pModule->IsBP( pBrk->nLine ), "Brechpunkt wurde nicht gesetzt" )
+		DBG_ASSERT( !pModule->IsCompiled() || pModule->IsBP( pBrk->nLine ), "Brechpunkt wurde nicht gesetzt" );
 #endif
 		ULONG nLine = pBrk->nLine-1;
 		ULONG nY = nLine*nLineHeight - nCurYOffset;

basic/source/app/msgedit.cxx

 Version 3			Changed Charset from CHARSET_IBMPC to RTL_TEXTENCODING_UTF8
 
 *************************************************************************/
+#include <cstdio>
 #include <tools/time.hxx>
 #include <tools/stream.hxx>
 #ifndef _MSGBOX_HXX //autogen
 
 USHORT MsgEdit::nMaxLogLen = 0;
 BOOL MsgEdit::bLimitLogLen = FALSE;
+BOOL MsgEdit::bPrintLogToStdout = FALSE;
+BOOL MsgEdit::bPrintLogToStdoutSet = FALSE;
 
 #define WARNING_PREFIX String( SttResId( S_WARNING_PREFIX ) )
 #define VERSION_STRING CUniString("File Format Version: ")
 	aEditTree.SetSelectionMode( MULTIPLE_SELECTION );
 	if ( aEditTree.GetModel()->GetSortMode() != SortNone )
 		aEditTree.GetModel()->SetSortMode( SortNone );
+
+    if ( !bPrintLogToStdoutSet )
+    {
+        bPrintLogToStdoutSet = TRUE;
+	    for ( USHORT i = 0 ; i < Application::GetCommandLineParamCount() ; i++ )
+	    {
+		    if ( Application::GetCommandLineParam( i ).Copy(0,9).CompareIgnoreCaseToAscii("-printlog") == COMPARE_EQUAL
+    #ifndef UNX
+		      || Application::GetCommandLineParam( i ).Copy(0,9).CompareIgnoreCaseToAscii("/printlog") == COMPARE_EQUAL
+    #endif
+              )
+			    bPrintLogToStdout = TRUE;
+	    }
+    }
 }
 
 MsgEdit::~MsgEdit()
             }
 
 			String aLogMsg = Impl_MakeSaveText( LogMsg->aDebugData ).AppendAscii("\n");
+
 			if( aStrm.IsOpen() )
 			{
 				aLogMsg.ConvertLineEnd(LINEEND_CRLF);
 			}
 			if ( !bFileWasChanged )
 				pAppError->UpdateFileInfo( HAS_BEEN_LOADED );
-		}
+
+
+            // now write to stdout
+            if ( bPrintLogToStdout )
+            {
+                String aPrintMsg, aOriginalMsg;
+
+                aOriginalMsg = LogMsg->aDebugData.aMsg;
+                // converting to human readable string for adding errors to list in testobject
+                LogMsg->aDebugData.aMsg = pBasicFrame->GenRealString( LogMsg->aDebugData.aMsg );
+
+			    aPrintMsg = Impl_MakeSaveText( LogMsg->aDebugData ).AppendAscii("\n");
+
+                // restore Original Msg
+                LogMsg->aDebugData.aMsg = aOriginalMsg;
+
+                printf( ByteString( aPrintMsg, RTL_TEXTENCODING_UTF8 ).GetBuffer() );
+            }
+        }
 	}
+    // converting to human readable string for adding errors to list in testobject
     LogMsg->aDebugData.aMsg = pBasicFrame->GenRealString( LogMsg->aDebugData.aMsg );
 }
 

basic/source/app/msgedit.hxx

 
     static USHORT nMaxLogLen;
     static BOOL bLimitLogLen;
+    static BOOL bPrintLogToStdout;
+    static BOOL bPrintLogToStdoutSet;   // has it been initialized yet
 public:
 	MsgEdit( AppError*, BasicFrame *pBF, const WinBits& );
 	~MsgEdit();

instsetoo_native/prj/build.lst

-oon	instsetoo_native	::	postprocess packimages NULL
+oon	instsetoo_native	::	postprocess packimages testautomation NULL
 oon	instsetoo_native						usr1	-	all	oon_mkout NULL
 oon	instsetoo_native\inc_openoffice\unix	nmake	-	u	oon_unix NULL
 oon	instsetoo_native\inc_openoffice\windows\msi_languages	nmake	-	all	oon_msilang NULL

instsetoo_native/prj/d.lst

 mkdir: %COMMON_DEST%\pus%_EXT%
+..\%COMMON_OUTDIR%\bin\hid.lst %COMMON_DEST%\bin%_EXT%\hid.lst
+..\%COMMON_OUTDIR%\bin\hid\userfeedback_VCL_names.csv %COMMON_DEST%\bin%_EXT%\userfeedback_VCL_names.csv
 ..\%__SRC%\misc\*.update.xml %COMMON_DEST%\pus%_EXT%\*.update.xml

instsetoo_native/util/makefile.mk

 # setld - Tru64 (setld) software distribution
 # native - "Native" software distribution for the platform
 # portable - Portable software distribution
+xxxx:
+    echo $(PERL) -w $(SOLARENV)$/bin$/gen_update_info.pl --buildid $(BUILD) --arch "$(RTL_ARCH)" --os "$(RTL_OS)" --lstfile $(PRJ)$/util$/openoffice.lst --product OpenOffice --languages $(subst,$(@:s/_/ /:1)_, $(@:b)) $(PRJ)$/util$/update.xml
 
 .IF "$(GUI)"!="WNT" && "$(EPM)"=="NO" && "$(USE_PACKAGER)"==""
 ALLTAR : $(LOCALPYFILES)

solenv/bin/gen_userfeedback_VCL_names.pl

+:
+eval 'exec perl -wS $0 ${1+"$@"}'
+    if 0;
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: ,v $
+#
+# $Revision:  $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org.  If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+#
+# pushids - push HID.LST and *.win files for userexperience feedback
+#
+
+use lib ("$ENV{SOLARENV}/bin/modules", "$ENV{COMMON_ENV_TOOLS}/modules");
+
+use Carp;
+
+sub parse_info($$);
+
+if ( @ARGV != 3 )
+{
+  print "usage:   $ARGV[0] <path tp hid.lst> <path to *.win files> <output file>\n";
+  print "example: $ARGV[0] ./hid.lst global/win common/misc/UserFeedbackNames.csv\n\n";
+  die "invalid params";
+}
+
+my ($hid, $winpath, $outfile) = @ARGV;
+
+my @names;
+
+open HID, "<$hid" or die "can't open file $filename $! $^E";
+for (<HID>) {
+  chop;
+  my ($longname, $ID) = split " +";
+  next if ( ! $ID );
+  $upperlongname = $longname;
+  $upperlongname =~ tr/a-z/A-Z/;
+  $undeclared_hids{$upperlongname} = $longname;
+
+  if ( exists $hids{$upperlongname} && ( $hids{$upperlongname} != $ID ) )
+  {
+    print STDERR "errror: unclear definition of longname: $longname = $hids{$upperlongname} or $ID\n";
+  }
+  $hids{$upperlongname} = $ID;
+
+  if ( exists $revhids{ $ID } && ( $revhids{ $ID } ne $upperlongname ) )
+  {
+    print STDERR "warn: two longnames have the same ID: $longname and $revhids{$ID} share ID $ID\n";
+  }
+  $revhids{$ID} = $upperlongname;
+}
+
+close HID;
+
+undef @revhids;
+
+#Add Active
+$hids{"ACTIVE"} = 0;
+
+my %dialogs = ();
+
+foreach ( glob("$winpath/*win") ) {
+  $filename = $_;
+  open WIN, "< $filename" or die "can't open file $filename $! $^E";
+  my $parentinfo = "";
+  my @dialog = ();
+  my $parentshortname = "";
+
+  for ( <WIN> ) {
+    chop;
+
+	s/^ +//;
+	s/ +/ /g;
+
+    next if /^ *'/;
+    next if /^ *$/;
+
+    my $ID = "";
+    my $iteminfo;
+    my ($shortname, $longname) = split " +";
+    
+    $shortname = "" if ( !$shortname );
+    $longname = "" if ( !$longname );
+
+    # fake a correct entry if only *active is given and overwrite the attempt to declare it differently
+    if ( $shortname =~ /\*active/i )
+    {
+      $longname = "Active";
+    }
+
+
+# find UNO Names
+    if ( $longname =~ /^(.uno:|http|private:factory|service:|macro:|.HelpId:)/i || $longname =~ s/^sym://i )
+    {
+      $ID = $longname;
+      $longname = "";
+    }
+    else
+    {
+      my $upperlongname = $longname;
+      $upperlongname =~ tr/a-z/A-Z/;
+      if ( $shortname !~ /^[\+\*]/ && !exists $hids{$upperlongname} )
+      {
+        print STDERR "errror: Longname not in hid.lst: $filename $longname\n";
+      }
+      if ( exists $hids{$upperlongname} )
+      {
+          $ID = $hids{$upperlongname};
+      }
+      delete $undeclared_hids{$upperlongname};
+    }
+
+    $iteminfo = "$shortname $longname $ID";
+#    print "$iteminfo\n" if ( ! ( $shortname && $longname && $ID ));
+    $iteminfo =~ s/^\*//;
+    $iteminfo =~ s/^\+//;
+
+# find start of deklaration
+    if ( $shortname =~ s/^\+// )
+    {
+      # copy existing dialog
+      if ( exists $dialogs{ $longname } )
+      {
+        my @old = @{$dialogs{ $longname }};
+        my ($oldshort, $oldlong, $oldID ) = split ( " ", shift @old );
+        $iteminfo = "$shortname $oldlong $oldID";
+
+        $parentinfo = $iteminfo;
+        $parentshortname = $shortname;
+        $dialogs{ $parentshortname } = \@dialog;
+        @dialog = ();        # break the link
+        push ( @{$dialogs{ $parentshortname }}, $iteminfo );
+        push @names, "   $parentinfo";
+
+        for ( @old )
+        {
+          push @names, "$parentinfo $_";
+        }
+      }
+      else
+      {  # fake new dialog instead
+        $shortname = "*".$shortname;
+      }
+    }
+    if ( $shortname =~ s/^\*// )
+    {
+      $parentinfo = $iteminfo;
+      $parentshortname = $shortname;
+      $dialogs{ $parentshortname } = \@dialog;
+      @dialog = ();        # break the link
+      push ( @{$dialogs{ $parentshortname }}, $iteminfo );
+      push @names, "   $parentinfo";
+    }
+    else
+    {
+      push ( @{$dialogs{ $parentshortname }}, $iteminfo );
+      push @names, "$parentinfo $iteminfo";
+    }
+
+  }
+  close WIN;
+}
+
+for ( keys %undeclared_hids ) {
+  $iteminfo = "$undeclared_hids{$_} $undeclared_hids{$_} $hids{$_}";
+  push @names, "   $iteminfo";
+}
+
+#----------------------------------------------------------------------------
+# write to files
+
+open HIDS, ">$outfile" or die "can't open file $filename $! $^E";
+print HIDS join "\n", @names;
+print HIDS "\n";
+close HIDS;
+

solenv/inc/target.mk

 $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(BIN))$/hid.lst .PHONY :
 	@echo Making $@ :
 	@echo ---------------
+	@echo $(WORK_STAMP).$(LAST_MINOR) 010101010101010 > $@.$(ROUT).tmp
+	$(TYPE) $(SOLARCOMMONBINDIR)$/hid$/*.hid | tr -d "\015" | $(SORT) -u >> $@.$(ROUT).tmp 
 	@$(IFEXIST) $@ $(THEN) $(RM:s/+//) $@ $(FI)
-	@echo $(WORK_STAMP).$(LAST_MINOR) 010101010101010 > $@.$(ROUT).tmp
-	$(TYPE) $(SOLARCOMMONBINDIR)$/hid$/*.hid | $(SORT) -u >> $@.$(ROUT).tmp 
-    @$(RENAME) $@.$(ROUT).tmp $@
+	@-$(RENAME) $@.$(ROUT).tmp $@
+	@-mkdir $(@:d)hid
+	$(PERL) $(SOLARENV)$/bin$/gen_userfeedback_VCL_names.pl $@ $(SOLARCOMMONBINDIR)$/win $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(BIN))$/hid$/userfeedback_VCL_names.csv.$(ROUT).tmp
+	@$(IFEXIST) $@ $(THEN) $(RM:s/+//) $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(BIN))$/hid$/userfeedback_VCL_names.csv $(FI)
+	@-$(RENAME) $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(BIN))$/hid$/userfeedback_VCL_names.csv.$(ROUT).tmp $(subst,$(OUTPATH),$(COMMON_OUTDIR) $(BIN))$/hid$/userfeedback_VCL_names.csv
 
 
 .IF "$(SOLAR_JAVA)"!=""

testautomation/prj/build.lst

+ta      testautomation : NULL

testautomation/prj/d.lst

+mkdir: %COMMON_DEST%\bin%_EXT%\win
+
+..\global\win\*.win %COMMON_DEST%\bin%_EXT%\win\*.win
+