svx/source/gengal/gengal.cxx | 157 ++++++++++++++++------------------------- svx/source/gengal/gengal.sh | 150 ++++++++++++++++++--------------------- tools/source/stream/stream.cxx | 2 3 files changed, 136 insertions(+), 173 deletions(-)
New commits: commit 164027e48899faaee284242eaca04b8aa5545319 Author: Michael Meeks <michael.me...@suse.com> Date: Fri Apr 5 16:39:24 2013 +0100 gengal: re-base on original tool. new wrapper based on unopkg.sh. work re-based on original SUSE implementation. Change-Id: I90e48476b7edb6be0b8f9e63b328f4b85658ac1c diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx new file mode 100644 index 0000000..5bbfeab --- /dev/null +++ b/svx/source/gengal/gengal.cxx @@ -0,0 +1,236 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include <stdio.h> +#include <unistd.h> + +#include <list> + +#include <unotools/streamwrap.hxx> +#include <unotools/ucbstreamhelper.hxx> + +#include <comphelper/processfactory.hxx> +#include <cppuhelper/bootstrap.hxx> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/lang/XInitialization.hpp> +#include <com/sun/star/registry/XSimpleRegistry.hpp> +#include <com/sun/star/ucb/UniversalContentBroker.hpp> + +#include <tools/urlobj.hxx> +#include <vcl/vclmain.hxx> + +#include <osl/file.hxx> +#include <osl/process.h> +#include <rtl/bootstrap.hxx> +#include <vcl/svapp.hxx> + +#include <svx/galtheme.hxx> +#include <svx/gallery1.hxx> + +using namespace ::com::sun::star; + +typedef ::std::list<OUString> FileNameList; + +class GalApp : public Application +{ +public: + virtual int Main(); + +protected: + uno::Reference<lang::XMultiServiceFactory> xMSF; + void Init(); +}; + +Gallery* createGallery( const OUString& rURL ) +{ + return new Gallery( rURL ); +} + +void disposeGallery( Gallery* pGallery ) +{ + delete pGallery; +} + +static void createTheme( OUString aThemeName, OUString aGalleryURL, + OUString aDestDir, sal_uInt32 nNumFrom, + FileNameList &rFiles ) +{ + Gallery* pGallery; + + pGallery = createGallery( aGalleryURL ); + if (!pGallery ) { + fprintf( stderr, "Could't create '%s'\n", + OUStringToOString( aGalleryURL, RTL_TEXTENCODING_UTF8 ).getStr() ); + exit( 1 ); + } + fprintf( stderr, "Work on gallery '%s'\n", + OUStringToOString( aGalleryURL, RTL_TEXTENCODING_UTF8 ).getStr() ); + + fprintf( stderr, "Existing themes: %d\n", + pGallery->GetThemeCount() ); + + GalleryTheme *pGalTheme; + if( !pGallery->HasTheme( aThemeName) ) { + if( !pGallery->CreateTheme( aThemeName, nNumFrom ) ) { + fprintf( stderr, "Failed to create theme\n" ); + exit( 1 ); + } + } + + fprintf( stderr, "Existing themes: %d\n", + pGallery->GetThemeCount() ); + + SfxListener aListener; + + if ( !( pGalTheme = pGallery->AcquireTheme( aThemeName, aListener ) ) ) { + fprintf( stderr, "Failed to acquire theme\n" ); + exit( 1 ); + } + + fprintf( stderr, "Using DestDir: %s\n", + OUStringToOString( aDestDir, RTL_TEXTENCODING_UTF8 ).getStr() ); + pGalTheme->SetDestDir(String(aDestDir)); + + FileNameList::const_iterator aIter; + + for( aIter = rFiles.begin(); aIter != rFiles.end(); ++aIter ) + { +// Should/could use: +// if ( ! pGalTheme->InsertFileOrDirURL( aURL ) ) { +// Requires a load more components ... + + Graphic aGraphic; + + if ( ! pGalTheme->InsertURL( *aIter ) ) + fprintf( stderr, "Failed to import '%s'\n", + OUStringToOString( *aIter, RTL_TEXTENCODING_UTF8 ).getStr() ); + else + fprintf( stderr, "Imported file '%s' (%d)\n", + OUStringToOString( *aIter, RTL_TEXTENCODING_UTF8 ).getStr(), + pGalTheme->GetObjectCount() ); + } + + pGallery->ReleaseTheme( pGalTheme, aListener ); + + disposeGallery( pGallery ); +} + +static int PrintHelp() +{ + fprintf( stdout, "Utility to generate LibreOffice gallery files\n\n" ); + + fprintf( stdout, "using: gengal --name <name> --path <dir> [ --destdir <path> ]\n"); + fprintf( stdout, " [ --number-from <num> ] [ files ... ]\n\n" ); + + fprintf( stdout, "options:\n"); + fprintf( stdout, " --name <theme>\t\tdefines the user visible name of the created or updated theme.\n"); + fprintf( stdout, " --path <dir>\t\tdefines directory where the gallery files are created\n"); + fprintf( stdout, "\t\t\tor updated.\n"); + fprintf( stdout, " --destdir <dir>\tdefines a path prefix to be removed from the paths\n"); + fprintf( stdout, "\t\t\tstored in the gallery files. It is useful to create\n"); + fprintf( stdout, "\t\t\tRPM packages using the BuildRoot feature.\n"); + fprintf( stdout, " --number-from <num>\tdefines minimal number for the newly created gallery\n"); + fprintf( stdout, "\t\t\ttheme files.\n"); + fprintf( stdout, " files\t\t\tlists files to be added to the gallery. Absolute paths\n"); + fprintf( stdout, "\t\t\tare required.\n"); + + return EXIT_SUCCESS; +} + +static OUString Smartify( const OUString &rPath ) +{ + INetURLObject aURL; + aURL.SetSmartURL( rPath ); + return aURL.GetMainURL( INetURLObject::NO_DECODE ); +} + +void GalApp::Init() +{ + if( getenv( "OOO_INSTALL_PREFIX" ) == NULL ) { + OUString fileName = GetAppFileName(); + int lastSlash = fileName.lastIndexOf( '/' ); +#ifdef WNT + // Don't know which directory separators GetAppFileName() returns on Windows. + // Be safe and take into consideration they might be backslashes. + if( fileName.lastIndexOf( '\\' ) > lastSlash ) + lastSlash = fileName.lastIndexOf( '\\' ); +#endif + OUString baseBinDir = fileName.copy( 0, lastSlash ); + OUString installPrefix = baseBinDir + OUString::createFromAscii( "/../.." ); + OUString assignment = OUString( "OOO_INSTALL_PREFIX=" ) + installPrefix; + + OUString envVar( "OOO_INSTALL_PREFIX"); + osl_setEnvironment(envVar.pData, installPrefix.pData); + } + OSL_TRACE( "OOO_INSTALL_PREFIX=%s", getenv( "OOO_INSTALL_PREFIX" ) ); + + uno::Reference<uno::XComponentContext> xComponentContext + = ::cppu::defaultBootstrap_InitialComponentContext(); + xMSF = uno::Reference<lang::XMultiServiceFactory> + ( xComponentContext->getServiceManager(), uno::UNO_QUERY ); + if( !xMSF.is() ) + { + fprintf( stderr, "Failed to bootstrap\n" ); + exit( 1 ); + } + ::comphelper::setProcessServiceFactory( xMSF ); + + // For backwards compatibility, in case some code still uses plain + // createInstance w/o args directly to obtain an instance: + com::sun::star::ucb::UniversalContentBroker::create(xComponentContext); +} + +int GalApp::Main() +{ + OUString aPath, aDestDir; + OUString aName( "Default name" ); + sal_uInt32 nNumFrom = 0; + FileNameList aFiles; + + for( sal_uInt32 i = 0; i < GetCommandLineParamCount(); i++ ) + { + OUString aParam = GetCommandLineParam( i ); + + if ( aParam.startsWith( "-env:" ) ) + continue; + else if ( aParam == "--help" || aParam == "-h" ) + return PrintHelp(); + else if ( aParam == "--name" ) + aName = GetCommandLineParam( ++i ); + else if ( aParam == "--path" ) + aPath = Smartify( GetCommandLineParam( ++i ) ); + else if ( aParam == "--destdir" ) + aDestDir = GetCommandLineParam( ++i ); + else if ( aParam == "--number-from" ) + nNumFrom = GetCommandLineParam( ++i ).ToInt32(); + else + aFiles.push_back( Smartify( aParam ) ); + } + + if( aFiles.size() < 1 ) + return PrintHelp(); + + createTheme( aName, aPath, aDestDir, nNumFrom, aFiles ); + + // Without this we get extraordinary crashes from the + // drawinglayer VirtualDevice cache when importing svg + uno::Reference< lang::XComponent >( + comphelper::getProcessComponentContext(), + uno::UNO_QUERY_THROW )-> dispose(); + ::comphelper::setProcessServiceFactory( NULL ); + + return EXIT_SUCCESS; +} + +void vclmain::createApplication() +{ + static GalApp aGalApp; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/gengal/gengal.sh b/svx/source/gengal/gengal.sh new file mode 100644 index 0000000..0ac61cf --- /dev/null +++ b/svx/source/gengal/gengal.sh @@ -0,0 +1,97 @@ +#!/bin/sh +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# This file incorporates work covered by the following license notice: +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed +# with this work for additional information regarding copyright +# ownership. The ASF licenses this file to you under the Apache +# License, Version 2.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.apache.org/licenses/LICENSE-2.0 . +# + +# enable file locking +SAL_ENABLE_FILE_LOCKING=1 +export SAL_ENABLE_FILE_LOCKING + +# resolve installation directory +sd_cwd=`pwd` +sd_res=$0 +while [ -h "$sd_res" ] ; do + cd "`dirname "$sd_res"`" + sd_basename=`basename "$sd_res"` + sd_res=`ls -l "$sd_basename" | sed "s/.*$sd_basename -> //g"` +done +cd "`dirname "$sd_res"`" +sd_prog=`pwd` +cd "$sd_cwd" + +# this is a temporary hack until we can live with the default search paths +case "`uname -s`" in +NetBSD|OpenBSD|FreeBSD|DragonFly) + sd_prog1="$sd_prog" + sd_prog2="$sd_prog/../ure-link/lib" + LD_LIBRARY_PATH=$sd_prog1:$sd_prog2${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} + JAVA_HOME=$(javaPathHelper -h libreoffice-java 2> /dev/null) + export LD_LIBRARY_PATH + if [ -n "${JAVA_HOME}" ]; then + export JAVA_HOME + fi + ;; +AIX) + sd_prog1="$sd_prog" + sd_prog2="$sd_prog/../ure-link/lib" + LIBPATH=$sd_prog1:$sd_prog2${LIBPATH:+:${LIBPATH}} + export LIBPATH + ;; +esac + +#collect all bootstrap variables specified on the command line +#so that they can be passed as arguments to javaldx later on +for arg in $@ +do + case "$arg" in + -env:*) BOOTSTRAPVARS=$BOOTSTRAPVARS" ""$arg";; + -v) VERBOSE=true;; + --verbose) VERBOSE=true;; + esac +done + +# extend the ld_library_path for java: javaldx checks the sofficerc for us +if [ -x "$sd_prog/../ure-link/bin/javaldx" ] ; then + my_path=`"$sd_prog/../ure-link/bin/javaldx" $BOOTSTRAPVARS \ + "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"` + if [ -n "$my_path" ] ; then + sd_platform=`uname -s` + case $sd_platform in + AIX) + LIBPATH=$my_path${LIBPATH:+:$LIBPATH} + export LIBPATH + ;; + *) + LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} + export LD_LIBRARY_PATH + ;; + esac + fi +fi + +unset XENVIRONMENT + +# uncomment line below to disable anti aliasing of fonts +# SAL_ANTIALIAS_DISABLE=true; export SAL_ANTIALIAS_DISABLE + +# uncomment line below if you encounter problems starting soffice on your system +# SAL_NO_XINITTHREADS=true; export SAL_NO_XINITTHREADS + +# execute binary +exec "$sd_prog/gengal.bin" "$@" \ + "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc" + commit 153c9de417768846cf1ab6873c52e2d4643ae6cf Author: Michael Meeks <michael.me...@suse.com> Date: Mon Apr 8 09:50:25 2013 +0100 remove OOo gengal. Change-Id: I04697bd7b50361bcb72daf7032047f6e0c07a772 diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx deleted file mode 100644 index b853801..0000000 --- a/svx/source/gengal/gengal.cxx +++ /dev/null @@ -1,267 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * 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. - * - ************************************************************************/ - - -#include <stdio.h> -#include <unistd.h> -#include <memory> -#include <list> - -#include <unotools/streamwrap.hxx> -#include <unotools/ucbstreamhelper.hxx> - -#include <comphelper/processfactory.hxx> -#include <cppuhelper/bootstrap.hxx> -#include <com/sun/star/uno/Reference.h> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/lang/XInitialization.hpp> -#include <com/sun/star/registry/XSimpleRegistry.hpp> -#include <com/sun/star/ucb/UniversalContentBroker.hpp> - -#include <tools/urlobj.hxx> - -#include <vcl/vclmain.hxx> -#include <vcl/window.hxx> -#include <vcl/svapp.hxx> -#include <vcl/font.hxx> -#include <vcl/print.hxx> -#include <vcl/toolbox.hxx> -#include <vcl/help.hxx> -#include <vcl/scrbar.hxx> -#include <vcl/wrkwin.hxx> -#include <vcl/msgbox.hxx> - -#include <osl/file.hxx> -#include <osl/process.h> -#include <rtl/bootstrap.hxx> - -#include <svx/galtheme.hxx> -#include <svx/gallery1.hxx> - -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::registry; -using namespace ::com::sun::star::lang; - -typedef ::std::list<OUString> FileNameList; - -class GalApp : public Application -{ -public: - virtual int Main(); - -protected: - Reference<XMultiServiceFactory> xMSF; - void Init(); -}; - -Gallery* createGallery( const OUString& aGalleryURL ) -{ - return new Gallery( aGalleryURL ); -} - -void disposeGallery( Gallery* pGallery ) -{ - delete pGallery; -} - -static void createTheme( OUString aThemeName, - OUString aGalleryURL, - OUString aDestDir, - sal_uInt32 nNumFrom, - FileNameList &rFiles ) -{ - Gallery * pGallery( createGallery( aGalleryURL ) ); - - if (!pGallery ) { - fprintf( stderr, "Could't acquire '%s'\n", - OUStringToOString(aGalleryURL, RTL_TEXTENCODING_UTF8).getStr() ); - exit( 1 ); - } - fprintf( stderr, "Work on gallery '%s'\n", - OUStringToOString(aGalleryURL, RTL_TEXTENCODING_UTF8).getStr() ); - - fprintf( stderr, "Existing themes: %lu\n", - sal::static_int_cast< unsigned long >( - pGallery->GetThemeCount() ) ); - - if( !pGallery->HasTheme( aThemeName) ) { - if( !pGallery->CreateTheme( aThemeName, nNumFrom ) ) { - fprintf( stderr, "Failed to create theme\n" ); - disposeGallery( pGallery ); - exit( 1 ); - } - } - - fprintf( stderr, "Existing themes: %lu\n", - sal::static_int_cast< unsigned long >( - pGallery->GetThemeCount() ) ); - - SfxListener aListener; - - GalleryTheme *pGalTheme = pGallery->AcquireTheme( aThemeName, aListener ); - if ( pGalTheme == NULL ) { - fprintf( stderr, "Failed to acquire theme\n" ); - disposeGallery( pGallery ); - exit( 1 ); - } - - fprintf( stderr, "Using DestDir: %s\n", - OUStringToOString(aDestDir, RTL_TEXTENCODING_UTF8).getStr() ); - pGalTheme->SetDestDir(String(aDestDir)); - - FileNameList::const_iterator aIter; - - for( aIter = rFiles.begin(); aIter != rFiles.end(); ++aIter ) - { -// Should/could use: -// if ( ! pGalTheme->InsertFileOrDirURL( aURL ) ) { -// Requires a load more components ... - - Graphic aGraphic; - - if ( ! pGalTheme->InsertURL( *aIter ) ) - fprintf( stderr, "Failed to import '%s'\n", - OUStringToOString(*aIter, RTL_TEXTENCODING_UTF8).getStr() ); - else - fprintf( stderr, "Imported file '%s' (%lu)\n", - OUStringToOString(*aIter, RTL_TEXTENCODING_UTF8).getStr(), - sal::static_int_cast< unsigned long >( - pGalTheme->GetObjectCount() ) ); - } - - pGallery->ReleaseTheme( pGalTheme, aListener ); - disposeGallery( pGallery ); -} - -static void PrintHelp() -{ - fprintf( stdout, "Utility to generate OO.o gallery files\n\n" ); - - fprintf( stdout, "using: gengal --name <name> --path <dir> [ --destdir <path> ]\n"); - fprintf( stdout, " [ --number-from <num> ] [ files ... ]\n\n" ); - - fprintf( stdout, "options:\n"); - fprintf( stdout, " --name <theme>\t\tdefines a name of the created or updated theme.\n"); - fprintf( stdout, " --path <dir>\t\tdefines directory where the gallery files are created\n"); - fprintf( stdout, "\t\t\tor updated.\n"); - fprintf( stdout, " --destdir <dir>\tdefines a path prefix to be removed from the paths\n"); - fprintf( stdout, "\t\t\tstored in the gallery files. It is useful to create\n"); - fprintf( stdout, "\t\t\tRPM packages using the BuildRoot feature.\n"); - fprintf( stdout, " --number-from <num>\tdefines minimal number for the newly created gallery\n"); - fprintf( stdout, "\t\t\ttheme files.\n"); - fprintf( stdout, " files\t\t\tlists files to be added to the gallery. Absolute paths\n"); - fprintf( stdout, "\t\t\tare required.\n"); -} - -static OUString Smartify( const OUString &rPath ) -{ - INetURLObject aURL; - aURL.SetSmartURL( rPath ); - return aURL.GetMainURL( INetURLObject::NO_DECODE ); -} - -void GalApp::Init() -{ - if( getenv( "OOO_INSTALL_PREFIX" ) == NULL ) { - OUString fileName = GetAppFileName(); - int lastSlash = fileName.lastIndexOf( '/' ); -#ifdef WNT - // Don't know which directory separators GetAppFileName() returns on Windows. - // Be safe and take into consideration they might be backslashes. - if( fileName.lastIndexOf( '\\' ) > lastSlash ) - lastSlash = fileName.lastIndexOf( '\\' ); -#endif - OUString baseBinDir = fileName.copy( 0, lastSlash ); - OUString installPrefix = baseBinDir + OUString("/../.."); - - OUString envVar("OOO_INSTALL_PREFIX"); - osl_setEnvironment(envVar.pData, installPrefix.pData); - } - OSL_TRACE( "OOO_INSTALL_PREFIX=%s", getenv( "OOO_INSTALL_PREFIX" ) ); - - Reference<XComponentContext> xComponentContext - = ::cppu::defaultBootstrap_InitialComponentContext(); - xMSF = Reference<XMultiServiceFactory> - ( xComponentContext->getServiceManager(), UNO_QUERY ); - if( !xMSF.is() ) - fprintf( stderr, "Failed to bootstrap\n" ); - ::comphelper::setProcessServiceFactory( xMSF ); - - // For backwards compatibility, in case some code still uses plain - // createInstance w/o args directly to obtain an instance: - com::sun::star::ucb::UniversalContentBroker::create(xComponentContext); -} - -int GalApp::Main() -{ - bool bHelp = false; - OUString aPath, aDestDir; - OUString aName("Default name"); - sal_uInt32 nNumFrom = 0; - FileNameList aFiles; - - for( sal_uInt16 i = 0; i < GetCommandLineParamCount(); i++ ) - { - OUString aParam = GetCommandLineParam( i ); - - if( aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "--help" ) ) || - aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-h" ) ) ) - bHelp = true; - - else if ( aParam == "--name" ) - aName = GetCommandLineParam( ++i ); - - else if ( aParam == "--path" ) - aPath = Smartify( GetCommandLineParam( ++i ) ); - - else if ( aParam == "--destdir" ) - aDestDir = GetCommandLineParam( ++i ); - - else if ( aParam == "--number-from" ) - nNumFrom = GetCommandLineParam( ++i ).ToInt32(); - - else - aFiles.push_back( Smartify( aParam ) ); - } - - if( bHelp ) - { - PrintHelp(); - return EXIT_SUCCESS; - } - - createTheme( aName, aPath, aDestDir, nNumFrom, aFiles ); - return EXIT_SUCCESS; -} - -void vclmain::createApplication() -{ - static GalApp aGalApp; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/gengal/gengal.sh b/svx/source/gengal/gengal.sh deleted file mode 100644 index 5173fb4..0000000 --- a/svx/source/gengal/gengal.sh +++ /dev/null @@ -1,103 +0,0 @@ -#!/bin/sh -#************************************************************************* -# -# 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. -# -#************************************************************************* - -# enable file locking -SAL_ENABLE_FILE_LOCKING=1 -export SAL_ENABLE_FILE_LOCKING - -# resolve installation directory -sd_cwd="`pwd`" -if [ -h "$0" ] ; then - sd_basename=`basename "$0"` - sd_script=`ls -l "$0" | sed "s/.*${sd_basename} -> //g"` - cd "`dirname "$0"`" - cd "`dirname "$sd_script"`" -else - cd "`dirname "$0"`" -fi - -sd_prog="`pwd`" - -cd .. -sd_binary=`basename "$0"`".bin" -sd_inst="`pwd`" - -# change back directory -cd "$sd_cwd" - -# check if all required patches are installed -if [ -x "$sd_prog/sopatchlevel.sh" ]; then - "$sd_prog/sopatchlevel.sh" - if [ $? -eq 1 ]; then - exit 0 - fi -fi - -# set search path for shared libraries -sd_platform=`uname -s` -sd_prog1="$sd_prog/../basis-link/program" -sd_prog2="$sd_prog/../basis-link/ure-link/lib" -case $sd_platform in - AIX) - LIBPATH=${sd_prog1}:${sd_prog2}${LIBPATH+:${LIBPATH}} - export LIBPATH - ;; - - Darwin) - DYLD_LIBRARY_PATH=${sd_prog1}:${sd_prog2}${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} - export DYLD_LIBRARY_PATH - ;; - - HP-UX) - SHLIB_PATH=${sd_prog1}:${sd_prog2}:/usr/openwin/lib${SHLIB_PATH:+:${SHLIB_PATH}} - export SHLIB_PATH - ;; - - *) - LD_LIBRARY_PATH=${sd_prog1}:${sd_prog2}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} - export LD_LIBRARY_PATH - ;; -esac - -# misc. environment variables -unset XENVIRONMENT - -# set path so that other apps can be started just by name -PATH="$sd_prog":$PATH -export PATH - -OOO_INSTALL_PREFIX=${OOO_INSTALL_PREFIX-$sd_prog/../..} -if ! test -e $OOO_INSTALL_PREFIX/basis-link; then - # Hack for vanilla OOo binaries' split install layout - OOO_INSTALL_PREFIX=$OOO_INSTALL_PREFIX/../openoffice.org3 -fi - -export OOO_INSTALL_PREFIX - -# execute binary -exec "$sd_prog/$sd_binary" "$@" commit 5aecdfaed2f12e7386da7348f1b3a16a2f4e7b5d Author: Michael Meeks <michael.me...@suse.com> Date: Fri Apr 5 10:38:09 2013 +0100 make internal method static. Change-Id: Id2b5bd1772009785b4aa44bf4de91e5c1b372c9e diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index 18ff853..6d58253 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -1570,7 +1570,7 @@ sal_Bool SvStream::EncryptBuffer(void* pStart, sal_Size nLen) return sal_True; } -unsigned char implGetCryptMask(const sal_Char* pStr, sal_Int32 nLen, long nVersion) +static unsigned char implGetCryptMask(const sal_Char* pStr, sal_Int32 nLen, long nVersion) { unsigned char nCryptMask = 0; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits