Kaydet (Commit) 3b6b6d91 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

Merge commit 'ooo/OOO330_m6'

......@@ -365,7 +365,7 @@ BOOL ModulWindow::BasicExecute()
break;
}
}
else if ( !pMethod || ( nStart < nCurMethodStart ) )
else if ( !pMethod || ( nStart < nCurMethodStart && !pM->IsHidden() ) )
{
pMethod = pM;
nCurMethodStart = nStart;
......
......@@ -364,13 +364,23 @@ Sequence< ::rtl::OUString > GetMethodNames( const ScriptDocument& rDocument, con
SbModuleRef xModule = new SbModule( rModName );
xModule->SetSource32( aOUSource );
USHORT nCount = xModule->GetMethods()->Count();
aSeqMethods.realloc( nCount );
USHORT nRealCount = nCount;
for ( USHORT i = 0; i < nCount; i++ )
{
SbMethod* pMethod = (SbMethod*)xModule->GetMethods()->Get( i );
if( pMethod->IsHidden() )
--nRealCount;
}
aSeqMethods.realloc( nRealCount );
USHORT iTarget = 0;
for ( USHORT i = 0 ; i < nCount; ++i )
{
SbMethod* pMethod = (SbMethod*)xModule->GetMethods()->Get( i );
if( pMethod->IsHidden() )
continue;
DBG_ASSERT( pMethod, "Method not found! (NULL)" );
aSeqMethods.getArray()[ i ] = pMethod->GetName();
aSeqMethods.getArray()[ iTarget++ ] = pMethod->GetName();
}
}
......@@ -392,7 +402,7 @@ BOOL HasMethod( const ScriptDocument& rDocument, const String& rLibName, const S
if ( pMethods )
{
SbMethod* pMethod = (SbMethod*)pMethods->Find( rMethName, SbxCLASS_METHOD );
if ( pMethod )
if ( pMethod && !pMethod->IsHidden() )
bHasMethod = TRUE;
}
}
......
......@@ -554,11 +554,15 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox )
// Die Macros sollen in der Reihenfolge angezeigt werden,
// wie sie im Modul stehen.
MacroList aMacros;
USHORT nMacros = pModule->GetMethods()->Count();
USHORT nMethod;
for ( nMethod = 0; nMethod < nMacros; nMethod++ )
USHORT nMacroCount = pModule->GetMethods()->Count();
USHORT nRealMacroCount = 0;
USHORT iMeth;
for ( iMeth = 0; iMeth < nMacroCount; iMeth++ )
{
SbMethod* pMethod = (SbMethod*)pModule->GetMethods()->Get( nMethod );
SbMethod* pMethod = (SbMethod*)pModule->GetMethods()->Get( iMeth );
if( pMethod->IsHidden() )
continue;
++nRealMacroCount;
DBG_ASSERT( pMethod, "Methode nicht gefunden! (NULL)" );
ULONG nPos = LIST_APPEND;
// Eventuell weiter vorne ?
......@@ -580,8 +584,8 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox )
}
aMacroBox.SetUpdateMode( FALSE );
for ( nMethod = 0; nMethod < nMacros; nMethod++ )
aMacroBox.InsertEntry( aMacros.GetObject( nMethod )->GetName() );
for ( iMeth = 0; iMeth < nRealMacroCount; iMeth++ )
aMacroBox.InsertEntry( aMacros.GetObject( iMeth )->GetName() );
aMacroBox.SetUpdateMode( TRUE );
if ( aMacroBox.GetEntryCount() )
......
/*************************************************************************
Source Code Control System - Header
$Header: /zpool/svn/migration/cvs_rep_09_09_08/code/extensions/source/plugin/unx/npnapi.cxx,v 1.11 2008-01-14 14:53:25 ihi Exp $
*************************************************************************/
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* 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.
*
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_extensions.hxx"
......
/*************************************************************************
Source Code Control System - Header
$Header: /zpool/svn/migration/cvs_rep_09_09_08/code/extensions/source/plugin/unx/nppapi.cxx,v 1.7 2008-01-14 14:53:38 ihi Exp $
*************************************************************************/
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* 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.
*
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_extensions.hxx"
......
......@@ -75,6 +75,8 @@ public class InstallData
static private boolean databaseQueried = false;
static private boolean useRtl = false;
static private boolean installedProductMinorSet = false;
static private boolean isDebianSystem = false;
static private boolean debianInvestigated = false;
static private String installType; /* custom or typical installation */
static private String osType; /* Linux, SunOS, ... */
static private String installDir = null;
......@@ -649,6 +651,22 @@ public class InstallData
installedProductMinorSet = value;
}
public boolean debianInvestigated() {
return debianInvestigated;
}
public void setDebianInvestigated(boolean value) {
debianInvestigated = value;
}
public boolean isDebianSystem() {
return isDebianSystem;
}
public void setIsDebianSystem(boolean value) {
isDebianSystem = value;
}
public boolean databaseQueried() {
return databaseQueried;
}
......
......@@ -381,6 +381,27 @@ import java.util.Vector;public class LinuxHelper {
return databasePath;
}
public void investigateDebian(InstallData data) {
// String rpmQuery = "rpm --help;
String[] rpmQueryArray = new String[2];
rpmQueryArray[0] = "rpm";
rpmQueryArray[1] = "--help";
Vector returnVector = new Vector();
Vector returnErrorVector = new Vector();
int returnValue = ExecuteProcess.executeProcessReturnVector(rpmQueryArray, returnVector, returnErrorVector);
// Checking if the return vector contains the string "force-debian"
for (int i = 0; i < returnVector.size(); i++) {
String line = (String) returnVector.get(i);
if ( line.indexOf("force-debian") > -1 ) {
data.setIsDebianSystem(true);
}
}
}
public void getLinuxFileInfo(PackageDescription packageData) {
// analyzing a string like "openoffice-core01-2.0.3-159" as "name-version-release"
InstallData data = InstallData.getInstance();
......
......@@ -298,6 +298,69 @@ sub get_sourcepath_from_filename_and_includepath
return \$onefile;
}
##############################################################
# Removing all empty directories below a specified directory
##############################################################
sub remove_empty_dirs_in_folder
{
my ( $dir, $firstrun ) = @_;
if ( $firstrun )
{
print "Removing superfluous directories\n";
}
my @content = ();
$dir =~ s/\Q$separator\E\s*$//;
if ( -d $dir )
{
opendir(DIR, $dir);
@content = readdir(DIR);
closedir(DIR);
my $oneitem;
foreach $oneitem (@content)
{
if ((!($oneitem eq ".")) && (!($oneitem eq "..")))
{
my $item = $dir . $separator . $oneitem;
if ( -d $item ) # recursive
{
remove_empty_dirs_in_folder($item, 0);
}
}
}
# try to remove empty directory
my $returnvalue = rmdir $dir;
# if ( $returnvalue ) { print "Successfully removed empty dir $dir\n"; }
}
}
####################################################
# Detecting the directory with extensions
####################################################
sub get_extensions_dir
{
my ( $unopkgfile ) = @_;
my $localbranddir = $unopkgfile;
get_path_from_fullqualifiedname(\$localbranddir); # "program" dir in brand layer
get_path_from_fullqualifiedname(\$localbranddir); # root dir in brand layer
$localbranddir =~ s/\Q$separator\E\s*$//;
my $extensiondir = $localbranddir . $separator . "share" . $separator . "extensions";
my $preregdir = $localbranddir . $separator . "share" . $separator . "prereg" . $separator . "bundled";
return ($extensiondir, $preregdir);
}
########################################################
# Finding all files with a specified file extension
# in a specified directory.
......@@ -880,7 +943,6 @@ sub copy_files_into_directory_structure
print "Copying files\n";
my $unopkgfile = "";
my @extensions = ();
for ( my $i = 1; $i <= $maxsequence; $i++ )
{
......@@ -923,8 +985,6 @@ sub copy_files_into_directory_structure
if ( ! $copyreturn) { exit_program("ERROR: Could not copy $source to $dest\n"); }
# Collecting all extensions
if ( $destfile =~ /\.oxt\s*$/ ) { push(@extensions, $destfile); }
# Searching unopkg.exe
if ( $destfile =~ /unopkg\.exe\s*$/ ) { $unopkgfile = $destfile; }
# if (( $^O =~ /cygwin/i ) && ( $destfile =~ /\.exe\s*$/ )) { change_privileges($destfile, "775"); }
......@@ -935,7 +995,7 @@ sub copy_files_into_directory_structure
# }
}
return ($unopkgfile, \@extensions);
return ($unopkgfile);
}
######################################################
......@@ -1026,12 +1086,19 @@ sub get_temppath
}
####################################################################################
# Registering one extension
# Registering extensions
####################################################################################
sub register_one_extension
sub register_extensions_sync
{
my ($unopkgfile, $extension, $temppath) = @_;
my ($unopkgfile, $localtemppath, $preregdir) = @_;
if ( $preregdir eq "" )
{
my $logtext = "ERROR: Failed to determine \"prereg\" folder for extension registration! Please check your installation set.";
print $logtext . "\n";
exit_program($logtext);
}
my $from = cwd();
......@@ -1051,22 +1118,17 @@ sub register_one_extension
$path_displayed = 1;
}
$temppath =~ s/\\/\//g;
$temppath = "/".$temppath;
# Converting path of $extension for cygwin
my $localextension = $extension;
if ( $^O =~ /cygwin/i ) {
$localextension = qx{cygpath -w "$extension"};
$localextension =~ s/\\/\\\\/g;
}
$localtemppath =~ s/\\/\//g;
if ( $^O =~ /cygwin/i ) {
$executable = "./" . $executable;
$preregdir = qx{cygpath -m "$preregdir"};
chomp($preregdir);
}
my $systemcall = $executable . " add --shared --verbose --suppress-license " . "\"" . $localextension . "\"" . " -env:UserInstallation=file://" . $temppath . " 2\>\&1 |";
$preregdir =~ s/\/\s*$//g;
my $systemcall = $executable . " sync --verbose -env:BUNDLED_EXTENSIONS_USER=\"file:///" . $preregdir . "\"" . " -env:UserInstallation=file:///" . $localtemppath . " 2\>\&1 |";
print "... $systemcall\n";
......@@ -1094,26 +1156,20 @@ sub register_one_extension
sub register_extensions
{
my ($unopkgfile, $extensions, $temppath) = @_;
my ($unopkgfile, $temppath, $preregdir) = @_;
if ( $#{$extensions} > -1 )
{
print "Registering extensions:\n";
print "Registering extensions:\n";
if (( ! -f $unopkgfile ) || ( $unopkgfile eq "" ))
{
print("WARNING: Could not find unopkg.exe (Language Pack?)!\n");
}
else
{
foreach $extension ( @{$extensions} ) { register_one_extension($unopkgfile, $extension, $temppath); }
remove_complete_directory($temppath, 1)
}
if (( ! -f $unopkgfile ) || ( $unopkgfile eq "" ))
{
print("WARNING: Could not find unopkg.exe (Language Pack?)!\n");
}
else
{
print "No extensions to register.\n";
register_extensions_sync($unopkgfile, $temppath, $preregdir);
remove_complete_directory($temppath, 1);
}
}
####################################################################################
......@@ -1357,7 +1413,7 @@ my ( $filehash, $fileorder, $maxsequence ) = analyze_file_file($filecontent);
my $fullpathhash = create_directory_structure($dirhash, $targetdir);
# Copying files
my ($unopkgfile, $extensions) = copy_files_into_directory_structure($fileorder, $filehash, $componenthash, $fullpathhash, $maxsequence, $unpackdir, $installdir, $dirhash);
my ($unopkgfile) = copy_files_into_directory_structure($fileorder, $filehash, $componenthash, $fullpathhash, $maxsequence, $unpackdir, $installdir, $dirhash);
if ( $^O =~ /cygwin/i ) { change_privileges_full($targetdir); }
my $msidatabase = $targetdir . $separator . $databasefilename;
......@@ -1369,10 +1425,14 @@ $filename = $helperdir . $separator . "CustomAction.idt";
$filecontent = read_file($filename);
my $register_extensions_exists = analyze_customaction_file($filecontent);
# Removing empty dirs in extension folder
my ( $extensionfolder, $preregdir ) = get_extensions_dir($unopkgfile);
if ( -d $extensionfolder ) { remove_empty_dirs_in_folder($extensionfolder, 1); }
if ( $register_extensions_exists )
{
# Registering extensions
register_extensions($unopkgfile, $extensions, $temppath);
register_extensions($unopkgfile, $temppath, $preregdir);
}
# Saving info in Summary Information Stream of msi database (required for following patches)
......
......@@ -121,6 +121,14 @@ then
exit 2
fi
# #163256# check if we are on a debian system...
if rpm --help | grep debian >/dev/null;
then
DEBIAN_FLAGS="--force-debian --nodeps"
else
DEBIAN_FLAGS=
fi
#
# Determine whether this should be an update or a fresh install
#
......@@ -227,7 +235,7 @@ FAKEDBRPM=/tmp/fake-db-1.0-$$.noarch.rpm
linenum=???
tail -n +$linenum $0 > $FAKEDBRPM
rpm --upgrade --ignoresize --dbpath $RPM_DB_PATH $FAKEDBRPM
rpm ${DEBIAN_FLAGS} --upgrade --ignoresize --dbpath $RPM_DB_PATH $FAKEDBRPM
rm -f $FAKEDBRPM
......@@ -253,7 +261,7 @@ echo "Installing the RPMs"
ABSROOT=`cd ${INSTALLDIR}; pwd`
RELOCATIONS=`rpm -qp --qf "--relocate %{PREFIXES}=${ABSROOT}%{PREFIXES} \n" $RPMLIST | sort -u | tr -d "\012"`
UserInstallation=\$BRAND_BASE_DIR/../UserInstallation rpm $RPMCMD --ignoresize -vh $RELOCATIONS --dbpath $RPM_DB_PATH $RPMLIST
UserInstallation=\$BRAND_BASE_DIR/../UserInstallation rpm ${DEBIAN_FLAGS} $RPMCMD --ignoresize -vh $RELOCATIONS --dbpath $RPM_DB_PATH $RPMLIST
#
# Create a link into the users home directory
......@@ -268,11 +276,11 @@ if [ "$UPDATE" = "yes" -a ! -f $INSTALLDIR/program/bootstraprc ]
then
echo
echo "Update failed due to a bug in RPM, uninstalling .."
rpm --erase -v --nodeps --dbpath $RPM_DB_PATH `rpm --query --queryformat "%{NAME} " --package $RPMLIST --dbpath $RPM_DB_PATH`
rpm ${DEBIAN_FLAGS} --erase -v --nodeps --dbpath $RPM_DB_PATH `rpm --query --queryformat "%{NAME} " --package $RPMLIST --dbpath $RPM_DB_PATH`
echo
echo "Now re-installing new packages .."
echo
rpm --install --nodeps --ignoresize -vh $RELOCATIONS --dbpath $RPM_DB_PATH $RPMLIST
rpm ${DEBIAN_FLAGS} --install --nodeps --ignoresize -vh $RELOCATIONS --dbpath $RPM_DB_PATH $RPMLIST
echo
fi
......
DO NOT DELETE THIS FILE
\ No newline at end of file
......@@ -44,6 +44,7 @@ sr = "sr,en-US"
sh = "sr,en-US"
sw = "sw,en-US"
th = "th,en-US"
uk = "ru,en-US"
vi = "vi,en-US,fr"
zh-TW = "EMPTY,en-US"
zh-CN = "EMPTY,en-US"
......
......@@ -2,3 +2,5 @@ SetProductInstallationPath
RegisterLanguagePack
GetUserInstallMode
IsOfficeRunning
RegisterExtensions
......@@ -77,6 +77,7 @@ STDSHL+= \
#SHL1LIBS = $(SLB)$/$(TARGET).lib
SHL1OBJS = $(SLOFILES) \
$(SLO)$/registerextensions.obj \
$(SLO)$/seterror.obj
SHL1TARGET = $(TARGET)
......
......@@ -7,3 +7,5 @@ IsOfficeRunning
SetFeatureState
SetNewFeatureState
ShowOnlineUpdateDialog
RegisterExtensions
RemoveExtensions
......@@ -76,6 +76,7 @@ SHL1OBJS = $(SLOFILES) \
$(SLO)$/shutdown_quickstart.obj \
$(SLO)$/quickstarter.obj \
$(SLO)$/upgrade.obj \
$(SLO)$/registerextensions.obj \
$(SLO)$/seterror.obj
SHL1TARGET = $(TARGET)
......
......@@ -7,6 +7,8 @@ RebuildShellIconCache
ExecutePostUninstallScript
CompleteInstallPath
MigrateInstallPath
RegisterExtensions
RemoveExtensions
CheckInstallDirectory
SetAdminInstallProperty
CreateLayerLinks
......
......@@ -63,6 +63,7 @@ SLOFILES = \
$(SLO)$/setadmininstall.obj \
$(SLO)$/layerlinks.obj \
$(SLO)$/dotnetcheck.obj \
$(SLO)$/registerextensions.obj \
$(SLO)$/copyeditiondata.obj \
$(SLO)$/vistaspecial.obj \
$(SLO)$/checkrunningoffice.obj \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment