You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ja...@apache.org on 2013/11/03 13:35:44 UTC
svn commit: r1538352 [9/11] - in /openoffice/branches/l10n40: ./
extras/l10n/source/bg/ extras/l10n/source/da/ main/
main/basegfx/inc/basegfx/polygon/ main/basegfx/source/inc/
main/basegfx/source/polygon/ main/basegfx/source/tools/ main/basegfx/test/
m...
Modified: openoffice/branches/l10n40/main/solenv/bin/modules/installer/worker.pm
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/solenv/bin/modules/installer/worker.pm?rev=1538352&r1=1538351&r2=1538352&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/solenv/bin/modules/installer/worker.pm (original)
+++ openoffice/branches/l10n40/main/solenv/bin/modules/installer/worker.pm Sun Nov 3 12:35:41 2013
@@ -52,7 +52,7 @@ sub unpack_all_targzfiles_in_directory
installer::logger::include_header_into_logfile("Unpacking tar.gz files:");
- installer::logger::print_message( "... unpacking tar.gz files ... \n" );
+ $installer::logger::Info->print( "... unpacking tar.gz files ... \n" );
my $localdirectory = $directory . $installer::globals::separator . "packages";
my $alltargzfiles = installer::systemactions::find_file_with_file_extension("tar.gz", $localdirectory);
@@ -65,17 +65,17 @@ sub unpack_all_targzfiles_in_directory
$returnvalue = system($systemcall);
my $infoline = "Systemcall: $systemcall\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
if ($returnvalue)
{
$infoline = "ERROR: Could not execute \"$systemcall\"!\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
else
{
$infoline = "Success: Executed \"$systemcall\" successfully!\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
}
}
@@ -97,7 +97,7 @@ sub copy_install_sets_to_ship
if ( ! -d $localshipinstalldir ) { installer::systemactions::create_directory_structure($localshipinstalldir); }
# copy installation set to /ship ($localshipinstalldir)
- installer::logger::print_message( "... copy installation set from " . $destdir . " to " . $localshipinstalldir . "\n" );
+ $installer::logger::Info->print( "... copy installation set from " . $destdir . " to " . $localshipinstalldir . "\n" );
installer::systemactions::copy_complete_directory($destdir, $localshipinstalldir);
if (( ! $installer::globals::iswindowsbuild ) && ( $installer::globals::addjavainstaller ))
@@ -126,16 +126,16 @@ sub link_install_sets_to_ship
installer::logger::include_header_into_logfile("Linking installation set to ship:");
my $infoline = "... destination directory: $shipinstalldir ...\n";
- installer::logger::print_message( $infoline );
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Info->print( $infoline );
+ $installer::logger::Lang->print($infoline);
if ( ! -d $shipinstalldir)
{
$infoline = "Creating directory: $shipinstalldir\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
installer::systemactions::create_directory_structure($shipinstalldir);
$infoline = "Created directory: $shipinstalldir\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
my $dirname = $destdir;
@@ -144,24 +144,24 @@ sub link_install_sets_to_ship
my $localshipinstalldir = $shipinstalldir . $installer::globals::separator . $dirname;
# link installation set to /ship ($localshipinstalldir)
- installer::logger::print_message( "... linking installation set from " . $destdir . " to " . $localshipinstalldir . "\n" );
+ $installer::logger::Lang->print( "... linking installation set from " . $destdir . " to " . $localshipinstalldir . "\n" );
my $systemcall = "ln -s $destdir $localshipinstalldir";
$returnvalue = system($systemcall);
$infoline = "Systemcall: $systemcall\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
if ($returnvalue)
{
$infoline = "ERROR: Could not create link \"$localshipinstalldir\"!\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
else
{
$infoline = "Success: Created link \"$localshipinstalldir\"!\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
return $localshipinstalldir;
@@ -292,14 +292,14 @@ sub save_patchlist_file
$patchlistfilename =~ s/log\_/patchfiles\_/;
$patchlistfilename =~ s/\.log/\.txt/;
installer::files::save_file($installpatchlistdir . $installer::globals::separator . $patchlistfilename, \@installer::globals::patchfilecollector);
- installer::logger::print_message( "... creating patchlist file $patchlistfilename \n" );
+ $installer::logger::Info->print( "... creating patchlist file $patchlistfilename \n" );
if (( $installer::globals::patch ) && ( ! $installer::globals::creating_windows_installer_patch )) # only for non-Windows patches
{
$patchlistfilename =~ s/patchfiles\_/nopatchfiles\_/;
my $nopatchlist = create_nopatchlist();
installer::files::save_file($installpatchlistdir . $installer::globals::separator . $patchlistfilename, $nopatchlist);
- installer::logger::print_message( "... creating patch exclusion file $patchlistfilename \n" );
+ $installer::logger::Info->print( "... creating patch exclusion file $patchlistfilename \n" );
}
}
@@ -313,7 +313,7 @@ sub remove_old_installation_sets
{
my ($basedir) = @_;
- installer::logger::print_message( "... removing old installation directories ...\n" );
+ $installer::logger::Info->print( "... removing old installation directories ...\n" );
my $removedir = $basedir;
@@ -342,7 +342,7 @@ sub remove_old_ship_installation_sets
{
my ($fulldir, $counter) = @_;
- installer::logger::print_message( "... removing old installation directories ...\n" );
+ $installer::logger::Info->print( "... removing old installation directories ...\n" );
my $basedir = $fulldir;
installer::pathanalyzer::get_path_from_fullqualifiedname(\$basedir);
@@ -398,7 +398,7 @@ sub create_installation_directory
else
{
$installdir = installer::systemactions::create_directories("install", $languageref);
- installer::logger::print_message( "... creating installation set in $installdir ...\n" );
+ $installer::logger::Info->print( "... creating installation set in $installdir ...\n" );
remove_old_installation_sets($installdir);
my $inprogressinstalldir = $installdir . "_inprogress";
installer::systemactions::rename_directory($installdir, $inprogressinstalldir);
@@ -421,16 +421,19 @@ sub analyze_and_save_logfile
my $is_success = 1;
my $finalinstalldir = "";
- installer::logger::print_message( "... checking log file " . $loggingdir . $installer::globals::logfilename . "\n" );
-
- my $contains_error = installer::control::check_logfile(\@installer::globals::logfileinfo);
+ $installer::logger::Info->print( "... checking log file " . $loggingdir . $installer::globals::logfilename . "\n" );
+ my $contains_error = installer::control::check_logfile();
+
# Dependent from the success, the installation directory can be renamed and mails can be send.
- if ( $contains_error )
+ if ($contains_error)
{
my $errordir = installer::systemactions::rename_string_in_directory($installdir, "_inprogress", "_witherror");
- if ( $installer::globals::updatepack ) { installer::mail::send_fail_mail($allsettingsarrayref, $languagestringref, $errordir); }
+ if ($installer::globals::updatepack)
+ {
+ installer::mail::send_fail_mail($allsettingsarrayref, $languagestringref, $errordir);
+ }
# Error output to STDERR
for ( my $j = 0; $j <= $#installer::globals::errorlogfileinfo; $j++ )
{
@@ -469,14 +472,21 @@ sub analyze_and_save_logfile
# Saving the logfile in the log file directory and additionally in a log directory in the install directory
my $numberedlogfilename = $installer::globals::logfilename;
- if ( $installer::globals::updatepack ) { $numberedlogfilename =~ s /log_/log_$current_install_number\_/; }
- installer::logger::print_message( "... creating log file $numberedlogfilename \n" );
- installer::files::save_file($loggingdir . $numberedlogfilename, \@installer::globals::logfileinfo);
- installer::files::save_file($installlogdir . $installer::globals::separator . $numberedlogfilename, \@installer::globals::logfileinfo);
-
- # Saving the checksumfile in a checksum directory in the install directory
- # installer::worker::save_checksum_file($current_install_number, $installchecksumdir, $checksumfile);
-
+ if ( $installer::globals::updatepack )
+ {
+ $numberedlogfilename =~ s /log_/log_$current_install_number\_/;
+ }
+ foreach my $log_file_name (
+ $loggingdir . $numberedlogfilename,
+ $installlogdir . $installer::globals::separator . $numberedlogfilename)
+ {
+ if ($log_file_name ne $installer::logger::Lang->{'filename'})
+ {
+ $installer::logger::Info->printf(" copying log file to %s\n", $log_file_name);
+ installer::systemactions::copy_one_file($installer::logger::Lang->{'filename'}, $log_file_name);
+ }
+ }
+
# Saving the list of patchfiles in a patchlist directory in the install directory
if (( $installer::globals::patch ) || ( $installer::globals::creating_windows_installer_patch )) { installer::worker::save_patchlist_file($installlogdir, $numberedlogfilename); }
@@ -502,7 +512,7 @@ sub save_logfile_after_linking
# Saving the logfile in the log file directory and additionally in a log directory in the install directory
my $numberedlogfilename = $installer::globals::logfilename;
if ( $installer::globals::updatepack ) { $numberedlogfilename =~ s /log_/log_$current_install_number\_/; }
- installer::logger::print_message( "... creating log file $numberedlogfilename \n" );
+ $installer::logger::Info->print( "... creating log file $numberedlogfilename \n" );
installer::files::save_file($loggingdir . $numberedlogfilename, \@installer::globals::logfileinfo);
installer::files::save_file($installlogdir . $installer::globals::separator . $numberedlogfilename, \@installer::globals::logfileinfo);
}
@@ -514,13 +524,13 @@ sub save_logfile_after_linking
sub clean_output_tree
{
- installer::logger::print_message( "... cleaning the output tree ...\n" );
+ $installer::logger::Info->print( "... cleaning the output tree ...\n" );
for ( my $i = 0; $i <= $#installer::globals::removedirs; $i++ )
{
if ( -d $installer::globals::removedirs[$i] )
{
- installer::logger::print_message( "... removing directory $installer::globals::removedirs[$i] ...\n" );
+ $installer::logger::Info->print( "... removing directory $installer::globals::removedirs[$i] ...\n" );
installer::systemactions::remove_complete_directory($installer::globals::removedirs[$i], 1);
}
}
@@ -532,7 +542,7 @@ sub clean_output_tree
if ( -d $installer::globals::shiptestdirectory )
{
my $infoline = "Last try to remove $installer::globals::shiptestdirectory . \n";
- push(@installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
my $systemcall = "rmdir $installer::globals::shiptestdirectory";
my $returnvalue = system($systemcall);
}
@@ -546,13 +556,13 @@ sub clean_output_tree
sub clean_jds_temp_dirs
{
- installer::logger::print_message( "... cleaning jds directories ...\n" );
+ $installer::logger::Info->print( "... cleaning jds directories ...\n" );
for ( my $i = 0; $i <= $#installer::globals::jdsremovedirs; $i++ )
{
if ( -d $installer::globals::jdsremovedirs[$i] )
{
- installer::logger::print_message( "... removing directory $installer::globals::jdsremovedirs[$i] ...\n" );
+ $installer::logger::Info->print( "... removing directory $installer::globals::jdsremovedirs[$i] ...\n" );
installer::systemactions::remove_complete_directory($installer::globals::jdsremovedirs[$i], 1);
}
}
@@ -724,7 +734,7 @@ sub remove_all_items_with_special_flag
if ( $styles =~ /\b$flag\b/ )
{
my $infoline = "Attention: Removing from collector: $oneitem->{'Name'} !\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
if ( $flag eq "BINARYTABLE_ONLY" ) { push(@installer::globals::binarytableonlyfiles, $oneitem); }
next;
}
@@ -748,13 +758,13 @@ sub install_simple ($$$$$$)
my $copyopts = '-af';
$copyopts = '-PpRf' unless ( $ENV{'GNUCOPY'} ); # if not gnucopy, assume POSIX copy
- installer::logger::print_message( "... installing module $packagename ...\n" );
+ $installer::logger::Info->print( "... installing module $packagename ...\n" );
my $destdir = $installer::globals::destdir;
my @lines = ();
- installer::logger::print_message( "DestDir: $destdir \n" );
- installer::logger::print_message( "Rootpath: $installer::globals::rootpath \n" );
+ $installer::logger::Info->print( "DestDir: $destdir \n" );
+ $installer::logger::Info->print( "Rootpath: $installer::globals::rootpath \n" );
`mkdir -p $destdir` if $destdir ne "";
`mkdir -p $destdir$installer::globals::rootpath`;
@@ -1092,7 +1102,7 @@ sub create_inf_file
my $infdir = installer::systemactions::create_directories($infdirname, $languagestringref);
my $infoline = "Number of inf files: $#{$inf_files} + 1 \n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
# there are inffiles for all modules
@@ -1115,7 +1125,7 @@ sub create_inf_file
my $onelanguage = ${$languagesarrayref}[$j];
$infoline = "Templatefile: $inf_file_name, Language: $onelanguage \n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
my $templatefile = installer::files::read_file($templatefilename);
@@ -1124,7 +1134,7 @@ sub create_inf_file
write_content_into_inf_file($templatefile, $filesref, $registryitemsref, $folderref, $folderitemsref, $modulesref, $onelanguage, $inffile, $firstlanguage, $allvariableshashref);
$infoline = "Lines change: From $linesbefore to $#{$templatefile}.\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
# rename language specific inffile
my $language_inf_file_name = $inf_file_name;
@@ -1135,7 +1145,7 @@ sub create_inf_file
installer::files::save_file($sourcepath, $templatefile);
$infoline = "Saving file: $sourcepath\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
# creating new file object
@@ -1342,7 +1352,7 @@ sub prepare_linuxlinkfiles
else { $onefile->{'destination'} = $onefile->{'destination'} . "\.$installer::globals::linuxlibrarybaselevel"; }
my $infoline = "LINUXLINK: Changing file destination from $original_destination to $onefile->{'destination'} !\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
# all files without PATCH flag are included into the RPM
if ( ! $ispatchfile ) { push( @filesarray, $onefile); }
@@ -1357,7 +1367,7 @@ sub prepare_linuxlinkfiles
push( @installer::globals::linuxlinks, $linkfile );
$infoline = "LINUXLINK: Created link: $linkfile->{'destination'} pointing to $linkfile->{'destinationfile'} !\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
return \@filesarray;
@@ -1412,7 +1422,7 @@ sub prepare_forced_linuxlinkfiles
$linkfile->{'destination'} = $localdestination . $installer::globals::separator . $onelink->{'Name'};
$infoline = "Forced link into update file: $linkfile->{'destination'} pointing to $linkfile->{'destinationfile'} !\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
# The file, defined by the link, has to be included into the
# link array @installer::globals::linuxlinks
@@ -1443,7 +1453,7 @@ sub prepare_forced_linuxlinkfiles
$linkfile->{'destination'} = $localdestination . $installer::globals::separator . $onelink->{'Name'};
$infoline = "Forced link into update file: $linkfile->{'destination'} pointing to $linkfile->{'destinationfile'} !\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
# The file, defined by the link, has to be included into the
# link array @installer::globals::linuxlinks
@@ -1684,8 +1694,8 @@ sub prepare_windows_patchfiles
$patchfilename = $winpatchdir . $installer::globals::separator . $patchfilename;
installer::files::save_file($patchfilename, $patchfilelist);
- my $infoline = "\nCreated list of patch files: $patchfilename\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print("\n");
+ $installer::logger::Lang->printf("Created list of patch files: %s\n", $patchfilename);
# and assigning the new source
$patchlistfile->{'sourcepath'} = $patchfilename;
@@ -1695,8 +1705,8 @@ sub prepare_windows_patchfiles
{
my $filesize = ( -s $patchfilename );
$infoline = "Size of patch file list: $filesize\n\n";
- push( @installer::globals::logfileinfo, $infoline);
- installer::logger::print_message( "... size of patch list file: $filesize Byte ... \n" );
+ $installer::logger::Lang->print($infoline);
+ $installer::logger::Info->print( "... size of patch list file: $filesize Byte ... \n" );
# Win 98: Maximum size of ini file is 65 kB
# if ( $filesize > 64000 ) { installer::exiter::exit_program("ERROR: Maximum size of patch file list is 65 kB (Win98), now reached: $filesize Byte !", "prepare_windows_patchfiles"); }
@@ -1948,13 +1958,13 @@ sub copy_all_packages
else
{
$infoline = "Excluding package (matching): $onepackage\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
}
else
{
$infoline = "Excluding package (precise name): $onepackage\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
}
}
@@ -1970,17 +1980,17 @@ sub make_systemcall
my $returnvalue = system($systemcall);
my $infoline = "Systemcall: $systemcall\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
if ($returnvalue)
{
$infoline = "ERROR: Could not execute \"$systemcall\"!\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
else
{
$infoline = "Success: Executed \"$systemcall\" successfully!\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
}
@@ -1993,7 +2003,7 @@ sub copy_additional_packages
my ($allcopypackages, $destdir, $includepatharrayref) = @_;
my $infoline = "Copy additional packages into installation set.\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
$destdir =~ s/\/\s*$//;
@@ -2001,7 +2011,7 @@ sub copy_additional_packages
{
my $onepackage = ${$allcopypackages}[$i];
$infoline = "Copy package: $onepackage\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
# this package must be delivered into the solver
@@ -2029,9 +2039,10 @@ sub create_jds_sets
{
my ($installationdir, $allvariableshashref, $languagestringref, $languagesarrayref, $includepatharrayref) = @_;
- installer::logger::print_message( "\n******************************************\n" );
- installer::logger::print_message( "... creating jds installation set ...\n" );
- installer::logger::print_message( "******************************************\n" );
+ $installer::logger::Info->print("\n");
+ $installer::logger::Info->print("******************************************\n");
+ $installer::logger::Info->print("... creating jds installation set ...\n");
+ $installer::logger::Info->print("******************************************\n");
installer::logger::include_header_into_logfile("Creating jds installation sets:");
@@ -2072,7 +2083,7 @@ sub create_jds_sets
my $listfile = installer::files::read_file($$filelistnameref);
my $infoline = "Found jds list file: $$filelistnameref\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
# substituting the variables
substitute_dollar_variables($listfile, $allvariableshashref);
@@ -2301,8 +2312,7 @@ sub add_variables_from_inc_to_hashref
$includefilenameref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$includefilename, $includepatharrayref, 1);
if ( $$includefilenameref eq "" ) { installer::exiter::exit_program("Include file $includefilename not found!\nADD_INCLUDE_FILES = $allvariables->{'ADD_INCLUDE_FILES'}", "add_variables_from_inc_to_hashref"); }
- $infoline = "Including inc file: $$includefilenameref \n";
- push( @installer::globals::globallogfileinfo, $infoline);
+ $installer::logger::Global->printf("Including inc file: %s\n", $$includefilenameref);
my $includefile = installer::files::read_file($$includefilenameref);
@@ -2316,8 +2326,8 @@ sub add_variables_from_inc_to_hashref
my $key = $1;
my $value = $2;
$allvariables->{$key} = $value;
- $infoline = "Setting of variable: $key = $value\n";
- push( @installer::globals::globallogfileinfo, $infoline);
+ $installer::logger::Global->printf("Setting of variable: %s = %s\n",
+ $key, $value);
}
}
}
@@ -2330,8 +2340,9 @@ sub add_variables_from_inc_to_hashref
if (( exists($allvariables->{'WINDOWSJAVAVERSION'})) && ( $allvariables->{'WINDOWSJAVAVERSION'} ne "" ))
{
$allvariables->{'JAVAVERSION'} = $allvariables->{'WINDOWSJAVAVERSION'};
- $infoline = "Changing value of property \"JAVAVERSION\" to $allvariables->{'JAVAVERSION'} (property \"WINDOWSJAVAVERSION\").\n";
- push( @installer::globals::globallogfileinfo, $infoline);
+ $installer::logger::Global->printf(
+ "Changing value of property \"JAVAVERSION\" to %s (property \"WINDOWSJAVAVERSION\").\n",
+ $allvariables->{'JAVAVERSION'});
}
}
}
@@ -2345,7 +2356,7 @@ sub collect_all_files_from_includepathes
my ($patharrayref) = @_;
installer::logger::globallog("Reading all directories: Start");
- installer::logger::print_message( "... reading include pathes ...\n" );
+ $installer::logger::Info->print( "... reading include pathes ...\n" );
# empty the global
@installer::globals::allincludepathes =();
@@ -2358,8 +2369,9 @@ sub collect_all_files_from_includepathes
if ( ! -d $includepath )
{
- $infoline = "$includepath does not exist. (Can be removed from include path list?)\n";
- push( @installer::globals::globallogfileinfo, $infoline);
+ $installer::logger::Global->printf(
+ "%s does not exist. (Can be removed from include path list?)\n",
+ $includepath);
next;
}
@@ -2370,14 +2382,16 @@ sub collect_all_files_from_includepathes
if ( ! ( $#sourcefiles > -1 ))
{
- $infoline = "$includepath is empty. (Can be removed from include path list?)\n";
- push( @installer::globals::globallogfileinfo, $infoline);
+ $installer::logger::Global->printf(
+ "%s is empty. (Can be removed from include path list?)\n",
+ $includepath);
}
else
{
my $number = $#sourcefiles + 1;
- $infoline = "Directory $includepath contains $number files (including subdirs)\n";
- push( @installer::globals::globallogfileinfo, $infoline);
+ $installer::logger::Global->printf(
+ "Directory %s contains $number files (including subdirs)\n",
+ $includepath);
my %allfileshash = ();
$allfileshash{'includepath'} = $includepath;
@@ -2393,8 +2407,8 @@ sub collect_all_files_from_includepathes
$installer::globals::include_pathes_read = 1;
- installer::logger::globallog("Reading all directories: End");
- push( @installer::globals::globallogfileinfo, "\n");
+ installer::logger::globallog("Reading all directories: End");
+ $installer::logger::Global->print("\n");
}
##############################################
@@ -2478,17 +2492,17 @@ sub call_sum
my $returnvalue = $?; # $? contains the return value of the systemcall
my $infoline = "Systemcall: $systemcall\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
if ($returnvalue)
{
$infoline = "ERROR: Could not execute \"$systemcall\"!\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
else
{
$infoline = "Success: Executed \"$systemcall\" successfully!\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
return $sumoutput;
@@ -2518,17 +2532,17 @@ sub call_wc
my $returnvalue = $?; # $? contains the return value of the systemcall
my $infoline = "Systemcall: $systemcall\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
if ($returnvalue)
{
$infoline = "ERROR: Could not execute \"$systemcall\"!\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
else
{
$infoline = "Success: Executed \"$systemcall\" successfully!\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
return $wcoutput;
@@ -2633,17 +2647,17 @@ sub set_time_stamp
my $returnvalue = system($systemcall);
my $infoline = "Systemcall: $systemcall\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
if ($returnvalue)
{
$infoline = "ERROR: \"$systemcall\" failed!\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
else
{
$infoline = "Success: \"$systemcall\" !\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
}
}
@@ -2684,10 +2698,10 @@ sub generate_cygwin_pathes
{
my ($filesref) = @_;
- installer::logger::include_timestamp_into_logfile("Starting generating cygwin pathes");
+ $installer::logger::Lang->add_timestamp("Starting generating cygwin pathes");
my $infoline = "Generating cygwin pathes (generate_cygwin_pathes)\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
my $max = 5000; # number of pathes in one file
@@ -2708,7 +2722,7 @@ sub generate_cygwin_pathes
$temppath =~ s/\Q$installer::globals::separator\E\s*$//;
$tmpfilename = $temppath . $installer::globals::separator . $tmpfilename;
$infoline = "Creating temporary file for cygwin conversion: $tmpfilename (contains $counter pathes)\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
if ( -f $tmpfilename ) { unlink $tmpfilename; }
installer::files::save_file($tmpfilename, \@pathcollector);
@@ -2724,12 +2738,12 @@ sub generate_cygwin_pathes
if ($success)
{
$infoline = "Success: Successfully converted to cygwin pathes!\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
else
{
$infoline = "ERROR: Failed to convert to cygwin pathes!\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
installer::exiter::exit_program("ERROR: Failed to convert to cygwin pathes!", "generate_cygwin_pathes");
}
@@ -2753,12 +2767,12 @@ sub generate_cygwin_pathes
if (( ! exists(${$filesref}[$i]->{'cyg_sourcepath'}) ) || ( ${$filesref}[$i]->{'cyg_sourcepath'} eq "" ))
{
$infoline = "ERROR: No cygwin sourcepath defined for file ${$filesref}[$i]->{'sourcepath'}\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
installer::exiter::exit_program("ERROR: No cygwin sourcepath defined for file ${$filesref}[$i]->{'sourcepath'}!", "generate_cygwin_pathes");
}
}
- installer::logger::include_timestamp_into_logfile("Ending generating cygwin pathes");
+ $installer::logger::Lang->add_timestamp("Ending generating cygwin pathes");
}
##############################################
@@ -2978,18 +2992,18 @@ sub resolving_hidden_flag
else { $onefile->{'destination'} = $destination . $installer::globals::separator . $newfilename; }
$infoline = "Success: Using file with flag HIDDEN from \"$onefile->{'sourcepath'}\"!\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
else
{
$infoline = "Error: Failed to copy HIDDEN file from \"$sourcefile\" to \"$destfile\"!\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
}
}
$infoline = "\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
################################################
@@ -3053,8 +3067,7 @@ sub set_spellcheckerlanguages
if ($$spellcheckfileref eq "") { installer::exiter::exit_program("ERROR: Could not find $spellcheckfilename!", "set_spellcheckerlanguages"); }
- my $infoline = "Using spellchecker file: $$spellcheckfileref \n";
- push( @installer::globals::globallogfileinfo, $infoline);
+ $installer::logger::Global->printf("Using spellchecker file: %s\n", $$spellcheckfileref);
my $spellcheckfile = installer::files::read_file($$spellcheckfileref);
my %spellcheckhash = ();
@@ -3113,9 +3126,8 @@ sub set_spellcheckerlanguages
my $langstring = "";
foreach my $lang (sort keys %installer::globals::spellcheckerlanguagehash) { $langstring = $langstring . "," . $lang }
$langstring =~ s/^\s*,//;
-
- $infoline = "Collected spellchecker languages for spellchecker: $langstring \n";
- push( @installer::globals::globallogfileinfo, $infoline);
+
+ $installer::logger::Global->printf("Collected spellchecker languages for spellchecker: %s\n", $langstring);
}
################################################
@@ -3142,7 +3154,7 @@ sub put_license_into_setup
# Replacement
my $infoline = "Adding licensefile into setup script\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
my $includestring = "";
for ( my $i = 0; $i <= $#{$licensefile}; $i++ ) { $includestring = $includestring . ${$licensefile}[$i]; }
@@ -3185,17 +3197,17 @@ sub tar_package
my $returnvalue = system($systemcall);
my $infoline = "Systemcall: $systemcall\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
if ($returnvalue)
{
$infoline = "ERROR: Could not execute \"$systemcall\"!\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
else
{
$infoline = "Success: Executed \"$systemcall\" successfully!\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
my $localcall = "chmod 775 $tarfilename \>\/dev\/null 2\>\&1";
@@ -3223,17 +3235,17 @@ sub untar_package
my $returnvalue = system($systemcall);
my $infoline = "Systemcall: $systemcall\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
if ($returnvalue)
{
$infoline = "ERROR: Could not execute \"$systemcall\"!\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
else
{
$infoline = "Success: Executed \"$systemcall\" successfully!\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
my $localcall = "chmod 775 $tarfilename \>\/dev\/null 2\>\&1";
@@ -3250,12 +3262,12 @@ sub shuffle_array
# my $counter = 0;
# my $infoline = "Old package order: \n";
- # push( @installer::globals::logfileinfo, $infoline);
+ # $installer::logger::Lang->print($infoline);
# foreach my $onepackage ( @{$arrayref} )
# {
# $counter++;
# $infoline = "$counter: $onepackage->{'module'}\n";
- # push( @installer::globals::logfileinfo, $infoline);
+ # $installer::logger::Lang->print($infoline);
# }
my $i = @$arrayref;
@@ -3267,12 +3279,12 @@ sub shuffle_array
# $counter = 0;
# $infoline = "New package order: \n";
- # push( @installer::globals::logfileinfo, $infoline);
+ # $installer::logger::Lang->print($infoline);
# foreach my $onepackage ( @{$arrayref} )
# {
# $counter++;
# $infoline = "$counter: $onepackage->{'module'}\n";
- # push( @installer::globals::logfileinfo, $infoline);
+ # $installer::logger::Lang->print($infoline);
# }
}
@@ -3305,17 +3317,17 @@ sub set_time_stamp_for_file
my $returnvalue = system($systemcall);
my $infoline = "Systemcall: $systemcall\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
if ($returnvalue)
{
$infoline = "ERROR: \"$systemcall\" failed!\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
else
{
$infoline = "Success: \"$systemcall\" !\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
}
Modified: openoffice/branches/l10n40/main/solenv/bin/modules/installer/xpdinstaller.pm
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/solenv/bin/modules/installer/xpdinstaller.pm?rev=1538352&r1=1538351&r2=1538352&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/solenv/bin/modules/installer/xpdinstaller.pm (original)
+++ openoffice/branches/l10n40/main/solenv/bin/modules/installer/xpdinstaller.pm Sun Nov 3 12:35:41 2013
@@ -596,7 +596,7 @@ sub get_size_value
# Evaluating an error, because of rpm problems with removed LD_LIBRARY_PATH
if ( $error )
{
- installer::logger::print_message( "... trying /usr/bin/rpm ...\n" );
+ $installer::logger::Info->print("... trying /usr/bin/rpm ...\n");
my $systemcall = "/usr/bin/rpm -qp --queryformat \"\[\%\{FILESIZES\}\\n\]\" $packagename 2\>\&1 |";
($rpmout, $error) = make_systemcall_allowing_error($systemcall, 0, 0);
if ( $error ) { installer::exiter::exit_program("ERROR: rpm failed to query package!", "get_size_value"); }
@@ -611,7 +611,7 @@ sub get_size_value
my $rpmname = $packagename;
installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$rpmname);
$infoline = "Filesize $rpmname : $value\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
if ( $installer::globals::issolarispkgbuild )
@@ -671,7 +671,7 @@ sub get_md5_value
my $rpmname = $packagename;
installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$rpmname);
$infoline = "md5sum of $rpmname : $value\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
}
@@ -734,7 +734,7 @@ sub get_fullpkgname_value
# Evaluating an error, because of rpm problems with removed LD_LIBRARY_PATH
if ( $error )
{
- installer::logger::print_message( "... trying /usr/bin/rpm ...\n" );
+ $installer::logger::Info->print("... trying /usr/bin/rpm ...\n");
my $systemcall = "/usr/bin/rpm -qp $packagename |";
($returnarray, $error) = make_systemcall_allowing_error($systemcall, 0, 0);
if ( $error ) { installer::exiter::exit_program("ERROR: rpm failed to query package!", "get_fullpkgname_value"); }
@@ -746,7 +746,7 @@ sub get_fullpkgname_value
installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$rpmname);
$infoline = "Full package name from $rpmname: $value\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
return $value;
@@ -864,7 +864,7 @@ sub make_systemcall
my @returns = ();
- installer::logger::print_message( "... $systemcall ...\n" );
+ $installer::logger::Info->printf("... %s ...\n", $systemcall);
open (REG, "$systemcall");
while (<REG>) {push(@returns, $_); }
@@ -873,23 +873,26 @@ sub make_systemcall
my $returnvalue = $?; # $? contains the return value of the systemcall
my $infoline = "Systemcall: $systemcall\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
if ( $logreturn )
{
- for ( my $j = 0; $j <= $#returns; $j++ ) { push( @installer::globals::logfileinfo, "$returns[$j]"); }
+ foreach my $line (@returns)
+ {
+ $installer::logger::Lang->print($line);
+ }
}
if ($returnvalue)
{
$infoline = "ERROR: $systemcall\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
$error_occured = 1;
}
else
{
$infoline = "SUCCESS: $systemcall\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
return \@returns;
@@ -905,7 +908,7 @@ sub make_systemcall_allowing_error
my @returns = ();
- installer::logger::print_message( "... $systemcall ...\n" );
+ $installer::logger::Info->printf("... %s ...\n", $systemcall);
open (REG, "$systemcall");
while (<REG>) {push(@returns, $_); }
@@ -914,11 +917,14 @@ sub make_systemcall_allowing_error
my $returnvalue = $?; # $? contains the return value of the systemcall
my $infoline = "Systemcall: $systemcall\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
if ( $logreturn )
{
- for ( my $j = 0; $j <= $#returns; $j++ ) { push( @installer::globals::logfileinfo, "$returns[$j]"); }
+ foreach my $line (@returns)
+ {
+ $installer::logger::Lang->print($line);
+ }
}
if ($returnvalue)
@@ -926,20 +932,20 @@ sub make_systemcall_allowing_error
if ( $can_fail )
{
$infoline = "WARNING: Failed system call: $systemcall\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
$error_occured = 1;
}
else
{
$infoline = "ERROR: $systemcall\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
$error_occured = 1;
}
}
else
{
$infoline = "SUCCESS: $systemcall\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
return (\@returns, $returnvalue);
@@ -1480,7 +1486,7 @@ sub create_emptyparents_xpd_file
installer::files::save_file($xpdfilename, $xpdfile);
push(@installer::globals::allxpdfiles, $xpdfilename);
my $infoline = "Saving xpd file: $xpdfilename\n";
- push(@installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
# push(@installer::globals::emptyxpdparents, $parentgid);
@@ -1595,7 +1601,7 @@ sub create_xpd_file
installer::files::save_file($xpdfilename, $emptyfilecontent);
push(@installer::globals::allxpdfiles, $xpdfilename);
$infoline = "Saving xpd file: $xpdfilename\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
$xpdfilename = $newxpdfilename;
change_parent_in_xpdfile($xpdfile, $module->{'XpdPackageName'});
@@ -1605,7 +1611,7 @@ sub create_xpd_file
push( @installer::globals::createdxpdfiles, $modulegid);
push(@installer::globals::allxpdfiles, $xpdfilename);
$infoline = "Saving xpd file: $xpdfilename\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
my $grandpagid = "root";
if ( $parentgid ne "root" )
@@ -1663,7 +1669,7 @@ sub create_xpd_file_for_childproject
push( @installer::globals::createdxpdfiles, $modulegid);
push(@installer::globals::allxpdfiles, $xpdfilename);
my $infoline = "Saving xpd file: $xpdfilename\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
if ( $parentgid ne "root" )
{
@@ -1697,7 +1703,7 @@ sub create_xpd_file_for_systemintegratio
# installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$newpackagename);
my $infoline = "Creating xpd file for package: $newpackagename\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
my $childmodule = installer::worker::copy_hash_from_references($module);
$childmodule->{'ParentID'} = $module->{'gid'}; # the module gid is the new parent
@@ -1748,7 +1754,7 @@ sub create_xpd_file_for_systemintegratio
installer::files::save_file($xpdfilename, $xpdfile);
push(@installer::globals::allxpdfiles, $xpdfilename);
$infoline = "Saving xpd file: $xpdfilename\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
# Creating the top level visible xpd file
@@ -1804,7 +1810,7 @@ sub create_setup_xpd
installer::files::save_file($xpdfilename, $xpdfile);
push(@installer::globals::allxpdfiles, $xpdfilename);
my $infoline = "Saving xpd file: $xpdfilename\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
###################################################
Modified: openoffice/branches/l10n40/main/solenv/bin/modules/installer/ziplist.pm
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/solenv/bin/modules/installer/ziplist.pm?rev=1538352&r1=1538351&r2=1538352&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/solenv/bin/modules/installer/ziplist.pm (original)
+++ openoffice/branches/l10n40/main/solenv/bin/modules/installer/ziplist.pm Sun Nov 3 12:35:41 2013
@@ -584,18 +584,18 @@ sub replace_languages_in_pathes
{
$installer::globals::refresh_includepathes = 1;
$infoline = "Directory $newdir exists and is not empty. Refreshing global file array is required.\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
else
{
$infoline = "Directory $newdir is empty. No refresh of global file array required.\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
}
else
{
$infoline = "Directory $newdir does not exist. No refresh of global file array required.\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
}
}
@@ -623,10 +623,10 @@ sub list_all_files_from_include_path
my $path = ${$patharrayref}[$i];
installer::remover::remove_leading_and_ending_whitespaces(\$path);
my $infoline = "$path\n";
- push( @installer::globals::logfileinfo, $infoline);
+ $installer::logger::Lang->print($infoline);
}
- push( @installer::globals::logfileinfo, "\n");
+ $installer::logger::Lang->print("\n");
return \@filesarray;
}
Modified: openoffice/branches/l10n40/main/solenv/gbuild/platform/os2.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/solenv/gbuild/platform/os2.mk?rev=1538352&r1=1538351&r2=1538352&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/solenv/gbuild/platform/os2.mk (original)
+++ openoffice/branches/l10n40/main/solenv/gbuild/platform/os2.mk Sun Nov 3 12:35:41 2013
@@ -87,10 +87,6 @@ gb_CFLAGS := \
-I$(JAVA_HOME)/include \
-I$(JAVA_HOME)/include/os2
-
-# -fvisibility=hidden \
-#
-
gb_CXXFLAGS := \
-Zomf \
-Wall \
@@ -108,7 +104,7 @@ gb_CXXFLAGS := \
gb_STDLIBS = \
z \
- stdc++ \
+ stdc++
ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
gb_CFLAGS_WERROR := -Werror
Modified: openoffice/branches/l10n40/main/solenv/inc/os2gcci.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/solenv/inc/os2gcci.mk?rev=1538352&r1=1538351&r2=1538352&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/solenv/inc/os2gcci.mk (original)
+++ openoffice/branches/l10n40/main/solenv/inc/os2gcci.mk Sun Nov 3 12:35:41 2013
@@ -259,8 +259,8 @@ STDLIBGUIST=$(STDLIBCPP)
STDSHLGUIMT=$(STDLIBCPP)
STDSHLCUIMT=$(STDLIBCPP)
-LIBSTLPORT=stlp45.lib $(DYNAMIC)
-LIBSTLPORTST=stlp45.lib $(STATIC) $(DYNAMIC)
+LIBSTLPORT=$(DYNAMIC)
+LIBSTLPORTST=$(STATIC) $(DYNAMIC)
# name of library manager
Modified: openoffice/branches/l10n40/main/svgio/inc/svgio/svgreader/svgpathnode.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svgio/inc/svgio/svgreader/svgpathnode.hxx?rev=1538352&r1=1538351&r2=1538352&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svgio/inc/svgio/svgreader/svgpathnode.hxx (original)
+++ openoffice/branches/l10n40/main/svgio/inc/svgio/svgreader/svgpathnode.hxx Sun Nov 3 12:35:41 2013
@@ -25,6 +25,7 @@
#include <svgio/svgiodllapi.h>
#include <svgio/svgreader/svgnode.hxx>
#include <svgio/svgreader/svgstyleattributes.hxx>
+#include <basegfx/polygon/b2dpolypolygontools.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -36,12 +37,13 @@ namespace svgio
{
private:
/// use styles
- SvgStyleAttributes maSvgStyleAttributes;
+ SvgStyleAttributes maSvgStyleAttributes;
/// variable scan values, dependent of given XAttributeList
- basegfx::B2DPolyPolygon* mpPolyPolygon;
- basegfx::B2DHomMatrix* mpaTransform;
- SvgNumber maPathLength;
+ basegfx::B2DPolyPolygon* mpPolyPolygon;
+ basegfx::B2DHomMatrix* mpaTransform;
+ SvgNumber maPathLength;
+ basegfx::tools::PointIndexSet maHelpPointIndices;
public:
SvgPathNode(
Modified: openoffice/branches/l10n40/main/svgio/inc/svgio/svgreader/svgstyleattributes.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svgio/inc/svgio/svgreader/svgstyleattributes.hxx?rev=1538352&r1=1538351&r2=1538352&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svgio/inc/svgio/svgreader/svgstyleattributes.hxx (original)
+++ openoffice/branches/l10n40/main/svgio/inc/svgio/svgreader/svgstyleattributes.hxx Sun Nov 3 12:35:41 2013
@@ -26,6 +26,7 @@
#include <svgio/svgreader/svgpaint.hxx>
#include <svgio/svgreader/svgnode.hxx>
#include <vcl/vclenum.hxx>
+#include <basegfx/polygon/b2dpolypolygontools.hxx>
//////////////////////////////////////////////////////////////////////////////
// predefines
@@ -253,7 +254,8 @@ namespace svgio
const SvgMarkerNode& rMarker) const;
void add_markers(
const basegfx::B2DPolyPolygon& rPath,
- drawinglayer::primitive2d::Primitive2DSequence& rTarget) const;
+ drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ const basegfx::tools::PointIndexSet* pHelpPointIndices) const;
public:
/// local attribute scanner
@@ -265,7 +267,8 @@ namespace svgio
drawinglayer::primitive2d::Primitive2DSequence& rSource) const;
void add_path(
const basegfx::B2DPolyPolygon& rPath,
- drawinglayer::primitive2d::Primitive2DSequence& rTarget) const;
+ drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ const basegfx::tools::PointIndexSet* pHelpPointIndices) const;
void add_postProcess(
drawinglayer::primitive2d::Primitive2DSequence& rTarget,
const drawinglayer::primitive2d::Primitive2DSequence& rSource,
Modified: openoffice/branches/l10n40/main/svgio/source/svgreader/svgcirclenode.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svgio/source/svgreader/svgcirclenode.cxx?rev=1538352&r1=1538351&r2=1538352&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svgio/source/svgreader/svgcirclenode.cxx (original)
+++ openoffice/branches/l10n40/main/svgio/source/svgreader/svgcirclenode.cxx Sun Nov 3 12:35:41 2013
@@ -141,7 +141,7 @@ namespace svgio
drawinglayer::primitive2d::Primitive2DSequence aNewTarget;
- pStyle->add_path(basegfx::B2DPolyPolygon(aPath), aNewTarget);
+ pStyle->add_path(basegfx::B2DPolyPolygon(aPath), aNewTarget, 0);
if(aNewTarget.hasElements())
{
Modified: openoffice/branches/l10n40/main/svgio/source/svgreader/svgellipsenode.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svgio/source/svgreader/svgellipsenode.cxx?rev=1538352&r1=1538351&r2=1538352&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svgio/source/svgreader/svgellipsenode.cxx (original)
+++ openoffice/branches/l10n40/main/svgio/source/svgreader/svgellipsenode.cxx Sun Nov 3 12:35:41 2013
@@ -156,7 +156,7 @@ namespace svgio
drawinglayer::primitive2d::Primitive2DSequence aNewTarget;
- pStyle->add_path(basegfx::B2DPolyPolygon(aPath), aNewTarget);
+ pStyle->add_path(basegfx::B2DPolyPolygon(aPath), aNewTarget, 0);
if(aNewTarget.hasElements())
{
Modified: openoffice/branches/l10n40/main/svgio/source/svgreader/svglinenode.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svgio/source/svgreader/svglinenode.cxx?rev=1538352&r1=1538351&r2=1538352&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svgio/source/svgreader/svglinenode.cxx (original)
+++ openoffice/branches/l10n40/main/svgio/source/svgreader/svglinenode.cxx Sun Nov 3 12:35:41 2013
@@ -152,7 +152,7 @@ namespace svgio
drawinglayer::primitive2d::Primitive2DSequence aNewTarget;
- pStyle->add_path(basegfx::B2DPolyPolygon(aPath), aNewTarget);
+ pStyle->add_path(basegfx::B2DPolyPolygon(aPath), aNewTarget, 0);
if(aNewTarget.hasElements())
{
Modified: openoffice/branches/l10n40/main/svgio/source/svgreader/svgnode.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svgio/source/svgreader/svgnode.cxx?rev=1538352&r1=1538351&r2=1538352&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svgio/source/svgreader/svgnode.cxx (original)
+++ openoffice/branches/l10n40/main/svgio/source/svgreader/svgnode.cxx Sun Nov 3 12:35:41 2013
@@ -112,14 +112,12 @@ namespace svgio
}
}
- if(maCssStyleVector.empty())
+ if(!maCssStyleVector.empty())
{
- return &rOriginal;
- }
- else
- {
- // set CssStyleParent at maCssStyleVector members to hang them in front of
- // the existing style. Build a style chain, reset parent of original for security.
+ // #123510# if CSS styles were found, create a linked list with rOriginal as parent
+ // and all CSS styles as linked children, so that the style attribute has
+ // priority over the CSS style. If there is no style attribute this means that
+ // no values are set at rOriginal, thus it is still correct to have that order.
// Repeated style requests should only be issued from sub-Text nodes and I'm not
// sure if in-between text nodes may build other chains (should not happen). But
// it's only a re-chaining with pointers (cheap), so allow to do it every time.
@@ -128,14 +126,15 @@ namespace svgio
for(sal_uInt32 a(0); a < maCssStyleVector.size(); a++)
{
- SvgStyleAttributes* pCandidate = const_cast< SvgStyleAttributes* >(maCssStyleVector[maCssStyleVector.size() - a - 1]);
+ SvgStyleAttributes* pNext = const_cast< SvgStyleAttributes* >(maCssStyleVector[a]);
- pCandidate->setCssStyleParent(pCurrent);
- pCurrent = pCandidate;
+ pCurrent->setCssStyleParent(pNext);
+ pCurrent = pNext;
+ pCurrent->setCssStyleParent(0);
}
-
- return pCurrent;
}
+
+ return &rOriginal;
}
SvgNode::SvgNode(
Modified: openoffice/branches/l10n40/main/svgio/source/svgreader/svgpathnode.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svgio/source/svgreader/svgpathnode.cxx?rev=1538352&r1=1538351&r2=1538352&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svgio/source/svgreader/svgpathnode.cxx (original)
+++ openoffice/branches/l10n40/main/svgio/source/svgreader/svgpathnode.cxx Sun Nov 3 12:35:41 2013
@@ -75,7 +75,7 @@ namespace svgio
{
basegfx::B2DPolyPolygon aPath;
- if(basegfx::tools::importFromSvgD(aPath, aContent))
+ if(basegfx::tools::importFromSvgD(aPath, aContent, false, &maHelpPointIndices))
{
if(aPath.count())
{
@@ -120,7 +120,7 @@ namespace svgio
{
drawinglayer::primitive2d::Primitive2DSequence aNewTarget;
- pStyle->add_path(*getPath(), aNewTarget);
+ pStyle->add_path(*getPath(), aNewTarget, &maHelpPointIndices);
if(aNewTarget.hasElements())
{
Modified: openoffice/branches/l10n40/main/svgio/source/svgreader/svgpolynode.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svgio/source/svgreader/svgpolynode.cxx?rev=1538352&r1=1538351&r2=1538352&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svgio/source/svgreader/svgpolynode.cxx (original)
+++ openoffice/branches/l10n40/main/svgio/source/svgreader/svgpolynode.cxx Sun Nov 3 12:35:41 2013
@@ -25,6 +25,7 @@
#include <svgio/svgreader/svgpolynode.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
+#include <basegfx/polygon/b2dpolygontools.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -77,7 +78,7 @@ namespace svgio
case SVGTokenPoints:
{
basegfx::B2DPolygon aPath;
-
+
if(basegfx::tools::importFromSvgPoints(aPath, aContent))
{
if(aPath.count())
@@ -117,7 +118,7 @@ namespace svgio
{
drawinglayer::primitive2d::Primitive2DSequence aNewTarget;
- pStyle->add_path(basegfx::B2DPolyPolygon(*getPolygon()), aNewTarget);
+ pStyle->add_path(basegfx::B2DPolyPolygon(*getPolygon()), aNewTarget, 0);
if(aNewTarget.hasElements())
{
Modified: openoffice/branches/l10n40/main/svgio/source/svgreader/svgrectnode.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svgio/source/svgreader/svgrectnode.cxx?rev=1538352&r1=1538351&r2=1538352&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svgio/source/svgreader/svgrectnode.cxx (original)
+++ openoffice/branches/l10n40/main/svgio/source/svgreader/svgrectnode.cxx Sun Nov 3 12:35:41 2013
@@ -213,7 +213,7 @@ namespace svgio
drawinglayer::primitive2d::Primitive2DSequence aNewTarget;
- pStyle->add_path(basegfx::B2DPolyPolygon(aPath), aNewTarget);
+ pStyle->add_path(basegfx::B2DPolyPolygon(aPath), aNewTarget, 0);
if(aNewTarget.hasElements())
{
Modified: openoffice/branches/l10n40/main/svgio/source/svgreader/svgstyleattributes.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svgio/source/svgreader/svgstyleattributes.cxx?rev=1538352&r1=1538351&r2=1538352&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svgio/source/svgreader/svgstyleattributes.cxx (original)
+++ openoffice/branches/l10n40/main/svgio/source/svgreader/svgstyleattributes.cxx Sun Nov 3 12:35:41 2013
@@ -838,7 +838,8 @@ namespace svgio
void SvgStyleAttributes::add_markers(
const basegfx::B2DPolyPolygon& rPath,
- drawinglayer::primitive2d::Primitive2DSequence& rTarget) const
+ drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ const basegfx::tools::PointIndexSet* pHelpPointIndices) const
{
// try to access linked markers
const SvgMarkerNode* pStart = accessMarkerStartXLink();
@@ -897,6 +898,18 @@ namespace svgio
pNeeded = pMid;
}
+ if(pHelpPointIndices && !pHelpPointIndices->empty())
+ {
+ const basegfx::tools::PointIndexSet::const_iterator aFound(
+ pHelpPointIndices->find(basegfx::tools::PointIndex(a, b)));
+
+ if(aFound != pHelpPointIndices->end())
+ {
+ // this point is a pure helper point; do not create a marker for it
+ continue;
+ }
+ }
+
if(!pNeeded)
{
// no marker needs to be created for this point
@@ -1008,7 +1021,8 @@ namespace svgio
void SvgStyleAttributes::add_path(
const basegfx::B2DPolyPolygon& rPath,
- drawinglayer::primitive2d::Primitive2DSequence& rTarget) const
+ drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ const basegfx::tools::PointIndexSet* pHelpPointIndices) const
{
if(!rPath.count())
{
@@ -1066,7 +1080,7 @@ namespace svgio
SVGTokenLine == mrOwner.getType()) // line
{
// try to add markers
- add_markers(rPath, rTarget);
+ add_markers(rPath, rTarget, pHelpPointIndices);
}
}
Modified: openoffice/branches/l10n40/main/svx/inc/svx/sdr/properties/customshapeproperties.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svx/inc/svx/sdr/properties/customshapeproperties.hxx?rev=1538352&r1=1538351&r2=1538352&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svx/inc/svx/sdr/properties/customshapeproperties.hxx (original)
+++ openoffice/branches/l10n40/main/svx/inc/svx/sdr/properties/customshapeproperties.hxx Sun Nov 3 12:35:41 2013
@@ -34,7 +34,8 @@ namespace sdr
{
class CustomShapeProperties : public TextProperties
{
- void UpdateTextFrameStatus();
+ private:
+ void UpdateTextFrameStatus(bool bInvalidateRenderGeometry);
protected:
// create a new itemset
Modified: openoffice/branches/l10n40/main/svx/source/sdr/properties/customshapeproperties.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svx/source/sdr/properties/customshapeproperties.cxx?rev=1538352&r1=1538351&r2=1538352&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svx/source/sdr/properties/customshapeproperties.cxx (original)
+++ openoffice/branches/l10n40/main/svx/source/sdr/properties/customshapeproperties.cxx Sun Nov 3 12:35:41 2013
@@ -39,21 +39,32 @@ namespace sdr
{
namespace properties
{
- void CustomShapeProperties::UpdateTextFrameStatus()
+ void CustomShapeProperties::UpdateTextFrameStatus(bool bInvalidateRenderGeometry)
{
SdrObjCustomShape& rObj = static_cast< SdrObjCustomShape& >(GetSdrObject());
const bool bOld(rObj.bTextFrame);
+ // change TextFrame flag when bResizeShapeToFitText changes (which is mapped
+ // on the item SDRATTR_TEXT_AUTOGROWHEIGHT for custom shapes, argh)
rObj.bTextFrame = 0 != static_cast< const SdrTextAutoGrowHeightItem& >(GetObjectItemSet().Get(SDRATTR_TEXT_AUTOGROWHEIGHT)).GetValue();
+ // check if it did change
if(rObj.bTextFrame != bOld)
{
- rObj.InvalidateRenderGeometry();
+ // on change also invalidate render geometry
+ bInvalidateRenderGeometry = true;
- // #115391# Potential recursuin, since it calls SetObjectItemSet again, but rObj.bTextFrame
- // will not change again, thus it will be only one level and terminate
+ // #115391# Potential recursion, since it calls SetObjectItemSet again, but rObj.bTextFrame
+ // will not change again. Thus it will be only one level and terminate safely
rObj.AdaptTextMinSize();
}
+
+ if(bInvalidateRenderGeometry)
+ {
+ // if asked for or bResizeShapeToFitText changed, make sure that
+ // the render geometry is reconstructed using changed parameters
+ rObj.InvalidateRenderGeometry();
+ }
}
SfxItemSet& CustomShapeProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool)
@@ -134,7 +145,7 @@ namespace sdr
TextProperties::ItemSetChanged(rSet);
// update bTextFrame and RenderGeometry
- UpdateTextFrameStatus();
+ UpdateTextFrameStatus(true);
}
void CustomShapeProperties::PostItemChange(const sal_uInt16 nWhich)
@@ -144,7 +155,7 @@ namespace sdr
case SDRATTR_TEXT_AUTOGROWHEIGHT:
{
// #115391# update bTextFrame and RenderGeometry using AdaptTextMinSize()
- UpdateTextFrameStatus();
+ UpdateTextFrameStatus(false);
break;
}
default:
@@ -163,7 +174,7 @@ namespace sdr
TextProperties::ItemChange( nWhich, pNewItem );
// update bTextFrame and RenderGeometry
- UpdateTextFrameStatus();
+ UpdateTextFrameStatus(true);
}
void CustomShapeProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr)
@@ -172,13 +183,13 @@ namespace sdr
TextProperties::SetStyleSheet( pNewStyleSheet, bDontRemoveHardAttr );
// update bTextFrame and RenderGeometry
- UpdateTextFrameStatus();
+ UpdateTextFrameStatus(true);
}
void CustomShapeProperties::ForceDefaultAttributes()
{
// update bTextFrame and RenderGeometry
- UpdateTextFrameStatus();
+ UpdateTextFrameStatus(true);
// SJ: Following is no good if creating customshapes, leading to objects that are white after loading via xml
// This means: Do *not* call parent here is by purpose...
@@ -226,11 +237,8 @@ namespace sdr
bRemoveRenderGeometry = sal_True;
}
- if ( bRemoveRenderGeometry )
- {
- // update bTextFrame and RenderGeometry
- UpdateTextFrameStatus();
- }
+ // update bTextFrame and RenderGeometry
+ UpdateTextFrameStatus(bRemoveRenderGeometry);
}
} // end of namespace properties
} // end of namespace sdr
Modified: openoffice/branches/l10n40/main/svx/source/xoutdev/xattrbmp.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svx/source/xoutdev/xattrbmp.cxx?rev=1538352&r1=1538351&r2=1538352&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svx/source/xoutdev/xattrbmp.cxx (original)
+++ openoffice/branches/l10n40/main/svx/source/xoutdev/xattrbmp.cxx Sun Nov 3 12:35:41 2013
@@ -129,10 +129,12 @@ bool SVX_DLLPUBLIC isHistorical8x8(const
if(pRead->HasPalette() && 2 == pRead->GetPaletteEntryCount())
{
const BitmapPalette& rPalette = pRead->GetPalette();
-
- o_rBack = rPalette[1];
- o_rFront = rPalette[0];
-
+
+ // #123564# bachground and foregrund were exchanged; of course
+ // rPalette[0] is the background color
+ o_rFront = rPalette[1];
+ o_rBack = rPalette[0];
+
return true;
}
}
Modified: openoffice/branches/l10n40/main/sw/inc/ndgrf.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/sw/inc/ndgrf.hxx?rev=1538352&r1=1538351&r2=1538352&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/sw/inc/ndgrf.hxx (original)
+++ openoffice/branches/l10n40/main/sw/inc/ndgrf.hxx Sun Nov 3 12:35:41 2013
@@ -154,7 +154,6 @@ public:
/// wrappers for non-const calls at GraphicObject
void ReleaseGraphicFromCache() { maGrfObj.ReleaseFromCache(); }
- void DrawGraphicWithPDFHandling(OutputDevice& rOutDev, const Point& rPt, const Size& rSz, const GraphicAttr* pGrfAttr = NULL, const sal_uLong nFlags = GRFMGR_DRAW_STANDARD) { maGrfObj.DrawWithPDFHandling(rOutDev, rPt, rSz, pGrfAttr, nFlags); }
void StartGraphicAnimation(OutputDevice* pOut, const Point& rPt, const Size& rSz, long nExtraData = 0, const GraphicAttr* pAttr = NULL, sal_uLong nFlags = GRFMGR_DRAW_STANDARD, OutputDevice* pFirstFrameOutDev = NULL) { maGrfObj.StartAnimation(pOut, rPt, rSz, nExtraData, pAttr, nFlags, pFirstFrameOutDev); }
void StopGraphicAnimation(OutputDevice* pOut = NULL, long nExtraData = 0) { maGrfObj.StopAnimation(pOut, nExtraData); }
Modified: openoffice/branches/l10n40/main/sw/source/core/doc/notxtfrm.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/sw/source/core/doc/notxtfrm.cxx?rev=1538352&r1=1538351&r2=1538352&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/sw/source/core/doc/notxtfrm.cxx (original)
+++ openoffice/branches/l10n40/main/sw/source/core/doc/notxtfrm.cxx Sun Nov 3 12:35:41 2013
@@ -76,7 +76,7 @@
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <drawinglayer/processor2d/processor2dtools.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
-#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
+#include <drawinglayer/primitive2d/graphicprimitive2d.hxx>
using namespace com::sun::star;
@@ -816,57 +816,19 @@ bool paintUsingPrimitivesHelper(
OutputDevice& rOutputDevice,
const drawinglayer::primitive2d::Primitive2DSequence& rSequence,
const basegfx::B2DRange& rSourceRange,
- const basegfx::B2DRange& rTargetRange,
- const sal_Int32 nLeftCrop = 0,
- const sal_Int32 nTopCrop = 0,
- const sal_Int32 nRightCrop = 0,
- const sal_Int32 nBottomCrop = 0,
- const bool bMirrorX = false,
- const bool bMirrorY = false)
+ const basegfx::B2DRange& rTargetRange)
{
- const double fSourceWidth(rSourceRange.getWidth());
- const double fSourceHeight(rSourceRange.getHeight());
-
- if(rSequence.hasElements() && !basegfx::fTools::equalZero(fSourceWidth) && !basegfx::fTools::equalZero(fSourceHeight))
+ if(rSequence.hasElements() && !basegfx::fTools::equalZero(rSourceRange.getWidth()) && !basegfx::fTools::equalZero(rSourceRange.getHeight()))
{
- // copy target range and apply evtl. cropping
- basegfx::B2DRange aTargetRange(rTargetRange);
-
- if(nLeftCrop || nTopCrop || nRightCrop || nBottomCrop)
+ if(!basegfx::fTools::equalZero(rTargetRange.getWidth()) && !basegfx::fTools::equalZero(rTargetRange.getHeight()))
{
- // calculate original TargetRange
- const double fFactor100thmmToTwips(72.0 / 127.0);
-
- aTargetRange = basegfx::B2DRange(
- aTargetRange.getMinX() - (nLeftCrop * fFactor100thmmToTwips),
- aTargetRange.getMinY() - (nTopCrop * fFactor100thmmToTwips),
- aTargetRange.getMaxX() + (nRightCrop * fFactor100thmmToTwips),
- aTargetRange.getMaxY() + (nBottomCrop * fFactor100thmmToTwips));
- }
-
- const double fTargetWidth(aTargetRange.getWidth());
- const double fTargetHeight(aTargetRange.getHeight());
-
- if(!basegfx::fTools::equalZero(fTargetWidth) && !basegfx::fTools::equalZero(fTargetHeight))
- {
- // map graphic range to target range. This will automatically include
- // tme mapping from Svg 1/100th mm content to twips since the target
- // range is twips already
- basegfx::B2DHomMatrix aMappingTransform(
- basegfx::tools::createTranslateB2DHomMatrix(
- -rSourceRange.getMinX(),
- -rSourceRange.getMinY()));
-
- aMappingTransform.scale(fTargetWidth / fSourceWidth, fTargetHeight / fSourceHeight);
- aMappingTransform.translate(aTargetRange.getMinX(), aTargetRange.getMinY());
-
- // apply mirrorings
- if(bMirrorX || bMirrorY)
- {
- aMappingTransform.translate(-aTargetRange.getCenterX(), -aTargetRange.getCenterY());
- aMappingTransform.scale(bMirrorX ? -1.0 : 1.0, bMirrorY ? -1.0 : 1.0); // #119176# small typo with X/Y
- aMappingTransform.translate(aTargetRange.getCenterX(), aTargetRange.getCenterY());
- }
+ // map graphic range to target range. This will e.g. automatically include
+ // tme mapping from 1/100th mm content to twips if needed when the target
+ // range is defined in twips
+ const basegfx::B2DHomMatrix aMappingTransform(
+ basegfx::tools::createSourceRangeTargetRangeTransform(
+ rSourceRange,
+ rTargetRange));
// Fill ViewInformation. Use MappingTransform here, so there is no need to
// embed the primitives to it. Use original TargetRange here so there is also
@@ -875,7 +837,7 @@ bool paintUsingPrimitivesHelper(
const drawinglayer::geometry::ViewInformation2D aViewInformation2D(
aMappingTransform,
rOutputDevice.GetViewTransformation(),
- aTargetRange,
+ rTargetRange,
0,
0.0,
uno::Sequence< beans::PropertyValue >());
@@ -983,14 +945,6 @@ void SwNoTxtFrm::PaintPicture( OutputDev
::lcl_PaintReplacement( aAlignedGrfArea, aTxt, *pShell, this, sal_False );
bContinue = sal_False;
}
- else if( rGrfObj.IsCached( pOut, aAlignedGrfArea.Pos(),
- aAlignedGrfArea.SSize(), &aGrfAttr ))
- {
- pGrfNd->DrawGraphicWithPDFHandling(*pOut,
- aAlignedGrfArea.Pos(), aAlignedGrfArea.SSize(),
- &aGrfAttr );
- bContinue = sal_False;
- }
}
if( bContinue )
@@ -1028,68 +982,30 @@ void SwNoTxtFrm::PaintPicture( OutputDev
}
else
{
- const SvgDataPtr& rSvgDataPtr = rGrfObj.GetGraphic().getSvgData();
- bool bDone(false);
+ // unify using GraphicPrimitive2D
+ // -> the primitive handles all crop and mirror stuff
+ // -> the primitive renderer will create the needed pdf export data
+ // -> if bitmap conent, it will be cached system-dependent
+ const basegfx::B2DRange aTargetRange(
+ aAlignedGrfArea.Left(), aAlignedGrfArea.Top(),
+ aAlignedGrfArea.Right(), aAlignedGrfArea.Bottom());
+ const basegfx::B2DHomMatrix aTargetTransform(
+ basegfx::tools::createScaleTranslateB2DHomMatrix(
+ aTargetRange.getRange(),
+ aTargetRange.getMinimum()));
+ drawinglayer::primitive2d::Primitive2DSequence aContent;
+
+ aContent.realloc(1);
+ aContent[0] = new drawinglayer::primitive2d::GraphicPrimitive2D(
+ aTargetTransform,
+ rGrfObj.GetGraphic(),
+ aGrfAttr);
- if(rSvgDataPtr.get())
- {
- // Graphic is Svg and can be painted as primitives (vector graphic)
- const basegfx::B2DRange aTargetRange(
- aAlignedGrfArea.Left(), aAlignedGrfArea.Top(),
- aAlignedGrfArea.Right(), aAlignedGrfArea.Bottom());
- const bool bCropped(aGrfAttr.IsCropped());
- drawinglayer::primitive2d::Primitive2DSequence aContent;
- GraphicAttr aSuppressGraphicAttr(aGrfAttr);
-
- aSuppressGraphicAttr.SetCrop(0, 0, 0, 0);
- aSuppressGraphicAttr.SetRotation(0);
- aSuppressGraphicAttr.SetMirrorFlags(0);
-
- const bool bNeedTransformedGraphic(
- aSuppressGraphicAttr.IsSpecialDrawMode() ||
- aSuppressGraphicAttr.IsAdjusted() ||
- aSuppressGraphicAttr.IsMirrored() ||
- aSuppressGraphicAttr.IsRotated() ||
- aSuppressGraphicAttr.IsTransparent());
-
- if(bNeedTransformedGraphic)
- {
- // #122039# need to apply graphic transformation if GraphicAttr are used qwhich need this
- const Graphic aTransformedGraphic(rGrfObj.GetTransformedGraphic(&aSuppressGraphicAttr));
- const basegfx::B2DRange aRange(rSvgDataPtr->getRange());
- const basegfx::B2DHomMatrix aTransform(
- basegfx::tools::createScaleTranslateB2DHomMatrix(
- aRange.getRange(),
- aRange.getMinimum()));
-
- aContent.realloc(1);
- aContent[0] = new drawinglayer::primitive2d::BitmapPrimitive2D(
- aTransformedGraphic.GetBitmapEx(),
- aTransform);
- }
- else
- {
- aContent = rSvgDataPtr->getPrimitive2DSequence();
- }
-
- bDone = paintUsingPrimitivesHelper(
- *pOut,
- aContent,
- rSvgDataPtr->getRange(),
- aTargetRange,
- bCropped ? aGrfAttr.GetLeftCrop() : 0,
- bCropped ? aGrfAttr.GetTopCrop() : 0,
- bCropped ? aGrfAttr.GetRightCrop() : 0,
- bCropped ? aGrfAttr.GetBottomCrop() : 0,
- aGrfAttr.GetMirrorFlags() & BMP_MIRROR_HORZ,
- aGrfAttr.GetMirrorFlags() & BMP_MIRROR_VERT);
- }
-
- if(!bDone)
- {
- // fallback paint, uses replacement image
- pGrfNd->DrawGraphicWithPDFHandling(*pOut, aAlignedGrfArea.Pos(), aAlignedGrfArea.SSize(), &aGrfAttr);
- }
+ paintUsingPrimitivesHelper(
+ *pOut,
+ aContent,
+ aTargetRange,
+ aTargetRange);
}
}
else
Modified: openoffice/branches/l10n40/main/sw/source/filter/rtf/swparrtf.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/sw/source/filter/rtf/swparrtf.cxx?rev=1538352&r1=1538351&r2=1538352&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/sw/source/filter/rtf/swparrtf.cxx (original)
+++ openoffice/branches/l10n40/main/sw/source/filter/rtf/swparrtf.cxx Sun Nov 3 12:35:41 2013
@@ -2290,8 +2290,13 @@ void SwRTFParser::SetAttrInDoc( SvxRTFIt
SwTxtNode* pTxtNd = pDoc->GetNodes()[ n ]->GetTxtNode();
if( pTxtNd )
{
- pTxtNd->SetAttr(
- *GetDfltAttr(RES_PARATR_NUMRULE));
+ pTxtNd->SetAttr( *GetDfltAttr(RES_PARATR_NUMRULE) );
+ // reset all list attributes
+ pTxtNd->ResetAttr( RES_PARATR_LIST_LEVEL );
+ pTxtNd->ResetAttr( RES_PARATR_LIST_ISRESTART );
+ pTxtNd->ResetAttr( RES_PARATR_LIST_RESTARTVALUE );
+ pTxtNd->ResetAttr( RES_PARATR_LIST_ISCOUNTED );
+ pTxtNd->ResetAttr( RES_PARATR_LIST_ID );
}
}
}
Modified: openoffice/branches/l10n40/main/tools/source/generic/toolsin.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/tools/source/generic/toolsin.cxx?rev=1538352&r1=1538351&r2=1538352&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/tools/source/generic/toolsin.cxx (original)
+++ openoffice/branches/l10n40/main/tools/source/generic/toolsin.cxx Sun Nov 3 12:35:41 2013
@@ -31,7 +31,7 @@
#include <tools/debug.hxx>
#include <toolsin.hxx>
-#if defined WNT || defined OS2
+#if defined WNT
#include <dll.hxx>
#endif
Modified: openoffice/branches/l10n40/main/vcl/os2/source/gdi/salgdi3.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/vcl/os2/source/gdi/salgdi3.cxx?rev=1538352&r1=1538351&r2=1538352&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/vcl/os2/source/gdi/salgdi3.cxx (original)
+++ openoffice/branches/l10n40/main/vcl/os2/source/gdi/salgdi3.cxx Sun Nov 3 12:35:41 2013
@@ -837,7 +837,7 @@ USHORT Os2SalGraphics::SetFont( ImplFont
return 0;
}
-#if OSL_DEBUG_LEVEL>1
+#if OSL_DEBUG_LEVEL>10
debug_printf( "Os2SalGraphics::SetFont\n");
#endif
Modified: openoffice/branches/l10n40/main/xmloff/inc/xexptran.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/xmloff/inc/xexptran.hxx?rev=1538352&r1=1538351&r2=1538352&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/xmloff/inc/xexptran.hxx (original)
+++ openoffice/branches/l10n40/main/xmloff/inc/xexptran.hxx Sun Nov 3 12:35:41 2013
@@ -115,83 +115,22 @@ public:
class SdXMLImExViewBox
{
- rtl::OUString msString;
- sal_Int32 mnX;
- sal_Int32 mnY;
- sal_Int32 mnW;
- sal_Int32 mnH;
+ rtl::OUString msString;
+ double mfX;
+ double mfY;
+ double mfW;
+ double mfH;
public:
- SdXMLImExViewBox(sal_Int32 nX = 0L, sal_Int32 nY = 0L, sal_Int32 nW = 1000L, sal_Int32 nH = 1000L);
- SdXMLImExViewBox(const rtl::OUString& rNew, const SvXMLUnitConverter& rConv);
+ SdXMLImExViewBox(double fX = 0.0, double fY = 0.0, double fW = 1000.0, double fH = 1000.0);
+ SdXMLImExViewBox(const rtl::OUString& rNew, const SvXMLUnitConverter& rConv);
- sal_Int32 GetX() const { return mnX; }
- sal_Int32 GetY() const { return mnY; }
- sal_Int32 GetWidth() const { return mnW; }
- sal_Int32 GetHeight() const { return mnH; }
- const rtl::OUString& GetExportString();
+ double GetX() const { return mfX; }
+ double GetY() const { return mfY; }
+ double GetWidth() const { return mfW; }
+ double GetHeight() const { return mfH; }
+ const rtl::OUString& GetExportString();
};
-//////////////////////////////////////////////////////////////////////////////
-
-class SdXMLImExPointsElement
-{
- rtl::OUString msString;
- com::sun::star::drawing::PointSequenceSequence maPoly;
-
-public:
- SdXMLImExPointsElement(com::sun::star::drawing::PointSequence* pPoints,
- const SdXMLImExViewBox& rViewBox,
- const com::sun::star::awt::Point& rObjectPos,
- const com::sun::star::awt::Size& rObjectSize,
- // #96328#
- const bool bClosed = true);
- SdXMLImExPointsElement(const rtl::OUString& rNew,
- const SdXMLImExViewBox& rViewBox,
- const com::sun::star::awt::Point& rObjectPos,
- const com::sun::star::awt::Size& rObjectSize,
- const SvXMLUnitConverter& rConv);
-
- const rtl::OUString& GetExportString() const { return msString; }
- const com::sun::star::drawing::PointSequenceSequence& GetPointSequenceSequence() const { return maPoly; }
-};
-
-//////////////////////////////////////////////////////////////////////////////
-
-class SdXMLImExSvgDElement
-{
- rtl::OUString msString;
- const SdXMLImExViewBox& mrViewBox;
- bool mbIsClosed;
- bool mbIsCurve;
-
- sal_Int32 mnLastX;
- sal_Int32 mnLastY;
-
- com::sun::star::drawing::PointSequenceSequence maPoly;
- com::sun::star::drawing::FlagSequenceSequence maFlag;
-
-public:
- SdXMLImExSvgDElement(const SdXMLImExViewBox& rViewBox);
- SdXMLImExSvgDElement(const rtl::OUString& rNew,
- const SdXMLImExViewBox& rViewBox,
- const com::sun::star::awt::Point& rObjectPos,
- const com::sun::star::awt::Size& rObjectSize,
- const SvXMLUnitConverter& rConv);
-
- void AddPolygon(
- com::sun::star::drawing::PointSequence* pPoints,
- com::sun::star::drawing::FlagSequence* pFlags,
- const com::sun::star::awt::Point& rObjectPos,
- const com::sun::star::awt::Size& rObjectSize,
- bool bClosed = false, bool bRelative = true);
-
- const rtl::OUString& GetExportString() const { return msString; }
- bool IsClosed() const { return mbIsClosed; }
- bool IsCurve() const { return mbIsCurve; }
- const com::sun::star::drawing::PointSequenceSequence& GetPointSequenceSequence() const { return maPoly; }
- const com::sun::star::drawing::FlagSequenceSequence& GetFlagSequenceSequence() const { return maFlag; }
-};
-
-
#endif // _XEXPTRANSFORM_HXX
+// eof
Modified: openoffice/branches/l10n40/main/xmloff/source/draw/XMLImageMapContext.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/xmloff/source/draw/XMLImageMapContext.cxx?rev=1538352&r1=1538351&r2=1538352&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/xmloff/source/draw/XMLImageMapContext.cxx (original)
+++ openoffice/branches/l10n40/main/xmloff/source/draw/XMLImageMapContext.cxx Sun Nov 3 12:35:41 2013
@@ -19,25 +19,18 @@
*
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_xmloff.hxx"
#include "XMLImageMapContext.hxx"
#include <rtl/ustrbuf.hxx>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/beans/XPropertySet.hpp>
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSETINFO_HPP
#include <com/sun/star/beans/XPropertySetInfo.hpp>
-#endif
#include <com/sun/star/xml/sax/XAttributeList.hpp>
#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/drawing/PointSequenceSequence.hpp>
-
-#ifndef _COM_SUN_STAR_DOCUMENT_XEVENTSSUPPLIER_HPP
#include <com/sun/star/document/XEventsSupplier.hpp>
-#endif
#include <com/sun/star/awt/Rectangle.hpp>
#include <xmloff/xmltoken.hxx>
#include <xmloff/xmlimp.hxx>
@@ -50,7 +43,8 @@
#include <xmloff/XMLEventsImportContext.hxx>
#include "XMLStringBufferImportContext.hxx"
#include <tools/debug.hxx>
-
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <basegfx/polygon/b2dpolygontools.hxx>
using namespace ::com::sun::star;
using namespace ::xmloff::token;
@@ -506,33 +500,30 @@ void XMLImageMapPolygonContext::ProcessA
bValid = bViewBoxOK && bPointsOK;
}
-void XMLImageMapPolygonContext::Prepare(
- Reference<XPropertySet> & rPropertySet)
+void XMLImageMapPolygonContext::Prepare(Reference<XPropertySet> & rPropertySet)
{
- // process view box
- SdXMLImExViewBox aViewBox(sViewBoxString,
- GetImport().GetMM100UnitConverter());
-
- // get polygon sequence
- awt::Point aPoint(aViewBox.GetX(), aViewBox.GetY());
- awt::Size aSize(aViewBox.GetWidth(), aViewBox.GetHeight());
- SdXMLImExPointsElement aPoints( sPointsString, aViewBox, aPoint, aSize,
- GetImport().GetMM100UnitConverter() );
- PointSequenceSequence aPointSeqSeq = aPoints.GetPointSequenceSequence();
-
- // only use first element of sequence-sequence
- if (aPointSeqSeq.getLength() > 0)
- {
- Any aAny;
- aAny <<= aPointSeqSeq[0];
- rPropertySet->setPropertyValue(sPolygon, aAny);
- }
+ // process view box
+ SdXMLImExViewBox aViewBox(sViewBoxString, GetImport().GetMM100UnitConverter());
- // parent properties
- XMLImageMapObjectContext::Prepare(rPropertySet);
-}
+ // get polygon sequence
+ basegfx::B2DPolygon aPolygon;
+ if(basegfx::tools::importFromSvgPoints(aPolygon, sPointsString))
+ {
+ if(aPolygon.count())
+ {
+ com::sun::star::drawing::PointSequence aPointSequence;
+ uno::Any aAny;
+
+ basegfx::tools::B2DPolygonToUnoPointSequence(aPolygon, aPointSequence);
+ aAny <<= aPointSequence;
+ rPropertySet->setPropertyValue(sPolygon, aAny);
+ }
+ }
+ // parent properties
+ XMLImageMapObjectContext::Prepare(rPropertySet);
+}
class XMLImageMapCircleContext : public XMLImageMapObjectContext
{