Makefile | 7 Repository.mk | 3 desktop/Library_deploymentmisc.mk | 1 desktop/Library_sofficeapp.mk | 6 desktop/Library_unopkgapp.mk | 1 desktop/source/app/lockfile.cxx | 227 --------------------------- desktop/source/app/lockfile.hxx | 97 ----------- desktop/source/deployment/inc/lockfile.hxx | 99 +++++++++++ desktop/source/deployment/misc/lockfile.cxx | 227 +++++++++++++++++++++++++++ desktop/source/pkgchk/unopkg/unopkg_misc.cxx | 2 extensions/Executable_nsplugin.mk | 5 extensions/Executable_pluginapp.bin.mk | 6 extensions/Library_npsoplugin.mk | 2 extensions/Library_pl.mk | 6 extensions/Module_extensions.mk | 2 extensions/StaticLibrary_npsoenv.mk | 34 ++++ extensions/StaticLibrary_plugcon.mk | 75 ++++++++ sax/Library_expwrap.mk | 2 sax/Library_fastsax.mk | 9 - sax/Library_sax.mk | 1 sax/inc/xml2utf.hxx | 11 - sax/source/expatwrap/xml2utf.cxx | 8 sdext/CppunitTest_pdfimport.mk | 5 sdext/Executable_pdf2xml.mk | 23 -- sdext/Executable_pdfunzip.mk | 23 -- sdext/Library_pdfimport.mk | 29 --- sdext/Module_sdext.mk | 1 sdext/StaticLibrary_pdfimport_s.mk | 76 +++++++++ smoketest/CppunitTest_smoketest.mk | 5 vcl/Library_vcl.mk | 4 30 files changed, 561 insertions(+), 436 deletions(-)
New commits: commit b7c79fc2efddc38bea2a459d146c2f80300eb34e Author: Michael Stahl <mst...@redhat.com> Date: Mon Mar 12 18:26:00 2012 +0100 sax: replace Min/Max macros with std::max diff --git a/sax/inc/xml2utf.hxx b/sax/inc/xml2utf.hxx index 2421442..b22b96a 100644 --- a/sax/inc/xml2utf.hxx +++ b/sax/inc/xml2utf.hxx @@ -29,10 +29,6 @@ #include <sax/dllapi.h> -// TODO: Woher? -#define Max( a, b ) (((a)>(b)) ? (a) : (b) ) -#define Min( a, b ) (((a)<(b)) ? (a) : (b) ) - /* * * Text2UnicodeConverter diff --git a/sax/source/expatwrap/xml2utf.cxx b/sax/source/expatwrap/xml2utf.cxx index edebc8a..b49d3dc 100644 --- a/sax/source/expatwrap/xml2utf.cxx +++ b/sax/source/expatwrap/xml2utf.cxx @@ -27,12 +27,13 @@ ************************************************************************/ #include <string.h> +#include <algorithm> + #include <sal/types.h> #include <rtl/textenc.h> #include <rtl/tencinfo.h> - #include <com/sun/star/io/XInputStream.hpp> using namespace ::com::sun::star::uno; @@ -54,8 +55,9 @@ sal_Int32 XMLFile2UTFConverter::readAndConvert( Sequence<sal_Int8> &seq , sal_In throw NotConnectedException(); } if( ! m_bStarted ) { - nMaxToRead = Max( 512 , nMaxToRead ); // it should be possible to find the encoding attribute - // within the first 512 bytes == 128 chars in UCS-4 + // it should be possible to find the encoding attribute + // within the first 512 bytes == 128 chars in UCS-4 + nMaxToRead = ::std::max( 512 , nMaxToRead ); } sal_Int32 nRead; commit 7191b52c00b1affbf44c7bf6d4cd43d21ae5e3ce Author: Michael Stahl <mst...@redhat.com> Date: Mon Mar 12 18:06:28 2012 +0100 Makefile: subsequentcheck should only run tests ... so drop the dependency on dev-install (with it, subsequentcheck is just a synonym for check, which does not seem useful). diff --git a/Makefile b/Makefile index 4af3892..c9ff3b8 100644 --- a/Makefile +++ b/Makefile @@ -486,9 +486,9 @@ findunusedcode: | grep -v ^WPS \ > unusedcode.easy -check: subsequentcheck +check: dev-install subsequentcheck -subsequentcheck: dev-install +subsequentcheck :| $(if $(filter-out subsequentcheck,$(MAKECMDGOALS)),dev-install) $(GNUMAKE) -j $(GMAKE_PARALLELISM) $(GMAKE_OPTIONS) -f Makefile.post $@ debugrun: commit 5f86eca62fc53fbd9de2a6d74188116722bd9d62 Author: Michael Stahl <mst...@redhat.com> Date: Mon Mar 12 17:55:32 2012 +0100 Makefile: add $(module).subsequentcheck targets diff --git a/Makefile b/Makefile index f43fa3c..4af3892 100644 --- a/Makefile +++ b/Makefile @@ -254,6 +254,9 @@ $(1).all: bootstrap fetch $(1).clean: cd $(1) && $(GNUMAKE) -j $(GMAKE_PARALLELISM) $(GMAKE_OPTIONS) clean gb_PARTIALBUILD=T +$(1).subsequentcheck: + cd $(1) && $(GNUMAKE) -j $(GMAKE_PARALLELISM) $(GMAKE_OPTIONS) subsequentcheck gb_PARTIALBUILD=T + $(1).deliver: @true commit 9365c975f8d2423c238961c0771ddeeae687f4cf Author: Michael Stahl <mst...@redhat.com> Date: Mon Mar 12 18:16:54 2012 +0100 sax: move xml2utf.cxx to libsax to prevent duplicate linkage warnings diff --git a/sax/Library_expwrap.mk b/sax/Library_expwrap.mk index 0e35acd..f1104cb 100644 --- a/sax/Library_expwrap.mk +++ b/sax/Library_expwrap.mk @@ -44,6 +44,7 @@ $(eval $(call gb_Library_add_linked_libs,expwrap,\ cppu \ cppuhelper \ sal \ + sax \ $(gb_STDLIBS) \ )) @@ -53,7 +54,6 @@ $(eval $(call gb_Library_add_exception_objects,expwrap,\ sax/source/expatwrap/attrlistimpl \ sax/source/expatwrap/sax_expat \ sax/source/expatwrap/saxwriter \ - sax/source/expatwrap/xml2utf \ )) # vim: set noet sw=4 ts=4: diff --git a/sax/Library_fastsax.mk b/sax/Library_fastsax.mk index 58886d6..b3557bd 100644 --- a/sax/Library_fastsax.mk +++ b/sax/Library_fastsax.mk @@ -52,18 +52,9 @@ $(eval $(call gb_Library_use_external,fastsax,zlib)) $(eval $(call gb_Library_use_external,fastsax,expat_utf8)) -# re-uses xml2utf object from sax.uno lib (see below) $(eval $(call gb_Library_add_exception_objects,fastsax,\ sax/source/fastparser/facreg \ sax/source/fastparser/fastparser \ - sax/source/expatwrap/xml2utf \ )) -# mba: currently it's unclear whether xml2utf needs to be compiled with the -# same compiler settings as in the sax.uno lib; in case not, we have to use -# a custom target -#$(eval $(call gb_Library_add_generated_exception_objects,fastsax,\ -# sax/source/expatwrap/xml2utf \ -#)) - # vim: set noet sw=4 ts=4: diff --git a/sax/Library_sax.mk b/sax/Library_sax.mk index c2f5f9f..a7c9fdc 100644 --- a/sax/Library_sax.mk +++ b/sax/Library_sax.mk @@ -59,6 +59,7 @@ $(eval $(call gb_Library_add_exception_objects,sax,\ sax/source/tools/fastattribs \ sax/source/tools/fastserializer \ sax/source/tools/fshelper \ + sax/source/expatwrap/xml2utf \ )) # vim: set noet sw=4 ts=4: diff --git a/sax/inc/xml2utf.hxx b/sax/inc/xml2utf.hxx index 175894a..2421442 100644 --- a/sax/inc/xml2utf.hxx +++ b/sax/inc/xml2utf.hxx @@ -26,6 +26,9 @@ * ************************************************************************/ +#include <sax/dllapi.h> + + // TODO: Woher? #define Max( a, b ) (((a)>(b)) ? (a) : (b) ) #define Min( a, b ) (((a)<(b)) ? (a) : (b) ) @@ -37,7 +40,7 @@ **/ namespace sax_expatwrap { -class Text2UnicodeConverter +class SAX_DLLPUBLIC Text2UnicodeConverter { public: @@ -63,7 +66,7 @@ private: * Unicode2TextConverter * **-----------------------------------------*/ -class Unicode2TextConverter +class SAX_DLLPUBLIC Unicode2TextConverter { public: Unicode2TextConverter( rtl_TextEncoding encoding ); @@ -94,7 +97,7 @@ private: * XMLFile2UTFConverter * **-----------------------------------------*/ -class XMLFile2UTFConverter +class SAX_DLLPUBLIC XMLFile2UTFConverter { public: XMLFile2UTFConverter( ): commit 0cd3740c1d09b1a2c3c09e869bcad058e0fbf174 Author: Michael Stahl <mst...@redhat.com> Date: Mon Mar 12 17:53:16 2012 +0100 smoketest: fix duplicate linkage warning diff --git a/smoketest/CppunitTest_smoketest.mk b/smoketest/CppunitTest_smoketest.mk index c2d4f2f..2e614b6 100644 --- a/smoketest/CppunitTest_smoketest.mk +++ b/smoketest/CppunitTest_smoketest.mk @@ -29,10 +29,6 @@ $(eval $(call gb_CppunitTest_CppunitTest,smoketest)) $(eval $(call gb_CppunitTest_abort_on_assertion,smoketest)) -$(eval $(call gb_CppunitTest_add_exception_objects,smoketest,\ - smoketest/smoketest \ -)) - $(eval $(call gb_CppunitTest_add_api,smoketest,\ offapi \ udkapi \ @@ -43,6 +39,7 @@ $(eval $(call gb_CppunitTest_add_linked_libs,smoketest,\ cppuhelper \ sal \ unotest \ + smoketest \ )) ifeq ($(OS),MACOSX) commit d343dddc3fecb46953259ab16892347640383b98 Author: Michael Stahl <mst...@redhat.com> Date: Mon Mar 12 17:18:26 2012 +0100 extensions: split out static library from npsoplugin diff --git a/Repository.mk b/Repository.mk index 491f5dc..1b66b02 100644 --- a/Repository.mk +++ b/Repository.mk @@ -521,6 +521,7 @@ $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \ basegfx_s \ dtobj \ libeay32 \ + npsoenv \ nputils \ pdfimport_s \ plugcon \ diff --git a/extensions/Executable_nsplugin.mk b/extensions/Executable_nsplugin.mk index 383db00..c04e2ed 100644 --- a/extensions/Executable_nsplugin.mk +++ b/extensions/Executable_nsplugin.mk @@ -38,10 +38,13 @@ $(eval $(call gb_Executable_add_api,nsplugin,\ $(eval $(call gb_Executable_add_exception_objects,nsplugin,\ extensions/source/nsplugin/source/so_closelistener \ extensions/source/nsplugin/source/so_instance \ - extensions/source/nsplugin/source/so_env \ extensions/source/nsplugin/source/so_main \ )) +$(eval $(call gb_Executable_add_linked_static_libs,nsplugin,\ + npsoenv \ +)) + $(eval $(call gb_Executable_add_linked_libs,nsplugin,\ cppu \ cppuhelper \ diff --git a/extensions/Library_npsoplugin.mk b/extensions/Library_npsoplugin.mk index a4d3e3b..08e59c2 100644 --- a/extensions/Library_npsoplugin.mk +++ b/extensions/Library_npsoplugin.mk @@ -33,6 +33,7 @@ $(eval $(call gb_Library_Library,npsoplugin)) $(eval $(call gb_Library_use_external,npsoplugin,mozilla_headers)) $(eval $(call gb_Library_add_linked_static_libs,npsoplugin,\ + npsoenv \ nputils \ )) @@ -118,7 +119,6 @@ $(eval $(call gb_LinkTarget_get_target,npsoplugin) : NATIVERES := $(call gb_WinR endif # GUI=WNT $(eval $(call gb_Library_add_exception_objects,npsoplugin,\ - extensions/source/nsplugin/source/so_env \ extensions/source/nsplugin/source/npshell \ )) diff --git a/extensions/Module_extensions.mk b/extensions/Module_extensions.mk index 497f074..f6a8a22 100644 --- a/extensions/Module_extensions.mk +++ b/extensions/Module_extensions.mk @@ -96,6 +96,7 @@ ifeq ($(ENABLE_NSPLUGIN),YES) $(eval $(call gb_Module_add_targets,extensions,\ Executable_nsplugin \ Library_npsoplugin \ + StaticLibrary_npsoenv \ WinResTarget_npsoplugin \ )) endif diff --git a/extensions/StaticLibrary_npsoenv.mk b/extensions/StaticLibrary_npsoenv.mk new file mode 100644 index 0000000..3a1abe6 --- /dev/null +++ b/extensions/StaticLibrary_npsoenv.mk @@ -0,0 +1,34 @@ +# -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*- +# +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# [ Copyright (C) 2012 Red Hat, Inc., Michael Stahl <mst...@redhat.com> (initial developer) ] +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_StaticLibrary_StaticLibrary,npsoenv)) + +$(eval $(call gb_StaticLibrary_add_exception_objects,npsoenv,\ + extensions/source/nsplugin/source/so_env \ +)) + +# vim:set shiftwidth=4 softtabstop=4 expandtab: commit 5926ce12ed9816523f076cba45668f274e86a348 Author: Michael Stahl <mst...@redhat.com> Date: Mon Mar 12 16:24:34 2012 +0100 extensions: split out static library for X11 plugin connection stuff diff --git a/Repository.mk b/Repository.mk index 45e2e42..491f5dc 100644 --- a/Repository.mk +++ b/Repository.mk @@ -523,6 +523,7 @@ $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \ libeay32 \ nputils \ pdfimport_s \ + plugcon \ ssleay32 \ ooopathutils \ sample \ diff --git a/extensions/Executable_pluginapp.bin.mk b/extensions/Executable_pluginapp.bin.mk index 2b046a3..5208107 100644 --- a/extensions/Executable_pluginapp.bin.mk +++ b/extensions/Executable_pluginapp.bin.mk @@ -47,8 +47,10 @@ $(eval $(call gb_Executable_add_api,pluginapp.bin,\ $(eval $(call gb_Executable_add_exception_objects,pluginapp.bin,\ extensions/source/plugin/unx/npwrap \ extensions/source/plugin/unx/npnapi \ - extensions/source/plugin/unx/mediator \ - extensions/source/plugin/unx/plugcon \ +)) + +$(eval $(call gb_Executable_add_linked_static_libs,pluginapp.bin,\ + plugcon \ )) $(eval $(call gb_Executable_add_linked_libs,pluginapp.bin,\ diff --git a/extensions/Library_pl.mk b/extensions/Library_pl.mk index 9a9dbde..5ec260b 100644 --- a/extensions/Library_pl.mk +++ b/extensions/Library_pl.mk @@ -104,13 +104,15 @@ $(eval $(call gb_Library_use_external,pl,gtk)) endif # ENABLE_GTK=TRUE $(eval $(call gb_Library_add_exception_objects,pl,\ - extensions/source/plugin/unx/mediator \ extensions/source/plugin/unx/nppapi \ - extensions/source/plugin/unx/plugcon \ extensions/source/plugin/unx/sysplug \ extensions/source/plugin/unx/unxmgr \ )) +$(eval $(call gb_Library_add_linked_static_libs,pl,\ + plugcon \ +)) + $(eval $(call gb_Library_add_libs,pl,\ -lX11 \ )) diff --git a/extensions/Module_extensions.mk b/extensions/Module_extensions.mk index 4e1b027..497f074 100644 --- a/extensions/Module_extensions.mk +++ b/extensions/Module_extensions.mk @@ -109,6 +109,7 @@ $(eval $(call gb_Module_add_targets,extensions,\ ifeq ($(GUI),UNX) ifneq ($(GUIBASE),aqua) $(eval $(call gb_Module_add_targets,extensions,\ + StaticLibrary_plugcon \ Executable_pluginapp.bin \ )) endif diff --git a/extensions/StaticLibrary_plugcon.mk b/extensions/StaticLibrary_plugcon.mk new file mode 100644 index 0000000..1d26818 --- /dev/null +++ b/extensions/StaticLibrary_plugcon.mk @@ -0,0 +1,75 @@ +# -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*- +# +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# [ Copyright (C) 2012 Red Hat, Inc., Michael Stahl <mst...@redhat.com> (initial developer) ] +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +ifneq ($(GUI),UNX) +$(error only for UNX) +endif + +$(eval $(call gb_StaticLibrary_StaticLibrary,plugcon)) + +$(eval $(call gb_StaticLibrary_add_external_headers,plugcon,np_sdk_inc)) + +$(eval $(call gb_StaticLibrary_use_external,plugcon,mozilla_headers)) + +$(eval $(call gb_StaticLibrary_set_include,plugcon,\ + $$(INCLUDE) \ + -I$(SRCDIR)/extensions/source/plugin/inc \ +)) + +$(eval $(call gb_StaticLibrary_add_api,plugcon,\ + offapi \ + udkapi \ +)) + +ifeq ($(SOLAR_JAVA),TRUE) +$(eval $(call gb_StaticLibrary_add_defs,plugcon,\ + -DOJI \ +)) + +endif # SOLAR_JAVA=YES + +ifeq ($(SYSTEM_MOZILLA),YES) +$(eval $(call gb_StaticLibrary_add_defs,plugcon,\ + -DSYSTEM_MOZILLA \ +)) +endif # SYSTEM_MOZILLA=YES + +ifeq ($(ENABLE_GTK),TRUE) +$(eval $(call gb_StaticLibrary_add_defs,plugcon,\ + -DENABLE_GTK \ +)) + +$(eval $(call gb_StaticLibrary_use_external,plugcon,gtk)) +endif # ENABLE_GTK=TRUE + +$(eval $(call gb_StaticLibrary_add_exception_objects,plugcon,\ + extensions/source/plugin/unx/mediator \ + extensions/source/plugin/unx/plugcon \ +)) + +# vim:set shiftwidth=4 softtabstop=4 expandtab: + commit fece68732916d24c265552ee432d21d3a2d5f8ce Author: Michael Stahl <mst...@redhat.com> Date: Mon Mar 12 16:24:34 2012 +0100 desktop: move lockfile.cxx to libdeploymentmisc diff --git a/desktop/Library_deploymentmisc.mk b/desktop/Library_deploymentmisc.mk index abcc0e2..33965b3 100644 --- a/desktop/Library_deploymentmisc.mk +++ b/desktop/Library_deploymentmisc.mk @@ -77,6 +77,7 @@ $(eval $(call gb_Library_add_exception_objects,deploymentmisc,\ desktop/source/deployment/misc/dp_ucb \ desktop/source/deployment/misc/dp_update \ desktop/source/deployment/misc/dp_version \ + desktop/source/deployment/misc/lockfile \ )) # vim: set ts=4 sw=4 et: diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk index cf38cb9..668f290 100644 --- a/desktop/Library_sofficeapp.mk +++ b/desktop/Library_sofficeapp.mk @@ -31,6 +31,7 @@ $(eval $(call gb_Library_set_include,sofficeapp,\ $$(INCLUDE) \ -I$(SRCDIR)/desktop/inc \ -I$(SRCDIR)/desktop/source/inc \ + -I$(SRCDIR)/desktop/source/deployment/inc \ )) $(eval $(call gb_Library_add_api,sofficeapp,\ @@ -83,7 +84,6 @@ $(eval $(call gb_Library_add_exception_objects,sofficeapp,\ desktop/source/app/desktopresid \ desktop/source/app/dispatchwatcher \ desktop/source/app/langselect \ - desktop/source/app/lockfile \ desktop/source/app/lockfile2 \ desktop/source/app/officeipcthread \ desktop/source/app/sofficemain \ diff --git a/desktop/Library_unopkgapp.mk b/desktop/Library_unopkgapp.mk index d2f9abb..04a08bd 100644 --- a/desktop/Library_unopkgapp.mk +++ b/desktop/Library_unopkgapp.mk @@ -57,7 +57,6 @@ $(eval $(call gb_Library_add_linked_libs,unopkgapp,\ )) $(eval $(call gb_Library_add_exception_objects,unopkgapp,\ - desktop/source/app/lockfile \ desktop/source/pkgchk/unopkg/unopkg_app \ desktop/source/pkgchk/unopkg/unopkg_cmdenv \ desktop/source/pkgchk/unopkg/unopkg_misc \ diff --git a/desktop/source/app/lockfile.cxx b/desktop/source/app/lockfile.cxx deleted file mode 100644 index fd9291f..0000000 --- a/desktop/source/app/lockfile.cxx +++ /dev/null @@ -1,227 +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 <stdlib.h> -#include <time.h> -#ifndef WNT -#include <unistd.h> -#else -#include <windows.h> -#endif -#include <sal/types.h> -#include <osl/file.hxx> -#include <osl/socket.hxx> -#include <osl/security.hxx> -#include <unotools/bootstrap.hxx> -#include <tools/string.hxx> -#include <tools/config.hxx> - -#include "lockfile.hxx" - - -using namespace ::osl; -using namespace ::rtl; -using namespace ::utl; - - -static rtl::OString impl_getHostname() -{ - rtl::OString aHost; -#ifdef WNT - /* - prevent windows from connecting to the net to get it's own - hostname by using the netbios name - */ - sal_Int32 sz = MAX_COMPUTERNAME_LENGTH + 1; - char* szHost = new char[sz]; - if (GetComputerName(szHost, (LPDWORD)&sz)) - aHost = OString(szHost); - else - aHost = OString("UNKNOWN"); - delete[] szHost; -#else - /* Don't do dns lookup on Linux either */ - sal_Char pHostName[1024]; - - if ( gethostname( pHostName, sizeof( pHostName ) - 1 ) == 0 ) - { - pHostName[sizeof( pHostName ) - 1] = '\0'; - aHost = OString( pHostName ); - } - else - aHost = OString("UNKNOWN"); -#endif - - return aHost; -} - -namespace desktop { - - Lockfile::Lockfile( bool bIPCserver ) - :m_bIPCserver(bIPCserver) - ,m_bRemove(sal_False) - ,m_bIsLocked(sal_False) - { - // build the file-url to use for the lock - OUString aUserPath; - utl::Bootstrap::locateUserInstallation( aUserPath ); - m_aLockname = aUserPath + LOCKFILE_SUFFIX; - - // generate ID - const int nIdBytes = 16; - char tmpId[nIdBytes*2+1]; - time_t t; - srand( (unsigned)(t = time( NULL )) ); - int tmpByte = 0; - for (int i = 0; i<nIdBytes; i++) { - tmpByte = rand( ) % 0xFF; - sprintf( tmpId+i*2, "%02X", tmpByte ); - } - tmpId[nIdBytes*2]=0x00; - m_aId = OUString::createFromAscii( tmpId ); - - // generate date string - char *tmpTime = ctime( &t ); - if (tmpTime != NULL) { - m_aDate = OUString::createFromAscii( tmpTime ); - sal_Int32 i = m_aDate.indexOf('\n'); - if (i > 0) - m_aDate = m_aDate.copy(0, i); - } - - - // try to create file - File aFile(m_aLockname); - if (aFile.open( osl_File_OpenFlag_Create ) == File::E_EXIST) { - m_bIsLocked = sal_True; - } else { - // new lock created - aFile.close( ); - syncToFile( ); - m_bRemove = sal_True; - } - } - - sal_Bool Lockfile::check( fpExecWarning execWarning ) - { - - if (m_bIsLocked) { - // lock existed, ask user what to do - if (isStale() || - (execWarning != 0 && (*execWarning)( this ))) { - // remove file and create new - File::remove( m_aLockname ); - File aFile(m_aLockname); - aFile.open( osl_File_OpenFlag_Create ); - aFile.close( ); - syncToFile( ); - m_bRemove = sal_True; - return sal_True; - } else { - //leave alone and return false - m_bRemove = sal_False; - return sal_False; - } - } else { - // lock was created by us - return sal_True; - } - } - - sal_Bool Lockfile::isStale( void ) const - { - // this checks whether the lockfile was created on the same - // host by the same user. Should this be the case it is safe - // to assume that it is a stale lockfile which can be overwritten - String aLockname = m_aLockname; - Config aConfig(aLockname); - aConfig.SetGroup(LOCKFILE_GROUP); - rtl::OString aIPCserver = aConfig.ReadKey( LOCKFILE_IPCKEY ); - if (!aIPCserver.equalsIgnoreAsciiCase(rtl::OString("true"))) - return false; - - rtl::OString aHost = aConfig.ReadKey( LOCKFILE_HOSTKEY ); - rtl::OString aUser = aConfig.ReadKey( LOCKFILE_USERKEY ); - - // lockfile from same host? - rtl::OString myHost( impl_getHostname() ); - if (aHost == myHost) { - // lockfile by same UID - OUString myUserName; - Security aSecurity; - aSecurity.getUserName( myUserName ); - rtl::OString myUser(rtl::OUStringToOString(myUserName, RTL_TEXTENCODING_ASCII_US)); - if (aUser == myUser) - return sal_True; - } - return sal_False; - } - - void Lockfile::syncToFile( void ) const - { - String aLockname = m_aLockname; - Config aConfig(aLockname); - aConfig.SetGroup(LOCKFILE_GROUP); - - // get information - rtl::OString aHost( impl_getHostname() ); - OUString aUserName; - Security aSecurity; - aSecurity.getUserName( aUserName ); - rtl::OString aUser = OUStringToOString( aUserName, RTL_TEXTENCODING_ASCII_US ); - rtl::OString aTime = OUStringToOString( m_aDate, RTL_TEXTENCODING_ASCII_US ); - rtl::OString aStamp = OUStringToOString( m_aId, RTL_TEXTENCODING_ASCII_US ); - - // write information - aConfig.WriteKey( LOCKFILE_USERKEY, aUser ); - aConfig.WriteKey( LOCKFILE_HOSTKEY, aHost ); - aConfig.WriteKey( LOCKFILE_STAMPKEY, aStamp ); - aConfig.WriteKey( LOCKFILE_TIMEKEY, aTime ); - aConfig.WriteKey( - LOCKFILE_IPCKEY, - m_bIPCserver ? rtl::OString("true") : rtl::OString("false") ); - aConfig.Flush( ); - } - - Lockfile::~Lockfile( void ) - { - // unlock userdata by removing file - if ( m_bRemove ) - File::remove( m_aLockname ); - } -} - - - - - - - - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/source/app/lockfile.hxx b/desktop/source/app/lockfile.hxx deleted file mode 100644 index 35deb80..0000000 --- a/desktop/source/app/lockfile.hxx +++ /dev/null @@ -1,97 +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. - * - ************************************************************************/ - -/* Information: - * This class implements a mechanism to lock a users installation directory, - * which is necessesary because instances of staroffice could be running on - * different hosts while using the same directory thus causing data - * inconsistency. - * When an existing lock is detected, the user will be asked whether he wants - * to continue anyway, thus removing the lock and replacing it with a new one - * - * ideas: - * - store information about user and host and time in the lockfile and display - * these when asking whether to remove the lockfile. - * - periodically check the lockfile and warn the user when it gets replaced - * - */ - -#include "sal/types.h" -#include "rtl/string.hxx" -#include "rtl/ustring.hxx" - -#define LOCKFILE_SUFFIX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/.lock" ) ) -#define LOCKFILE_GROUP rtl::OString(RTL_CONSTASCII_STRINGPARAM( "Lockdata" ) ) -#define LOCKFILE_USERKEY rtl::OString(RTL_CONSTASCII_STRINGPARAM( "User" ) ) -#define LOCKFILE_HOSTKEY rtl::OString(RTL_CONSTASCII_STRINGPARAM( "Host" ) ) -#define LOCKFILE_STAMPKEY rtl::OString(RTL_CONSTASCII_STRINGPARAM( "Stamp" ) ) -#define LOCKFILE_TIMEKEY rtl::OString(RTL_CONSTASCII_STRINGPARAM( "Time" ) ) -#define LOCKFILE_IPCKEY rtl::OString(RTL_CONSTASCII_STRINGPARAM( "IPCServer" ) ) - -namespace desktop { - - class Lockfile; - bool Lockfile_execWarning( Lockfile * that ); - - class Lockfile - { - public: - - // contructs a new lockfile onject - Lockfile( bool bIPCserver = true ); - - // separating GUI code: - typedef bool (* fpExecWarning)( Lockfile * that ); - - // checks the lockfile, asks user when lockfile is - // found (iff gui) and returns false when we may not continue - sal_Bool check( fpExecWarning execWarning ); - - // removes the lockfile - ~Lockfile(void); - - private: - bool m_bIPCserver; - // full qualified name (file://-url) of the lockfile - rtl::OUString m_aLockname; - // flag whether the d'tor should delete the lock - sal_Bool m_bRemove; - sal_Bool m_bIsLocked; - // ID - rtl::OUString m_aId; - rtl::OUString m_aDate; - // access to data in file - void syncToFile(void) const; - sal_Bool isStale(void) const; - friend bool Lockfile_execWarning( Lockfile * that ); - - }; - -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/source/deployment/inc/lockfile.hxx b/desktop/source/deployment/inc/lockfile.hxx new file mode 100644 index 0000000..79b8896 --- /dev/null +++ b/desktop/source/deployment/inc/lockfile.hxx @@ -0,0 +1,99 @@ +/* -*- 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. + * + ************************************************************************/ + +/* Information: + * This class implements a mechanism to lock a users installation directory, + * which is necessesary because instances of staroffice could be running on + * different hosts while using the same directory thus causing data + * inconsistency. + * When an existing lock is detected, the user will be asked whether he wants + * to continue anyway, thus removing the lock and replacing it with a new one + * + * ideas: + * - store information about user and host and time in the lockfile and display + * these when asking whether to remove the lockfile. + * - periodically check the lockfile and warn the user when it gets replaced + * + */ + +#include "sal/types.h" +#include "rtl/string.hxx" +#include "rtl/ustring.hxx" + +#include "dp_misc_api.hxx" + +#define LOCKFILE_SUFFIX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/.lock" ) ) +#define LOCKFILE_GROUP rtl::OString(RTL_CONSTASCII_STRINGPARAM( "Lockdata" ) ) +#define LOCKFILE_USERKEY rtl::OString(RTL_CONSTASCII_STRINGPARAM( "User" ) ) +#define LOCKFILE_HOSTKEY rtl::OString(RTL_CONSTASCII_STRINGPARAM( "Host" ) ) +#define LOCKFILE_STAMPKEY rtl::OString(RTL_CONSTASCII_STRINGPARAM( "Stamp" ) ) +#define LOCKFILE_TIMEKEY rtl::OString(RTL_CONSTASCII_STRINGPARAM( "Time" ) ) +#define LOCKFILE_IPCKEY rtl::OString(RTL_CONSTASCII_STRINGPARAM( "IPCServer" ) ) + +namespace desktop { + + class Lockfile; + bool Lockfile_execWarning( Lockfile * that ); + + class DESKTOP_DEPLOYMENTMISC_DLLPUBLIC Lockfile + { + public: + + // contructs a new lockfile onject + Lockfile( bool bIPCserver = true ); + + // separating GUI code: + typedef bool (* fpExecWarning)( Lockfile * that ); + + // checks the lockfile, asks user when lockfile is + // found (iff gui) and returns false when we may not continue + sal_Bool check( fpExecWarning execWarning ); + + // removes the lockfile + ~Lockfile(void); + + private: + bool m_bIPCserver; + // full qualified name (file://-url) of the lockfile + rtl::OUString m_aLockname; + // flag whether the d'tor should delete the lock + sal_Bool m_bRemove; + sal_Bool m_bIsLocked; + // ID + rtl::OUString m_aId; + rtl::OUString m_aDate; + // access to data in file + void syncToFile(void) const; + sal_Bool isStale(void) const; + friend bool Lockfile_execWarning( Lockfile * that ); + + }; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/source/deployment/misc/lockfile.cxx b/desktop/source/deployment/misc/lockfile.cxx new file mode 100644 index 0000000..fd9291f --- /dev/null +++ b/desktop/source/deployment/misc/lockfile.cxx @@ -0,0 +1,227 @@ +/* -*- 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 <stdlib.h> +#include <time.h> +#ifndef WNT +#include <unistd.h> +#else +#include <windows.h> +#endif +#include <sal/types.h> +#include <osl/file.hxx> +#include <osl/socket.hxx> +#include <osl/security.hxx> +#include <unotools/bootstrap.hxx> +#include <tools/string.hxx> +#include <tools/config.hxx> + +#include "lockfile.hxx" + + +using namespace ::osl; +using namespace ::rtl; +using namespace ::utl; + + +static rtl::OString impl_getHostname() +{ + rtl::OString aHost; +#ifdef WNT + /* + prevent windows from connecting to the net to get it's own + hostname by using the netbios name + */ + sal_Int32 sz = MAX_COMPUTERNAME_LENGTH + 1; + char* szHost = new char[sz]; + if (GetComputerName(szHost, (LPDWORD)&sz)) + aHost = OString(szHost); + else + aHost = OString("UNKNOWN"); + delete[] szHost; +#else + /* Don't do dns lookup on Linux either */ + sal_Char pHostName[1024]; + + if ( gethostname( pHostName, sizeof( pHostName ) - 1 ) == 0 ) + { + pHostName[sizeof( pHostName ) - 1] = '\0'; + aHost = OString( pHostName ); + } + else + aHost = OString("UNKNOWN"); +#endif + + return aHost; +} + +namespace desktop { + + Lockfile::Lockfile( bool bIPCserver ) + :m_bIPCserver(bIPCserver) + ,m_bRemove(sal_False) + ,m_bIsLocked(sal_False) + { + // build the file-url to use for the lock + OUString aUserPath; + utl::Bootstrap::locateUserInstallation( aUserPath ); + m_aLockname = aUserPath + LOCKFILE_SUFFIX; + + // generate ID + const int nIdBytes = 16; + char tmpId[nIdBytes*2+1]; + time_t t; + srand( (unsigned)(t = time( NULL )) ); + int tmpByte = 0; + for (int i = 0; i<nIdBytes; i++) { + tmpByte = rand( ) % 0xFF; + sprintf( tmpId+i*2, "%02X", tmpByte ); + } + tmpId[nIdBytes*2]=0x00; + m_aId = OUString::createFromAscii( tmpId ); + + // generate date string + char *tmpTime = ctime( &t ); + if (tmpTime != NULL) { + m_aDate = OUString::createFromAscii( tmpTime ); + sal_Int32 i = m_aDate.indexOf('\n'); + if (i > 0) + m_aDate = m_aDate.copy(0, i); + } + + + // try to create file + File aFile(m_aLockname); + if (aFile.open( osl_File_OpenFlag_Create ) == File::E_EXIST) { + m_bIsLocked = sal_True; + } else { + // new lock created + aFile.close( ); + syncToFile( ); + m_bRemove = sal_True; + } + } + + sal_Bool Lockfile::check( fpExecWarning execWarning ) + { + + if (m_bIsLocked) { + // lock existed, ask user what to do + if (isStale() || + (execWarning != 0 && (*execWarning)( this ))) { + // remove file and create new + File::remove( m_aLockname ); + File aFile(m_aLockname); + aFile.open( osl_File_OpenFlag_Create ); + aFile.close( ); + syncToFile( ); + m_bRemove = sal_True; + return sal_True; + } else { + //leave alone and return false + m_bRemove = sal_False; + return sal_False; + } + } else { + // lock was created by us + return sal_True; + } + } + + sal_Bool Lockfile::isStale( void ) const + { + // this checks whether the lockfile was created on the same + // host by the same user. Should this be the case it is safe + // to assume that it is a stale lockfile which can be overwritten + String aLockname = m_aLockname; + Config aConfig(aLockname); + aConfig.SetGroup(LOCKFILE_GROUP); + rtl::OString aIPCserver = aConfig.ReadKey( LOCKFILE_IPCKEY ); + if (!aIPCserver.equalsIgnoreAsciiCase(rtl::OString("true"))) + return false; + + rtl::OString aHost = aConfig.ReadKey( LOCKFILE_HOSTKEY ); + rtl::OString aUser = aConfig.ReadKey( LOCKFILE_USERKEY ); + + // lockfile from same host? + rtl::OString myHost( impl_getHostname() ); + if (aHost == myHost) { + // lockfile by same UID + OUString myUserName; + Security aSecurity; + aSecurity.getUserName( myUserName ); + rtl::OString myUser(rtl::OUStringToOString(myUserName, RTL_TEXTENCODING_ASCII_US)); + if (aUser == myUser) + return sal_True; + } + return sal_False; + } + + void Lockfile::syncToFile( void ) const + { + String aLockname = m_aLockname; + Config aConfig(aLockname); + aConfig.SetGroup(LOCKFILE_GROUP); + + // get information + rtl::OString aHost( impl_getHostname() ); + OUString aUserName; + Security aSecurity; + aSecurity.getUserName( aUserName ); + rtl::OString aUser = OUStringToOString( aUserName, RTL_TEXTENCODING_ASCII_US ); + rtl::OString aTime = OUStringToOString( m_aDate, RTL_TEXTENCODING_ASCII_US ); + rtl::OString aStamp = OUStringToOString( m_aId, RTL_TEXTENCODING_ASCII_US ); + + // write information + aConfig.WriteKey( LOCKFILE_USERKEY, aUser ); + aConfig.WriteKey( LOCKFILE_HOSTKEY, aHost ); + aConfig.WriteKey( LOCKFILE_STAMPKEY, aStamp ); + aConfig.WriteKey( LOCKFILE_TIMEKEY, aTime ); + aConfig.WriteKey( + LOCKFILE_IPCKEY, + m_bIPCserver ? rtl::OString("true") : rtl::OString("false") ); + aConfig.Flush( ); + } + + Lockfile::~Lockfile( void ) + { + // unlock userdata by removing file + if ( m_bRemove ) + File::remove( m_aLockname ); + } +} + + + + + + + + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx index 0750d38..c7b5e67 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx @@ -31,7 +31,7 @@ #include "unopkg_shared.h" #include "dp_identifier.hxx" #include "../../deployment/gui/dp_gui.hrc" -#include "../../app/lockfile.hxx" +#include "lockfile.hxx" #include "vcl/svapp.hxx" #include "vcl/msgbox.hxx" #include "rtl/bootstrap.hxx" commit c7458a4a71a1e875e03772b0f6e8ad9e1a982006 Author: Michael Stahl <mst...@redhat.com> Date: Mon Mar 12 16:24:34 2012 +0100 desktop: libsofficeapp shouln't need a main() diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk index 15acbb1..cf38cb9 100644 --- a/desktop/Library_sofficeapp.mk +++ b/desktop/Library_sofficeapp.mk @@ -91,8 +91,4 @@ $(eval $(call gb_Library_add_exception_objects,sofficeapp,\ desktop/source/migration/migration \ )) -$(eval $(call gb_Library_add_cobjects,sofficeapp,\ - desktop/source/app/main \ -)) - # vim: set ts=4 sw=4 et: commit 0f1ac15c1dd3c09d6441892bd5f0b5a09409af04 Author: Michael Stahl <mst...@redhat.com> Date: Mon Mar 12 16:24:33 2012 +0100 vcl: fix multiply linked objects diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index 5649104..b886389 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -612,8 +612,8 @@ endif endif ifneq ($(OS),IOS) -$(eval $(call gb_Library_add_exception_objects,vcl,\ - vcl/source/salmain/salmain \ +$(eval $(call gb_Library_add_linked_static_libs,vcl,\ + vclmain \ )) endif commit f8f089116895ef6c9b2dd9c55009ddb5d062aa1b Author: Michael Stahl <mst...@redhat.com> Date: Mon Mar 12 16:24:21 2012 +0100 sdext: factor out a static library to fix triple-linked objects diff --git a/Repository.mk b/Repository.mk index 561d645..45e2e42 100644 --- a/Repository.mk +++ b/Repository.mk @@ -522,6 +522,7 @@ $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \ dtobj \ libeay32 \ nputils \ + pdfimport_s \ ssleay32 \ ooopathutils \ sample \ diff --git a/sdext/CppunitTest_pdfimport.mk b/sdext/CppunitTest_pdfimport.mk index 77a0d2a..5e8a914 100644 --- a/sdext/CppunitTest_pdfimport.mk +++ b/sdext/CppunitTest_pdfimport.mk @@ -58,10 +58,7 @@ $(eval $(call gb_CppunitTest_add_linked_libs,sdext_pdfimport,\ $(eval $(call gb_CppunitTest_add_linked_static_libs,sdext_pdfimport,\ basegfx_s \ -)) - -$(eval $(call gb_CppunitTest_add_library_objects,sdext_pdfimport,\ - pdfimport \ + pdfimport_s \ )) $(eval $(call gb_CppunitTest_add_exception_objects,sdext_pdfimport,\ diff --git a/sdext/Executable_pdf2xml.mk b/sdext/Executable_pdf2xml.mk index 38fa4e6..681d77f 100644 --- a/sdext/Executable_pdf2xml.mk +++ b/sdext/Executable_pdf2xml.mk @@ -49,29 +49,12 @@ $(eval $(call gb_Executable_add_linked_libs,pdf2xml,\ sal \ )) -$(eval $(call gb_Executable_add_exception_objects,pdf2xml,\ - sdext/source/pdfimport/test/pdf2xml \ +$(eval $(call gb_Executable_add_linked_static_libs,pdf2xml,\ + pdfimport_s \ )) -# additional objects we need to link in $(eval $(call gb_Executable_add_exception_objects,pdf2xml,\ - sdext/source/pdfimport/filterdet \ - sdext/source/pdfimport/misc/pdfihelper \ - sdext/source/pdfimport/misc/pwdinteract \ - sdext/source/pdfimport/odf/odfemitter \ - sdext/source/pdfimport/pdfiadaptor \ - sdext/source/pdfimport/pdfparse/pdfentries \ - sdext/source/pdfimport/pdfparse/pdfparse \ - sdext/source/pdfimport/sax/emitcontext \ - sdext/source/pdfimport/sax/saxattrlist \ - sdext/source/pdfimport/tree/drawtreevisiting \ - sdext/source/pdfimport/tree/genericelements \ - sdext/source/pdfimport/tree/imagecontainer \ - sdext/source/pdfimport/tree/pdfiprocessor \ - sdext/source/pdfimport/tree/style \ - sdext/source/pdfimport/tree/treevisitorfactory \ - sdext/source/pdfimport/tree/writertreevisiting \ - sdext/source/pdfimport/wrapper/wrapper \ + sdext/source/pdfimport/test/pdf2xml \ )) # vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sdext/Executable_pdfunzip.mk b/sdext/Executable_pdfunzip.mk index 8552a17..d073c05 100644 --- a/sdext/Executable_pdfunzip.mk +++ b/sdext/Executable_pdfunzip.mk @@ -48,29 +48,12 @@ $(eval $(call gb_Executable_add_linked_libs,pdfunzip,\ sal \ )) -$(eval $(call gb_Executable_add_exception_objects,pdfunzip,\ - sdext/source/pdfimport/test/pdfunzip \ +$(eval $(call gb_Executable_add_linked_static_libs,pdfunzip,\ + pdfimport_s \ )) -# additional objects we need to link in $(eval $(call gb_Executable_add_exception_objects,pdfunzip,\ - sdext/source/pdfimport/filterdet \ - sdext/source/pdfimport/misc/pdfihelper \ - sdext/source/pdfimport/misc/pwdinteract \ - sdext/source/pdfimport/odf/odfemitter \ - sdext/source/pdfimport/pdfiadaptor \ - sdext/source/pdfimport/pdfparse/pdfentries \ - sdext/source/pdfimport/pdfparse/pdfparse \ - sdext/source/pdfimport/sax/emitcontext \ - sdext/source/pdfimport/sax/saxattrlist \ - sdext/source/pdfimport/tree/drawtreevisiting \ - sdext/source/pdfimport/tree/genericelements \ - sdext/source/pdfimport/tree/imagecontainer \ - sdext/source/pdfimport/tree/pdfiprocessor \ - sdext/source/pdfimport/tree/style \ - sdext/source/pdfimport/tree/treevisitorfactory \ - sdext/source/pdfimport/tree/writertreevisiting \ - sdext/source/pdfimport/wrapper/wrapper \ + sdext/source/pdfimport/test/pdfunzip \ )) # vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sdext/Library_pdfimport.mk b/sdext/Library_pdfimport.mk index 485a14a..f8e47ad 100644 --- a/sdext/Library_pdfimport.mk +++ b/sdext/Library_pdfimport.mk @@ -25,8 +25,6 @@ # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable # instead of those above. -include $(dir $(realpath $(lastword $(MAKEFILE_LIST))))platform.mk - $(eval $(call gb_Library_Library,pdfimport)) $(eval $(call gb_Library_add_api,pdfimport,\ @@ -34,15 +32,6 @@ $(eval $(call gb_Library_add_api,pdfimport,\ udkapi \ )) -$(eval $(call gb_Library_add_defs,pdfimport,\ - -DBOOST_SPIRIT_USE_OLD_NAMESPACE \ - -DPDFI_IMPL_IDENTIFIER=\"com.sun.star.PDFImport-$(sdext_PLATFORM)\" \ -)) - -$(eval $(call gb_Library_add_package_headers,pdfimport,\ - sdext_pdfimport_keywords \ -)) - $(eval $(call gb_Library_set_include,pdfimport,\ -I$(WORKDIR)/CustomTarget/sdext/source/pdfimport/wrapper \ -I$(SRCDIR)/sdext/source/pdfimport/inc \ @@ -57,6 +46,7 @@ $(eval $(call gb_Library_add_linked_libs,pdfimport,\ $(eval $(call gb_Library_add_linked_static_libs,pdfimport,\ basegfx_s \ + pdfimport_s \ )) $(eval $(call gb_Library_use_externals,pdfimport,\ @@ -64,24 +54,7 @@ $(eval $(call gb_Library_use_externals,pdfimport,\ )) $(eval $(call gb_Library_add_exception_objects,pdfimport,\ - sdext/source/pdfimport/filterdet \ - sdext/source/pdfimport/misc/pdfihelper \ - sdext/source/pdfimport/misc/pwdinteract \ - sdext/source/pdfimport/odf/odfemitter \ - sdext/source/pdfimport/pdfiadaptor \ - sdext/source/pdfimport/pdfparse/pdfentries \ - sdext/source/pdfimport/pdfparse/pdfparse \ - sdext/source/pdfimport/sax/emitcontext \ - sdext/source/pdfimport/sax/saxattrlist \ sdext/source/pdfimport/services \ - sdext/source/pdfimport/tree/drawtreevisiting \ - sdext/source/pdfimport/tree/genericelements \ - sdext/source/pdfimport/tree/imagecontainer \ - sdext/source/pdfimport/tree/pdfiprocessor \ - sdext/source/pdfimport/tree/style \ - sdext/source/pdfimport/tree/treevisitorfactory \ - sdext/source/pdfimport/tree/writertreevisiting \ - sdext/source/pdfimport/wrapper/wrapper \ )) # vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sdext/Module_sdext.mk b/sdext/Module_sdext.mk index 8f49690..7827633 100644 --- a/sdext/Module_sdext.mk +++ b/sdext/Module_sdext.mk @@ -43,6 +43,7 @@ $(eval $(call gb_Module_add_targets,sdext,\ Executable_xpdfimport \ Extension_pdfimport \ Library_pdfimport \ + StaticLibrary_pdfimport_s \ Package_pdfimport_keywords \ )) diff --git a/sdext/StaticLibrary_pdfimport_s.mk b/sdext/StaticLibrary_pdfimport_s.mk new file mode 100644 index 0000000..5fd3072 --- /dev/null +++ b/sdext/StaticLibrary_pdfimport_s.mk @@ -0,0 +1,76 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2012 Red Hat, Inc., Michael Stahl <mst...@redhat.com> +# (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +include $(dir $(realpath $(lastword $(MAKEFILE_LIST))))platform.mk + +$(eval $(call gb_StaticLibrary_StaticLibrary,pdfimport_s)) + +$(eval $(call gb_StaticLibrary_add_api,pdfimport_s,\ + offapi \ + udkapi \ +)) + +$(eval $(call gb_StaticLibrary_use_externals,pdfimport_s,\ + zlib \ +)) + +$(eval $(call gb_StaticLibrary_add_package_headers,pdfimport_s,\ + sdext_pdfimport_keywords \ +)) + +$(eval $(call gb_StaticLibrary_set_include,pdfimport_s,\ + -I$(WORKDIR)/CustomTarget/sdext/source/pdfimport/wrapper \ + -I$(SRCDIR)/sdext/source/pdfimport/inc \ + $$(INCLUDE) \ +)) + +$(eval $(call gb_StaticLibrary_add_defs,pdfimport_s,\ + -DBOOST_SPIRIT_USE_OLD_NAMESPACE \ + -DPDFI_IMPL_IDENTIFIER=\"com.sun.star.PDFImport-$(sdext_PLATFORM)\" \ +)) + +$(eval $(call gb_StaticLibrary_add_exception_objects,pdfimport_s,\ + sdext/source/pdfimport/filterdet \ + sdext/source/pdfimport/misc/pdfihelper \ + sdext/source/pdfimport/misc/pwdinteract \ + sdext/source/pdfimport/odf/odfemitter \ + sdext/source/pdfimport/pdfiadaptor \ + sdext/source/pdfimport/pdfparse/pdfentries \ + sdext/source/pdfimport/pdfparse/pdfparse \ + sdext/source/pdfimport/sax/emitcontext \ + sdext/source/pdfimport/sax/saxattrlist \ + sdext/source/pdfimport/tree/drawtreevisiting \ + sdext/source/pdfimport/tree/genericelements \ + sdext/source/pdfimport/tree/imagecontainer \ + sdext/source/pdfimport/tree/pdfiprocessor \ + sdext/source/pdfimport/tree/style \ + sdext/source/pdfimport/tree/treevisitorfactory \ + sdext/source/pdfimport/tree/writertreevisiting \ + sdext/source/pdfimport/wrapper/wrapper \ +)) + +# vim:set shiftwidth=4 softtabstop=4 expandtab: _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits