summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbasic/prj/build.lst2
-rw-r--r--basic/source/classes/sbxmod.cxx2
-rw-r--r--boost/boost_1_39_0.patch196
-rw-r--r--boost/makefile.mk2
-rw-r--r--boost/prj/d.lst10
-rw-r--r--bridges/source/jni_uno/jni_uno2java.cxx2
-rw-r--r--chart2/prj/build.lst1
-rw-r--r--comphelper/inc/comphelper/storagehelper.hxx9
-rw-r--r--comphelper/qa/complex/makefile.mk14
-rw-r--r--comphelper/source/misc/storagehelper.cxx27
-rw-r--r--configmgr/prj/d.lst11
-rw-r--r--configmgr/source/access.cxx2
-rw-r--r--configmgr/source/components.cxx10
-rw-r--r--configmgr/source/groupnode.cxx12
-rw-r--r--configmgr/source/groupnode.hxx4
-rw-r--r--configmgr/source/localizedpropertynode.cxx2
-rw-r--r--configmgr/source/localizedpropertynode.hxx2
-rw-r--r--configmgr/source/localizedvaluenode.cxx2
-rw-r--r--configmgr/source/localizedvaluenode.hxx2
-rw-r--r--configmgr/source/makefile.mk4
-rw-r--r--configmgr/source/node.hxx2
-rw-r--r--configmgr/source/nodemap.cxx2
-rw-r--r--configmgr/source/propertynode.cxx2
-rw-r--r--configmgr/source/propertynode.hxx2
-rw-r--r--configmgr/source/services.cxx17
-rw-r--r--configmgr/source/setnode.cxx11
-rw-r--r--configmgr/source/setnode.hxx4
-rw-r--r--configmgr/source/update.cxx143
-rw-r--r--configmgr/source/update.hxx59
-rw-r--r--configmgr/source/xcsparser.cxx26
-rw-r--r--configmgr/source/xcuparser.cxx4
-rw-r--r--configure.in24
-rw-r--r--connectivity/prj/build.lst2
-rw-r--r--connectivity/qa/connectivity/tools/makefile.mk3
-rw-r--r--connectivity/source/drivers/calc/CTable.cxx9
-rwxr-xr-xcppu/test/AffineBridge/AffineBridge.test.pl72
-rw-r--r--cppu/test/AffineBridge/makefile.mk42
-rw-r--r--cppu/test/AntiEnvGuard/AntiEnvGuard.test.cxx131
-rw-r--r--cppu/test/AntiEnvGuard/makefile.mk46
-rw-r--r--cppu/test/EnvDcp/EnvDcp.test.cxx111
-rw-r--r--cppu/test/EnvGuard/EnvGuard.test.cxx152
-rw-r--r--cppu/test/EnvGuard/makefile.mk46
-rwxr-xr-xcppu/test/EnvStack/EnvStack.test.pl89
-rw-r--r--cppu/test/EnvStack_tester/EnvStack.tester.cxx200
-rw-r--r--cppu/test/EnvStack_tester/EnvStack.tester.hxx61
-rw-r--r--cppu/test/EnvStack_tester/ProbeEnv.cxx148
-rw-r--r--cppu/test/EnvStack_tester/ProbeEnv.def8
-rw-r--r--cppu/test/EnvStack_tester/makefile.mk126
-rw-r--r--cppu/test/Environment.test.cxx75
-rw-r--r--cppu/test/FreeReference/FreeReference.test.cxx414
-rw-r--r--cppu/test/IdentityMapping.test.cxx77
-rw-r--r--cppu/test/Map/Map.test.cxx258
-rw-r--r--cppu/test/Mapping.test.cxx77
-rw-r--r--cppu/test/ObjectFactory/CppObject.cxx103
-rw-r--r--cppu/test/ObjectFactory/CppObject.hxx62
-rw-r--r--cppu/test/ObjectFactory/ObjectFactory.cxx69
-rw-r--r--cppu/test/ObjectFactory/ObjectFactory.hxx48
-rw-r--r--cppu/test/ObjectFactory/UnoObject.cxx227
-rw-r--r--cppu/test/ObjectFactory/UnoObject.hxx43
-rw-r--r--cppu/test/ObjectFactory/callee.hxx39
-rw-r--r--cppu/test/ObjectFactory/empty.def5
-rw-r--r--cppu/test/ObjectFactory/makefile.mk48
-rw-r--r--cppu/test/Shield/Shield.test.cxx249
-rw-r--r--cppu/test/Shield/makefile.mk55
-rwxr-xr-xcppu/test/UnsafeBridge/UnsafeBridge.test.pl72
-rw-r--r--cppu/test/alignment.idl205
-rw-r--r--cppu/test/alignment/diagnose.h67
-rw-r--r--cppu/test/alignment/makefile.mk84
-rw-r--r--cppu/test/alignment/pass1.cxx240
-rw-r--r--cppu/test/cascade_mapping/TestMapping.cxx194
-rw-r--r--cppu/test/cascade_mapping/TestMapping.def11
-rw-r--r--cppu/test/cascade_mapping/TestProxy.cxx179
-rw-r--r--cppu/test/cascade_mapping/TestProxy.hxx70
-rwxr-xr-xcppu/test/cascade_mapping/cascade_mapping.test.pl91
-rw-r--r--cppu/test/cascade_mapping/makefile.mk90
-rw-r--r--cppu/test/cascade_mapping/path.test.cxx60
-rw-r--r--cppu/test/cascade_mapping/path.test.def8
-rw-r--r--cppu/test/cpputest.idl94
-rw-r--r--cppu/test/env_substs/env_subst.test.cxx95
-rw-r--r--cppu/test/env_substs/makefile.mk46
-rw-r--r--cppu/test/env_tester/TestEnvironment.cxx37
-rw-r--r--cppu/test/env_tester/TestEnvironment.def7
-rw-r--r--cppu/test/env_tester/env.tester.cxx104
-rw-r--r--cppu/test/env_tester/makefile.mk67
-rw-r--r--cppu/test/env_tester/purpenv.test.cxx401
-rw-r--r--cppu/test/env_tester/register.test.cxx234
-rw-r--r--cppu/test/language_binding.idl239
-rw-r--r--cppu/test/makefile.mk156
-rw-r--r--cppu/test/mapping_tester/Mapping.tester.hxx75
-rw-r--r--cppu/test/mapping_tester/mapping.tester.cxx456
-rw-r--r--cppu/test/purpenvhelper/TestEnv.cxx129
-rw-r--r--cppu/test/purpenvhelper/TestEnv.def8
-rw-r--r--cppu/test/purpenvhelper/makefile.mk54
-rw-r--r--cppu/test/purpose_envs/makefile.mk44
-rw-r--r--cppu/test/surrogate.hxx155
-rw-r--r--cppu/test/test_Cincludes.c9
-rw-r--r--cppu/test/test_cuno.c784
-rw-r--r--cppu/test/test_di.cxx888
-rw-r--r--cppu/test/test_sec.cxx211
-rw-r--r--cppu/test/testcppu.cxx1241
-rw-r--r--cppu/test/testthreadpool.cxx193
-rw-r--r--cppunit/ldflags.patch10
-rw-r--r--cppunit/makefile.mk4
-rw-r--r--dbaccess/prj/build.lst2
-rwxr-xr-xdbaccess/qa/complex/dbaccess/makefile.mk5
-rw-r--r--default_images/sc/res/calcteam.pngbin85491 -> 0 bytes
-rw-r--r--desktop/prj/build.lst2
-rw-r--r--desktop/source/app/makefile.mk1
-rw-r--r--desktop/source/deployment/makefile.mk3
-rw-r--r--desktop/source/deployment/misc/dp_dependencies.cxx16
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configuration.cxx12
-rw-r--r--desktop/source/migration/migration.cxx26
-rw-r--r--desktop/source/splash/makefile.mk1
-rw-r--r--desktop/test/deployment/boxt/Addons.xcu50
-rw-r--r--desktop/test/deployment/boxt/ProtocolHandler.xcu38
-rw-r--r--desktop/test/deployment/boxt/boxt.cxx235
-rw-r--r--desktop/test/deployment/boxt/description.xml39
-rw-r--r--desktop/test/deployment/boxt/makefile.mk70
-rw-r--r--desktop/test/deployment/boxt/manifest.xml37
-rw-r--r--desktop/util/makefile.mk71
-rw-r--r--editeng/source/editeng/eehtml.cxx21
-rw-r--r--editeng/source/editeng/eehtml.hxx1
-rw-r--r--extensions/prj/build.lst1
-rw-r--r--extensions/source/abpilot/datasourcehandling.cxx19
-rw-r--r--extensions/source/abpilot/datasourcehandling.hxx11
-rw-r--r--extensions/source/nsplugin/source/so_env.cxx21
-rw-r--r--extensions/source/nsplugin/source/so_env.hxx3
-rw-r--r--extensions/source/nsplugin/source/so_instance.cxx8
-rw-r--r--extensions/source/nsplugin/source/so_instance.hxx1
-rw-r--r--extensions/source/nsplugin/source/so_main.cxx10
-rw-r--r--extensions/source/propctrlr/browserline.cxx6
-rw-r--r--extensions/source/propctrlr/browserline.hxx1
-rw-r--r--extensions/source/propctrlr/browserlistbox.cxx19
-rw-r--r--extensions/source/propctrlr/browserlistbox.hxx2
-rw-r--r--extensions/source/propctrlr/handlerhelper.cxx8
-rw-r--r--extensions/source/propctrlr/handlerhelper.hxx8
-rw-r--r--extras/source/autotext/lang/af-ZA/acor_af-ZA.datbin61723 -> 5241 bytes
-rw-r--r--extras/source/autotext/lang/da/acor_da-DK.datbin68970 -> 7470 bytes
-rw-r--r--extras/source/autotext/lang/en-ZA/acor_en-ZA.datbin81042 -> 8244 bytes
-rw-r--r--extras/source/autotext/lang/mn/acor_mn-MN.datbin31558 -> 4249 bytes
-rw-r--r--extras/source/autotext/lang/pl/acor_pl-PL.datbin79983 -> 7913 bytes
-rw-r--r--filter/source/config/fragments/types/calc_Text_txt_csv_StarCalc.xcu2
-rw-r--r--filter/source/xslt/odf2xhtml/export/xhtml/body.xsl2
-rw-r--r--forms/prj/build.lst2
-rw-r--r--forms/qa/makefile.mk12
-rw-r--r--forms/qa/unoapi/forms.sce6
-rw-r--r--forms/qa/unoapi/knownissues.xcl11
-rw-r--r--forms/source/component/DatabaseForm.cxx10
-rw-r--r--forms/source/inc/InterfaceContainer.hxx2
-rw-r--r--forms/source/misc/InterfaceContainer.cxx117
-rw-r--r--formula/inc/formula/compiler.hrc8
-rw-r--r--formula/inc/formula/opcode.hxx4
-rw-r--r--formula/source/core/api/FormulaCompiler.cxx2
-rw-r--r--framework/inc/properties.h8
-rw-r--r--framework/inc/uielement/toolbarmanager.hxx2
-rw-r--r--framework/inc/uielement/uicommanddescription.hxx2
-rwxr-xr-xframework/qa/unoapi/knownissues.xcl3
-rw-r--r--framework/source/uielement/toolbarmanager.cxx96
-rw-r--r--framework/source/uielement/uicommanddescription.cxx4
-rw-r--r--instsetoo_native/util/openoffice.lst3
-rw-r--r--jurt/com/sun/star/lib/connections/pipe/PipeConnection.java24
-rw-r--r--jurt/prj/build.lst1
-rw-r--r--jurt/prj/d.lst3
-rw-r--r--jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection.c47
-rw-r--r--jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection.h53
-rw-r--r--jurt/source/pipe/jpipe.dxp5
-rw-r--r--jurt/source/pipe/makefile.mk96
-rw-r--r--jurt/source/pipe/wrapper/makefile.mk (renamed from cppu/test/EnvDcp/makefile.mk)36
-rw-r--r--jurt/source/pipe/wrapper/wrapper.c99
-rwxr-xr-xlibxml2/libxml2-2.6.31-mingw.patch24
-rw-r--r--libxml2/libxml2-2.6.31.patch412
-rw-r--r--libxml2/libxml2-configure.patch118
-rw-r--r--libxml2/libxml2-gnome599717.patch20
-rw-r--r--libxml2/libxml2-gnome602728.patch12
-rwxr-xr-xlibxml2/libxml2-mingw.patch24
-rw-r--r--libxml2/makefile.mk14
-rw-r--r--libxmlsec/makefile.mk17
-rw-r--r--libxmlsec/readme.txt2
-rw-r--r--libxmlsec/xmlsec1-configure.patch705
-rw-r--r--libxmlsec/xmlsec1-customkeymanage.patch428
-rw-r--r--libxmlsec/xmlsec1-mingw-keymgr-mscrypto.patch28
-rw-r--r--libxmlsec/xmlsec1-mingw32.patch191
-rw-r--r--libxmlsec/xmlsec1-noverify.patch10
-rw-r--r--libxmlsec/xmlsec1-nssdisablecallbacks.patch4
-rw-r--r--libxmlsec/xmlsec1-nssmangleciphers.patch4
-rw-r--r--libxmlsec/xmlsec1-olderlibxml2.patch23
-rw-r--r--libxslt/libxslt-configure.patch (renamed from libxslt/libxslt-1.1.24.patch)24
-rw-r--r--libxslt/libxslt-gnome602728.patch11
-rw-r--r--libxslt/libxslt-win_manifest.patch (renamed from libxslt/libxslt-1.1.24_win_manifest.patch)6
-rw-r--r--libxslt/libxsltversion.mk2
-rw-r--r--libxslt/makefile.mk6
-rw-r--r--np_sdk/mozsrc/npunix.c48
-rw-r--r--odk/cfgWin.js2
-rwxr-xr-x[-rw-r--r--]odk/configure.pl14
-rw-r--r--odk/setsdkenv_unix.csh.in8
-rw-r--r--odk/setsdkenv_unix.sh.in8
-rw-r--r--odk/settings/settings.mk12
-rw-r--r--offapi/com/sun/star/configuration/Update.idl (renamed from configmgr/inc/configmgr/detail/configmgrdllapi.hxx)22
-rw-r--r--offapi/com/sun/star/configuration/XUpdate.idl (renamed from configmgr/inc/configmgr/update.hxx)39
-rw-r--r--offapi/com/sun/star/configuration/makefile.mk2
-rwxr-xr-xoffapi/com/sun/star/document/DocumentProperties.idl2
-rw-r--r--offapi/com/sun/star/document/OfficeDocument.idl13
-rwxr-xr-xoffapi/com/sun/star/document/XDocumentProperties.idl30
-rw-r--r--offapi/com/sun/star/document/XDocumentPropertiesSupplier.idl2
-rw-r--r--offapi/com/sun/star/embed/Actions.idl2
-rw-r--r--offapi/com/sun/star/embed/Aspects.idl2
-rw-r--r--offapi/com/sun/star/embed/BaseStorage.idl2
-rw-r--r--offapi/com/sun/star/embed/DocumentCloser.idl2
-rw-r--r--offapi/com/sun/star/embed/ElementModes.idl2
-rw-r--r--offapi/com/sun/star/embed/EmbedMapUnits.idl2
-rw-r--r--offapi/com/sun/star/embed/EmbedMisc.idl2
-rw-r--r--offapi/com/sun/star/embed/EmbedStates.idl2
-rw-r--r--offapi/com/sun/star/embed/EmbedUpdateModes.idl2
-rw-r--r--offapi/com/sun/star/embed/EmbedVerbs.idl2
-rw-r--r--offapi/com/sun/star/embed/EmbeddedObjectDescriptor.idl2
-rw-r--r--offapi/com/sun/star/embed/EntryInitModes.idl2
-rw-r--r--offapi/com/sun/star/embed/FileSystemStorage.idl2
-rw-r--r--offapi/com/sun/star/embed/FileSystemStorageFactory.idl2
-rw-r--r--offapi/com/sun/star/embed/InsertedObjectInfo.idl2
-rw-r--r--offapi/com/sun/star/embed/InstanceLocker.idl2
-rw-r--r--offapi/com/sun/star/embed/InvalidStorageException.idl2
-rw-r--r--offapi/com/sun/star/embed/LinkageMisuseException.idl2
-rw-r--r--offapi/com/sun/star/embed/NeedsRunningStateException.idl2
-rw-r--r--offapi/com/sun/star/embed/NoVisualAreaSizeException.idl2
-rw-r--r--offapi/com/sun/star/embed/OLESimpleStorage.idl2
-rw-r--r--offapi/com/sun/star/embed/ObjectSaveVetoException.idl2
-rw-r--r--offapi/com/sun/star/embed/StateChangeInProgressException.idl2
-rw-r--r--offapi/com/sun/star/embed/Storage.idl2
-rw-r--r--offapi/com/sun/star/embed/StorageFactory.idl17
-rw-r--r--offapi/com/sun/star/embed/StorageFormats.idl (renamed from sc/source/ui/inc/teamdlg.hxx)40
-rw-r--r--offapi/com/sun/star/embed/StorageStream.idl2
-rw-r--r--offapi/com/sun/star/embed/StorageWrappedTargetException.idl2
-rw-r--r--offapi/com/sun/star/embed/UnreachableStateException.idl2
-rw-r--r--offapi/com/sun/star/embed/UseBackupException.idl2
-rw-r--r--offapi/com/sun/star/embed/VerbAttributes.idl2
-rw-r--r--offapi/com/sun/star/embed/VerbDescriptor.idl2
-rw-r--r--offapi/com/sun/star/embed/VisualRepresentation.idl2
-rw-r--r--offapi/com/sun/star/embed/WrongStateException.idl2
-rw-r--r--offapi/com/sun/star/embed/XActionsApproval.idl2
-rw-r--r--offapi/com/sun/star/embed/XClassifiedObject.idl2
-rw-r--r--offapi/com/sun/star/embed/XCommonEmbedPersist.idl2
-rw-r--r--offapi/com/sun/star/embed/XComponentSupplier.idl2
-rw-r--r--offapi/com/sun/star/embed/XEmbedObjectClipboardCreator.idl2
-rw-r--r--offapi/com/sun/star/embed/XEmbedObjectCreator.idl2
-rw-r--r--offapi/com/sun/star/embed/XEmbedObjectFactory.idl2
-rw-r--r--offapi/com/sun/star/embed/XEmbedPersist.idl2
-rw-r--r--offapi/com/sun/star/embed/XEmbeddedClient.idl2
-rw-r--r--offapi/com/sun/star/embed/XEmbeddedObject.idl2
-rw-r--r--offapi/com/sun/star/embed/XEncryptionProtectedSource.idl2
-rw-r--r--offapi/com/sun/star/embed/XExtendedStorageStream.idl2
-rw-r--r--offapi/com/sun/star/embed/XHatchWindow.idl2
-rw-r--r--offapi/com/sun/star/embed/XHatchWindowController.idl2
-rw-r--r--offapi/com/sun/star/embed/XHatchWindowFactory.idl2
-rw-r--r--offapi/com/sun/star/embed/XHierarchicalStorageAccess.idl2
-rw-r--r--offapi/com/sun/star/embed/XInplaceObject.idl2
-rw-r--r--offapi/com/sun/star/embed/XInsertObjectDialog.idl2
-rw-r--r--offapi/com/sun/star/embed/XLinkCreator.idl2
-rw-r--r--offapi/com/sun/star/embed/XLinkFactory.idl2
-rw-r--r--offapi/com/sun/star/embed/XLinkageSupport.idl2
-rw-r--r--offapi/com/sun/star/embed/XOLESimpleStorage.idl2
-rw-r--r--offapi/com/sun/star/embed/XOptimizedStorage.idl2
-rw-r--r--offapi/com/sun/star/embed/XPackageStructureCreator.idl2
-rw-r--r--offapi/com/sun/star/embed/XPersistanceHolder.idl2
-rw-r--r--offapi/com/sun/star/embed/XRelationshipAccess.idl2
-rw-r--r--offapi/com/sun/star/embed/XStateChangeBroadcaster.idl2
-rw-r--r--offapi/com/sun/star/embed/XStateChangeListener.idl2
-rw-r--r--offapi/com/sun/star/embed/XStorage.idl2
-rw-r--r--offapi/com/sun/star/embed/XStorageRawAccess.idl2
-rw-r--r--offapi/com/sun/star/embed/XTransactedObject.idl2
-rw-r--r--offapi/com/sun/star/embed/XTransactionBroadcaster.idl2
-rw-r--r--offapi/com/sun/star/embed/XTransactionListener.idl2
-rw-r--r--offapi/com/sun/star/embed/XTransferableSupplier.idl2
-rw-r--r--offapi/com/sun/star/embed/XVisualObject.idl2
-rw-r--r--offapi/com/sun/star/embed/XWindowSupplier.idl2
-rw-r--r--offapi/com/sun/star/embed/makefile.mk1
-rw-r--r--offapi/com/sun/star/packages/NoEncryptionException.idl2
-rw-r--r--offapi/com/sun/star/packages/NoRawFormatException.idl2
-rw-r--r--offapi/com/sun/star/packages/WrongPasswordException.idl2
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu2
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu249
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu172
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu2
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu75
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Calc.xcs2
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/UI/Commands.xcs1
-rw-r--r--oox/inc/oox/drawingml/customshapegeometry.hxx4
-rw-r--r--oox/inc/oox/drawingml/customshapeproperties.hxx4
-rw-r--r--oox/inc/oox/drawingml/drawingmltypes.hxx4
-rw-r--r--oox/inc/oox/drawingml/shape.hxx5
-rw-r--r--oox/inc/oox/drawingml/textcharacterproperties.hxx1
-rw-r--r--oox/inc/oox/drawingml/textliststyle.hxx4
-rw-r--r--oox/inc/oox/drawingml/textparagraphproperties.hxx4
-rw-r--r--oox/inc/oox/helper/propertymap.hxx5
-rw-r--r--oox/inc/oox/helper/propertyset.hxx4
-rw-r--r--oox/inc/oox/ppt/pptshape.hxx6
-rw-r--r--oox/inc/oox/ppt/slidetransition.hxx2
-rw-r--r--oox/source/drawingml/chart/plotareaconverter.cxx1
-rw-r--r--oox/source/drawingml/customshapegeometry.cxx92
-rw-r--r--oox/source/drawingml/diagram/diagramdefinitioncontext.cxx1
-rw-r--r--oox/source/drawingml/diagram/diagramfragmenthandler.cxx2
-rw-r--r--oox/source/drawingml/drawingmltypes.cxx25
-rw-r--r--oox/source/drawingml/graphicshapecontext.cxx1
-rw-r--r--oox/source/drawingml/shape.cxx36
-rw-r--r--oox/source/drawingml/shapepropertiescontext.cxx2
-rw-r--r--oox/source/drawingml/table/tablerowcontext.cxx1
-rw-r--r--oox/source/drawingml/textbodypropertiescontext.cxx37
-rw-r--r--oox/source/drawingml/textcharacterproperties.cxx3
-rw-r--r--oox/source/drawingml/textliststyle.cxx11
-rw-r--r--oox/source/drawingml/theme.cxx1
-rw-r--r--oox/source/helper/propertymap.cxx73
-rw-r--r--oox/source/helper/propertyset.cxx7
-rw-r--r--oox/source/helper/zipstorage.cxx9
-rw-r--r--oox/source/ppt/pptshape.cxx69
-rw-r--r--oox/source/ppt/pptshapecontext.cxx28
-rw-r--r--oox/source/ppt/slidefragmenthandler.cxx13
-rw-r--r--oox/source/ppt/slidetransition.cxx36
-rw-r--r--oox/source/shape/ShapeContextHandler.cxx1
-rw-r--r--oox/source/token/properties.txt4
-rw-r--r--oox/source/xls/themebuffer.cxx1
-rw-r--r--package/inc/PackageConstants.hxx4
-rw-r--r--package/inc/ZipPackage.hxx4
-rw-r--r--package/inc/ZipPackageFolder.hxx6
-rw-r--r--package/source/xstor/ocompinstream.cxx27
-rw-r--r--package/source/xstor/ocompinstream.hxx6
-rw-r--r--package/source/xstor/oseekinstream.cxx4
-rw-r--r--package/source/xstor/oseekinstream.hxx4
-rw-r--r--package/source/xstor/owriteablestream.cxx113
-rw-r--r--package/source/xstor/owriteablestream.hxx8
-rw-r--r--package/source/xstor/xfactory.cxx36
-rw-r--r--package/source/xstor/xstorage.cxx171
-rw-r--r--package/source/xstor/xstorage.hxx21
-rw-r--r--package/source/zippackage/ZipPackage.cxx68
-rw-r--r--package/source/zippackage/ZipPackageFolder.cxx21
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx7
-rw-r--r--postprocess/packregistry/makefile.mk29
-rw-r--r--qadevOOo/runner/convwatch/OfficePrint.java65
-rw-r--r--qadevOOo/runner/graphical/BuildID.java6
-rw-r--r--qadevOOo/runner/graphical/DirectoryHelper.java6
-rw-r--r--qadevOOo/runner/graphical/EnhancedComplexTestCase.java52
-rw-r--r--qadevOOo/runner/graphical/FileHelper.java30
-rw-r--r--qadevOOo/runner/graphical/GlobalLogWriter.java17
-rw-r--r--qadevOOo/runner/graphical/HTMLResult.java2
-rw-r--r--qadevOOo/runner/graphical/IDocument.java2
-rw-r--r--qadevOOo/runner/graphical/IniFile.java47
-rw-r--r--qadevOOo/runner/graphical/JPEGComparator.java482
-rw-r--r--qadevOOo/runner/graphical/JPEGCreator.java53
-rw-r--r--qadevOOo/runner/graphical/MSOfficePostscriptCreator.java95
-rw-r--r--qadevOOo/runner/graphical/Office.java1
-rw-r--r--qadevOOo/runner/graphical/OpenOfficeDatabaseReportExtractor.java180
-rw-r--r--qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java280
-rw-r--r--qadevOOo/runner/graphical/ParameterHelper.java16
-rw-r--r--qadevOOo/runner/graphical/PerformanceContainer.java18
-rw-r--r--qadevOOo/runner/graphical/PropertyName.java2
-rw-r--r--qadevOOo/runner/graphical/TimeHelper.java45
-rw-r--r--qadevOOo/runner/graphical/Tolerance.java23
-rw-r--r--qadevOOo/runner/graphical/makefile.mk3
-rw-r--r--qadevOOo/runner/helper/OfficeProvider.java30
-rw-r--r--qadevOOo/runner/org/openoffice/Runner.java5
-rw-r--r--qadevOOo/runner/util/utils.java52
-rw-r--r--qadevOOo/tests/java/ifc/accessibility/_XAccessibleContext.java3
-rw-r--r--qadevOOo/tests/java/ifc/awt/_XMessageBoxFactory.java30
-rw-r--r--qadevOOo/tests/java/mod/_dbaccess/ORowSet.java2
-rw-r--r--qadevOOo/tests/java/mod/_forms/ODatabaseForm.java2
-rw-r--r--qadevOOo/tests/java/mod/_sfx/StandaloneDocumentInfo.java2
-rw-r--r--sal/prj/build.lst1
-rw-r--r--sal/qa/ByteSequence/ByteSequence.cxx729
-rw-r--r--sal/qa/ByteSequence/Byte_Const.h95
-rw-r--r--sal/qa/ByteSequence/makefile.mk64
-rw-r--r--sal/qa/ByteSequence/rtl_old_testbyteseq.cxx134
-rwxr-xr-xsal/qa/osl/mutex/osl_Mutex.cxx6
-rw-r--r--sal/rtl/source/bootstrap.cxx8
-rw-r--r--sc/inc/column.hxx4
-rw-r--r--sc/inc/docoptio.hxx6
-rw-r--r--sc/inc/document.hxx6
-rw-r--r--sc/inc/globstr.hrc2
-rw-r--r--sc/inc/sc.hrc4
-rw-r--r--sc/inc/scmod.hxx5
-rw-r--r--sc/inc/table.hxx7
-rw-r--r--sc/inc/unonames.hxx1
-rwxr-xr-xsc/prj/build.lst1
-rw-r--r--sc/qa/unoapi/knownissues.xcl6
-rw-r--r--sc/source/core/data/column2.cxx12
-rw-r--r--sc/source/core/data/column3.cxx38
-rw-r--r--sc/source/core/data/documen4.cxx2
-rw-r--r--sc/source/core/data/dpsave.cxx2
-rw-r--r--sc/source/core/data/dpsdbtab.cxx9
-rwxr-xr-xsc/source/core/data/dpshttab.cxx6
-rw-r--r--sc/source/core/data/global.cxx15
-rw-r--r--sc/source/core/data/table1.cxx5
-rw-r--r--sc/source/core/data/table3.cxx4
-rw-r--r--sc/source/core/inc/interpre.hxx13
-rw-r--r--sc/source/core/inc/sctictac.hxx131
-rw-r--r--sc/source/core/tool/compiler.cxx2
-rw-r--r--sc/source/core/tool/docoptio.cxx2
-rw-r--r--sc/source/core/tool/interpr4.cxx289
-rw-r--r--sc/source/core/tool/makefile.mk1
-rw-r--r--sc/source/core/tool/sctictac.cxx551
-rw-r--r--sc/source/filter/html/htmlexp.cxx28
-rw-r--r--sc/source/filter/html/htmlpars.cxx19
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx30
-rw-r--r--sc/source/ui/app/inputhdl.cxx41
-rw-r--r--sc/source/ui/app/scmod.cxx22
-rw-r--r--sc/source/ui/docshell/docsh8.cxx2
-rw-r--r--sc/source/ui/docshell/tablink.cxx5
-rw-r--r--sc/source/ui/inc/inputhdl.hxx4
-rw-r--r--sc/source/ui/inc/optdlg.hrc1
-rw-r--r--sc/source/ui/inc/output.hxx23
-rw-r--r--sc/source/ui/inc/tpcalc.hxx1
-rw-r--r--sc/source/ui/miscdlgs/autofmt.cxx4
-rw-r--r--sc/source/ui/miscdlgs/makefile.mk2
-rw-r--r--sc/source/ui/miscdlgs/teamdlg.cxx116
-rw-r--r--sc/source/ui/optdlg/tpcalc.cxx59
-rw-r--r--sc/source/ui/src/globstr.src4
-rw-r--r--sc/source/ui/src/miscdlgs.src17
-rw-r--r--sc/source/ui/src/optdlg.src38
-rw-r--r--sc/source/ui/unoobj/defltuno.cxx11
-rw-r--r--sc/source/ui/unoobj/docuno.cxx9
-rw-r--r--sc/source/ui/unoobj/filtuno.cxx4
-rw-r--r--sc/source/ui/unoobj/nameuno.cxx2
-rw-r--r--sc/source/ui/unoobj/scdetect.cxx27
-rwxr-xr-xsc/source/ui/view/dbfunc3.cxx171
-rw-r--r--sc/source/ui/view/drawview.cxx8
-rw-r--r--sc/source/ui/view/output2.cxx481
-rw-r--r--scp2/source/ooo/file_library_ooo.scp2
-rw-r--r--scp2/source/ooo/scpaction_ooo.scp4
-rwxr-xr-xscp2/source/ooo/ure.scp10
-rw-r--r--sd/qa/unoapi/sd.sce14
-rw-r--r--sd/source/filter/eppt/epptso.cxx6
-rw-r--r--sd/source/ui/view/drviews1.cxx24
-rw-r--r--setup_native/prj/d.lst2
-rw-r--r--setup_native/source/mac/broffice/osxdndinstall_nologo.pngbin0 -> 14323 bytes
-rw-r--r--setup_native/source/mac/ooo/osxdndinstall_nologo.pngbin0 -> 12672 bytes
-rw-r--r--sfx2/qa/unoapi/sfx.sce2
-rw-r--r--sfx2/source/doc/SfxDocumentMetaData.cxx37
-rw-r--r--sfx2/source/doc/guisaveas.cxx3
-rw-r--r--solenv/bin/macosx-change-install-names.pl4
-rw-r--r--solenv/bin/modules/installer/environment.pm2
-rw-r--r--solenv/bin/modules/installer/globals.pm2
-rw-r--r--solenv/bin/modules/installer/systemactions.pm7
-rw-r--r--solenv/bin/modules/installer/worker.pm5
-rw-r--r--solenv/bin/packregistry.xslt10
-rwxr-xr-xsolenv/bin/subsequenttests2
-rw-r--r--solenv/config/sdev300.ini3
-rw-r--r--solenv/inc/installationtest.mk24
-rw-r--r--solenv/inc/libs.mk10
-rw-r--r--solenv/inc/minor.mk6
-rw-r--r--solenv/inc/settings.mk1
-rw-r--r--solenv/inc/unxlng.mk1
-rw-r--r--solenv/inc/unxmacx.mk1
-rw-r--r--solenv/inc/unxsoli4.mk1
-rw-r--r--solenv/inc/unxsols4.mk1
-rw-r--r--solenv/inc/unxsolu4.mk2
-rw-r--r--starmath/qa/unoapi/knownissues.xcl5
-rw-r--r--svl/inc/svl/zforlist.hxx13
-rw-r--r--svl/inc/svl/zformat.hxx7
-rw-r--r--svl/source/numbers/zforlist.cxx20
-rw-r--r--svl/source/numbers/zformat.cxx180
-rw-r--r--svl/source/numbers/zforscan.cxx2
-rw-r--r--svl/source/numbers/zforscan.hxx6
-rw-r--r--svtools/qa/unoapi/svtools.sce12
-rw-r--r--svx/qa/unoapi/knownissues.xcl8
-rw-r--r--svx/qa/unoapi/svx.sce12
-rw-r--r--svx/source/sdr/properties/attributeproperties.cxx22
-rw-r--r--sw/inc/swtable.hxx19
-rw-r--r--sw/qa/unoapi/knownissues.xcl16
-rw-r--r--sw/qa/unoapi/sw.sce38
-rw-r--r--sw/source/core/table/swtable.cxx157
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.cxx902
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.hxx171
-rw-r--r--sw/source/filter/ww8/attributeoutputbase.hxx9
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx256
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx5
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx11
-rw-r--r--sw/source/ui/app/apphdl.cxx30
-rw-r--r--test/source/cpp/officeconnection.cxx114
-rw-r--r--test/source/java/OfficeConnection.java64
-rwxr-xr-xtestautomation/extensions/optional/e_issues.bas55
-rwxr-xr-xtestautomation/extensions/optional/includes/issue110083.inc79
-rwxr-xr-x[-rw-r--r--]testautomation/extensions/optional/includes/platforms.inc2
-rwxr-xr-xtestautomation/extensions/optional/input/issues/Logging.xcu24
-rw-r--r--testautomation/extensions/optional/input/issues/LoggingOptions.xcs19
-rwxr-xr-x[-rw-r--r--]testautomation/global/tools/includes/optional/t_extension_manager_tools.inc4
-rwxr-xr-xtestautomation/global/win/tab_a_d.win1
-rwxr-xr-x[-rw-r--r--]testautomation/spreadsheet/optional/includes/arrayconstants/c_arrayconstants.inc12
-rwxr-xr-x[-rw-r--r--]testautomation/spreadsheet/optional/includes/solver/c_solver.inc0
-rw-r--r--testgraphical/document-pool/demo/CurrentTime.odsbin0 -> 8299 bytes
-rw-r--r--testgraphical/document-pool/demo/knownissues.xcl8
-rw-r--r--testgraphical/document-pool/singletest/eis-test.odtbin0 -> 9623 bytes
-rw-r--r--testgraphical/prechecks/makefile.mk (renamed from cppu/test/mapping_tester/makefile.mk)43
-rw-r--r--testgraphical/prechecks/softwaretests.pl564
-rwxr-xr-xtestgraphical/prj/build.lst7
-rwxr-xr-xtestgraphical/prj/d.lst0
-rw-r--r--testgraphical/qa/graphical/Test.java113
-rw-r--r--testgraphical/qa/graphical/makefile.mk (renamed from cppu/test/FreeReference/makefile.mk)50
-rw-r--r--testgraphical/references/unxlngi/demo/CurrentTime.ods.pdfbin0 -> 13916 bytes
-rw-r--r--testgraphical/references/unxlngi/demo/CurrentTime.ods.ps576
-rw-r--r--testgraphical/references/unxlngi/singletest/eis-test.odt.pdfbin0 -> 14356 bytes
-rw-r--r--testgraphical/references/unxlngi/singletest/eis-test.odt.ps565
-rw-r--r--testgraphical/references/unxlngi/singletest/tolerance.ini_4
-rw-r--r--testgraphical/references/unxsoli/singletest/eis-test.odt.pdfbin0 -> 9162 bytes
-rw-r--r--testgraphical/references/wntmsci/demo/CurrentTime.ods.pdfbin0 -> 13916 bytes
-rw-r--r--testgraphical/references/wntmsci/demo/CurrentTime.ods.ps499
-rw-r--r--testgraphical/references/wntmsci/singletest/eis-test.odt.pdfbin0 -> 9142 bytes
-rw-r--r--testgraphical/references/wntmsci/singletest/eis-test.odt.ps1984
-rw-r--r--testgraphical/source/CallExternals.pm539
-rw-r--r--testgraphical/source/ConvwatchHelper.pm574
-rw-r--r--testgraphical/source/compare.pl408
-rw-r--r--testgraphical/source/cwstestresult.pl208
-rw-r--r--testgraphical/source/cwstestresulthelper.pm268
-rw-r--r--testgraphical/source/dbhelper.pm209
-rw-r--r--testgraphical/source/filehelper.pm358
-rw-r--r--testgraphical/source/fill_documents_loop.pl423
-rw-r--r--testgraphical/source/graphical_compare.pm586
-rw-r--r--testgraphical/source/loghelper.pm94
-rw-r--r--testgraphical/source/makefile.mk112
-rw-r--r--testgraphical/source/oshelper.pm110
-rw-r--r--[-rwxr-xr-x]testgraphical/source/solarenvhelper.pm (renamed from cppu/test/purpenvhelper/purpenvhelper.test.pl)66
-rw-r--r--[-rwxr-xr-x]testgraphical/source/stringhelper.pm (renamed from cppu/test/purpose_envs/purpose_envs.test.pl)66
-rw-r--r--testgraphical/source/timehelper.pm99
-rw-r--r--testgraphical/ui/java/ConvwatchGUIProject/build.xml74
-rw-r--r--testgraphical/ui/java/ConvwatchGUIProject/dist/ConvwatchGUIProject.jarbin0 -> 28271 bytes
-rw-r--r--testgraphical/ui/java/ConvwatchGUIProject/makefile.mk (renamed from cppu/test/Map/makefile.mk)46
-rw-r--r--testgraphical/ui/java/ConvwatchGUIProject/manifest.mf3
-rw-r--r--testgraphical/ui/java/ConvwatchGUIProject/nbproject/build-impl.xml805
-rw-r--r--testgraphical/ui/java/ConvwatchGUIProject/nbproject/genfiles.properties8
-rw-r--r--testgraphical/ui/java/ConvwatchGUIProject/nbproject/private/config.properties0
-rw-r--r--testgraphical/ui/java/ConvwatchGUIProject/nbproject/private/private.properties7
-rw-r--r--testgraphical/ui/java/ConvwatchGUIProject/nbproject/private/private.xml4
-rw-r--r--testgraphical/ui/java/ConvwatchGUIProject/nbproject/project.properties71
-rw-r--r--testgraphical/ui/java/ConvwatchGUIProject/nbproject/project.xml15
-rw-r--r--testgraphical/ui/java/ConvwatchGUIProject/src/ConvwatchGUI.form286
-rw-r--r--testgraphical/ui/java/ConvwatchGUIProject/src/ConvwatchGUI.java535
-rw-r--r--testgraphical/ui/java/ConvwatchGUIProject/src/IniFile.java718
-rw-r--r--testgraphical/ui/java/makefile.mk (renamed from cppu/test/EnvStack/makefile.mk)26
-rw-r--r--testgraphical/util/makefile.pmk (renamed from cppu/test/UnsafeBridge/makefile.mk)18
-rw-r--r--toolkit/qa/unoapi/knownissues.xcl10
-rw-r--r--toolkit/qa/unoapi/toolkit.sce8
-rw-r--r--ucb/source/ucp/webdav/DAVAuthListener.hxx3
-rw-r--r--ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx1
-rw-r--r--ucb/source/ucp/webdav/DAVResourceAccess.cxx4
-rw-r--r--ucb/source/ucp/webdav/NeonSession.cxx21
-rw-r--r--ucbhelper/source/provider/simpleauthenticationrequest.cxx9
-rw-r--r--ure/source/README1
-rw-r--r--uui/source/iahndl-authentication.cxx245
-rw-r--r--uui/source/loginerr.hxx61
-rw-r--r--uui/source/passwordcontainer.cxx13
-rw-r--r--vcl/source/app/svapp.cxx5
-rw-r--r--vcl/unx/gtk/window/gtkframe.cxx38
-rw-r--r--vcl/unx/inc/plugins/gtk/gtkframe.hxx1
-rw-r--r--vcl/unx/source/dtrans/X11_selection.cxx4
-rw-r--r--wizards/prj/build.lst2
-rw-r--r--wizards/source/formwizard/dbwizres.src2
-rw-r--r--xmloff/qa/unoapi/xmloff.sce26
-rw-r--r--xmloff/source/forms/elementexport.cxx4
-rw-r--r--xmloff/source/forms/propertyexport.cxx6
-rw-r--r--xmloff/source/forms/propertyexport.hxx8
-rw-r--r--xmloff/source/forms/propertyimport.cxx2
-rw-r--r--xmloff/source/script/XMLScriptExportHandler.cxx3
558 files changed, 18825 insertions, 16346 deletions
diff --git a/basic/prj/build.lst b/basic/prj/build.lst
index 2cd1d3dc0466..9453154edf46 100755
--- a/basic/prj/build.lst
+++ b/basic/prj/build.lst
@@ -5,7 +5,7 @@ sb basic\source\app nmake - all sb_app sb_class sb_inc NULL
sb basic\source\basmgr nmake - all sb_mgr sb_inc NULL
sb basic\source\classes nmake - all sb_class sb_inc NULL
sb basic\source\comp nmake - all sb_comp sb_inc NULL
-sb basic\source\runtime nmake - all sb_rt sb_inc NULL
+sb basic\source\runtime nmake - all sb_rt sb_inc sb_class NULL
sb basic\source\sample nmake - all sb_samp sb_inc NULL
sb basic\source\sbx nmake - all sb_sbx sb_inc NULL
sb basic\source\uno nmake - all sb_uno sb_inc NULL
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 83c0ae9e65f4..4b58942d77aa 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -1905,7 +1905,7 @@ void SbUserFormModule::InitObject()
triggerInitializeEvent();
}
}
- catch( uno::Exception& e )
+ catch( uno::Exception& )
{
}
diff --git a/boost/boost_1_39_0.patch b/boost/boost_1_39_0.patch
index 9ab3099fc444..d837246a83bf 100644
--- a/boost/boost_1_39_0.patch
+++ b/boost/boost_1_39_0.patch
@@ -1,6 +1,35 @@
---- misc/boost_1_39_0/boost/function/function_template.hpp 2008-10-16 15:21:50.000000000 +0200
-+++ misc/build/boost_1_39_0/boost/function/function_template.hpp 2009-07-09 12:58:51.141224220 +0200
-@@ -950,10 +950,10 @@
+diff --git boost_1_39_0/boost/config/compiler/visualc.hpp boost_1_39_0/boost/config/compiler/visualc.hpp
+index 552e5bb..d9f90b2 100644
+--- misc/build/boost_1_39_0/boost/config/compiler/visualc.hpp
++++ misc/build/boost_1_39_0/boost/config/compiler/visualc.hpp
+@@ -138,6 +138,9 @@
+ # define BOOST_NO_RTTI
+ #endif
+
++// disable WORKAROUND macro - gives warning for undefined macros
++#define BOOST_STRICT_CONFIG 1
++
+ //
+ // all versions support __declspec:
+ //
+diff --git boost_1_39_0/boost/function/function_base.hpp boost_1_39_0/boost/function/function_base.hpp
+index 6612fb8..35afa16 100644
+--- misc/build/boost_1_39_0/boost/function/function_base.hpp
++++ misc/build/boost_1_39_0/boost/function/function_base.hpp
+@@ -42,7 +42,7 @@
+ #endif
+
+ // Define BOOST_FUNCTION_STD_NS to the namespace that contains type_info.
+-#ifdef BOOST_NO_EXCEPTION_STD_NAMESPACE
++#ifdef BOOST_NO_STD_TYPEINFO
+ // Embedded VC++ does not have type_info in namespace std
+ # define BOOST_FUNCTION_STD_NS
+ #else
+diff --git boost_1_39_0/boost/function/function_template.hpp boost_1_39_0/boost/function/function_template.hpp
+index 584abe9..36b619b 100644
+--- misc/build/boost_1_39_0/boost/function/function_template.hpp
++++ misc/build/boost_1_39_0/boost/function/function_template.hpp
+@@ -950,10 +950,10 @@ namespace boost {
f.vtable->manager(f.functor, this->functor,
boost::detail::function::move_functor_tag);
f.vtable = 0;
@@ -12,32 +41,11 @@
} catch (...) {
vtable = 0;
throw;
---- misc/boost_1_39_0/boost/function/function_base.hpp 2008-10-16 15:21:50.000000000 +0200
-+++ misc/build/boost_1_39_0/boost/function/function_base.hpp 2009-07-12 21:42:22.779873909 +0200
-@@ -42,7 +42,7 @@
- #endif
-
- // Define BOOST_FUNCTION_STD_NS to the namespace that contains type_info.
--#ifdef BOOST_NO_EXCEPTION_STD_NAMESPACE
-+#ifdef BOOST_NO_STD_TYPEINFO
- // Embedded VC++ does not have type_info in namespace std
- # define BOOST_FUNCTION_STD_NS
- #else
---- misc/boost_1_39_0/boost/config/compiler/visualc.hpp 2009-03-26 20:00:00.000000000 +0100
-+++ misc/build/boost_1_39_0/boost/config/compiler/visualc.hpp 2009-06-10 21:53:42.484375000 +0200
-@@ -138,6 +138,9 @@
- # define BOOST_NO_RTTI
- #endif
-
-+// disable WORKAROUND macro - gives warning for undefined macros
-+#define BOOST_STRICT_CONFIG 1
-+
- //
- // all versions support __declspec:
- //
---- misc/boost_1_39_0/boost/mpl/apply_wrap.hpp 2008-10-11 08:50:46.000000000 +0200
-+++ misc/build/boost_1_39_0/boost/mpl/apply_wrap.hpp 2009-06-10 21:53:42.500000000 +0200
-@@ -173,8 +173,8 @@
+diff --git boost_1_39_0/boost/mpl/apply_wrap.hpp boost_1_39_0/boost/mpl/apply_wrap.hpp
+index b3cb12b..0bf8e73 100644
+--- misc/build/boost_1_39_0/boost/mpl/apply_wrap.hpp
++++ misc/build/boost_1_39_0/boost/mpl/apply_wrap.hpp
+@@ -173,8 +173,8 @@ struct BOOST_PP_CAT(apply_wrap,i_)<AUX778076_APPLY_WRAP_SPEC_PARAMS(i_, int)>
# undef i_
///// iteration, depth == 2
@@ -48,15 +56,17 @@
# define j_ BOOST_PP_FRAME_ITERATION(2)
-@@ -230,4 +231,5 @@
+@@ -231,4 +231,5 @@ struct BOOST_PP_CAT(apply_wrap_impl,i_)<
# undef j_
#endif // BOOST_PP_ITERATION_DEPTH()
+#endif
#endif // BOOST_PP_IS_ITERATING
---- misc/boost_1_39_0/boost/mpl/bind.hpp 2008-10-11 08:19:02.000000000 +0200
-+++ misc/build/boost_1_39_0/boost/mpl/bind.hpp 2009-06-10 21:53:42.515625000 +0200
-@@ -531,7 +531,8 @@
+diff --git boost_1_39_0/boost/mpl/bind.hpp boost_1_39_0/boost/mpl/bind.hpp
+index 5d851ef..780e260 100644
+--- misc/build/boost_1_39_0/boost/mpl/bind.hpp
++++ misc/build/boost_1_39_0/boost/mpl/bind.hpp
+@@ -531,7 +531,8 @@ struct bind_chooser<i_>
///// iteration, depth == 2
@@ -66,15 +76,81 @@
# define j_ BOOST_PP_FRAME_ITERATION(2)
# if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT)
-@@ -548,4 +549,5 @@
+@@ -548,4 +549,5 @@ struct bind_chooser<i_>
# undef j_
#endif // BOOST_PP_ITERATION_DEPTH()
+#endif
#endif // BOOST_PP_IS_ITERATING
---- misc/boost_1_39_0/boost/spirit/home/classic/core/impl/match.ipp 2008-06-22 17:05:38.000000000 +0200
-+++ misc/build/boost_1_39_0/boost/spirit/home/classic/core/impl/match.ipp 2009-06-10 21:53:42.531250000 +0200
-@@ -19,12 +19,12 @@
+diff --git boost_1_39_0/boost/ptr_container/detail/move.hpp boost_1_39_0/boost/ptr_container/detail/move.hpp
+index bf07d5f..6b082a7 100644
+--- misc/build/boost_1_39_0/boost/ptr_container/detail/move.hpp
++++ misc/build/boost_1_39_0/boost/ptr_container/detail/move.hpp
+@@ -20,7 +20,7 @@ namespace move_ptrs {
+ template<typename Ptr>
+ class move_source {
+ public:
+- move_source(Ptr& ptr) : ptr_(ptr) {}
++ move_source(Ptr& _ptr) : ptr_(_ptr) {}
+ Ptr& ptr() const { return ptr_; }
+ private:
+ Ptr& ptr_;
+diff --git boost_1_39_0/boost/ptr_container/detail/reversible_ptr_container.hpp boost_1_39_0/boost/ptr_container/detail/reversible_ptr_container.hpp
+index 47c3903..3ad2c5c 100644
+--- misc/build/boost_1_39_0/boost/ptr_container/detail/reversible_ptr_container.hpp
++++ misc/build/boost_1_39_0/boost/ptr_container/detail/reversible_ptr_container.hpp
+@@ -278,9 +278,9 @@ namespace ptr_container_detail
+
+ private:
+ template< class ForwardIterator >
+- ForwardIterator advance( ForwardIterator begin, size_type n )
++ ForwardIterator advance( ForwardIterator _begin, size_type n )
+ {
+- ForwardIterator iter = begin;
++ ForwardIterator iter = _begin;
+ std::advance( iter, n );
+ return iter;
+ }
+diff --git boost_1_39_0/boost/ptr_container/detail/static_move_ptr.hpp boost_1_39_0/boost/ptr_container/detail/static_move_ptr.hpp
+index ba2b9af..9e0d682 100644
+--- misc/build/boost_1_39_0/boost/ptr_container/detail/static_move_ptr.hpp
++++ misc/build/boost_1_39_0/boost/ptr_container/detail/static_move_ptr.hpp
+@@ -151,7 +151,7 @@ public:
+ deleter_const_reference get_deleter() const { return impl_.second(); }
+ private:
+ template<typename TT, typename DD>
+- void check(const static_move_ptr<TT, DD>& ptr)
++ void check(const static_move_ptr<TT, DD>& _ptr)
+ {
+ typedef move_ptrs::is_smart_ptr_convertible<TT, T> convertible;
+ BOOST_STATIC_ASSERT(convertible::value);
+diff --git boost_1_39_0/boost/ptr_container/exception.hpp boost_1_39_0/boost/ptr_container/exception.hpp
+index d9a5ffe..7837fbb 100644
+--- misc/build/boost_1_39_0/boost/ptr_container/exception.hpp
++++ misc/build/boost_1_39_0/boost/ptr_container/exception.hpp
+@@ -24,7 +24,7 @@ namespace boost
+ {
+ const char* what_;
+ public:
+- bad_ptr_container_operation( const char* what ) : what_( what )
++ bad_ptr_container_operation( const char* text ) : what_( text )
+ { }
+
+ virtual const char* what() const throw()
+@@ -38,7 +38,7 @@ namespace boost
+ class bad_index : public bad_ptr_container_operation
+ {
+ public:
+- bad_index( const char* what ) : bad_ptr_container_operation( what )
++ bad_index( const char* text ) : bad_ptr_container_operation( text )
+ { }
+ };
+
+diff --git boost_1_39_0/boost/spirit/home/classic/core/impl/match.ipp boost_1_39_0/boost/spirit/home/classic/core/impl/match.ipp
+index 492bf4b..565fdec 100644
+--- misc/build/boost_1_39_0/boost/spirit/home/classic/core/impl/match.ipp
++++ misc/build/boost_1_39_0/boost/spirit/home/classic/core/impl/match.ipp
+@@ -19,12 +19,12 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
: len(-1), val() {}
template <typename T>
@@ -91,7 +167,7 @@
template <typename T>
inline bool
-@@ -66,11 +66,11 @@
+@@ -66,11 +66,11 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
inline match<nil_t>::match()
: len(-1) {}
@@ -107,9 +183,11 @@
inline bool
match<nil_t>::operator!() const
---- misc/boost_1_39_0/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp 2008-06-22 17:05:38.000000000 +0200
-+++ misc/build/boost_1_39_0/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp 2009-06-10 21:53:42.546875000 +0200
-@@ -226,7 +226,7 @@
+diff --git boost_1_39_0/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp boost_1_39_0/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp
+index ca51bd2..b2282fa 100644
+--- misc/build/boost_1_39_0/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp
++++ misc/build/boost_1_39_0/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp
+@@ -226,7 +226,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
template <typename ParserT, typename ScannerT, typename AttrT>
struct concrete_parser : abstract_parser<ScannerT, AttrT>
{
@@ -118,9 +196,11 @@
virtual ~concrete_parser() {}
virtual typename match_result<ScannerT, AttrT>::type
---- misc/boost_1_39_0/boost/spirit/home/classic/core/non_terminal/parser_id.hpp 2008-06-22 17:05:38.000000000 +0200
-+++ misc/build/boost_1_39_0/boost/spirit/home/classic/core/non_terminal/parser_id.hpp 2009-06-10 21:53:42.562500000 +0200
-@@ -106,7 +106,7 @@
+diff --git boost_1_39_0/boost/spirit/home/classic/core/non_terminal/parser_id.hpp boost_1_39_0/boost/spirit/home/classic/core/non_terminal/parser_id.hpp
+index 2f4b986..b3809da 100644
+--- misc/build/boost_1_39_0/boost/spirit/home/classic/core/non_terminal/parser_id.hpp
++++ misc/build/boost_1_39_0/boost/spirit/home/classic/core/non_terminal/parser_id.hpp
+@@ -106,7 +106,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
: parser_id(reinterpret_cast<std::size_t>(this));
}
@@ -129,9 +209,11 @@
private:
---- misc/boost_1_39_0/boost/spirit/home/classic/core/non_terminal/rule.hpp 2008-06-22 17:05:38.000000000 +0200
-+++ misc/build/boost_1_39_0/boost/spirit/home/classic/core/non_terminal/rule.hpp 2009-07-08 22:23:45.899895415 +0200
-@@ -159,11 +159,11 @@
+diff --git boost_1_39_0/boost/spirit/home/classic/core/non_terminal/rule.hpp boost_1_39_0/boost/spirit/home/classic/core/non_terminal/rule.hpp
+index 73389b4..18d26cc 100644
+--- misc/build/boost_1_39_0/boost/spirit/home/classic/core/non_terminal/rule.hpp
++++ misc/build/boost_1_39_0/boost/spirit/home/classic/core/non_terminal/rule.hpp
+@@ -159,11 +159,11 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
return ptr.get();
}
@@ -147,9 +229,11 @@
scoped_ptr<abstract_parser_t> ptr;
};
---- misc/boost_1_39_0/boost/spirit/home/classic/core/non_terminal/subrule.hpp 2008-06-22 17:05:38.000000000 +0200
-+++ misc/build/boost_1_39_0/boost/spirit/home/classic/core/non_terminal/subrule.hpp 2009-06-10 21:53:42.593750000 +0200
-@@ -210,7 +210,7 @@
+diff --git boost_1_39_0/boost/spirit/home/classic/core/non_terminal/subrule.hpp boost_1_39_0/boost/spirit/home/classic/core/non_terminal/subrule.hpp
+index 5d6761f..b93118a 100644
+--- misc/build/boost_1_39_0/boost/spirit/home/classic/core/non_terminal/subrule.hpp
++++ misc/build/boost_1_39_0/boost/spirit/home/classic/core/non_terminal/subrule.hpp
+@@ -210,7 +210,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
subrule_list<
subrule_parser<ID2, DefT2, ContextT2>,
nil_t> >
@@ -158,7 +242,7 @@
{
return subrule_list<
self_t,
-@@ -220,7 +220,7 @@
+@@ -220,7 +220,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
*this,
subrule_list<
subrule_parser<ID2, DefT2, ContextT2>, nil_t>(
@@ -167,7 +251,7 @@
}
typename DefT::embed_t rhs;
-@@ -258,10 +258,10 @@
+@@ -258,10 +258,10 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
parse_main(ScannerT const& scan) const
{
typedef typename parser_result<self_t, ScannerT>::type result_t;
@@ -181,9 +265,11 @@
}
template <typename ScannerT>
---- misc/boost_1_39_0/boost/spirit/home/classic/debug/impl/parser_names.ipp 2008-06-22 17:05:38.000000000 +0200
-+++ misc/build/boost_1_39_0/boost/spirit/home/classic/debug/impl/parser_names.ipp 2009-10-11 22:34:54.867381817 +0200
-@@ -395,13 +395,13 @@
+diff --git boost_1_39_0/boost/spirit/home/classic/debug/impl/parser_names.ipp boost_1_39_0/boost/spirit/home/classic/debug/impl/parser_names.ipp
+index 5d75be2..730cf0c 100644
+--- misc/build/boost_1_39_0/boost/spirit/home/classic/debug/impl/parser_names.ipp
++++ misc/build/boost_1_39_0/boost/spirit/home/classic/debug/impl/parser_names.ipp
+@@ -395,13 +395,13 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
}
bool register_node(void const *r, char const *name_to_register,
diff --git a/boost/makefile.mk b/boost/makefile.mk
index 8c1df4e21dbc..fdc1dfd2a44c 100644
--- a/boost/makefile.mk
+++ b/boost/makefile.mk
@@ -91,6 +91,8 @@ $(PACKAGE_DIR)$/$(NORMALIZE_FLAG_FILE) : $(PACKAGE_DIR)$/$(BUILD_FLAG_FILE)
@$(GNUCOPY) -r $(PACKAGE_DIR)$/$(TARFILE_NAME)$/boost$/pending $(INCCOM)$/$(PRJNAME)
@$(GNUCOPY) -r $(PACKAGE_DIR)$/$(TARFILE_NAME)$/boost$/pool $(INCCOM)$/$(PRJNAME)
@$(GNUCOPY) -r $(PACKAGE_DIR)$/$(TARFILE_NAME)$/boost$/preprocessor $(INCCOM)$/$(PRJNAME)
+ @$(GNUCOPY) -r $(PACKAGE_DIR)$/$(TARFILE_NAME)$/boost$/ptr_container $(INCCOM)$/$(PRJNAME)
+ @$(GNUCOPY) -r $(PACKAGE_DIR)$/$(TARFILE_NAME)$/boost$/range $(INCCOM)$/$(PRJNAME)
@$(GNUCOPY) -r $(PACKAGE_DIR)$/$(TARFILE_NAME)$/boost$/spirit $(INCCOM)$/$(PRJNAME)
@$(GNUCOPY) -r $(PACKAGE_DIR)$/$(TARFILE_NAME)$/boost$/smart_ptr $(INCCOM)$/$(PRJNAME)
@$(GNUCOPY) -r $(PACKAGE_DIR)$/$(TARFILE_NAME)$/boost$/tuple $(INCCOM)$/$(PRJNAME)
diff --git a/boost/prj/d.lst b/boost/prj/d.lst
index 07d5a72a4384..6b9ebcaf6d66 100644
--- a/boost/prj/d.lst
+++ b/boost/prj/d.lst
@@ -81,6 +81,10 @@ mkdir: %_DEST%\inc%_EXT%\boost\preprocessor\seq\detail
mkdir: %_DEST%\inc%_EXT%\boost\preprocessor\slot
mkdir: %_DEST%\inc%_EXT%\boost\preprocessor\slot\detail
mkdir: %_DEST%\inc%_EXT%\boost\preprocessor\tuple
+mkdir: %_DEST%\inc%_EXT%\boost\ptr_container
+mkdir: %_DEST%\inc%_EXT%\boost\ptr_container\detail
+mkdir: %_DEST%\inc%_EXT%\boost\range
+mkdir: %_DEST%\inc%_EXT%\boost\range\detail
mkdir: %_DEST%\inc%_EXT%\boost\spirit
mkdir: %_DEST%\inc%_EXT%\boost\spirit\actor
mkdir: %_DEST%\inc%_EXT%\boost\spirit\attribute
@@ -147,6 +151,7 @@ mkdir: %_DEST%\inc%_EXT%\boost\tuple\detail
mkdir: %_DEST%\inc%_EXT%\boost\type_traits
mkdir: %_DEST%\inc%_EXT%\boost\type_traits\detail
mkdir: %_DEST%\inc%_EXT%\boost\utility
+mkdir: %_DEST%\inc%_EXT%\boost\utility\detail
mkdir: %_DEST%\inc%_EXT%\boost\variant
mkdir: %_DEST%\inc%_EXT%\boost\variant\detail
@@ -232,6 +237,10 @@ mkdir: %_DEST%\inc%_EXT%\boost\variant\detail
..\%__SRC%\inc\boost\preprocessor\slot\* %_DEST%\inc%_EXT%\boost\preprocessor\slot
..\%__SRC%\inc\boost\preprocessor\slot\detail\* %_DEST%\inc%_EXT%\boost\preprocessor\slot\detail
..\%__SRC%\inc\boost\preprocessor\tuple\* %_DEST%\inc%_EXT%\boost\preprocessor\tuple
+..\%__SRC%\inc\boost\ptr_container\* %_DEST%\inc%_EXT%\boost\ptr_container
+..\%__SRC%\inc\boost\ptr_container\detail\* %_DEST%\inc%_EXT%\boost\ptr_container\detail
+..\%__SRC%\inc\boost\range\* %_DEST%\inc%_EXT%\boost\range
+..\%__SRC%\inc\boost\range\detail\* %_DEST%\inc%_EXT%\boost\range\detail
..\%__SRC%\inc\boost\spirit\* %_DEST%\inc%_EXT%\boost\spirit
..\%__SRC%\inc\boost\spirit\actor\* %_DEST%\inc%_EXT%\boost\spirit\actor
..\%__SRC%\inc\boost\spirit\attribute\* %_DEST%\inc%_EXT%\boost\spirit\attribute
@@ -298,5 +307,6 @@ mkdir: %_DEST%\inc%_EXT%\boost\variant\detail
..\%__SRC%\inc\boost\type_traits\* %_DEST%\inc%_EXT%\boost\type_traits
..\%__SRC%\inc\boost\type_traits\detail\* %_DEST%\inc%_EXT%\boost\type_traits\detail
..\%__SRC%\inc\boost\utility\* %_DEST%\inc%_EXT%\boost\utility
+..\%__SRC%\inc\boost\utility\detail\* %_DEST%\inc%_EXT%\boost\utility\detail
..\%__SRC%\inc\boost\variant\* %_DEST%\inc%_EXT%\boost\variant
..\%__SRC%\inc\boost\variant\detail\* %_DEST%\inc%_EXT%\boost\variant\detail
diff --git a/bridges/source/jni_uno/jni_uno2java.cxx b/bridges/source/jni_uno/jni_uno2java.cxx
index 99ec6e32fce2..81ae922ae717 100644
--- a/bridges/source/jni_uno/jni_uno2java.cxx
+++ b/bridges/source/jni_uno/jni_uno2java.cxx
@@ -848,7 +848,7 @@ void SAL_CALL UNO_proxy_dispatch(
#if OSL_DEBUG_LEVEL > 0
OString cstr_msg2(
OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( 0, cstr_msg2.getStr() );
+ OSL_TRACE( "%s", cstr_msg2.getStr() );
#endif
}
catch (::jvmaccess::VirtualMachine::AttachGuard::CreationException &)
diff --git a/chart2/prj/build.lst b/chart2/prj/build.lst
index 370eacebe0c2..3cdc9a26e3f5 100644
--- a/chart2/prj/build.lst
+++ b/chart2/prj/build.lst
@@ -24,4 +24,3 @@ ch chart2\source\controller\chartapiwrapper nmake - all ch_source_controlle
ch chart2\source\controller\main nmake - all ch_source_controller_main ch_inc NULL
ch chart2\source\controller\menus nmake - all ch_source_controller_menus ch_inc NULL
ch chart2\prj get - all ch_prj NULL
-ch chart2\qa\unoapi nmake - all ch_qa_unoapi NULL
diff --git a/comphelper/inc/comphelper/storagehelper.hxx b/comphelper/inc/comphelper/storagehelper.hxx
index 796c0ad47142..b613ddd2c5f1 100644
--- a/comphelper/inc/comphelper/storagehelper.hxx
+++ b/comphelper/inc/comphelper/storagehelper.hxx
@@ -136,7 +136,8 @@ public:
const ::rtl::OUString& aURL,
sal_Int32 nStorageMode,
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory
- = ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >() )
+ = ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >(),
+ sal_Bool bRepairStorage = sal_False )
throw ( ::com::sun::star::uno::Exception );
static ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >
@@ -144,7 +145,8 @@ public:
const ::rtl::OUString& aFormat,
const ::com::sun::star::uno::Reference < ::com::sun::star::io::XInputStream >& xStream,
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory
- = ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >() )
+ = ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >(),
+ sal_Bool bRepairStorage = sal_False )
throw ( ::com::sun::star::uno::Exception );
static ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >
@@ -153,7 +155,8 @@ public:
const ::com::sun::star::uno::Reference < ::com::sun::star::io::XStream >& xStream,
sal_Int32 nStorageMode = ::com::sun::star::embed::ElementModes::READWRITE,
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory
- = ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >() )
+ = ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >(),
+ sal_Bool bRepairStorage = sal_False )
throw ( ::com::sun::star::uno::Exception );
static sal_Bool IsValidZipEntryFileName( const ::rtl::OUString& aName, sal_Bool bSlashAllowed );
diff --git a/comphelper/qa/complex/makefile.mk b/comphelper/qa/complex/makefile.mk
index 341b6868e1ec..ec0efdd1188c 100644
--- a/comphelper/qa/complex/makefile.mk
+++ b/comphelper/qa/complex/makefile.mk
@@ -32,9 +32,6 @@ PRJNAME = comphelper
# --- Settings -----------------------------------------------------
.INCLUDE: settings.mk
-
-.IF "$(BUILD_QADEVOOO)" == "YES"
-
#----- compile .java files -----------------------------------------
JARFILES := ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
@@ -63,8 +60,6 @@ RUNNER_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,
RUNNER_ARGS = org.openoffice.Runner -TestBase java_complex $(RUNNER_APPEXECCOMMAND)
-.END # "$(BUILD_QADEVOOO)" == "YES"
-
# --- Targets ------------------------------------------------------
.IF "$(depend)" == ""
@@ -78,7 +73,6 @@ ALL: ALLDEP
.INCLUDE : target.mk
-.IF "$(BUILD_QADEVOOO)" == "YES"
show_targets:
+@java $(RUNNER_CLASSPATH) complexlib.ShowTargets $(foreach,i,$(JAVAFILES) $(i:s#.java##:s#./#complex.#))
@@ -87,11 +81,3 @@ run:
run_%:
+java $(RUNNER_CLASSPATH) $(RUNNER_ARGS) -o complex.$(PRJNAME).$(@:s/run_//)
-
-.ELSE
-run: show_targets
-
-show_targets:
- +@echo "Built without qadevOOo, no QA tests"
-
-.ENDIF
diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx
index eda42ec98abb..e2557523f674 100644
--- a/comphelper/source/misc/storagehelper.cxx
+++ b/comphelper/source/misc/storagehelper.cxx
@@ -328,12 +328,19 @@ uno::Reference< embed::XStorage > OStorageHelper::GetStorageOfFormatFromURL(
const ::rtl::OUString& aFormat,
const ::rtl::OUString& aURL,
sal_Int32 nStorageMode,
- const uno::Reference< lang::XMultiServiceFactory >& xFactory )
+ const uno::Reference< lang::XMultiServiceFactory >& xFactory,
+ sal_Bool bRepairStorage )
throw ( uno::Exception )
{
uno::Sequence< beans::PropertyValue > aProps( 1 );
aProps[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StorageFormat" ) );
aProps[0].Value <<= aFormat;
+ if ( bRepairStorage )
+ {
+ aProps.realloc( 2 );
+ aProps[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RepairPackage" ) );
+ aProps[1].Value <<= bRepairStorage;
+ }
uno::Sequence< uno::Any > aArgs( 3 );
aArgs[0] <<= aURL;
@@ -352,12 +359,19 @@ uno::Reference< embed::XStorage > OStorageHelper::GetStorageOfFormatFromURL(
uno::Reference< embed::XStorage > OStorageHelper::GetStorageOfFormatFromInputStream(
const ::rtl::OUString& aFormat,
const uno::Reference < io::XInputStream >& xStream,
- const uno::Reference< lang::XMultiServiceFactory >& xFactory )
+ const uno::Reference< lang::XMultiServiceFactory >& xFactory,
+ sal_Bool bRepairStorage )
throw ( uno::Exception )
{
uno::Sequence< beans::PropertyValue > aProps( 1 );
aProps[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StorageFormat" ) );
aProps[0].Value <<= aFormat;
+ if ( bRepairStorage )
+ {
+ aProps.realloc( 2 );
+ aProps[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RepairPackage" ) );
+ aProps[1].Value <<= bRepairStorage;
+ }
uno::Sequence< uno::Any > aArgs( 3 );
aArgs[0] <<= xStream;
@@ -377,12 +391,19 @@ uno::Reference< embed::XStorage > OStorageHelper::GetStorageOfFormatFromStream(
const ::rtl::OUString& aFormat,
const uno::Reference < io::XStream >& xStream,
sal_Int32 nStorageMode,
- const uno::Reference< lang::XMultiServiceFactory >& xFactory )
+ const uno::Reference< lang::XMultiServiceFactory >& xFactory,
+ sal_Bool bRepairStorage )
throw ( uno::Exception )
{
uno::Sequence< beans::PropertyValue > aProps( 1 );
aProps[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StorageFormat" ) );
aProps[0].Value <<= aFormat;
+ if ( bRepairStorage )
+ {
+ aProps.realloc( 2 );
+ aProps[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RepairPackage" ) );
+ aProps[1].Value <<= bRepairStorage;
+ }
uno::Sequence< uno::Any > aArgs( 3 );
aArgs[0] <<= xStream;
diff --git a/configmgr/prj/d.lst b/configmgr/prj/d.lst
index a9d91980b213..17ccdbe86a08 100644
--- a/configmgr/prj/d.lst
+++ b/configmgr/prj/d.lst
@@ -1,8 +1,3 @@
-mkdir: %_DEST%\inc%_EXT%\configmgr
-mkdir: %_DEST%\inc%_EXT%\configmgr\detail
-..\%__SRC%\bin\configmgr.dll %_DEST%\bin%_EXT%\configmgr.dll
-..\%__SRC%\lib\iconfigmgr.lib %_DEST%\lib%_EXT%\iconfigmgr.lib
-..\%__SRC%\lib\libconfigmgr.dylib %_DEST%\lib%_EXT%\libconfigmgr.dylib
-..\%__SRC%\lib\libconfigmgr.so %_DEST%\lib%_EXT%\libconfigmgr.so
-..\inc\configmgr\detail\configmgrdllapi.hxx %_DEST%\inc%_EXT%\configmgr\detail\configmgrdllapi.hxx
-..\inc\configmgr\update.hxx %_DEST%\inc%_EXT%\configmgr\update.hxx
+..\%__SRC%\bin\configmgr.uno.dll %_DEST%\bin%_EXT%\configmgr.uno.dll
+..\%__SRC%\lib\configmgr.uno.dylib %_DEST%\lib%_EXT%\configmgr.uno.dylib
+..\%__SRC%\lib\configmgr.uno.so %_DEST%\lib%_EXT%\configmgr.uno.so
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index 7af9c1f8d9c0..60f6a4a54e46 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -1917,7 +1917,7 @@ css::uno::Reference< css::uno::XInterface > Access::createInstance()
tmplName),
static_cast< cppu::OWeakObject * >(this));
}
- rtl::Reference< Node > node(tmpl->clone());
+ rtl::Reference< Node > node(tmpl->clone(true));
node->setLayer(Data::NO_LAYER);
return static_cast< cppu::OWeakObject * >(
new ChildAccess(components_, getRootAccess(), node));
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index 6d97971e1a2c..48f90fa8382e 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -494,12 +494,10 @@ void Components::parseFileList(
try {
(*parseFile)(url, layer, data_, 0, 0);
} catch (css::container::NoSuchElementException & e) {
- throw css::uno::RuntimeException(
- (rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "stat'ed file does not exist: ")) +
- e.Message),
- css::uno::Reference< css::uno::XInterface >());
+ OSL_TRACE(
+ "configmgr file does not exist: %s",
+ rtl::OUStringToOString(
+ e.Message, RTL_TEXTENCODING_UTF8).getStr());
}
}
if (i == -1) {
diff --git a/configmgr/source/groupnode.cxx b/configmgr/source/groupnode.cxx
index 60d825451d69..59c0f89df5d1 100644
--- a/configmgr/source/groupnode.cxx
+++ b/configmgr/source/groupnode.cxx
@@ -44,8 +44,8 @@ GroupNode::GroupNode(
mandatory_(Data::NO_LAYER)
{}
-rtl::Reference< Node > GroupNode::clone() const {
- return new GroupNode(*this);
+rtl::Reference< Node > GroupNode::clone(bool keepTemplateName) const {
+ return new GroupNode(*this, keepTemplateName);
}
NodeMap & GroupNode::getMembers() {
@@ -68,11 +68,13 @@ bool GroupNode::isExtensible() const {
return extensible_;
}
-GroupNode::GroupNode(GroupNode const & other):
- Node(other), extensible_(other.extensible_),
- templateName_(other.templateName_), mandatory_(other.mandatory_)
+GroupNode::GroupNode(GroupNode const & other, bool keepTemplateName):
+ Node(other), extensible_(other.extensible_), mandatory_(other.mandatory_)
{
cloneNodeMap(other.members_, &members_);
+ if (keepTemplateName) {
+ templateName_ = other.templateName_;
+ }
}
GroupNode::~GroupNode() {}
diff --git a/configmgr/source/groupnode.hxx b/configmgr/source/groupnode.hxx
index be4907b86ce3..9d7bbbafa5b3 100644
--- a/configmgr/source/groupnode.hxx
+++ b/configmgr/source/groupnode.hxx
@@ -42,7 +42,7 @@ class GroupNode: public Node {
public:
GroupNode(int layer, bool extensible, rtl::OUString const & templateName);
- virtual rtl::Reference< Node > clone() const;
+ virtual rtl::Reference< Node > clone(bool keepTemplateName) const;
virtual NodeMap & getMembers();
@@ -55,7 +55,7 @@ public:
bool isExtensible() const;
private:
- GroupNode(GroupNode const & other);
+ GroupNode(GroupNode const & other, bool keepTemplateName);
virtual ~GroupNode();
diff --git a/configmgr/source/localizedpropertynode.cxx b/configmgr/source/localizedpropertynode.cxx
index 9c5fa3328a58..54560d7aded4 100644
--- a/configmgr/source/localizedpropertynode.cxx
+++ b/configmgr/source/localizedpropertynode.cxx
@@ -51,7 +51,7 @@ LocalizedPropertyNode::LocalizedPropertyNode(
Node(layer), staticType_(staticType), nillable_(nillable)
{}
-rtl::Reference< Node > LocalizedPropertyNode::clone() const {
+rtl::Reference< Node > LocalizedPropertyNode::clone(bool) const {
return new LocalizedPropertyNode(*this);
}
diff --git a/configmgr/source/localizedpropertynode.hxx b/configmgr/source/localizedpropertynode.hxx
index d5a16af0e54d..4ebcf8e243da 100644
--- a/configmgr/source/localizedpropertynode.hxx
+++ b/configmgr/source/localizedpropertynode.hxx
@@ -47,7 +47,7 @@ class LocalizedPropertyNode: public Node {
public:
LocalizedPropertyNode(int layer, Type staticType, bool nillable);
- virtual rtl::Reference< Node > clone() const;
+ virtual rtl::Reference< Node > clone(bool keepTemplateName) const;
virtual NodeMap & getMembers();
diff --git a/configmgr/source/localizedvaluenode.cxx b/configmgr/source/localizedvaluenode.cxx
index f6246106c8fe..c0e3bc333187 100644
--- a/configmgr/source/localizedvaluenode.cxx
+++ b/configmgr/source/localizedvaluenode.cxx
@@ -48,7 +48,7 @@ LocalizedValueNode::LocalizedValueNode(int layer, css::uno::Any const & value):
Node(layer), value_(value)
{}
-rtl::Reference< Node > LocalizedValueNode::clone() const {
+rtl::Reference< Node > LocalizedValueNode::clone(bool) const {
return new LocalizedValueNode(*this);
}
diff --git a/configmgr/source/localizedvaluenode.hxx b/configmgr/source/localizedvaluenode.hxx
index 7f8a5dd987ce..bfcbdea1de51 100644
--- a/configmgr/source/localizedvaluenode.hxx
+++ b/configmgr/source/localizedvaluenode.hxx
@@ -43,7 +43,7 @@ class LocalizedValueNode: public Node {
public:
LocalizedValueNode(int layer, com::sun::star::uno::Any const & value);
- virtual rtl::Reference< Node > clone() const;
+ virtual rtl::Reference< Node > clone(bool keepTemplateName) const;
virtual rtl::OUString getTemplateName() const;
diff --git a/configmgr/source/makefile.mk b/configmgr/source/makefile.mk
index 317e08bdf49c..777fed3323d8 100644
--- a/configmgr/source/makefile.mk
+++ b/configmgr/source/makefile.mk
@@ -34,7 +34,7 @@ VISIBILITY_HIDDEN = TRUE
.INCLUDE: settings.mk
-CDEFS += -DOOO_DLLIMPLEMENTATION_CONFIGMGR
+DLLPRE =
SLOFILES = \
$(SLO)/access.obj \
@@ -77,7 +77,7 @@ SHL1STDLIBS = \
$(CPPULIB) \
$(SALHELPERLIB) \
$(SALLIB)
-SHL1TARGET = configmgr
+SHL1TARGET = configmgr.uno
SHL1USE_EXPORTS = name
DEF1NAME = $(SHL1TARGET)
diff --git a/configmgr/source/node.hxx b/configmgr/source/node.hxx
index 10f168520595..7c9417e68ea9 100644
--- a/configmgr/source/node.hxx
+++ b/configmgr/source/node.hxx
@@ -46,7 +46,7 @@ public:
virtual Kind kind() const = 0;
- virtual rtl::Reference< Node > clone() const = 0;
+ virtual rtl::Reference< Node > clone(bool keepTemplateName) const = 0;
virtual NodeMap & getMembers();
diff --git a/configmgr/source/nodemap.cxx b/configmgr/source/nodemap.cxx
index 6b22863b5672..8e4d06030bdf 100644
--- a/configmgr/source/nodemap.cxx
+++ b/configmgr/source/nodemap.cxx
@@ -42,7 +42,7 @@ void cloneNodeMap(NodeMap const & source, NodeMap * target) {
OSL_ASSERT(target != 0 && target->empty());
NodeMap clone(source);
for (NodeMap::iterator i(clone.begin()); i != clone.end(); ++i) {
- i->second = i->second->clone();
+ i->second = i->second->clone(true);
}
std::swap(clone, *target);
}
diff --git a/configmgr/source/propertynode.cxx b/configmgr/source/propertynode.cxx
index 070b56d9be9a..f3e459998e7e 100644
--- a/configmgr/source/propertynode.cxx
+++ b/configmgr/source/propertynode.cxx
@@ -55,7 +55,7 @@ PropertyNode::PropertyNode(
extension_(extension)
{}
-rtl::Reference< Node > PropertyNode::clone() const {
+rtl::Reference< Node > PropertyNode::clone(bool) const {
return new PropertyNode(*this);
}
diff --git a/configmgr/source/propertynode.hxx b/configmgr/source/propertynode.hxx
index 1566cbf72dbe..506526ffcc1e 100644
--- a/configmgr/source/propertynode.hxx
+++ b/configmgr/source/propertynode.hxx
@@ -48,7 +48,7 @@ public:
int layer, Type staticType, bool nillable,
com::sun::star::uno::Any const & value, bool extension);
- virtual rtl::Reference< Node > clone() const;
+ virtual rtl::Reference< Node > clone(bool keepTemplateName) const;
Type getStaticType() const;
diff --git a/configmgr/source/services.cxx b/configmgr/source/services.cxx
index 3a009b3cee15..f8c3289664ef 100644
--- a/configmgr/source/services.cxx
+++ b/configmgr/source/services.cxx
@@ -44,6 +44,7 @@
#include "configurationprovider.hxx"
#include "configurationregistry.hxx"
#include "defaultprovider.hxx"
+#include "update.hxx"
namespace {
@@ -67,6 +68,9 @@ static cppu::ImplementationEntry const services[] = {
{ &dummy, &configmgr::configuration_registry::getImplementationName,
&configmgr::configuration_registry::getSupportedServiceNames,
&configmgr::configuration_registry::createFactory, 0, 0 },
+ { &dummy, &configmgr::update::getImplementationName,
+ &configmgr::update::getSupportedServiceNames,
+ &configmgr::update::createFactory, 0, 0 },
{ 0, 0, 0, 0, 0, 0 }
};
@@ -107,6 +111,19 @@ extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.configuration.DefaultProvider")));
+ css::uno::Reference< css::registry::XRegistryKey >(
+ (css::uno::Reference< css::registry::XRegistryKey >(
+ static_cast< css::registry::XRegistryKey * >(pRegistryKey))->
+ createKey(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "/com.sun.star.comp.configuration.Update/UNO/"
+ "SINGLETONS/com.sun.star.configuration.Update")))),
+ css::uno::UNO_SET_THROW)->
+ setStringValue(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.configuration.Update_Service")));
} catch (css::uno::Exception & e) {
(void) e;
OSL_TRACE(
diff --git a/configmgr/source/setnode.cxx b/configmgr/source/setnode.cxx
index f19c36c0bba5..465345a5f856 100644
--- a/configmgr/source/setnode.cxx
+++ b/configmgr/source/setnode.cxx
@@ -69,8 +69,8 @@ SetNode::SetNode(
templateName_(templateName), mandatory_(Data::NO_LAYER)
{}
-rtl::Reference< Node > SetNode::clone() const {
- return new SetNode(*this);
+rtl::Reference< Node > SetNode::clone(bool keepTemplateName) const {
+ return new SetNode(*this, keepTemplateName);
}
NodeMap & SetNode::getMembers() {
@@ -105,12 +105,15 @@ bool SetNode::isValidTemplate(rtl::OUString const & templateName) const {
additionalTemplateNames_.end());
}
-SetNode::SetNode(SetNode const & other):
+SetNode::SetNode(SetNode const & other, bool keepTemplateName):
Node(other), defaultTemplateName_(other.defaultTemplateName_),
additionalTemplateNames_(other.additionalTemplateNames_),
- templateName_(other.templateName_), mandatory_(other.mandatory_)
+ mandatory_(other.mandatory_)
{
cloneNodeMap(other.members_, &members_);
+ if (keepTemplateName) {
+ templateName_ = other.templateName_;
+ }
}
SetNode::~SetNode() {}
diff --git a/configmgr/source/setnode.hxx b/configmgr/source/setnode.hxx
index 7bf1ab0a199e..94ce537adda1 100644
--- a/configmgr/source/setnode.hxx
+++ b/configmgr/source/setnode.hxx
@@ -46,7 +46,7 @@ public:
int layer, rtl::OUString const & defaultTemplateName,
rtl::OUString const & templateName);
- virtual rtl::Reference< Node > clone() const;
+ virtual rtl::Reference< Node > clone(bool keepTemplateName) const;
virtual NodeMap & getMembers();
@@ -63,7 +63,7 @@ public:
bool isValidTemplate(rtl::OUString const & templateName) const;
private:
- SetNode(SetNode const & other);
+ SetNode(SetNode const & other, bool keepTemplateName);
virtual ~SetNode();
diff --git a/configmgr/source/update.cxx b/configmgr/source/update.cxx
index 57f45068d954..4c1d59d5d054 100644
--- a/configmgr/source/update.cxx
+++ b/configmgr/source/update.cxx
@@ -30,27 +30,84 @@
#include <set>
-#include "configmgr/update.hxx"
+#include "boost/noncopyable.hpp"
+#include "com/sun/star/configuration/XUpdate.hpp"
+#include "com/sun/star/lang/XSingleComponentFactory.hpp"
+#include "com/sun/star/uno/Any.hxx"
+#include "com/sun/star/uno/Exception.hpp"
+#include "com/sun/star/uno/Reference.hxx"
+#include "com/sun/star/uno/RuntimeException.hpp"
+#include "com/sun/star/uno/Sequence.hxx"
+#include "com/sun/star/uno/XComponentContext.hpp"
+#include "com/sun/star/uno/XInterface.hpp"
+#include "cppuhelper/factory.hxx"
+#include "cppuhelper/implbase1.hxx"
+#include "cppuhelper/weak.hxx"
#include "osl/mutex.hxx"
#include "rtl/ref.hxx"
+#include "rtl/unload.h"
+#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
+#include "sal/types.h"
#include "broadcaster.hxx"
#include "components.hxx"
#include "lock.hxx"
#include "modifications.hxx"
#include "rootaccess.hxx"
+#include "update.hxx"
-namespace configmgr {
+namespace configmgr { namespace update {
-namespace update {
+namespace {
-void insertExtensionXcsFile(bool shared, rtl::OUString const & fileUri) {
+namespace css = com::sun::star;
+
+std::set< rtl::OUString > seqToSet(
+ css::uno::Sequence< rtl::OUString > const & sequence)
+{
+ return std::set< rtl::OUString >(
+ sequence.getConstArray(),
+ sequence.getConstArray() + sequence.getLength());
+}
+
+class Service:
+ public cppu::WeakImplHelper1< css::configuration::XUpdate >,
+ private boost::noncopyable
+{
+public:
+ Service() {}
+
+private:
+ virtual ~Service() {}
+
+ virtual void SAL_CALL insertExtensionXcsFile(
+ sal_Bool shared, rtl::OUString const & fileUri)
+ throw (css::uno::RuntimeException);
+
+ virtual void SAL_CALL insertExtensionXcuFile(
+ sal_Bool shared, rtl::OUString const & fileUri)
+ throw (css::uno::RuntimeException);
+
+ virtual void SAL_CALL insertModificationXcuFile(
+ rtl::OUString const & fileUri,
+ css::uno::Sequence< rtl::OUString > const & includedPaths,
+ css::uno::Sequence< rtl::OUString > const & excludedPaths)
+ throw (css::uno::RuntimeException);
+};
+
+void Service::insertExtensionXcsFile(
+ sal_Bool shared, rtl::OUString const & fileUri)
+ throw (css::uno::RuntimeException)
+{
osl::MutexGuard g(lock);
Components::getSingleton().insertExtensionXcsFile(shared, fileUri);
}
-void insertExtensionXcuFile(bool shared, rtl::OUString const & fileUri) {
+void Service::insertExtensionXcuFile(
+ sal_Bool shared, rtl::OUString const & fileUri)
+ throw (css::uno::RuntimeException)
+{
Broadcaster bc;
{
osl::MutexGuard g(lock);
@@ -63,23 +120,91 @@ void insertExtensionXcuFile(bool shared, rtl::OUString const & fileUri) {
bc.send();
}
-void insertModificationXcuFile(
+void Service::insertModificationXcuFile(
rtl::OUString const & fileUri,
- std::set< rtl::OUString > const & includedPaths,
- std::set< rtl::OUString > const & excludedPaths)
+ css::uno::Sequence< rtl::OUString > const & includedPaths,
+ css::uno::Sequence< rtl::OUString > const & excludedPaths)
+ throw (css::uno::RuntimeException)
{
Broadcaster bc;
{
osl::MutexGuard g(lock);
Modifications mods;
Components::getSingleton().insertModificationXcuFile(
- fileUri, includedPaths, excludedPaths, &mods);
+ fileUri, seqToSet(includedPaths), seqToSet(excludedPaths), &mods);
Components::getSingleton().initGlobalBroadcaster(
mods, rtl::Reference< RootAccess >(), &bc);
}
bc.send();
}
+class Factory:
+ public cppu::WeakImplHelper1< css::lang::XSingleComponentFactory >,
+ private boost::noncopyable
+{
+public:
+ Factory() {}
+
+private:
+ virtual ~Factory() {}
+
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL
+ createInstanceWithContext(
+ css::uno::Reference< css::uno::XComponentContext > const & Context)
+ throw (css::uno::Exception, css::uno::RuntimeException);
+
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL
+ createInstanceWithArgumentsAndContext(
+ css::uno::Sequence< css::uno::Any > const & Arguments,
+ css::uno::Reference< css::uno::XComponentContext > const & Context)
+ throw (css::uno::Exception, css::uno::RuntimeException);
+};
+
+css::uno::Reference< css::uno::XInterface > Factory::createInstanceWithContext(
+ css::uno::Reference< css::uno::XComponentContext > const & Context)
+ throw (css::uno::Exception, css::uno::RuntimeException)
+{
+ return createInstanceWithArgumentsAndContext(
+ css::uno::Sequence< css::uno::Any >(), Context);
+}
+
+css::uno::Reference< css::uno::XInterface >
+Factory::createInstanceWithArgumentsAndContext(
+ css::uno::Sequence< css::uno::Any > const & Arguments,
+ css::uno::Reference< css::uno::XComponentContext > const &)
+ throw (css::uno::Exception, css::uno::RuntimeException)
+{
+ if (Arguments.getLength() != 0) {
+ throw css::uno::Exception(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.comp.configuration.Update must be"
+ " instantiated without arguments")),
+ static_cast< cppu::OWeakObject * >(this));
+ }
+ return static_cast< cppu::OWeakObject * >(new Service);
}
}
+
+rtl::OUString getImplementationName() {
+ return rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.configuration.Update"));
+}
+
+css::uno::Sequence< rtl::OUString > getSupportedServiceNames() {
+ rtl::OUString name(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.configuration.Update_Service"));
+ return css::uno::Sequence< rtl::OUString >(&name, 1);
+}
+
+css::uno::Reference< css::lang::XSingleComponentFactory > createFactory(
+ cppu::ComponentFactoryFunc, rtl::OUString const &,
+ css::uno::Sequence< rtl::OUString > const &, rtl_ModuleCount *)
+ SAL_THROW(())
+{
+ return new Factory;
+}
+
+} }
diff --git a/configmgr/source/update.hxx b/configmgr/source/update.hxx
new file mode 100644
index 000000000000..faa5c86b15fa
--- /dev/null
+++ b/configmgr/source/update.hxx
@@ -0,0 +1,59 @@
+/*************************************************************************
+*
+* 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 INCLUDED_CONFIGMGR_SOURCE_UPDATE_HXX
+#define INCLUDED_CONFIGMGR_SOURCE_UPDATE_HXX
+
+#include "sal/config.h"
+
+#include "com/sun/star/uno/Reference.hxx"
+#include "com/sun/star/uno/Sequence.hxx"
+#include "cppuhelper/factory.hxx"
+#include "rtl/unload.h"
+#include "sal/types.h"
+
+namespace com { namespace sun { namespace star { namespace lang {
+ class XSingleComponentFactory;
+} } } }
+namespace rtl { class OUString; }
+
+namespace configmgr { namespace update {
+
+rtl::OUString SAL_CALL getImplementationName();
+
+com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL
+getSupportedServiceNames();
+
+com::sun::star::uno::Reference< com::sun::star::lang::XSingleComponentFactory >
+SAL_CALL createFactory(
+ cppu::ComponentFactoryFunc, rtl::OUString const &,
+ com::sun::star::uno::Sequence< rtl::OUString > const &, rtl_ModuleCount *)
+ SAL_THROW(());
+
+} }
+
+#endif
diff --git a/configmgr/source/xcsparser.cxx b/configmgr/source/xcsparser.cxx
index 12e64ebbe171..79e122759fc8 100644
--- a/configmgr/source/xcsparser.cxx
+++ b/configmgr/source/xcsparser.cxx
@@ -78,19 +78,19 @@ void merge(
case Node::KIND_LOCALIZED_VALUE:
break; //TODO: merge certain parts?
case Node::KIND_GROUP:
- if (dynamic_cast< GroupNode * >(original.get())->isExtensible()) {
- for (NodeMap::iterator i2(update->getMembers().begin());
- i2 != update->getMembers().end(); ++i2)
- {
- NodeMap::iterator i1(
- original->getMembers().find(i2->first));
- if (i1 == original->getMembers().end()) {
- if (i2->second->kind() == Node::KIND_PROPERTY) {
- original->getMembers().insert(*i2);
- }
- } else if (i2->second->kind() == i1->second->kind()) {
- merge(i1->second, i2->second);
+ for (NodeMap::iterator i2(update->getMembers().begin());
+ i2 != update->getMembers().end(); ++i2)
+ {
+ NodeMap::iterator i1(original->getMembers().find(i2->first));
+ if (i1 == original->getMembers().end()) {
+ if (i2->second->kind() == Node::KIND_PROPERTY &&
+ dynamic_cast< GroupNode * >(
+ original.get())->isExtensible())
+ {
+ original->getMembers().insert(*i2);
}
+ } else if (i2->second->kind() == i1->second->kind()) {
+ merge(i1->second, i2->second);
}
}
break;
@@ -456,7 +456,7 @@ void XcsParser::handleNodeRef(XmlReader & reader) {
reader.getUrl()),
css::uno::Reference< css::uno::XInterface >());
}
- rtl::Reference< Node > node(tmpl->clone());
+ rtl::Reference< Node > node(tmpl->clone(false));
node->setLayer(valueParser_.getLayer());
elements_.push(Element(node, name));
}
diff --git a/configmgr/source/xcuparser.cxx b/configmgr/source/xcuparser.cxx
index 77b0f747f313..f9f439c98916 100644
--- a/configmgr/source/xcuparser.cxx
+++ b/configmgr/source/xcuparser.cxx
@@ -1056,7 +1056,7 @@ void XcuParser::handleSetNode(XmlReader & reader, SetNode * set) {
if (state_.top().locked || finalizedLayer < valueParser_.getLayer()) {
state_.push(State(true)); // ignored
} else {
- rtl::Reference< Node > member(tmpl->clone());
+ rtl::Reference< Node > member(tmpl->clone(true));
member->setLayer(valueParser_.getLayer());
member->setFinalized(finalizedLayer);
member->setMandatory(mandatoryLayer);
@@ -1070,7 +1070,7 @@ void XcuParser::handleSetNode(XmlReader & reader, SetNode * set) {
{
state_.push(State(true)); // ignored
} else {
- rtl::Reference< Node > member(tmpl->clone());
+ rtl::Reference< Node > member(tmpl->clone(true));
member->setLayer(valueParser_.getLayer());
member->setFinalized(finalizedLayer);
member->setMandatory(mandatoryLayer);
diff --git a/configure.in b/configure.in
index 928e08275213..6b6dabe6571b 100644
--- a/configure.in
+++ b/configure.in
@@ -118,10 +118,6 @@ AC_ARG_ENABLE(odk,
[ --disable-odk OO.o includes an ODK, office development kit
which some packagers may with to build without
],,enable_odk="yes")
-AC_ARG_ENABLE(qadevooo,
-[ --disable-qadevooo OO.o includes some qa testsuites which some
- packagers may wish to build without
-],,enable_qadevooo="yes")
AC_ARG_ENABLE(mathmldtd,
[ --disable-mathmldtd disable mathmldtd
(useful for distributions that want to avoid packaging
@@ -3496,20 +3492,6 @@ AC_SUBST(MINGWCXX)
AC_SUBST(MINGWSTRIP)
dnl ===================================================================
-dnl Check for building qadevOOo
-dnl ===================================================================
-AC_MSG_CHECKING([whether to build qadevOOo])
-if test "z$enable_qadevooo" = "z" -o "$enable_qadevooo" != "no"; then
- AC_MSG_RESULT([yes])
- BUILD_QADEVOOO="YES"
- BUILD_TYPE="$BUILD_TYPE QADEVOOO"
-else
- BUILD_QADEVOOO="NO"
- AC_MSG_RESULT([no])
-fi
-AC_SUBST(BUILD_QADEVOOO)
-
-dnl ===================================================================
dnl Check for prelinked libgcc_s.so.1
dnl ===================================================================
if test "$_os" = "Linux" -a -z "$with_system_stdlibs" -a -z "$with_system_libs"; then
@@ -6748,9 +6730,9 @@ if test "$SOLAR_JAVA" != "" && test "$with_junit" != "no"; then
AC_MSG_RESULT([$OOO_JUNIT_JAR])
else
AC_MSG_RESULT([no])
- AC_MSG_ERROR([cannot find JUnit 4 jar at $OOO_JUNIT_JAR;
-please install one and/or specify its pathname via --with-junit=...,
-or disable it via --without-junit])
+ AC_MSG_ERROR([cannot find JUnit 4 jar; please install one in the default
+location (/usr/share/java), specify its pathname via
+--with-junit=..., or disable it via --without-junit])
fi
fi
AC_SUBST(OOO_JUNIT_JAR)
diff --git a/connectivity/prj/build.lst b/connectivity/prj/build.lst
index dd386c7c7161..0b15c06acf15 100644
--- a/connectivity/prj/build.lst
+++ b/connectivity/prj/build.lst
@@ -1,4 +1,4 @@
-cn connectivity : shell l10n comphelper MOZ:moz SO:moz_prebuilt svl UNIXODBC:unixODBC unoil javaunohelper HSQLDB:hsqldb QADEVOOO:qadevOOo officecfg NSS:nss NULL
+cn connectivity : shell l10n comphelper MOZ:moz SO:moz_prebuilt svl UNIXODBC:unixODBC unoil javaunohelper HSQLDB:hsqldb qadevOOo officecfg NSS:nss NULL
cn connectivity usr1 - all cn_mkout NULL
cn connectivity\inc nmake - all cn_inc NULL
cn connectivity\com\sun\star\sdbcx\comp\hsqldb nmake - all cn_jhsqldbdb cn_hsqldb cn_inc NULL
diff --git a/connectivity/qa/connectivity/tools/makefile.mk b/connectivity/qa/connectivity/tools/makefile.mk
index 0f3c9c84b92e..07490532a1b1 100644
--- a/connectivity/qa/connectivity/tools/makefile.mk
+++ b/connectivity/qa/connectivity/tools/makefile.mk
@@ -38,7 +38,6 @@ all:
@echo "Java not available. Build skipped"
.ELSE
-.IF "$(BUILD_QADEVOOO)" == "YES"
#----- compile .java files -----------------------------------------
JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunnerLight.jar
@@ -61,8 +60,6 @@ ALL : ALLTAR
ALL: ALLDEP
.ENDIF
-.ENDIF
-
.ENDIF # "$(SOLAR_JAVA)" == ""
.INCLUDE : target.mk
diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx
index 1d19c05a46c0..d95c6263b7ed 100644
--- a/connectivity/source/drivers/calc/CTable.cxx
+++ b/connectivity/source/drivers/calc/CTable.cxx
@@ -347,14 +347,15 @@ void lcl_SetValue( ORowSetValue& rValue, const Reference<XSpreadsheet>& xSheet,
switch (nType)
{
case DataType::VARCHAR:
- if ( eCellType == CellContentType_TEXT )
+ if ( eCellType == CellContentType_EMPTY )
+ rValue.setNull();
+ else
{
+ // #i25840# still let Calc convert numbers to text
const Reference<XText> xText( xCell, UNO_QUERY );
if ( xText.is() )
rValue = xText->getString();
- } // if ( eCellType == CellContentType_TEXT )
- else
- rValue.setNull();
+ }
break;
case DataType::DECIMAL:
if ( eCellType == CellContentType_VALUE )
diff --git a/cppu/test/AffineBridge/AffineBridge.test.pl b/cppu/test/AffineBridge/AffineBridge.test.pl
deleted file mode 100755
index 6b667efd299c..000000000000
--- a/cppu/test/AffineBridge/AffineBridge.test.pl
+++ /dev/null
@@ -1,72 +0,0 @@
-:
-eval 'exec perl -wS $0 ${1+"$@"}'
- if 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.
-#
-#*************************************************************************
-
-my $rc = 0;
-my $comment = "";
-
-
-@tests = (
- "EnvStack.tester :A:affine :A:affine \"-enter:A[0,not entered]-leave:A[0,not entered]\" :A:affine", # initially not entered&leave
- "EnvStack.tester :affine:A :affine:A \"-enter:affine:A[1,OK]-leave:affine:A[1,OK]\" :affine", # enter
- "EnvStack.tester \"\" :affine:A \"-into:affine:A[1,OK]\" :affine", # call into
- "EnvStack.tester :affine :A \"-into:A[0,wrong thread]\" :affine", # call out
- "EnvStack.tester \"\" :affine:affine:A \"-into:affine:affine:A[0,wrong thread]\" :affine", # wrong thread
- "env.tester.bin CPP:affine"
-);
-
-foreach $test (@tests) {
- $output = "";
-
- $cmd = $test;
- open TESTER, $cmd . "|";
- while (<TESTER>) {
- chomp;
-
- $output = $output . "\t" . $_ . "\n";
- }
- close TESTER ;
-
- if ($? != 0) {
- $comment = $comment . "TEST FAILED: " . $cmd . "\n";
- $comment = $comment . $output;
- }
- $rc = $rc + $?;
-}
-
-
-print $comment;
-
-if ($rc == 0) {
- print "*********** SUCCESS\n";
-}
-else {
- print "*********** FAILURE\n";
-}
diff --git a/cppu/test/AffineBridge/makefile.mk b/cppu/test/AffineBridge/makefile.mk
deleted file mode 100644
index f282d05cf357..000000000000
--- a/cppu/test/AffineBridge/makefile.mk
+++ /dev/null
@@ -1,42 +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 := cppu
-TARGET := AffineBridge.test.pl
-
-
-.INCLUDE : settings.mk
-
-
-.INCLUDE : target.mk
-
-
-ALLTAR: $(BIN)$/$(TARGET)
-
-$(BIN)$/$(TARGET): AffineBridge.test.pl
- @+$(COPY) $^ $@
diff --git a/cppu/test/AntiEnvGuard/AntiEnvGuard.test.cxx b/cppu/test/AntiEnvGuard/AntiEnvGuard.test.cxx
deleted file mode 100644
index 885600141255..000000000000
--- a/cppu/test/AntiEnvGuard/AntiEnvGuard.test.cxx
+++ /dev/null
@@ -1,131 +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 "sal/main.h"
-
-#include "cppu/EnvGuards.hxx"
-#include "uno/environment.hxx"
-
-#include <iostream>
-
-
-using namespace com::sun::star;
-
-static rtl::OUString s_message;
-
-
-static void s_test__ctor(void)
-{
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__ctor"));
-
- rtl::OUString ref(RTL_CONSTASCII_USTRINGPARAM("uno"));
-
- rtl::OUString current_EnvDcp;
- {
- cppu::EnvGuard envGuard(uno::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("uno:unsafe")), NULL));
-
- {
- cppu::AntiEnvGuard antiGuard;
-
- current_EnvDcp = uno::Environment::getCurrent(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO))).getTypeName();
- }
- }
-
- if (current_EnvDcp == ref)
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
-
- else
- {
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - FAILURE\n"));
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t got: \""));
- s_message += current_EnvDcp;
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"\n"));
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t expected: \""));
- s_message += ref;
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"\n"));
- }
-}
-
-static void s_test__dtor(void)
-{
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__dtor"));
-
- rtl::OUString ref(RTL_CONSTASCII_USTRINGPARAM("uno:unsafe"));
-
- rtl::OUString current_EnvDcp;
- {
- cppu::EnvGuard envGuard(uno::Environment(ref, NULL));
-
- {
- cppu::AntiEnvGuard antiGuard;
- }
- current_EnvDcp = uno::Environment::getCurrent(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO))).getTypeName();
- }
-
-
- if (current_EnvDcp == ref)
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
-
- else
- {
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - FAILURE\n"));
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t got: \""));
- s_message += current_EnvDcp;
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"\n"));
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t expected: \""));
- s_message += ref;
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"\n"));
- }
-}
-
-
-
-SAL_IMPLEMENT_MAIN_WITH_ARGS(/*argc*/, argv)
-{
- s_test__ctor();
- s_test__dtor();
-
- int ret;
- if (s_message.indexOf(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FAILURE"))) == -1)
- {
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS PASSED\n"));
- ret = 0;
- }
- else
- {
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS _NOT_ PASSED\n"));
- ret = -1;
- }
-
- std::cerr
- << argv[0]
- << std::endl
- << rtl::OUStringToOString(s_message, RTL_TEXTENCODING_ASCII_US).getStr()
- << std::endl;
-
- return ret;
-}
diff --git a/cppu/test/AntiEnvGuard/makefile.mk b/cppu/test/AntiEnvGuard/makefile.mk
deleted file mode 100644
index 3164ca17650d..000000000000
--- a/cppu/test/AntiEnvGuard/makefile.mk
+++ /dev/null
@@ -1,46 +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 := cppu
-TARGET := AntiEnvGuard.test
-
-
-ENABLE_EXCEPTIONS := TRUE
-NO_BSYMBOLIC := TRUE
-USE_DEFFILE := TRUE
-
-
-.INCLUDE : settings.mk
-
-
-APP1TARGET := $(TARGET)
-APP1OBJS := $(OBJ)$/AntiEnvGuard.test.obj
-APP1STDLIBS := $(CPPULIB) $(SALLIB)
-
-
-.INCLUDE : target.mk
diff --git a/cppu/test/EnvDcp/EnvDcp.test.cxx b/cppu/test/EnvDcp/EnvDcp.test.cxx
deleted file mode 100644
index d9f78468ef3f..000000000000
--- a/cppu/test/EnvDcp/EnvDcp.test.cxx
+++ /dev/null
@@ -1,111 +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 "sal/main.h"
-
-#include "cppu/EnvDcp.hxx"
-
-#include <iostream>
-
-
-static rtl::OUString s_message;
-
-static void s_test__getTypeName(void)
-{
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__getTypeName"));
-
- rtl::OUString envDcp(RTL_CONSTASCII_USTRINGPARAM("acaQEQWE123:asda:2342"));
-
- rtl::OUString typeName(cppu::EnvDcp::getTypeName(envDcp));
-
- rtl::OUString ref(RTL_CONSTASCII_USTRINGPARAM("acaQEQWE123"));
-
- if (typeName == ref)
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
-
- else
- {
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - FAILURE\n"));
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t got: \""));
- s_message += typeName;
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"\n"));
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t expected: \""));
- s_message += ref;
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"\n"));
- }
-}
-
-static void s_test__getPurpose(void)
-{
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__getPurpose"));
-
- rtl::OUString envDcp(RTL_CONSTASCII_USTRINGPARAM("acaQEQWE123:asda:2342"));
-
- rtl::OUString purpose(cppu::EnvDcp::getPurpose(envDcp));
-
- rtl::OUString ref(RTL_CONSTASCII_USTRINGPARAM(":asda:2342"));
-
- if (purpose == ref)
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
-
- else
- {
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - FAILURE\n"));
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t got: \""));
- s_message += purpose;
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"\n"));
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t expected: \""));
- s_message += ref;
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"\n"));
- }
-}
-
-SAL_IMPLEMENT_MAIN_WITH_ARGS(/*argc*/, argv)
-{
- s_test__getTypeName();
- s_test__getPurpose();
-
- int ret;
- if (s_message.indexOf(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FAILURE"))) == -1)
- {
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS PASSED\n"));
- ret = 0;
- }
- else
- {
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS _NOT_ PASSED\n"));
- ret = -1;
- }
-
- std::cerr
- << argv[0]
- << std::endl
- << rtl::OUStringToOString(s_message, RTL_TEXTENCODING_ASCII_US).getStr()
- << std::endl;
-
- return ret;
-}
diff --git a/cppu/test/EnvGuard/EnvGuard.test.cxx b/cppu/test/EnvGuard/EnvGuard.test.cxx
deleted file mode 100644
index ec926fa56670..000000000000
--- a/cppu/test/EnvGuard/EnvGuard.test.cxx
+++ /dev/null
@@ -1,152 +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 "sal/main.h"
-
-#include "cppu/EnvGuards.hxx"
-#include "uno/environment.hxx"
-
-#include <iostream>
-
-
-using namespace com::sun::star;
-
-static rtl::OUString s_message;
-
-
-static void s_test__entered(void)
-{
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__entered"));
-
- rtl::OUString ref(RTL_CONSTASCII_USTRINGPARAM("uno:unsafe"));
-
- rtl::OUString current_EnvDcp;
- {
- cppu::EnvGuard envGuard(uno::Environment(ref, NULL));
-
- current_EnvDcp = uno::Environment::getCurrent(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO))).getTypeName();
- }
-
- if (current_EnvDcp == ref)
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
-
- else
- {
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - FAILURE\n"));
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t got: \""));
- s_message += current_EnvDcp;
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"\n"));
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t expected: \""));
- s_message += ref;
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"\n"));
- }
-}
-
-static void s_test__left(void)
-{
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__left"));
-
- rtl::OUString ref(RTL_CONSTASCII_USTRINGPARAM("uno"));
-
- rtl::OUString current_EnvDcp;
- {
- cppu::EnvGuard envGuard(uno::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("uno:unsafe")), NULL));
- }
- current_EnvDcp = uno::Environment::getCurrent(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO))).getTypeName();
-
-
- if (current_EnvDcp == ref)
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
-
- else
- {
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - FAILURE\n"));
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t got: \""));
- s_message += current_EnvDcp;
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"\n"));
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t expected: \""));
- s_message += ref;
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"\n"));
- }
-}
-
-static void s_test__clear(void)
-{
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__clear"));
-
- rtl::OUString ref(RTL_CONSTASCII_USTRINGPARAM("uno"));
-
- rtl::OUString current_EnvDcp;
- {
- cppu::EnvGuard envGuard(uno::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("uno:unsafe")), NULL));
-
- envGuard.clear();
- current_EnvDcp = uno::Environment::getCurrent(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO))).getTypeName();
- }
-
-
- if (current_EnvDcp == ref)
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
-
- else
- {
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - FAILURE\n"));
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t got: \""));
- s_message += current_EnvDcp;
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"\n"));
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t expected: \""));
- s_message += ref;
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"\n"));
- }
-}
-
-SAL_IMPLEMENT_MAIN_WITH_ARGS(/*argc*/, argv)
-{
- s_test__entered();
- s_test__left();
- s_test__clear();
-
- int ret;
- if (s_message.indexOf(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FAILURE"))) == -1)
- {
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS PASSED\n"));
- ret = 0;
- }
- else
- {
- s_message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS _NOT_ PASSED\n"));
- ret = -1;
- }
-
- std::cerr
- << argv[0]
- << std::endl
- << rtl::OUStringToOString(s_message, RTL_TEXTENCODING_ASCII_US).getStr()
- << std::endl;
-
- return ret;
-}
diff --git a/cppu/test/EnvGuard/makefile.mk b/cppu/test/EnvGuard/makefile.mk
deleted file mode 100644
index bb851af3fb25..000000000000
--- a/cppu/test/EnvGuard/makefile.mk
+++ /dev/null
@@ -1,46 +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 := cppu
-TARGET := EnvGuard.test
-
-
-ENABLE_EXCEPTIONS := TRUE
-NO_BSYMBOLIC := TRUE
-USE_DEFFILE := TRUE
-
-
-.INCLUDE : settings.mk
-
-
-APP1TARGET := $(TARGET)
-APP1OBJS := $(OBJ)$/EnvGuard.test.obj
-APP1STDLIBS := $(CPPULIB) $(SALLIB)
-
-
-.INCLUDE : target.mk
diff --git a/cppu/test/EnvStack/EnvStack.test.pl b/cppu/test/EnvStack/EnvStack.test.pl
deleted file mode 100755
index 842b2ebab5da..000000000000
--- a/cppu/test/EnvStack/EnvStack.test.pl
+++ /dev/null
@@ -1,89 +0,0 @@
-:
-eval 'exec perl -wS $0 ${1+"$@"}'
- if 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.
-#
-#*************************************************************************
-
-my $rc = 0;
-my $comment = "";
-
-
-@tests = (
- "EnvStack.tester \"\" \"\" \"\"",
- "EnvStack.tester \":A:a\" \":A:b\" \"-enter:A-enter:A:a-out:A:a-into:A:b-leave:A:a-leave:A\"",
- "EnvStack.tester \":A:B:a\" \":A:B:b\" \"-enter:A-enter:A:B-enter:A:B:a-out:A:B:a-into:A:B:b-leave:A:B:a-leave:A:B-leave:A\"",
- "EnvStack.tester \":A:B:C:a\" \":A:B:C:b\" \"-enter:A-enter:A:B-enter:A:B:C-enter:A:B:C:a-out:A:B:C:a-into:A:B:C:b-leave:A:B:C:a-leave:A:B:C-leave:A:B-leave:A\"",
- "EnvStack.tester \":A:B:C:D:a\" \":A:B:C:D:b\" \"-enter:A-enter:A:B-enter:A:B:C-enter:A:B:C:D-enter:A:B:C:D:a-out:A:B:C:D:a-into:A:B:C:D:b-leave:A:B:C:D:a-leave:A:B:C:D-leave:A:B:C-leave:A:B-leave:A\"",
- "EnvStack.tester \":A:a:b\" \":A:c:d\" \"-enter:A-enter:A:a-enter:A:a:b-out:A:a:b-out:A:a-into:A:c-into:A:c:d-leave:A:a:b-leave:A:a-leave:A\"",
- "EnvStack.tester \":A:B:a:b\" \":A:B:c:d\" \"-enter:A-enter:A:B-enter:A:B:a-enter:A:B:a:b-out:A:B:a:b-out:A:B:a-into:A:B:c-into:A:B:c:d-leave:A:B:a:b-leave:A:B:a-leave:A:B-leave:A\"",
- "EnvStack.tester \":A\" \"\" \"-enter:A-out:A-leave:A\"",
- "EnvStack.tester \":A:B\" \"\" \"-enter:A-enter:A:B-out:A:B-out:A-leave:A:B-leave:A\"",
- "EnvStack.tester \":A:B:C\" \"\" \"-enter:A-enter:A:B-enter:A:B:C-out:A:B:C-out:A:B-out:A-leave:A:B:C-leave:A:B-leave:A\"",
- "EnvStack.tester \":A:B:C:D\" \"\" \"-enter:A-enter:A:B-enter:A:B:C-enter:A:B:C:D-out:A:B:C:D-out:A:B:C-out:A:B-out:A-leave:A:B:C:D-leave:A:B:C-leave:A:B-leave:A\"",
- "EnvStack.tester \"\" \":a\" \"-into:a\"",
- "EnvStack.tester \"\" \":a:b\" \"-into:a-into:a:b\"",
- "EnvStack.tester \"\" \":a:b:c\" \"-into:a-into:a:b-into:a:b:c\"",
- "EnvStack.tester \"\" \":a:b:c:d\" \"-into:a-into:a:b-into:a:b:c-into:a:b:c:d\"",
- "EnvStack.tester \":A\" \":a\" \"-enter:A-out:A-into:a-leave:A\"",
- "EnvStack.tester \":A:B\" \":a:b\" \"-enter:A-enter:A:B-out:A:B-out:A-into:a-into:a:b-leave:A:B-leave:A\"",
- "EnvStack.tester \":A:B:C\" \":a:b:c\" \"-enter:A-enter:A:B-enter:A:B:C-out:A:B:C-out:A:B-out:A-into:a-into:a:b-into:a:b:c-leave:A:B:C-leave:A:B-leave:A\"",
- "EnvStack.tester \":A:B:C:D\" \":a:b:c:d\" \"-enter:A-enter:A:B-enter:A:B:C-enter:A:B:C:D-out:A:B:C:D-out:A:B:C-out:A:B-out:A-into:a-into:a:b-into:a:b:c-into:a:b:c:d-leave:A:B:C:D-leave:A:B:C-leave:A:B-leave:A\"",
- "EnvStack.tester \":A\" \":A\" \"-enter:A-leave:A\"",
- "EnvStack.tester \":A:B\" \":A:B\" \"-enter:A-enter:A:B-leave:A:B-leave:A\"",
- "EnvStack.tester \":A:B:C\" \":A:B:C\" \"-enter:A-enter:A:B-enter:A:B:C-leave:A:B:C-leave:A:B-leave:A\"",
- "EnvStack.tester \":A:B:C:D\" \":A:B:C:D\" \"-enter:A-enter:A:B-enter:A:B:C-enter:A:B:C:D-leave:A:B:C:D-leave:A:B:C-leave:A:B-leave:A\""
-);
-
-foreach $test (@tests) {
- $output = "";
-
- $cmd = $test;
- open TESTER, $cmd . "|";
- while (<TESTER>) {
- chomp;
-
- $output = $output . "\t" . $_ . "\n";
- }
- close TESTER ;
-
- if ($? != 0) {
- $comment = $comment . "TEST FAILED: " . $cmd . "\n";
- $comment = $comment . $output;
- }
- $rc = $rc + $?;
-}
-
-
-print $comment;
-
-if ($rc == 0) {
- print "*********** SUCCESS\n";
-}
-else {
- print "*********** FAILURE\n";
-}
diff --git a/cppu/test/EnvStack_tester/EnvStack.tester.cxx b/cppu/test/EnvStack_tester/EnvStack.tester.cxx
deleted file mode 100644
index caa6660a91b6..000000000000
--- a/cppu/test/EnvStack_tester/EnvStack.tester.cxx
+++ /dev/null
@@ -1,200 +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 <iostream>
-
-#include "sal/main.h"
-
-#include "uno/lbnames.h"
-#include "uno/environment.hxx"
-#include "cppu/EnvDcp.hxx"
-#include <com/sun/star/uno/Exception.hpp>
-
-
-#define CPPU_test_EnvStack_tester_IMPL
-#include "EnvStack.tester.hxx"
-
-
-using namespace com::sun::star;
-
-
-static rtl::OUString s_getCurrentEnvDcp(void)
-{
- uno::Environment env(uno::Environment::getCurrent());
- rtl::OUString env_dcp(env.getTypeName());
-
- return env_dcp;
-}
-
-extern "C" { static void s_getCurrentEnvDcp_v(va_list * pParam)
-{
- rtl_uString ** ppEnvDcp = va_arg(*pParam, rtl_uString **);
-
- rtl::OUString env_dcp(s_getCurrentEnvDcp());
-
- rtl_uString_assign(ppEnvDcp, env_dcp.pData);
-}}
-
-static rtl::OUString s_test__uno_Environment_invoke(rtl::OUString const & src_purpose,
- rtl::OUString const & dst_purpose,
- rtl::OUString const & ref)
-{
- rtl::OUString result;
- rtl::OUString target_envDcp;
-
- rtl::OUString src_envDcp(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO));
- src_envDcp += src_purpose;
-
- rtl::OUString dst_envDcp(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO));
- dst_envDcp += dst_purpose;
-
- uno::Environment cur_Env(src_envDcp.pData, NULL);
- uno_Environment_enter(cur_Env.get());
- cur_Env.clear();
-
- uno::Environment dst_Env(dst_envDcp.pData, NULL);
- uno_Environment_invoke(dst_Env.get(), s_getCurrentEnvDcp_v, &target_envDcp.pData);
- dst_Env.clear();
-
- uno_Environment_enter(NULL);
-
-
- if (cppu::EnvDcp::getPurpose(target_envDcp).equals(dst_purpose)
- && g_commentStack.equals(ref))
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" PASSED\n"));
-
- else
- {
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" FAILED -> "));
- result += target_envDcp;
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\texpected: \""));
- result += ref;
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"\n"));
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\tgot: \""));
- result += g_commentStack;
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"\n"));
- }
-
-
-
- return result;
-}
-
-static rtl::OUString s_test__uno_Environment_invoke_v(va_list param)
-{
- rtl::OUString const * pSrc_purpose = va_arg(param, rtl::OUString const *);
- rtl::OUString const * pDst_purpose = va_arg(param, rtl::OUString const *);
- rtl::OUString const * pRef = va_arg(param, rtl::OUString const *);
-
-
- rtl::OUString result;
-
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("s_test__uno_Environment_invoke_v"));
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - \""));
- result += *pSrc_purpose;
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\" -> \""));
- result += *pDst_purpose;
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\""));
-
- result += s_test__uno_Environment_invoke(*pSrc_purpose, *pDst_purpose, *pRef);
-
- return result;
-}
-
-static rtl::OUString s_do_a_test(rtl::OUString (* pTest)(va_list), ...)
-{
- rtl::OUString result;
-
- va_list param;
-
- va_start(param, pTest);
- try {
- result += pTest(param);
- }
- catch (uno::Exception & exception)
- {
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" FAILED with exception: "));
- result += exception.Message;
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
- }
- va_end(param);
-
- return result;
-}
-
-SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
-{
- int result = 0;
- rtl::OString message;
-
- if (argc >= 4 && argc <= 5)
- {
- rtl::OUString src_purpose(argv[1], rtl_str_getLength(argv[1]), RTL_TEXTENCODING_ASCII_US);
- rtl::OUString dst_purpose(argv[2], rtl_str_getLength(argv[2]), RTL_TEXTENCODING_ASCII_US);
- rtl::OUString ref (argv[3], rtl_str_getLength(argv[3]), RTL_TEXTENCODING_ASCII_US);
-
- if (argc == 5)
- {
- rtl::OUString test_env(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO));
- test_env += rtl::OUString(argv[4], rtl_str_getLength(argv[4]), RTL_TEXTENCODING_ASCII_US);
- g_env = uno::Environment(test_env);
- }
-
-
- message += rtl::OUStringToOString(
- s_do_a_test(s_test__uno_Environment_invoke_v, &src_purpose, &dst_purpose, &ref),
- RTL_TEXTENCODING_ASCII_US);
-
-
- if (g_env.is())
- g_env.clear();
-
-
- if (message.indexOf(rtl::OString("FAILED")) == -1)
- message += rtl::OString("TESTS PASSED\n");
-
- else
- {
- message += rtl::OString("TESTS _NOT_ PASSED\n");
- result = -1;
- }
- }
- else
- {
- message = "usage: EnvStack.tester <source purpose>"
- " <destination purpose>"
- " <reference string>"
- " [<reference environment>]\n\n";
- }
-
- std::cout << message.getStr();
-
-
- return result;
-}
-
diff --git a/cppu/test/EnvStack_tester/EnvStack.tester.hxx b/cppu/test/EnvStack_tester/EnvStack.tester.hxx
deleted file mode 100644
index 1500ffe4723f..000000000000
--- a/cppu/test/EnvStack_tester/EnvStack.tester.hxx
+++ /dev/null
@@ -1,61 +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.
- *
- ************************************************************************/
-
-#ifndef INCLUDED_cppu_test_EnvStack_tester_hxx
-#define INCLUDED_cppu_test_EnvStack_tester_hxx
-
-#include "uno/environment.hxx"
-
-
-#ifdef CPPU_test_EnvStack_tester_IMPL
-# define CPPU_test_EnvStack_tester_EXPORT SAL_DLLPUBLIC_EXPORT
-
-#elif defined(CPPU_test_EnvStack_Test_LIB)
-# define CPPU_test_EnvStack_tester_EXPORT extern
-
-#elif defined(__GNUC__) && defined(HAVE_GCC_VISIBILITY_FEATURE)
-# define CPPU_test_EnvStack_tester_EXPORT extern __attribute__ ((weak))
-
-#elif defined(__SUNPRO_CC)
-# define CPPU_test_EnvStack_tester_EXPORT extern
- extern rtl::OUString g_commentStack;
- extern com::sun::star::uno::Environment g_env;
-
-# pragma weak g_commentStack
-# pragma weak g_env
-
-#else
-# define CPPU_test_EnvStack_tester_EXPORT SAL_DLLPUBLIC_IMPORT
-
-#endif
-
-CPPU_test_EnvStack_tester_EXPORT rtl::OUString g_commentStack;
-CPPU_test_EnvStack_tester_EXPORT com::sun::star::uno::Environment g_env;
-
-
-
-#endif
diff --git a/cppu/test/EnvStack_tester/ProbeEnv.cxx b/cppu/test/EnvStack_tester/ProbeEnv.cxx
deleted file mode 100644
index a6b1ce1aaac2..000000000000
--- a/cppu/test/EnvStack_tester/ProbeEnv.cxx
+++ /dev/null
@@ -1,148 +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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_cppu.hxx"
-
-#include "cppu/EnvDcp.hxx"
-
-#include "cppu/helper/purpenv/Environment.hxx"
-#include "cppu/helper/purpenv/Mapping.hxx"
-
-#include "EnvStack.tester.hxx"
-
-
-#define LOG_LIFECYCLE_TestEnv
-#ifdef LOG_LIFECYCLE_TestEnv
-# include <iostream>
-# define LOG_LIFECYCLE_TestEnv_emit(x) x
-
-#else
-# define LOG_LIFECYCLE_TestEnv_emit(x)
-
-#endif
-
-
-class SAL_DLLPRIVATE TestEnv : public cppu::Enterable
-{
- virtual ~TestEnv(void);
-
-public:
- explicit TestEnv(uno_Environment * pEnv);
-
- uno_Environment * m_pEnv;
-
-protected:
- virtual void v_enter(void);
- virtual void v_leave(void);
-
- virtual void v_callInto_v(uno_EnvCallee * pCallee, va_list * pParam);
- virtual void v_callOut_v (uno_EnvCallee * pCallee, va_list * pParam);
-
- virtual int v_isValid (rtl::OUString * pReason);
-};
-
-TestEnv::TestEnv(uno_Environment * pEnv)
- : m_pEnv(pEnv)
-{
- LOG_LIFECYCLE_TestEnv_emit(fprintf(stderr, "LIFE: %s -> %p\n", "TestEnv::TestEnv(...)", this));
-}
-
-TestEnv::~TestEnv(void)
-{
- LOG_LIFECYCLE_TestEnv_emit(fprintf(stderr, "LIFE: %s -> %p\n", "TestEnv::~TestEnv(void)", this));
-}
-
-
-static void s_checkGEnvValidity(void)
-{
- if (g_env.is())
- {
- rtl::OUString reason;
- int result = g_env.isValid(&reason);
-
- g_commentStack += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("["));
- g_commentStack += rtl::OUString::valueOf((sal_Int32)result);
- g_commentStack += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(","));
- g_commentStack += reason;
- g_commentStack += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("]"));
- }
-}
-
-void TestEnv::v_callInto_v(uno_EnvCallee * pCallee, va_list * pParam)
-{
- g_commentStack += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-into"));
- g_commentStack += cppu::EnvDcp::getPurpose(m_pEnv->pTypeName);
-
- s_checkGEnvValidity();
-
- pCallee(pParam);
-}
-
-void TestEnv::v_callOut_v(uno_EnvCallee * pCallee, va_list * pParam)
-{
- g_commentStack += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-out"));
- g_commentStack += cppu::EnvDcp::getPurpose(m_pEnv->pTypeName);
-
- s_checkGEnvValidity();
-
- pCallee(pParam);
-}
-
-void TestEnv::v_enter(void)
-{
- g_commentStack += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-enter"));
- g_commentStack += cppu::EnvDcp::getPurpose(m_pEnv->pTypeName);
-
- s_checkGEnvValidity();
-}
-
-void TestEnv::v_leave(void)
-{
- g_commentStack += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-leave"));
- g_commentStack += cppu::EnvDcp::getPurpose(m_pEnv->pTypeName);
-
- s_checkGEnvValidity();
-}
-
-int TestEnv::v_isValid(rtl::OUString * /*pReason*/)
-{
- return 1;
-}
-
-extern "C" void SAL_CALL uno_initEnvironment(uno_Environment * pEnv) SAL_THROW_EXTERN_C()
-{
- cppu::helper::purpenv::Environment_initWithEnterable(pEnv, new TestEnv(pEnv));
-}
-
-extern "C" void uno_ext_getMapping(uno_Mapping ** ppMapping,
- uno_Environment * pFrom,
- uno_Environment * pTo )
-{
- cppu::helper::purpenv::createMapping(ppMapping, pFrom, pTo);
-}
-
diff --git a/cppu/test/EnvStack_tester/ProbeEnv.def b/cppu/test/EnvStack_tester/ProbeEnv.def
deleted file mode 100644
index 1444d92c13fa..000000000000
--- a/cppu/test/EnvStack_tester/ProbeEnv.def
+++ /dev/null
@@ -1,8 +0,0 @@
-HEAPSIZE 0
-EXPORTS
- uno_initEnvironment
- uno_ext_getMapping
-
-
-
-
diff --git a/cppu/test/EnvStack_tester/makefile.mk b/cppu/test/EnvStack_tester/makefile.mk
deleted file mode 100644
index 1ae0e4e89250..000000000000
--- a/cppu/test/EnvStack_tester/makefile.mk
+++ /dev/null
@@ -1,126 +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 := cppu
-TARGET := EnvStack.tester
-
-
-ENABLE_EXCEPTIONS := TRUE
-NO_BSYMBOLIC := TRUE
-USE_DEFFILE := TRUE
-
-
-.INCLUDE : settings.mk
-.INCLUDE : ../../source/helper/purpenv/export.mk
-
-.IF "$(COM)" == "GCC"
-LINKFLAGS += -rdynamic
-.ENDIF
-
-
-ENVINCPRE := -I$(OUT)$/inc$/$(TARGET)
-
-APP1TARGET := $(TARGET)
-APP1OBJS := $(OBJ)$/EnvStack.tester.obj
-APP1STDLIBS := $(CPPULIB) $(SALLIB)
-
-
-SHL1TARGET := $(HLD_DLLPRE)A_uno_uno
-SHL1IMPLIB := i$(SHL1TARGET)
-SHL1OBJS := $(SLO)$/ProbeEnv.obj
-SHL1STDLIBS := $(purpenv_helper_LIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB)
-.IF "$(GUI)"=="WNT"
-SHL1STDLIBS += $(BIN)$/EnvStack.tester.lib
-.ENDIF
-SHL1DEF := ProbeEnv.def
-
-SHL2TARGET := $(HLD_DLLPRE)B_uno_uno
-SHL2IMPLIB := i$(SHL2TARGET)
-SHL2OBJS := $(SHL1OBJS)
-SHL2STDLIBS := $(SHL1STDLIBS)
-SHL2DEF := $(SHL1DEF)
-
-SHL3TARGET := $(HLD_DLLPRE)C_uno_uno
-SHL3IMPLIB := i$(SHL3TARGET)
-SHL3OBJS := $(SHL1OBJS)
-SHL3STDLIBS := $(SHL1STDLIBS)
-SHL3DEF := $(SHL1DEF)
-
-SHL4TARGET := $(HLD_DLLPRE)D_uno_uno
-SHL4IMPLIB := i$(SHL4TARGET)
-SHL4OBJS := $(SHL1OBJS)
-SHL4STDLIBS := $(SHL1STDLIBS)
-SHL4DEF := $(SHL1DEF)
-
-SHL5TARGET := $(HLD_DLLPRE)a_uno_uno
-SHL5IMPLIB := i$(SHL5TARGET)
-SHL5OBJS := $(SHL1OBJS)
-SHL5STDLIBS := $(SHL1STDLIBS)
-SHL5DEF := $(SHL1DEF)
-
-SHL6TARGET := $(HLD_DLLPRE)b_uno_uno
-SHL6IMPLIB := i$(SHL6TARGET)
-SHL6OBJS := $(SHL1OBJS)
-SHL6STDLIBS := $(SHL1STDLIBS)
-SHL6DEF := $(SHL1DEF)
-
-SHL7TARGET := $(HLD_DLLPRE)c_uno_uno
-SHL7IMPLIB := i$(SHL7TARGET)
-SHL7OBJS := $(SHL1OBJS)
-SHL7STDLIBS := $(SHL1STDLIBS)
-SHL7DEF := $(SHL1DEF)
-
-SHL8TARGET := $(HLD_DLLPRE)d_uno_uno
-SHL8IMPLIB := i$(SHL8TARGET)
-SHL8OBJS := $(SHL1OBJS)
-SHL8STDLIBS := $(SHL1STDLIBS)
-SHL8DEF := $(SHL1DEF)
-
-
-.INCLUDE : target.mk
-
-
-ALLTAR: \
- $(SHL1TARGETN) \
- $(SHL2TARGETN) \
- $(SHL3TARGETN) \
- $(SHL4TARGETN) \
- $(SHL5TARGETN) \
- $(SHL6TARGETN) \
- $(SHL7TARGETN) \
- $(SHL8TARGETN)
-
-
-$(SHL1TARGETN) : $(APP1TARGETN)
-$(SHL2TARGETN) : $(APP1TARGETN)
-$(SHL3TARGETN) : $(APP1TARGETN)
-$(SHL4TARGETN) : $(APP1TARGETN)
-$(SHL5TARGETN) : $(APP1TARGETN)
-$(SHL6TARGETN) : $(APP1TARGETN)
-$(SHL7TARGETN) : $(APP1TARGETN)
-$(SHL8TARGETN) : $(APP1TARGETN)
diff --git a/cppu/test/Environment.test.cxx b/cppu/test/Environment.test.cxx
deleted file mode 100644
index 446ffda7f545..000000000000
--- a/cppu/test/Environment.test.cxx
+++ /dev/null
@@ -1,75 +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.
- *
- ************************************************************************/
-
-// Test for uno/environment.hxx respectively com::sun::star::uno::Environment
-
-#include "uno/environment.hxx"
-#include "uno/lbnames.h"
-#include "sal/main.h"
-
-#include <iostream>
-
-
-using namespace com::sun::star;
-
-static rtl::OUString s_comment;
-
-static void s_test__constructor_oustring_context(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__constructor_outstring_context\n"));
-
- uno::Environment environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO)), NULL);
-
- if (!environment.get())
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\tcouldn't get an Environment - FAILURE\n"));
-}
-
-SAL_IMPLEMENT_MAIN_WITH_ARGS(/*argc*/, argv)
-{
- s_test__constructor_oustring_context();
-
-
- int ret;
- if (s_comment.indexOf(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FAILURE"))) == -1)
- {
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS PASSED\n"));
- ret = 0;
- }
- else
- {
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS _NOT_ PASSED\n"));
- ret = -1;
- }
-
- std::cerr
- << argv[0]
- << std::endl
- << rtl::OUStringToOString(s_comment, RTL_TEXTENCODING_ASCII_US).getStr()
- << std::endl;
-
- return ret;
-}
diff --git a/cppu/test/FreeReference/FreeReference.test.cxx b/cppu/test/FreeReference/FreeReference.test.cxx
deleted file mode 100644
index 1d80f573b0f3..000000000000
--- a/cppu/test/FreeReference/FreeReference.test.cxx
+++ /dev/null
@@ -1,414 +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 <iostream>
-
-#include "sal/main.h"
-
-#include "uno/environment.hxx"
-
-#include "cppu/FreeReference.hxx"
-#include "cppu/EnvGuards.hxx"
-
-#include "../ObjectFactory/ObjectFactory.hxx"
-
-
-
-using namespace com::sun::star;
-
-static rtl::OUString s_comment;
-static uno::Environment s_env;
-
-extern "C" {
-static void s_callee_in(rtl_uString * pMethod_name)
-{
- rtl::OUString method_name(pMethod_name);
-
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\ts_callee_in method:\""));
- s_comment += method_name;
-
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\" env: "));
- s_comment += uno::Environment::getCurrent().getTypeName();
-
- if (!s_env.is())
- {
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - FAILURE: s_env not set"));
- return;
- }
-
- rtl::OUString reason;
- int valid = s_env.isValid(&reason);
-
- if (valid)
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
-
- else
- {
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - FAILURE: "));
- s_comment += reason;
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
- }
-}
-
-static void s_callee_out(rtl_uString * pMethod_name)
-{
- rtl::OUString method_name(pMethod_name);
-
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\ts_callee_out method:\""));
- s_comment += method_name;
-
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\" env: "));
- s_comment += uno::Environment::getCurrent().getTypeName();
-
- if (!s_env.is())
- {
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - FAILURE: s_env not set"));
- return;
- }
-
- rtl::OUString reason;
- int valid = s_env.isValid(&reason);
-
- if (!valid)
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
-
- else
- {
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - FAILURE: is in\n"));
- }
-}
-}
-
-static cppu::FreeReference<uno::XInterface> s_get_envObject(void)
-{
- cppu::EnvGuard envGuard(s_env);
-
- uno::XInterface * pObject = reinterpret_cast<uno::XInterface *>(
- createObject(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV))),
- s_callee_in));
-
- cppu::FreeReference<uno::XInterface> env_obj(pObject, SAL_NO_ACQUIRE);
-
- return env_obj;
-}
-
-static cppu::FreeReference<uno::XInterface> s_get_flatObject(void)
-{
- uno::XInterface * pObject = reinterpret_cast<uno::XInterface *>(
- createObject(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV))),
- s_callee_out));
-
- return cppu::FreeReference<uno::XInterface>(pObject, SAL_NO_ACQUIRE);
-}
-
-
-static void s_test_operator_arrow(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test_operator_arrow:\n"));
-
- cppu::FreeReference<uno::XInterface> env_obj(s_get_envObject());
-
- env_obj->acquire();
- env_obj->release();
-}
-
-
-static void s_test_operator_assign_empty_reference(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test_operator_assign_empty_reference\n"));
-
- cppu::FreeReference<uno::XInterface> flat_obj(s_get_flatObject());
- cppu::FreeReference<uno::XInterface> empty_ref;
-
- flat_obj = empty_ref;
-}
-
-static void s_test_operator_assign_inner_reference_inside(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test_operator_assign_inner_reference_inside\n"));
-
- cppu::FreeReference<uno::XInterface> env_obj(s_get_envObject());
- cppu::FreeReference<uno::XInterface> flat_obj(s_get_flatObject());
-
- {
- cppu::EnvGuard envGuard(s_env);
- env_obj = flat_obj;
- }
-}
-
-static void s_test_method_clear_inner_reference_inside(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test_method_clear_inner_reference_inside\n"));
-
- cppu::FreeReference<uno::XInterface> env_obj(s_get_envObject());
-
- {
- cppu::EnvGuard envGuard(s_env);
- env_obj.clear();
- }
-}
-
-static void s_test_method_clear_inner_reference_outside(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test_method_clear_inner_reference_outside\n"));
-
- cppu::FreeReference<uno::XInterface> env_obj(s_get_envObject());
-
- env_obj.clear();
-}
-
-static void s_test_method_clear_outer_reference_inside(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test_method_clear_outer_reference_inside\n"));
-
- cppu::FreeReference<uno::XInterface> flat_obj(s_get_flatObject());
-
- {
- cppu::EnvGuard envGuard(s_env);
- flat_obj.clear();
- }
-}
-
-static void s_test_method_clear_outer_reference_outside(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test_method_clear_outer_reference_outside\n"));
-
- cppu::FreeReference<uno::XInterface> flat_obj(s_get_flatObject());
-
- flat_obj.clear();
-}
-
-static void s_test_method_set_inside_with_inner_reference(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test_method_set_inside_with_inner_reference\n"));
-
- cppu::FreeReference<uno::XInterface> env_obj(s_get_envObject());
-
- {
- cppu::EnvGuard envGuard(s_env);
- uno::XInterface * pObject2 = reinterpret_cast<uno::XInterface *>(
- createObject(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV))),
- s_callee_in));
- {
- uno::Reference<uno::XInterface> ref(pObject2, SAL_NO_ACQUIRE);
-
- env_obj.set(ref);
- }
- }
-}
-
-static void s_test_method_set_inside_with_outer_reference(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test_method_set_inside_with_outer_reference\n"));
-
- cppu::FreeReference<uno::XInterface> env_obj(s_get_envObject());
-
- uno::XInterface * pObject = reinterpret_cast<uno::XInterface *>(
- createObject(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV))),
- s_callee_out));
- {
- uno::Reference<uno::XInterface> ref(pObject, SAL_NO_ACQUIRE);
-
- env_obj.set(ref);
- }
-}
-
-static void s_test_method_set_with_empty_reference(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test_method_set_outside_with_empty_reference\n"));
-
- cppu::FreeReference<uno::XInterface> flat_obj(s_get_flatObject());
-
- {
- uno::Reference<uno::XInterface> ref;
-
- flat_obj.set(ref);
- }
-}
-
-static void s_test_method_set_outside_with_inner_reference(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test_method_set_outside_with_inner_reference\n"));
-
- cppu::FreeReference<uno::XInterface> flat_obj(s_get_flatObject());
-
- {
- cppu::EnvGuard envGuard(s_env);
-
- uno::XInterface * pObject2 = reinterpret_cast<uno::XInterface *>(
- createObject(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV))),
- s_callee_in));
- {
- uno::Reference<uno::XInterface> ref(pObject2, SAL_NO_ACQUIRE);
-
- flat_obj.set(ref);
- }
- }
-}
-
-static void s_test_method_set_outside_with_outer_reference(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test_method_set_outside_with_outer_reference\n"));
-
- cppu::FreeReference<uno::XInterface> flat_obj(s_get_flatObject());
-
- uno::XInterface * pObject2 = reinterpret_cast<uno::XInterface *>(
- createObject(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV))),
- s_callee_out));
- {
- uno::Reference<uno::XInterface> ref(pObject2, SAL_NO_ACQUIRE);
-
- flat_obj.set(ref);
- }
-}
-
-static void s_test_operator_equal(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test_operator_equal\n"));
-
-
- cppu::FreeReference<uno::XInterface> env_obj;
- uno::XInterface * pObject = NULL;
- {
- cppu::EnvGuard envGuard(s_env);
- pObject = reinterpret_cast<uno::XInterface *>(
- createObject(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV))),
- s_callee_in));
-
- env_obj = cppu::FreeReference<uno::XInterface>(pObject, SAL_NO_ACQUIRE);
- }
-
-
- uno::Mapping mapping(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV) ":unsafe")),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV))));
- uno::Reference<uno::XInterface> tmp;
- uno::XInterface * pMappedObject = reinterpret_cast<uno::XInterface *>(mapping.mapInterface(pObject, ::getCppuType(&tmp)));
-
-
- cppu::FreeReference<uno::XInterface> flat_obj(pMappedObject, SAL_NO_ACQUIRE);
-
- {
- cppu::EnvGuard envGuard(s_env);
-
- if (!(env_obj == flat_obj))
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\trefs are not equal inside - FAILURE\n"));
- }
-
- if (!(env_obj == flat_obj))
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\trefs are not equal outside - FAILURE\n"));
-}
-
-static void s_test_operator_unequal(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test_operator_unequal\n"));
-
-
- uno::XInterface * pObject = NULL;
- cppu::FreeReference<uno::XInterface> env_obj;
- {
- cppu::EnvGuard envGuard(s_env);
-
- pObject = reinterpret_cast<uno::XInterface *>(
- createObject(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV))),
- s_callee_in));
-
- env_obj = cppu::FreeReference<uno::XInterface>(pObject, SAL_NO_ACQUIRE);
- }
-
-
- uno::Mapping mapping(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV) ":unsafe")),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV))));
- uno::Reference<uno::XInterface> tmp;
- uno::XInterface * pMappedObject = reinterpret_cast<uno::XInterface *>(mapping.mapInterface(pObject, ::getCppuType(&tmp)));
-
-
- cppu::FreeReference<uno::XInterface> flat_obj(pMappedObject, SAL_NO_ACQUIRE);
-
- {
- cppu::EnvGuard envGuard(s_env);
-
- if (env_obj != flat_obj)
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\trefs are not equal inside - FAILURE\n"));
- }
-
- if (env_obj != flat_obj)
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\trefs are not equal outside - FAILURE\n"));
-}
-
-
-SAL_IMPLEMENT_MAIN_WITH_ARGS(/*argc*/, argv)
-{
- uno::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO))).enter();
-
- s_env = uno::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("uno:unsafe")));
-
-
- rtl::OUString result;
- s_test_operator_arrow();
- s_test_operator_equal();
- s_test_operator_unequal();
-
- s_test_operator_assign_empty_reference();
- s_test_operator_assign_inner_reference_inside();
-
- s_test_method_set_with_empty_reference();
- s_test_method_set_inside_with_inner_reference();
- s_test_method_set_inside_with_outer_reference();
- s_test_method_set_outside_with_inner_reference();
- s_test_method_set_outside_with_outer_reference();
-
- s_test_method_clear_inner_reference_inside();
- s_test_method_clear_inner_reference_outside();
- s_test_method_clear_outer_reference_inside();
- s_test_method_clear_outer_reference_outside();
-
- s_env.clear();
-
-
- uno_Environment_enter(NULL);
-
-
- int ret;
- if (s_comment.indexOf(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FAILURE"))) == -1)
- {
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS PASSED\n"));
- ret = 0;
- }
- else
- {
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS _NOT_ PASSED\n"));
- ret = -1;
- }
-
- std::cerr
- << argv[0]
- << std::endl
- << rtl::OUStringToOString(s_comment, RTL_TEXTENCODING_ASCII_US).getStr()
- << std::endl;
-
- return ret;
-}
diff --git a/cppu/test/IdentityMapping.test.cxx b/cppu/test/IdentityMapping.test.cxx
deleted file mode 100644
index 3b232ce0461e..000000000000
--- a/cppu/test/IdentityMapping.test.cxx
+++ /dev/null
@@ -1,77 +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.
- *
- ************************************************************************/
-
-// Test for uno/mapping.hxx respectively com::sun::star::uno::Mapping
-
-
-#include <iostream>
-
-#include "sal/main.h"
-
-#include "uno/mapping.hxx"
-
-
-using namespace com::sun::star;
-
-static rtl::OUString s_comment;
-
-static void s_test__get_identity_mapping(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__get_identity_mapping\n"));
-
- uno::Mapping mapping(uno::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO))),
- uno::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO))));
-
- if (!mapping.get())
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\tcouldn't get a Mapping - FAILURE\n"));
-}
-
-SAL_IMPLEMENT_MAIN_WITH_ARGS(/*argc*/, argv)
-{
- s_test__get_identity_mapping();
-
-
- int ret;
- if (s_comment.indexOf(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FAILURE"))) == -1)
- {
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS PASSED\n"));
- ret = 0;
- }
- else
- {
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS _NOT_ PASSED\n"));
- ret = -1;
- }
-
- std::cerr
- << argv[0]
- << std::endl
- << rtl::OUStringToOString(s_comment, RTL_TEXTENCODING_ASCII_US).getStr()
- << std::endl;
-
- return ret;
-}
diff --git a/cppu/test/Map/Map.test.cxx b/cppu/test/Map/Map.test.cxx
deleted file mode 100644
index 171d72f99f34..000000000000
--- a/cppu/test/Map/Map.test.cxx
+++ /dev/null
@@ -1,258 +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 <iostream>
-
-#include "sal/main.h"
-
-#include "uno/environment.hxx"
-
-#include "cppu/Map.hxx"
-#include "cppu/EnvGuards.hxx"
-
-#include "../ObjectFactory/ObjectFactory.hxx"
-
-
-using namespace com::sun::star;
-
-
-static rtl::OUString s_comment;
-static uno::Environment s_env;
-
-extern "C" {
-static void s_callee_in(rtl_uString * pMethod_name)
-{
- rtl::OUString method_name(pMethod_name);
-
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\ts_callee_in method:\""));
- s_comment += method_name;
-
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\" env: \""));
- s_comment += uno::Environment::getCurrent().getTypeName();
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\""));
-
- if (!s_env.is())
- {
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - FAILURE: s_env not set"));
- return;
- }
-
- rtl::OUString reason;
- int valid = s_env.isValid(&reason);
-
- if (valid)
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
-
- else
- {
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - FAILURE: "));
- s_comment += reason;
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
- }
-}
-
-static void s_callee_out(rtl_uString * pMethod_name)
-{
- rtl::OUString method_name(pMethod_name);
-
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\ts_callee_out method:\""));
- s_comment += method_name;
-
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\" env: \""));
- s_comment += uno::Environment::getCurrent().getTypeName();
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\""));
-
- if (!s_env.is())
- {
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - FAILURE: s_env not set"));
- return;
- }
-
- rtl::OUString reason;
- int valid = s_env.isValid(&reason);
-
- if (!valid)
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
-
- else
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - FAILURE: is in\n"));
-}
-}
-
-static uno::Reference<uno::XInterface> s_get_envObject(void)
-{
- cppu::EnvGuard envGuard(s_env);
-
- uno::XInterface * pObject = reinterpret_cast<uno::XInterface *>(
- createObject(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV))),
- s_callee_in));
-
- return uno::Reference<uno::XInterface>(pObject, SAL_NO_ACQUIRE);
-}
-
-static uno::XInterface * s_x_get_flatObject(void)
-{
- uno::XInterface * pObject = reinterpret_cast<uno::XInterface *>(
- createObject(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV))),
- s_callee_out));
-
- return pObject;
-}
-
-static uno::Reference<uno::XInterface> s_get_flatObject(void)
-{
- return uno::Reference<uno::XInterface>(s_x_get_flatObject(), SAL_NO_ACQUIRE);
-}
-
-
-static void s_test__mapOut(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__mapOut:\n"));
-
- uno::Reference<uno::XInterface> obj;
-
- {
- cppu::EnvGuard envGuard(s_env);
- obj.set(cppu::mapOut(s_get_envObject().get(),
- uno::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME)))),
- SAL_NO_ACQUIRE);
- }
-
- obj->acquire();
- obj->release();
-}
-
-static void s_test__mapIn(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__unshield:\n"));
-
- uno::Reference<uno::XInterface> obj;
-
- {
- cppu::EnvGuard envGuard(s_env);
- uno::XInterface * pObj = s_x_get_flatObject();
- obj.set(cppu::mapIn(pObj,
- uno::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME)))),
- SAL_NO_ACQUIRE);
-
- envGuard.clear();
-
- pObj->release();
- }
-
- {
- cppu::EnvGuard envGuard(s_env);
- obj.clear();
- }
-}
-
-static void s_test__mapOutAny(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__shieldAny:\n"));
-
- uno::Any out;
-
- {
- cppu::EnvGuard envGuard(s_env);
- uno::Any any;
- any <<= s_get_envObject();
- cppu::mapOutAny(any,
- &out,
- uno::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME))));
- }
-
- uno::Reference<uno::XInterface> obj;
- out >>= obj;
-
- obj->acquire();
- obj->release();
-}
-
-static void s_test__mapInAny(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__unshieldAny:\n"));
-
- uno::Any out;
- {
- uno::Any any(s_get_flatObject());
-
- {
- cppu::EnvGuard envGuard(s_env);
- cppu::mapInAny(any,
- &out,
- uno::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME))));
- }
- }
-
- {
- cppu::EnvGuard envGuard(s_env);
-
- uno::Reference<uno::XInterface> obj;
- out >>= obj;
-
- obj.clear();
- }
-}
-
-
-SAL_IMPLEMENT_MAIN_WITH_ARGS(/*argc*/, argv)
-{
- uno::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO))).enter();
-
- s_env = uno::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("uno:unsafe")));
-
- s_test__mapOut();
- s_test__mapOutAny();
- s_test__mapIn();
- s_test__mapInAny();
-
- s_env.clear();
-
-
- uno_Environment_enter(NULL);
-
-
- int ret;
- if (s_comment.indexOf(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FAILURE"))) == -1)
- {
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS PASSED\n"));
- ret = 0;
- }
- else
- {
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS _NOT_ PASSED\n"));
- ret = -1;
- }
-
- std::cerr
- << argv[0]
- << std::endl
- << rtl::OUStringToOString(s_comment, RTL_TEXTENCODING_ASCII_US).getStr()
- << std::endl;
-
- return ret;
-}
diff --git a/cppu/test/Mapping.test.cxx b/cppu/test/Mapping.test.cxx
deleted file mode 100644
index 1b763dd71cf2..000000000000
--- a/cppu/test/Mapping.test.cxx
+++ /dev/null
@@ -1,77 +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.
- *
- ************************************************************************/
-
-// Test for uno/mapping.hxx respectively com::sun::star::uno::Mapping
-
-
-#include <iostream>
-
-#include "sal/main.h"
-
-#include "uno/mapping.hxx"
-
-
-using namespace com::sun::star;
-
-static rtl::OUString s_comment;
-
-static void s_test__constructor_env_env(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__constructor_env_env\n"));
-
- uno::Mapping mapping(uno::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO))),
- uno::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME))));
-
- if (!mapping.get())
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\tcouldn't get a Mapping - FAILURE\n"));
-}
-
-SAL_IMPLEMENT_MAIN_WITH_ARGS(/*argc*/, argv)
-{
- s_test__constructor_env_env();
-
-
- int ret;
- if (s_comment.indexOf(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FAILURE"))) == -1)
- {
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS PASSED\n"));
- ret = 0;
- }
- else
- {
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS _NOT_ PASSED\n"));
- ret = -1;
- }
-
- std::cerr
- << argv[0]
- << std::endl
- << rtl::OUStringToOString(s_comment, RTL_TEXTENCODING_ASCII_US).getStr()
- << std::endl;
-
- return ret;
-}
diff --git a/cppu/test/ObjectFactory/CppObject.cxx b/cppu/test/ObjectFactory/CppObject.cxx
deleted file mode 100644
index 541a4172e3d8..000000000000
--- a/cppu/test/ObjectFactory/CppObject.cxx
+++ /dev/null
@@ -1,103 +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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_cppu.hxx"
-
-#include "cppu/EnvDcp.hxx"
-#include "cppuhelper/implbase1.hxx"
-
-#include "com/sun/star/uno/XComponentContext.hpp"
-
-#include "CppObject.hxx"
-
-
-using namespace ::com::sun::star;
-
-
-#ifdef LOG_LIFECYCLE
-#define LOG_LIFECYCLE_CppObject
-#endif
-
-#define LOG_LIFECYCLE_CppObject
-#ifdef LOG_LIFECYCLE_CppObject
-# include <iostream>
-# define LOG_LIFECYCLE_CppObject_emit(x) x
-
-#else
-# define LOG_LIFECYCLE_CppObject_emit(x)
-
-#endif
-
-CppObject::CppObject(Callee * pCallee) SAL_THROW((uno::RuntimeException))
- : m_nRef (1),
- m_pCallee(pCallee)
-{
- LOG_LIFECYCLE_CppObject_emit(fprintf(stderr, "LIFE: %s -> %p\n", "CppObject::CppObject", this));
-}
-
-CppObject::~CppObject() SAL_THROW((uno::RuntimeException))
-{
- LOG_LIFECYCLE_CppObject_emit(fprintf(stderr, "LIFE: %s -> %p\n", "CppObject::~CppObject", this));
-}
-
-void SAL_CALL CppObject::acquire() throw ()
-{
- m_pCallee(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XInterface::acquire")).pData);
-
- osl_incrementInterlockedCount(&m_nRef);
-}
-
-void SAL_CALL CppObject::release() throw ()
-{
- m_pCallee(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XInterface::release")).pData);
-
- if (osl_decrementInterlockedCount(&m_nRef) == 0)
- delete this;
-}
-
-uno::Any SAL_CALL CppObject::queryInterface(uno::Type const & rType ) throw (uno::RuntimeException)
-{
- m_pCallee(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XInterface::queryInterface")).pData);
-
- void * bla = this;
-
- return uno::Any(&bla, rType);
-}
-
-
-uno::XInterface * CppObject::s_create(Callee * pCallee)
-{
- return new CppObject(pCallee);
-}
-
-void CppObject::s_call(uno::XInterface * pXInterface)
-{
- uno::Reference<uno::XInterface> tmp;
-
- pXInterface->queryInterface(::getCppuType(&tmp));
-}
diff --git a/cppu/test/ObjectFactory/CppObject.hxx b/cppu/test/ObjectFactory/CppObject.hxx
deleted file mode 100644
index f8f5786daa31..000000000000
--- a/cppu/test/ObjectFactory/CppObject.hxx
+++ /dev/null
@@ -1,62 +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.
- *
- ************************************************************************/
-
-#ifndef INCLUDED_CppObject_hxx
-#define INCLUDED_CppObject_hxx
-
-
-#include "com/sun/star/uno/XComponentContext.hpp"
-
-
-#include "callee.hxx"
-
-namespace cssu = ::com::sun::star::uno;
-
-
-class CppObject: public cssu::XInterface
-{
-public:
- static cssu::XInterface * s_create (Callee * pCallee);
- static void s_release(cssu::XInterface * pXInterface);
- static void s_call (cssu::XInterface * pXInterface);
-
- virtual void SAL_CALL acquire() throw ();
- virtual void SAL_CALL release() throw ();
-
- virtual cssu::Any SAL_CALL queryInterface(cssu::Type const & rType ) throw (cssu::RuntimeException);
-
-protected:
- oslInterlockedCount m_nRef;
-
- explicit CppObject(Callee * pCallee) SAL_THROW((cssu::RuntimeException));
- virtual ~CppObject(void) SAL_THROW((cssu::RuntimeException));
-
- Callee * m_pCallee;
-};
-
-
-#endif
diff --git a/cppu/test/ObjectFactory/ObjectFactory.cxx b/cppu/test/ObjectFactory/ObjectFactory.cxx
deleted file mode 100644
index d4f251d028ee..000000000000
--- a/cppu/test/ObjectFactory/ObjectFactory.cxx
+++ /dev/null
@@ -1,69 +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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_cppu.hxx"
-
-#define CPPU_test_ObjectFactory_IMPL
-
-#include "UnoObject.hxx"
-#include "CppObject.hxx"
-#include "ObjectFactory.hxx"
-
-
-using namespace com::sun::star;
-
-
-
-CPPU_test_ObjectFactory_EXPORT void * createObject(rtl::OUString const & envDcp, Callee * pCallee)
-{
- void * result;
-
- if (envDcp.match(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV)))))
- result = CppObject::s_create(pCallee);
-
- else if (envDcp.match(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO))))
- result = UnoObject_create(pCallee);
-
- else
- abort();
-
- return result;
-}
-
-CPPU_test_ObjectFactory_EXPORT void callObject(rtl::OUString const & envDcp, void * pObject)
-{
- if (envDcp.match(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV)))))
- CppObject::s_call(reinterpret_cast<uno::XInterface *>(pObject));
-
- else if (envDcp.match(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO))))
- UnoObject_call(reinterpret_cast<uno_Interface *>(pObject));
-
- else
- abort();
-}
-
diff --git a/cppu/test/ObjectFactory/ObjectFactory.hxx b/cppu/test/ObjectFactory/ObjectFactory.hxx
deleted file mode 100644
index 768c4c430f9c..000000000000
--- a/cppu/test/ObjectFactory/ObjectFactory.hxx
+++ /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.
- *
- ************************************************************************/
-
-#ifndef INCLUDED_ObjectFactory_hxx
-#define INCLUDED_ObjectFactory_hxx
-
-
-#include "callee.hxx"
-
-
-#ifdef CPPU_test_ObjectFactory_IMPL
-# define CPPU_test_ObjectFactory_EXPORT SAL_DLLPUBLIC_EXPORT
-
-#else
-# define CPPU_test_ObjectFactory_EXPORT SAL_DLLPUBLIC_IMPORT
-
-#endif
-
-
-CPPU_test_ObjectFactory_EXPORT void * createObject(rtl::OUString const & envDcp, Callee * pCallee);
-CPPU_test_ObjectFactory_EXPORT void callObject (rtl::OUString const & envDcp, void *);
-
-
-#endif
diff --git a/cppu/test/ObjectFactory/UnoObject.cxx b/cppu/test/ObjectFactory/UnoObject.cxx
deleted file mode 100644
index 9fa22c4ca52e..000000000000
--- a/cppu/test/ObjectFactory/UnoObject.cxx
+++ /dev/null
@@ -1,227 +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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_cppu.hxx"
-
-#include "osl/interlck.h"
-#include "uno/environment.h"
-#include "uno/mapping.h"
-#include "uno/dispatcher.h"
-#include "typelib/typedescription.h"
-#include "rtl/alloc.h"
-#include "com/sun/star/uno/Any.hxx"
-
-#include "UnoObject.hxx"
-#include "callee.hxx"
-
-
-using namespace com::sun::star;
-
-
-#ifdef LOG_LIFECYCLE
-# define LOG_LIFECYCLE_UnoObject
-#endif
-
-#define LOG_LIFECYCLE_UnoObject
-#ifdef LOG_LIFECYCLE_UnoObject
-# include <iostream>
-# define LOG_LIFECYCLE_UnoObject_emit(x) x
-
-#else
-# define LOG_LIFECYCLE_UnoObject_emit(x)
-
-#endif
-
-
-struct UnoObject : public uno_Interface
-{
- oslInterlockedCount m_nCount;
- Callee * m_pCallee;
-};
-
-
-
-static bool s_isQueryInterfaceCall(rtl_uString * pMethod,
- void * pArgs[],
- const sal_Char * pQueriedType)
-{
- static rtl::OString aPattern("com.sun.star.uno.XInterface::queryInterface");
-
- bool bIsQueryInterfaceCall =
- rtl_ustr_ascii_shortenedCompare_WithLength(
- rtl_uString_getStr( pMethod ),
- rtl_uString_getLength( pMethod ),
- aPattern.getStr(),
- aPattern.getLength() ) == 0;
-
- if (bIsQueryInterfaceCall)
- {
- typelib_TypeDescriptionReference * pTDR
- = *(typelib_TypeDescriptionReference **)pArgs[ 0 ];
-
- bIsQueryInterfaceCall =
- rtl_ustr_ascii_compare(
- rtl_uString_getStr( pTDR->pTypeName ),
- pQueriedType ) == 0;
- }
-
- return bIsQueryInterfaceCall;
-}
-
-static void s_UnoObject_delete(UnoObject * pUnoObject)
-{
- LOG_LIFECYCLE_UnoObject_emit(fprintf(stderr, "LIFE: %s -> %p\n", "s_UnoObject_delete", pUnoObject));
-
- rtl_freeMemory(pUnoObject);
-}
-
-
-extern "C" {
-static void SAL_CALL s_UnoObject_acquire(uno_Interface * pUnoI)
-{
- UnoObject * pUnoObject = (UnoObject *)pUnoI;
-
- pUnoObject->m_pCallee(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XInterface::acquire")).pData);
-
- osl_incrementInterlockedCount(&pUnoObject->m_nCount);
-}
-
-static void SAL_CALL s_UnoObject_release(uno_Interface * pUnoI)
-{
- UnoObject * pUnoObject = (UnoObject *)pUnoI;
-
- pUnoObject->m_pCallee(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XInterface::release")).pData);
-
- if (osl_decrementInterlockedCount(&pUnoObject->m_nCount) == 0)
- s_UnoObject_delete(pUnoObject);
-}
-
-static void SAL_CALL s_UnoObject_dispatch(
- uno_Interface * pUnoI,
- typelib_TypeDescription const * pMemberType,
- void * pReturn,
- void * pArgs[],
- uno_Any ** ppException )
-{
- UnoObject * pUnoObject = (UnoObject *)pUnoI;
- *ppException = NULL;
-
- pUnoObject->m_pCallee(rtl::OUString(pMemberType->pTypeName).pData);
-
- if (s_isQueryInterfaceCall(pMemberType->pTypeName, pArgs, "com.sun.star.uno.XInterface"))
- {
- typelib_TypeDescriptionReference * type_XInterface =
- * typelib_static_type_getByTypeClass( typelib_TypeClass_INTERFACE );
-
- typelib_typedescriptionreference_acquire(type_XInterface);
-
- uno::Any * pRet = (uno::Any *)pReturn;
- pRet->pType = type_XInterface;
- pRet->pData = &pRet->pReserved;
- pRet->pReserved = pUnoObject;
-
- s_UnoObject_acquire(pUnoObject);
- }
- else
- abort();
-}
-}
-
-uno_Interface * UnoObject_create(Callee * pCallee)
-{
- UnoObject * pUnoObject = (UnoObject *)rtl_allocateMemory(sizeof(UnoObject));
-
- LOG_LIFECYCLE_UnoObject_emit(fprintf(stderr, "LIFE: %s -> %p\n", "UnoObject_create", pUnoObject));
-
- pUnoObject->m_nCount = 1;
- pUnoObject->m_pCallee = pCallee;
-
- pUnoObject->acquire = s_UnoObject_acquire;
- pUnoObject->release = s_UnoObject_release;
- pUnoObject->pDispatcher = s_UnoObject_dispatch;
-
- pUnoObject->m_pCallee(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UnoObject_create")).pData);
-
- return pUnoObject;
-}
-
-void UnoObject_release(uno_Interface * pUnoI)
-{
- pUnoI->release(pUnoI);
-}
-
-
-void UnoObject_call(uno_Interface * pUnoI)
-{
- uno_Any exception;
- uno_Any * pException = &exception;
-
- uno_Interface * pUno_XInv = NULL;
-
- {
- typelib_TypeDescription * g_pQITD = NULL;
-
- typelib_TypeDescriptionReference * type_XInterface =
- * typelib_static_type_getByTypeClass( typelib_TypeClass_INTERFACE );
-
- typelib_InterfaceTypeDescription * pTXInterfaceDescr = 0;
- TYPELIB_DANGER_GET( (typelib_TypeDescription **) &pTXInterfaceDescr, type_XInterface );
- typelib_typedescriptionreference_getDescription(
- &g_pQITD, pTXInterfaceDescr->ppAllMembers[ 0 ] );
- TYPELIB_DANGER_RELEASE( (typelib_TypeDescription *) pTXInterfaceDescr );
-
-
-
- uno_Any result;
-
- void * args[ 1 ];
- args[ 0 ] = &type_XInterface;
-
- pUnoI->pDispatcher(pUnoI, g_pQITD, &result, args, &pException);
-
-
- typelib_TypeDescriptionReference * ret_type = result.pType;
- switch (ret_type->eTypeClass)
- {
- case typelib_TypeClass_VOID: // common case
- typelib_typedescriptionreference_release( ret_type );
- break;
- case typelib_TypeClass_INTERFACE:
- // tweaky... avoiding acquire/ release pair
- typelib_typedescriptionreference_release( ret_type );
- pUno_XInv = (uno_Interface *) result.pReserved; // serving acquired interface
- break;
- default:
- uno_any_destruct(&result, 0);
- break;
- }
- }
-
-
- pUno_XInv->release(pUno_XInv);
-}
diff --git a/cppu/test/ObjectFactory/UnoObject.hxx b/cppu/test/ObjectFactory/UnoObject.hxx
deleted file mode 100644
index e2d9fba5aa6b..000000000000
--- a/cppu/test/ObjectFactory/UnoObject.hxx
+++ /dev/null
@@ -1,43 +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.
- *
- ************************************************************************/
-
-#ifndef INCLUDED_UnoObject_hxx
-#define INCLUDED_UnoObject_hxx
-
-
-#include "rtl/ustring.hxx"
-#include "uno/dispatcher.h"
-
-#include "callee.hxx"
-
-
-uno_Interface * UnoObject_create (Callee * pCallee);
-void UnoObject_release(uno_Interface * pUnoI);
-void UnoObject_call (uno_Interface * pUnoI);
-
-
-#endif
diff --git a/cppu/test/ObjectFactory/callee.hxx b/cppu/test/ObjectFactory/callee.hxx
deleted file mode 100644
index beb31d4f4dd9..000000000000
--- a/cppu/test/ObjectFactory/callee.hxx
+++ /dev/null
@@ -1,39 +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.
- *
- ************************************************************************/
-
-#ifndef INCLUDED_callee_hxx
-#define INCLUDED_callee_hxx
-
-
-#include <rtl/ustring.hxx>
-
-
-extern "C" {
-typedef void Callee(rtl_uString * pMethod_name);
-}
-
-#endif
diff --git a/cppu/test/ObjectFactory/empty.def b/cppu/test/ObjectFactory/empty.def
deleted file mode 100644
index b191c70cf03c..000000000000
--- a/cppu/test/ObjectFactory/empty.def
+++ /dev/null
@@ -1,5 +0,0 @@
-HEAPSIZE 0
-EXPORTS
-
-
-
diff --git a/cppu/test/ObjectFactory/makefile.mk b/cppu/test/ObjectFactory/makefile.mk
deleted file mode 100644
index 1064c760d538..000000000000
--- a/cppu/test/ObjectFactory/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 := cppu
-TARGET := ObjectFactory
-
-ENABLE_EXCEPTIONS := TRUE
-NO_BSYMBOLIC := TRUE
-USE_DEFFILE := TRUE
-
-
-.INCLUDE : settings.mk
-
-SHL1TARGET := ObjectFactory.$(COMID)
-SHL1IMPLIB := i$(SHL1TARGET)
-SHL1OBJS := $(SLO)$/UnoObject.obj $(SLO)$/CppObject.obj $(SLO)$/ObjectFactory.obj
-SHL1STDLIBS := $(CPPULIB) $(SALHELPERLIB) $(SALLIB)
-SHL1DEF := empty.def
-
-
-.INCLUDE : target.mk
-
-
diff --git a/cppu/test/Shield/Shield.test.cxx b/cppu/test/Shield/Shield.test.cxx
deleted file mode 100644
index d08b60e59a45..000000000000
--- a/cppu/test/Shield/Shield.test.cxx
+++ /dev/null
@@ -1,249 +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 <iostream>
-
-#include "sal/main.h"
-
-#include "uno/environment.hxx"
-
-#include "cppu/Shield.hxx"
-#include "cppu/EnvGuards.hxx"
-
-#include "../ObjectFactory/ObjectFactory.hxx"
-
-
-using namespace com::sun::star;
-
-
-static rtl::OUString s_comment;
-static uno::Environment s_env;
-
-extern "C" {
-static void s_callee_in(rtl_uString * pMethod_name)
-{
- rtl::OUString method_name(pMethod_name);
-
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\ts_callee_in method:\""));
- s_comment += method_name;
-
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\" env: \""));
- s_comment += uno::Environment::getCurrent().getTypeName();
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\""));
-
- if (!s_env.is())
- {
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - FAILURE: s_env not set"));
- return;
- }
-
- rtl::OUString reason;
- int valid = s_env.isValid(&reason);
-
- if (valid)
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
-
- else
- {
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - FAILURE: "));
- s_comment += reason;
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
- }
-}
-
-static void s_callee_out(rtl_uString * pMethod_name)
-{
- rtl::OUString method_name(pMethod_name);
-
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\ts_callee_out method:\""));
- s_comment += method_name;
-
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\" env: \""));
- s_comment += uno::Environment::getCurrent().getTypeName();
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\""));
-
- if (!s_env.is())
- {
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - FAILURE: s_env not set"));
- return;
- }
-
- rtl::OUString reason;
- int valid = s_env.isValid(&reason);
-
- if (!valid)
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
-
- else
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - FAILURE: is in\n"));
-}
-}
-
-static uno::Reference<uno::XInterface> s_get_envObject(void)
-{
- cppu::EnvGuard envGuard(s_env);
-
- uno::XInterface * pObject = reinterpret_cast<uno::XInterface *>(
- createObject(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV))),
- s_callee_in));
-
- return uno::Reference<uno::XInterface>(pObject, SAL_NO_ACQUIRE);
-}
-
-static uno::XInterface * s_x_get_flatObject(void)
-{
- uno::XInterface * pObject = reinterpret_cast<uno::XInterface *>(
- createObject(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV))),
- s_callee_out));
-
- return pObject;
-}
-
-static uno::Reference<uno::XInterface> s_get_flatObject(void)
-{
- return uno::Reference<uno::XInterface>(s_x_get_flatObject(), SAL_NO_ACQUIRE);
-}
-
-
-static void s_test__shield(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__shield:\n"));
-
- uno::Reference<uno::XInterface> obj;
-
- {
- cppu::EnvGuard envGuard(s_env);
- obj.set(cppu::shield(s_get_envObject().get()), SAL_NO_ACQUIRE);
- }
-
- obj->acquire();
- obj->release();
-}
-
-static void s_test__unshield(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__unshield:\n"));
-
- uno::Reference<uno::XInterface> obj;
-
- {
- cppu::EnvGuard envGuard(s_env);
- uno::XInterface * pObj = s_x_get_flatObject();
- obj.set(cppu::unshield(pObj), SAL_NO_ACQUIRE);
-
- envGuard.clear();
- pObj->release();
- }
-
- {
- cppu::EnvGuard envGuard(s_env);
- obj.clear();
- }
-}
-
-static void s_test__shieldAny(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__shieldAny:\n"));
-
- uno::Any out;
-
- {
- cppu::EnvGuard envGuard(s_env);
- uno::Any any;
- any <<= s_get_envObject();
- cppu::shieldAny(any, &out);
- }
-
- uno::Reference<uno::XInterface> obj;
- out >>= obj;
-
- obj->acquire();
- obj->release();
-}
-
-static void s_test__unshieldAny(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__unshieldAny:\n"));
-
- uno::Any out;
- {
- uno::Any any(s_get_flatObject());
-
- {
- cppu::EnvGuard envGuard(s_env);
- cppu::unshieldAny(any, &out);
- }
- }
-
- {
- cppu::EnvGuard envGuard(s_env);
-
- uno::Reference<uno::XInterface> obj;
- out >>= obj;
-
- obj.clear();
- }
-}
-
-
-SAL_IMPLEMENT_MAIN_WITH_ARGS(/*argc*/, argv)
-{
- uno::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO))).enter();
-
- s_env = uno::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("uno:unsafe")));
-
- s_test__shield();
- s_test__shieldAny();
- s_test__unshield();
- s_test__unshieldAny();
-
- s_env.clear();
-
-
- uno_Environment_enter(NULL);
-
-
- int ret;
- if (s_comment.indexOf(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FAILURE"))) == -1)
- {
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS PASSED\n"));
- ret = 0;
- }
- else
- {
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS _NOT_ PASSED\n"));
- ret = -1;
- }
-
- std::cerr
- << argv[0]
- << std::endl
- << rtl::OUStringToOString(s_comment, RTL_TEXTENCODING_ASCII_US).getStr()
- << std::endl;
-
- return ret;
-}
diff --git a/cppu/test/Shield/makefile.mk b/cppu/test/Shield/makefile.mk
deleted file mode 100644
index 119516ced695..000000000000
--- a/cppu/test/Shield/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 := ..$/..
-PRJNAME := cppu
-TARGET := Shield.test
-
-
-ENABLE_EXCEPTIONS := TRUE
-NO_BSYMBOLIC := TRUE
-USE_DEFFILE := TRUE
-
-
-.INCLUDE : settings.mk
-
-
-.IF "$(GUI)"=="UNX" || "$(GUI)"=="MAC"
-ObjectFactory_LIB := -lObjectFactory.$(COMID)
-
-.ELSE
-ObjectFactory_LIB := $(LIBPRE) iObjectFactory.$(COMID).lib
-
-.ENDIF
-
-
-APP1TARGET := $(TARGET)
-APP1OBJS := $(OBJ)$/Shield.test.obj
-APP1STDLIBS := $(ObjectFactory_LIB) $(CPPULIB) $(SALLIB)
-
-
-.INCLUDE : target.mk
diff --git a/cppu/test/UnsafeBridge/UnsafeBridge.test.pl b/cppu/test/UnsafeBridge/UnsafeBridge.test.pl
deleted file mode 100755
index b61b92013387..000000000000
--- a/cppu/test/UnsafeBridge/UnsafeBridge.test.pl
+++ /dev/null
@@ -1,72 +0,0 @@
-:
-eval 'exec perl -wS $0 ${1+"$@"}'
- if 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.
-#
-#*************************************************************************
-
-my $rc = 0;
-my $comment = "";
-
-
-@tests = (
- "EnvStack.tester :A:unsafe :A:unsafe \"-enter:A[0,not entered]-leave:A[0,not entered]\" :A:unsafe", # initially not entered&leave
- "EnvStack.tester :unsafe:A :unsafe:A \"-enter:unsafe:A[1,OK]-leave:unsafe:A[1,OK]\" :unsafe", # enter
- "EnvStack.tester \"\" :unsafe:A \"-into:unsafe:A[1,OK]\" :unsafe", # call into
- "EnvStack.tester :unsafe :A \"-into:A[0,not entered]\" :unsafe", # call out
- "EnvStack.tester \"\" :unsafe:affine:A \"-into:unsafe:affine:A[0,wrong thread]\" :unsafe", # wrong thread
- "env.tester.bin CPP:unsafe"
-);
-
-foreach $test (@tests) {
- $output = "";
-
- $cmd = $test;
- open TESTER, $cmd . "|";
- while (<TESTER>) {
- chomp;
-
- $output = $output . "\t" . $_ . "\n";
- }
- close TESTER ;
-
- if ($? != 0) {
- $comment = $comment . "TEST FAILED: " . $cmd . "\n";
- $comment = $comment . $output;
- }
- $rc = $rc + $?;
-}
-
-
-print $comment;
-
-if ($rc == 0) {
- print "*********** SUCCESS\n";
-}
-else {
- print "*********** FAILURE\n";
-}
diff --git a/cppu/test/alignment.idl b/cppu/test/alignment.idl
deleted file mode 100644
index 424c232fb14f..000000000000
--- a/cppu/test/alignment.idl
+++ /dev/null
@@ -1,205 +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.
- *
- ************************************************************************/
-#ifndef _TEST_ALIGNMENT_IDL_
-#define _TEST_ALIGNMENT_IDL_
-
-#include <com/sun/star/uno/XInterface.idl>
-
-module test
-{
-module alignment
-{
-
-struct C1
-{
- short n1;
-};
-struct C2 : C1
-{
- long n2;
-};
-struct C3 : C2
-{
- double d3;
- long n3;
-};
-struct C4 : C3
-{
- long n4;
- double d4;
-};
-struct C5 : C4
-{
- hyper n5;
- boolean b5;
-};
-
-struct C6 : C1
-{
- C5 c;
- boolean b6;
-};
-struct C7 : C1
-{
- C1 c;
- boolean b6;
-};
-struct C8 : C1
-{
- any a;
- boolean b6;
-};
-struct C9 : C1
-{
- string s;
- boolean b6;
-};
-struct C10 : C1
-{
- float f;
- boolean b6;
-};
-struct C11 : C1
-{
- double d;
- boolean b6;
-};
-struct C12 : C1
-{
- hyper n;
- boolean b6;
-};
-struct C13 : C1
-{
- unsigned hyper n;
- boolean b6;
-};
-struct C14 : C1
-{
- ::com::sun::star::uno::XInterface x;
- boolean b6;
-};
-
-struct C1x
-{
- short sx;
- double dx;
-};
-
-struct C6x : C1x
-{
- C5 c;
- boolean b6;
-};
-struct C7x : C1x
-{
- C1 c;
- boolean b6;
-};
-struct C8x : C1x
-{
- any a;
- boolean b6;
-};
-struct C9x : C1x
-{
- string s;
- boolean b6;
-};
-struct C10x : C1x
-{
- float f;
- boolean b6;
-};
-struct C11x : C1x
-{
- double d;
- boolean b6;
-};
-struct C12x : C1x
-{
- hyper n;
- boolean b6;
-};
-struct C13x : C1x
-{
- unsigned hyper n;
- boolean b6;
-};
-struct C14x : C1x
-{
- ::com::sun::star::uno::XInterface x;
- boolean b6;
-};
-
-
-struct D
-{
- short d;
- long e;
-};
-struct E
-{
- boolean a;
- boolean b;
- boolean c;
- short d;
- long e;
-};
-
-struct M
-{
- long n;
- short o;
-};
-
-struct N : M
-{
- short p;
-};
-struct N2
-{
- M m;
- short p;
-};
-struct O : M
-{
- double p;
-};
-struct O2 : O
-{
- double p2;
-};
-struct P : N
-{
- double p2;
-};
-
-}; // alignment
-}; // test
-
-#endif
diff --git a/cppu/test/alignment/diagnose.h b/cppu/test/alignment/diagnose.h
deleted file mode 100644
index 1568f70adf47..000000000000
--- a/cppu/test/alignment/diagnose.h
+++ /dev/null
@@ -1,67 +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.
- *
- ************************************************************************/
-#ifndef DIAGNOSE_H
-#define DIAGNOSE_H
-
-#include <sal/types.h>
-#include <stdio.h>
-
-#if defined(__GNUC__) && (defined(LINUX) || defined(FREEBSD)) && defined(INTEL)
-#define ALIGNMENT(s, n) __alignof__ (s)
-#else
-#define ALIGNMENT(s, n) n
-#endif
-
-#define OFFSET_OF( s, m ) ((sal_Size)((char *)&((s *)16)->m -16))
-
-#define BINTEST_VERIFY( c ) \
- if (! (c)) { fprintf( stderr, "### binary compatibility test failed: " #c " [line %d]!!!\n", __LINE__ ); abort(); }
-
-#if OSL_DEBUG_LEVEL > 1
-
-#define BINTEST_VERIFYOFFSET( s, m, n ) \
- fprintf( stderr, "> OFFSET_OF(" #s ", " #m ") = %lu\n", static_cast< unsigned long >(OFFSET_OF(s, m)) ); \
- if (OFFSET_OF(s, m) != n) { fprintf( stderr, "### OFFSET_OF(" #s ", " #m ") = %d instead of expected %d!!!\n", OFFSET_OF(s, m), n ); abort(); }
-#define BINTEST_VERIFYSIZE( s, n ) \
- fprintf( stderr, "> sizeof (" #s ") = %lu\n", static_cast< unsigned long >(sizeof(s)) ); \
- if (sizeof(s) != n) { fprintf( stderr, "### sizeof(" #s ") = %d instead of expected %d!!!\n", sizeof(s), n ); abort(); }
-#define BINTEST_VERIFYALIGNMENT( s, n ) \
- fprintf( stderr, "> alignment of " #s " = %d\n", ALIGNMENT(s, n) ); \
- if (ALIGNMENT(s, n) != n) { fprintf( stderr, "### alignment of " #s " = %d instead of expected %d!!!\n", ALIGNMENT(s, n), n ); abort(); }
-
-#else
-
-#define BINTEST_VERIFYOFFSET( s, m, n ) \
- if (OFFSET_OF(s, m) != n) { fprintf( stderr, "### OFFSET_OF(" #s ", " #m ") = %lu instead of expected %lu!!!\n", static_cast< unsigned long >(OFFSET_OF(s, m)), static_cast< unsigned long >(n) ); abort(); }
-#define BINTEST_VERIFYSIZE( s, n ) \
- if (sizeof(s) != n) { fprintf( stderr, "### sizeof(" #s ") = %lu instead of expected %lu!!!\n", static_cast< unsigned long >(sizeof(s)), static_cast< unsigned long >(n) ); abort(); }
-#define BINTEST_VERIFYALIGNMENT( s, n ) \
- if (ALIGNMENT(s, n) != n) { fprintf( stderr, "### alignment of " #s " = %d instead of expected %d!!!\n", ALIGNMENT(s, n), n ); abort(); }
-
-#endif
-
-#endif
diff --git a/cppu/test/alignment/makefile.mk b/cppu/test/alignment/makefile.mk
deleted file mode 100644
index 03e4d2de23a8..000000000000
--- a/cppu/test/alignment/makefile.mk
+++ /dev/null
@@ -1,84 +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.
-#
-#*************************************************************************
-
-#
-# build /test first, then /test/alignment
-#
-
-PRJ=..$/..
-PRJNAME=cppu
-TARGET=alignment
-LIBTARGET=NO
-ENABLE_EXCEPTIONS=TRUE
-NO_BSYMBOLIC=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-UNOUCRDEP=$(BIN)$/testcppu.rdb
-UNOUCRRDB=$(BIN)$/testcppu.rdb
-UNOUCROUT=$(INCCOM)$/test$/alignment
-INCPRE+=$(INCCOM)$/test -I$(INCCOM)$/test$/alignment -I$(PRJ)$/test$/alignment
-
-.IF "$(src_env)" == ""
-merge_rdb=$(SOLARBINDIR)$/udkapi.rdb
-.ELSE
-merge_rdb=$(SOLARBINDIR)$/applicat.rdb
-.ENDIF
-
-DEPOBJFILES= \
- $(OBJ)$/pass1.obj \
- $(OBJ)$/pass2.obj
-
-APP1OBJS = $(OBJ)$/pass1.obj
-APP1STDLIBS += $(CPPUHELPERLIB) $(CPPULIB) $(REGLIB) $(SALHELPERLIB) $(SALLIB)
-APP1TARGET = pass1
-
-APP2OBJS = $(OBJ)$/pass2.obj
-APP2STDLIBS = $(SALLIB)
-APP2TARGET = pass2
-
-# --- Targets ------------------------------------------------------
-
-.IF "$(depend)" == ""
-ALLTAR: execute_pass2
-.ELSE
-ALL: ALLDEP
-.ENDIF
-
-.INCLUDE : target.mk
-
-$(MISC)$/pass2.cxx: $(APP1TARGETN)
- regmerge $(UNOUCRRDB) / $(merge_rdb)
- cppumaker @$(mktmp $(CPPUMAKERFLAGS) -BUCR -O$(UNOUCROUT) $(foreach,c,$(shell @$(APP1TARGETN) -env:UNO_TYPES={$(subst,\,\\ $(UNOUCRRDB))} $(subst,\,\\ $(MISC)$/pass2.cxx) dump_types) -T$c) $(UNOUCRRDB))
-
-execute_pass2: $(APP2TARGETN)
- $(APP2TARGETN)
-
diff --git a/cppu/test/alignment/pass1.cxx b/cppu/test/alignment/pass1.cxx
deleted file mode 100644
index f60446c82639..000000000000
--- a/cppu/test/alignment/pass1.cxx
+++ /dev/null
@@ -1,240 +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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_cppu.hxx"
-
-#include "sal/main.h"
-
-#include <stdio.h>
-#include <vector>
-
-#include <rtl/string.hxx>
-#include <rtl/strbuf.hxx>
-#include <rtl/bootstrap.hxx>
-#include <rtl/process.h>
-
-#include <registry/reflread.hxx>
-
-// starting the executable:
-// -env:UNO_CFG_URL=local;<absolute_path>..\\..\\test\\cfg_data;<absolute_path>\\cfg_update
-// -env:UNO_TYPES=cpputest.rdb
-
-#include <cppuhelper/bootstrap.hxx>
-
-#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/registry/XRegistryKey.hpp>
-#include <com/sun/star/registry/XSimpleRegistry.hpp>
-
-#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
-#define OSTR(x) ::rtl::OUStringToOString( x, RTL_TEXTENCODING_ASCII_US )
-
-
-using namespace ::cppu;
-using namespace ::rtl;
-using namespace ::osl;
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-
-
-static void find_all_structs(
- Reference< registry::XRegistryKey > const & xKey,
- ::std::vector< OUString > * pNames )
-{
- if (xKey.is() && xKey->isValid())
- {
- if (xKey->getValueType() == registry::RegistryValueType_BINARY)
- {
- Sequence< sal_Int8 > aBytes( xKey->getBinaryValue() );
- RegistryTypeReader aReader(
- (const sal_uInt8 *)aBytes.getConstArray(),
- aBytes.getLength(), sal_False );
-
- switch (aReader.getTypeClass())
- {
- case RT_TYPE_EXCEPTION:
- case RT_TYPE_STRUCT:
- pNames->push_back( aReader.getTypeName().replace( '/', '.' ) );
- break;
- default:
- break;
- }
- }
-
- Sequence< Reference< registry::XRegistryKey > > keys( xKey->openKeys() );
- Reference< registry::XRegistryKey > const * pKeys = keys.getConstArray();
- for ( sal_Int32 nPos = keys.getLength(); nPos--; )
- {
- find_all_structs( pKeys[ nPos ], pNames );
- }
- }
-}
-
-static OString makeIncludeName( OUString const & name ) SAL_THROW( () )
-{
- return OSTR(name.replace( '.', '/' ));
-}
-static OString makeCppName( OUString const & name ) SAL_THROW( () )
-{
- OStringBuffer buf( 64 );
- OString str( OSTR(name) );
- sal_Int32 n = 0;
- do
- {
- buf.append( str.getToken( 0, '.', n ) );
- if (n >= 0)
- buf.append( "::" );
- }
- while (n >= 0);
- return buf.makeStringAndClear();
-}
-
-//==================================================================================================
-SAL_IMPLEMENT_MAIN()
-{
- sal_Int32 argc = rtl_getAppCommandArgCount();
- if (argc < 1)
- {
- fprintf( stderr, "usage: pass1 pass2_source [typelist_to_stdout]\n" );
- return 1;
- }
-
- try
- {
- // determine types rdb
- OUString rdb_name;
- Bootstrap bootstrap;
- if (!bootstrap.getFrom( OUSTR("UNO_TYPES"), rdb_name ) || !rdb_name.getLength())
- {
- fprintf(
- stderr,
- "### no UNO_TYPES registry found!!!\n\n"
- "usage: pass1 pass2_source [typelist_to_stdout]\n" );
- return 1;
- }
-
- Reference< XComponentContext > xContext( defaultBootstrap_InitialComponentContext() );
-
- // read out all struct names from given registry
- Reference< registry::XSimpleRegistry > xSimReg( createSimpleRegistry() );
- OSL_ASSERT( xSimReg.is() );
- xSimReg->open( rdb_name, sal_True, sal_False );
- OSL_ASSERT( xSimReg->isValid() );
- Reference< registry::XRegistryKey > xKey( xSimReg->getRootKey() );
- OSL_ASSERT( xKey.is() && xKey->isValid() );
-
- ::std::vector< OUString > names;
- names.reserve( 128 );
- find_all_structs( xKey->openKey( OUSTR("UCR") ), &names );
-
- OUString fileName;
- OSL_VERIFY( osl_Process_E_None == rtl_getAppCommandArg( 0, &fileName.pData ) );
- bool bDumpStdOut = (argc > 1);
-
- // generate pass2 output file [and type list]
- OString str( OSTR(fileName) );
- FILE * hPass2 = fopen( str.getStr(), "w" );
- OSL_ASSERT( hPass2 );
-
- size_t nPos;
- for ( nPos = names.size(); nPos--; )
- {
- OUString const & name = names[ nPos ];
- if (bDumpStdOut)
- {
- // type name on stdout
- OString str2( OSTR(name) );
- fprintf( stdout, "%s\n", str2.getStr() );
- }
- // all includes
- OString includeName( makeIncludeName( name ) );
- fprintf( hPass2, "#include <%s.hdl>\n", includeName.getStr() );
- }
- // include diagnose.h
- fprintf(
- hPass2,
- "\n#include <diagnose.h>\n"
- "#include \"sal/main.h\"\n\n"
- "SAL_IMPLEMENT_MAIN()\n{\n" );
- // generate all type checks
- for ( nPos = names.size(); nPos--; )
- {
- OUString const & name = names[ nPos ];
- typelib_TypeDescription * pTD = 0;
- typelib_typedescription_getByName( &pTD, name.pData );
- if (pTD)
- {
- if (! pTD->bComplete)
- {
- typelib_typedescription_complete( &pTD );
- }
- typelib_CompoundTypeDescription * pCTD = (typelib_CompoundTypeDescription *)pTD;
-
- OString cppName( makeCppName( name ) );
- fprintf(
- hPass2, "\tBINTEST_VERIFYSIZE( %s, %ld );\n",
- cppName.getStr(), static_cast< long >(pTD->nSize) );
- fprintf(
- hPass2, "\tBINTEST_VERIFYALIGNMENT( %s, %ld );\n",
- cppName.getStr(), static_cast< long >(pTD->nAlignment) );
- // offset checks
- for ( sal_Int32 nPos2 = pCTD->nMembers; nPos2--; )
- {
- OString memberName( OSTR(pCTD->ppMemberNames[ nPos2 ]) );
- fprintf(
- hPass2, "\tBINTEST_VERIFYOFFSET( %s, %s, %ld );\n",
- cppName.getStr(), memberName.getStr(),
- static_cast< long >(pCTD->pMemberOffsets[ nPos2 ]) );
- }
- typelib_typedescription_release( pTD );
- }
- else
- {
- OString str2( OSTR(name) );
- fprintf( stderr, "### cannot dump type %s!!!\n", str2.getStr() );
- }
- }
- fprintf(
- hPass2,
- "\n\tfprintf( stdout, \"> alignment test succeeded.\\n\" );\n"
- "\treturn 0;\n}\n\n" );
- fclose( hPass2 );
-
- Reference< lang::XComponent > xComp( xContext, UNO_QUERY );
- if (xComp.is())
- {
- xComp->dispose();
- }
- return 0;
- }
- catch (Exception & exc)
- {
- OString str( OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ) );
- ::fprintf( stderr, "# caught exception: %s\n", str.getStr() );
- return 1;
- }
-}
diff --git a/cppu/test/cascade_mapping/TestMapping.cxx b/cppu/test/cascade_mapping/TestMapping.cxx
deleted file mode 100644
index 724946c5b8c0..000000000000
--- a/cppu/test/cascade_mapping/TestMapping.cxx
+++ /dev/null
@@ -1,194 +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 "osl/interlck.h"
-#include "uno/dispatcher.h"
-#include "uno/mapping.hxx"
-
-#include "TestProxy.hxx"
-
-
-#ifdef LOG_LIFECYCLE
-#define LOG_LIFECYCLE_TestMapping
-#endif
-
-#define LOG_LIFECYCLE_TestMapping
-#ifdef LOG_LIFECYCLE_TestMapping
-# include <iostream>
-# define LOG_LIFECYCLE_TestMapping_emit(x) x
-
-#else
-# define LOG_LIFECYCLE_TestMapping_emit(x)
-
-#endif
-
-
-class SAL_DLLPRIVATE TestMapping : public uno_Mapping
-{
-private:
- oslInterlockedCount m_nCount;
- uno_ExtEnvironment * m_pFrom;
- uno_ExtEnvironment * m_pTo;
-
-public:
- explicit TestMapping(uno_Environment * pFrom, uno_Environment * pTo);
- ~TestMapping(void);
-
- void acquire() SAL_THROW(());
- void release() SAL_THROW(());
-
- void SAL_CALL mapInterface(uno_Interface ** ppOut,
- uno_Interface * pUnoI,
- typelib_InterfaceTypeDescription * pTypeDescr
- )
- SAL_THROW_EXTERN_C();
-};
-
-
-extern "C" {
-static void SAL_CALL s_mapInterface(
- uno_Mapping * pMapping,
- void ** ppOut,
- void * pUnoI,
- typelib_InterfaceTypeDescription * pTypeDescr )
- SAL_THROW_EXTERN_C()
-{
- TestMapping * pTestMapping = static_cast<TestMapping *>(pMapping);
- pTestMapping->mapInterface((uno_Interface **)ppOut, (uno_Interface *)pUnoI, pTypeDescr);
-}
-
-
-static void SAL_CALL s_acquire(uno_Mapping * pMapping) SAL_THROW_EXTERN_C()
-{
- TestMapping * pTestMapping = static_cast<TestMapping *>(pMapping);
- pTestMapping->acquire();
-}
-
-
-static void SAL_CALL s_release(uno_Mapping * pMapping) SAL_THROW_EXTERN_C()
-{
- TestMapping * pTestMapping = static_cast<TestMapping * >(pMapping);
- pTestMapping->release();
-}
-
-static void SAL_CALL s_free(uno_Mapping * pMapping) SAL_THROW_EXTERN_C()
-{
- TestMapping * pTestMapping = static_cast<TestMapping * >(pMapping);
- delete pTestMapping;
-}
-}
-
-TestMapping::TestMapping(uno_Environment * pFrom, uno_Environment * pTo)
- SAL_THROW( () )
- : m_nCount(1),
- m_pFrom(reinterpret_cast<uno_ExtEnvironment *>(pFrom)),
- m_pTo (reinterpret_cast<uno_ExtEnvironment *>(pTo))
-{
- LOG_LIFECYCLE_TestMapping_emit(fprintf(stderr, "LIFE: %s -> %p\n", "TestMapping::TestMapping", this));
-
- m_pFrom->aBase.acquire(&m_pFrom->aBase);
- m_pTo ->aBase.acquire(&m_pTo ->aBase);
-
- uno_Mapping::acquire = s_acquire;
- uno_Mapping::release = s_release;
- uno_Mapping::mapInterface = s_mapInterface;
-}
-
-TestMapping::~TestMapping(void)
-{
- LOG_LIFECYCLE_TestMapping_emit(fprintf(stderr, "LIFE: %s -> %p\n", "TestMapping::~TestMapping", this));
-
- m_pFrom->aBase.release(&m_pFrom->aBase);
- m_pTo ->aBase.release(&m_pTo ->aBase);
-}
-
-
-void TestMapping::acquire() SAL_THROW(())
-{
- if (osl_incrementInterlockedCount(&m_nCount) == 1)
- {
- uno_Mapping * pMapping = this;
-
- ::uno_registerMapping(&pMapping, s_free, &m_pFrom->aBase, &m_pTo->aBase, NULL);
- }
-}
-
-void TestMapping::release() SAL_THROW(())
-{
- if (osl_decrementInterlockedCount(&m_nCount) == 0)
- ::uno_revokeMapping(this);
-}
-
-
-void SAL_CALL TestMapping::mapInterface(
- uno_Interface ** ppOut,
- uno_Interface * pUnoI,
- typelib_InterfaceTypeDescription * pTypeDescr )
- SAL_THROW_EXTERN_C()
-{
- // get object id of uno interface to be wrapped
- rtl_uString * pOId = 0;
- m_pFrom->getObjectIdentifier(m_pFrom, &pOId, pUnoI);
-
- OSL_ASSERT(pOId);
-
- if (*ppOut)
- {
- (*ppOut)->release(*ppOut);
- *ppOut = 0;
- }
-
- // try to get any known interface from target environment
- m_pTo->getRegisteredInterface(m_pTo, (void **)ppOut, pOId, pTypeDescr);
- if (!*ppOut) // not yet there, register new proxy interface
- {
- // try to publish a new proxy (ref count initially 1)
- TestProxy * pTestProxy = new TestProxy(pUnoI, pOId, pTypeDescr, m_pTo, m_pFrom);
-
- // proxy may be exchanged during registration
- m_pTo->registerProxyInterface(m_pTo,(void **)&pTestProxy, TestProxy_free, pOId, pTypeDescr);
-
- *ppOut = pTestProxy;
- }
-
- rtl_uString_release(pOId);
-}
-
-
-extern "C" void SAL_DLLPUBLIC_EXPORT SAL_CALL uno_initEnvironment(uno_Environment * /*pEnv*/)
- SAL_THROW_EXTERN_C()
-{
-}
-
-extern "C" void uno_ext_getMapping(uno_Mapping ** ppMapping,
- uno_Environment * pFrom,
- uno_Environment * pTo )
-{
- *ppMapping = new TestMapping(pFrom, pTo);
-
- ::uno_registerMapping(ppMapping, s_free, pFrom, pTo, NULL);
-}
diff --git a/cppu/test/cascade_mapping/TestMapping.def b/cppu/test/cascade_mapping/TestMapping.def
deleted file mode 100644
index e8b4824657f9..000000000000
--- a/cppu/test/cascade_mapping/TestMapping.def
+++ /dev/null
@@ -1,11 +0,0 @@
-LIBRARY cppu3
-DESCRIPTION 'StarView 3.00 680 m124'
-DATA READ WRITE SHARED
-HEAPSIZE 0
-EXPORTS
- uno_initEnvironment
- uno_ext_getMapping
-
-
-
-
diff --git a/cppu/test/cascade_mapping/TestProxy.cxx b/cppu/test/cascade_mapping/TestProxy.cxx
deleted file mode 100644
index d72e11c2ecab..000000000000
--- a/cppu/test/cascade_mapping/TestProxy.cxx
+++ /dev/null
@@ -1,179 +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 "uno/mapping.hxx"
-#include "cppu/EnvDcp.hxx"
-
-#include "../mapping_tester/Mapping.tester.hxx"
-
-#include "TestProxy.hxx"
-
-
-#ifdef LOG_LIFECYCLE
-#define LOG_LIFECYCLE_TestProxy
-#endif
-
-#define LOG_LIFECYCLE_TestProxy
-#ifdef LOG_LIFECYCLE_TestProxy
-# include <iostream>
-# define LOG_LIFECYCLE_TestProxy_emit(x) x
-
-#else
-# define LOG_LIFECYCLE_TestProxy_emit(x)
-
-#endif
-
-
-using namespace com::sun::star;
-
-extern "C" void SAL_CALL TestProxy_free(uno_ExtEnvironment * /*pEnv*/, void * pObject)
- SAL_THROW_EXTERN_C()
-{
- TestProxy * pTestProxy = reinterpret_cast<TestProxy *>(pObject);
- delete pTestProxy;
-}
-
-
-extern "C" {
-static void SAL_CALL s_acquire(uno_Interface * pUnoI) SAL_THROW_EXTERN_C()
-{
- TestProxy * pTestProxy = static_cast<TestProxy *>(pUnoI);
- pTestProxy->acquire();
-}
-
-static void SAL_CALL s_release(uno_Interface * pUnoI) SAL_THROW_EXTERN_C()
-{
- TestProxy * pTestProxy = static_cast<TestProxy *>(pUnoI);
- pTestProxy->release();
-}
-
-static void SAL_CALL s_dispatch(uno_Interface * pUnoI,
- typelib_TypeDescription const * pMemberType,
- void * pReturn,
- void * pArgs[],
- uno_Any ** ppException)
- SAL_THROW_EXTERN_C()
-{
- TestProxy * pThis = static_cast<TestProxy *>(pUnoI);
- pThis->dispatch(pMemberType, pReturn, pArgs, ppException);
-}
-}
-
-TestProxy::TestProxy(uno_Interface * pObject,
- rtl::OUString const & oid,
- typelib_InterfaceTypeDescription * pTypeDescr,
- uno_ExtEnvironment * pFrom_extEnv,
- uno_ExtEnvironment * pTo_extEnv)
- : m_nCount (1),
- m_from_envDcp(pFrom_extEnv->aBase.pTypeName),
- m_to_envDcp (pTo_extEnv ->aBase.pTypeName),
- m_oid (oid),
- m_pTypeDescr (pTypeDescr)
-{
- LOG_LIFECYCLE_TestProxy_emit(fprintf(stderr, "LIFE: %s -> %p\n", "TestProxy::TestProxy", this));
-
- // uno_Interface
- uno_Interface::acquire = s_acquire;
- uno_Interface::release = s_release;
- uno_Interface::pDispatcher = s_dispatch;
-
- m_theObject = pObject;
- m_theObject->acquire(m_theObject);
-
- typelib_typedescription_acquire(&pTypeDescr->aBase);
-
- m_pFrom_extEnv = pFrom_extEnv;
- m_pFrom_extEnv->aBase.acquire(&m_pFrom_extEnv->aBase);
-
- m_pTo_extEnv = pTo_extEnv;
- m_pTo_extEnv->aBase.acquire(&m_pTo_extEnv->aBase);
-
- m_pTo_extEnv->registerInterface(m_pTo_extEnv, reinterpret_cast<void **>(&pObject), oid.pData, pTypeDescr);
-}
-
-TestProxy::~TestProxy(void)
-{
- LOG_LIFECYCLE_TestProxy_emit(fprintf(stderr, "LIFE: %s -> %p\n", "TestProxy::~TestProxy", this));
-
- m_pTo_extEnv->revokeInterface(m_pTo_extEnv, reinterpret_cast<void *>(m_theObject));
-
- typelib_typedescription_release(&m_pTypeDescr->aBase);
- m_theObject->release(m_theObject);
- m_pFrom_extEnv->aBase.release(&m_pFrom_extEnv->aBase);
- m_pTo_extEnv ->aBase.release(&m_pTo_extEnv->aBase);
-}
-
-void TestProxy::acquire() SAL_THROW(())
-{
- if (osl_incrementInterlockedCount(&m_nCount) == 1)
- {
- uno_Interface * pThis = this;
- m_pTo_extEnv->registerProxyInterface(m_pTo_extEnv,
- (void **)&pThis,
- TestProxy_free,
- m_oid.pData,
- m_pTypeDescr);
- OSL_ASSERT(pThis == this);
- }
-}
-
-void TestProxy::release() SAL_THROW(())
-{
- if (osl_decrementInterlockedCount(&m_nCount) == 0)
- {
- m_pFrom_extEnv->revokeInterface(m_pFrom_extEnv, this);
- }
-}
-
-void TestProxy::dispatch(typelib_TypeDescription const * pMemberType,
- void * pReturn,
- void * pArgs[],
- uno_Any ** ppException)
-{
- {
- rtl::OUString arrow(RTL_CONSTASCII_USTRINGPARAM("-->"));
-
- if (!g_custom.getLength())
- g_custom += m_from_envDcp;
-
- g_custom += arrow;
- g_custom += m_to_envDcp;
-
- m_theObject->pDispatcher(m_theObject, pMemberType, pReturn, pArgs, ppException);
-
- uno_Any * any = (uno_Any *)pReturn;
-
- void * pout = NULL;
-
- uno::Mapping mapping(m_to_envDcp, m_from_envDcp);
- mapping.mapInterface(&pout, any->pReserved, any->pType);
-
- ((uno_Interface *)any->pReserved)->release((uno_Interface*)any->pReserved);
- any->pReserved = pout;
- }
-}
-
diff --git a/cppu/test/cascade_mapping/TestProxy.hxx b/cppu/test/cascade_mapping/TestProxy.hxx
deleted file mode 100644
index 3dae15ee8620..000000000000
--- a/cppu/test/cascade_mapping/TestProxy.hxx
+++ /dev/null
@@ -1,70 +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.
- *
- ************************************************************************/
-
-#ifndef INCLUDED_TestProxy_hxx
-#define INCLUDED_TestProxy_hxx
-
-#include "osl/interlck.h"
-#include "uno/dispatcher.h"
-#include "uno/environment.hxx"
-
-
-extern "C" void SAL_CALL TestProxy_free(uno_ExtEnvironment * pEnv, void * pObject) SAL_THROW_EXTERN_C();
-
-
-class SAL_DLLPRIVATE TestProxy : public uno_Interface
-{
-private:
- uno_Interface * m_theObject;
- uno_ExtEnvironment * m_pFrom_extEnv;
- uno_ExtEnvironment * m_pTo_extEnv;
- oslInterlockedCount m_nCount;
- rtl::OUString m_from_envDcp;
- rtl::OUString m_to_envDcp;
- rtl::OUString m_oid;
- typelib_InterfaceTypeDescription * m_pTypeDescr;
-
-public:
- explicit TestProxy(uno_Interface * pObject,
- rtl::OUString const & oid,
- typelib_InterfaceTypeDescription * pTypeDescr,
- uno_ExtEnvironment * pFrom_env,
- uno_ExtEnvironment * pExtEnvironment);
- ~TestProxy(void);
-
-
- void acquire() SAL_THROW(());
- void release() SAL_THROW(());
-
- void dispatch(typelib_TypeDescription const * pMemberType,
- void * pReturn,
- void * pArgs[],
- uno_Any ** ppException);
-};
-
-
-#endif
diff --git a/cppu/test/cascade_mapping/cascade_mapping.test.pl b/cppu/test/cascade_mapping/cascade_mapping.test.pl
deleted file mode 100755
index 265010a56abb..000000000000
--- a/cppu/test/cascade_mapping/cascade_mapping.test.pl
+++ /dev/null
@@ -1,91 +0,0 @@
-:
-eval 'exec perl -wS $0 ${1+"$@"}'
- if 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.
-#
-#*************************************************************************
-
-my $rc = 0;
-my $comment = "";
-
-
-@tests=(
-"mapping.tester uno:test uno -s path.test \"uno:test-->uno\"",
-"mapping.tester uno uno:test -s path.test \"uno-->uno:test\"",
-"mapping.tester uno:test:bla uno -s path.test \"uno:test:bla-->uno:test-->uno\"",
-"mapping.tester uno uno:test:bla -s path.test \"uno-->uno:test-->uno:test:bla\"",
-"mapping.tester uno:test:bla:blubb uno -s path.test \"uno:test:bla:blubb-->uno:test:bla-->uno:test-->uno\"",
-"mapping.tester uno uno:test:bla:blubb -s path.test \"uno-->uno:test-->uno:test:bla-->uno:test:bla:blubb\"",
-"mapping.tester uno:bla uno:test -s path.test \"uno:bla-->uno-->uno:test\"",
-"mapping.tester uno:test uno:bla -s path.test \"uno:test-->uno-->uno:bla\"",
-"mapping.tester uno:test:blubb uno:bla -s path.test \"uno:test:blubb-->uno:test-->uno-->uno:bla\"",
-"mapping.tester uno:test uno:bla:blubb -s path.test \"uno:test-->uno-->uno:bla-->uno:bla:blubb\"",
-"mapping.tester uno:test:bla uno:test:blubb -s path.test \"uno:test:bla-->uno:test-->uno:test:blubb\"",
-"mapping.tester CPP:bla uno -s path.test \"CPP:bla-->uno:bla-->uno\"",
-"mapping.tester uno CPP:bla -s path.test \"uno-->uno:bla-->CPP:bla\"",
-"mapping.tester CPP uno:bla -s path.test \"CPP-->uno-->uno:bla\"",
-"mapping.tester CPP:bla uno:blubb -s path.test \"CPP:bla-->uno:bla-->uno-->uno:blubb\"",
-"mapping.tester CPP:test:bla uno:test:blubb -s path.test \"CPP:test:bla-->uno:test:bla-->uno:test-->uno:test:blubb\"",
-"mapping.tester CPP:bla CPP -s path.test \"CPP:bla-->uno:bla-->uno-->CPP\"",
-"mapping.tester CPP CPP:bla -s path.test \"CPP-->uno-->uno:bla-->CPP:bla\"",
-"mapping.tester CPP:bla:test CPP -s path.test \"CPP:bla:test-->uno:bla:test-->uno:bla-->uno-->CPP\"",
-"mapping.tester CPP CPP:bla:test -s path.test \"CPP-->uno-->uno:bla-->uno:bla:test-->CPP:bla:test\"",
-"mapping.tester CPP:bla CPP:blubb -s path.test \"CPP:bla-->uno:bla-->uno-->uno:blubb-->CPP:blubb\"",
-"mapping.tester CPP:test:bla CPP:blubb -s path.test \"CPP:test:bla-->uno:test:bla-->uno:test-->uno-->uno:blubb-->CPP:blubb\"",
-"mapping.tester CPP:bla CPP:test:blubb -s path.test \"CPP:bla-->uno:bla-->uno-->uno:test-->uno:test:blubb-->CPP:test:blubb\"",
-"mapping.tester CPP:bae:bla CPP:test:blubb -s path.test \"CPP:bae:bla-->uno:bae:bla-->uno:bae-->uno-->uno:test-->uno:test:blubb-->CPP:test:blubb\"",
-"mapping.tester CPP:test:bla CPP:test:blubb -s path.test \"CPP:test:bla-->uno:test:bla-->uno:test-->uno:test:blubb-->CPP:test:blubb\""
-);
-
-foreach $test (@tests) {
- $output = "";
-
- $cmd = $test;
- open TESTER, $cmd . "|";
- while (<TESTER>) {
- chomp;
-
- $output = $output . "\t" . $_ . "\n";
- }
- close TESTER ;
-
- if ($? != 0) {
- $comment = $comment . "TEST FAILED: " . $cmd . "\n";
- $comment = $comment . $output;
- }
- $rc = $rc + $?;
-}
-
-
-print $comment;
-
-if ($rc == 0) {
- print "*********** SUCCESS\n";
-}
-else {
- print "*********** FAILURE\n";
-}
diff --git a/cppu/test/cascade_mapping/makefile.mk b/cppu/test/cascade_mapping/makefile.mk
deleted file mode 100644
index 1d5434a6b940..000000000000
--- a/cppu/test/cascade_mapping/makefile.mk
+++ /dev/null
@@ -1,90 +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 := cppu
-TARGET := cascade_mappping.test.pl
-
-ENABLE_EXCEPTIONS := TRUE
-NO_BSYMBOLIC := TRUE
-
-
-.INCLUDE : settings.mk
-
-CFLAGS += -fPIC
-
-VERSIONOBJ := # NO GetVersionInfo symbols :-)
-ENVINCPRE := -I$(OUT)$/inc$/$(TARGET)
-
-HLD_DLLPRE := $(DLLPRE)
-DLLPRE :=
-
-
-SHL1TARGET := path.test
-SHL1IMPLIB := i$(SHL1TARGET)
-SHL1OBJS := $(OBJ)$/path.test.obj
-SHL1DEF := path.test.def
-SHL1STDLIBS := $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB)
-.IF "$(GUI)"=="WNT"
-SHL1STDLIBS += $(BIN)$/mapping.tester.lib
-.ENDIF
-
-SHL2TARGET := $(HLD_DLLPRE)bla_uno_uno
-SHL2IMPLIB := i$(SHL2TARGET)
-SHL2OBJS := $(SLO)$/TestMapping.obj $(SLO)$/TestProxy.obj
-SHL2STDLIBS := $(CPPULIB) $(SALHELPERLIB) $(SALLIB)
-SHL2DEF := TestMapping.def
-.IF "$(GUI)"=="WNT"
-SHL2STDLIBS += $(BIN)$/mapping.tester.lib
-.ENDIF
-
-SHL3TARGET := $(HLD_DLLPRE)blubb_uno_uno
-SHL3IMPLIB := i$(SHL3TARGET)
-SHL3OBJS := $(SHL2OBJS)
-SHL3STDLIBS := $(SHL2STDLIBS)
-SHL3DEF := $(SHL2DEF)
-
-SHL4TARGET := $(HLD_DLLPRE)bae_uno_uno
-SHL4IMPLIB := i$(SHL4TARGET)
-SHL4OBJS := $(SHL2OBJS)
-SHL4STDLIBS := $(SHL2STDLIBS)
-SHL4DEF := $(SHL2DEF)
-
-SHL5TARGET := $(HLD_DLLPRE)test_uno_uno
-SHL5IMPLIB := i$(SHL5TARGET)
-SHL5OBJS := $(SHL2OBJS)
-SHL5STDLIBS := $(SHL2STDLIBS)
-SHL5DEF := $(SHL2DEF)
-
-
-.INCLUDE : target.mk
-
-
-ALLTAR: $(BIN)$/$(TARGET)
-
-$(BIN)$/$(TARGET): cascade_mapping.test.pl
- @+$(COPY) $^ $@
diff --git a/cppu/test/cascade_mapping/path.test.cxx b/cppu/test/cascade_mapping/path.test.cxx
deleted file mode 100644
index 1b2ddb1ebdfe..000000000000
--- a/cppu/test/cascade_mapping/path.test.cxx
+++ /dev/null
@@ -1,60 +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 "rtl/ustring.hxx"
-
-#include "../mapping_tester/Mapping.tester.hxx"
-
-
-D_CALLEE
-{
- rtl::OUString const method_name(pMethod_name);
-
- if (g_check)
- {
- g_result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\tmethod: "));
- g_result += method_name;
- g_result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - mapping purpose path test --> "));
-
- if (g_ref.compareTo(g_custom) == 0)
- {
- g_result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OKAY\n"));
- }
- else
- {
- g_result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FAILED\n"));
- g_result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\t\texpected: "));
- g_result += g_ref;
- g_result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
-
- g_result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\t\t got: "));
- g_result += g_custom;
- g_result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
- }
- }
-}
-
diff --git a/cppu/test/cascade_mapping/path.test.def b/cppu/test/cascade_mapping/path.test.def
deleted file mode 100644
index ab7d8b00c62c..000000000000
--- a/cppu/test/cascade_mapping/path.test.def
+++ /dev/null
@@ -1,8 +0,0 @@
-LIBRARY cppu3
-DESCRIPTION 'StarView 3.00 680 m124'
-DATA READ WRITE SHARED
-HEAPSIZE 0
-EXPORTS
- CALLEE
-
-
diff --git a/cppu/test/cpputest.idl b/cppu/test/cpputest.idl
deleted file mode 100644
index 89302cb02585..000000000000
--- a/cppu/test/cpputest.idl
+++ /dev/null
@@ -1,94 +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.
- *
- ************************************************************************/
-#ifndef _TEST_CPPUTEST_IDL_
-#define _TEST_CPPUTEST_IDL_
-
-#include <com/sun/star/uno/XInterface.idl>
-#include <com/sun/star/uno/TypeClass.idl>
-
-module test
-{
-
-struct Test1
-{
- short nInt16;
- double dDouble;
- boolean bBool;
-};
-
-struct Test2
-{
- short nInt16;
- Test1 aTest1;
-};
-
-typedef Test1 TdTest1;
-
-struct Test3
-{
- byte nInt8;
- float nFloat;
- double nDouble;
- short nInt16;
- string aString;
- unsigned short nuInt16;
- hyper nInt64;
- long nInt32;
- unsigned hyper nuInt64;
- unsigned long nuInt32;
- com::sun::star::uno::TypeClass eType;
- char wChar;
- TdTest1 td;
- boolean bBool;
- any aAny;
-};
-
-
-struct Base
-{
- long n;
- short o;
-};
-
-struct Base1 : Base
-{
- short p;
-};
-
-struct Base2 : Base1
-{
- double p2;
-};
-
-interface XSimpleInterface : com::sun::star::uno::XInterface
-{
- void method();
-};
-
-}; //module test
-
-#endif
diff --git a/cppu/test/env_substs/env_subst.test.cxx b/cppu/test/env_substs/env_subst.test.cxx
deleted file mode 100644
index 585fcbf02d8a..000000000000
--- a/cppu/test/env_substs/env_subst.test.cxx
+++ /dev/null
@@ -1,95 +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 "sal/main.h"
-
-#include "uno/environment.hxx"
-
-#include <iostream>
-
-
-using namespace com::sun::star;
-
-static rtl::OUString s_comment;
-
-static void s_test_substituting(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test_substituting\n"));
-
- putenv(strdup("UNO_ENV_SUBST:uno:unsafe=uno:affine"));
-
- uno::Environment env(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("uno:unsafe")));
- if (!env.getTypeName().equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("uno:affine"))))
- {
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\tFAILURE - expected \"uno:affine\" instead of \""));
- s_comment += env.getTypeName();
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"\n"));
- }
-}
-
-static void s_test_not_substituting(void)
-{
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test_not_substituting\n"));
-
- putenv(strdup("UNO_ENV_SUBST:uno:unsafe=uno:affine"));
-
- uno::Environment env(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("uno:affine")));
- if (!env.getTypeName().equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("uno:affine"))))
- {
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\tFAILURE - expected \"uno:affine\" instead of \""));
- s_comment += env.getTypeName();
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"\n"));
- }
-}
-
-SAL_IMPLEMENT_MAIN_WITH_ARGS(/*argc*/, argv)
-{
- s_test_substituting();
- s_test_not_substituting();
-
-
- int ret;
- if (s_comment.indexOf(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FAILURE"))) == -1)
- {
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS PASSED\n"));
- ret = 0;
- }
- else
- {
- s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS _NOT_ PASSED\n"));
- ret = -1;
- }
-
- std::cerr
- << argv[0]
- << std::endl
- << rtl::OUStringToOString(s_comment, RTL_TEXTENCODING_ASCII_US).getStr()
- << std::endl;
-
- return ret;
-}
-
diff --git a/cppu/test/env_substs/makefile.mk b/cppu/test/env_substs/makefile.mk
deleted file mode 100644
index 58564ba8cce2..000000000000
--- a/cppu/test/env_substs/makefile.mk
+++ /dev/null
@@ -1,46 +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 := cppu
-TARGET := env_subst.test
-
-
-ENABLE_EXCEPTIONS := TRUE
-NO_BSYMBOLIC := TRUE
-USE_DEFFILE := TRUE
-
-
-.INCLUDE : settings.mk
-
-
-APP1TARGET := $(TARGET)
-APP1OBJS := $(OBJ)$/env_subst.test.obj
-APP1STDLIBS := $(CPPULIB) $(SALLIB)
-
-
-.INCLUDE : target.mk
diff --git a/cppu/test/env_tester/TestEnvironment.cxx b/cppu/test/env_tester/TestEnvironment.cxx
deleted file mode 100644
index f91f78659316..000000000000
--- a/cppu/test/env_tester/TestEnvironment.cxx
+++ /dev/null
@@ -1,37 +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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_cppu.hxx"
-
-#include "uno/environment.h"
-
-
-extern "C" void SAL_CALL uno_initEnvironment(uno_Environment * /*pEnv*/)
- SAL_THROW_EXTERN_C()
-{
-}
diff --git a/cppu/test/env_tester/TestEnvironment.def b/cppu/test/env_tester/TestEnvironment.def
deleted file mode 100644
index f59a32c4a174..000000000000
--- a/cppu/test/env_tester/TestEnvironment.def
+++ /dev/null
@@ -1,7 +0,0 @@
-LIBRARY cppu3
-DESCRIPTION 'StarView 3.00 680 m124'
-DATA READ WRITE SHARED
-HEAPSIZE 0
-EXPORTS
- uno_initEnvironment
-
diff --git a/cppu/test/env_tester/env.tester.cxx b/cppu/test/env_tester/env.tester.cxx
deleted file mode 100644
index fcc4cbfcd845..000000000000
--- a/cppu/test/env_tester/env.tester.cxx
+++ /dev/null
@@ -1,104 +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 <iostream>
-
-#include "sal/main.h"
-#include "rtl/ustring.hxx"
-#include "rtl/string.hxx"
-#include "rtl/alloc.h"
-#include "uno/environment.hxx"
-#include "uno/lbnames.h"
-
-using namespace com::sun::star;
-
-
-static rtl::OUString s_replaceCPP(rtl::OUString const & str)
-{
- rtl::OUString cpp(RTL_CONSTASCII_USTRINGPARAM("CPP"));
-
- rtl::OUString result;
-
- sal_Int32 index_old = 0;
- sal_Int32 index = str.indexOf(cpp, index_old);
- while (index != -1)
- {
- result += str.copy(index_old, index - index_old);
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV)));
-
- index_old = index + 3;
- index = str.indexOf(cpp, index_old);
- }
- result += str.copy(index_old);
-
- return result;
-}
-
-
-rtl::OUString register_test(rtl::OUString const & envDcp);
-rtl::OUString purpenv_test(rtl::OUString const & envDcp);
-
-
-
-SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
-{
- int ret = 0;
- rtl::OUString message;
-
- if (argc == 2)
- {
- message = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
-
- rtl::OUString envDcp(argv[1], rtl_str_getLength(argv[1]), RTL_TEXTENCODING_ASCII_US);
- envDcp = s_replaceCPP(envDcp);
-
-
- message += register_test(envDcp);
- message += purpenv_test(envDcp);
-
- if (message.indexOf(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FAILURE"))) == -1)
- {
- message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS PASSED\n"));
- ret = 0;
- }
- else
- {
- message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS _NOT_ PASSED\n"));
- ret = -1;
- }
- }
- else
- message = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("<env. descriptor>"));
-
- std::cerr
- << argv[0]
- << " "
- << rtl::OUStringToOString(message, RTL_TEXTENCODING_ASCII_US).getStr()
- << std::endl;
-
- return ret;
-}
diff --git a/cppu/test/env_tester/makefile.mk b/cppu/test/env_tester/makefile.mk
deleted file mode 100644
index c418749e66bf..000000000000
--- a/cppu/test/env_tester/makefile.mk
+++ /dev/null
@@ -1,67 +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 := cppu
-TARGET := env.tester.bin
-
-ENABLE_EXCEPTIONS := TRUE
-NO_BSYMBOLIC := TRUE
-
-
-.INCLUDE : settings.mk
-.INCLUDE : ../../source/helper/purpenv/export.mk
-
-
-.IF "$(GUI)"=="UNX" || "$(GUI)"=="MAC"
-ObjectFactory_LIB := -lObjectFactory.$(COMID)
-
-.ELSE
-ObjectFactory_LIB := $(LIBPRE) iObjectFactory.$(COMID).lib
-
-.ENDIF
-
-
-APP1TARGET := $(TARGET)
-APP1OBJS := $(OBJ)$/env.tester.obj $(OBJ)$/purpenv.test.obj $(OBJ)$/register.test.obj
-APP1STDLIBS := $(ObjectFactory_LIB) $(CPPULIB) $(SALLIB)
-
-
-SHL1TARGET := purpA_uno_uno
-SHL1IMPLIB := i$(SHL1TARGET)
-SHL1OBJS := $(SLO)$/TestEnvironment.obj
-SHL1STDLIBS := $(CPPULIB) $(SALHELPERLIB) $(SALLIB)
-SHL1DEF := TestEnvironment.def
-
-SHL2TARGET := purpB_uno_uno
-SHL2IMPLIB := i$(SHL2TARGET)
-SHL2OBJS := $(SHL1OBJS)
-SHL2STDLIBS := $(SHL1STDLIBS)
-SHL2DEF := $(SHL1DEF)
-
-
-.INCLUDE : target.mk
diff --git a/cppu/test/env_tester/purpenv.test.cxx b/cppu/test/env_tester/purpenv.test.cxx
deleted file mode 100644
index 42da4d300189..000000000000
--- a/cppu/test/env_tester/purpenv.test.cxx
+++ /dev/null
@@ -1,401 +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 <iostream>
-
-#include "sal/main.h"
-
-#include "uno/environment.hxx"
-#include "uno/dispatcher.h"
-
-#include "typelib/typedescription.h"
-
-#include "com/sun/star/uno/Any.h"
-
-#include "../ObjectFactory/ObjectFactory.hxx"
-
-
-using namespace com::sun::star;
-
-
-static rtl::OUString g_usret(RTL_CONSTASCII_USTRINGPARAM("\n"));
-static rtl::OUString g_ustab(RTL_CONSTASCII_USTRINGPARAM("\t"));
-static rtl::OUString g_comment;
-static uno::Environment g_env;
-static bool g_check = 0;
-
-extern "C" { static void s_callee(rtl_uString * pMethod_name)
-{
- if (g_check)
- {
- g_comment += g_ustab;
- g_comment += g_ustab;
- g_comment += rtl::OUString(pMethod_name);
-
- rtl::OUString reason;
- int valid = g_env.isValid(&reason);
-
- g_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("["));
- g_comment += rtl::OUString::valueOf((sal_Int32)valid);
- g_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(","));
- g_comment += reason;
- g_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("]"));
-
- if (!valid)
- g_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - FAILURE"));
-
- g_comment += g_usret;
- }
-}}
-
-
-static rtl::OUString s_test_registerInterface(rtl::OUString const & envDcp)
-{
- g_env = uno::Environment(envDcp);
-
- g_comment = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test_registerInterface"));
- g_comment += g_usret;
-
- rtl::OUString id(RTL_CONSTASCII_USTRINGPARAM("blabla"));
-
- typelib_TypeDescriptionReference * type_XInterface =
- * typelib_static_type_getByTypeClass( typelib_TypeClass_INTERFACE );
-
- typelib_TypeDescription * pRet = NULL;
- typelib_typedescriptionreference_getDescription(&pRet, type_XInterface);
-
- void * pObject = createObject(envDcp, s_callee);
- g_check = 1;
- g_env.get()->pExtEnv->registerInterface(g_env.get()->pExtEnv,
- &pObject,
- id.pData,
- (struct _typelib_InterfaceTypeDescription *)pRet);
- g_check = 0;
-
- g_env.get()->pExtEnv->revokeInterface(g_env.get()->pExtEnv, pObject);
- g_env.get()->pExtEnv->releaseInterface(g_env.get()->pExtEnv, pObject);
-
- g_env.clear();
-
- return g_comment;
-}
-
-extern "C" { static void s_freeFunc(struct _uno_ExtEnvironment * /*pEnv*/, void * /*pProxy*/ )
-{
- if (g_check)
- {
- g_comment += g_ustab;
- g_comment += g_ustab;
- g_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("s_freeFunc"));
-
- rtl::OUString reason;
- int valid = g_env.isValid(&reason);
-
- g_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("["));
- g_comment += rtl::OUString::valueOf((sal_Int32)valid);
- g_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(","));
- g_comment += reason;
- g_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("]"));
-
- if (!valid)
- g_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - FAILURE"));
-
- g_comment += g_usret;
- }
-}}
-
-static rtl::OUString s_test_registerProxyInterface(rtl::OUString const & envDcp)
-{
- g_env = uno::Environment(envDcp);
-
- g_comment = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test_registerProxyInterface"));
- g_comment += g_usret;
-
- rtl::OUString id(RTL_CONSTASCII_USTRINGPARAM("blabla"));
-
- typelib_TypeDescriptionReference * type_XInterface =
- * typelib_static_type_getByTypeClass( typelib_TypeClass_INTERFACE );
-
- typelib_TypeDescription * pRet = NULL;
- typelib_typedescriptionreference_getDescription(&pRet, type_XInterface);
-
- void * pObject = createObject(envDcp, s_callee);
- g_check = 1;
- g_env.get()->pExtEnv->registerProxyInterface(g_env.get()->pExtEnv,
- &pObject,
- s_freeFunc,
- id.pData,
- (typelib_InterfaceTypeDescription *)pRet);
- g_check = 0;
-
- g_env.get()->pExtEnv->releaseInterface(g_env.get()->pExtEnv, pObject);
- g_check = 1;
- g_env.get()->pExtEnv->revokeInterface(g_env.get()->pExtEnv, pObject);
- g_check = 0;
-
- g_env.clear();
-
-
- return g_comment;
-}
-
-static rtl::OUString s_test_revokeInterface(rtl::OUString const & envDcp)
-{
- g_env = uno::Environment(envDcp);
-
- g_comment = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test_revokeInterface"));
- g_comment += g_usret;
-
- rtl::OUString id(RTL_CONSTASCII_USTRINGPARAM("blabla"));
-
- typelib_TypeDescriptionReference * type_XInterface =
- * typelib_static_type_getByTypeClass( typelib_TypeClass_INTERFACE );
-
- typelib_TypeDescription * pRet = NULL;
- typelib_typedescriptionreference_getDescription(&pRet, type_XInterface);
-
- void * pObject = createObject(envDcp, s_callee);
- g_env.get()->pExtEnv->registerInterface(g_env.get()->pExtEnv,
- &pObject,
- id.pData,
- (struct _typelib_InterfaceTypeDescription *)pRet);
-
- g_check = 1;
- g_env.get()->pExtEnv->revokeInterface(g_env.get()->pExtEnv, pObject);
- g_check = 0;
- g_env.get()->pExtEnv->releaseInterface(g_env.get()->pExtEnv, pObject);
-
- g_env.clear();
-
- return g_comment;
-}
-
-static rtl::OUString s_test_getObjectIdentifier(rtl::OUString const & envDcp)
-{
- g_env = uno::Environment(envDcp);
-
- g_comment = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test_getObjectIdentifier"));
- g_comment += g_usret;
-
- rtl::OUString oId;
- void * pObject = createObject(envDcp, s_callee);
- g_check = 1;
- g_env.get()->pExtEnv->getObjectIdentifier(g_env.get()->pExtEnv, &oId.pData, pObject);
- g_check = 0;
- g_env.get()->pExtEnv->releaseInterface(g_env.get()->pExtEnv, pObject);
-
- g_env.clear();
-
- return g_comment;
-}
-
-static rtl::OUString s_test_getRegisteredInterface(rtl::OUString const & envDcp)
-{
- g_env = uno::Environment(envDcp);
-
- g_comment = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test_getRegisteredInterface"));
- g_comment += g_usret;
-
- rtl::OUString id(RTL_CONSTASCII_USTRINGPARAM("blabla"));
-
-
- typelib_TypeDescriptionReference * type_XInterface =
- * typelib_static_type_getByTypeClass( typelib_TypeClass_INTERFACE );
-
- typelib_TypeDescription * pRet = NULL;
- typelib_typedescriptionreference_getDescription(&pRet, type_XInterface);
-
- void * pObject = createObject(envDcp, s_callee);
- g_env.get()->pExtEnv->registerInterface(g_env.get()->pExtEnv,
- &pObject,
- id.pData,
- (typelib_InterfaceTypeDescription *)pRet);
-
-
- g_check = 1;
- g_env.get()->pExtEnv->getRegisteredInterface(g_env.get()->pExtEnv, &pObject, id.pData,
- (typelib_InterfaceTypeDescription *)pRet);
- g_check = 0;
-
- g_env.get()->pExtEnv->releaseInterface(g_env.get()->pExtEnv, pObject);
- g_env.get()->pExtEnv->revokeInterface(g_env.get()->pExtEnv, pObject);
-
- g_env.clear();
-
- return g_comment;
-}
-
-static rtl::OUString s_test_getRegisteredInterfaces(rtl::OUString const & envDcp)
-{
- g_env = uno::Environment(envDcp);
-
- g_comment = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test_getRegisteredInterfaces"));
- g_comment += g_usret;
-
- rtl::OUString id(RTL_CONSTASCII_USTRINGPARAM("blabla"));
-
-
- typelib_TypeDescriptionReference * type_XInterface =
- * typelib_static_type_getByTypeClass( typelib_TypeClass_INTERFACE );
-
- typelib_TypeDescription * pRet = NULL;
- typelib_typedescriptionreference_getDescription(&pRet, type_XInterface);
-
- void * pObject = createObject(envDcp, s_callee);
- g_env.get()->pExtEnv->registerInterface(g_env.get()->pExtEnv,
- &pObject,
- id.pData,
- (typelib_InterfaceTypeDescription *)pRet);
-
- g_check = 1;
- void ** ppObject;
- sal_Int32 nCount;
- g_env.get()->pExtEnv->getRegisteredInterfaces(g_env.get()->pExtEnv, &ppObject, &nCount, rtl_allocateMemory);
- g_check = 0;
-
-
- if (nCount != 1)
- {
- g_comment += g_ustab;
- g_comment += g_ustab;
- g_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("more than one object registered -> FAILURE"));
- g_comment += g_usret;
- }
-
- if (*ppObject != pObject)
- {
- g_comment += g_ustab;
- g_comment += g_ustab;
- g_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("returned object is not the registerd one -> FAILURE"));
- g_comment += g_usret;
- }
-
- g_env.get()->pExtEnv->releaseInterface(g_env.get()->pExtEnv, *ppObject);
-
- g_env.get()->pExtEnv->revokeInterface(g_env.get()->pExtEnv, pObject);
- g_env.get()->pExtEnv->releaseInterface(g_env.get()->pExtEnv, pObject);
-
- rtl_freeMemory(ppObject);
-
- g_env.clear();
-
- return g_comment;
-}
-
-static rtl::OUString s_test_computeObjectIdentifier(rtl::OUString const & envDcp)
-{
- g_env = uno::Environment(envDcp);
-
- g_comment = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test_computeObjectIdentifier"));
- g_comment += g_usret;
-
- rtl::OUString oId;
- void * pObject = createObject(envDcp, s_callee);
- g_check = 1;
- g_env.get()->pExtEnv->computeObjectIdentifier(g_env.get()->pExtEnv, &oId.pData, pObject);
- g_check = 0;
- g_env.get()->pExtEnv->releaseInterface(g_env.get()->pExtEnv, pObject);
-
- g_env.clear();
-
- return g_comment;
-}
-
-static rtl::OUString s_test_acquire(rtl::OUString const & envDcp)
-{
- g_env = uno::Environment(envDcp);
-
- g_comment = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test_acquire"));
- g_comment += g_usret;
- void * pObject = createObject(envDcp, s_callee);
-
- g_check = 1;
- g_env.get()->pExtEnv->acquireInterface(g_env.get()->pExtEnv, pObject);
- g_check = 0;
-
- g_env.get()->pExtEnv->releaseInterface(g_env.get()->pExtEnv, pObject);
- g_env.get()->pExtEnv->releaseInterface(g_env.get()->pExtEnv, pObject);
- g_env.clear();
-
- return g_comment;
-}
-
-static rtl::OUString s_test_release(rtl::OUString const & envDcp)
-{
- g_env = uno::Environment(envDcp);
-
- g_comment = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test_release"));
- g_comment += g_usret;
- void * pObject = createObject(envDcp, s_callee);
-
- g_check = 1;
- g_env.get()->pExtEnv->releaseInterface(g_env.get()->pExtEnv, pObject);
- g_check = 0;
-
- g_env.clear();
-
- return g_comment;
-}
-
-
-rtl::OUString purpenv_test(rtl::OUString const & envDcp)
-{
- g_env = uno::Environment(envDcp);
-
- rtl::OUString result;
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("purpenv_test"));
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
-
- result += s_test_registerInterface(envDcp);
- result += g_usret;
-
- result += s_test_registerProxyInterface(envDcp);
- result += g_usret;
-
- result += s_test_revokeInterface(envDcp);
- result += g_usret;
-
- result += s_test_getObjectIdentifier(envDcp);
- result += g_usret;
-
- result += s_test_getRegisteredInterface(envDcp);
- result += g_usret;
-
- result += s_test_getRegisteredInterfaces(envDcp);
- result += g_usret;
-
- result += s_test_computeObjectIdentifier(envDcp);
- result += g_usret;
-
- result += s_test_acquire(envDcp);
- result += g_usret;
-
- result += s_test_release(envDcp);
- result += g_usret;
-
- return result;
-}
diff --git a/cppu/test/env_tester/register.test.cxx b/cppu/test/env_tester/register.test.cxx
deleted file mode 100644
index a98a14cac69b..000000000000
--- a/cppu/test/env_tester/register.test.cxx
+++ /dev/null
@@ -1,234 +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 <iostream>
-
-#include "sal/main.h"
-#include "rtl/ustring.hxx"
-#include "rtl/string.hxx"
-#include "rtl/alloc.h"
-#include "uno/environment.hxx"
-#include "uno/lbnames.h"
-
-using namespace com::sun::star;
-
-
-static rtl::OUString s_test_getEnvironment(rtl::OUString const & envDcp, void * pContext)
-{
- rtl::OUString result(RTL_CONSTASCII_USTRINGPARAM("\ts_test_getEnvironment("));
- result += envDcp;
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(", "));
- result += rtl::OUString::valueOf((long)pContext);
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(")\n"));
-
- uno::Environment env(envDcp, pContext);
-
- if (!env.is())
- {
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\tFAILURE: couldn't get env.\n"));
- return result;
- }
-
- if (rtl::OUString(env.getTypeName()).compareTo(envDcp))
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\tFAILURE: got environment has wrong descriptor.\n"));
-
- if (env.getContext() != pContext)
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\tFAILURE: got environment has wrong context.\n"));
-
-
- return result;
-}
-
-static rtl::OUString s_test_regetEnvironment(rtl::OUString const & envDcp1,
- rtl::OUString const & envDcp2 ,
- void * pContext1, void * pContext2)
-{
- rtl::OUString result(RTL_CONSTASCII_USTRINGPARAM("\ts_test_regetEnvironment("));
- result += envDcp1;
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(", "));
- result += envDcp2;
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(", "));
- result += rtl::OUString::valueOf((long)pContext1);
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(", " ));
- result += rtl::OUString::valueOf((long)pContext2);
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(")\n"));
-
- uno::Environment env1(envDcp1, pContext1);
- uno::Environment env2(envDcp2, pContext2);
-
- if (! ((pContext1 == pContext2 && envDcp1 == envDcp2) ? env1.get() == env2.get() : env1.get() != env2.get())
- && env1.is() && env2.is())
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\tFAILURE:\n"));
-
- return result;
-}
-
-static rtl::OUString s_test_regetEnvironment(rtl::OUString const & envDcp, void * pContext)
-{
- return s_test_regetEnvironment(envDcp, envDcp, pContext, pContext);
-}
-
-// static rtl::OUString s_test_regetEnvironment(rtl::OUString const & envDcp, void * pContext1, void * pContext2)
-// {
-// return s_test_regetEnvironment(envDcp, envDcp, pContext1, pContext2);
-// }
-
-static rtl::OUString s_test_regetEnvironment(rtl::OUString const & envDcp1, rtl::OUString const & envDcp2, void * pContext)
-{
- return s_test_regetEnvironment(envDcp1, envDcp2, pContext, pContext);
-}
-
-
-static int s_is_registered(rtl::OUString const & envDcp, void * pContext)
-{
- int result = 0;
-
- uno_Environment ** ppEnvs = NULL;
- sal_Int32 nLen = 0;
-
- uno_getRegisteredEnvironments(&ppEnvs, &nLen, rtl_allocateMemory, envDcp.pData);
- for (sal_Int32 i = 0; !result && i < nLen; ++ i)
- {
- result = result || (ppEnvs[i]->pContext == pContext && !rtl::OUString(ppEnvs[i]->pTypeName).compareTo(envDcp));
-
- ppEnvs[i]->release(ppEnvs[i]);
- }
- rtl_freeMemory(ppEnvs);
-
- return result;
-}
-
-static rtl::OUString s_test_uno_getRegisteredEnvironments_registered(rtl::OUString const & envDcp, void * pContext)
-{
- rtl::OUString result(RTL_CONSTASCII_USTRINGPARAM("\ts_test_uno_getRegisteredEnvironments_registered("));
- result += envDcp;
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(", "));
- result += rtl::OUString::valueOf((long)pContext);
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(")\n"));
-
- uno::Environment env(envDcp, pContext);
-
- if (!env.is() || !s_is_registered(envDcp, pContext))
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\tFAILURE:\n"));
-
- return result;
-}
-
-static rtl::OUString s_test_uno_getRegisteredEnvironments_notRegistered(rtl::OUString const & envDcp, void * pContext)
-{
- rtl::OUString result(RTL_CONSTASCII_USTRINGPARAM("\ts_test_uno_getRegisteredEnvironments_notRegistered("));
- result += envDcp;
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(", "));
- result += rtl::OUString::valueOf((long)pContext);
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(")\n"));
-
- uno::Environment env(envDcp, pContext);
-
- if (!env.is() && !s_is_registered(envDcp, pContext))
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\tFAILURE:\n"));
-
- return result;
-}
-
-
-static rtl::OUString s_test_uno_createEnvironment(rtl::OUString const & envDcp, void * pContext)
-{
- rtl::OUString result(RTL_CONSTASCII_USTRINGPARAM("\ts_test_uno_createEnvironment("));
- result += envDcp;
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(", "));
- result += rtl::OUString::valueOf((long)pContext);
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(")\n"));
-
- uno_Environment * pEnv = NULL;
- uno_createEnvironment(&pEnv, envDcp.pData, pContext);
-
- if (!pEnv && !s_is_registered(envDcp, pContext))
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\tFAILURE:\n"));
-
- if (pEnv)
- pEnv->release(pEnv);
-
- return result;
-}
-
-
-rtl::OUString register_test(rtl::OUString const & envDcp)
-{
- rtl::OUString env_A(envDcp);
- env_A += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":purpA"));
-
- rtl::OUString env_B(envDcp);
- env_B += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":purpB"));
-
- rtl::OUString result;
-
- result = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("registration_test"));
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
-
- result += s_test_getEnvironment(envDcp, NULL);
- result += s_test_getEnvironment(env_A, NULL);
- result += s_test_getEnvironment(env_B, NULL);
-
- result += s_test_regetEnvironment(envDcp, NULL);
- result += s_test_regetEnvironment(envDcp, (void *)0x1);
- result += s_test_regetEnvironment(env_A, NULL) ;
- result += s_test_regetEnvironment(env_A, (void *)0x1);
- result += s_test_regetEnvironment(env_B, NULL) ;
- result += s_test_regetEnvironment(env_B, (void *)0x1);
-
- result += s_test_regetEnvironment(envDcp, env_A, (void *)NULL);
- result += s_test_regetEnvironment(envDcp, env_A, (void *)0x1) ;
- result += s_test_regetEnvironment(envDcp, env_B, (void *)NULL);
- result += s_test_regetEnvironment(envDcp, env_B, (void *)0x1) ;
- result += s_test_regetEnvironment(env_A, env_B, (void *)NULL);
- result += s_test_regetEnvironment(env_A, env_B, (void *)0x1) ;
-
- result += s_test_regetEnvironment(env_A, env_B, (void *)NULL, (void *)0x1);
-
- result += s_test_uno_getRegisteredEnvironments_registered(envDcp, (void *)NULL);
- result += s_test_uno_getRegisteredEnvironments_registered(envDcp, (void *)0x1) ;
- result += s_test_uno_getRegisteredEnvironments_registered(env_A, (void *)NULL);
- result += s_test_uno_getRegisteredEnvironments_registered(env_A, (void *)0x1) ;
- result += s_test_uno_getRegisteredEnvironments_registered(env_B, (void *)NULL);
- result += s_test_uno_getRegisteredEnvironments_registered(env_B, (void *)0x1) ;
-
- result += s_test_uno_getRegisteredEnvironments_notRegistered(envDcp, NULL) ;
- result += s_test_uno_getRegisteredEnvironments_notRegistered(envDcp, (void *)0x1);
- result += s_test_uno_getRegisteredEnvironments_notRegistered(env_A, NULL) ;
- result += s_test_uno_getRegisteredEnvironments_notRegistered(env_A, (void *)0x1);
- result += s_test_uno_getRegisteredEnvironments_notRegistered(env_B, NULL) ;
- result += s_test_uno_getRegisteredEnvironments_notRegistered(env_B, (void *)0x1);
-
- result += s_test_uno_createEnvironment(envDcp, NULL) ;
- result += s_test_uno_createEnvironment(envDcp, (void *)0x1);
- result += s_test_uno_createEnvironment(env_A, NULL) ;
- result += s_test_uno_createEnvironment(env_A, (void *)0x1);
- result += s_test_uno_createEnvironment(env_B, NULL) ;
- result += s_test_uno_createEnvironment(env_B, (void *)0x1);
-
- return result;
-}
diff --git a/cppu/test/language_binding.idl b/cppu/test/language_binding.idl
deleted file mode 100644
index 2a708ad56ee6..000000000000
--- a/cppu/test/language_binding.idl
+++ /dev/null
@@ -1,239 +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.
- *
- ************************************************************************/
-#ifndef _TEST_LANGUAGE_BINDING_IDL_
-#define _TEST_LANGUAGE_BINDING_IDL_
-
-#include <com/sun/star/uno/XInterface.idl>
-#include <com/sun/star/lang/IllegalArgumentException.idl>
-
-module test
-{
-
-enum TestEnum
-{
- TEST,
- ONE,
- TWO,
- CHECK,
- LOLA,
- PALOO,
- ZA
-};
-
-/**
- * simple c++ types
- */
-struct TestSimple
-{
- boolean Bool;
- char Char;
- byte Byte;
- short Short;
- unsigned short UShort;
- long Long;
- unsigned long ULong;
- hyper Hyper;
- unsigned hyper UHyper;
- float Float;
- double Double;
- test::TestEnum Enum;
-};
-/**
- * equal to max size returned in registers on x86_64
- */
-struct SmallStruct
-{
- hyper a;
- hyper b;
-};
-/**
- * equal to max size returned in registers on ia64
- */
-struct MediumStruct
-{
- hyper a;
- hyper b;
- hyper c;
- hyper d;
-};
-/**
- * bigger than max size returned in registers on ia64
- */
-struct BigStruct
-{
- hyper a;
- hyper b;
- hyper c;
- hyper d;
- hyper e;
- hyper f;
- hyper g;
- hyper h;
-};
-/**
- * all floats, ia64 claims to handle them specially
- */
-struct AllFloats
-{
- float a;
- float b;
- float c;
- float d;
-};
-
-/**
- * complex c++ types
- */
-struct TestElement : test::TestSimple
-{
- string String;
- com::sun::star::uno::XInterface Interface;
- any Any;
-};
-struct TestDataElements : test::TestElement
-{
- sequence<test::TestElement > Sequence;
-};
-
-typedef TestDataElements TestData;
-
-/**
- * Monster test interface to test language binding calls.
- *
- * @author Daniel Boelzle
- */
-interface XLBTestBase : com::sun::star::uno::XInterface
-{
- /**
- * in parameter test, tests by calls reference also (complex types)
- */
- [oneway] void setValues( [in] boolean bBool, [in] char cChar, [in] byte nByte,
- [in] short nShort, [in] unsigned short nUShort,
- [in] long nLong, [in] unsigned long nULong,
- [in] hyper nHyper, [in] unsigned hyper nUHyper,
- [in] float fFloat, [in] double fDouble,
- [in] test::TestEnum eEnum, [in] string aString,
- [in] com::sun::star::uno::XInterface xInterface, [in] any aAny,
- [in] sequence<test::TestElement > aSequence,
- [in] test::TestData aStruct );
- /**
- * inout parameter test
- */
- test::TestData setValues2( [inout] boolean bBool, [inout] char cChar, [inout] byte nByte,
- [inout] short nShort, [inout] unsigned short nUShort,
- [inout] long nLong, [inout] unsigned long nULong,
- [inout] hyper nHyper, [inout] unsigned hyper nUHyper,
- [inout] float fFloat, [inout] double fDouble,
- [inout] test::TestEnum eEnum, [inout] string aString,
- [inout] com::sun::star::uno::XInterface xInterface, [inout] any aAny,
- [inout] sequence<test::TestElement > aSequence,
- [inout] test::TestData aStruct );
-
- /**
- * out parameter test
- */
- test::TestData getValues( [out] boolean bBool, [out] char cChar, [out] byte nByte,
- [out] short nShort, [out] unsigned short nUShort,
- [out] long nLong, [out] unsigned long nULong,
- [out] hyper nHyper, [out] unsigned hyper nUHyper,
- [out] float fFloat, [out] double fDouble,
- [out] test::TestEnum eEnum, [out] string aString,
- [out] com::sun::star::uno::XInterface xInterface, [out] any aAny,
- [out] sequence<test::TestElement > aSequence,
- [out] test::TestData aStruct );
-
- /**
- * register return test 1
- */
- test::SmallStruct echoSmallStruct( [in] test::SmallStruct aStruct );
-
- /**
- * register return test 2
- */
- test::MediumStruct echoMediumStruct( [in] test::MediumStruct aStruct );
-
- /**
- * register return test 3
- */
- test::BigStruct echoBigStruct( [in] test::BigStruct aStruct );
-
- /**
- * register return test 4
- */
- test::AllFloats echoAllFloats( [in] test::AllFloats aStruct );
-
- [attribute] boolean Bool;
- [attribute] byte Byte;
- [attribute] char Char;
- [attribute] short Short;
- [attribute] unsigned short UShort;
- [attribute] long Long;
- [attribute] unsigned long ULong;
- [attribute] hyper Hyper;
- [attribute] unsigned hyper UHyper;
- [attribute] float Float;
- [attribute] double Double;
- [attribute] test::TestEnum Enum;
- [attribute] string String;
- [attribute] com::sun::star::uno::XInterface Interface;
- [attribute] any Any;
- [attribute] sequence<test::TestElement > Sequence;
- [attribute] test::TestData Struct;
-};
-
-
-/**
- * Inherting from monster; adds raiseException().
- *
- * @author Daniel Boelzle
- */
-interface XLanguageBindingTest : test::XLBTestBase
-{
- /**
- * params are there only for dummy, to test if all temp out params will be released.
- */
- test::TestData raiseException( [out] boolean bBool, [out] char cChar, [out] byte nByte,
- [out] short nShort, [out] unsigned short nUShort,
- [out] long nLong, [out] unsigned long nULong,
- [out] hyper nHyper, [out] unsigned hyper nUHyper,
- [out] float fFloat, [out] double fDouble,
- [out] test::TestEnum eEnum, [out] string aString,
- [out] com::sun::star::uno::XInterface xInterface, [out] any aAny,
- [out] sequence<test::TestElement > aSequence,
- [out] test::TestData aStruct )
- raises( com::sun::star::lang::IllegalArgumentException );
-
- /**
- * raises runtime exception
- */
- [attribute] long RuntimeException;
-};
-
-}; // test
-
-
-#endif
diff --git a/cppu/test/makefile.mk b/cppu/test/makefile.mk
deleted file mode 100644
index 8eecf6bbf452..000000000000
--- a/cppu/test/makefile.mk
+++ /dev/null
@@ -1,156 +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=testcppu
-TARGET= testcppu
-LIBTARGET=NO
-ENABLE_EXCEPTIONS=TRUE
-NO_BSYMBOLIC=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-UNOUCRDEP=$(SOLARBINDIR)$/udkapi.rdb
-UNOUCRRDB=$(SOLARBINDIR)$/udkapi.rdb
-UNOUCROUT=$(OUT)$/inc$/test
-INCPRE+=$(OUT)$/inc$/test
-
-OBJFILES= \
- $(OBJ)$/testcppu.obj \
- $(OBJ)$/test_di.obj \
- $(OBJ)$/test_Cincludes.obj
-# $(OBJ)$/test_cuno.obj \
-# $(OBJ)$/test_sec.obj \
-
-APP1TARGET= testcppu
-APP1OBJS= \
- $(OBJ)$/testcppu.obj \
- $(OBJ)$/test_di.obj
-# $(OBJ)$/test_cuno.obj
-# $(OBJ)$/test_sec.obj
-
-APP1STDLIBS+= \
- $(CPPULIB) \
- $(CPPUHELPERLIB) \
- $(SALHELPERLIB) \
- $(SALLIB)
-
-APP1DEF=$(MISC)$/$(APP1TARGET).def
-
-ALLIDLFILES:= \
- cpputest.idl \
- language_binding.idl \
- alignment.idl
-
-
-APP2TARGET := Mapping.test
-APP2OBJS := $(OBJ)$/Mapping.test.obj
-APP2STDLIBS := $(CPPULIB) $(SALLIB)
-
-APP3TARGET := Environment.test
-APP3OBJS := $(OBJ)$/Environment.test.obj
-APP3STDLIBS := $(CPPULIB) $(SALLIB)
-
-APP4TARGET := IdentityMapping.test
-APP4OBJS := $(OBJ)$/IdentityMapping.test.obj
-APP4STDLIBS := $(CPPULIB) $(SALLIB)
-
-
-
-# --- Targets ------------------------------------------------------
-
-.IF "$(depend)" == ""
-ALL : $(BIN)$/testcppu.rdb unoheader ALLTAR
-.ELSE
-ALL: ALLDEP
-.ENDIF
-
-.IF "$(COM)" == "MSC"
-.IF "$(debug)" != ""
-CFLAGS += /Ob0
-.ENDIF
-.ENDIF
-
-.IF "$(extra_mapping)" != ""
-CFLAGS += -DEXTRA_MAPPING
-.ENDIF
-
-.INCLUDE : target.mk
-
-CPPUMAKERFLAGS = -L
-
-TYPES:= -Ttest.XLanguageBindingTest \
- -Ttest.XSimpleInterface \
- -Ttest.Test1 \
- -Ttest.Test2 \
- -Ttest.TdTest1 \
- -Ttest.Test3 \
- -Ttest.Base \
- -Ttest.Base1 \
- -Ttest.Base2 \
- -Tcom.sun.star.lang.XMultiServiceFactory \
- -Tcom.sun.star.lang.XSingleServiceFactory \
- -Tcom.sun.star.lang.XInitialization \
- -Tcom.sun.star.lang.XServiceInfo \
- -Tcom.sun.star.lang.XEventListener \
- -Tcom.sun.star.lang.XTypeProvider \
- -Tcom.sun.star.lang.DisposedException \
- -Tcom.sun.star.registry.XSimpleRegistry \
- -Tcom.sun.star.registry.XRegistryKey \
- -Tcom.sun.star.loader.XImplementationLoader \
- -Tcom.sun.star.registry.XImplementationRegistration \
- -Tcom.sun.star.lang.XComponent \
- -Tcom.sun.star.uno.XComponentContext \
- -Tcom.sun.star.container.XSet \
- -Tcom.sun.star.container.XNameContainer \
- -Tcom.sun.star.uno.TypeClass \
- -Tcom.sun.star.uno.XReference \
- -Tcom.sun.star.uno.XAdapter \
- -Tcom.sun.star.uno.XAggregation \
- -Tcom.sun.star.uno.XWeak \
- -Tcom.sun.star.beans.XPropertySet \
- -Tcom.sun.star.reflection.XIdlClassProvider \
- -Tcom.sun.star.container.XHierarchicalNameAccess \
- -Tcom.sun.star.uno.XCurrentContext
-
-$(BIN)$/testcppu.rdb: $(ALLIDLFILES)
- idlc -I$(PRJ) -I$(SOLARIDLDIR) -O$(BIN) $?
- regmerge $@ /UCR $(BIN)$/{$(?:f:s/.idl/.urd/)}
- regmerge $@ / $(UNOUCRRDB)
- touch $@
-
-# regcomp -register -r $@ -c javaloader.dll
-# regcomp -register -r $@ -c jen.dll
-
-unoheader: $(BIN)$/testcppu.rdb
- cppumaker $(CPPUMAKERFLAGS) -BUCR -O$(UNOUCROUT) $(TYPES) $(BIN)$/testcppu.rdb
-# cunomaker -BUCR -O$(UNOUCROUT) $(TYPES) $(BIN)$/testcppu.rdb
-
diff --git a/cppu/test/mapping_tester/Mapping.tester.hxx b/cppu/test/mapping_tester/Mapping.tester.hxx
deleted file mode 100644
index 6a2573a105f8..000000000000
--- a/cppu/test/mapping_tester/Mapping.tester.hxx
+++ /dev/null
@@ -1,75 +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.
- *
- ************************************************************************/
-
-#ifndef INCLUDED_Mapping_tester_hxx
-#define INCLUDED_Mapping_tester_hxx
-
-
-#include "../ObjectFactory/callee.hxx"
-
-
-#ifdef CPPU_TEST_MAPPING_TESTER_TESTS_IMPL
-# define CPPU_TEST_MAPPING_TESTER_TESTS_EXPORT SAL_DLLPUBLIC_EXPORT
-
-#elif defined(CPPU_TEST_MAPPING_TESTER_TESTS_LIB)
-# define CPPU_TEST_MAPPING_TESTER_TESTS_EXPORT extern
-
-#elif defined(__GNUC__) && defined(HAVE_GCC_VISIBILITY_FEATURE)
-# define CPPU_TEST_MAPPING_TESTER_TESTS_EXPORT extern __attribute__ ((weak))
-
-#elif defined(__SUNPRO_CC)
-# define CPPU_TEST_MAPPING_TESTER_TESTS_EXPORT extern
- extern rtl::OUString g_from_envDcp;
- extern rtl::OUString g_to_envDcp;
- extern rtl::OUString g_ref;
- extern rtl::OUString g_custom;
- extern rtl::OUString g_result;
- extern int g_check;
-# pragma weak g_from_envDcp
-# pragma weak g_to_envDcp
-# pragma weak g_ref
-# pragma weak g_custom
-# pragma weak g_result
-# pragma weak g_check
-
-#else
-# define CPPU_TEST_MAPPING_TESTER_TESTS_EXPORT SAL_DLLPUBLIC_IMPORT
-
-#endif
-
-CPPU_TEST_MAPPING_TESTER_TESTS_EXPORT rtl::OUString g_from_envDcp;
-CPPU_TEST_MAPPING_TESTER_TESTS_EXPORT rtl::OUString g_to_envDcp;
-CPPU_TEST_MAPPING_TESTER_TESTS_EXPORT rtl::OUString g_ref;
-CPPU_TEST_MAPPING_TESTER_TESTS_EXPORT rtl::OUString g_custom;
-CPPU_TEST_MAPPING_TESTER_TESTS_EXPORT rtl::OUString g_result;
-CPPU_TEST_MAPPING_TESTER_TESTS_EXPORT int g_check;
-
-
-#define D_CALLEE extern "C" void CALLEE(rtl_uString * pMethod_name)
-
-
-#endif
diff --git a/cppu/test/mapping_tester/mapping.tester.cxx b/cppu/test/mapping_tester/mapping.tester.cxx
deleted file mode 100644
index bed213daefba..000000000000
--- a/cppu/test/mapping_tester/mapping.tester.cxx
+++ /dev/null
@@ -1,456 +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.
- *
- ************************************************************************/
-
-#define CPPU_TEST_MAPPING_TESTER_TESTS_IMPL
-
-
-#include <iostream>
-
-#include "sal/main.h"
-#include "osl/module.hxx"
-#include "rtl/ustring.hxx"
-#include "uno/environment.hxx"
-#include "uno/mapping.hxx"
-
-#include "../ObjectFactory/ObjectFactory.hxx"
-#include "Mapping.tester.hxx"
-
-using namespace ::com::sun::star;
-
-
-
-static uno::Mapping s_getMapping(rtl::OUString const & from_envDcp,
- rtl::OUString const & to_envDcp,
- uno::Environment * pSourceEnv,
- uno::Environment * pTargetEnv)
-{
- uno::Environment sourceEnv(from_envDcp);
- uno::Environment targetEnv(to_envDcp);
-
- uno::Mapping mapping(sourceEnv, targetEnv);
-
- if (pSourceEnv)
- *pSourceEnv = sourceEnv;
-
- if (pTargetEnv)
- *pTargetEnv = targetEnv;
-
- return mapping;
-}
-
-static void * s_mapObject(rtl::OUString const & from_envDcp,
- rtl::OUString const & to_envDcp,
- void * object,
- uno::Environment * pSourceEnv,
- uno::Environment * pTargetEnv)
-{
- uno::Mapping mapping(s_getMapping(from_envDcp, to_envDcp, pSourceEnv, pTargetEnv));
-
- void * mapped_object = NULL;
-
- typelib_TypeDescriptionReference * type_XInterface =
- * typelib_static_type_getByTypeClass( typelib_TypeClass_INTERFACE );
-
- typelib_InterfaceTypeDescription * pTXInterfaceDescr = 0;
-
- TYPELIB_DANGER_GET( (typelib_TypeDescription **) &pTXInterfaceDescr, type_XInterface );
- mapping.mapInterface(&mapped_object, object, pTXInterfaceDescr);
- TYPELIB_DANGER_RELEASE( (typelib_TypeDescription *) pTXInterfaceDescr );
-
- return mapped_object;
-}
-
-
-static rtl::OUString s_test_regetMapping(void)
-{
- g_result = rtl::OUString();
- g_custom = rtl::OUString();
-
- rtl::OUString result(RTL_CONSTASCII_USTRINGPARAM("\tmapping reget test --> "));
-
- uno::Mapping mapping1(g_from_envDcp, g_to_envDcp);
- uno::Mapping mapping2(g_from_envDcp, g_to_envDcp);
-
- if (mapping2.get() == mapping1.get())
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OKAY\n"));
-
- else
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FAILED\n"));
-
- result += g_result;
-
- return result;
-}
-
-static rtl::OUString s_test_mapObject(Callee * pCallee)
-{
- g_result = rtl::OUString();
- g_custom = rtl::OUString();
-
- rtl::OUString result(RTL_CONSTASCII_USTRINGPARAM("\tobject map test --> "));
-
- void * pObject = createObject(g_to_envDcp, pCallee);
-
- uno::Environment sourceEnv;
- uno::Environment targetEnv;
- void * mapped_object = s_mapObject(g_to_envDcp, g_from_envDcp, pObject, &sourceEnv, &targetEnv);
- sourceEnv.get()->pExtEnv->releaseInterface(sourceEnv.get()->pExtEnv, pObject);
- sourceEnv.clear();
-
- if (mapped_object)
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OKAY\n"));
-
- else
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FAILED\n"));
-
- targetEnv.get()->pExtEnv->releaseInterface(targetEnv.get()->pExtEnv, mapped_object);
-
- result += g_result;
-
- return result;
-}
-
-static rtl::OUString s_test_remapObject(Callee * pCallee)
-{
- g_result = rtl::OUString();
- g_custom = rtl::OUString();
-
- rtl::OUString result(RTL_CONSTASCII_USTRINGPARAM("\tobject remap test --> "));
-
- void * pObject = createObject(g_to_envDcp, pCallee);
-
- uno::Environment sourceEnv;
- uno::Environment targetEnv;
- void * mapped_object1 = s_mapObject(g_to_envDcp, g_from_envDcp, pObject, &sourceEnv, &targetEnv);
- void * mapped_object2 = s_mapObject(g_to_envDcp, g_from_envDcp, pObject, NULL, NULL);
- sourceEnv.get()->pExtEnv->releaseInterface(sourceEnv.get()->pExtEnv, pObject);
- sourceEnv.clear();
-
- if (mapped_object2 == mapped_object1)
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OKAY\n"));
-
- else
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FAILED\n"));
-
- targetEnv.get()->pExtEnv->releaseInterface(targetEnv.get()->pExtEnv, mapped_object1);
- targetEnv.get()->pExtEnv->releaseInterface(targetEnv.get()->pExtEnv, mapped_object2);
-
- result += g_result;
-
- return result;
-}
-
-static rtl::OUString s_test_mapBackObject(Callee * pCallee)
-{
- g_result = rtl::OUString();
- g_custom = rtl::OUString();
-
- rtl::OUString result(RTL_CONSTASCII_USTRINGPARAM("\tobject map back test --> "));
-
- void * pObject = createObject(g_to_envDcp, pCallee);
-
- uno::Environment to_sourceEnv;
- uno::Environment to_targetEnv;
- void * mapped_object = s_mapObject(g_to_envDcp,
- g_from_envDcp,
- pObject,
- &to_sourceEnv,
- &to_targetEnv);
-
- uno::Environment back_sourceEnv;
- uno::Environment back_targetEnv;
- void * mapped_back_object = s_mapObject(g_from_envDcp,
- g_to_envDcp,
- mapped_object,
- &back_sourceEnv,
- &back_targetEnv);
-
- if (back_targetEnv.get() != to_sourceEnv.get())
- abort();
-
- if (back_sourceEnv.get() != to_targetEnv.get())
- abort();
-
- if (pObject == mapped_back_object)
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OKAY\n"));
-
- else
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FAILED\n"));
-
- to_sourceEnv .get()->pExtEnv->releaseInterface(to_sourceEnv .get()->pExtEnv, pObject);
- to_targetEnv .get()->pExtEnv->releaseInterface(to_targetEnv .get()->pExtEnv, mapped_object);
- back_targetEnv.get()->pExtEnv->releaseInterface(back_targetEnv.get()->pExtEnv, mapped_back_object);
-
- result += g_result;
-
- return result;
-}
-
-static rtl::OUString s_test_objectRegistered(Callee * pCallee)
-{
- g_result = rtl::OUString();
- g_custom = rtl::OUString();
-
- rtl::OUString result(RTL_CONSTASCII_USTRINGPARAM("\tobject registered test --> "));
-
- void * pObject = createObject(g_to_envDcp, pCallee);
-
- uno::Environment sourceEnv;
- uno::Environment targetEnv;
- void * mapped_object = s_mapObject(g_to_envDcp,
- g_from_envDcp,
- pObject,
- &sourceEnv,
- &targetEnv);
-
- if (sourceEnv.get() == targetEnv.get())
- {
- if (mapped_object != pObject)
- abort();
- }
- else
- {
- typelib_TypeDescriptionReference * type_XInterface =
- * typelib_static_type_getByTypeClass( typelib_TypeClass_INTERFACE );
-
- typelib_InterfaceTypeDescription * pTXInterfaceDescr = 0;
- TYPELIB_DANGER_GET( (typelib_TypeDescription **) &pTXInterfaceDescr, type_XInterface );
-
- rtl_uString * pOId = 0;
- targetEnv.get()->pExtEnv->getObjectIdentifier(targetEnv.get()->pExtEnv, &pOId, mapped_object);
-
- void * pOut = NULL;
-
- targetEnv.get()->pExtEnv->getRegisteredInterface(targetEnv.get()->pExtEnv,
- &pOut,
- pOId,
- pTXInterfaceDescr);
-
- TYPELIB_DANGER_RELEASE( (typelib_TypeDescription *) pTXInterfaceDescr );
-
- if (mapped_object == pOut)
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OKAY\n"));
-
- else
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FAILED\n"));
-
-
- targetEnv.get()->pExtEnv->releaseInterface(targetEnv.get()->pExtEnv, pOut);
- }
-
- sourceEnv.get()->pExtEnv->releaseInterface(sourceEnv.get()->pExtEnv, pObject);
- targetEnv.get()->pExtEnv->releaseInterface(targetEnv.get()->pExtEnv, mapped_object);
-
- result += g_result;
-
- return result;
-}
-
-
-// static void s_test_mappingNotEqual(char const * source1Name, char const * dest1Name,
-// char const * source2Name, char const * dest2Name)
-// {
-// rtl::OUString source1EnvName(source1Name, rtl_str_getLength(source1Name), RTL_TEXTENCODING_ASCII_US);
-// rtl::OUString dest1EnvName (dest1Name, rtl_str_getLength(dest1Name), RTL_TEXTENCODING_ASCII_US);
-
-// rtl::OUString source2EnvName(source2Name, rtl_str_getLength(source2Name), RTL_TEXTENCODING_ASCII_US);
-// rtl::OUString dest2EnvName (dest2Name, rtl_str_getLength(dest2Name), RTL_TEXTENCODING_ASCII_US);
-
-// uno::Mapping mapping1(s_getMapping(source1EnvName, dest1EnvName, NULL, NULL));
-// uno::Mapping mapping2(s_getMapping(source2EnvName, dest2EnvName, NULL, NULL));
-
-// if (mapping2.get() == mapping1.get())
-// {
-// // fprintf(stderr, "***************** can not reget mapping\n");
-// abort();
-// }
-// }
-
-static rtl::OUString s_test_call(Callee * pCallee)
-{
- g_result = rtl::OUString();
- g_custom = rtl::OUString();
-
- rtl::OUString result(RTL_CONSTASCII_USTRINGPARAM("\tobject call test --> "));
-
- void * pObject = createObject(g_to_envDcp, pCallee);
-
- uno::Environment sourceEnv;
- uno::Environment targetEnv;
- void * mapped_object = s_mapObject(g_to_envDcp, g_from_envDcp, pObject, &sourceEnv, &targetEnv);
- sourceEnv.get()->pExtEnv->releaseInterface(sourceEnv.get()->pExtEnv, pObject);
- sourceEnv.clear();
-
- g_check = 1;
- callObject(g_from_envDcp, mapped_object);
- g_check = 0;
-
- targetEnv.get()->pExtEnv->releaseInterface(targetEnv.get()->pExtEnv, mapped_object);
-
- result += g_result;
-
- return result;
-}
-
-
-static rtl::OString test_mapping_a(char const * pfrom_envDcp,
- char const * pto_envDcp,
- Callee * pCallee,
- char const * pRef)
-{
- g_from_envDcp = rtl::OUString(pfrom_envDcp, rtl_str_getLength(pfrom_envDcp), RTL_TEXTENCODING_ASCII_US);
- g_to_envDcp = rtl::OUString(pto_envDcp, rtl_str_getLength(pto_envDcp), RTL_TEXTENCODING_ASCII_US);
- g_ref = rtl::OUString(pRef, rtl_str_getLength(pRef), RTL_TEXTENCODING_ASCII_US);
-
- rtl::OUString result;
-
- g_check = 0;
-
- result += s_test_regetMapping ();
- result += s_test_objectRegistered(pCallee);
- result += s_test_remapObject (pCallee);
- result += s_test_mapBackObject (pCallee);
- result += s_test_mapObject (pCallee);
- result += s_test_call (pCallee);
-
- return rtl::OUStringToOString(result, RTL_TEXTENCODING_ASCII_US);
-}
-
-
-static rtl::OString s_replaceCPP(rtl::OString const & str)
-{
- rtl::OString result;
-
- sal_Int32 index_old = 0;
- sal_Int32 index = str.indexOf("CPP", index_old);
- while (index != -1)
- {
- result += str.copy(index_old, index - index_old);
- result += rtl::OString(CPPU_STRINGIFY(CPPU_ENV));
-
- index_old = index + 3;
- index = str.indexOf("CPP", index_old);
- }
- result += str.copy(index_old);
-
- return result;
-}
-
-
-extern "C" { static void s_dummy(rtl_uString * pMethod_name)
-{
- rtl::OUString result(RTL_CONSTASCII_USTRINGPARAM("\t\tmethod: "));
- result += rtl::OUString(pMethod_name);
- result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" -dummy-\n"));
-
- g_result = result;
-}}
-
-static Callee * s_pCustomCallee = s_dummy;
-
-extern "C" { static void s_callee(rtl_uString * pMethod_name)
-{
- if (rtl::OUString(pMethod_name).equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XInterface::queryInterface"))))
- {
- rtl::OUString tmp;
-
- if (!g_from_envDcp.match(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO))))
- {
- tmp += g_from_envDcp;
- tmp += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-->"));
- }
-
- tmp += g_custom;
-
- if (!g_to_envDcp.match(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO))))
- {
- tmp += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-->"));
- tmp += g_to_envDcp;
- }
-
- g_custom = tmp;
- s_pCustomCallee(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XInterface::queryInterface")).pData);
- }
- else
- s_pCustomCallee(pMethod_name);
-}}
-
-
-SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
-{
- int ret = 0;
- rtl::OString message;
-
- if (argc == 3 || argc == 6)
- {
- rtl::OString from_envDcp(argv[1]);
- from_envDcp = s_replaceCPP(from_envDcp);
-
- rtl::OString to_envDcp(argv[2]);
- to_envDcp = s_replaceCPP(to_envDcp);
-
- osl::Module module;
-
- rtl::OString ref;
- if (argc == 6 && rtl::OString(argv[3]).equals(rtl::OString("-s")))
- {
- rtl::OUString libName(argv[4], rtl_str_getLength(argv[4]), RTL_TEXTENCODING_ASCII_US);
- libName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SAL_DLLEXTENSION));
- module.load(libName);
-
- s_pCustomCallee = (Callee *)module.getFunctionSymbol(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CALLEE")));
- if (!s_pCustomCallee)
- abort();
-
- ref = s_replaceCPP(rtl::OString(argv[5]));
- }
-
- message += rtl::OString("TESTING: ");
- message += from_envDcp;
- message += rtl::OString("-->");
- message += to_envDcp;
- message += rtl::OString("\n");
-
- message += test_mapping_a(from_envDcp.getStr(), to_envDcp.getStr(), s_callee, ref);
-
- if (message.indexOf(rtl::OString("FAILED")) == -1)
- message += rtl::OString("TESTS PASSED\n");
-
- else
- {
- message += rtl::OString("TESTS _NOT_ PASSED\n");
- ret = -1;
- }
- }
- else
- message = "Usage: <source env. dcp> <destination env. dcp> [-s testfun <ref. string>]\n";
-
-
- std::cout << message.getStr();
-
- return ret;
-}
diff --git a/cppu/test/purpenvhelper/TestEnv.cxx b/cppu/test/purpenvhelper/TestEnv.cxx
deleted file mode 100644
index 65a91230dd03..000000000000
--- a/cppu/test/purpenvhelper/TestEnv.cxx
+++ /dev/null
@@ -1,129 +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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_cppu.hxx"
-
-
-#include "cppu/EnvDcp.hxx"
-
-#include "cppu/helper/purpenv/Environment.hxx"
-#include "cppu/helper/purpenv/Mapping.hxx"
-
-
-
-#define LOG_LIFECYCLE_TestEnv
-#ifdef LOG_LIFECYCLE_TestEnv
-# include <iostream>
-# define LOG_LIFECYCLE_TestEnv_emit(x) x
-
-#else
-# define LOG_LIFECYCLE_TestEnv_emit(x)
-
-#endif
-
-
-class SAL_DLLPRIVATE TestEnv : public cppu::Enterable
-{
- int m_inCount;
-
- virtual ~TestEnv(void);
-
-public:
- explicit TestEnv(void);
-
-protected:
- virtual void v_enter(void);
- virtual void v_leave(void);
-
- virtual void v_callInto_v(uno_EnvCallee * pCallee, va_list * pParam);
- virtual void v_callOut_v (uno_EnvCallee * pCallee, va_list * pParam);
-
- virtual int v_isValid (rtl::OUString * pReason);
-};
-
-TestEnv::TestEnv(void)
- : m_inCount(0)
-{
- LOG_LIFECYCLE_TestEnv_emit(fprintf(stderr, "LIFE: %s -> %p\n", "TestEnv::TestEnv(...)", this));
-}
-
-TestEnv::~TestEnv(void)
-{
- LOG_LIFECYCLE_TestEnv_emit(fprintf(stderr, "LIFE: %s -> %p\n", "TestEnv::~TestEnv(void)", this));
-}
-
-
-void TestEnv::v_callInto_v(uno_EnvCallee * pCallee, va_list * pParam)
-{
- ++ m_inCount;
- pCallee(pParam);
- -- m_inCount;
-}
-
-void TestEnv::v_callOut_v(uno_EnvCallee * pCallee, va_list * pParam)
-{
- -- m_inCount;
- pCallee(pParam);
- ++ m_inCount;
-}
-
-void TestEnv::v_enter(void)
-{
- ++ m_inCount;
-}
-
-void TestEnv::v_leave(void)
-{
- -- m_inCount;
-}
-
-int TestEnv::v_isValid(rtl::OUString * pReason)
-{
- int result = m_inCount & 1;
-
- if (result)
- *pReason = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OK"));
-
- else
- *pReason = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("not entered/invoked"));
-
- return result;
-}
-
-extern "C" void SAL_CALL uno_initEnvironment(uno_Environment * pEnv) SAL_THROW_EXTERN_C()
-{
- cppu::helper::purpenv::Environment_initWithEnterable(pEnv, new TestEnv());
-}
-
-extern "C" void uno_ext_getMapping(uno_Mapping ** ppMapping,
- uno_Environment * pFrom,
- uno_Environment * pTo )
-{
- cppu::helper::purpenv::createMapping(ppMapping, pFrom, pTo);
-}
-
diff --git a/cppu/test/purpenvhelper/TestEnv.def b/cppu/test/purpenvhelper/TestEnv.def
deleted file mode 100644
index 1444d92c13fa..000000000000
--- a/cppu/test/purpenvhelper/TestEnv.def
+++ /dev/null
@@ -1,8 +0,0 @@
-HEAPSIZE 0
-EXPORTS
- uno_initEnvironment
- uno_ext_getMapping
-
-
-
-
diff --git a/cppu/test/purpenvhelper/makefile.mk b/cppu/test/purpenvhelper/makefile.mk
deleted file mode 100644
index 3d9b9eaedcbf..000000000000
--- a/cppu/test/purpenvhelper/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 := cppu
-TARGET := purpenvhelper.test.pl
-
-
-ENABLE_EXCEPTIONS := TRUE
-NO_BSYMBOLIC := TRUE
-USE_DEFFILE := TRUE
-
-
-.INCLUDE : settings.mk
-.INCLUDE : ../../source/helper/purpenv/export.mk
-
-
-SHL1TARGET := TestEnv_uno_uno
-SHL1IMPLIB := i$(SHL1TARGET)
-SHL1OBJS := $(SLO)$/TestEnv.obj
-SHL1STDLIBS := $(purpenv_helper_LIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB)
-SHL1DEF := TestEnv.def
-
-
-.INCLUDE : target.mk
-
-ALLTAR: $(BIN)$/$(TARGET)
-
-$(BIN)$/$(TARGET): purpenvhelper.test.pl
- @+$(COPY) $^ $@
diff --git a/cppu/test/purpose_envs/makefile.mk b/cppu/test/purpose_envs/makefile.mk
deleted file mode 100644
index 6e9fe8ebb067..000000000000
--- a/cppu/test/purpose_envs/makefile.mk
+++ /dev/null
@@ -1,44 +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 := cppu
-TARGET := purpose_envs.test.pl
-
-ENABLE_EXCEPTIONS := TRUE
-NO_BSYMBOLIC := TRUE
-
-
-.INCLUDE : settings.mk
-
-
-.INCLUDE : target.mk
-
-ALLTAR: $(BIN)$/$(TARGET)
-
-$(BIN)$/$(TARGET): purpose_envs.test.pl
- @+$(COPY) $^ $@
diff --git a/cppu/test/surrogate.hxx b/cppu/test/surrogate.hxx
deleted file mode 100644
index 3f479d3e5009..000000000000
--- a/cppu/test/surrogate.hxx
+++ /dev/null
@@ -1,155 +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 <uno/dispatcher.h>
-#include <uno/mapping.hxx>
-#include <uno/environment.h>
-#include <uno/data.h>
-#include <osl/diagnose.h>
-#include <osl/interlck.h>
-
-#include <com/sun/star/uno/Reference.hxx>
-
-/*
-//==================================================================================================
-struct UnoMediator : public uno_Interface
-{
- oslInterlockedCount nRef;
- uno_Interface * pDest;
-
- UnoMediator( uno_Interface * pDest );
- ~UnoMediator();
-};
-
-//--------------------------------------------------------------------------------------------------
-inline static void SAL_CALL UnoMediator_acquire( uno_Interface * pUnoI )
-{
- osl_incrementInterlockedCount( &((UnoMediator *)pUnoI)->nRef );
-}
-//--------------------------------------------------------------------------------------------------
-inline static void SAL_CALL UnoMediator_release( uno_Interface * pUnoI )
-{
- if (! osl_decrementInterlockedCount( &((UnoMediator *)pUnoI)->nRef ))
- delete (UnoMediator *)pUnoI;
-}
-//--------------------------------------------------------------------------------------------------
-inline static void SAL_CALL UnoMediator_dispatch(
- uno_Interface * pUnoI, const typelib_TypeDescription * pMemberType,
- void * pReturn, void * pArgs[], uno_Any ** ppException )
-{
- (*((UnoMediator *)pUnoI)->pDest->pDispatcher)(
- ((UnoMediator *)pUnoI)->pDest, pMemberType, pReturn, pArgs, ppException );
-}
-
-//__________________________________________________________________________________________________
-UnoMediator::UnoMediator( uno_Interface * pDest_ )
- : nRef( 0 )
- , pDest( pDest_ )
-{
- (*pDest->acquire)( pDest );
- uno_Interface::acquire = UnoMediator_acquire;
- uno_Interface::release = UnoMediator_release;
- uno_Interface::pDispatcher = UnoMediator_dispatch;
-}
-//__________________________________________________________________________________________________
-UnoMediator::~UnoMediator()
-{
- (*pDest->release)( pDest );
-}
-*/
-
-//##################################################################################################
-
-template< class T >
-inline sal_Bool makeSurrogate( com::sun::star::uno::Reference< T > & rOut,
- const com::sun::star::uno::Reference< T > & rOriginal )
-{
- rOut.clear();
-
- typelib_TypeDescription * pTD = 0;
- const com::sun::star::uno::Type & rType = ::getCppuType( &rOriginal );
- TYPELIB_DANGER_GET( &pTD, rType.getTypeLibType() );
- OSL_ENSURE( pTD, "### cannot get typedescription!" );
- if (pTD)
- {
- uno_Environment * pCppEnv1 = 0;
- uno_Environment * pCppEnv2 = 0;
-
- ::rtl::OUString aCppEnvTypeName( RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME) );
- uno_getEnvironment( &pCppEnv1, aCppEnvTypeName.pData, 0 );
- uno_createEnvironment( &pCppEnv2, aCppEnvTypeName.pData, 0 ); // anonymous
-
- ::com::sun::star::uno::Mapping aMapping( pCppEnv1, pCppEnv2, ::rtl::OUString::createFromAscii("prot") );
- T * p = (T *)aMapping.mapInterface( rOriginal.get(), (typelib_InterfaceTypeDescription *)pTD );
- if (p)
- {
- rOut = p;
- p->release();
- }
-
- (*pCppEnv2->release)( pCppEnv2 );
- (*pCppEnv1->release)( pCppEnv1 );
-
- TYPELIB_DANGER_RELEASE( pTD );
- }
-/*
- ::com::sun::star::uno::Mapping aCpp2Uno( CPPU_CURRENT_LANGUAGE_BINDING_NAME, UNO_LB_UNO );
- ::com::sun::star::uno::Mapping aUno2Cpp( UNO_LB_UNO, CPPU_CURRENT_LANGUAGE_BINDING_NAME );
- OSL_ENSURE( aCpp2Uno.is() && aUno2Cpp.is(), "### cannot get mappings!" );
- if (aCpp2Uno.is() && aUno2Cpp.is())
- {
- typelib_TypeDescription * pTD = 0;
- const com::sun::star::uno::Type & rType = ::getCppuType( &rOriginal );
- TYPELIB_DANGER_GET( &pTD, rType.getTypeLibType() );
- OSL_ENSURE( pTD, "### cannot get typedescription!" );
- if (pTD)
- {
- uno_Interface * pUno = (uno_Interface *)aCpp2Uno.mapInterface(
- rOriginal.get(), (typelib_InterfaceTypeDescription *)pTD );
- if (pUno)
- {
- UnoMediator * pPseudo = new UnoMediator( pUno );
- (*pPseudo->acquire)( pPseudo );
- OSL_ENSURE( uno_equals( &pUno, &pPseudo, pTD, 0 ), "### interfaces don't belong to same object, but they do!?" );
- (*pUno->release)( pUno );
-
- T * pCpp = (T *)aUno2Cpp.mapInterface(
- pPseudo, (typelib_InterfaceTypeDescription *)pTD );
- (*pPseudo->release)( pPseudo );
-
- if (pCpp)
- {
- rOut = pCpp;
- pCpp->release();
- }
- }
- TYPELIB_DANGER_RELEASE( pTD );
- }
- }
-*/
- return rOut.is();
-}
diff --git a/cppu/test/test_Cincludes.c b/cppu/test/test_Cincludes.c
deleted file mode 100644
index bacdbc67209e..000000000000
--- a/cppu/test/test_Cincludes.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <uno/any2.h>
-#include <uno/data.h>
-#include <uno/dispatcher.h>
-#include <uno/environment.h>
-#include <uno/mapping.h>
-#include <uno/sequence2.h>
-#include <uno/threadpool.h>
-#include <typelib/typedescription.h>
-
diff --git a/cppu/test/test_cuno.c b/cppu/test/test_cuno.c
deleted file mode 100644
index 5757e0c229bb..000000000000
--- a/cppu/test/test_cuno.c
+++ /dev/null
@@ -1,784 +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 <stdio.h>
-#include <osl/diagnose.h>
-#include <osl/time.h>
-#include <osl/interlck.h>
-#include <rtl/alloc.h>
-//
-/*
-#include <uno/dispatcher.h>
-#include <uno/environment.h>
-#include <uno/mapping.hxx>
-*/
-#include <uno/data.h>
-#include <uno/any2.h>
-#include <uno/sequence2.h>
-
-#include <test/XLanguageBindingTest.h>
-
-
-typedef struct _InstanceData
-{
- void const * m_XInterface[2];
- void const * m_XLBTestBase[2];
- void const * m_XLanguageBindingTest[2];
-
- sal_Int32 m_refCount;
- typelib_TypeDescription* m_pTDXInterface;
- typelib_TypeDescription* m_pTDSeqTestElement;
- typelib_TypeDescription* m_pTDTestDataElements;
- test_TestDataElements m_data, m_structData;
-} InstanceData;
-
-#define GET_THIS( p ) (InstanceData *)((void **)p)[1]
-
-//==================================================================================================
-static void SAL_CALL c_acquire( void * p )
- SAL_THROW_EXTERN_C( )
-{
- CUNO_CALL( ((com_sun_star_uno_XInterface *)p) )->acquire( (com_sun_star_uno_XInterface *)p );
-}
-//==================================================================================================
-static void SAL_CALL c_release( void * p )
- SAL_THROW_EXTERN_C( )
-{
- CUNO_CALL( ((com_sun_star_uno_XInterface *)p) )->release( (com_sun_star_uno_XInterface *)p );
-}
-//==================================================================================================
-static void * SAL_CALL c_queryInterface( void * p, typelib_TypeDescriptionReference * pType )
- SAL_THROW_EXTERN_C( )
-{
- uno_Any aExc;
- com_sun_star_uno_XInterface * pRet = NULL;
-
- if (CUNO_EXCEPTION_OCCURED( CUNO_CALL( ((com_sun_star_uno_XInterface *)p) )->queryInterface( (com_sun_star_uno_XInterface *)p, &aExc, &pRet, pType ) ))
- {
- uno_any_destruct( &aExc, c_release );
- return NULL;
- }
- else
- {
- return pRet;
- }
-}
-
-void defaultConstructData(test_TestDataElements* pData, typelib_TypeDescriptionReference * pElemType)
-{
- pData->_Base._Base.Bool = sal_False;
- pData->_Base._Base.Char = 0;
- pData->_Base._Base.Byte = 0;
- pData->_Base._Base.Short = 0;
- pData->_Base._Base.UShort = 0;
- pData->_Base._Base.Long = 0;
- pData->_Base._Base.ULong = 0;
- pData->_Base._Base.Hyper = 0;
- pData->_Base._Base.UHyper = 0;
- pData->_Base._Base.Float = 0;
- pData->_Base._Base.Double = 0;
- pData->_Base._Base.Enum = test_TestEnum_TEST;
- pData->_Base.String = 0;
- rtl_uString_new(&pData->_Base.String);
- pData->_Base.Interface = 0;
- uno_any_construct(&pData->_Base.Any, 0, 0, 0);
-/* pData->Sequence = 0; */
- uno_type_sequence_construct(
- &pData->Sequence, pElemType, 0, 0, c_acquire );
-}
-
-void assign1( test_TestSimple* rData,
- sal_Bool bBool, sal_Unicode cChar, sal_Int8 nByte,
- sal_Int16 nShort, sal_uInt16 nUShort,
- sal_Int32 nLong, sal_uInt32 nULong,
- sal_Int64 nHyper, sal_uInt64 nUHyper,
- float fFloat, double fDouble,
- test_TestEnum eEnum)
-{
- rData->Bool = bBool;
- rData->Char = cChar;
- rData->Byte = nByte;
- rData->Short = nShort;
- rData->UShort = nUShort;
- rData->Long = nLong;
- rData->ULong = nULong;
- rData->Hyper = nHyper;
- rData->UHyper = nUHyper;
- rData->Float = fFloat;
- rData->Double = fDouble;
- rData->Enum = eEnum;
-}
-
-void assign2( test_TestElement* rData,
- sal_Bool bBool, sal_Unicode cChar, sal_Int8 nByte,
- sal_Int16 nShort, sal_uInt16 nUShort,
- sal_Int32 nLong, sal_uInt32 nULong,
- sal_Int64 nHyper, sal_uInt64 nUHyper,
- float fFloat, double fDouble,
- test_TestEnum eEnum, rtl_uString* rStr,
- com_sun_star_uno_XInterface* xTest,
- uno_Any* rAny,
- typelib_TypeDescription* pTDIface)
-{
- assign1( (test_TestSimple *)rData,
- bBool, cChar, nByte, nShort, nUShort, nLong, nULong, nHyper, nUHyper, fFloat, fDouble,
- eEnum );
- rtl_uString_assign(&rData->String, rStr);
-/* uno_assignData(&rData->Interface, pTDIface, &xTest, pTDIface, c_queryInterface, c_acquire, c_release); */
- if ( rData->Interface )
- CUNO_CALL(rData->Interface)->release(rData->Interface);
-
- if ( xTest )
- {
- CUNO_CALL(xTest)->acquire(xTest);
- rData->Interface = xTest;
- } else
- {
- rData->Interface = 0;
- }
-
- uno_type_any_assign(&rData->Any, rAny->pData, rAny->pType, c_acquire, c_release);
-}
-
-void assign3( test_TestDataElements* rData,
- sal_Bool bBool, sal_Unicode cChar, sal_Int8 nByte,
- sal_Int16 nShort, sal_uInt16 nUShort,
- sal_Int32 nLong, sal_uInt32 nULong,
- sal_Int64 nHyper, sal_uInt64 nUHyper,
- float fFloat, double fDouble,
- test_TestEnum eEnum, rtl_uString* rStr,
- com_sun_star_uno_XInterface* xTest,
- uno_Any* rAny,
- /* sequence< test_TestElement >*/uno_Sequence* rSequence,
- typelib_TypeDescription* pTDIface,
- typelib_TypeDescription* pTDSeqElem)
-{
- assign2( (test_TestElement *)rData,
- bBool, cChar, nByte, nShort, nUShort, nLong, nULong, nHyper, nUHyper, fFloat, fDouble,
- eEnum,rStr, xTest, rAny, pTDIface );
- uno_sequence_assign(&rData->Sequence, rSequence, pTDSeqElem, c_release);
-}
-
-/* XInterface =============================================================================== */
-
-/* XInterface::acquire */
-cuno_ErrorCode SAL_CALL XInterface_acquire( com_sun_star_uno_XInterface* pIFace)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- osl_incrementInterlockedCount( &pImpl->m_refCount );
- return CUNO_ERROR_NONE;
-}
-
-/* XInterface::release */
-cuno_ErrorCode SAL_CALL XInterface_release( com_sun_star_uno_XInterface * pIFace )
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- if( osl_decrementInterlockedCount( &pImpl->m_refCount ) == 0)
- {
- uno_destructData(&pImpl->m_data, pImpl->m_pTDTestDataElements, c_release);
- uno_destructData(&pImpl->m_structData, pImpl->m_pTDTestDataElements, c_release);
- typelib_typedescription_release(pImpl->m_pTDXInterface);
- typelib_typedescription_release(pImpl->m_pTDSeqTestElement);
- typelib_typedescription_release(pImpl->m_pTDTestDataElements);
- rtl_freeMemory( pImpl );
- }
- return CUNO_ERROR_NONE;
-}
-
-/* XInterface::queryInterface */
-cuno_ErrorCode SAL_CALL XInterface_queryInterface( com_sun_star_uno_XInterface * pIFace, uno_Any * pExc, com_sun_star_uno_XInterface ** pRet, typelib_TypeDescriptionReference * pTypeRef)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- com_sun_star_uno_XInterface * pIFaceRet = 0;
- if ( pTypeRef )
- {
- if( ! rtl_ustr_ascii_compare_WithLength( pTypeRef->pTypeName->buffer, pTypeRef->pTypeName->length,
- "com.sun.star.uno.XInterface" ) )
- pIFaceRet = (com_sun_star_uno_XInterface *)&pImpl->m_XInterface;
- else if( !rtl_ustr_ascii_compare_WithLength( pTypeRef->pTypeName->buffer, pTypeRef->pTypeName->length,
- "test.XLBTestBase" ) )
- pIFaceRet = (com_sun_star_uno_XInterface *)&pImpl->m_XLBTestBase;
- else if( !rtl_ustr_ascii_compare_WithLength( pTypeRef->pTypeName->buffer, pTypeRef->pTypeName->length,
- "test.XLanguageBindingTest" ) )
- pIFaceRet = (com_sun_star_uno_XInterface *)&pImpl->m_XLanguageBindingTest;
-
- if( pIFaceRet )
- {
- CUNO_CALL(pIFaceRet)->acquire( pIFaceRet );
- *pRet = pIFaceRet;
- } else
- {
- *pRet = 0;
- }
- }
- return CUNO_ERROR_NONE;
-}
-
-/* XLBTestBase =============================================================================== */
-
-/* XLBTestBase::getBool */
-cuno_ErrorCode SAL_CALL XLBTestBase_getBool( test_XLBTestBase * pIFace, uno_Any * pExc, sal_Bool *pRet)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- *pRet = pImpl->m_data._Base._Base.Bool;
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::setBool */
-cuno_ErrorCode SAL_CALL XLBTestBase_setBool( test_XLBTestBase * pIFace, uno_Any * pExc, sal_Bool value)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- pImpl->m_data._Base._Base.Bool = value;
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::getByte */
-cuno_ErrorCode SAL_CALL XLBTestBase_getByte( test_XLBTestBase * pIFace, uno_Any * pExc, sal_Int8 *pRet)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- *pRet = pImpl->m_data._Base._Base.Byte;
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::setByte */
-cuno_ErrorCode SAL_CALL XLBTestBase_setByte( test_XLBTestBase * pIFace, uno_Any * pExc, sal_Int8 value)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- pImpl->m_data._Base._Base.Byte = value;
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::getChar */
-cuno_ErrorCode SAL_CALL XLBTestBase_getChar( test_XLBTestBase * pIFace, uno_Any * pExc, sal_Unicode *pRet)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- *pRet = pImpl->m_data._Base._Base.Char;
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::setChar */
-cuno_ErrorCode SAL_CALL XLBTestBase_setChar( test_XLBTestBase * pIFace, uno_Any * pExc, sal_Unicode value)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- pImpl->m_data._Base._Base.Char = value;
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::getShort */
-cuno_ErrorCode SAL_CALL XLBTestBase_getShort( test_XLBTestBase * pIFace, uno_Any * pExc, sal_Int16 *pRet)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- *pRet = pImpl->m_data._Base._Base.Short;
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::setShort */
-cuno_ErrorCode SAL_CALL XLBTestBase_setShort( test_XLBTestBase * pIFace, uno_Any * pExc, sal_Int16 value)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- pImpl->m_data._Base._Base.Short = value;
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::getUShort */
-cuno_ErrorCode SAL_CALL XLBTestBase_getUShort( test_XLBTestBase * pIFace, uno_Any * pExc, sal_uInt16 *pRet)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- *pRet = pImpl->m_data._Base._Base.UShort;
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::setUShort */
-cuno_ErrorCode SAL_CALL XLBTestBase_setUShort( test_XLBTestBase * pIFace, uno_Any * pExc, sal_uInt16 value)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- pImpl->m_data._Base._Base.UShort = value;
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::getLong */
-cuno_ErrorCode SAL_CALL XLBTestBase_getLong( test_XLBTestBase * pIFace, uno_Any * pExc, sal_Int32 *pRet)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- *pRet = pImpl->m_data._Base._Base.Long;
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::setLong */
-cuno_ErrorCode SAL_CALL XLBTestBase_setLong( test_XLBTestBase * pIFace, uno_Any * pExc, sal_Int32 value)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- pImpl->m_data._Base._Base.Long = value;
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::getULong */
-cuno_ErrorCode SAL_CALL XLBTestBase_getULong( test_XLBTestBase * pIFace, uno_Any * pExc, sal_uInt32 *pRet)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- *pRet = pImpl->m_data._Base._Base.ULong;
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::setULong */
-cuno_ErrorCode SAL_CALL XLBTestBase_setULong( test_XLBTestBase * pIFace, uno_Any * pExc, sal_uInt32 value)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- pImpl->m_data._Base._Base.ULong = value;
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::getHyper */
-cuno_ErrorCode SAL_CALL XLBTestBase_getHyper( test_XLBTestBase * pIFace, uno_Any * pExc, sal_Int64 *pRet)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- *pRet = pImpl->m_data._Base._Base.Hyper;
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::setHyper */
-cuno_ErrorCode SAL_CALL XLBTestBase_setHyper( test_XLBTestBase * pIFace, uno_Any * pExc, sal_Int64 value)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- pImpl->m_data._Base._Base.Hyper = value;
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::getUHyper */
-cuno_ErrorCode SAL_CALL XLBTestBase_getUHyper( test_XLBTestBase * pIFace, uno_Any * pExc, sal_uInt64 *pRet)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- *pRet = pImpl->m_data._Base._Base.UHyper;
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::setUHyper */
-cuno_ErrorCode SAL_CALL XLBTestBase_setUHyper( test_XLBTestBase * pIFace, uno_Any * pExc, sal_uInt64 value)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- pImpl->m_data._Base._Base.UHyper = value;
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::getFloat */
-cuno_ErrorCode SAL_CALL XLBTestBase_getFloat( test_XLBTestBase * pIFace, uno_Any * pExc, float *pRet)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- *pRet = pImpl->m_data._Base._Base.Float;
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::setFloat */
-cuno_ErrorCode SAL_CALL XLBTestBase_setFloat( test_XLBTestBase * pIFace, uno_Any * pExc, float value)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- pImpl->m_data._Base._Base.Float = value;
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::getDouble */
-cuno_ErrorCode SAL_CALL XLBTestBase_getDouble( test_XLBTestBase * pIFace, uno_Any * pExc, double *pRet)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- *pRet = pImpl->m_data._Base._Base.Double;
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::setDouble */
-cuno_ErrorCode SAL_CALL XLBTestBase_setDouble( test_XLBTestBase * pIFace, uno_Any * pExc, double value)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- pImpl->m_data._Base._Base.Double = value;
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::getEnum */
-cuno_ErrorCode SAL_CALL XLBTestBase_getEnum( test_XLBTestBase * pIFace, uno_Any * pExc, test_TestEnum *pRet)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- *pRet = pImpl->m_data._Base._Base.Enum;
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::setEnum */
-cuno_ErrorCode SAL_CALL XLBTestBase_setEnum( test_XLBTestBase * pIFace, uno_Any * pExc, test_TestEnum value)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- pImpl->m_data._Base._Base.Enum = value;
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::getString */
-cuno_ErrorCode SAL_CALL XLBTestBase_getString( test_XLBTestBase * pIFace, uno_Any * pExc, rtl_uString **pRet)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- *pRet = 0;
- rtl_uString_newFromString(pRet, pImpl->m_data._Base.String);
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::setString */
-cuno_ErrorCode SAL_CALL XLBTestBase_setString( test_XLBTestBase * pIFace, uno_Any * pExc, rtl_uString *value)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- rtl_uString_assign(&pImpl->m_data._Base.String, value);
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::getInterface */
-cuno_ErrorCode SAL_CALL XLBTestBase_getInterface( test_XLBTestBase * pIFace, uno_Any * pExc, com_sun_star_uno_XInterface **pRet)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
-/* uno_copyData(pRet, &pImpl->m_data._Base.Interface, pImpl->m_pTDXInterface, c_acquire); */
- if ( pImpl->m_data._Base.Interface )
- {
- CUNO_CALL(pImpl->m_data._Base.Interface)->acquire(pImpl->m_data._Base.Interface);
- *pRet = pImpl->m_data._Base.Interface;
- } else
- {
- *pRet = 0;
- }
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::setInterface */
-cuno_ErrorCode SAL_CALL XLBTestBase_setInterface( test_XLBTestBase * pIFace, uno_Any * pExc, com_sun_star_uno_XInterface *value)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
-/* uno_assignData(&pImpl->m_data._Base.Interface, pImpl->m_pTDXInterface, &value, pImpl->m_pTDXInterface, c_queryInterface, c_acquire, c_release); */
- if ( pImpl->m_data._Base.Interface )
- CUNO_CALL(pImpl->m_data._Base.Interface)->release(pImpl->m_data._Base.Interface);
-
- if ( value )
- {
- CUNO_CALL(value)->acquire(value);
- pImpl->m_data._Base.Interface = value;
- } else
- {
- pImpl->m_data._Base.Interface = 0;
- }
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::getAny */
-cuno_ErrorCode SAL_CALL XLBTestBase_getAny( test_XLBTestBase * pIFace, uno_Any * pExc, uno_Any *pRet)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- typelib_TypeDescription* pTD = 0;
- typelib_typedescriptionreference_getDescription(&pTD, pImpl->m_data._Base.Any.pType);
- uno_any_construct(pRet, pImpl->m_data._Base.Any.pData, pTD, c_acquire);
- typelib_typedescription_release(pTD);
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::setAny */
-cuno_ErrorCode SAL_CALL XLBTestBase_setAny( test_XLBTestBase * pIFace, uno_Any * pExc, uno_Any *value)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- typelib_TypeDescription* pTD = 0;
- typelib_typedescriptionreference_getDescription(&pTD, value->pType);
- uno_any_assign(&pImpl->m_data._Base.Any, value->pData, pTD, c_acquire, c_release);
- typelib_typedescription_release(pTD);
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::getSequence */
-cuno_ErrorCode SAL_CALL XLBTestBase_getSequence( test_XLBTestBase * pIFace, uno_Any * pExc, /*sequence< test.TestElement >*/uno_Sequence **pRet)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- uno_sequence_construct(pRet, pImpl->m_pTDSeqTestElement, pImpl->m_data.Sequence->elements, pImpl->m_data.Sequence->nElements, c_acquire);
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::setSequence */
-cuno_ErrorCode SAL_CALL XLBTestBase_setSequence( test_XLBTestBase * pIFace, uno_Any * pExc, /*sequence< test.TestElement >*/uno_Sequence *value)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- uno_sequence_assign(&pImpl->m_data.Sequence, value, pImpl->m_pTDSeqTestElement, c_release);
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::getStruct */
-cuno_ErrorCode SAL_CALL XLBTestBase_getStruct( test_XLBTestBase * pIFace, uno_Any * pExc, test_TestDataElements *pRet)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- uno_copyData(pRet, &pImpl->m_structData, pImpl->m_pTDTestDataElements, c_acquire);
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::setStruct */
-cuno_ErrorCode SAL_CALL XLBTestBase_setStruct( test_XLBTestBase * pIFace, uno_Any * pExc, test_TestDataElements *value)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- uno_assignData(&pImpl->m_structData, pImpl->m_pTDTestDataElements, value, pImpl->m_pTDTestDataElements, c_queryInterface, c_acquire, c_release);
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::setValues */
-cuno_ErrorCode SAL_CALL XLBTestBase_setValues( test_XLBTestBase * pIFace, uno_Any * pExc, sal_Bool aBool, sal_Unicode aChar, sal_Int8 aByte, sal_Int16 aShort, sal_uInt16 aUShort, sal_Int32 aLong, sal_uInt32 aULong, sal_Int64 aHyper, sal_uInt64 aUHyper, float aFloat, double aDouble, test_TestEnum aEnum, rtl_uString* aString, com_sun_star_uno_XInterface *aInterface, uno_Any * aAny, /*sequence< test.TestElement >*/ uno_Sequence * aSequence, test_TestDataElements *aStruct)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- assign3(&pImpl->m_data, aBool, aChar, aByte, aShort, aUShort, aLong, aULong, aHyper, aUHyper, aFloat, aDouble,
- aEnum, aString, aInterface, aAny,aSequence, pImpl->m_pTDXInterface, pImpl->m_pTDSeqTestElement);
- uno_assignData(&pImpl->m_structData, pImpl->m_pTDTestDataElements, aStruct, pImpl->m_pTDTestDataElements, c_queryInterface, c_acquire, c_release);
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::setValues2 */
-cuno_ErrorCode SAL_CALL XLBTestBase_setValues2( test_XLBTestBase * pIFace, uno_Any * pExc, test_TestDataElements* pRet, sal_Bool* aBool, sal_Unicode* aChar, sal_Int8* aByte, sal_Int16* aShort, sal_uInt16* aUShort, sal_Int32* aLong, sal_uInt32* aULong, sal_Int64* aHyper, sal_uInt64* aUHyper, float* aFloat, double* aDouble, test_TestEnum* aEnum, rtl_uString** aString, com_sun_star_uno_XInterface **aInterface, uno_Any * aAny, /*sequence< test.TestElement >*/ uno_Sequence ** aSequence, test_TestDataElements * aStruct)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- assign3(&pImpl->m_data, *aBool, *aChar, *aByte, *aShort, *aUShort, *aLong, *aULong, *aHyper, *aUHyper, *aFloat, *aDouble,
- *aEnum, *aString, *aInterface, aAny, *aSequence, pImpl->m_pTDXInterface, pImpl->m_pTDSeqTestElement);
- uno_assignData(&pImpl->m_structData, pImpl->m_pTDTestDataElements, aStruct, pImpl->m_pTDTestDataElements, c_queryInterface, c_acquire, c_release);
- uno_copyData(pRet, &pImpl->m_structData, pImpl->m_pTDTestDataElements, c_acquire);
- return CUNO_ERROR_NONE;
-}
-/* XLBTestBase::getValues */
-cuno_ErrorCode SAL_CALL XLBTestBase_getValues( test_XLBTestBase * pIFace, uno_Any * pExc, test_TestDataElements* pRet, sal_Bool* aBool, sal_Unicode* aChar, sal_Int8* aByte, sal_Int16* aShort, sal_uInt16* aUShort, sal_Int32* aLong, sal_uInt32* aULong, sal_Int64* aHyper, sal_uInt64* aUHyper, float* aFloat, double* aDouble, test_TestEnum* aEnum, rtl_uString** aString, com_sun_star_uno_XInterface **aInterface, uno_Any * aAny, /*sequence< test.TestElement >*/ uno_Sequence ** aSequence, test_TestDataElements * aStruct)
-{
- typelib_TypeDescription* pTD = 0;
- InstanceData * pImpl = GET_THIS( pIFace );
- *aBool = pImpl->m_data._Base._Base.Bool;
- *aChar = pImpl->m_data._Base._Base.Char;
- *aByte = pImpl->m_data._Base._Base.Byte;
- *aShort = pImpl->m_data._Base._Base.Short;
- *aUShort = pImpl->m_data._Base._Base.UShort;
- *aLong = pImpl->m_data._Base._Base.Long;
- *aULong = pImpl->m_data._Base._Base.ULong;
- *aHyper = pImpl->m_data._Base._Base.Hyper;
- *aUHyper = pImpl->m_data._Base._Base.UHyper;
- *aFloat = pImpl->m_data._Base._Base.Float;
- *aDouble = pImpl->m_data._Base._Base.Double;
- *aEnum = pImpl->m_data._Base._Base.Enum;
- *aString = 0;
- rtl_uString_newFromString(aString, pImpl->m_data._Base.String);
-/* uno_copyData(aInterface, &pImpl->m_data._Base.Interface, pImpl->m_pTDXInterface, c_acquire); */
- if ( pImpl->m_data._Base.Interface )
- {
- CUNO_CALL(pImpl->m_data._Base.Interface)->acquire(pImpl->m_data._Base.Interface);
- *aInterface = pImpl->m_data._Base.Interface;
- } else
- {
- *aInterface = 0;
- }
- typelib_typedescriptionreference_getDescription(&pTD, pImpl->m_data._Base.Any.pType);
- uno_any_construct(aAny, pImpl->m_data._Base.Any.pData, pTD, c_acquire);
- typelib_typedescription_release(pTD);
- uno_sequence_construct(aSequence, pImpl->m_pTDSeqTestElement, pImpl->m_data.Sequence->elements, pImpl->m_data.Sequence->nElements, c_acquire);
- uno_copyData(aStruct, &pImpl->m_structData, pImpl->m_pTDTestDataElements, c_acquire);
- uno_copyData(pRet, &pImpl->m_structData, pImpl->m_pTDTestDataElements, c_acquire);
- return CUNO_ERROR_NONE;
-}
-
-/* XLanguageBindingTest =============================================================================== */
-
-/* XLanguageBindingTest::getRuntimeException */
-cuno_ErrorCode SAL_CALL XLanguageBindingTest_getRuntimeException( test_XLanguageBindingTest * pIFace, uno_Any * pExc, sal_Int32 *pRet)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- com_sun_star_uno_RuntimeException aExc;
- typelib_TypeDescription * pTD = 0;
- rtl_uString * pTypeName = 0;
- uno_Any excp;
-
- rtl_uString_newFromAscii( &pTypeName, "com.sun.star.uno.RuntimeException");
- typelib_typedescription_getByName(&pTD, pTypeName);
-
- aExc._Base.Message = 0;
- rtl_uString_newFromAscii(&aExc._Base.Message, "dum dum dum ich tanz im kreis herum...");
- aExc._Base.Context = 0;
- if (CUNO_EXCEPTION_OCCURED( CUNO_CALL(pIFace)->getInterface( (test_XLBTestBase *)pIFace, &excp, &aExc._Base.Context) ))
- {
- /* ... */
- uno_any_destruct( &excp, 0 );
- }
-
- uno_any_construct(pExc, &aExc, pTD, c_acquire);
- uno_destructData(&aExc, pTD, c_release);
- typelib_typedescription_release(pTD);
- rtl_uString_release(pTypeName);
-
- return CUNO_ERROR_EXCEPTION;
-}
-/* XLanguageBindingTest::setRuntimeException */
-cuno_ErrorCode SAL_CALL XLanguageBindingTest_setRuntimeException( test_XLanguageBindingTest * pIFace, uno_Any * pExc, sal_Int32 value)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- com_sun_star_uno_RuntimeException aExc;
- typelib_TypeDescription * pTD = 0;
- rtl_uString * pTypeName = 0;
- uno_Any excp;
-
- rtl_uString_newFromAscii( &pTypeName, "com.sun.star.uno.RuntimeException");
- typelib_typedescription_getByName(&pTD, pTypeName);
-
- aExc._Base.Message = 0;
- rtl_uString_newFromAscii(&aExc._Base.Message, "dum dum dum ich tanz im kreis herum...");
- aExc._Base.Context = 0;
- if (CUNO_EXCEPTION_OCCURED( CUNO_CALL(pIFace)->getInterface( (test_XLBTestBase *)pIFace, &excp, &aExc._Base.Context) ))
- {
- /* ... */
- uno_any_destruct( &excp, 0 );
- }
-
- uno_any_construct(pExc, &aExc, pTD, c_acquire);
- uno_destructData(&aExc, pTD, c_release);
- typelib_typedescription_release(pTD);
- rtl_uString_release(pTypeName);
-
- return CUNO_ERROR_EXCEPTION;
-}
-/* XLanguageBindingTest::raiseException */
-cuno_ErrorCode SAL_CALL XLanguageBindingTest_raiseException( test_XLanguageBindingTest * pIFace, uno_Any * pExc, test_TestDataElements* pRet, sal_Bool* aBool, sal_Unicode* aChar, sal_Int8* aByte, sal_Int16* aShort, sal_uInt16* aUShort, sal_Int32* aLong, sal_uInt32* aULong, sal_Int64* aHyper, sal_uInt64* aUHyper, float* aFloat, double* aDouble, test_TestEnum* aEnum, rtl_uString ** aString, com_sun_star_uno_XInterface ** aInterface, uno_Any* aAny, /*sequence< test.TestElement >*/ uno_Sequence ** aSequence, test_TestDataElements* AStruct)
-{
- InstanceData * pImpl = GET_THIS( pIFace );
- com_sun_star_lang_IllegalArgumentException aExc;
- typelib_TypeDescription * pTD = 0;
- rtl_uString * pTypeName = 0;
- uno_Any excp;
-
- rtl_uString_newFromAscii( &pTypeName, "com.sun.star.lang.IllegalArgumentException");
- typelib_typedescription_getByName(&pTD, pTypeName);
-
- aExc.ArgumentPosition = 5;
- aExc._Base.Message = 0;
- rtl_uString_newFromAscii(&aExc._Base.Message, "dum dum dum ich tanz im kreis herum...");
- aExc._Base.Context = 0;
- if (CUNO_EXCEPTION_OCCURED( CUNO_CALL(pIFace)->getInterface( (test_XLBTestBase *)pIFace, &excp, &aExc._Base.Context) ))
- {
- /* ... */
- uno_any_destruct( &excp, 0 );
- }
-
- uno_any_construct(pExc, &aExc, pTD, c_acquire);
- uno_destructData(&aExc, pTD, c_release);
- typelib_typedescription_release(pTD);
- rtl_uString_release(pTypeName);
-
- return CUNO_ERROR_EXCEPTION;
-}
-
-
-static const com_sun_star_uno_XInterface_ftab s_XInterface_ftab={
- XInterface_queryInterface,
- XInterface_acquire,
- XInterface_release,
- };
-static const test_XLBTestBase_ftab s_XLBTestBase_ftab={
- XInterface_queryInterface,
- XInterface_acquire,
- XInterface_release,
- XLBTestBase_getBool,
- XLBTestBase_setBool,
- XLBTestBase_getByte,
- XLBTestBase_setByte,
- XLBTestBase_getChar,
- XLBTestBase_setChar,
- XLBTestBase_getShort,
- XLBTestBase_setShort,
- XLBTestBase_getUShort,
- XLBTestBase_setUShort,
- XLBTestBase_getLong,
- XLBTestBase_setLong,
- XLBTestBase_getULong,
- XLBTestBase_setULong,
- XLBTestBase_getHyper,
- XLBTestBase_setHyper,
- XLBTestBase_getUHyper,
- XLBTestBase_setUHyper,
- XLBTestBase_getFloat,
- XLBTestBase_setFloat,
- XLBTestBase_getDouble,
- XLBTestBase_setDouble,
- XLBTestBase_getEnum,
- XLBTestBase_setEnum,
- XLBTestBase_getString,
- XLBTestBase_setString,
- XLBTestBase_getInterface,
- XLBTestBase_setInterface,
- XLBTestBase_getAny,
- XLBTestBase_setAny,
- XLBTestBase_getSequence,
- XLBTestBase_setSequence,
- XLBTestBase_getStruct,
- XLBTestBase_setStruct,
- XLBTestBase_setValues,
- XLBTestBase_setValues2,
- XLBTestBase_getValues
- };
-static const test_XLanguageBindingTest_ftab s_XLanguageBindingTest_ftab={
- XInterface_queryInterface,
- XInterface_acquire,
- XInterface_release,
- XLBTestBase_getBool,
- XLBTestBase_setBool,
- XLBTestBase_getByte,
- XLBTestBase_setByte,
- XLBTestBase_getChar,
- XLBTestBase_setChar,
- XLBTestBase_getShort,
- XLBTestBase_setShort,
- XLBTestBase_getUShort,
- XLBTestBase_setUShort,
- XLBTestBase_getLong,
- XLBTestBase_setLong,
- XLBTestBase_getULong,
- XLBTestBase_setULong,
- XLBTestBase_getHyper,
- XLBTestBase_setHyper,
- XLBTestBase_getUHyper,
- XLBTestBase_setUHyper,
- XLBTestBase_getFloat,
- XLBTestBase_setFloat,
- XLBTestBase_getDouble,
- XLBTestBase_setDouble,
- XLBTestBase_getEnum,
- XLBTestBase_setEnum,
- XLBTestBase_getString,
- XLBTestBase_setString,
- XLBTestBase_getInterface,
- XLBTestBase_setInterface,
- XLBTestBase_getAny,
- XLBTestBase_setAny,
- XLBTestBase_getSequence,
- XLBTestBase_setSequence,
- XLBTestBase_getStruct,
- XLBTestBase_setStruct,
- XLBTestBase_setValues,
- XLBTestBase_setValues2,
- XLBTestBase_getValues,
- XLanguageBindingTest_getRuntimeException,
- XLanguageBindingTest_setRuntimeException,
- XLanguageBindingTest_raiseException
- };
-
-com_sun_star_uno_XInterface* SAL_CALL createTestObject()
-{
- InstanceData *pObj;
- rtl_uString* usXInterface = 0;
- rtl_uString* usSeqTestElement = 0;
- rtl_uString* usTestDataElements = 0;
-
- /* Create a data instance of the component */
- pObj= (InstanceData*)rtl_allocateMemory( sizeof( InstanceData) );
- pObj->m_XInterface[0] = &s_XInterface_ftab;
- pObj->m_XInterface[1] = pObj;
- pObj->m_XLBTestBase[0] = &s_XLBTestBase_ftab;
- pObj->m_XLBTestBase[1] = pObj;
- pObj->m_XLanguageBindingTest[0] = &s_XLanguageBindingTest_ftab;
- pObj->m_XLanguageBindingTest[1] = pObj;
-
- /* Initalize the reference counter member and other component data */
- pObj->m_refCount= 1;
-
- pObj->m_pTDXInterface = 0;
- rtl_uString_newFromAscii( &usXInterface, "com.sun.star.uno.XInterface");
- typelib_typedescription_getByName(&pObj->m_pTDXInterface, usXInterface);
-
- pObj->m_pTDSeqTestElement = 0;
- rtl_uString_newFromAscii( &usSeqTestElement, "[]test.TestElement");
- typelib_typedescription_getByName(&pObj->m_pTDSeqTestElement, usSeqTestElement);
-
- pObj->m_pTDTestDataElements = 0;
- rtl_uString_newFromAscii( &usTestDataElements, "test.TestDataElements");
- typelib_typedescription_getByName(&pObj->m_pTDTestDataElements, usTestDataElements);
-
- defaultConstructData(&pObj->m_data, pObj->m_pTDSeqTestElement->pWeakRef);
- defaultConstructData(&pObj->m_structData, pObj->m_pTDSeqTestElement->pWeakRef);
-
- rtl_uString_release(usXInterface);
- rtl_uString_release(usSeqTestElement);
- rtl_uString_release(usTestDataElements);
- return (com_sun_star_uno_XInterface *)&pObj->m_XInterface;
-}
-
diff --git a/cppu/test/test_di.cxx b/cppu/test/test_di.cxx
deleted file mode 100644
index 88e8f9ac639d..000000000000
--- a/cppu/test/test_di.cxx
+++ /dev/null
@@ -1,888 +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 !defined(OSL_DEBUG_LEVEL) || OSL_DEBUG_LEVEL == 0
-# undef OSL_DEBUG_LEVEL
-# define OSL_DEBUG_LEVEL 2
-#endif
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_cppu.hxx"
-
-#include <stdio.h>
-#include <string.h>
-#include <rtl/ustring.hxx>
-#include <osl/diagnose.h>
-#include <osl/time.h>
-#include <sal/types.h>
-//
-#include <uno/dispatcher.h>
-#include <uno/environment.h>
-#include <uno/mapping.hxx>
-#include <uno/data.h>
-
-// #include <uno/cuno.h>
-// #include <test/XLanguageBindingTest.h>
-
-#include <cppuhelper/weak.hxx>
-#include <cppuhelper/queryinterface.hxx>
-#include <cppu/macros.hxx>
-#include <test/XLanguageBindingTest.hpp>
-
-#include <cppuhelper/implbase1.hxx>
-
-#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
-
-
-using namespace test;
-using namespace cppu;
-using namespace osl;
-using namespace rtl;
-using namespace com::sun::star;
-using namespace com::sun::star::uno;
-
-
-//==================================================================================================
-sal_Bool equals( const test::TestElement & rData1, const test::TestElement & rData2 )
-{
- OSL_ENSURE( rData1.Bool == rData2.Bool, "### bool does not match!" );
- OSL_ENSURE( rData1.Char == rData2.Char, "### char does not match!" );
- OSL_ENSURE( rData1.Byte == rData2.Byte, "### byte does not match!" );
- OSL_ENSURE( rData1.Short == rData2.Short, "### short does not match!" );
- OSL_ENSURE( rData1.UShort == rData2.UShort, "### unsigned short does not match!" );
- OSL_ENSURE( rData1.Long == rData2.Long, "### long does not match!" );
- OSL_ENSURE( rData1.ULong == rData2.ULong, "### unsigned long does not match!" );
- OSL_ENSURE( rData1.Hyper == rData2.Hyper, "### hyper does not match!" );
- OSL_ENSURE( rData1.UHyper == rData2.UHyper, "### unsigned hyper does not match!" );
- OSL_ENSURE( rData1.Float == rData2.Float, "### float does not match!" );
- OSL_ENSURE( rData1.Double == rData2.Double, "### double does not match!" );
- OSL_ENSURE( rData1.Enum == rData2.Enum, "### enum does not match!" );
- OSL_ENSURE( rData1.String == rData2.String, "### string does not match!" );
- OSL_ENSURE( rData1.Interface == rData2.Interface, "### interface does not match!" );
- OSL_ENSURE( rData1.Any == rData2.Any, "### any does not match!" );
-
- return (rData1.Bool == rData2.Bool &&
- rData1.Char == rData2.Char &&
- rData1.Byte == rData2.Byte &&
- rData1.Short == rData2.Short &&
- rData1.UShort == rData2.UShort &&
- rData1.Long == rData2.Long &&
- rData1.ULong == rData2.ULong &&
- rData1.Hyper == rData2.Hyper &&
- rData1.UHyper == rData2.UHyper &&
- rData1.Float == rData2.Float &&
- rData1.Double == rData2.Double &&
- rData1.Enum == rData2.Enum &&
- rData1.String == rData2.String &&
- rData1.Interface == rData2.Interface &&
- rData1.Any == rData2.Any);
-}
-//==================================================================================================
-sal_Bool equals( const test::TestData & rData1, const test::TestData & rData2 )
-{
- sal_Int32 nLen;
-
- if ((rData1.Sequence == rData2.Sequence) &&
- equals( (const test::TestElement &)rData1, (const test::TestElement &)rData2 ) &&
- (nLen = rData1.Sequence.getLength()) == rData2.Sequence.getLength())
- {
- // once again by hand sequence ==
- const test::TestElement * pElements1 = rData1.Sequence.getConstArray();
- const test::TestElement * pElements2 = rData2.Sequence.getConstArray();
- for ( ; nLen--; )
- {
- if (! equals( pElements1[nLen], pElements2[nLen] ))
- {
- OSL_ENSURE( sal_False, "### sequence element did not match!" );
- return sal_False;
- }
- }
- return sal_True;
- }
- return sal_False;
-}
-//==================================================================================================
-void assign( test::TestElement & rData,
- sal_Bool bBool, sal_Unicode cChar, sal_Int8 nByte,
- sal_Int16 nShort, sal_uInt16 nUShort,
- sal_Int32 nLong, sal_uInt32 nULong,
- sal_Int64 nHyper, sal_uInt64 nUHyper,
- float fFloat, double fDouble,
- test::TestEnum eEnum, const ::rtl::OUString& rStr,
- const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xTest,
- const ::com::sun::star::uno::Any& rAny )
-{
- rData.Bool = bBool;
- rData.Char = cChar;
- rData.Byte = nByte;
- rData.Short = nShort;
- rData.UShort = nUShort;
- rData.Long = nLong;
- rData.ULong = nULong;
- rData.Hyper = nHyper;
- rData.UHyper = nUHyper;
- rData.Float = fFloat;
- rData.Double = fDouble;
- rData.Enum = eEnum;
- rData.String = rStr;
- rData.Interface = xTest;
- rData.Any = rAny;
-}
-//==================================================================================================
-void assign( test::TestData & rData,
- sal_Bool bBool, sal_Unicode cChar, sal_Int8 nByte,
- sal_Int16 nShort, sal_uInt16 nUShort,
- sal_Int32 nLong, sal_uInt32 nULong,
- sal_Int64 nHyper, sal_uInt64 nUHyper,
- float fFloat, double fDouble,
- test::TestEnum eEnum, const ::rtl::OUString& rStr,
- const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xTest,
- const ::com::sun::star::uno::Any& rAny,
- const com::sun::star::uno::Sequence< test::TestElement >& rSequence )
-{
- assign( (test::TestElement &)rData,
- bBool, cChar, nByte, nShort, nUShort, nLong, nULong, nHyper, nUHyper, fFloat, fDouble,
- eEnum, rStr, xTest, rAny );
- rData.Sequence = rSequence;
-}
-
-//==================================================================================================
-class TestDummy : public OWeakObject
-{
-public:
- sal_Int32 getRefCount() const
- { return m_refCount; }
-
- virtual ~TestDummy()
- { OSL_TRACE( "> scalar TestDummy dtor <\n" ); }
-};
-//==================================================================================================
-class Test_Impl : public cppu::WeakImplHelper1< XLanguageBindingTest >
-{
- test::TestData _aData, _aStructData;
-
-public:
- sal_Int32 getRefCount() const
- { return m_refCount; }
-
- virtual ~Test_Impl()
- { OSL_TRACE( "> scalar Test_Impl dtor <\n" ); }
-
- // XLBTestBase
- virtual void SAL_CALL setValues( sal_Bool bBool, sal_Unicode cChar, sal_Int8 nByte,
- sal_Int16 nShort, sal_uInt16 nUShort,
- sal_Int32 nLong, sal_uInt32 nULong,
- sal_Int64 nHyper, sal_uInt64 nUHyper,
- float fFloat, double fDouble,
- test::TestEnum eEnum, const ::rtl::OUString& rStr,
- const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xTest,
- const ::com::sun::star::uno::Any& rAny,
- const ::com::sun::star::uno::Sequence<test::TestElement >& rSequence,
- const test::TestData& rStruct )
- throw(com::sun::star::uno::RuntimeException);
-
- virtual test::TestData SAL_CALL setValues2( sal_Bool& bBool, sal_Unicode& cChar, sal_Int8& nByte,
- sal_Int16& nShort, sal_uInt16& nUShort,
- sal_Int32& nLong, sal_uInt32& nULong,
- sal_Int64& nHyper, sal_uInt64& nUHyper,
- float& fFloat, double& fDouble,
- test::TestEnum& eEnum, rtl::OUString& rStr,
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xTest,
- ::com::sun::star::uno::Any& rAny,
- ::com::sun::star::uno::Sequence<test::TestElement >& rSequence,
- test::TestData& rStruct )
- throw(com::sun::star::uno::RuntimeException);
-
- virtual test::TestData SAL_CALL getValues( sal_Bool& bBool, sal_Unicode& cChar, sal_Int8& nByte,
- sal_Int16& nShort, sal_uInt16& nUShort,
- sal_Int32& nLong, sal_uInt32& nULong,
- sal_Int64& nHyper, sal_uInt64& nUHyper,
- float& fFloat, double& fDouble,
- test::TestEnum& eEnum, rtl::OUString& rStr,
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xTest,
- ::com::sun::star::uno::Any& rAny,
- ::com::sun::star::uno::Sequence< test::TestElement >& rSequence,
- test::TestData& rStruct )
- throw(com::sun::star::uno::RuntimeException);
-
- virtual test::SmallStruct echoSmallStruct(const test::SmallStruct& rStruct) throw(com::sun::star::uno::RuntimeException)
- { return rStruct; }
- virtual test::MediumStruct echoMediumStruct(const test::MediumStruct& rStruct) throw(com::sun::star::uno::RuntimeException)
- { return rStruct; }
- virtual test::BigStruct echoBigStruct(const test::BigStruct& rStruct) throw(com::sun::star::uno::RuntimeException)
- { return rStruct; }
- virtual test::AllFloats echoAllFloats(const test::AllFloats& rStruct) throw(com::sun::star::uno::RuntimeException)
- { return rStruct; }
-
- virtual sal_Bool SAL_CALL getBool() throw(com::sun::star::uno::RuntimeException)
- { return _aData.Bool; }
- virtual sal_Int8 SAL_CALL getByte() throw(com::sun::star::uno::RuntimeException)
- { return _aData.Byte; }
- virtual sal_Unicode SAL_CALL getChar() throw(com::sun::star::uno::RuntimeException)
- { return _aData.Char; }
- virtual sal_Int16 SAL_CALL getShort() throw(com::sun::star::uno::RuntimeException)
- { return _aData.Short; }
- virtual sal_uInt16 SAL_CALL getUShort() throw(com::sun::star::uno::RuntimeException)
- { return _aData.UShort; }
- virtual sal_Int32 SAL_CALL getLong() throw(com::sun::star::uno::RuntimeException)
- { return _aData.Long; }
- virtual sal_uInt32 SAL_CALL getULong() throw(com::sun::star::uno::RuntimeException)
- { return _aData.ULong; }
- virtual sal_Int64 SAL_CALL getHyper() throw(com::sun::star::uno::RuntimeException)
- { return _aData.Hyper; }
- virtual sal_uInt64 SAL_CALL getUHyper() throw(com::sun::star::uno::RuntimeException)
- { return _aData.UHyper; }
- virtual float SAL_CALL getFloat() throw(com::sun::star::uno::RuntimeException)
- { return _aData.Float; }
- virtual double SAL_CALL getDouble() throw(com::sun::star::uno::RuntimeException)
- { return _aData.Double; }
- virtual test::TestEnum SAL_CALL getEnum() throw(com::sun::star::uno::RuntimeException)
- { return _aData.Enum; }
- virtual rtl::OUString SAL_CALL getString() throw(com::sun::star::uno::RuntimeException)
- { return _aData.String; }
- virtual com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getInterface( ) throw(com::sun::star::uno::RuntimeException)
- { return _aData.Interface; }
- virtual com::sun::star::uno::Any SAL_CALL getAny() throw(com::sun::star::uno::RuntimeException)
- { return _aData.Any; }
- virtual com::sun::star::uno::Sequence< test::TestElement > SAL_CALL getSequence() throw(com::sun::star::uno::RuntimeException)
- { return _aData.Sequence; }
- virtual test::TestData SAL_CALL getStruct() throw(com::sun::star::uno::RuntimeException)
- { return _aStructData; }
-
- virtual void SAL_CALL setBool( sal_Bool _bool ) throw(::com::sun::star::uno::RuntimeException)
- { _aData.Bool = _bool; }
- virtual void SAL_CALL setByte( sal_Int8 _byte ) throw(::com::sun::star::uno::RuntimeException)
- { _aData.Byte = _byte; }
- virtual void SAL_CALL setChar( sal_Unicode _char ) throw(::com::sun::star::uno::RuntimeException)
- { _aData.Char = _char; }
- virtual void SAL_CALL setShort( sal_Int16 _short ) throw(::com::sun::star::uno::RuntimeException)
- { _aData.Short = _short; }
- virtual void SAL_CALL setUShort( sal_uInt16 _ushort ) throw(::com::sun::star::uno::RuntimeException)
- { _aData.UShort = _ushort; }
- virtual void SAL_CALL setLong( sal_Int32 _long ) throw(::com::sun::star::uno::RuntimeException)
- { _aData.Long = _long; }
- virtual void SAL_CALL setULong( sal_uInt32 _ulong ) throw(::com::sun::star::uno::RuntimeException)
- { _aData.ULong = _ulong; }
- virtual void SAL_CALL setHyper( sal_Int64 _hyper ) throw(::com::sun::star::uno::RuntimeException)
- { _aData.Hyper = _hyper; }
- virtual void SAL_CALL setUHyper( sal_uInt64 _uhyper ) throw(::com::sun::star::uno::RuntimeException)
- { _aData.UHyper = _uhyper; }
- virtual void SAL_CALL setFloat( float _float ) throw(::com::sun::star::uno::RuntimeException)
- { _aData.Float = _float; }
- virtual void SAL_CALL setDouble( double _double ) throw(::com::sun::star::uno::RuntimeException)
- { _aData.Double = _double; }
- virtual void SAL_CALL setEnum( test::TestEnum _enum ) throw(::com::sun::star::uno::RuntimeException)
- { _aData.Enum = _enum; }
- virtual void SAL_CALL setString( const ::rtl::OUString& _string ) throw(::com::sun::star::uno::RuntimeException)
- { _aData.String = _string; }
- virtual void SAL_CALL setInterface( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _interface ) throw(::com::sun::star::uno::RuntimeException)
- { _aData.Interface = _interface; }
- virtual void SAL_CALL setAny( const ::com::sun::star::uno::Any& _any ) throw(::com::sun::star::uno::RuntimeException)
- { _aData.Any = _any; }
- virtual void SAL_CALL setSequence( const ::com::sun::star::uno::Sequence<test::TestElement >& _sequence ) throw(::com::sun::star::uno::RuntimeException)
- { _aData.Sequence = _sequence; }
- virtual void SAL_CALL setStruct( const test::TestData& _struct ) throw(::com::sun::star::uno::RuntimeException)
- { _aStructData = _struct; }
-
- // XLanguageBindingTest
- virtual test::TestData SAL_CALL raiseException( sal_Bool& bBool, sal_Unicode& cChar, sal_Int8& nByte, sal_Int16& nShort, sal_uInt16& nUShort, sal_Int32& nLong, sal_uInt32& nULong, sal_Int64& nHyper, sal_uInt64& nUHyper, float& fFloat, double& fDouble, test::TestEnum& eEnum, ::rtl::OUString& aString, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xInterface, ::com::sun::star::uno::Any& aAny, ::com::sun::star::uno::Sequence<test::TestElement >& aSequence,test::TestData& aStruct )
- throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
-
- virtual sal_Int32 SAL_CALL getRuntimeException() throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setRuntimeException( sal_Int32 _runtimeexception ) throw(::com::sun::star::uno::RuntimeException);
-};
-//__________________________________________________________________________________________________
-void Test_Impl::setValues( sal_Bool bBool, sal_Unicode cChar, sal_Int8 nByte,
- sal_Int16 nShort, sal_uInt16 nUShort,
- sal_Int32 nLong, sal_uInt32 nULong,
- sal_Int64 nHyper, sal_uInt64 nUHyper,
- float fFloat, double fDouble,
- test::TestEnum eEnum, const ::rtl::OUString& rStr,
- const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xTest,
- const ::com::sun::star::uno::Any& rAny,
- const ::com::sun::star::uno::Sequence<test::TestElement >& rSequence,
- const test::TestData& rStruct )
- throw(com::sun::star::uno::RuntimeException)
-{
- assign( _aData,
- bBool, cChar, nByte, nShort, nUShort, nLong, nULong, nHyper, nUHyper, fFloat, fDouble,
- eEnum, rStr, xTest, rAny, rSequence );
- _aStructData = rStruct;
-}
-//__________________________________________________________________________________________________
-test::TestData Test_Impl::setValues2( sal_Bool& bBool, sal_Unicode& cChar, sal_Int8& nByte,
- sal_Int16& nShort, sal_uInt16& nUShort,
- sal_Int32& nLong, sal_uInt32& nULong,
- sal_Int64& nHyper, sal_uInt64& nUHyper,
- float& fFloat, double& fDouble,
- test::TestEnum& eEnum, rtl::OUString& rStr,
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xTest,
- ::com::sun::star::uno::Any& rAny,
- ::com::sun::star::uno::Sequence<test::TestElement >& rSequence,
- test::TestData& rStruct )
- throw(com::sun::star::uno::RuntimeException)
-{
- assign( _aData,
- bBool, cChar, nByte, nShort, nUShort, nLong, nULong, nHyper, nUHyper, fFloat, fDouble,
- eEnum, rStr, xTest, rAny, rSequence );
- _aStructData = rStruct;
- return _aStructData;
-}
-//__________________________________________________________________________________________________
-test::TestData Test_Impl::getValues( sal_Bool& bBool, sal_Unicode& cChar, sal_Int8& nByte,
- sal_Int16& nShort, sal_uInt16& nUShort,
- sal_Int32& nLong, sal_uInt32& nULong,
- sal_Int64& nHyper, sal_uInt64& nUHyper,
- float& fFloat, double& fDouble,
- test::TestEnum& eEnum, rtl::OUString& rStr,
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xTest,
- ::com::sun::star::uno::Any& rAny,
- ::com::sun::star::uno::Sequence<test::TestElement >& rSequence,
- test::TestData& rStruct )
- throw(com::sun::star::uno::RuntimeException)
-{
- bBool = _aData.Bool;
- cChar = _aData.Char;
- nByte = _aData.Byte;
- nShort = _aData.Short;
- nUShort = _aData.UShort;
- nLong = _aData.Long;
- nULong = _aData.ULong;
- nHyper = _aData.Hyper;
- nUHyper = _aData.UHyper;
- fFloat = _aData.Float;
- fDouble = _aData.Double;
- eEnum = _aData.Enum;
- rStr = _aData.String;
- xTest = _aData.Interface;
- rAny = _aData.Any;
- rSequence = _aData.Sequence;
- rStruct = _aStructData;
- return _aStructData;
-}
-
-//==================================================================================================
-static sal_Bool performTest(
- const Reference< XLanguageBindingTest > & xLBT,
- const Reference< XInterface > & xDummyInterface )
-{
- OSL_ENSURE( xLBT.is() && xDummyInterface.is(), "### no test interfaces!" );
- if (xLBT.is() && xDummyInterface.is())
- {
- // this data is never ever granted access to by calls other than equals(), assign()!
- test::TestData aData; // test against this data
-
- assign( (test::TestElement &)aData,
- sal_True, '@', 17, 0x1234, 0xfedc, 0x12345678, 0xfedcba98,
- SAL_CONST_INT64(0x123456789abcdef0),
- SAL_CONST_UINT64(0xfedcba9876543210),
- (float)17.0815, 3.1415926359, TestEnum_LOLA,
- OUString::createFromAscii("dumdidum"), xDummyInterface,
- makeAny( xDummyInterface ) );
- aData.Sequence = Sequence<test::TestElement >( (const test::TestElement *)&aData, 1 );
- OSL_ENSURE( aData.Any == xDummyInterface, "### unexpected any!" );
- OSL_ENSURE( !(aData.Any != xDummyInterface), "### unexpected any!" );
-
- // aData complete ==> never touched again
- //================================================================================
-
- // this is a manually copy of aData for first setting...
- test::TestData aSetData0( aData ); // copy ctor
- // assignment
- test::TestData aSetData1 = aSetData0;
-
- test::TestData aSetData;
- assign( (test::TestElement &)aSetData,
- aSetData1.Bool, aSetData1.Char, aSetData1.Byte, aSetData1.Short, aSetData1.UShort,
- aSetData1.Long, aSetData1.ULong, aSetData1.Hyper, aSetData1.UHyper,
- aSetData1.Float, aSetData1.Double,
- aSetData1.Enum, aSetData1.String, aSetData1.Interface, aSetData1.Any );
- // switch over to new sequence allocation
- aSetData.Sequence = Sequence<test::TestElement >( (const test::TestElement *)&aSetData, 1 );
-
- xLBT->setValues(
- aSetData.Bool, aSetData.Char, aSetData.Byte, aSetData.Short, aSetData.UShort,
- aSetData.Long, aSetData.ULong, aSetData.Hyper, aSetData.UHyper, aSetData.Float, aSetData.Double,
- aSetData.Enum, aSetData.String, aSetData.Interface, aSetData.Any, aSetData.Sequence, aSetData );
-
- {
- test::TestData aRet, aRet2;
- xLBT->getValues(
- aRet.Bool, aRet.Char, aRet.Byte, aRet.Short, aRet.UShort,
- aRet.Long, aRet.ULong, aRet.Hyper, aRet.UHyper, aRet.Float, aRet.Double,
- aRet.Enum, aRet.String, aRet.Interface, aRet.Any, aRet.Sequence, aRet2 );
-
- OSL_ASSERT( equals( aData, aRet ) && equals( aData, aRet2 ) );
-
- // set last retrieved values
- test::TestData aSV2ret = xLBT->setValues2(
- aRet.Bool, aRet.Char, aRet.Byte, aRet.Short, aRet.UShort,
- aRet.Long, aRet.ULong, aRet.Hyper, aRet.UHyper, aRet.Float, aRet.Double,
- aRet.Enum, aRet.String, aRet.Interface, aRet.Any, aRet.Sequence, aRet2 );
-
- OSL_ASSERT( equals( aData, aSV2ret ) && equals( aData, aRet2 ) );
- }
- {
- test::TestData aRet, aRet2;
- test::TestData aGVret = xLBT->getValues(
- aRet.Bool, aRet.Char, aRet.Byte, aRet.Short, aRet.UShort,
- aRet.Long, aRet.ULong, aRet.Hyper, aRet.UHyper, aRet.Float, aRet.Double,
- aRet.Enum, aRet.String, aRet.Interface, aRet.Any, aRet.Sequence, aRet2 );
-
- OSL_ASSERT( equals( aData, aRet ) && equals( aData, aRet2 ) && equals( aData, aGVret ) );
-
- // set last retrieved values
- xLBT->setBool( aRet.Bool );
- xLBT->setChar( aRet.Char );
- xLBT->setByte( aRet.Byte );
- xLBT->setShort( aRet.Short );
- xLBT->setUShort( aRet.UShort );
- xLBT->setLong( aRet.Long );
- xLBT->setULong( aRet.ULong );
- xLBT->setHyper( aRet.Hyper );
- xLBT->setUHyper( aRet.UHyper );
- xLBT->setFloat( aRet.Float );
- xLBT->setDouble( aRet.Double );
- xLBT->setEnum( aRet.Enum );
- xLBT->setString( aRet.String );
- xLBT->setInterface( aRet.Interface );
- xLBT->setAny( aRet.Any );
- xLBT->setSequence( aRet.Sequence );
- xLBT->setStruct( aRet2 );
- }
- {
- test::TestData aRet, aRet2;
- aRet.Hyper = xLBT->getHyper();
- aRet.UHyper = xLBT->getUHyper();
- aRet.Float = xLBT->getFloat();
- aRet.Double = xLBT->getDouble();
- aRet.Byte = xLBT->getByte();
- aRet.Char = xLBT->getChar();
- aRet.Bool = xLBT->getBool();
- aRet.Short = xLBT->getShort();
- aRet.UShort = xLBT->getUShort();
- aRet.Long = xLBT->getLong();
- aRet.ULong = xLBT->getULong();
- aRet.Enum = xLBT->getEnum();
- aRet.String = xLBT->getString();
- aRet.Interface = xLBT->getInterface();
- aRet.Any = xLBT->getAny();
- aRet.Sequence = xLBT->getSequence();
- aRet2 = xLBT->getStruct();
-
- OSL_ASSERT( equals( aData, aRet ) && equals( aData, aRet2 ) );
- }
- {
- test::SmallStruct aIn(1, 2);
- test::SmallStruct aOut = xLBT->echoSmallStruct(aIn);
- OSL_ASSERT( memcmp(&aIn, &aOut, sizeof(test::SmallStruct)) == 0 );
- }
- {
- test::MediumStruct aIn(1, 2, 3, 4);
- test::MediumStruct aOut = xLBT->echoMediumStruct(aIn);
- OSL_ASSERT( memcmp(&aIn, &aOut, sizeof(test::MediumStruct)) == 0 );
- }
- {
- test::BigStruct aIn(1, 2, 3, 4, 5, 6, 7, 8);
- test::BigStruct aOut = xLBT->echoBigStruct(aIn);
- OSL_ASSERT( memcmp(&aIn, &aOut, sizeof(test::BigStruct)) == 0 );
- }
- {
- test::AllFloats aIn(1.1, 2.2, 3.3, 4.4);
- test::AllFloats aOut = xLBT->echoAllFloats(aIn);
- return( memcmp(&aIn, &aOut, sizeof(test::AllFloats)) == 0 );
- }
- }
- return sal_False;
-}
-
-//__________________________________________________________________________________________________
-test::TestData Test_Impl::raiseException( sal_Bool& /*bBool*/, sal_Unicode& /*cChar*/, sal_Int8& /*nByte*/, sal_Int16& /*nShort*/, sal_uInt16& /*nUShort*/, sal_Int32& /*nLong*/, sal_uInt32& /*nULong*/, sal_Int64& /*nHyper*/, sal_uInt64& /*nUHyper*/, float& /*fFloat*/, double& /*fDouble*/, test::TestEnum& /*eEnum*/, ::rtl::OUString& /*aString*/, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& /*xInterface*/, ::com::sun::star::uno::Any& /*aAny*/, ::com::sun::star::uno::Sequence< test::TestElement >& /*aSequence*/, test::TestData& /*aStruct*/ )
- throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
-{
- lang::IllegalArgumentException aExc;
- aExc.ArgumentPosition = 5;
- aExc.Message = OUString::createFromAscii( "dum dum dum ich tanz im kreis herum..." );
- aExc.Context = getInterface();
- throw aExc;
-}
-//__________________________________________________________________________________________________
-sal_Int32 Test_Impl::getRuntimeException() throw(::com::sun::star::uno::RuntimeException)
-{
- lang::DisposedException aExc;
- aExc.Message = OUString::createFromAscii( "dum dum dum ich tanz im kreis herum..." );
- aExc.Context = getInterface();
- throw aExc;
-}
-//__________________________________________________________________________________________________
-void Test_Impl::setRuntimeException( sal_Int32 /*_runtimeexception*/ ) throw(::com::sun::star::uno::RuntimeException)
-{
- lang::DisposedException aExc;
- aExc.Message = OUString::createFromAscii( "dum dum dum ich tanz im kreis herum..." );
- aExc.Context = getInterface();
- throw aExc;
-}
-
-static void raising1( const Reference< XLanguageBindingTest > & xLBT )
-{
- test::TestData aRet, aRet2;
- xLBT->raiseException(
- aRet.Bool, aRet.Char, aRet.Byte, aRet.Short, aRet.UShort,
- aRet.Long, aRet.ULong, aRet.Hyper, aRet.UHyper, aRet.Float, aRet.Double,
- aRet.Enum, aRet.String, aRet.Interface, aRet.Any, aRet.Sequence, aRet2 );
-}
-static void raising2( const Reference< XLanguageBindingTest > & xLBT )
-{
- try
- {
- raising1( xLBT );
- }
- catch (RuntimeException &)
- {
- }
- catch (...)
- {
- throw;
- }
-}
-//==================================================================================================
-sal_Bool raiseException( const Reference< XLanguageBindingTest > & xLBT )
-{
- try
- {
- xLBT->getRuntimeException();
- }
- catch (lang::DisposedException & exc)
- {
- OSL_ENSURE( exc.Context == xLBT->getInterface() &&
- exc.Message.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("dum dum dum ich tanz im kreis herum...") ),
- "### unexpected exception content!" );
- }
- catch (RuntimeException &)
- {
- }
- catch (Exception &)
- {
- return sal_False;
- }
- catch (...)
- {
- return sal_False;
- }
-
- sal_Int32 nCount = 0;
- try
- {
- try
- {
- try
- {
- raising2( xLBT );
- }
- catch (RuntimeException &)
- {
- }
- catch (lang::IllegalArgumentException aExc)
- {
- ++nCount;
- OSL_ENSURE( aExc.ArgumentPosition == 5 &&
- aExc.Context == xLBT->getInterface() &&
- aExc.Message.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("dum dum dum ich tanz im kreis herum...") ),
- "### unexpected exception content!" );
-
- /** it is certain, that the RuntimeException testing will fail, if no */
- xLBT->getRuntimeException();
- }
- }
- catch (const RuntimeException & rExc)
- {
- ++nCount;
- OSL_ENSURE( rExc.Context == xLBT->getInterface() &&
- rExc.Message.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("dum dum dum ich tanz im kreis herum...") ),
- "### unexpected exception content!" );
-
- /** it is certain, that the RuntimeException testing will fail, if no */
- xLBT->setRuntimeException( 0xcafebabe );
- }
- catch (lang::IllegalArgumentException &)
- {
- }
- }
- catch (Exception & rExc)
- {
- ++nCount;
- OSL_ENSURE( rExc.Context == xLBT->getInterface() &&
- rExc.Message.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("dum dum dum ich tanz im kreis herum...") ),
- "### unexpected exception content!" );
- return (nCount == 3 &&
- rExc.Context == xLBT->getInterface() &&
- rExc.Message.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("dum dum dum ich tanz im kreis herum...") ));
- }
- return sal_False;
-}
-
-//==================================================================================================
-static void checkInvalidInterfaceQuery(
- Reference< XInterface > const & xObj )
-{
- try
- {
- Any aRet( xObj->queryInterface( ::getCppuType( (const lang::IllegalArgumentException *)0 ) ) );
- OSL_ASSERT( ! aRet.hasValue() );
- }
- catch (RuntimeException &)
- {
- }
- try
- {
- Reference< lang::XComponent > xComp( xObj, UNO_QUERY_THROW );
- OSL_ASSERT( 0 );
- }
- catch (RuntimeException & /*exc*/)
- {
-// OString str( OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ) );
-// OSL_TRACE( str.getStr() );
- }
-}
-
-//==================================================================================================
-static bool perform_test(
- Reference< XLanguageBindingTest > const & xObj,
- Reference< XInterface > const & xDummy )
-{
- checkInvalidInterfaceQuery( xObj );
-
- if (performTest( xObj, xDummy ))
- {
- ::fprintf( stderr, "> invocation test succeeded!\n" );
- if (raiseException( xObj ))
- {
- ::fprintf( stderr, "> exception test succeeded!\n" );
- return true;
- }
- else
- {
- ::fprintf( stderr, "> exception test failed!\n" );
- }
- }
-
- ::fprintf( stderr, "> dynamic invocation test failed!\n" );
- return false;
-}
-
-//==================================================================================================
-void test_CppBridge(void)
-{
- // C++-UNO test
- {
- TestDummy * p = new TestDummy();
- Reference< XInterface > xDummy( *p );
- {
- Test_Impl * p2 = new Test_Impl();
- Reference< XLanguageBindingTest > xOriginal( p2 );
- checkInvalidInterfaceQuery( xOriginal );
- {
- const char * pExtraMapping = "";
-
- Reference< XLanguageBindingTest > xMapped;
- {
- uno_Interface * pUnoI = 0;
-
- OUString aCppEnvTypeName( RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME) );
- OUString aUnoEnvTypeName( RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO) );
-
- uno_Environment * pCppEnv = 0;
- uno_Environment * pUnoEnv = 0;
- ::uno_getEnvironment( &pCppEnv, aCppEnvTypeName.pData, 0 );
- ::uno_getEnvironment( &pUnoEnv, aUnoEnvTypeName.pData, 0 );
-
- // C++ -> UNO
- Mapping mapping( pCppEnv, pUnoEnv );
- mapping.mapInterface( (void **)&pUnoI, xOriginal.get(), ::getCppuType( &xOriginal ) );
-
-#ifdef EXTRA_MAPPING
- // UNO -> ano C++a
- ::uno_createEnvironment( &pCppEnv, aCppEnvTypeName.pData, 0 );
- mapping = Mapping( pUnoEnv, pCppEnv );
- mapping.mapInterface( (void **)&xMapped, pUnoI, ::getCppuType( &xMapped ) );
- // ano C++a -> ano UNOa
- ::uno_createEnvironment( &pUnoEnv, aUnoEnvTypeName.pData, 0 );
- mapping = Mapping( pCppEnv, pUnoEnv );
- mapping.mapInterface( (void **)&pUnoI, xMapped.get(), ::getCppuType( &xMapped ) );
- pExtraMapping = " <-> c++ <-> uno";
-#endif
-
- // ano UNOa -> ano C++b
- ::uno_createEnvironment( &pCppEnv, aCppEnvTypeName.pData, 0 );
- mapping = Mapping( pUnoEnv, pCppEnv );
- mapping.mapInterface( (void **)&xMapped, pUnoI, ::getCppuType( &xMapped ) );
- (*pUnoI->release)( pUnoI );
- (*pCppEnv->release)( pCppEnv );
- (*pUnoEnv->release)( pUnoEnv );
- }
-
- if (perform_test( xMapped, xDummy ))
- {
- ::fprintf( stderr, "> C++-UNO test (c++ <-> uno%s <-> c++ [component impl]) succeeded!\n", pExtraMapping );
- }
- else
- {
- ::fprintf( stderr, "> C++-UNO test (c++ <-> uno%s <-> c++ [component impl]) failed!\n", pExtraMapping );
- exit( 1 );
- }
- }
- OSL_ENSURE( p2->getRefCount() == 1, "### test object ref count > 1 !" );
- }
- OSL_ENSURE( p->getRefCount() == 1, "### dummy object ref count > 1 !" );
- }
-}
-
-//==================================================================================================
-void test_CBridge(void)
-{
- // C-UNO test
- {
- TestDummy * p = new TestDummy();
- Reference< XInterface > xDummy( *p );
- {
- Test_Impl * p2 = new Test_Impl();
- Reference< XLanguageBindingTest > xOriginal( p2 );
- checkInvalidInterfaceQuery( xOriginal );
- {
- Reference< XLanguageBindingTest > xMapped;
- {
- uno_Interface * pUnoI2 = 0;
- void * pC = 0;
- uno_Interface * pUnoI1 = 0;
-
- OUString aCppEnvTypeName( RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME) );
- OUString aCEnvTypeName( RTL_CONSTASCII_USTRINGPARAM(UNO_LB_C) );
- OUString aUnoEnvTypeName( RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO) );
-
- // C++ -> UNO
- uno_Environment * pCppEnv = 0;
- uno_Environment * pUnoEnv = 0;
- ::uno_getEnvironment( &pCppEnv, aCppEnvTypeName.pData, 0 );
- ::uno_getEnvironment( &pUnoEnv, aUnoEnvTypeName.pData, 0 );
- Mapping aCpp2Uno( pCppEnv, pUnoEnv );
- aCpp2Uno.mapInterface( (void **)&pUnoI1, xOriginal.get(), ::getCppuType( &xOriginal ) );
- (*pCppEnv->release)( pCppEnv );
-
- // UNO -> C
- uno_Environment * pCEnv = 0;
- ::uno_getEnvironment( &pCEnv, aCEnvTypeName.pData, 0 );
- Mapping aUno2C( pUnoEnv, pCEnv );
- aUno2C.mapInterface( &pC, pUnoI1, ::getCppuType( &xOriginal ) );
- (*pUnoI1->release)( pUnoI1 );
- (*pUnoEnv->release)( pUnoEnv );
-
- // C -> ano UNO
- uno_Environment * pAnoUnoEnv = 0;
- ::uno_createEnvironment( &pAnoUnoEnv, aUnoEnvTypeName.pData, 0 ); // anonymous
- Mapping aC2Uno( pCEnv, pAnoUnoEnv );
- aC2Uno.mapInterface( (void **)&pUnoI2, pC, ::getCppuType( &xOriginal ) );
- (*pCEnv->pExtEnv->releaseInterface)( pCEnv->pExtEnv, pC );
- (*pCEnv->release)( pCEnv );
-
- // ano UNO -> ano C++
- uno_Environment * pAnoCppEnv = 0;
- ::uno_createEnvironment( &pAnoCppEnv, aCppEnvTypeName.pData, 0 );
- Mapping aUno2Cpp( pAnoUnoEnv, pAnoCppEnv );
- (*pAnoCppEnv->release)( pAnoCppEnv );
- (*pAnoUnoEnv->release)( pAnoUnoEnv );
- aUno2Cpp.mapInterface( (void **)&xMapped, pUnoI2, ::getCppuType( &xOriginal ) );
- (*pUnoI2->release)( pUnoI2 );
- }
-
- if (perform_test( xMapped, xDummy ))
- {
- ::fprintf( stderr, "> C-UNO test (c++ <-> uno <-> c <-> uno <-> c++ [component impl]) succeeded!\n" );
- }
- else
- {
- ::fprintf( stderr, "> C-UNO test (c++ <-> uno <-> c <-> uno <-> c++ [component impl]) failed!\n" );
- exit( 1 );
- }
- }
- OSL_ENSURE( p->getRefCount() == 1, "### test object ref count > 1 !" );
- }
- OSL_ENSURE( p->getRefCount() == 1, "### dummy object ref count > 1 !" );
- }
-}
-#if 0
-//==================================================================================================
-extern "C" com_sun_star_uno_XInterface* SAL_CALL createTestObject();
-
-void test_CBridge2(void)
-{
- // C-UNO test
- {
- TestDummy * p = new TestDummy();
- Reference< XInterface > xDummy( *p );
- {
- com_sun_star_uno_XInterface* pXIface = createTestObject();
- test_XLanguageBindingTest* pXLBTest = 0;
- uno_Any aExc;
- Reference< XLanguageBindingTest > xMapped;
-
- OSL_ENSURE( pXIface != 0, "create test object failed\n");
-
- /* Get interface XFoo2 */
- if (CUNO_EXCEPTION_OCCURED( CUNO_CALL(pXIface)->queryInterface( pXIface, &aExc, (com_sun_star_uno_XInterface**)&pXLBTest, ::getCppuType( &xMapped ).getTypeLibType()) ))
- {
- uno_any_destruct( &aExc, 0 );
- }
- OSL_ENSURE( pXLBTest != 0, "query_Interface XLanguageBindingTest failed\n");
-
- Mapping aC2Cpp(
- OUString( RTL_CONSTASCII_USTRINGPARAM(UNO_LB_C) ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME) ) );
- aC2Cpp.mapInterface( (void **)&xMapped, pXLBTest, ::getCppuType( &xMapped ) );
-
- OSL_ENSURE( xMapped.is(), "mapping interface failed\n");
-
- if (perform_test( xMapped, xDummy ))
- {
- ::fprintf( stderr, "> second C-UNO test (c++ <-> uno <-> c [component impl]) succeeded!\n" );
- }
- else
- {
- ::fprintf( stderr, "> second C-UNO test (c++ <-> uno <-> c [component impl]) failed!\n" );
- exit( 1 );
- }
-
-
- CUNO_CALL(pXIface)->release( pXIface );
- CUNO_CALL(pXLBTest)->release( (com_sun_star_uno_XInterface *)pXLBTest );
- }
- OSL_ENSURE( p->getRefCount() == 1, "### dummy object ref count > 1 !" );
- }
-
-}
-#endif
-
diff --git a/cppu/test/test_sec.cxx b/cppu/test/test_sec.cxx
deleted file mode 100644
index 0bc3585e23d0..000000000000
--- a/cppu/test/test_sec.cxx
+++ /dev/null
@@ -1,211 +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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_cppu.hxx"
-
-#include <stdio.h>
-
-
-#include <uno/current_context.hxx>
-
-#include <cppuhelper/implbase1.hxx>
-
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include <com/sun/star/loader/XImplementationLoader.hpp>
-#include <com/sun/star/container/XNameContainer.hpp>
-
-using namespace rtl;
-using namespace cppu;
-using namespace com::sun::star::uno;
-using namespace com::sun::star::security;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::loader;
-using namespace com::sun::star::registry;
-using namespace com::sun::star::container;
-
-
-static inline void out( const sal_Char * p )
-{
- ::fprintf( stderr, p );
-}
-static inline void out( const OUString & r )
-{
- OString aStr( OUStringToOString( r, RTL_TEXTENCODING_ASCII_US ) );
- out( aStr.getStr() );
-}
-
-
-static Reference< XInterface > load(
- const Reference< XMultiServiceFactory > & xMgr,
- const char * service,
- const char * implName, const char * activator, const char * loc ) throw ()
-{
- Reference< XInterface > xRet(
- xMgr->createInstance( OUString::createFromAscii( service ) ) );
- if (xRet.is())
- return xRet;
-
- try
- {
- Reference< XImplementationLoader > xLoader(
- xMgr->createInstance( OUString::createFromAscii( activator ) ), UNO_QUERY );
- if (xLoader.is())
- {
- Reference< XSingleServiceFactory > xFac( xLoader->activate(
- OUString::createFromAscii( implName ), OUString(),
- OUString::createFromAscii( loc ),
- Reference< XRegistryKey >() ), UNO_QUERY );
- if (xFac.is())
- return xFac->createInstance();
- }
- else
- {
- out( "### cannot activate loader \"" );
- out( activator );
- out( "\"!\n" );
- }
- }
- catch (Exception &)
- {
- out( "### cannot activate service \"" );
- out( service );
- out( "\"!\n" );
- }
- return Reference< XInterface >();
-}
-
-static void setEnv( const Reference< XMultiServiceFactory > & xMgr ) throw ()
-{
- OSL_ASSERT( xMgr.is() );
- Reference< XNameContainer > xContext( getCurrentContext(), UNO_QUERY );
- OSL_ASSERT( xContext.is() );
-
- try
- {
- xContext->insertByName(
- OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.lang.ServiceManager") ),
- makeAny( xMgr ) );
- xContext->insertByName(
- OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.security.AccessController") ),
- makeAny( load( xMgr,
- "com.sun.star.security.AccessController",
- "com.sun.star.comp.security.AccessController",
- "com.sun.star.loader.Java2",
- "com.sun.star.comp.security.AccessController" ) ) );
- xContext->insertByName(
- OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.security.auth.login.LoginContext") ),
- makeAny( load( xMgr,
- "com.sun.star.security.auth.login.LoginContext",
- "com.sun.star.comp.security.auth.login.LoginContext",
- "com.sun.star.loader.Java2",
- "com.sun.star.comp.security.auth.login.LoginContext" ) ) );
- }
- catch (Exception & rExc)
- {
- out( "### exception occured: " );
- out( rExc.Message );
- out( "\n" );
- }
-}
-
-//##################################################################################################
-//##################################################################################################
-//##################################################################################################
-
-struct PrivAction : WeakImplHelper1< XPrivilegedAction >
-{
- virtual Any SAL_CALL run()
- throw (Exception)
- {
- throw IllegalArgumentException(
- OUString::createFromAscii("testtest"), (OWeakObject *)this, (sal_Int16)5 );
- }
-};
-
-struct Thread1 : public OThread
-{
- Reference< XMultiServiceFactory > _xMgr;
-
- Thread1( const Reference< XMultiServiceFactory > & xMgr )
- : _xMgr( xMgr )
- {}
-
- void f()
- {
- Reference< XNameAccess > xAccess( getCurrentContext(), UNO_QUERY );
- OSL_ASSERT( xAccess->getByName( OUString::createFromAscii("a") ) == (sal_Int16)5 );
- Reference< XNameContainer > xCont( getCurrentContext(), UNO_QUERY );
- xCont->insertByName( OUString::createFromAscii("b"), makeAny( (sal_Int32)6 ) );
- }
- virtual void SAL_CALL run()
- {
- try
- {
- setEnv( _xMgr );
- Reference< XNameContainer > xCont( getCurrentContext(), UNO_QUERY );
- xCont->insertByName( OUString::createFromAscii("a"), makeAny( (sal_Int32)5 ) );
- f();
- Reference< XNameAccess > xAccess( getCurrentContext(), UNO_QUERY );
- OSL_ASSERT( xAccess->getByName( OUString::createFromAscii("b") ) == (sal_Int16)6 );
-
-// checkPermission(
-// Permission( OUString::createFromAscii("java.io.FilePermission"),
-// OUString::createFromAscii("f:\\userprofiles.dat"),
-// OUString::createFromAscii("read") ) );
-
-// try
-// {
-// Reference< XCurrentContext > xContext( getCurrentContext() );
-// Reference< XAccessController > xACC( xContext->getAccessController() );
-// xACC->doPrivileged( new PrivAction(), Reference< XAccessControlContext >() );
-// }
-// catch (IllegalArgumentException & r)
-// {
-// OSL_ASSERT( r.ArgumentPosition == 5 &&
-// r.Message.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("testtest") ));
-// }
- }
- catch (RuntimeException & rExc)
- {
- out( rExc.Message );
- }
- }
-};
-
-
-void test_security( const Reference< XMultiServiceFactory > & xMgr ) throw ()
-{
- setEnv( xMgr );
- OSL_ASSERT( getCurrentContext()->getServiceManager().is() );
-
- Thread1 thread1( xMgr );
- thread1.create();
- thread1.join();
- out( "> exiting...\n" );
-}
diff --git a/cppu/test/testcppu.cxx b/cppu/test/testcppu.cxx
deleted file mode 100644
index b132ab0cb281..000000000000
--- a/cppu/test/testcppu.cxx
+++ /dev/null
@@ -1,1241 +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 !defined(OSL_DEBUG_LEVEL) || OSL_DEBUG_LEVEL == 0
-# undef OSL_DEBUG_LEVEL
-# define OSL_DEBUG_LEVEL 2
-#endif
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_cppu.hxx"
-
-#include "sal/main.h"
-
-#include <stdio.h>
-
-#include <uno/environment.h>
-#include <uno/mapping.hxx>
-
-#include <uno/dispatcher.h>
-#include <rtl/alloc.h>
-#include <rtl/unload.h>
-
-#include <cppuhelper/queryinterface.hxx>
-#include <com/sun/star/uno/Exception.hpp>
-#include <com/sun/star/uno/XInterface.hpp>
-#include <com/sun/star/uno/Uik.hpp>
-#include <rtl/ustring.hxx>
-#include <osl/diagnose.h>
-#include <osl/interlck.h>
-#include <sal/types.h>
-
-#include <test/Test1.hpp>
-#include <test/Test2.hpp>
-#include <test/TdTest1.hpp>
-#include <test/Test3.hpp>
-#include <test/Base.hpp>
-#include <test/Base1.hpp>
-#include <test/Base2.hpp>
-
-#include <uno/current_context.hxx>
-#include <cppuhelper/bootstrap.hxx>
-#include <cppuhelper/implbase1.hxx>
-
-#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
-#include <com/sun/star/uno/XCurrentContext.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <test/XSimpleInterface.hpp>
-#include <test/XLanguageBindingTest.hpp>
-#include <com/sun/star/registry/XSimpleRegistry.hpp>
-
-using namespace test;
-using namespace rtl;
-using namespace osl;
-
-using namespace com::sun::star;
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::registry;
-using namespace test;
-
-
-sal_Int32 getSize( const Type & rT )
-{
- sal_Int32 nSize;
- typelib_TypeDescription * pTD = 0;
- typelib_typedescriptionreference_getDescription( &pTD, rT.getTypeLibType() );
- nSize = pTD->nSize;
- typelib_typedescription_release( pTD );
- return nSize;
-}
-
-/*
- * main.
- */
-void testCppu()
-{
- Any a(false);
-#if 0
- // the following don't compile, which is ok:
- a.get<sal_Unicode>();
- a.get<sal_uInt16>();
- a.has<sal_Unicode>();
- a.has<sal_uInt16>();
- Any a_( static_cast<sal_Unicode>('a') );
-#endif
- OSL_ASSERT( a.getValueTypeClass() == TypeClass_BOOLEAN );
- OSL_ASSERT( !a.get<bool>() && !a.get<sal_Bool>() );
- a <<= sal_False;
- OSL_ASSERT( a.getValueTypeClass() == TypeClass_BOOLEAN );
- OSL_ASSERT( !a.get<bool>() && !a.get<sal_Bool>() );
- a = Any(sal_False);
- OSL_ASSERT( a.getValueTypeClass() == TypeClass_BOOLEAN );
- OSL_ASSERT( !a.get<bool>() && !a.get<sal_Bool>() );
- Any b( static_cast<sal_Int8>(32) );
- OSL_ASSERT( b.getValueTypeClass() == TypeClass_BYTE );
- OSL_ASSERT( b.get<sal_Int64>() == 32 &&
- b.get<sal_uInt64>() == 32 &&
- b.get<sal_Int32>() == 32 &&
- b.get<sal_uInt32>() == 32 &&
- b.get<sal_Int16>() == 32 &&
- b.get<sal_Int8>() == 32 );
- OSL_ASSERT( b.has<sal_Int64>() &&
- b.has<sal_uInt64>() &&
- b.has<sal_Int32>() &&
- b.has<sal_uInt32>() &&
- b.has<sal_Int16>() &&
- b.has<sal_Int8>() );
- b <<= true;
- OSL_ASSERT( b.getValueTypeClass() == TypeClass_BOOLEAN );
- OSL_ASSERT( b.get<bool>() && b.get<sal_Bool>() );
- try {
- b.get<sal_Int8>();
- OSL_ASSERT(false);
- }
- catch (RuntimeException & /*exc*/) {
-// exc;
- }
- try {
- const Sequence<beans::PropertyValue> seq(
- b.get< Sequence<beans::PropertyValue> >() );
- OSL_ASSERT(false);
- }
- catch (RuntimeException & /*exc*/) {
-// exc;
- }
-
- sal_Int32 big = 0x7fffffff;
- try
- {
- Sequence< Sequence< Any > > seq( big );
- }
- catch (::std::bad_alloc &)
- {
- }
- try
- {
- Sequence< Sequence< Any > > seq( 0, big );
- }
- catch (::std::bad_alloc &)
- {
- }
- try
- {
- Sequence< Sequence< Any > > seq;
- seq.realloc( big );
- }
- catch (::std::bad_alloc &)
- {
- }
-
- {
- // test the size of types
- OSL_ENSURE( sizeof( Uik ) == getSize( getCppuType( (Uik *)0) ),
- "bad sizeof uik" );
- OSL_ENSURE( sizeof( Test1 ) == getSize( getCppuType( (Test1*)0).getTypeLibType() ),
- "bad sizeof test1" );
-// OSL_ENSURE( sizeof( TdTest1 ) == getSize( get_test_TdTest1_Type().getTypeLibType() ),
-// "bad sizeof TypedefTest1" );
- OSL_ENSURE( sizeof( Test2 ) == getSize( getCppuType( (Test2*)0).getTypeLibType() ),
- "bad sizeof test2" );
-
-/* find the error
-sal_Int32 nPos;
-nPos = (sal_Int32)&((Test3 *)0)->nInt8;
-nPos = (sal_Int32)&((Test3 *)0)->nFloat;
-nPos = (sal_Int32)&((Test3 *)0)->nuInt8;
-nPos = (sal_Int32)&((Test3 *)0)->nDouble;
-nPos = (sal_Int32)&((Test3 *)0)->nInt16;
-nPos = (sal_Int32)&((Test3 *)0)->aString;
-nPos = (sal_Int32)&((Test3 *)0)->nuInt16;
-nPos = (sal_Int32)&((Test3 *)0)->nInt64;
-nPos = (sal_Int32)&((Test3 *)0)->nInt32;
-nPos = (sal_Int32)&((Test3 *)0)->nuInt64;
-nPos = (sal_Int32)&((Test3 *)0)->nuInt32;
-nPos = (sal_Int32)&((Test3 *)0)->eType;
-nPos = (sal_Int32)&((Test3 *)0)->wChar;
-nPos = (sal_Int32)&((Test3 *)0)->td;
-nPos = (sal_Int32)&((Test3 *)0)->bBool;
-nPos = (sal_Int32)&((Test3 *)0)->aAny;
-*/
- OSL_ENSURE( sizeof( Test3 ) == getSize( getCppuType( (Test3*)0).getTypeLibType() ),
- "bad sizeof test3" );
- }
-
- {
- // test the default constructor
- Test1 a1;
- a1.nInt16 = 4;
- a1.dDouble = 3.6;
- a1.bBool = sal_True;
- uno_type_constructData( &a1, getCppuType( (Test1*)0).getTypeLibType() );
- OSL_ASSERT( a1.nInt16 == 0 && a1.dDouble == 0.0 && a1.bBool == sal_False);
-
- Test2 a2;
- a2.nInt16 = 2;
- a2.aTest1.nInt16 = 4;
- a2.aTest1.dDouble = 3.6;
- a2.aTest1.dDouble = sal_True;
- uno_type_constructData( &a2, getCppuType( (Test2*)0).getTypeLibType() );
- OSL_ASSERT( a2.nInt16 == 0 && a2.aTest1.nInt16 == 0 && a2.aTest1.dDouble == 0.0 && a2.aTest1.bBool == sal_False);
-
- Test3 * pa3 = (Test3 *)new char[ sizeof( Test3 ) ];
- Test3 & a3 = *pa3;
- a3.nInt8 = 2;
- a3.nFloat = (float)2;
- a3.nDouble = 2;
- a3.nInt16 = 2;
- a3.nuInt16 = 2;
- a3.nInt64 = 2;
- a3.nInt32 = 2;
- a3.nuInt64 = 2;
- a3.nuInt32 = 2;
- a3.eType = TypeClass_STRUCT;
- a3.wChar = L'g';
- a3.td.nInt16 = 2;
- a3.td.dDouble = 2;
- a3.bBool = sal_True;
- uno_type_constructData( &a3, getCppuType( (Test3*)0).getTypeLibType() );
- OSL_ASSERT( a3.nInt8 == 0 && a3.nFloat == (float)0
- && a3.nDouble == 0 && a3.nInt16 == 0 && a3.aString == OUString()
- && a3.nuInt16 == 0 && a3.nInt64 == 0 && a3.nInt32 == 0
- && a3.nuInt64 == 0 && a3.nuInt32 == 0 && a3.eType == TypeClass_VOID
- && a3.wChar == L'\0' && a3.td.nInt16 == 0 && a3.td.dDouble == 0
- && a3.bBool == sal_False );
- OSL_ASSERT( a3.aAny.getValueType() == getCppuVoidType() );
- delete[] reinterpret_cast< char * >(pa3);
- }
-
- {
- // test the destructor
- long a1[ sizeof( Test1 ) / sizeof(long) +1 ];
- uno_type_constructData( &a1, getCppuType( (Test1*)0).getTypeLibType() );
- uno_type_destructData( &a1, getCppuType( (Test1*)0).getTypeLibType(), reinterpret_cast<uno_ReleaseFunc>(cpp_release) );
-
- long a2[ sizeof( Test2 ) / sizeof(long) +1 ];
- uno_type_constructData( &a2, getCppuType( (Test2*)0).getTypeLibType() );
- uno_type_destructData( &a2, getCppuType( (Test2*)0).getTypeLibType(), reinterpret_cast<uno_ReleaseFunc>(cpp_release) );
-
- long a3[ sizeof( Test3 ) / sizeof(long) +1 ];
- uno_type_constructData( &a3, getCppuType( (Test3*)0).getTypeLibType() );
- OUString aTestString( RTL_CONSTASCII_USTRINGPARAM("test") );
- ((Test3*)a3)->aString = aTestString;
- uno_type_destructData( &a3, getCppuType( (Test3*)0).getTypeLibType(), reinterpret_cast<uno_ReleaseFunc>(cpp_release) );
- OSL_ASSERT( aTestString.pData->refCount == 1 );
- }
-
- {
- // test the copy constructor
- Test1 a1;
- a1.nInt16 = 4;
- a1.dDouble = 3.6;
- a1.bBool = sal_True;
- char sz1[sizeof( Test1 )];
- uno_type_copyData( sz1, &a1, getCppuType( (Test1*)0).getTypeLibType(), reinterpret_cast<uno_AcquireFunc>(cpp_acquire) );
- OSL_ASSERT( ((Test1*)sz1)->nInt16 == 4 && ((Test1*)sz1)->dDouble == 3.6 && ((Test1*)sz1)->bBool == sal_True);
-
- Test2 a2;
- a2.nInt16 = 2;
- a2.aTest1.nInt16 = 4;
- a2.aTest1.dDouble = 3.6;
- a2.aTest1.bBool = sal_True;
- char sz2[sizeof( Test2 )];
- uno_type_copyData( sz2, &a2, getCppuType( (Test2*)0).getTypeLibType(),
- reinterpret_cast<uno_AcquireFunc>(cpp_acquire) );
- OSL_ASSERT( ((Test2*)sz2)->nInt16 == 2 );
- OSL_ASSERT(((Test2*)sz2)->aTest1.nInt16 == 4 );
- OSL_ASSERT( ((Test2*)sz2)->aTest1.dDouble == 3.6 );
- OSL_ASSERT(((Test2*)sz2)->aTest1.bBool == sal_True);
-
- Test3 a3;
- a3.nInt8 = 2;
- a3.nFloat = (float)2;
- a3.nDouble = 2;
- a3.nInt16 = 2;
- a3.aString = OUString::createFromAscii("2");
- a3.nuInt16 = 2;
- a3.nInt64 = 2;
- a3.nInt32 = 2;
- a3.nuInt64 = 2;
- a3.nuInt32 = 2;
- a3.eType = TypeClass_STRUCT;
- a3.wChar = L'2';
- a3.td.nInt16 = 2;
- a3.td.dDouble = 2;
- a3.bBool = sal_True;
- a3.aAny = makeAny( (sal_Int32)2 );
- char sz3[sizeof( Test3 )];
- uno_type_copyData( sz3, &a3, getCppuType( (Test3*)0).getTypeLibType(),
- reinterpret_cast<uno_AcquireFunc>(cpp_acquire) );
- OSL_ASSERT( ((Test3*)sz3)->nInt8 == 2 );
- OSL_ASSERT( ((Test3*)sz3)->nFloat == (float)2 );
- OSL_ASSERT( ((Test3*)sz3)->nDouble == 2 );
- OSL_ASSERT( ((Test3*)sz3)->nInt16 == 2 );
- OSL_ASSERT( ((Test3*)sz3)->aString == OUString::createFromAscii("2") );
- OSL_ASSERT( ((Test3*)sz3)->nuInt16 == 2 );
- OSL_ASSERT( ((Test3*)sz3)->nInt64 == 2 );
- OSL_ASSERT( ((Test3*)sz3)->nInt32 == 2 );
- OSL_ASSERT( ((Test3*)sz3)->nuInt64 == 2 );
- OSL_ASSERT( ((Test3*)sz3)->nuInt32 == 2 );
- OSL_ASSERT( ((Test3*)sz3)->eType == TypeClass_STRUCT );
- OSL_ASSERT( ((Test3*)sz3)->wChar == L'2' );
- OSL_ASSERT( ((Test3*)sz3)->td.nInt16 == 2 );
- OSL_ASSERT( ((Test3*)sz3)->td.dDouble == 2 );
- OSL_ASSERT( ((Test3*)sz3)->bBool == sal_True );
- OSL_ASSERT( ((Test3*)sz3)->aAny.getValueType() == getCppuType( (sal_Int32 *)0 ) );
- OSL_ASSERT( *(sal_Int32*)((Test3*)sz3)->aAny.getValue() == 2 );
- ((Test3 *)sz3)->~Test3();
- }
-
- {
- sal_Bool bAssignable;
- // test assignment
- Test1 a1;
- a1.nInt16 = 4;
- a1.dDouble = 3.6;
- a1.bBool = sal_True;
- Test1 sz1;
- bAssignable = uno_type_assignData(
- &sz1, getCppuType( (Test1*)0).getTypeLibType(),
- &a1, getCppuType( (Test1*)0).getTypeLibType(),
- reinterpret_cast<uno_QueryInterfaceFunc>(cpp_queryInterface),
- reinterpret_cast<uno_AcquireFunc>(cpp_acquire),
- reinterpret_cast<uno_ReleaseFunc>(cpp_release) );
- OSL_ASSERT( bAssignable );
- OSL_ASSERT( sz1.nInt16 == 4 && sz1.dDouble == 3.6 && sz1.bBool == sal_True);
-
- Test2 a2;
- a2.nInt16 = 2;
- a2.aTest1.nInt16 = 4;
- a2.aTest1.dDouble = 3.6;
- a2.aTest1.bBool = sal_True;
- Test2 sz2;
- bAssignable = uno_type_assignData(
- &sz2, getCppuType( (Test2*)0).getTypeLibType(),
- &a2, getCppuType( (Test2*)0).getTypeLibType(),
- reinterpret_cast<uno_QueryInterfaceFunc>(cpp_queryInterface),
- reinterpret_cast<uno_AcquireFunc>(cpp_acquire),
- reinterpret_cast<uno_ReleaseFunc>(cpp_release) );
- OSL_ASSERT( bAssignable );
- OSL_ASSERT( sz2.nInt16 == 2 && sz2.aTest1.nInt16 == 4
- && sz2.aTest1.dDouble == 3.6 && sz2.aTest1.bBool == sal_True);
-
- Test3 a3;
- Test3 sz3;
- a3.nInt8 = 2;
- a3.nFloat = (float)2;
- a3.nDouble = 2;
- a3.nInt16 = 2;
- a3.aString = OUString::createFromAscii("2");
- a3.nuInt16 = 2;
- a3.nInt64 = 2;
- a3.nInt32 = 2;
- a3.nuInt64 = 2;
- a3.nuInt32 = 2;
- a3.eType = TypeClass_STRUCT;
- a3.wChar = L'2';
- a3.td.nInt16 = 2;
- a3.td.dDouble = 2;
- a3.bBool = sal_True;
- a3.aAny = makeAny( (sal_Int32)2 );
- OSL_ASSERT( a3.aAny.isExtractableTo( ::getCppuType( (sal_Int64 const *)0 ) ) );
- OSL_ASSERT( ::getCppuType( (sal_Int64 const *)0 ).isAssignableFrom( a3.aAny.getValueType() ) );
- bAssignable = uno_type_assignData(
- &sz3, getCppuType( (Test3*)0).getTypeLibType(),
- &a3, getCppuType( (Test3*)0).getTypeLibType(),
- reinterpret_cast<uno_QueryInterfaceFunc>(cpp_queryInterface),
- reinterpret_cast<uno_AcquireFunc>(cpp_acquire),
- reinterpret_cast<uno_ReleaseFunc>(cpp_release) );
- OSL_ASSERT( bAssignable );
- OSL_ASSERT( sz3.nInt8 == 2 );
- OSL_ASSERT( sz3.nFloat == (float)2 );
- OSL_ASSERT( sz3.nDouble == 2 );
- OSL_ASSERT( sz3.nInt16 == 2 );
- OSL_ASSERT( sz3.aString == OUString::createFromAscii("2") );
- OSL_ASSERT( sz3.nuInt16 == 2 );
- OSL_ASSERT( sz3.nInt64 == 2 );
- OSL_ASSERT( sz3.nInt32 == 2 );
- OSL_ASSERT( sz3.nuInt64 == 2 );
- OSL_ASSERT( sz3.nuInt32 == 2 );
- OSL_ASSERT( sz3.eType == TypeClass_STRUCT );
- OSL_ASSERT( sz3.wChar == L'2' );
- OSL_ASSERT( sz3.td.nInt16 == 2 );
- OSL_ASSERT( sz3.td.dDouble == 2 );
- OSL_ASSERT( sz3.bBool == sal_True );
- OSL_ASSERT( sz3.aAny.getValueType() == getCppuType( (sal_Int32 *)0 ) );
- OSL_ASSERT( *(sal_Int32*)sz3.aAny.getValue() == 2 );
-
- // test not assigneable values
- bAssignable = uno_type_assignData(
- &a1, getCppuType( (Test1*)0).getTypeLibType(),
- &a2, getCppuType( (Test2*)0).getTypeLibType(),
- reinterpret_cast<uno_QueryInterfaceFunc>(cpp_queryInterface),
- reinterpret_cast<uno_AcquireFunc>(cpp_acquire), reinterpret_cast<uno_ReleaseFunc>(cpp_release) );
- OSL_ASSERT( !bAssignable );
- }
-
- {
- // test any
- Any tb;
- tb <<= true;
- OSL_ASSERT( tb.getValueType() == ::getCppuBooleanType() );
- OSL_ASSERT( tb == makeAny( true ) );
- Any aAny = makeAny( (sal_Int8)2 );
- OSL_ASSERT( aAny.getValueType() == getCppuType( (sal_Int8 *)0 ) );
- OSL_ASSERT( *(sal_Int8*)aAny.getValue() == 2 );
- aAny = makeAny( (float)2 );
- OSL_ASSERT( aAny.getValueType() == getCppuType( (float *)0 ) );
- OSL_ASSERT( *(float*)aAny.getValue() == (float)2 );
- aAny = makeAny( (sal_Int8)2 );
- OSL_ASSERT( aAny.getValueType() == getCppuType( (sal_Int8 *)0 ) );
- OSL_ASSERT( *(sal_Int8*)aAny.getValue() == 2 );
- aAny = makeAny( (double)2 );
- OSL_ASSERT( aAny.getValueType() == getCppuType( (double *)0 ) );
- OSL_ASSERT( *(double*)aAny.getValue() == (double)2 );
- aAny = makeAny( (sal_Int16)2 );
- OSL_ASSERT( aAny.getValueType() == getCppuType( (sal_Int16 *)0 ) );
- OSL_ASSERT( *(sal_Int16*)aAny.getValue() == 2 );
- aAny = makeAny( OUString( RTL_CONSTASCII_USTRINGPARAM("test") ) );
- OSL_ASSERT( aAny.getValueType() == getCppuType( (OUString *)0 ) );
- OSL_ASSERT( *(OUString*)aAny.getValue() == OUString::createFromAscii("test") );
- aAny = makeAny( (sal_uInt16)2 );
- OSL_ASSERT( aAny.getValueType() == getCppuType( (sal_uInt16 *)0 ) );
- OSL_ASSERT( *(sal_Int16*)aAny.getValue() == 2 );
- sal_Int64 aInt64 = SAL_CONST_INT64(0x200000000);
- aAny = makeAny( aInt64 );
- OSL_ASSERT( aAny.getValueType() == getCppuType( (sal_Int64 *)0 ) );
- OSL_ASSERT( *(sal_Int64*)aAny.getValue() == SAL_CONST_INT64(0x200000000) );
- aAny = makeAny( (sal_Int32)2 );
- OSL_ASSERT( aAny.getValueType() == getCppuType( (sal_Int32 *)0 ) );
- OSL_ASSERT( *(sal_Int32*)aAny.getValue() == 2 );
- sal_uInt64 auInt64 = SAL_CONST_UINT64(0x200000000);
- aAny = makeAny( auInt64 );
- OSL_ASSERT( aAny.getValueType() == getCppuType( (sal_uInt64 *)0 ) );
- OSL_ASSERT( *(sal_uInt64*)aAny.getValue() == SAL_CONST_UINT64(0x200000000) );
- aAny = makeAny( (sal_uInt32)2 );
- OSL_ASSERT( aAny.getValueType() == getCppuType( (sal_uInt32 *)0 ) );
- OSL_ASSERT( *(sal_uInt32*)aAny.getValue() == 2 );
- aAny = makeAny( TypeClass_STRUCT );
- OSL_ASSERT( aAny.getValueType() == getCppuType( (TypeClass *)0 ) );
- OSL_ASSERT( *(TypeClass*)aAny.getValue() == TypeClass_STRUCT );
- sal_Unicode c = L'2';
- aAny.setValue( &c, getCppuCharType() );
- OSL_ASSERT( aAny.getValueType() == getCppuCharType() );
- OSL_ASSERT( *(sal_Unicode*)aAny.getValue() == L'2' );
- sal_Bool b2 = sal_True;
- aAny.setValue( &b2, getCppuBooleanType() );
- OSL_ASSERT( aAny.getValueType() == getCppuBooleanType() );
- OSL_ASSERT( *(sal_Bool*)aAny.getValue() == sal_True );
- }
-
- {
- // test: operator <<=( any, value )
- Any aAny;
- aAny <<= (sal_Int8)2;
- OSL_ASSERT( aAny.getValueType() == getCppuType( (sal_Int8 *)0 ) );
- OSL_ASSERT( *(sal_Int8*)aAny.getValue() == 2 );
- aAny <<=( (float)2 );
- OSL_ASSERT( aAny.getValueType() == getCppuType( (float *)0 ) );
- OSL_ASSERT( *(float*)aAny.getValue() == (float)2 );
-// aAny <<=( (sal_uInt8)2 );
-// OSL_ASSERT( aAny.getValueType() == getCppuType( (sal_uInt8 *)0 ) );
-// OSL_ASSERT( *(sal_uInt8*)aAny.getValue() == 2 );
- aAny <<=( (double)2 );
- OSL_ASSERT( aAny.getValueType() == getCppuType( (double *)0 ) );
- OSL_ASSERT( *(double*)aAny.getValue() == (double)2 );
- aAny <<=( (sal_Int16)2 );
- OSL_ASSERT( aAny.getValueType() == getCppuType( (sal_Int16 *)0 ) );
- OSL_ASSERT( *(sal_Int16*)aAny.getValue() == 2 );
- aAny <<=( OUString( RTL_CONSTASCII_USTRINGPARAM("test") ) );
- OSL_ASSERT( aAny.getValueType() == getCppuType( (OUString *)0 ) );
- OSL_ASSERT( *(OUString*)aAny.getValue() == OUString::createFromAscii("test") );
- aAny <<=( (sal_uInt16)2 );
- OSL_ASSERT( aAny.getValueType() == getCppuType( (sal_uInt16 *)0 ) );
- OSL_ASSERT( *(sal_Int16*)aAny.getValue() == 2 );
- sal_Int64 aInt64 = SAL_CONST_INT64(0x200000000);
- aAny <<=( aInt64 );
- OSL_ASSERT( aAny.getValueType() == getCppuType( (sal_Int64 *)0 ) );
- OSL_ASSERT( *(sal_Int64*)aAny.getValue() == SAL_CONST_UINT64(0x200000000) );
- aAny <<=( (sal_Int32)2 );
- OSL_ASSERT( aAny.getValueType() == getCppuType( (sal_Int32 *)0 ) );
- OSL_ASSERT( *(sal_Int32*)aAny.getValue() == 2 );
- sal_uInt64 auInt64 = SAL_CONST_UINT64(0x200000000);
- aAny <<=( auInt64 );
- OSL_ASSERT( aAny.getValueType() == getCppuType( (sal_uInt64 *)0 ) );
- OSL_ASSERT( *(sal_uInt64*)aAny.getValue() == SAL_CONST_UINT64(0x200000000) );
- aAny <<=( (sal_uInt32)2 );
- OSL_ASSERT( aAny.getValueType() == getCppuType( (sal_uInt32 *)0 ) );
- OSL_ASSERT( *(sal_uInt32*)aAny.getValue() == 2 );
- aAny <<=( TypeClass_STRUCT );
- OSL_ASSERT( aAny.getValueType() == getCppuType( (TypeClass *)0 ) );
- OSL_ASSERT( *(TypeClass*)aAny.getValue() == TypeClass_STRUCT );
- }
-
- {
- // test seq< any >
- Sequence< Any > seqAny( 1 );
- seqAny[ 0 ] <<= sal_Int32(5);
- seqAny.realloc( 200000 ); // hopefully different memory
- seqAny[ 1 ] <<= sal_Int32(6);
-
- uno_Any * pAnys = (uno_Any *)seqAny.getConstArray();
- OSL_ASSERT( pAnys[ 1 ].pData == &pAnys[ 1 ].pReserved );
- OSL_ASSERT( *(sal_Int32 *)pAnys[ 1 ].pData == sal_Int32(6) );
- OSL_ASSERT( pAnys[ 0 ].pData == &pAnys[ 0 ].pReserved );
- OSL_ASSERT( *(sal_Int32 *)pAnys[ 0 ].pData == sal_Int32(5) );
- }
-
- {
- // test: operator >>=( any, value )
- Test3 a3;
- makeAny( (sal_Int8)2) >>= a3.nInt8;
- OSL_ASSERT( (makeAny( (sal_Int8)2) >>= a3.nInt8) && a3.nInt8 == 2 );
- OSL_ASSERT( (makeAny( (float)2) >>= a3.nFloat) && a3.nFloat ==(float)2 );
- OSL_ASSERT( (makeAny( (double)2) >>= a3.nDouble) && a3.nDouble == 2 );
- OSL_ASSERT( (makeAny( (sal_Int16)2) >>= a3.nInt16) && a3.nInt16 == 2 );
- OSL_ASSERT( (makeAny( OUString( RTL_CONSTASCII_USTRINGPARAM("2") )) >>= a3.aString) &&
- a3.aString == OUString::createFromAscii("2") );
- OSL_ASSERT( (makeAny( (sal_uInt16)2) >>= a3.nuInt16) && a3.nuInt16 == 2 );
- sal_Int64 aInt64 = SAL_CONST_INT64(0x200000000);
- OSL_ASSERT( makeAny( aInt64 ) >>= a3.nInt64 );
- OSL_ASSERT( a3.nInt64 == SAL_CONST_INT64(0x200000000) );
- OSL_ASSERT( (makeAny( (sal_Int32)2) >>= a3.nInt32) && a3.nInt32 == 2 );
- sal_uInt64 auInt64 = SAL_CONST_UINT64(0x200000000);
- OSL_ASSERT( makeAny( auInt64 ) >>= a3.nuInt64 );
- OSL_ASSERT( a3.nuInt64 == SAL_CONST_UINT64(0x200000000) );
- OSL_ASSERT( (makeAny( (sal_uInt32)2) >>= a3.nuInt32) && a3.nuInt32 == 2 );
- OSL_ASSERT( (makeAny( TypeClass_STRUCT) >>= a3.eType) && a3.eType == TypeClass_STRUCT );
- //OSL_ASSERT( (makeAny( L'2' ) >>= a3.wChar) && a3.nInt8 ==L'2';
- OSL_ASSERT( (makeAny( (sal_Int16)2) >>= a3.td.nInt16) && a3.nInt16 == 2 );
- OSL_ASSERT( (makeAny( (double)2) >>= a3.td.dDouble) && a3.nDouble == 2 );
- //OSL_ASSERT( (makeAny( (sal_True)2) >>= a3.bBool) && a3.nInt8 ==sal_True;
-
- // Only one negative test, the implementation has only one if to test this
- OSL_ASSERT( (makeAny( (float)2) >>= a3.nFloat) && a3.nFloat ==(float)2 );
- }
-
- {
- // test: Sequence
- Sequence< Test1 > aTestSeq;
- OSL_ASSERT( aTestSeq.getLength() == 0 );
- sal_Int32 szInt32[2] = { 1, 2 };
- Sequence< sal_Int32 > aInt32Seq( szInt32, 2 );
- OSL_ASSERT( aInt32Seq.getLength() == 2 );
- OSL_ASSERT( aInt32Seq[0] == 1 && aInt32Seq[1] == 2 );
- OSL_ASSERT( aInt32Seq.getArray()[0] == 1 && aInt32Seq.getArray()[1] == 2 );
- Sequence< sal_Int32 > aNextInt32Seq( aInt32Seq );
- OSL_ASSERT( aNextInt32Seq[0] == 1 && aNextInt32Seq[1] == 2 );
- aInt32Seq[0] = 45;
- OSL_ASSERT( aInt32Seq[0] == 45 && aInt32Seq[1] == 2 );
- OSL_ASSERT( aNextInt32Seq[0] == 1 && aNextInt32Seq[1] == 2 );
- sal_Int32 * pArray = aNextInt32Seq.getArray();
- OSL_ASSERT( pArray[0] == 1 && pArray[1] == 2 );
- Sequence< double > aDoubleSeq( 5 );
- OSL_ASSERT( aDoubleSeq[4] == 0.0 );
- Sequence< OUString > aStringSeq( 5 );
- OSL_ASSERT( aStringSeq[4] == OUString() );
- }
- sal_Int32 szInt32[2] = { 1, 2 };
- Sequence<sal_Int32 > aInt32Seq( szInt32, 2 );
- Sequence<sal_Int32 > aNextInt32Seq( aInt32Seq );
- aNextInt32Seq.realloc( 1 ); // split of sequence
- const sal_Int32 * pArray = aNextInt32Seq.getConstArray();
- OSL_ASSERT( pArray[0] == 1 );
- aInt32Seq.realloc( 1 ); // reallocate mem
- pArray = aInt32Seq.getConstArray();
- OSL_ASSERT( pArray[0] == 1 );
-
- Sequence<sal_Int32 > aInt32Seq2( aInt32Seq );
- aInt32Seq.realloc( 0 );
- aInt32Seq.realloc( 1 );
- aInt32Seq.realloc( 0 );
-}
-
-class TestInterface : public XInterface
-{
-public:
- // XInterface
- void SAL_CALL acquire() throw ()
- { osl_incrementInterlockedCount( &nRefCount ); }
- void SAL_CALL release() throw ()
- { if( !osl_decrementInterlockedCount( &nRefCount ) ) delete this; }
- Any SAL_CALL queryInterface( const Type & rType ) throw (RuntimeException)
- { return cppu::queryInterface( rType, static_cast< XInterface* >( this ) ); }
-
- TestInterface() : nRefCount( 0 ) {}
-
- sal_Int32 nRefCount;
-};
-
-struct SimpleInterface : public TestInterface, public XSimpleInterface
-{
- void SAL_CALL acquire() throw ()
- { TestInterface::acquire(); }
- void SAL_CALL release() throw ()
- { TestInterface::release(); }
- Any SAL_CALL queryInterface( const Type & rType ) throw (RuntimeException)
- {
- Any aRet( cppu::queryInterface( rType, static_cast< XSimpleInterface * >( this ) ) );
- return (aRet.hasValue() ? aRet : TestInterface::queryInterface( rType ));
- }
- virtual void SAL_CALL method() throw(::com::sun::star::uno::RuntimeException)
- {}
-};
-
-static sal_Bool s_aAssignableFromTab[11][11] =
-{
- /* from CH,BO,BY,SH,US,LO,UL,HY,UH,FL,DO */
-/* TypeClass_CHAR */ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
-/* TypeClass_BOOLEAN */ { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
-/* TypeClass_BYTE */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 },
-/* TypeClass_SHORT */ { 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0 },
-/* TypeClass_UNSIGNED_SHORT */ { 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0 },
-/* TypeClass_LONG */ { 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0 },
-/* TypeClass_UNSIGNED_LONG */ { 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0 },
-/* TypeClass_HYPER */ { 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0 },
-/* TypeClass_UNSIGNED_HYPER */ { 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0 },
-/* TypeClass_FLOAT */ { 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0 },
-/* TypeClass_DOUBLE */ { 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1 }
-};
-template < class T >
-void test_assignSimple( const T & rVal, /*const*/ Any /*&*/ rAny )
-{
- typelib_TypeDescription * pTD = 0;
- ::getCppuType( &rVal ).getDescription( &pTD );
- sal_Bool bTable = s_aAssignableFromTab[pTD->eTypeClass-1][rAny.getValueTypeClass()-1];
- OSL_ASSERT(
- (bTable!=sal_False) ==
- (typelib_typedescriptionreference_isAssignableFrom(
- pTD->pWeakRef, rAny.getValueTypeRef() )!=sal_False) );
- T t;
- OSL_ASSERT( (bTable!=sal_False) == ((rAny >>= t)!=sal_False) );
- if (bTable)
- OSL_ASSERT( t == rVal );
- typelib_typedescription_release( pTD );
-}
-template < class T >
-void test_simple_assignment( const T & rVal )
-{
- // bool
- sal_Bool tr = sal_True;
- typelib_TypeDescription * pBoolTD = 0;
- ::getCppuBooleanType().getDescription( &pBoolTD );
- Any a( &tr, pBoolTD );
- test_assignSimple( rVal, a );
- OSL_ASSERT( typelib_typedescriptionreference_isAssignableFrom( pBoolTD->pWeakRef, a.getValueTypeRef() ) );
- typelib_typedescription_release( pBoolTD );
- OSL_ASSERT( *(sal_Bool *)a.getValue() );
- // char
- sal_Unicode ch = 'a';
- typelib_TypeDescription * pCharTD = 0;
- ::getCppuCharType().getDescription( &pCharTD );
- a.setValue( &ch, pCharTD );
- test_assignSimple( rVal, a );
- OSL_ASSERT( typelib_typedescriptionreference_isAssignableFrom( pCharTD->pWeakRef, a.getValueTypeRef() ) );
- typelib_typedescription_release( pCharTD );
- OSL_ASSERT( *(sal_Unicode *)a.getValue() == 'a' );
-
- // rest by template
- a <<= (sal_Int8)5;
- test_assignSimple( rVal, a );
- a <<= (sal_Int16)5;
- test_assignSimple( rVal, a );
- a <<= (sal_uInt16)5;
- test_assignSimple( rVal, a );
- a <<= (sal_Int32)5;
- test_assignSimple( rVal, a );
- a <<= (sal_uInt32)5;
- test_assignSimple( rVal, a );
- a <<= (sal_Int64)5;
- test_assignSimple( rVal, a );
- a <<= (sal_uInt64)5;
- test_assignSimple( rVal, a );
- a <<= (float)5;
- test_assignSimple( rVal, a );
- a <<= (double)5;
- test_assignSimple( rVal, a );
-}
-static void testAssignment()
-{
- // simple types
- test_simple_assignment( (sal_Int8)5 );
- test_simple_assignment( (sal_Int16)5 );
- test_simple_assignment( (sal_uInt16)5 );
- test_simple_assignment( (sal_Int32)5 );
- test_simple_assignment( (sal_uInt32)5 );
- test_simple_assignment( (sal_Int64)5 );
- test_simple_assignment( (sal_uInt64)5 );
- test_simple_assignment( (float)5 );
- test_simple_assignment( (double)5 );
- // some complex things
- Any a;
- TestSimple ts;
- TestElement te; // derived from simple
- a <<= ts;
- OSL_ASSERT( !(a >>= te) );
- OSL_ASSERT( a >>= ts );
- a <<= te;
- OSL_ASSERT( (a >>= te) && (a >>= ts) );
- // interface
- Reference< XSimpleInterface > xOriginal( new SimpleInterface() );
- a <<= xOriginal;
- Reference< XInterface > x;
- OSL_ASSERT( (a >>= x) && (a == xOriginal) && (xOriginal == x) && (x == xOriginal) );
- // sequence
- Sequence< TestElement > aSeq( 5 );
- Sequence< TestElement > aSeq2( 3 );
- aSeq[1].Byte = 17;
- a <<= aSeq;
- OSL_ASSERT( a >>= aSeq2 );
- OSL_ASSERT( aSeq2[1].Byte == 17 );
- aSeq2[1].Byte = 20;
- OSL_ASSERT( aSeq != aSeq2 );
- OSL_ASSERT( a != aSeq2 );
- a <<= aSeq2;
- OSL_ASSERT( a >>= aSeq );
- OSL_ASSERT( a == aSeq );
- OSL_ASSERT( !(a != aSeq) );
- OSL_ASSERT( aSeq == aSeq2 );
- OSL_ASSERT( aSeq[1].Byte == 20 );
-
- // equals...
- sal_uInt64 n = (sal_uInt64)(sal_Int64)-5;
- a.setValue( &n, getCppuType( (sal_uInt64 *)0 ) );
- Any b;
- sal_Int8 n2 = -5;
- b.setValue( &n2, getCppuType( (sal_Int8 *)0 ) );
- OSL_ASSERT( a != b );
-}
-
-void test_interface()
-{
- {
- // test: Interface
- Reference< XInterface > xIFace;
- OSL_ASSERT( !xIFace.is() );
- xIFace.clear(); // do nothing
- }
-}
-
-void test_inheritance()
-{
- OSL_ASSERT( sizeof( Base ) == getSize( getCppuType( (Base *)0).getTypeLibType() ) );
- OSL_ASSERT( sizeof( Base1 ) == getSize( getCppuType( (Base1 *)0).getTypeLibType() ) );
- OSL_ASSERT( sizeof( Base2 ) == getSize( getCppuType( (Base2 *)0).getTypeLibType() ) );
-}
-
-sal_Int32 nCallback_1;
-sal_Int32 nCallback;
-void SAL_CALL typedescription_Callback_1
-(
- void * pContext,
- typelib_TypeDescription ** ppRet,
- rtl_uString * pTypeName
-)
-{
- OSL_ENSURE( pContext == (void *)1, "### unexpected context!" );
- if( *ppRet )
- {
- typelib_typedescription_release( *ppRet );
- *ppRet = 0;
- }
-
- OUString aTypeName( pTypeName );
- if( -1 != aTypeName.indexOf( OUString::createFromAscii("1_") ) )
- {
- nCallback_1++;
- OUString aName( RTL_CONSTASCII_USTRINGPARAM("unsigned short") );
- OUString empty;
- typelib_CompoundMember_Init aMember = { typelib_TypeClass_UNSIGNED_SHORT,
- aName.pData,
- empty.pData };
- typelib_typedescription_new(
- ppRet,
- typelib_TypeClass_STRUCT, pTypeName, 0,
- 1,
- &aMember
- );
- }
-}
-
-void SAL_CALL typedescription_Callback
-(
- void * pContext,
- typelib_TypeDescription ** ppRet,
- rtl_uString * pTypeName
-)
-{
- OSL_ENSURE( pContext == (void *)0, "### unexpected context!" );
- if( *ppRet )
- {
- typelib_typedescription_release( *ppRet );
- *ppRet = 0;
- }
-
- OUString aTypeName( pTypeName );
- if( -1 != aTypeName.indexOf( OUString::createFromAscii("cachetest") ) )
- {
- nCallback++;
- aTypeName = OUString( RTL_CONSTASCII_USTRINGPARAM("1_") ) + aTypeName;
- OUString empty;
- typelib_CompoundMember_Init aMember = { typelib_TypeClass_STRUCT,
- aTypeName.pData,
- empty.pData };
- typelib_typedescription_new(
- ppRet,
- typelib_TypeClass_STRUCT, pTypeName, 0,
- 1,
- &aMember
- );
- }
-}
-
-void test_cache()
-{
- typelib_typedescription_registerCallback(
- (void *)1,
- reinterpret_cast<typelib_typedescription_Callback>(typedescription_Callback_1) );
- typelib_typedescription_registerCallback(
- 0,
- reinterpret_cast<typelib_typedescription_Callback>(typedescription_Callback) );
-
- for( sal_Int32 i = 0; i < 300; i++ )
- {
- typelib_TypeDescription * pTD = 0;
- OUString aTypeName( RTL_CONSTASCII_USTRINGPARAM("cachetest") );
- aTypeName = aTypeName + OUString::valueOf( i );
- typelib_typedescription_getByName( &pTD, aTypeName.pData );
- typelib_typedescription_release( pTD );
- }
- OSL_ASSERT( nCallback_1 == 300 );
- OSL_ASSERT( nCallback == 300 );
- // The cache size is 200 so the description "cachetest200" is in the cache
- typelib_TypeDescription * pTD = 0;
- OUString aName200( RTL_CONSTASCII_USTRINGPARAM("cachetest200") );
- typelib_typedescription_getByName( &pTD, aName200.pData );
- OSL_ASSERT( nCallback_1 == 300 );
- OSL_ASSERT( nCallback == 300 );
- // The cache size is 200 so the description "cachetest199" is not in the cache
- // "1_cachetest199" is loaded too.
- OUString aName199( RTL_CONSTASCII_USTRINGPARAM("cachetest199") );
- typelib_typedescription_getByName( &pTD, aName199.pData );
- typelib_typedescription_release( pTD );
- OSL_ASSERT( nCallback_1 == 301 );
- OSL_ASSERT( nCallback == 301 );
-
- typelib_typedescription_revokeCallback(
- (void *)1,
- reinterpret_cast<typelib_typedescription_Callback>(typedescription_Callback_1) );
- typelib_typedescription_revokeCallback(
- 0,
- reinterpret_cast<typelib_typedescription_Callback>(typedescription_Callback) );
-}
-
-static OUString s_aAddPurpose;
-
-static void SAL_CALL getMappingCallback(
- uno_Mapping ** /*ppMapping*/,
- uno_Environment * /*pFrom*/, uno_Environment * /*pTo*/, rtl_uString * pAddPurpose )
-{
- s_aAddPurpose = pAddPurpose;
-}
-static void testMappingCallback()
-{
- uno_registerMappingCallback( reinterpret_cast<uno_getMappingFunc>(getMappingCallback) );
- OSL_ASSERT( ! s_aAddPurpose.getLength() );
- Mapping aTest(
- OUString( RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME) ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME) ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("test") ) );
- uno_revokeMappingCallback( reinterpret_cast<uno_getMappingFunc>(getMappingCallback) );
- OSL_ASSERT( s_aAddPurpose.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("test") ) );
- s_aAddPurpose = OUString();
- Mapping aTest2(
- OUString( RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME) ),
- OUString( RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME) ),
- OUString( RTL_CONSTASCII_USTRINGPARAM("test") ) );
- OSL_ASSERT( ! s_aAddPurpose.getLength() );
-}
-
-static void testEnvironments(void)
-{
- uno_Environment ** ppEnv;
- sal_Int32 nLen;
- OUString aTypeName;
-
- ::uno_getRegisteredEnvironments(
- &ppEnv, &nLen, ::rtl_allocateMemory, aTypeName.pData );
-
- if (nLen)
- {
- for ( sal_Int32 nPos = 0; nPos < nLen; ++nPos )
- {
- uno_Environment * pEnv = ppEnv[ nPos ];
-
- // dump out infos
- ::uno_dumpEnvironment( stderr, pEnv, 0 );
-
- // call some releases
- void ** ppInterfaces = 0;
- sal_Int32 nInterfaces;
-
- uno_ExtEnvironment * pExtEnv = pEnv->pExtEnv;
- (*pExtEnv->getRegisteredInterfaces)(
- pExtEnv, &ppInterfaces, &nInterfaces, ::rtl_allocateMemory );
- if (nInterfaces)
- {
- while (nInterfaces--)
- {
- void * p = ppInterfaces[ nInterfaces ];
- (*pExtEnv->releaseInterface)( pExtEnv, p );
- }
- ::rtl_freeMemory( ppInterfaces );
- }
-
- (*pEnv->release)( pEnv );
- }
- ::rtl_freeMemory( ppEnv );
- }
-}
-
-inline const ::com::sun::star::uno::Type& SAL_CALL getCppuType( const Sequence< OUString[2][4] >* ) SAL_THROW( () )
-{
- return getCppuSequenceType< OUString[2][4] >( getCppuArrayType2( (const OUString (*)[2][4])0 ) );
-}
-
-//==================================================================================================
-class Test_CContext
- : public ::cppu::WeakImplHelper1< XCurrentContext >
-{
- Reference< XCurrentContext > m_xDel;
- sal_Int32 m_value;
- OUString m_name;
-public:
- inline Test_CContext( sal_Int32 val, OUString const & rName,
- Reference< XCurrentContext > const & xDel )
- SAL_THROW( () )
- : m_xDel( xDel )
- , m_value( val )
- , m_name( rName )
- {}
-
- virtual Any SAL_CALL getValueByName( OUString const & rName )
- throw (RuntimeException);
-};
-//__________________________________________________________________________________________________
-Any Test_CContext::getValueByName( OUString const & rName )
- throw (RuntimeException)
-{
- if (rName == m_name)
- {
- return makeAny( m_value );
- }
- else if (m_xDel.is())
- {
- return m_xDel->getValueByName( rName );
- }
- return Any();
-}
-//==================================================================================================
-static void testCurrentContext()
-{
- {
- ContextLayer layer( new Test_CContext(
- 5, OUString( RTL_CONSTASCII_USTRINGPARAM("Value1") ),
- Reference< XCurrentContext >() ) );
- Reference< XCurrentContext > xCC( getCurrentContext() );
- OSL_ASSERT(
- xCC.is() &&
- xCC->getValueByName( OUString( RTL_CONSTASCII_USTRINGPARAM("Value1") ) ) == (sal_Int16)5 &&
- !xCC->getValueByName( OUString( RTL_CONSTASCII_USTRINGPARAM("Value2") ) ).hasValue() );
- OSL_ASSERT( ! layer.getPreviousContext().is() );
-
- {
- ContextLayer layer2( new Test_CContext(
- 7, OUString( RTL_CONSTASCII_USTRINGPARAM("Value2") ),
- xCC ) );
- OSL_ASSERT( layer2.getPreviousContext() == xCC );
- xCC = getCurrentContext();
- OSL_ASSERT(
- xCC.is() &&
- xCC->getValueByName( OUString( RTL_CONSTASCII_USTRINGPARAM("Value1") ) ) == (sal_Int16)5 &&
- xCC->getValueByName( OUString( RTL_CONSTASCII_USTRINGPARAM("Value2") ) ) == (sal_Int16)7 &&
- !xCC->getValueByName( OUString( RTL_CONSTASCII_USTRINGPARAM("dummy") ) ).hasValue() );
-
- uno_Interface * pContext = 0;
- OUString aEnvName( RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO) );
- OSL_VERIFY( ::uno_getCurrentContext( (void **)&pContext, aEnvName.pData, 0 ) );
- (*pContext->release)( pContext );
- }
- OSL_ASSERT( ! layer.getPreviousContext().is() );
- }
- OSL_ASSERT( ! getCurrentContext().is() );
-}
-
-void testArray(void)
-{
- long a[5][6];
- getCppuArrayType2( &a );
-
- getCppuArrayType1( (const long (*)[5])0 );
- getCppuArrayType2( (const long (*)[6][7])0 );
- getCppuArrayType3( (const long (*)[7][8][9])0 );
- getCppuArrayType4( (const long (*)[8][9][10][11])0 );
- getCppuArrayType5( (const long (*)[9][10][11][12][13])0 );
- getCppuArrayType6( (const long (*)[10][11][12][13][14][15])0 );
-
- getCppuArrayType2( (const Reference< XInterface > (*)[6][7])0 );
-
- getCppuArrayType1( (const Test1 (*)[5])0 );
- getCppuArrayType2( (const Test1 (*)[6][7])0 );
- getCppuArrayType3( (const Test1 (*)[7][8][9])0 );
- getCppuArrayType4( (const Test1 (*)[8][9][10][11])0 );
- getCppuArrayType5( (const Test1 (*)[9][10][11][12][13])0 );
- getCppuArrayType6( (const Test1 (*)[10][11][12][13][14][15])0 );
-
- typelib_TypeDescription* pType = NULL;
- typelib_TypeDescriptionReference* pTypeRef = NULL;
- sal_Int32 pDim[] = { 2, 4 };
- Type rType = getCppuType((const sal_Int32*)0);
- typelib_typedescription_newArray(&pType, rType.getTypeLibType(), 2, pDim);
- OSL_ASSERT( pType );
- typelib_typedescriptionreference_new(&pTypeRef, typelib_TypeClass_ARRAY, pType->pTypeName);
- OSL_ASSERT( pTypeRef );
-
- sal_Int32 a1[2][4];
- sal_Int32 a2[2][4] = { {1,2,3,4}, {5,6,7,8} };
- uno_constructData( &a1, pType );
-// uno_type_constructData( &a1, pTypeRef );
-
- sal_Bool bAssignable = uno_assignData(&a1, pType, a2, pType,
- reinterpret_cast<uno_QueryInterfaceFunc>(cpp_queryInterface),
- reinterpret_cast<uno_AcquireFunc>(cpp_acquire),
- reinterpret_cast<uno_ReleaseFunc>(cpp_release) );
- sal_Int32 i,j;
- for ( i=0; i<2; i++ )
- for ( j=0; j<4; j++ )
- OSL_ASSERT( a1[i][j] == a2[i][j] );
-
- uno_destructData( a1, pType, reinterpret_cast<uno_ReleaseFunc>(cpp_release) );
-// uno_type_destructData( &a1, pTypeRef, cpp_release );
- uno_destructData( a2, pType, reinterpret_cast<uno_ReleaseFunc>(cpp_release) );
-
- typelib_typedescription_release(pType);
- typelib_typedescriptionreference_release(pTypeRef);
- pType = NULL;
- pTypeRef = NULL;
-
- typelib_typedescription_newArray(&pType, getCppuType((const OUString*)0).getTypeLibType(), 2, pDim);
- OSL_ASSERT( pType );
- typelib_typedescriptionreference_new(&pTypeRef, typelib_TypeClass_ARRAY, pType->pTypeName);
- OSL_ASSERT( pTypeRef );
-
- OUString s1(OUString::createFromAscii("Hallo"));
- OUString s2(OUString::createFromAscii("jetzt"));
- OUString s3(OUString::createFromAscii("teste"));
- OUString s4(OUString::createFromAscii("ich"));
- OUString s5(OUString::createFromAscii("ein"));
- OUString s6(OUString::createFromAscii("Array"));
- OUString s7(OUString::createFromAscii("mit"));
- OUString s8(OUString::createFromAscii("strings"));
- OUString st1,st2,st3,st4,st5,st6,st7,st8;
-
- void* p = rtl_allocateMemory(8 * sizeof(rtl_uString*));
- void* p2 = rtl_allocateMemory(8 * sizeof(rtl_uString*));
- rtl_uString** ppS = (rtl_uString**)p;
- rtl_uString* sa1[2][4] = { {st1.pData,st2.pData,st3.pData,st4.pData},
- {st5.pData,st6.pData,st7.pData,st8.pData} };
- rtl_uString* sa2[2][4] = { {s1.pData,s2.pData,s3.pData,s4.pData},
- {s5.pData,s6.pData,s7.pData,s8.pData} };
- uno_constructData( p, pType );
-
- bAssignable = uno_assignData(p, pType, sa2, pType,
- reinterpret_cast<uno_QueryInterfaceFunc>(cpp_queryInterface),
- reinterpret_cast<uno_AcquireFunc>(cpp_acquire),
- reinterpret_cast<uno_ReleaseFunc>(cpp_release) );
-
- bAssignable = uno_assignData(sa1, pType, p, pType,
- reinterpret_cast<uno_QueryInterfaceFunc>(cpp_queryInterface),
- reinterpret_cast<uno_AcquireFunc>(cpp_acquire),
- reinterpret_cast<uno_ReleaseFunc>(cpp_release) );
-
- for ( i=0; i<2; i++ )
- for ( j=0; j<4; j++ )
- OSL_ASSERT( sa1[i][j] == sa2[i][j] );
-
- OUString sA[2][4];
- sA[0][0] = s1;
- sA[1][0] = s5;
- sA[0][1] = s2;
- sA[1][1] = s6;
- sA[0][2] = s3;
- sA[1][2] = s7;
- sA[0][3] = s4;
- sA[1][3] = s8;
-
- Any aa1, aa2;
- Type arrayType;
- OUString (*sB)[2][4];
- aa1.setValue(&sA, getCppuArrayType2( (const OUString (*)[2][4])0 ));
- aa2 = aa1;
- arrayType = aa2.getValueType();
- sB = (OUString(*)[2][4])aa2.getValue();
- for ( i=0; i<2; i++ )
- for ( j=0; j<4; j++ )
- OSL_ASSERT( sA[i][j] == (*sB)[i][j] );
-
- // requires a specialized getCppuType function 'getCppuType( const Sequence< OUString[2][4] >* )'
-// Sequence< OUString[2][4] > aSeq(2);
-// OUString (*pSeq)[2][4] = aSeq.getArray();
-// uno_copyData(pSeq[0], sA, pType, cpp_acquire);
-// uno_copyData(pSeq[1], sA, pType, cpp_acquire);
-
-// OSL_ASSERT( aSeq[0][0][0] == sA[0][0] );
-// OSL_ASSERT( aSeq[0][0][1] == sA[0][1] );
-// OSL_ASSERT( aSeq[0][0][2] == sA[0][2] );
-// OSL_ASSERT( aSeq[0][0][3] == sA[0][3] );
-// OSL_ASSERT( aSeq[0][1][0] == sA[1][0] );
-// OSL_ASSERT( aSeq[0][1][1] == sA[1][1] );
-// OSL_ASSERT( aSeq[0][1][2] == sA[1][2] );
-// OSL_ASSERT( aSeq[0][1][3] == sA[1][3] );
-
-// OSL_ASSERT( aSeq[1][0][0] == sA[0][0] );
-// OSL_ASSERT( aSeq[1][0][1] == sA[0][1] );
-// OSL_ASSERT( aSeq[1][0][2] == sA[0][2] );
-// OSL_ASSERT( aSeq[1][0][3] == sA[0][3] );
-// OSL_ASSERT( aSeq[1][1][0] == sA[1][0] );
-// OSL_ASSERT( aSeq[1][1][1] == sA[1][1] );
-// OSL_ASSERT( aSeq[1][1][2] == sA[1][2] );
-// OSL_ASSERT( aSeq[1][1][3] == sA[1][3] );
-
- uno_constructData( p2, pType );
- ppS = (rtl_uString**)p2;
- uno_copyData(p2, sa1, pType, reinterpret_cast<uno_AcquireFunc>(cpp_acquire));
- uno_copyData(sa2, p2, pType, reinterpret_cast<uno_AcquireFunc>(cpp_acquire));
-
- uno_destructData( p, pType, reinterpret_cast<uno_ReleaseFunc>(cpp_release));
- uno_destructData( p2, pType, reinterpret_cast<uno_ReleaseFunc>(cpp_release) );
- uno_destructData( sa1, pType, reinterpret_cast<uno_ReleaseFunc>(cpp_release) );
- uno_destructData( sa2, pType, reinterpret_cast<uno_ReleaseFunc>(cpp_release) );
-
- rtl_freeMemory(p);
- rtl_freeMemory(p2);
- typelib_typedescription_release(pType);
- typelib_typedescriptionreference_release(pTypeRef);
- pType = NULL;
- pTypeRef = NULL;
-}
-
-/*
- * main.
- */
-SAL_IMPLEMENT_MAIN()
-{
- rtl::OUString const cppName(
- RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME) );
- uno_Environment * pCppEnv = 0;
- uno_getEnvironment( &pCppEnv, cppName.pData, 0 );
- uno_getEnvironment( &pCppEnv, cppName.pData, 0 );
- (*pCppEnv->release)( pCppEnv );
-
- try {
- typelib_setCacheSize( 200 );
- Reference< registry::XSimpleRegistry > xRegistry(
- ::cppu::createSimpleRegistry() );
- xRegistry->open( OUString( RTL_CONSTASCII_USTRINGPARAM("testcppu.rdb") ), sal_True, sal_False );
- Reference< XComponentContext > xContext(
- ::cppu::bootstrap_InitialComponentContext( xRegistry ) );
- testEnvironments();
- ::rtl_unloadUnusedModules( 0 );
- testMappingCallback();
- ::rtl_unloadUnusedModules( 0 );
-
-// // security test
-// void test_security( const Reference< XMultiServiceFactory > & );
-// test_security( xMgr );
-
- // C++, C bridges test
- void test_CppBridge(void);
- test_CppBridge();
- ::rtl_unloadUnusedModules( 0 );
-// void test_CBridge(void);
-// void test_CBridge2(void);
-// test_CBridge();
-// test_CBridge2();
-
- testCurrentContext();
- testAssignment();
- testCppu();
-// testArray();
-#if 0 // cache test not possible if types are loaded dynamically (cppumaker -L)
- test_cache();
-#endif
- test_interface();
- test_inheritance();
-
- // shutdown
- Reference< XComponent > xComp( xContext, UNO_QUERY_THROW );
- xComp.set( xContext, UNO_QUERY_THROW );
- Reference< XInterface > x(
- xContext->getValueByName(
- OUString( RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.reflection.theTypeDescriptionManager") ) ), UNO_QUERY_THROW );
- xComp->dispose();
- }
- catch (Exception & exc) {
- fprintf( stderr, "error: %s\n", rtl::OUStringToOString(
- exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
- }
-
- typelib_setCacheSize( 0 );
- ::rtl_unloadUnusedModules( 0 );
- testEnvironments();
- ::rtl_unloadUnusedModules( 0 );
-
- return 0;
-}
diff --git a/cppu/test/testthreadpool.cxx b/cppu/test/testthreadpool.cxx
deleted file mode 100644
index ec404b89793c..000000000000
--- a/cppu/test/testthreadpool.cxx
+++ /dev/null
@@ -1,193 +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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_cppu.hxx"
-#include <osl/diagnose.h>
-#include <osl/time.h>
-
-#include <rtl/uuid.h>
-
-#include <uno/threadpool.h>
-
-#include <vos/thread.hxx>
-
-#define TEST_ENSURE OSL_ENSURE
-
-using namespace ::vos;
-
-
-class OThread1 : public OThread
-{
-public:
- OThread1( sal_uInt8 *pCallerUuid );
- virtual void run();
-
-public:
- sal_uInt8 *m_pCallerUuid;
- sal_Int8 *m_pThreadIdentifier;
- sal_Int32 m_nThreadIdentifierLength;
-
- void *m_pThreadData;
-};
-
-OThread1::OThread1( sal_uInt8 *pCallerUuid ) :
- m_pCallerUuid( pCallerUuid ),
- m_pThreadData( (void*) 1 ),
- m_pThreadIdentifier( 0 ),
- m_nThreadIdentifierLength( 0 )
-{
-
-}
-
-void OThread1::run()
-{
-
- uno_threadpool_Ticket *pTicket = uno_threadpool_createTicket( m_pCallerUuid );
-
- uno_threadIdent_retrieve( &m_pThreadIdentifier , &m_nThreadIdentifierLength );
-
- uno_threadpool_waitOnTicket( pTicket , &m_pThreadData );
-
- uno_threadIdent_revoke();
-}
-
-
-void SAL_CALL doIt( void *pThreadData )
-{
- *( sal_Int32 *) pThreadData = 2;
-}
-
-void testthreadpool()
-{
- printf( "Testing threadpool ..." );
- fflush( stdout );
-
- sal_uInt8 pCallerUuid1[16];
- sal_uInt8 pCallerUuid2[16];
- rtl_createUuid( pCallerUuid1, 0 , sal_True );
- rtl_createUuid( pCallerUuid2, 0 , sal_True );
-
- //------------
- // Test reply
- //------------
- {
- OThread1 thread1( pCallerUuid1 );
-
- thread1.create();
-
- // do a busy wait
- while( ! thread1.m_pThreadIdentifier && ! thread1.m_nThreadIdentifierLength );
-
- void *pThreadData = (void*)0xdeadbabe;
- uno_threadpool_reply( thread1.m_pThreadIdentifier ,
- thread1.m_nThreadIdentifierLength,
- pThreadData );
-
- // do a busy wait
- while( (void*)1 == thread1.m_pThreadData );
-
- TEST_ENSURE( pThreadData == thread1.m_pThreadData, "uno_threadpool_reply error" );
- }
-
- //---------------
- // Test request
- //---------------
- {
- OThread1 thread1( pCallerUuid1 );
-
- thread1.create();
-
- // do a busy wait
- while( ! thread1.m_pThreadIdentifier && ! thread1.m_nThreadIdentifierLength );
-
- // do a request
- sal_Int32 i = 1;
- uno_threadpool_request( thread1.m_pThreadIdentifier ,
- thread1.m_nThreadIdentifierLength,
- &i,
- doIt,
- sal_False);
-
- // do a busy wait
- while( 1 == i );
- TEST_ENSURE( 2 == i, "uno_threadpool_request error" );
-
- // get it out of the pool
- void *pThreadData = (void*)0xdeadbabe;
- uno_threadpool_reply( thread1.m_pThreadIdentifier ,
- thread1.m_nThreadIdentifierLength,
- pThreadData );
-
- // do a busy wait
- while( pThreadData != thread1.m_pThreadData );
-
- }
-
- //---------------
- // Test dispose threads
- //---------------
- {
- OThread1 thread1( pCallerUuid1 );
- OThread1 thread2( pCallerUuid2 );
-
- thread1.create();
- thread2.create();
-
- // do a busy wait
- while( ! thread1.m_pThreadIdentifier && ! thread1.m_nThreadIdentifierLength &&
- ! thread2.m_pThreadIdentifier && ! thread2.m_nThreadIdentifierLength );
-
- // dispose the first
- uno_threadpool_disposeThreads( pCallerUuid1 );
-
- while( (void*)1 == thread1.m_pThreadData );
- TEST_ENSURE( (void*)0 == thread1.m_pThreadData, "disposing threads failed" );
-
- TimeValue value = {1,0};
- osl_waitThread( &value );
- TEST_ENSURE( (void*)1 == thread2.m_pThreadData, "wrong thread disposed !" );
-
- // test, if new threads are directly disposed
- OThread1 thread3( pCallerUuid1 );
- thread3.create();
-
- while( (void*)1 == thread3.m_pThreadData );
- TEST_ENSURE( (void*)0 == thread3.m_pThreadData ,
- "new threads entering threadpool are not disposed" );
-
- uno_threadpool_reply( thread2.m_pThreadIdentifier ,
- thread2.m_nThreadIdentifierLength,
- (void*)0x2 );
-
- while( (void*)1 == thread2.m_pThreadData );
- TEST_ENSURE( (void*)2 == thread2.m_pThreadData , "reply does not work correctly" );
-
- uno_threadpool_stopDisposeThreads( pCallerUuid1 );
- }
- printf( "Done\n" );
-}
diff --git a/cppunit/ldflags.patch b/cppunit/ldflags.patch
new file mode 100644
index 000000000000..cecd69a4b5ee
--- /dev/null
+++ b/cppunit/ldflags.patch
@@ -0,0 +1,10 @@
+--- misc/cppunit-1.12.1/src/cppunit/Makefile.am Wed Feb 20 06:36:38 2008
++++ misc/build/cppunit-1.12.1/src/cppunit/Makefile.am Mon May 3 17:00:41 2010
+@@ -63,5 +63,6 @@
+
+ libcppunit_la_LDFLAGS= \
+ -no-undefined -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+- -release $(LT_RELEASE)
++ -release $(LT_RELEASE) \
++ @LIBADD_DL@
+
diff --git a/cppunit/makefile.mk b/cppunit/makefile.mk
index b57c341e2a23..4b1a7deac533 100644
--- a/cppunit/makefile.mk
+++ b/cppunit/makefile.mk
@@ -34,7 +34,7 @@ TARFILE_MD5=bd30e9cf5523cdfc019b94f5e1d7fd19
# from <https://sourceforge.net/projects/cppunit/files/cppunit/1.12.1/
# cppunit-1.12.1.tar.gz/download>
-PATCH_FILES = solarisfinite.patch warnings.patch windows.patch
+PATCH_FILES = solarisfinite.patch warnings.patch windows.patch ldflags.patch
# solarisfinite.patch: see <https://sourceforge.net/tracker/?func=detail&
# aid=2912590&group_id=11795&atid=311795>
# warnings.patch: see <https://sourceforge.net/tracker/?func=detail&
@@ -97,7 +97,7 @@ OOO_STLPORT_LIBS += -lm
# execute that program; however, the program would fail to locate the STLport
# library (another work-around might be to add something like --as-needed around
# $(LIBSTLPORT)):
-.IF "$(OS)" == "LINUX" || "$(OS)" == "SOLARIS"
+.IF "$(OS)" == "FREEBSD" || "$(OS)" == "LINUX" || "$(OS)" == "SOLARIS"
.IF "$(LD_LIBRARY_PATH)" == ""
LD_LIBRARY_PATH := $(SOLARLIBDIR)
# strictly speaking, this is incorrect if the LD_LIBRARY_PATH environment
diff --git a/dbaccess/prj/build.lst b/dbaccess/prj/build.lst
index d5c6eacc7d2a..f8b0502574e0 100644
--- a/dbaccess/prj/build.lst
+++ b/dbaccess/prj/build.lst
@@ -1,4 +1,4 @@
-ba dbaccess : l10n BOOST:boost connectivity svx stoc QADEVOOO:qadevOOo xmlscript NULL
+ba dbaccess : l10n BOOST:boost connectivity svx stoc qadevOOo xmlscript NULL
ba dbaccess usr1 - all ba_mkout NULL
ba dbaccess\inc nmake - all ba_inc NULL
ba dbaccess\source\ui\inc nmake - all ba_uiinc ba_inc NULL
diff --git a/dbaccess/qa/complex/dbaccess/makefile.mk b/dbaccess/qa/complex/dbaccess/makefile.mk
index d950100a7ead..56a24c0292fc 100755
--- a/dbaccess/qa/complex/dbaccess/makefile.mk
+++ b/dbaccess/qa/complex/dbaccess/makefile.mk
@@ -40,7 +40,6 @@ all:
.INCLUDE : target.mk
.ELSE
-.IF "$(BUILD_QADEVOOO)" == "YES"
#----- compile .java files -----------------------------------------
JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar ConnectivityTools.jar
@@ -76,8 +75,4 @@ run: $(CLASSDIR)$/$(JARTARGET)
run_%: $(CLASSDIR)$/$(JARTARGET)
+$(RUNNER_CALL) $(RUNNER_ARGS) -o complex.dbaccess.$(@:s/run_//)
-.ELSE
-.INCLUDE : target.mk
-.ENDIF # "$(BUILD_QADEVOOO)" == "YES"
-
.ENDIF # "$(SOLAR_JAVA)" == ""
diff --git a/default_images/sc/res/calcteam.png b/default_images/sc/res/calcteam.png
deleted file mode 100644
index 0a20421269b3..000000000000
--- a/default_images/sc/res/calcteam.png
+++ /dev/null
Binary files differ
diff --git a/desktop/prj/build.lst b/desktop/prj/build.lst
index 9253b4e82bc7..6f611926a0df 100644
--- a/desktop/prj/build.lst
+++ b/desktop/prj/build.lst
@@ -1,4 +1,4 @@
-dt desktop : l10n sfx2 stoc BERKELEYDB:berkeleydb sysui SO:sysui_so BOOST:boost svx xmlhelp sal unoil officecfg configmgr NULL
+dt desktop : l10n sfx2 stoc BERKELEYDB:berkeleydb sysui SO:sysui_so BOOST:boost svx xmlhelp sal unoil officecfg offuh NULL
dt desktop usr1 - all dt_mkout NULL
dt desktop\inc nmake - all dt_inc NULL
dt desktop\prj get - all dt_prj NULL
diff --git a/desktop/source/app/makefile.mk b/desktop/source/app/makefile.mk
index 83bec9011283..d9db7c163481 100644
--- a/desktop/source/app/makefile.mk
+++ b/desktop/source/app/makefile.mk
@@ -65,7 +65,6 @@ SHL1LIBS = $(SLB)$/mig.lib
SHL1STDLIBS = \
$(COMPHELPERLIB) \
- $(CONFIGMGRLIB) \
$(CPPUHELPERLIB) \
$(CPPULIB) \
$(I18NISOLANGLIB) \
diff --git a/desktop/source/deployment/makefile.mk b/desktop/source/deployment/makefile.mk
index 7eda0f582e15..173ff35bec1d 100644
--- a/desktop/source/deployment/makefile.mk
+++ b/desktop/source/deployment/makefile.mk
@@ -80,8 +80,7 @@ SHL1STDLIBS = \
$(SVLLIB) \
$(UNOTOOLSLIB) \
$(DEPLOYMENTMISCLIB) \
- $(HELPLINKERLIB) \
- $(CONFIGMGRLIB)
+ $(HELPLINKERLIB)
SHL1DEPN =
SHL1IMPLIB = i$(TARGET)
diff --git a/desktop/source/deployment/misc/dp_dependencies.cxx b/desktop/source/deployment/misc/dp_dependencies.cxx
index 63badbb0c211..9534f166f2f0 100644
--- a/desktop/source/deployment/misc/dp_dependencies.cxx
+++ b/desktop/source/deployment/misc/dp_dependencies.cxx
@@ -56,17 +56,13 @@ namespace css = ::com::sun::star;
static char const xmlNamespace[] =
"http://openoffice.org/extensions/description/2006";
-::dp_misc::Order compareWithVersion(::rtl::OUString const & version) {
+bool satisfiesMinimalVersion(::rtl::OUString const & version) {
::rtl::OUString v(
RTL_CONSTASCII_USTRINGPARAM(
"${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version")
":Version:OOOPackageVersion}"));
::rtl::Bootstrap::expandMacros(v);
- return ::dp_misc::compareVersions(v, version);
-}
-
-bool satisfiesMinimalVersion(::rtl::OUString const & version) {
- return compareWithVersion(version) != ::dp_misc::LESS;
+ return ::dp_misc::compareVersions(v, version) != ::dp_misc::LESS;
}
}
@@ -102,8 +98,14 @@ check(::dp_misc::DescriptionInfoset const & infoset) {
RTL_CONSTASCII_STRINGPARAM(
"OpenOffice.org-maximal-version")))
{
+ ::rtl::OUString v(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version")
+ ":Version:OOOBaseVersion}"));
+ ::rtl::Bootstrap::expandMacros(v);
sat =
- compareWithVersion(
+ ::dp_misc::compareVersions(
+ v,
e->getAttribute(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value"))))
!= ::dp_misc::GREATER;
diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
index 460ba5e9fed0..6cf6d4ff7818 100644
--- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
@@ -45,9 +45,9 @@
#include "ucbhelper/content.hxx"
#include "comphelper/anytostring.hxx"
#include "comphelper/servicedecl.hxx"
-#include "configmgr/update.hxx"
#include "xmlscript/xml_helper.hxx"
#include "svl/inettype.hxx"
+#include "com/sun/star/configuration/Update.hpp"
#include "com/sun/star/ucb/NameClash.hpp"
#include "com/sun/star/io/XActiveDataSink.hpp"
#include "com/sun/star/lang/WrappedTargetRuntimeException.hpp"
@@ -645,14 +645,16 @@ void BackendImpl::PackageImpl::processPackage_(
{
if (m_isSchema)
{
- configmgr::update::insertExtensionXcsFile(
- that->m_eContext == CONTEXT_SHARED, expandUnoRcUrl(url));
+ com::sun::star::configuration::Update::get(
+ that->m_xComponentContext)->insertExtensionXcsFile(
+ that->m_eContext == CONTEXT_SHARED, expandUnoRcUrl(url));
}
else
{
url = replaceOrigin(url, xCmdEnv);
- configmgr::update::insertExtensionXcuFile(
- that->m_eContext == CONTEXT_SHARED, expandUnoRcUrl(url));
+ com::sun::star::configuration::Update::get(
+ that->m_xComponentContext)->insertExtensionXcuFile(
+ that->m_eContext == CONTEXT_SHARED, expandUnoRcUrl(url));
}
that->addToConfigmgrIni( m_isSchema, url, xCmdEnv );
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index cefc3cebf0fd..4bcbf250907f 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -29,6 +29,7 @@
#include "precompiled_desktop.hxx"
#include <map>
+#include <new>
#include <set>
#include "migration.hxx"
@@ -38,7 +39,6 @@
#include <unotools/textsearch.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
-#include <configmgr/update.hxx>
#include <unotools/bootstrap.hxx>
#include <rtl/bootstrap.hxx>
#include <rtl/uri.hxx>
@@ -51,6 +51,7 @@
#include <osl/security.hxx>
#include <unotools/configmgr.hxx>
+#include <com/sun/star/configuration/Update.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/task/XJob.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
@@ -540,6 +541,21 @@ bool getComponent(rtl::OUString const & path, rtl::OUString * component) {
return true;
}
+uno::Sequence< rtl::OUString > setToSeq(std::set< rtl::OUString > const & set) {
+ std::set< rtl::OUString >::size_type n = set.size();
+ if (n > SAL_MAX_INT32) {
+ throw std::bad_alloc();
+ }
+ uno::Sequence< rtl::OUString > seq(static_cast< sal_Int32 >(n));
+ sal_Int32 i = 0;
+ for (std::set< rtl::OUString >::const_iterator j(set.begin());
+ j != set.end(); ++j)
+ {
+ seq[i++] = *j;
+ }
+ return seq;
+}
+
}
void MigrationImpl::copyConfig() {
@@ -587,9 +603,11 @@ void MigrationImpl::copyConfig() {
buf.append(enc);
} while (n >= 0);
buf.appendAscii(RTL_CONSTASCII_STRINGPARAM(".xcu"));
- configmgr::update::insertModificationXcuFile(
- buf.makeStringAndClear(), i->second.includedPaths,
- i->second.excludedPaths);
+ configuration::Update::get(
+ comphelper::getProcessComponentContext())->
+ insertModificationXcuFile(
+ buf.makeStringAndClear(), setToSeq(i->second.includedPaths),
+ setToSeq(i->second.excludedPaths));
} else {
OSL_TRACE(
("configuration migration component %s ignored (only excludes,"
diff --git a/desktop/source/splash/makefile.mk b/desktop/source/splash/makefile.mk
index 2f163fe7b9d6..89609687438c 100644
--- a/desktop/source/splash/makefile.mk
+++ b/desktop/source/splash/makefile.mk
@@ -63,7 +63,6 @@ SHL1STDLIBS= \
$(SVLLIB) \
$(SVTOOLLIB) \
$(COMPHELPERLIB) \
- $(CONFIGMGRLIB) \
$(UNOTOOLSLIB) \
$(TOOLSLIB) \
$(UCBHELPERLIB) \
diff --git a/desktop/test/deployment/boxt/Addons.xcu b/desktop/test/deployment/boxt/Addons.xcu
new file mode 100644
index 000000000000..3df7e2de274c
--- /dev/null
+++ b/desktop/test/deployment/boxt/Addons.xcu
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* 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.
+*
+**********************************************************************-->
+
+<o:component-data xmlns:o="http://openoffice.org/2001/registry"
+ o:package="org.openoffice.Office" o:name="Addons">
+ <node o:name="AddonUI">
+ <node o:name="OfficeMenuBar">
+ <node o:name="org.openoffice.test.desktop.deployment.boxt" o:op="replace">
+ <prop o:name="Title" xml:lang="en-US">
+ <value>boxt</value>
+ </prop>
+ <node o:name="Submenu">
+ <node o:name="1" o:op="replace">
+ <prop o:name="URL">
+ <value>vnd.org.openoffice.test.desktop.deployment.boxt:</value>
+ </prop>
+ <prop o:name="Title" xml:lang="en-US">
+ <value>boxt</value>
+ </prop>
+ </node>
+ </node>
+ </node>
+ </node>
+ </node>
+</o:component-data>
diff --git a/desktop/test/deployment/boxt/ProtocolHandler.xcu b/desktop/test/deployment/boxt/ProtocolHandler.xcu
new file mode 100644
index 000000000000..fe448aedbe17
--- /dev/null
+++ b/desktop/test/deployment/boxt/ProtocolHandler.xcu
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* 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.
+*
+**********************************************************************-->
+
+<o:component-data xmlns:o="http://openoffice.org/2001/registry"
+ o:package="org.openoffice.Office" o:name="ProtocolHandler">
+ <node o:name="HandlerSet">
+ <node o:name="com.sun.star.test.deployment.boxt" o:op="replace">
+ <prop o:name="Protocols">
+ <value>vnd.org.openoffice.test.desktop.deployment.boxt:*</value>
+ </prop>
+ </node>
+ </node>
+</o:component-data>
diff --git a/desktop/test/deployment/boxt/boxt.cxx b/desktop/test/deployment/boxt/boxt.cxx
new file mode 100644
index 000000000000..dc82c0c004d6
--- /dev/null
+++ b/desktop/test/deployment/boxt/boxt.cxx
@@ -0,0 +1,235 @@
+/*************************************************************************
+*
+* 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_desktop.hxx"
+#include "sal/config.h"
+
+#include "boost/noncopyable.hpp"
+#include "com/sun/star/beans/PropertyValue.hpp"
+#include "com/sun/star/frame/DispatchDescriptor.hpp"
+#include "com/sun/star/frame/XDispatch.hpp"
+#include "com/sun/star/frame/XDispatchProvider.hpp"
+#include "com/sun/star/frame/XStatusListener.hpp"
+#include "com/sun/star/lang/XServiceInfo.hpp"
+#include "com/sun/star/lang/XSingleComponentFactory.hpp"
+#include "com/sun/star/uno/Any.hxx"
+#include "com/sun/star/uno/Exception.hpp"
+#include "com/sun/star/uno/Reference.hxx"
+#include "com/sun/star/uno/RuntimeException.hpp"
+#include "com/sun/star/uno/Sequence.hxx"
+#include "com/sun/star/uno/XComponentContext.hpp"
+#include "com/sun/star/uno/XInterface.hpp"
+#include "com/sun/star/util/URL.hpp"
+#include "cppuhelper/factory.hxx"
+#include "cppuhelper/implbase1.hxx"
+#include "cppuhelper/implbase3.hxx"
+#include "cppuhelper/implementationentry.hxx"
+#include "cppuhelper/weak.hxx"
+#include "filter/msfilter/countryid.hxx"
+#include "osl/diagnose.h"
+#include "rtl/ustring.h"
+#include "rtl/ustring.hxx"
+#include "sal/types.h"
+#include "uno/lbnames.h"
+#include "vcl/svapp.hxx"
+
+namespace {
+
+namespace css = com::sun::star;
+
+namespace service {
+
+rtl::OUString getImplementationName() {
+ return rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.test.deployment.boxt"));
+}
+
+css::uno::Sequence< rtl::OUString > getSupportedServiceNames() {
+ rtl::OUString name(
+ RTL_CONSTASCII_USTRINGPARAM("com.sun.star.test.deployment.boxt"));
+ return css::uno::Sequence< rtl::OUString >(&name, 1);
+}
+
+}
+
+class Service:
+ public cppu::WeakImplHelper3<
+ css::lang::XServiceInfo, css::frame::XDispatchProvider,
+ css::frame::XDispatch >,
+ private boost::noncopyable
+{
+public: