diff options
author | Mikhail Voytenko <mav@openoffice.org> | 2011-03-09 17:38:01 +0100 |
---|---|---|
committer | Mikhail Voytenko <mav@openoffice.org> | 2011-03-09 17:38:01 +0100 |
commit | cd3b62ba4bd7cbb17d905f120fad084ba4a10668 (patch) | |
tree | b003e918ae140e12763edbfd8374d3b20f1b24d9 /comphelper | |
parent | mav60: #164341# support AES encryption (diff) | |
parent | masterfix DEV300: #i10000# usage of L10N build_type (diff) | |
download | core-cd3b62ba4bd7cbb17d905f120fad084ba4a10668.tar.gz core-cd3b62ba4bd7cbb17d905f120fad084ba4a10668.zip |
mav60: merge to m101
Diffstat (limited to 'comphelper')
26 files changed, 781 insertions, 1165 deletions
diff --git a/comphelper/inc/makefile.mk b/comphelper/JunitTest_comphelper_complex.mk index 5c466f93be42..5da6f2cd2061 100644 --- a/comphelper/inc/makefile.mk +++ b/comphelper/JunitTest_comphelper_complex.mk @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2000, 2010 Oracle and/or its affiliates. +# Copyright 2000, 2011 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # @@ -24,25 +24,25 @@ # for a copy of the LGPLv3 License. # #************************************************************************* -PRJ=.. -PRJNAME=comphelper -TARGET=inc +$(eval $(call gb_JunitTest_JunitTest,comphelper_complex)) -# --- Settings ----------------------------------------------------- +$(eval $(call gb_JunitTest_add_sourcefiles,comphelper_complex,\ + comphelper/qa/complex/comphelper/Map \ + comphelper/qa/complex/comphelper/SequenceOutputStreamUnitTest \ +)) -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk +$(eval $(call gb_JunitTest_add_jars,comphelper_complex,\ + $(OUTDIR)/bin/OOoRunner.jar \ + $(OUTDIR)/bin/ridl.jar \ + $(OUTDIR)/bin/test.jar \ + $(OUTDIR)/bin/unoil.jar \ + $(OUTDIR)/bin/jurt.jar \ +)) -# --- Files -------------------------------------------------------- -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -.IF "$(ENABLE_PCH)"!="" -ALLTAR : \ - $(SLO)$/precompiled.pch \ - $(SLO)$/precompiled_ex.pch - -.ENDIF # "$(ENABLE_PCH)"!="" +$(eval $(call gb_JunitTest_add_classes,comphelper_complex,\ + complex.comphelper.SequenceOutputStreamUnitTest \ + complex.comphelper.Map \ +)) +# vim: set noet sw=4 ts=4: diff --git a/comphelper/Library_comphelp.mk b/comphelper/Library_comphelp.mk new file mode 100644 index 000000000000..0228d80b2f89 --- /dev/null +++ b/comphelper/Library_comphelp.mk @@ -0,0 +1,158 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# 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. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,comphelper)) + +$(eval $(call gb_Library_add_package_headers,comphelper,comphelper_inc)) + +$(eval $(call gb_Library_add_precompiled_header,comphelper,$(SRCDIR)/comphelper/inc/pch/precompiled_comphelper)) + +$(eval $(call gb_Library_set_componentfile,comphelper,comphelper/util/comphelp)) + +$(eval $(call gb_Library_set_include,comphelper,\ + -I$(SRCDIR)/comphelper/inc/pch \ + -I$(SRCDIR)/comphelper/source/inc \ + $$(INCLUDE) \ + -I$(OUTDIR)/inc/offuh \ +)) + +$(eval $(call gb_Library_set_defs,comphelper,\ + $$(DEFS) \ + -DCOMPHELPER_DLLIMPLEMENTATION \ +)) + +$(eval $(call gb_Library_add_linked_libs,comphelper,\ + sal \ + cppuhelper \ + cppu \ + ucbhelper \ + vos3 \ + stl \ + $(gb_STDLIBS) \ +)) + +$(eval $(call gb_Library_add_exception_objects,comphelper,\ + comphelper/source/compare/AnyCompareFactory \ + comphelper/source/container/IndexedPropertyValuesContainer \ + comphelper/source/container/NamedPropertyValuesContainer \ + comphelper/source/container/container \ + comphelper/source/container/containermultiplexer \ + comphelper/source/container/embeddedobjectcontainer \ + comphelper/source/container/enumerablemap \ + comphelper/source/container/enumhelper \ + comphelper/source/container/namecontainer \ + comphelper/source/eventattachermgr/eventattachermgr \ + comphelper/source/misc/accessiblecomponenthelper \ + comphelper/source/misc/accessiblecontexthelper \ + comphelper/source/misc/accessibleeventbuffer \ + comphelper/source/misc/accessibleeventnotifier \ + comphelper/source/misc/accessiblekeybindinghelper \ + comphelper/source/misc/accessibleselectionhelper \ + comphelper/source/misc/accessibletexthelper \ + comphelper/source/misc/accessiblewrapper \ + comphelper/source/misc/accimplaccess \ + comphelper/source/misc/anytostring \ + comphelper/source/misc/asyncnotification \ + comphelper/source/misc/comphelper_module \ + comphelper/source/misc/comphelper_services \ + comphelper/source/misc/componentbase \ + comphelper/source/misc/componentcontext \ + comphelper/source/misc/componentmodule \ + comphelper/source/misc/configurationhelper \ + comphelper/source/misc/docpasswordhelper \ + comphelper/source/misc/docpasswordrequest \ + comphelper/source/misc/documentinfo \ + comphelper/source/misc/documentiologring \ + comphelper/source/misc/evtlistenerhlp \ + comphelper/source/misc/evtmethodhelper \ + comphelper/source/misc/ihwrapnofilter \ + comphelper/source/misc/instancelocker \ + comphelper/source/misc/interaction \ + comphelper/source/misc/legacysingletonfactory \ + comphelper/source/misc/listenernotification \ + comphelper/source/misc/locale \ + comphelper/source/misc/logging \ + comphelper/source/misc/mediadescriptor \ + comphelper/source/misc/mimeconfighelper \ + comphelper/source/misc/namedvaluecollection \ + comphelper/source/misc/numberedcollection \ + comphelper/source/misc/numbers \ + comphelper/source/misc/officeresourcebundle \ + comphelper/source/misc/officerestartmanager \ + comphelper/source/misc/proxyaggregation \ + comphelper/source/misc/regpathhelper \ + comphelper/source/misc/scopeguard \ + comphelper/source/misc/SelectionMultiplex \ + comphelper/source/misc/sequenceashashmap \ + comphelper/source/misc/sequence \ + comphelper/source/misc/servicedecl \ + comphelper/source/misc/serviceinfohelper \ + comphelper/source/misc/sharedmutex \ + comphelper/source/misc/stillreadwriteinteraction \ + comphelper/source/misc/anycompare \ + comphelper/source/misc/storagehelper \ + comphelper/source/misc/string \ + comphelper/source/misc/synchronousdispatch \ + comphelper/source/misc/types \ + comphelper/source/misc/uieventslogger \ + comphelper/source/misc/weak \ + comphelper/source/misc/weakeventlistener \ + comphelper/source/officeinstdir/officeinstallationdirectories \ + comphelper/source/processfactory/componentfactory \ + comphelper/source/processfactory/processfactory \ + comphelper/source/property/ChainablePropertySet \ + comphelper/source/property/ChainablePropertySetInfo \ + comphelper/source/property/composedprops \ + comphelper/source/property/genericpropertyset \ + comphelper/source/property/MasterPropertySet \ + comphelper/source/property/MasterPropertySetInfo \ + comphelper/source/property/opropertybag \ + comphelper/source/property/propagg \ + comphelper/source/property/propertybag \ + comphelper/source/property/propertycontainer \ + comphelper/source/property/propertycontainerhelper \ + comphelper/source/property/property \ + comphelper/source/property/propertysethelper \ + comphelper/source/property/propertysetinfo \ + comphelper/source/property/propertystatecontainer \ + comphelper/source/property/propmultiplex \ + comphelper/source/property/propstate \ + comphelper/source/property/TypeGeneration \ + comphelper/source/streaming/basicio \ + comphelper/source/streaming/memorystream \ + comphelper/source/streaming/oslfile2streamwrap \ + comphelper/source/streaming/otransactedfilestream \ + comphelper/source/streaming/seekableinput \ + comphelper/source/streaming/seqinputstreamserv \ + comphelper/source/streaming/seqoutputstreamserv \ + comphelper/source/streaming/seqstream \ + comphelper/source/streaming/streamsection \ + comphelper/source/xml/attributelist \ + comphelper/source/xml/ofopxmlhelper \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/comphelper/version.mk b/comphelper/Makefile index f8d798a404b7..a79aff831024 100644 --- a/comphelper/version.mk +++ b/comphelper/Makefile @@ -25,22 +25,14 @@ # #************************************************************************* -# ----------------------------COMPHLP settings------------------------------------# -# target -COMPHLP_TARGET=comphelp - -# the major -COMPHLP_MAJOR=4 -# the minor -COMPHLP_MINOR=0 -# the micro -COMPHLP_MICRO=0 - -# this is a c++ compatible library -COMPHLP_CPP=1 - -COMPHLP=$(COMPHLP_TARGET_TARGET)_$(CMPEXT) - +ifeq ($(strip $(SOLARENV)),) +$(error No environment set!) +endif +gb_PARTIALBUILD := T +GBUILDDIR := $(SOLARENV)/gbuild +include $(GBUILDDIR)/gbuild.mk +$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk))) +# vim: set noet sw=4 ts=4: diff --git a/comphelper/test/uno_iterators/makefile.mk b/comphelper/Module_comphelper.mk index 2346a0d24742..e39d973fe23e 100644 --- a/comphelper/test/uno_iterators/makefile.mk +++ b/comphelper/Module_comphelper.mk @@ -1,7 +1,8 @@ #************************************************************************* +# # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2000, 2010 Oracle and/or its affiliates. +# Copyright 2009 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite # @@ -13,36 +14,26 @@ # # 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 +# 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 +# version 3 along with OpenOffice.org. If not, see # <http://www.openoffice.org/license.html> # for a copy of the LGPLv3 License. # -#***********************************************************************/ - -PRJNAME=extensions -PRJ=..$/.. - -TARGET=uno_iterators - -ENABLE_EXCEPTIONS=TRUE +#************************************************************************* -.INCLUDE : settings.mk +$(eval $(call gb_Module_Module,comphelper)) -OBJFILES= \ - $(OBJ)$/uno_iterators.obj +$(eval $(call gb_Module_add_targets,comphelper,\ + Package_inc \ + Library_comphelp \ +)) -APP1TARGET=uno_iterators -APP1OBJS= \ - $(OBJ)$/uno_iterators.obj -APP1STDLIBS= \ - $(SALLIB) \ - $(CPPULIB) \ - $(SALHELPERLIB) \ - $(CPPUHELPERLIB) +$(eval $(call gb_Module_add_subsequentcheck_targets,comphelper,\ + JunitTest_comphelper_complex \ +)) -.INCLUDE : target.mk +# vim: set noet ts=4 sw=4: diff --git a/comphelper/Package_inc.mk b/comphelper/Package_inc.mk new file mode 100644 index 000000000000..5794c56ab74d --- /dev/null +++ b/comphelper/Package_inc.mk @@ -0,0 +1,137 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# 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. +# +#************************************************************************* + +$(eval $(call gb_Package_Package,comphelper_inc,$(SRCDIR)/comphelper/inc)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/flagguard.hxx,comphelper/flagguard.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/stlunosequence.hxx,comphelper/stlunosequence.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/documentconstants.hxx,comphelper/documentconstants.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/evtmethodhelper.hxx,comphelper/evtmethodhelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/weakbag.hxx,comphelper/weakbag.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/basicio.hxx,comphelper/basicio.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/classids.hxx,comphelper/classids.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/MasterPropertySet.hxx,comphelper/MasterPropertySet.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/stillreadwriteinteraction.hxx,comphelper/stillreadwriteinteraction.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/anycompare.hxx,comphelper/anycompare.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propagg.hxx,comphelper/propagg.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/scopeguard.hxx,comphelper/scopeguard.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/asyncnotification.hxx,comphelper/asyncnotification.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/namedvaluecollection.hxx,comphelper/namedvaluecollection.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/composedprops.hxx,comphelper/composedprops.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/mediadescriptor.hxx,comphelper/mediadescriptor.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/synchronousdispatch.hxx,comphelper/synchronousdispatch.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accessiblecomponenthelper.hxx,comphelper/accessiblecomponenthelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/otransactedfilestream.hxx,comphelper/otransactedfilestream.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propmultiplex.hxx,comphelper/propmultiplex.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/servicehelper.hxx,comphelper/servicehelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/servicedecl.hxx,comphelper/servicedecl.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/mimeconfighelper.hxx,comphelper/mimeconfighelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/implbase_var.hxx,comphelper/implbase_var.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/TypeGeneration.hxx,comphelper/TypeGeneration.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/MasterPropertySetInfo.hxx,comphelper/MasterPropertySetInfo.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accessiblewrapper.hxx,comphelper/accessiblewrapper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/sequence.hxx,comphelper/sequence.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/uieventslogger.hxx,comphelper/uieventslogger.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/docpasswordhelper.hxx,comphelper/docpasswordhelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propertystatecontainer.hxx,comphelper/propertystatecontainer.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propertysetinfo.hxx,comphelper/propertysetinfo.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accimplaccess.hxx,comphelper/accimplaccess.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/docpasswordrequest.hxx,comphelper/docpasswordrequest.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accessibleeventbuffer.hxx,comphelper/accessibleeventbuffer.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/regpathhelper.hxx,comphelper/regpathhelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/extract.hxx,comphelper/extract.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/interaction.hxx,comphelper/interaction.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/uno3.hxx,comphelper/uno3.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/unwrapargs.hxx,comphelper/unwrapargs.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propertycontainer.hxx,comphelper/propertycontainer.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/guarding.hxx,comphelper/guarding.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/fileformat.h,comphelper/fileformat.h)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/ChainablePropertySetInfo.hxx,comphelper/ChainablePropertySetInfo.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/enumhelper.hxx,comphelper/enumhelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/property.hxx,comphelper/property.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propertysethelper.hxx,comphelper/propertysethelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accessiblekeybindinghelper.hxx,comphelper/accessiblekeybindinghelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propertycontainerhelper.hxx,comphelper/propertycontainerhelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/make_shared_from_uno.hxx,comphelper/make_shared_from_uno.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/comphelperdllapi.h,comphelper/comphelperdllapi.h)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/listenernotification.hxx,comphelper/listenernotification.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/attributelist.hxx,comphelper/attributelist.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/streamsection.hxx,comphelper/streamsection.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accessibletexthelper.hxx,comphelper/accessibletexthelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accessibleselectionhelper.hxx,comphelper/accessibleselectionhelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/serviceinfohelper.hxx,comphelper/serviceinfohelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/locale.hxx,comphelper/locale.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/numberedcollection.hxx,comphelper/numberedcollection.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/ChainablePropertySet.hxx,comphelper/ChainablePropertySet.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/stl_types.hxx,comphelper/stl_types.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/eventattachermgr.hxx,comphelper/eventattachermgr.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/componentcontext.hxx,comphelper/componentcontext.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/legacysingletonfactory.hxx,comphelper/legacysingletonfactory.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accessibleeventnotifier.hxx,comphelper/accessibleeventnotifier.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/ihwrapnofilter.hxx,comphelper/ihwrapnofilter.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/sequenceasvector.hxx,comphelper/sequenceasvector.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/officeresourcebundle.hxx,comphelper/officeresourcebundle.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/types.hxx,comphelper/types.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/seekableinput.hxx,comphelper/seekableinput.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/IdPropArrayHelper.hxx,comphelper/IdPropArrayHelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accessiblecontexthelper.hxx,comphelper/accessiblecontexthelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/SelectionMultiplex.hxx,comphelper/SelectionMultiplex.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/storagehelper.hxx,comphelper/storagehelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/logging.hxx,comphelper/logging.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/sharedmutex.hxx,comphelper/sharedmutex.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/documentinfo.hxx,comphelper/documentinfo.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/weakeventlistener.hxx,comphelper/weakeventlistener.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/componentfactory.hxx,comphelper/componentfactory.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/containermultiplexer.hxx,comphelper/containermultiplexer.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/broadcasthelper.hxx,comphelper/broadcasthelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/numbers.hxx,comphelper/numbers.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/evtlistenerhlp.hxx,comphelper/evtlistenerhlp.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/optional.hxx,comphelper/optional.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/componentbase.hxx,comphelper/componentbase.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/componentguard.hxx,comphelper/componentguard.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/InlineContainer.hxx,comphelper/InlineContainer.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propertybag.hxx,comphelper/propertybag.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/embeddedobjectcontainer.hxx,comphelper/embeddedobjectcontainer.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/anytostring.hxx,comphelper/anytostring.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/implementationreference.hxx,comphelper/implementationreference.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/proparrhlp.hxx,comphelper/proparrhlp.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/PropertyInfoHash.hxx,comphelper/PropertyInfoHash.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propstate.hxx,comphelper/propstate.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/proxyaggregation.hxx,comphelper/proxyaggregation.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/oslfile2streamwrap.hxx,comphelper/oslfile2streamwrap.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/genericpropertyset.hxx,comphelper/genericpropertyset.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/makesequence.hxx,comphelper/makesequence.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/ofopxmlhelper.hxx,comphelper/ofopxmlhelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/SettingsHelper.hxx,comphelper/SettingsHelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/string.hxx,comphelper/string.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/weak.hxx,comphelper/weak.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/componentmodule.hxx,comphelper/componentmodule.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/container.hxx,comphelper/container.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/seqstream.hxx,comphelper/seqstream.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/namecontainer.hxx,comphelper/namecontainer.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/processfactory.hxx,comphelper/processfactory.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/sequenceashashmap.hxx,comphelper/sequenceashashmap.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/configurationhelper.hxx,comphelper/configurationhelper.hxx)) diff --git a/comphelper/inc/comphelper/anycompare.hxx b/comphelper/inc/comphelper/anycompare.hxx new file mode 100755 index 000000000000..03f41e108ba9 --- /dev/null +++ b/comphelper/inc/comphelper/anycompare.hxx @@ -0,0 +1,226 @@ +/************************************************************************* + * 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. + * + ************************************************************************/ + +#ifndef COMPHELPER_ANYCOMPARE_HXX +#define COMPHELPER_ANYCOMPARE_HXX + +#include "comphelper/comphelperdllapi.h" + +/** === begin UNO includes === **/ +#include <com/sun/star/lang/IllegalArgumentException.hpp> +#include <com/sun/star/i18n/XCollator.hpp> +/** === end UNO includes === **/ + +#include <comphelper/extract.hxx> + +#include <functional> +#include <memory> + +//...................................................................................................................... +namespace comphelper +{ +//...................................................................................................................... + + //================================================================================================================== + //= IKeyPredicateLess + //================================================================================================================== + class SAL_NO_VTABLE IKeyPredicateLess + { + public: + virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const = 0; + virtual ~IKeyPredicateLess() {} + }; + + //================================================================================================================== + //= LessPredicateAdapter + //================================================================================================================== + struct LessPredicateAdapter : public ::std::binary_function< ::com::sun::star::uno::Any, ::com::sun::star::uno::Any, bool > + { + LessPredicateAdapter( const IKeyPredicateLess& _predicate ) + :m_predicate( _predicate ) + { + } + + bool operator()( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const + { + return m_predicate.isLess( _lhs, _rhs ); + } + + private: + IKeyPredicateLess const & m_predicate; + + private: + LessPredicateAdapter(); // never implemented + }; + + //================================================================================================================== + //= ScalarPredicateLess + //================================================================================================================== + template< typename SCALAR > + class ScalarPredicateLess : public IKeyPredicateLess + { + public: + virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const + { + SCALAR lhs(0), rhs(0); + if ( !( _lhs >>= lhs ) + || !( _rhs >>= rhs ) + ) + throw ::com::sun::star::lang::IllegalArgumentException(); + return lhs < rhs; + } + }; + + //================================================================================================================== + //= StringPredicateLess + //================================================================================================================== + class StringPredicateLess : public IKeyPredicateLess + { + public: + virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const + { + ::rtl::OUString lhs, rhs; + if ( !( _lhs >>= lhs ) + || !( _rhs >>= rhs ) + ) + throw ::com::sun::star::lang::IllegalArgumentException(); + return lhs < rhs; + } + }; + + //================================================================================================================== + //= StringCollationPredicateLess + //================================================================================================================== + class StringCollationPredicateLess : public IKeyPredicateLess + { + public: + StringCollationPredicateLess( ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator > const & i_collator ) + :m_collator( i_collator ) + { + } + + virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const + { + ::rtl::OUString lhs, rhs; + if ( !( _lhs >>= lhs ) + || !( _rhs >>= rhs ) + ) + throw ::com::sun::star::lang::IllegalArgumentException(); + return m_collator->compareString( lhs, rhs ) < 0; + } + + private: + ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator > const m_collator; + }; + + //================================================================================================================== + //= TypePredicateLess + //================================================================================================================== + class TypePredicateLess : public IKeyPredicateLess + { + public: + virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const + { + ::com::sun::star::uno::Type lhs, rhs; + if ( !( _lhs >>= lhs ) + || !( _rhs >>= rhs ) + ) + throw ::com::sun::star::lang::IllegalArgumentException(); + return lhs.getTypeName() < rhs.getTypeName(); + } + }; + + //================================================================================================================== + //= EnumPredicateLess + //================================================================================================================== + class EnumPredicateLess : public IKeyPredicateLess + { + public: + EnumPredicateLess( ::com::sun::star::uno::Type const & _enumType ) + :m_enumType( _enumType ) + { + } + + virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const + { + sal_Int32 lhs(0), rhs(0); + if ( !::cppu::enum2int( lhs, _lhs ) + || !::cppu::enum2int( rhs, _rhs ) + || !_lhs.getValueType().equals( m_enumType ) + || !_rhs.getValueType().equals( m_enumType ) + ) + throw ::com::sun::star::lang::IllegalArgumentException(); + return lhs < rhs; + } + + private: + ::com::sun::star::uno::Type const m_enumType; + }; + + //================================================================================================================== + //= InterfacePredicateLess + //================================================================================================================== + class InterfacePredicateLess : public IKeyPredicateLess + { + public: + virtual bool isLess( ::com::sun::star::uno::Any const & _lhs, ::com::sun::star::uno::Any const & _rhs ) const + { + if ( ( _lhs.getValueTypeClass() != ::com::sun::star::uno::TypeClass_INTERFACE ) + || ( _rhs.getValueTypeClass() != ::com::sun::star::uno::TypeClass_INTERFACE ) + ) + throw ::com::sun::star::lang::IllegalArgumentException(); + + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > lhs( _lhs, ::com::sun::star::uno::UNO_QUERY ); + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > rhs( _rhs, ::com::sun::star::uno::UNO_QUERY ); + return lhs.get() < rhs.get(); + } + }; + + //================================================================================================================== + //= getStandardLessPredicate + //================================================================================================================== + /** creates a default IKeyPredicateLess instance for the given UNO type + @param i_type + the type for which a predicate instance should be created + @param i_collator + specifies a collator instance to use, or <NULL/>. If <NULL/>, strings will be compared using the <code><</code> + operator, otherwise the collator will be used. The parameter is ignored if <arg>i_type</arg> does not specify + the string type. + @return + a default implementation of IKeyPredicateLess, which is able to compare values of the given type. If no + such default implementation is known for the given type, then <NULL/> is returned. + */ + ::std::auto_ptr< IKeyPredicateLess > COMPHELPER_DLLPUBLIC + getStandardLessPredicate( + ::com::sun::star::uno::Type const & i_type, + ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator > const & i_collator + ); + +//...................................................................................................................... +} // namespace comphelper +//...................................................................................................................... + +#endif // COMPHELPER_ANYCOMPARE_HXX diff --git a/comphelper/inc/comphelper/componentguard.hxx b/comphelper/inc/comphelper/componentguard.hxx new file mode 100755 index 000000000000..820b901a5c55 --- /dev/null +++ b/comphelper/inc/comphelper/componentguard.hxx @@ -0,0 +1,70 @@ +/************************************************************************* + * 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. + * + ************************************************************************/ + +#ifndef COMPHELPER_COMPONENTGUARD_HXX +#define COMPHELPER_COMPONENTGUARD_HXX + +/** === begin UNO includes === **/ +#include <com/sun/star/lang/DisposedException.hpp> +/** === end UNO includes === **/ + +#include <cppuhelper/weak.hxx> +#include <cppuhelper/interfacecontainer.hxx> + +//...................................................................................................................... +namespace comphelper +{ +//...................................................................................................................... + + //================================================================================================================== + //= ComponentGuard + //================================================================================================================== + class ComponentGuard + { + public: + ComponentGuard( ::cppu::OWeakObject& i_component, ::cppu::OBroadcastHelper & i_broadcastHelper ) + :m_aGuard( i_broadcastHelper.rMutex ) + { + if ( i_broadcastHelper.bDisposed ) + throw ::com::sun::star::lang::DisposedException( ::rtl::OUString(), &i_component ); + } + + ~ComponentGuard() + { + } + + void clear() { m_aGuard.clear(); } + void reset() { m_aGuard.reset(); } + + private: + ::osl::ResettableMutexGuard m_aGuard; + }; + +//...................................................................................................................... +} // namespace comphelper +//...................................................................................................................... + +#endif // COMPHELPER_COMPONENTGUARD_HXX diff --git a/comphelper/prj/build.lst b/comphelper/prj/build.lst index 91e836cabd68..01a022a0e0bc 100644 --- a/comphelper/prj/build.lst +++ b/comphelper/prj/build.lst @@ -1,15 +1,2 @@ -ph comphelper : cppuhelper ucbhelper offuh vos salhelper LIBXSLT:libxslt NULL -ph comphelper usr1 - all ph_mkout NULL -ph comphelper\inc nmake - all ph_inc NULL -ph comphelper\source\container nmake - all ph_container ph_inc NULL -ph comphelper\source\eventattachermgr nmake - all ph_evtatmgr ph_inc NULL -ph comphelper\source\misc nmake - all ph_misc ph_inc NULL -ph comphelper\source\processfactory nmake - all ph_procfact ph_inc NULL -ph comphelper\source\property nmake - all ph_property ph_inc NULL -ph comphelper\source\streaming nmake - all ph_streaming ph_inc NULL -ph comphelper\source\compare nmake - all ph_compare ph_inc NULL -ph comphelper\source\officeinstdir nmake - all ph_officeinstdir ph_inc NULL -ph comphelper\source\xml nmake - all ph_xml NULL -ph comphelper\util nmake - all ph_util ph_container ph_evtatmgr ph_misc ph_procfact ph_property ph_streaming ph_compare ph_officeinstdir ph_xml NULL - -ph comphelper\qa\complex\comphelper nmake - all ph_complex ph_util NULL +ch comphelper : cppuhelper ucbhelper offuh vos salhelper LIBXSLT:libxslt NULL +ch comphelper\prj nmake - all ch_all NULL diff --git a/comphelper/prj/d.lst b/comphelper/prj/d.lst index f05fcf0926dd..e69de29bb2d1 100644 --- a/comphelper/prj/d.lst +++ b/comphelper/prj/d.lst @@ -1,15 +0,0 @@ -..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll -..\%__SRC%\lib\*.lib %_DEST%\lib%_EXT%\*.lib -..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT% -..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib -..\%__SRC%\lib\*.sl %_DEST%\lib%_EXT%\*.sl -..\%__SRC%\bin\*.bin %_DEST%\bin%_EXT%\*.bin -..\%__SRC%\inc\*.bin %_DEST%\bin%_EXT%\*.bin - -mkdir: %_DEST%\inc%_EXT%\comphelper -..\inc\comphelper\*.hxx %_DEST%\inc%_EXT%\comphelper\*.hxx -..\inc\comphelper\*.h %_DEST%\inc%_EXT%\comphelper\*.h -mkdir: %_DEST%\inc%_EXT%\cppuhelper -..\inc\comphelper\extract.hxx %_DEST%\inc%_EXT%\cppuhelper\extract.hxx -..\version.mk %_DEST%\inc%_EXT%\comphelper\version.mk -..\%__SRC%\misc\comphelp4.component %_DEST%\xml%_EXT%\comphelp4.component diff --git a/comphelper/util/makefile.pmk b/comphelper/prj/makefile.mk index 9a2e65bb0be7..e312a7ccab65 100644 --- a/comphelper/util/makefile.pmk +++ b/comphelper/prj/makefile.mk @@ -25,11 +25,16 @@ # #************************************************************************* -.IF "$(GUI)" == "OS2" -STL_OS2_BUILDING=1 -.ENDIF +PRJ=.. +TARGET=prj + +.INCLUDE : settings.mk -# define COMPHELPER_DLLIMPLEMENTATION (see @ comphelperdllapi.h) -CDEFS += -DCOMPHELPER_DLLIMPLEMENTATION +.IF "$(VERBOSE)"!="" +VERBOSEFLAG := +.ELSE +VERBOSEFLAG := -s +.ENDIF -VISIBILITY_HIDDEN=TRUE +all: + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog diff --git a/comphelper/qa/complex/comphelper/makefile.mk b/comphelper/qa/complex/comphelper/makefile.mk deleted file mode 100644 index 238bbd5c991d..000000000000 --- a/comphelper/qa/complex/comphelper/makefile.mk +++ /dev/null @@ -1,54 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../../.. -PRJNAME = comphelper -TARGET = qa_complex_comphelper - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = complex/comphelper -JAVATESTFILES = \ - Map.java \ - SequenceOutputStreamUnitTest.java - -JAVAFILES = $(JAVATESTFILES) -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar jurt.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END - diff --git a/comphelper/source/compare/makefile.mk b/comphelper/source/compare/makefile.mk deleted file mode 100644 index 156701d1d969..000000000000 --- a/comphelper/source/compare/makefile.mk +++ /dev/null @@ -1,47 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/.. -PRJINC=..$/..$/inc -PRJNAME=comphelper -TARGET=compare - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files ------------------------------------- - -SLOFILES=$(SLO)$/AnyCompareFactory.obj - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - diff --git a/comphelper/source/container/enumerablemap.cxx b/comphelper/source/container/enumerablemap.cxx index 15241cd72dd6..a73983517751 100644 --- a/comphelper/source/container/enumerablemap.cxx +++ b/comphelper/source/container/enumerablemap.cxx @@ -24,11 +24,11 @@ * ************************************************************************/ -// MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_comphelper.hxx" #include "comphelper_module.hxx" #include "comphelper/anytostring.hxx" +#include "comphelper/anycompare.hxx" #include "comphelper/componentbase.hxx" #include "comphelper/componentcontext.hxx" #include "comphelper/extract.hxx" @@ -47,9 +47,7 @@ #include <rtl/ustrbuf.hxx> #include <typelib/typedescription.hxx> -#include <functional> #include <map> -#include <memory> #include <boost/shared_ptr.hpp> //........................................................................ @@ -79,26 +77,14 @@ namespace comphelper using ::com::sun::star::beans::Pair; using ::com::sun::star::uno::TypeClass; using ::com::sun::star::uno::TypeClass_VOID; - using ::com::sun::star::uno::TypeClass_CHAR; - using ::com::sun::star::uno::TypeClass_BOOLEAN; - using ::com::sun::star::uno::TypeClass_BYTE; - using ::com::sun::star::uno::TypeClass_SHORT; - using ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT; - using ::com::sun::star::uno::TypeClass_LONG; - using ::com::sun::star::uno::TypeClass_UNSIGNED_LONG; - using ::com::sun::star::uno::TypeClass_HYPER; - using ::com::sun::star::uno::TypeClass_UNSIGNED_HYPER; - using ::com::sun::star::uno::TypeClass_FLOAT; - using ::com::sun::star::uno::TypeClass_DOUBLE; - using ::com::sun::star::uno::TypeClass_STRING; - using ::com::sun::star::uno::TypeClass_TYPE; - using ::com::sun::star::uno::TypeClass_ENUM; - using ::com::sun::star::uno::TypeClass_INTERFACE; using ::com::sun::star::uno::TypeClass_UNKNOWN; using ::com::sun::star::uno::TypeClass_ANY; using ::com::sun::star::uno::TypeClass_EXCEPTION; using ::com::sun::star::uno::TypeClass_STRUCT; using ::com::sun::star::uno::TypeClass_UNION; + using ::com::sun::star::uno::TypeClass_FLOAT; + using ::com::sun::star::uno::TypeClass_DOUBLE; + using ::com::sun::star::uno::TypeClass_INTERFACE; using ::com::sun::star::lang::XServiceInfo; using ::com::sun::star::uno::XComponentContext; using ::com::sun::star::container::XEnumeration; @@ -108,136 +94,6 @@ namespace comphelper /** === end UNO using === **/ //==================================================================== - //= IKeyPredicateLess - //==================================================================== - class SAL_NO_VTABLE IKeyPredicateLess - { - public: - virtual bool isLess( const Any& _lhs, const Any& _rhs ) const = 0; - virtual ~IKeyPredicateLess() {} - }; - - //==================================================================== - //= LessPredicateAdapter - //==================================================================== - struct LessPredicateAdapter : public ::std::binary_function< Any, Any, bool > - { - LessPredicateAdapter( const IKeyPredicateLess& _predicate ) - :m_predicate( _predicate ) - { - } - - bool operator()( const Any& _lhs, const Any& _rhs ) const - { - return m_predicate.isLess( _lhs, _rhs ); - } - - private: - const IKeyPredicateLess& m_predicate; - - private: - LessPredicateAdapter(); // never implemented - }; - - //==================================================================== - //= ScalarPredicateLess - //==================================================================== - template< typename SCALAR > - class ScalarPredicateLess : public IKeyPredicateLess - { - public: - virtual bool isLess( const Any& _lhs, const Any& _rhs ) const - { - SCALAR lhs(0), rhs(0); - if ( !( _lhs >>= lhs ) - || !( _rhs >>= rhs ) - ) - throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), NULL, 1 ); - return lhs < rhs; - } - }; - - //==================================================================== - //= StringPredicateLess - //==================================================================== - class StringPredicateLess : public IKeyPredicateLess - { - public: - virtual bool isLess( const Any& _lhs, const Any& _rhs ) const - { - ::rtl::OUString lhs, rhs; - if ( !( _lhs >>= lhs ) - || !( _rhs >>= rhs ) - ) - throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), NULL, 1 ); - return lhs < rhs; - } - }; - - //==================================================================== - //= TypePredicateLess - //==================================================================== - class TypePredicateLess : public IKeyPredicateLess - { - public: - virtual bool isLess( const Any& _lhs, const Any& _rhs ) const - { - Type lhs, rhs; - if ( !( _lhs >>= lhs ) - || !( _rhs >>= rhs ) - ) - throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), NULL, 1 ); - return lhs.getTypeName() < rhs.getTypeName(); - } - }; - - //==================================================================== - //= EnumPredicateLess - //==================================================================== - class EnumPredicateLess : public IKeyPredicateLess - { - public: - EnumPredicateLess( const Type& _enumType ) - :m_enumType( _enumType ) - { - } - - virtual bool isLess( const Any& _lhs, const Any& _rhs ) const - { - sal_Int32 lhs(0), rhs(0); - if ( !::cppu::enum2int( lhs, _lhs ) - || !::cppu::enum2int( rhs, _rhs ) - || !_lhs.getValueType().equals( m_enumType ) - || !_rhs.getValueType().equals( m_enumType ) - ) - throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), NULL, 1 ); - return lhs < rhs; - } - - private: - const Type m_enumType; - }; - - //==================================================================== - //= InterfacePredicateLess - //==================================================================== - class InterfacePredicateLess : public IKeyPredicateLess - { - public: - virtual bool isLess( const Any& _lhs, const Any& _rhs ) const - { - if ( ( _lhs.getValueTypeClass() != TypeClass_INTERFACE ) - || ( _rhs.getValueTypeClass() != TypeClass_INTERFACE ) - ) - throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), NULL, 1 ); - - Reference< XInterface > lhs( _lhs, UNO_QUERY ); - Reference< XInterface > rhs( _rhs, UNO_QUERY ); - return lhs.get() < rhs.get(); - } - }; - - //==================================================================== //= MapData //==================================================================== class IMapModificationListener; @@ -549,58 +405,9 @@ namespace comphelper throw IllegalTypeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported value type." ) ), *this ); // create the comparator for the KeyType, and throw if the type is not supported - TypeClass eKeyTypeClass = aKeyType.getTypeClass(); - ::std::auto_ptr< IKeyPredicateLess > pComparator; - switch ( eKeyTypeClass ) - { - case TypeClass_CHAR: - pComparator.reset( new ScalarPredicateLess< sal_Unicode >() ); - break; - case TypeClass_BOOLEAN: - pComparator.reset( new ScalarPredicateLess< sal_Bool >() ); - break; - case TypeClass_BYTE: - pComparator.reset( new ScalarPredicateLess< sal_Int8 >() ); - break; - case TypeClass_SHORT: - pComparator.reset( new ScalarPredicateLess< sal_Int16 >() ); - break; - case TypeClass_UNSIGNED_SHORT: - pComparator.reset( new ScalarPredicateLess< sal_uInt16 >() ); - break; - case TypeClass_LONG: - pComparator.reset( new ScalarPredicateLess< sal_Int32 >() ); - break; - case TypeClass_UNSIGNED_LONG: - pComparator.reset( new ScalarPredicateLess< sal_uInt32 >() ); - break; - case TypeClass_HYPER: - pComparator.reset( new ScalarPredicateLess< sal_Int64 >() ); - break; - case TypeClass_UNSIGNED_HYPER: - pComparator.reset( new ScalarPredicateLess< sal_uInt64 >() ); - break; - case TypeClass_FLOAT: - pComparator.reset( new ScalarPredicateLess< float >() ); - break; - case TypeClass_DOUBLE: - pComparator.reset( new ScalarPredicateLess< double >() ); - break; - case TypeClass_STRING: - pComparator.reset( new StringPredicateLess() ); - break; - case TypeClass_TYPE: - pComparator.reset( new TypePredicateLess() ); - break; - case TypeClass_ENUM: - pComparator.reset( new EnumPredicateLess( aKeyType ) ); - break; - case TypeClass_INTERFACE: - pComparator.reset( new InterfacePredicateLess() ); - break; - default: + ::std::auto_ptr< IKeyPredicateLess > pComparator( getStandardLessPredicate( aKeyType, NULL ) ); + if ( !pComparator.get() ) throw IllegalTypeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported key type." ) ), *this ); - } // init members m_aData.m_aKeyType = aKeyType; diff --git a/comphelper/source/container/makefile.mk b/comphelper/source/container/makefile.mk deleted file mode 100644 index 97a066f9802a..000000000000 --- a/comphelper/source/container/makefile.mk +++ /dev/null @@ -1,55 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/.. -PRJINC=..$/..$/inc -PRJNAME=comphelper -TARGET=container - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files ------------------------------------- - -SLOFILES=\ - $(SLO)$/namecontainer.obj \ - $(SLO)$/enumhelper.obj \ - $(SLO)$/container.obj \ - $(SLO)$/containermultiplexer.obj \ - $(SLO)$/IndexedPropertyValuesContainer.obj \ - $(SLO)$/embeddedobjectcontainer.obj \ - $(SLO)$/NamedPropertyValuesContainer.obj \ - $(SLO)$/enumerablemap.obj - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - diff --git a/comphelper/source/eventattachermgr/makefile.mk b/comphelper/source/eventattachermgr/makefile.mk deleted file mode 100644 index 26aca0467d7d..000000000000 --- a/comphelper/source/eventattachermgr/makefile.mk +++ /dev/null @@ -1,50 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/.. -PRJINC=..$/..$/inc -PRJNAME=comphelper -TARGET=evtattmgr - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings common for the whole project ----- - - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files ------------------------------------- - -SLOFILES= $(SLO)$/eventattachermgr.obj - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - diff --git a/comphelper/source/misc/anycompare.cxx b/comphelper/source/misc/anycompare.cxx new file mode 100755 index 000000000000..a86174daf08e --- /dev/null +++ b/comphelper/source/misc/anycompare.cxx @@ -0,0 +1,131 @@ +/************************************************************************* + * 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 "precompiled_comphelper.hxx" + +#include "comphelper/anycompare.hxx" + +/** === begin UNO includes === **/ +/** === end UNO includes === **/ + +//...................................................................................................................... +namespace comphelper +{ +//...................................................................................................................... + + /** === begin UNO using === **/ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_SET_THROW; + using ::com::sun::star::uno::Exception; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::Type; + using ::com::sun::star::uno::TypeClass_CHAR; + using ::com::sun::star::uno::TypeClass_BOOLEAN; + using ::com::sun::star::uno::TypeClass_BYTE; + using ::com::sun::star::uno::TypeClass_SHORT; + using ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT; + using ::com::sun::star::uno::TypeClass_LONG; + using ::com::sun::star::uno::TypeClass_UNSIGNED_LONG; + using ::com::sun::star::uno::TypeClass_HYPER; + using ::com::sun::star::uno::TypeClass_UNSIGNED_HYPER; + using ::com::sun::star::uno::TypeClass_FLOAT; + using ::com::sun::star::uno::TypeClass_DOUBLE; + using ::com::sun::star::uno::TypeClass_STRING; + using ::com::sun::star::uno::TypeClass_TYPE; + using ::com::sun::star::uno::TypeClass_ENUM; + using ::com::sun::star::uno::TypeClass_INTERFACE; + using ::com::sun::star::i18n::XCollator; + /** === end UNO using === **/ + + //------------------------------------------------------------------------------------------------------------------ + ::std::auto_ptr< IKeyPredicateLess > getStandardLessPredicate( Type const & i_type, Reference< XCollator > const & i_collator ) + { + ::std::auto_ptr< IKeyPredicateLess > pComparator; + switch ( i_type.getTypeClass() ) + { + case TypeClass_CHAR: + pComparator.reset( new ScalarPredicateLess< sal_Unicode >() ); + break; + case TypeClass_BOOLEAN: + pComparator.reset( new ScalarPredicateLess< sal_Bool >() ); + break; + case TypeClass_BYTE: + pComparator.reset( new ScalarPredicateLess< sal_Int8 >() ); + break; + case TypeClass_SHORT: + pComparator.reset( new ScalarPredicateLess< sal_Int16 >() ); + break; + case TypeClass_UNSIGNED_SHORT: + pComparator.reset( new ScalarPredicateLess< sal_uInt16 >() ); + break; + case TypeClass_LONG: + pComparator.reset( new ScalarPredicateLess< sal_Int32 >() ); + break; + case TypeClass_UNSIGNED_LONG: + pComparator.reset( new ScalarPredicateLess< sal_uInt32 >() ); + break; + case TypeClass_HYPER: + pComparator.reset( new ScalarPredicateLess< sal_Int64 >() ); + break; + case TypeClass_UNSIGNED_HYPER: + pComparator.reset( new ScalarPredicateLess< sal_uInt64 >() ); + break; + case TypeClass_FLOAT: + pComparator.reset( new ScalarPredicateLess< float >() ); + break; + case TypeClass_DOUBLE: + pComparator.reset( new ScalarPredicateLess< double >() ); + break; + case TypeClass_STRING: + if ( i_collator.is() ) + pComparator.reset( new StringCollationPredicateLess( i_collator ) ); + else + pComparator.reset( new StringPredicateLess() ); + break; + case TypeClass_TYPE: + pComparator.reset( new TypePredicateLess() ); + break; + case TypeClass_ENUM: + pComparator.reset( new EnumPredicateLess( i_type ) ); + break; + case TypeClass_INTERFACE: + pComparator.reset( new InterfacePredicateLess() ); + break; + default: + break; + } + return pComparator; + } + +//...................................................................................................................... +} // namespace comphelper +//...................................................................................................................... diff --git a/comphelper/source/misc/makefile.mk b/comphelper/source/misc/makefile.mk deleted file mode 100644 index 0bb4defb4165..000000000000 --- a/comphelper/source/misc/makefile.mk +++ /dev/null @@ -1,100 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/.. -PRJNAME=comphelper -TARGET=misc - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files ------------------------------------- - -SLOFILES= \ - $(SLO)$/accessiblecomponenthelper.obj \ - $(SLO)$/accessiblecontexthelper.obj \ - $(SLO)$/accessibleeventbuffer.obj \ - $(SLO)$/accessibleeventnotifier.obj \ - $(SLO)$/accessiblekeybindinghelper.obj \ - $(SLO)$/accessibleselectionhelper.obj \ - $(SLO)$/accessibletexthelper.obj \ - $(SLO)$/accessiblewrapper.obj \ - $(SLO)$/accimplaccess.obj \ - $(SLO)$/anytostring.obj \ - $(SLO)$/asyncnotification.obj \ - $(SLO)$/componentcontext.obj \ - $(SLO)$/componentmodule.obj \ - $(SLO)$/configurationhelper.obj \ - $(SLO)$/docpasswordhelper.obj \ - $(SLO)$/docpasswordrequest.obj \ - $(SLO)$/documentinfo.obj \ - $(SLO)$/evtmethodhelper.obj \ - $(SLO)$/documentiologring.obj \ - $(SLO)$/evtlistenerhlp.obj \ - $(SLO)$/ihwrapnofilter.obj \ - $(SLO)$/instancelocker.obj \ - $(SLO)$/interaction.obj \ - $(SLO)$/legacysingletonfactory.obj \ - $(SLO)$/listenernotification.obj \ - $(SLO)$/locale.obj \ - $(SLO)$/logging.obj \ - $(SLO)$/mediadescriptor.obj \ - $(SLO)$/mimeconfighelper.obj \ - $(SLO)$/namedvaluecollection.obj \ - $(SLO)$/numberedcollection.obj \ - $(SLO)$/numbers.obj \ - $(SLO)$/officeresourcebundle.obj \ - $(SLO)$/officerestartmanager.obj \ - $(SLO)$/proxyaggregation.obj \ - $(SLO)$/regpathhelper.obj \ - $(SLO)$/scopeguard.obj \ - $(SLO)$/SelectionMultiplex.obj \ - $(SLO)$/sequenceashashmap.obj \ - $(SLO)$/sequence.obj \ - $(SLO)$/servicedecl.obj \ - $(SLO)$/serviceinfohelper.obj \ - $(SLO)$/sharedmutex.obj \ - $(SLO)$/synchronousdispatch.obj \ - $(SLO)$/storagehelper.obj \ - $(SLO)$/string.obj \ - $(SLO)$/types.obj \ - $(SLO)$/uieventslogger.obj \ - $(SLO)$/weakeventlistener.obj \ - $(SLO)$/weak.obj \ - $(SLO)$/comphelper_module.obj \ - $(SLO)$/comphelper_services.obj \ - $(SLO)$/componentbase.obj \ - $(SLO)$/stillreadwriteinteraction.obj \ - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - diff --git a/comphelper/source/officeinstdir/makefile.mk b/comphelper/source/officeinstdir/makefile.mk deleted file mode 100644 index dfe195da662a..000000000000 --- a/comphelper/source/officeinstdir/makefile.mk +++ /dev/null @@ -1,50 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/.. -PRJINC=..$/..$/inc -PRJNAME=comphelper -TARGET=officeinstdir - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings common for the whole project ----- - - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files ------------------------------------- - -SLOFILES= $(SLO)$/officeinstallationdirectories.obj - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - diff --git a/comphelper/source/processfactory/makefile.mk b/comphelper/source/processfactory/makefile.mk deleted file mode 100644 index 531291bb3a15..000000000000 --- a/comphelper/source/processfactory/makefile.mk +++ /dev/null @@ -1,52 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/.. -PRJNAME=comphelper -TARGET=processfactory - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings common for the whole project ----- - - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Types ------------------------------------- - -# --- Files ------------------------------------- - -SLOFILES= $(SLO)$/processfactory.obj \ - $(SLO)$/componentfactory.obj - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - diff --git a/comphelper/source/property/makefile.mk b/comphelper/source/property/makefile.mk deleted file mode 100644 index 1bcdb4c8dd63..000000000000 --- a/comphelper/source/property/makefile.mk +++ /dev/null @@ -1,65 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/.. -PRJINC=..$/..$/inc -PRJNAME=comphelper -TARGET=property - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files ------------------------------------- - -SLOFILES= \ - $(SLO)$/MasterPropertySetInfo.obj \ - $(SLO)$/MasterPropertySet.obj \ - $(SLO)$/ChainablePropertySetInfo.obj \ - $(SLO)$/ChainablePropertySet.obj \ - $(SLO)$/TypeGeneration.obj \ - $(SLO)$/genericpropertyset.obj\ - $(SLO)$/propertysethelper.obj \ - $(SLO)$/propertysetinfo.obj \ - $(SLO)$/composedprops.obj \ - $(SLO)$/propagg.obj \ - $(SLO)$/property.obj \ - $(SLO)$/propmultiplex.obj \ - $(SLO)$/propstate.obj \ - $(SLO)$/propertystatecontainer.obj \ - $(SLO)$/propertycontainer.obj \ - $(SLO)$/propertycontainerhelper.obj \ - $(SLO)$/propertybag.obj \ - $(SLO)$/opropertybag.obj - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - diff --git a/comphelper/source/streaming/makefile.mk b/comphelper/source/streaming/makefile.mk deleted file mode 100644 index 2a6ea38ca65e..000000000000 --- a/comphelper/source/streaming/makefile.mk +++ /dev/null @@ -1,54 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/.. -PRJNAME=comphelper -TARGET=streaming - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files ------------------------------------- - -SLOFILES= $(SLO)$/basicio.obj \ - $(SLO)$/oslfile2streamwrap.obj \ - $(SLO)$/seqstream.obj \ - $(SLO)$/seqinputstreamserv.obj \ - $(SLO)$/seqoutputstreamserv.obj \ - $(SLO)$/streamsection.obj \ - $(SLO)$/seekableinput.obj \ - $(SLO)$/otransactedfilestream.obj \ - $(SLO)$/memorystream.obj - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - diff --git a/comphelper/source/xml/makefile.mk b/comphelper/source/xml/makefile.mk deleted file mode 100644 index 8fa34b2477a2..000000000000 --- a/comphelper/source/xml/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=..$/.. -PRJNAME=comphelper -TARGET=xml - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files ------------------------------------- - -SLOFILES= \ - $(SLO)$/ofopxmlhelper.obj \ - $(SLO)$/attributelist.obj - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - diff --git a/comphelper/test/uno_iterators/uno_iterators.cxx b/comphelper/test/uno_iterators/uno_iterators.cxx deleted file mode 100644 index 6f45b16cf6da..000000000000 --- a/comphelper/test/uno_iterators/uno_iterators.cxx +++ /dev/null @@ -1,218 +0,0 @@ -/************************************************************************* - * 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 <algorithm> -#include <comphelper/stlunosequence.hxx> -#include <com/sun/star/uno/Sequence.hxx> -#include <iostream> -#include <list> -#include <rtl/textenc.h> -#include <rtl/ustrbuf.hxx> -#include <rtl/ustring.hxx> -#include <vector> - -using namespace ::comphelper; -using namespace ::com::sun::star::uno; -using namespace ::rtl; -using namespace ::std; - -// some helpers for testing (imperative) -void fill_testdata(Sequence<OUString>& seq) -{ - OUStringBuffer buf; - for(sal_Int32 i=0; i<seq.getLength(); i++) - { - buf.appendAscii("Sampletext "); - buf.append(i); - seq[i] = buf.makeStringAndClear(); - } -} - -void print_oustring(const OUString& ustr) -{ cout << OUStringToOString(ustr, RTL_TEXTENCODING_ASCII_US).getStr() << endl; } - -void print_sequence(const Sequence<OUString>& seq) -{ - cout << "Sequence of " << seq.getLength() << " OUStrings: " << endl; - for(sal_Int32 i=0; i<seq.getLength(); i++) - print_oustring(seq[i]); - cout << endl; -} - -// some helpers for testing (functional) -class TestdataGenerator -{ - public: - TestdataGenerator() : m_Index(0) {}; - OUString operator()() { return m_Buf.appendAscii("Sampletext ").append(m_Index++).makeStringAndClear(); }; - OUStringBuffer m_Buf; - sal_Int32 m_Index; -}; - -void fill_testdata_stl(StlUnoSequence<OUString>& stl_seq) -{ - generate(stl_seq.begin(), stl_seq.end(), TestdataGenerator()); -} - -void print_sequence_stl(const StlUnoSequence<OUString>& stl_seq) -{ - cout << "Sequence of " << stl_seq.size() << " OUStrings: " << endl; - for_each(stl_seq.begin(), stl_seq.end(), &print_oustring); - cout << endl; -} - - -// code samples - -// imperative loops (just to show they work, using for_each would be better most of the time -void classic_loops() -{ - Sequence<OUString> s(10); - fill_testdata(s); - StlUnoSequence<OUString>::iterator stl_s_it; - - cout << "for iteration" << endl; - for(stl_s_it = stl_begin(s); stl_s_it != stl_end(s); stl_s_it++) - cout << OUStringToOString(*stl_s_it, RTL_TEXTENCODING_ASCII_US).getStr() << endl; - - cout << "reverse for iteration" << endl; - for(stl_s_it = stl_end(s); stl_s_it != stl_begin(s); stl_s_it--) - cout << OUStringToOString(*(stl_s_it-1), RTL_TEXTENCODING_ASCII_US).getStr() << endl; - - cout << "skipping for iteration" << endl; - for(stl_s_it = stl_begin(s); stl_s_it != stl_end(s); stl_s_it+=2) - cout << OUStringToOString(*stl_s_it, RTL_TEXTENCODING_ASCII_US).getStr() << endl; - - cout << "skipping reverse for iteration" << endl; - for(stl_s_it = stl_end(s); stl_s_it != stl_begin(s); stl_s_it-=2) - std::cout << OUStringToOString(*(stl_s_it-1), RTL_TEXTENCODING_ASCII_US).getStr() << endl; -} - -void stl_algos() -{ - Sequence<OUString> s(10); - fill_testdata(s); - - random_shuffle(stl_begin(s), stl_end(s)); - cout << "shuffed" << std::endl; - print_sequence(s); - - sort(stl_begin(s), stl_end(s)); - cout << "sorted" << std::endl; - print_sequence(s); -} - -void stl_conversions() -{ - Sequence<OUString> s(10); - fill_testdata(s); - StlUnoSequence<OUString> stl_s = StlUnoSequence<OUString>::createInstance(s); - - // convert to stl::vector, modify in vector, copy back, print - cout << "vector conversion" << endl; - vector<OUString> vec(stl_s.begin(), stl_s.end()); - vec[2] = OUString::createFromAscii("changed in vector"); - copy(vec.begin(), vec.end(), stl_s.begin()); - print_sequence(s); - - // convert to stl::list, modify in list, copy back, print - cout << "list conversion" << endl; - list<OUString> l(stl_s.begin(), stl_s.end()); - l.pop_back(); - l.push_back(OUString::createFromAscii("changed in list")); - copy(l.begin(), l.end(), stl_s.begin()); - print_sequence(s); -} - -// inserts the second half of the second sequence after the first element of the first sequence -void stl_inserting() -{ - Sequence<OUString> s1(10); - Sequence<OUString> s2(10); - Sequence<OUString> result(15); - StlUnoSequence<OUString> stl_s1 = StlUnoSequence<OUString>::createInstance(s1); - StlUnoSequence<OUString> stl_s2 = StlUnoSequence<OUString>::createInstance(s2); - StlUnoSequence<OUString> stl_result = StlUnoSequence<OUString>::createInstance(result); - fill_testdata(s1); - fill_testdata(s2); - - list<OUString> temp(stl_s1.begin(), stl_s1.end()); - copy(stl_s2.begin()+5, stl_s2.end(), insert_iterator<list<OUString> >(temp, ++temp.begin())); - copy(temp.begin(), temp.end(), stl_result.begin()); - print_sequence(result); -} - -void stl_compare() -{ - Sequence<OUString> s1(10); - Sequence<OUString> s2(10); - StlUnoSequence<OUString> stl_s1 = StlUnoSequence<OUString>::createInstance(s1); - StlUnoSequence<OUString> stl_s2 = StlUnoSequence<OUString>::createInstance(s2); - if (stl_s1 == stl_s2) - cout << "sequences are equal." << endl; - s2[9] = OUString::createFromAscii("ZZZZZ"); - if(stl_s1 < stl_s2) - cout << "first sequence is smaller." << endl; -} - -void stl_const_sequence() -{ - const Sequence<OUString> s(10); - for(StlUnoSequence<OUString>::const_iterator stl_s_it = stl_begin(s); stl_s_it != stl_end(s); stl_s_it++) - cout << OUStringToOString(*stl_s_it, RTL_TEXTENCODING_ASCII_US).getStr() << endl; -} - -void stl_helpers() -{ - Sequence<OUString> s(10); - StlUnoSequence<OUString> stl_s = StlUnoSequence<OUString>::createInstance(s); - fill_testdata_stl(stl_s); - print_sequence_stl(stl_s); -} - -int main() -{ - cout << "--- CLASSIC LOOPS" << endl; - classic_loops(); - - cout << "--- SOME STL ALGORITHMS" << endl; - stl_algos(); - - cout << "--- SOME STL CONVERSIONS" << endl; - stl_conversions(); - - cout << "--- INSERTING IN SEQUENCE" << endl; - stl_inserting(); - - cout << "--- COMPARING" << endl; - stl_compare(); - - cout << "--- CONST SEQUENCE" << endl; - stl_const_sequence(); - - cout << "--- HELPERS IN STL-STYLE" << endl; - stl_helpers(); -} diff --git a/comphelper/util/comphelp4.component b/comphelper/util/comphelp.component index 10d23d48bcea..10d23d48bcea 100644 --- a/comphelper/util/comphelp4.component +++ b/comphelper/util/comphelp.component diff --git a/comphelper/util/exports.dxp b/comphelper/util/exports.dxp deleted file mode 100644 index 0cb5620a1603..000000000000 --- a/comphelper/util/exports.dxp +++ /dev/null @@ -1,2 +0,0 @@ -component_getImplementationEnvironment -component_getFactory
\ No newline at end of file diff --git a/comphelper/util/makefile.mk b/comphelper/util/makefile.mk deleted file mode 100644 index 62e66672a1cb..000000000000 --- a/comphelper/util/makefile.mk +++ /dev/null @@ -1,78 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=.. -PRJNAME=comphelper -TARGET=comphelper - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/version.mk - -# --- Library ----------------------------------- - -LIB1TARGET= $(SLB)$/$(TARGET).lib -LIB1FILES= $(SLB)$/container.lib \ - $(SLB)$/evtattmgr.lib \ - $(SLB)$/misc.lib \ - $(SLB)$/processfactory.lib \ - $(SLB)$/property.lib \ - $(SLB)$/streaming.lib \ - $(SLB)$/compare.lib \ - $(SLB)$/officeinstdir.lib \ - $(SLB)$/xml.lib - -SHL1TARGET=$(COMPHLP_TARGET)$(COMPHLP_MAJOR)$(COMID) -.IF "$(GUI)" == "OS2" -SHL1TARGET=comph$(COMPHLP_MAJOR) -.ENDIF -SHL1STDLIBS= \ - $(SALLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(UCBHELPERLIB) \ - $(VOSLIB) - -SHL1DEPN= -SHL1IMPLIB= i$(COMPHLP_TARGET) -SHL1USE_EXPORTS=name -SHL1LIBS= $(LIB1TARGET) -SHL1DEF= $(MISC)$/$(SHL1TARGET).def - -DEF1NAME= $(SHL1TARGET) -DEFLIB1NAME=$(TARGET) - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - -ALLTAR : $(MISC)/comphelp4.component - -$(MISC)/comphelp4.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ - comphelp4.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt comphelp4.component |