:
eval 'exec perl -S $0 ${1+"$@"}'
if 0;
use strict;
sub clean()
{
system ("rm -Rf autom4te.cache");
system ("rm -f missing install-sh mkinstalldirs libtool ltmain.sh");
print "cleaned the build tree\n";
}
my $aclocal;
# check we have various vital tools
sub sanity_checks($)
{
my $system = shift;
my @path = split (':', $ENV{'PATH'});
my %required =
(
'pkg-config' => "pkg-config is required to be installed",
'autoconf' => "autoconf is required",
$aclocal => "$aclocal is required",
);
for my $elem (@path) {
for my $app (keys %required) {
if (-f "$elem/$app") {
delete $required{$app};
}
}
}
if ((keys %required) > 0) {
print ("Various low-level dependencies are missing, please install them:\n");
for my $app (keys %required) {
print "\t $app: " . $required{$app} . "\n";
}
exit (1);
}
}
# one argument per line
sub read_args($)
{
my $file = shift;
my $fh;
my @lst;
open ($fh, $file) || die "can't open file: $file";
while (<$fh>) {
chomp();
# migrate from the old system
if ( substr($_, 0, 1) eq "'" ) {
print "Migrating options from the old autogen.lastrun format, using:\n";
my @opts;
@opts = split(/'/);
foreach my $opt (@opts) {
if ( substr($opt, 0, 1) eq "-" ) {
push @lst, $opt;
print " $opt\n";
}
}
} elsif ( substr($_, 0, 1) eq "#" ) {
# comment
} else {
push @lst, $_;
}
}
close ($fh);
# print "read args from file '$file': @lst\n";
return @lst;
}
sub invalid_distro($$)
{
my ($config, $distro) = @_;
print STDERR "Can't find distro option set: $config\nThis is not necessarily a problem.\n";
print STDERR "Distros with distro option sets are:\n";
my $dirh;
opendir ($dirh, "distro-configs");
while (($_ = readdir ($dirh))) {
/(.*)\.conf$/ || next;
print STDERR "\t$1\n";
}
closedir ($dirh);
}
my @cmdline_args = ();
if (!@ARGV) {
my $lastrun = "autogen.lastrun";
@cmdline_args = read_args ($lastrun) if (-f $lastrun);
} else {
@cmdline_args = @ARGV;
}
my @args;
for my $arg (@cmdline_args) {
if ($arg eq '--clean') {
clean();
} elsif ($arg =~ m/--with-distro=(.*)$/) {
my $config = "distro-configs/$1.conf";
if (! -f $config) {
invalid_distro ($config, $1);
} else {
push @args, read_args ($config);
}
} else {
push @args, $arg;
}
}
for my $arg (@args) {
if ($arg =~ /^([A-Z]+)=(.*)/) {
$ENV{$1} = $2;
}
}
# Alloc $ACLOCAL to specify which aclocal to use
$aclocal = $ENV{ACLOCAL} ? $ENV{ACLOCAL} : 'aclocal';
my $system = `uname -s`;
chomp $system;
sanity_checks ($system) unless($system eq 'Darwin');
my $aclocal_flags = $ENV{ACLOCAL_FLAGS};
if ($aclocal_flags eq "")
{
$aclocal_flags = "-I ./m4";
$aclocal_flags .= " -I ./m4/mac" if ($system eq 'Darwin');
}
$ENV{AUTOMAKE_EXTRA_FLAGS} = '--warnings=no-portability' if (!($system eq 'Darwin'));
system ("$aclocal $aclocal_flags") && die "Failed to run aclocal";
unlink ("configure");
system ("autoconf") && die "Failed to run autoconf";
die "failed to generate configure" if (! -x "configure");
if (defined $ENV{NOCONFIGURE}) {
print "Skipping configure process.";
} else {
# Save autogen.lastrun only if we did get some arguments on the command-line
if (@ARGV) {
if (scalar(@cmdline_args) > 0) {
# if there's already an autogen.lastrun, make a backup first
if (-e "autogen.lastrun") {
open (my $fh, "autogen.lastrun") || warn "can't open autogen.lastrun. \n";
open (BAK, ">autogen.lastrun.bak") || warn "can't create backup file. \n";
while (<$fh>) {
print BAK;
}
close (BAK) && close ($fh);
}
# print "writing args to autogen.lastrun\n";
my $fh;
open ($fh, ">autogen.lastrun") || die "can't open autogen.lastrun: $!";
for my $arg (@cmdline_args) {
print $fh "$arg\n";
}
close ($fh);
}
}
elsif ( ! -e "autogen.lastrun")
{
open (my $fh, ">autogen.lastrun") || die "can't create autogen.lastrun";
close ($fh);
}
print "running ./configure with '" . join ("' '", @args), "'\n";
system ("./configure", @args) && die "Error running configure";
}
# Local Variables:
# mode: perl
# cperl-indent-level: 4
# tab-width: 4
# indent-tabs-mode: nil
# End:
# vim:set ft=perl shiftwidth=4 softtabstop=4 expandtab: #
llabora/libreoffice-4.0.6.2
For the next patch for tdf#149956 I need the command to be
already set when the VclEventId::ToolboxItemAdded event is emitted.
Change-Id: I3d8ce44b426a3ed5704d4520d6e62bc4efbf8e44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138038
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
This patch modifies the "Standard (Single Mode)" toolbar
to have an optional context-aware section, given that a
corresponding singlemode-<context-name>.xml files exist.
This is a lot like the "Contextual Single" NB, except
that it's implemented with regular toolbars, so docking/
customization/extensions/uno api etc. are all working.
In addition, the "Single Toolbar" mode was modified to
not show any other contextual toolbar. (But of course the
single mode toolbar itself is perfectly usable outside of
this mode.)
Change-Id: Id746d9df59340a81962a8689b132941deea54b6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135591
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
for which we have o3tl:: equivalents
Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
.. and lastIndexOf, which convert to find and rfind
Change-Id: I6c4156cf904774c0d867f85a4c2785dba7593f62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132445
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Multiple ImplToolItem with mnId 1000 are inserted in the same ToolBox
and the problem is that only the first one gets its mpUserData set,
because setting and getting that is based on the assumption that mnId is
unique per container.
So in Destroy() for every item with mnId 1000 the same AddonsParams
object is deleted.
The problem is that in ToolBarManager::FillToolbar() the local nItemId
is copied, so its value never changes when iterating the loop because
only its copy is incremented.
(regression from ac1aefd5174258d9bcb41465ce566ed1a0819f3d)
Change-Id: Ica47051f9447c2b9d1981f8373d754874f0f31b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119228
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(*) fix bug in SfxToolBoxControl::StateChanged where it was using the slot id
instead of the toolbox item id
(*) I left the logic in SbaTableQueryBrowser alone, but it looks suspicious,
casting slot ids to toolbox ids
Change-Id: Ied229164c27fb4456b0515c6fdcbd1682766a1a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112186
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
In practice, it works fine to look at all of them, regardless of actual argument
types.
Change-Id: Ifc49cbcd6003c8837c1b3f81d432c59fb0657bf1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108366
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
which means that some call sites have to change to use
unicode string literals i.e. u"foo" instead of "foo"
Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>