From 2e626373db2412ac22e8c5c27a60d11cd29e875b Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Sat, 28 Jan 2012 20:52:45 +0100 Subject: replace obsolete "master" branch with README that points at new repo --- xmlsecurity/tools/demo/JavaFlatFilter.java | 225 --- xmlsecurity/tools/demo/makefile.mk | 157 -- xmlsecurity/tools/demo/manifest | 1 - xmlsecurity/tools/demo/mozprofile.cxx | 110 -- xmlsecurity/tools/demo/multisigdemo.cxx | 239 --- xmlsecurity/tools/demo/performance.cxx | 1874 -------------------- xmlsecurity/tools/demo/readme.txt | 22 - xmlsecurity/tools/demo/signdemo.cxx | 159 -- xmlsecurity/tools/demo/util.cxx | 114 -- xmlsecurity/tools/demo/util.hxx | 53 - xmlsecurity/tools/demo/util2.cxx | 429 ----- xmlsecurity/tools/demo/verifydemo.cxx | 111 -- xmlsecurity/tools/examples/demo-sample.gif | Bin 94 -> 0 bytes xmlsecurity/tools/examples/demo-sample.sxw | Bin 19891 -> 0 bytes xmlsecurity/tools/examples/demo-sample.xml | 3 - xmlsecurity/tools/examples/enc-1.xml | 31 - xmlsecurity/tools/examples/enc-2.xml | 58 - xmlsecurity/tools/examples/eval_export.txt | 7 - xmlsecurity/tools/examples/eval_import.txt | 14 - xmlsecurity/tools/examples/evaluate_win.bat | 138 -- xmlsecurity/tools/examples/readme.txt | 7 - xmlsecurity/tools/examples/s-in-e-1.xml | 53 - xmlsecurity/tools/examples/s-in-e-2.xml | 53 - xmlsecurity/tools/examples/sign-0.xml | 27 - xmlsecurity/tools/examples/sign-1.xml | 29 - xmlsecurity/tools/examples/sign-2.xml | 33 - xmlsecurity/tools/examples/sign-3.xml | 41 - xmlsecurity/tools/examples/sign-4.xml | 57 - xmlsecurity/tools/examples/sign-5.xml | 89 - xmlsecurity/tools/examples/uno_win.bat | 23 - xmlsecurity/tools/examples/warmup.xml | 27 - xmlsecurity/tools/standalone/csfit/certmngr.cxx | 191 -- xmlsecurity/tools/standalone/csfit/decrypter.cxx | 274 --- xmlsecurity/tools/standalone/csfit/encrypter.cxx | 311 ---- xmlsecurity/tools/standalone/csfit/helper.cxx | 268 --- xmlsecurity/tools/standalone/csfit/helper.hxx | 241 --- xmlsecurity/tools/standalone/csfit/makefile.mk | 155 -- xmlsecurity/tools/standalone/csfit/signer.cxx | 372 ---- .../tools/standalone/csfit/util/makefile.mk | 174 -- xmlsecurity/tools/standalone/csfit/verifier.cxx | 342 ---- xmlsecurity/tools/standalone/mscsfit/certmngr.cxx | 154 -- xmlsecurity/tools/standalone/mscsfit/decrypter.cxx | 248 --- xmlsecurity/tools/standalone/mscsfit/encrypter.cxx | 310 ---- xmlsecurity/tools/standalone/mscsfit/helper.cxx | 222 --- xmlsecurity/tools/standalone/mscsfit/helper.hxx | 204 --- xmlsecurity/tools/standalone/mscsfit/makefile.mk | 131 -- xmlsecurity/tools/standalone/mscsfit/signer.cxx | 344 ---- .../tools/standalone/mscsfit/util/makefile.mk | 174 -- xmlsecurity/tools/standalone/mscsfit/verifier.cxx | 329 ---- xmlsecurity/tools/standalone/readme.txt | 19 - xmlsecurity/tools/uno/AdapterNode.java | 165 -- xmlsecurity/tools/uno/AttributeListHelper.java | 148 -- xmlsecurity/tools/uno/DomToTreeModelAdapter.java | 166 -- xmlsecurity/tools/uno/EncryptionEntity.java | 218 --- xmlsecurity/tools/uno/ParsingThread.java | 248 --- xmlsecurity/tools/uno/SAXEventCollector.java | 195 -- xmlsecurity/tools/uno/SAXEventPrinter.java | 320 ---- xmlsecurity/tools/uno/SecurityEntity.java | 202 --- xmlsecurity/tools/uno/SignatureEntity.java | 288 --- xmlsecurity/tools/uno/TestTool.java | 1392 --------------- .../tools/uno/UnsolvedReferenceTableModel.java | 89 - xmlsecurity/tools/uno/XMLFileFilter.java | 79 - .../tools/uno/XMLSecurityFrameworkController.java | 1085 ------------ xmlsecurity/tools/uno/XMLTreeCellRanderer.java | 85 - xmlsecurity/tools/uno/current.gif | Bin 94 -> 0 bytes xmlsecurity/tools/uno/makefile.mk | 48 - 66 files changed, 13375 deletions(-) delete mode 100644 xmlsecurity/tools/demo/JavaFlatFilter.java delete mode 100644 xmlsecurity/tools/demo/makefile.mk delete mode 100644 xmlsecurity/tools/demo/manifest delete mode 100644 xmlsecurity/tools/demo/mozprofile.cxx delete mode 100644 xmlsecurity/tools/demo/multisigdemo.cxx delete mode 100644 xmlsecurity/tools/demo/performance.cxx delete mode 100644 xmlsecurity/tools/demo/readme.txt delete mode 100644 xmlsecurity/tools/demo/signdemo.cxx delete mode 100644 xmlsecurity/tools/demo/util.cxx delete mode 100644 xmlsecurity/tools/demo/util.hxx delete mode 100644 xmlsecurity/tools/demo/util2.cxx delete mode 100644 xmlsecurity/tools/demo/verifydemo.cxx delete mode 100644 xmlsecurity/tools/examples/demo-sample.gif delete mode 100644 xmlsecurity/tools/examples/demo-sample.sxw delete mode 100644 xmlsecurity/tools/examples/demo-sample.xml delete mode 100644 xmlsecurity/tools/examples/enc-1.xml delete mode 100644 xmlsecurity/tools/examples/enc-2.xml delete mode 100644 xmlsecurity/tools/examples/eval_export.txt delete mode 100644 xmlsecurity/tools/examples/eval_import.txt delete mode 100644 xmlsecurity/tools/examples/evaluate_win.bat delete mode 100644 xmlsecurity/tools/examples/readme.txt delete mode 100644 xmlsecurity/tools/examples/s-in-e-1.xml delete mode 100644 xmlsecurity/tools/examples/s-in-e-2.xml delete mode 100644 xmlsecurity/tools/examples/sign-0.xml delete mode 100644 xmlsecurity/tools/examples/sign-1.xml delete mode 100644 xmlsecurity/tools/examples/sign-2.xml delete mode 100644 xmlsecurity/tools/examples/sign-3.xml delete mode 100644 xmlsecurity/tools/examples/sign-4.xml delete mode 100644 xmlsecurity/tools/examples/sign-5.xml delete mode 100644 xmlsecurity/tools/examples/uno_win.bat delete mode 100644 xmlsecurity/tools/examples/warmup.xml delete mode 100644 xmlsecurity/tools/standalone/csfit/certmngr.cxx delete mode 100644 xmlsecurity/tools/standalone/csfit/decrypter.cxx delete mode 100644 xmlsecurity/tools/standalone/csfit/encrypter.cxx delete mode 100644 xmlsecurity/tools/standalone/csfit/helper.cxx delete mode 100644 xmlsecurity/tools/standalone/csfit/helper.hxx delete mode 100644 xmlsecurity/tools/standalone/csfit/makefile.mk delete mode 100644 xmlsecurity/tools/standalone/csfit/signer.cxx delete mode 100644 xmlsecurity/tools/standalone/csfit/util/makefile.mk delete mode 100644 xmlsecurity/tools/standalone/csfit/verifier.cxx delete mode 100644 xmlsecurity/tools/standalone/mscsfit/certmngr.cxx delete mode 100644 xmlsecurity/tools/standalone/mscsfit/decrypter.cxx delete mode 100644 xmlsecurity/tools/standalone/mscsfit/encrypter.cxx delete mode 100644 xmlsecurity/tools/standalone/mscsfit/helper.cxx delete mode 100644 xmlsecurity/tools/standalone/mscsfit/helper.hxx delete mode 100644 xmlsecurity/tools/standalone/mscsfit/makefile.mk delete mode 100644 xmlsecurity/tools/standalone/mscsfit/signer.cxx delete mode 100644 xmlsecurity/tools/standalone/mscsfit/util/makefile.mk delete mode 100644 xmlsecurity/tools/standalone/mscsfit/verifier.cxx delete mode 100644 xmlsecurity/tools/standalone/readme.txt delete mode 100644 xmlsecurity/tools/uno/AdapterNode.java delete mode 100644 xmlsecurity/tools/uno/AttributeListHelper.java delete mode 100644 xmlsecurity/tools/uno/DomToTreeModelAdapter.java delete mode 100644 xmlsecurity/tools/uno/EncryptionEntity.java delete mode 100644 xmlsecurity/tools/uno/ParsingThread.java delete mode 100644 xmlsecurity/tools/uno/SAXEventCollector.java delete mode 100644 xmlsecurity/tools/uno/SAXEventPrinter.java delete mode 100644 xmlsecurity/tools/uno/SecurityEntity.java delete mode 100644 xmlsecurity/tools/uno/SignatureEntity.java delete mode 100644 xmlsecurity/tools/uno/TestTool.java delete mode 100644 xmlsecurity/tools/uno/UnsolvedReferenceTableModel.java delete mode 100644 xmlsecurity/tools/uno/XMLFileFilter.java delete mode 100644 xmlsecurity/tools/uno/XMLSecurityFrameworkController.java delete mode 100644 xmlsecurity/tools/uno/XMLTreeCellRanderer.java delete mode 100644 xmlsecurity/tools/uno/current.gif delete mode 100644 xmlsecurity/tools/uno/makefile.mk (limited to 'xmlsecurity/tools') diff --git a/xmlsecurity/tools/demo/JavaFlatFilter.java b/xmlsecurity/tools/demo/JavaFlatFilter.java deleted file mode 100644 index 5df9027e9..000000000 --- a/xmlsecurity/tools/demo/JavaFlatFilter.java +++ /dev/null @@ -1,225 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package com.sun.star.xml.security.eval; - -import com.sun.star.registry.XRegistryKey; -import com.sun.star.comp.loader.FactoryHelper; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.xml.sax.InputSource; -import com.sun.star.xml.sax.XDocumentHandler; -import com.sun.star.xml.sax.XParser; -import com.sun.star.xml.sax.XDTDHandler; -import com.sun.star.xml.sax.XEntityResolver; -import com.sun.star.xml.sax.XErrorHandler; -import com.sun.star.xml.sax.XAttributeList; -import com.sun.star.lang.XSingleServiceFactory; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.lang.XTypeProvider; -import com.sun.star.lang.XServiceInfo; -import com.sun.star.lang.Locale; - -/* - * the JavaFlatFilter class is a pure java filter, which does nothing - * but forwarding the SAX events to the next document handler. - * The purpose of this class is to calculate the time consumed by - * the UNO C++/Java bridge during exporting/importing. - */ -public class JavaFlatFilter extends Object - implements XDocumentHandler, XParser, XTypeProvider, XServiceInfo -{ - XDocumentHandler m_xDocumentHandler; - - /* XDocumentHandler */ - public void startDocument() - throws com.sun.star.xml.sax.SAXException - { - m_xDocumentHandler.startDocument(); - } - - public void endDocument() - throws com.sun.star.xml.sax.SAXException - { - m_xDocumentHandler.endDocument(); - } - - public void startElement (String aName, com.sun.star.xml.sax.XAttributeList xAttribs ) - throws com.sun.star.xml.sax.SAXException - { - m_xDocumentHandler.startElement(aName, xAttribs); - } - - public void endElement ( String aName ) - throws com.sun.star.xml.sax.SAXException - { - m_xDocumentHandler.endElement(aName); - } - - public void characters ( String aChars ) - throws com.sun.star.xml.sax.SAXException - { - m_xDocumentHandler.characters(aChars); - } - - public void ignorableWhitespace ( String aWhitespaces ) - throws com.sun.star.xml.sax.SAXException - { - m_xDocumentHandler.ignorableWhitespace(aWhitespaces); - } - - public void processingInstruction ( String aTarget, String aData ) - throws com.sun.star.xml.sax.SAXException - { - m_xDocumentHandler.processingInstruction(aTarget, aData); - } - - public void setDocumentLocator (com.sun.star.xml.sax.XLocator xLocator ) - throws com.sun.star.xml.sax.SAXException - { - m_xDocumentHandler.setDocumentLocator(xLocator); - } - - /* XParser */ - public void parseStream(InputSource strucInputSource) - { - } - - public void setDocumentHandler(XDocumentHandler xDocumentHandler) - { - m_xDocumentHandler = xDocumentHandler; - } - - public void setDTDHandler(XDTDHandler xHandler) - { - } - - public void setEntityResolver(XEntityResolver xResolver) - { - } - - public void setErrorHandler(XErrorHandler xHandler) - { - } - - public void setLocale(Locale locale) - { - } - - /* - * XTypeProvider implementation - * maintain a static implementation id for all instances of JavaFlatFilter - * initialized by the first call to getImplementationId() - */ - protected static byte[] _implementationId; - public com.sun.star.uno.Type[] getTypes() - { - com.sun.star.uno.Type[] retValue = new com.sun.star.uno.Type[4]; - - /* - * instantiate Type instances for each interface you support and add them to Type[] array - * this object implements XServiceInfo, XTypeProvider and XSignFilter - */ - retValue[0]= new com.sun.star.uno.Type( XServiceInfo.class); - retValue[1]= new com.sun.star.uno.Type( XTypeProvider.class); - retValue[2]= new com.sun.star.uno.Type( XDocumentHandler.class); - retValue[3]= new com.sun.star.uno.Type( XParser.class); - - /* - * XInterface is not needed for Java components, the UnoRuntime does its job - */ - - return retValue; - } - - synchronized public byte[] getImplementationId() - { - if (_implementationId == null) { - _implementationId= new byte[16]; - int hash = hashCode(); // hashDode of this object - _implementationId[0] = (byte)(hash & 0xff); - _implementationId[1] = (byte)((hash >>> 8) & 0xff); - _implementationId[2] = (byte)((hash >>> 16) & 0xff); - _implementationId[3] = (byte)((hash >>>24) & 0xff); - } - return _implementationId; - } - - - /* - * XServiceInfo implementation - * hold the service name in a private static member variable of the class - */ - protected static final String __serviceName = "com.sun.star.xml.crypto.eval.JavaFlatFilter"; - public String getImplementationName( ) - { - return getClass().getName(); - } - - public boolean supportsService(String serviceName) - { - boolean rc = false; - - if ( serviceName.equals( __serviceName)) - { - rc = true; - } - - return rc; - } - - public String[] getSupportedServiceNames( ) - { - String[] retValue= new String[0]; - retValue[0]= __serviceName; - return retValue; - } - - /* static __getServiceFactory() implementation */ - public static XSingleServiceFactory __getServiceFactory(String implName, - XMultiServiceFactory multiFactory, - com.sun.star.registry.XRegistryKey regKey) - { - com.sun.star.lang.XSingleServiceFactory xSingleServiceFactory = null; - if (implName.equals( JavaFlatFilter.class.getName()) ) - { - xSingleServiceFactory = FactoryHelper.getServiceFactory( JavaFlatFilter.class, - JavaFlatFilter.__serviceName, - multiFactory, - regKey); - } - - return xSingleServiceFactory; - } - - /* static __writeRegistryServiceInfo implementation */ - public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) - { - return FactoryHelper.writeRegistryServiceInfo( JavaFlatFilter.class.getName(), - __serviceName, - regKey); - } -} diff --git a/xmlsecurity/tools/demo/makefile.mk b/xmlsecurity/tools/demo/makefile.mk deleted file mode 100644 index 5dba00d23..000000000 --- a/xmlsecurity/tools/demo/makefile.mk +++ /dev/null @@ -1,157 +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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=xmlsecurity -TARGET=demo -ENABLE_EXCEPTIONS=TRUE -NO_BSYMBOLIC=TRUE -LIBTARGET=NO - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/target.pmk - -CDEFS += -DXMLSEC_CRYPTO_NSS -DXMLSEC_NO_XSLT - -# --- Files -------------------------------------------------------- - -SHARE_LIBS = \ - $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(SALLIB) \ - $(UCBHELPERLIB) \ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(XMLOFFLIB) \ - $(LIBXML2LIB) \ - $(NSS3LIB) \ - $(NSPR4LIB) \ - $(XMLSECLIB) \ - $(COMPHELPERLIB) - -.IF "$(CRYPTO_ENGINE)" == "mscrypto" -SHARE_LIBS+= $(XMLSECLIB-MS) -.ELSE -SHARE_LIBS+= $(XMLSECLIB-NSS) -.ENDIF - - - -# HACK: Use SLO for demo directly... -SHARE_OBJS = \ - $(OBJ)$/util.obj \ - $(OBJ)$/util2.obj \ - $(SLO)$/biginteger.obj \ - $(SLO)$/baseencoding.obj \ - $(SLO)/xmlsignaturehelper.obj \ - $(SLO)/xmlsignaturehelper2.obj \ - $(SLO)/xsecctl.obj \ - $(SLO)/xsecparser.obj \ - $(SLO)/xsecsign.obj \ - $(SLO)/xsecverify.obj - -# -# ---------- signdemo ---------- -# -APP1TARGET=signdemo -APP1DEPN=makefile.mk -APP1STDLIBS+=$(SHARE_LIBS) -APP1OBJS= $(SHARE_OBJS) $(OBJ)$/signdemo.obj - -# -# ---------- verifydemo ---------- -# -APP2TARGET=verifydemo -APP2DEPN=makefile.mk -APP2STDLIBS+=$(SHARE_LIBS) -APP2OBJS= $(SHARE_OBJS) $(OBJ)$/verifydemo.obj - -# -# ---------- multisigdemo ---------- -# -APP3TARGET=multisigdemo -APP3DEPN=makefile.mk -APP3STDLIBS+=$(SHARE_LIBS) -APP3OBJS= $(SHARE_OBJS) $(OBJ)$/multisigdemo.obj - -# -# ---------- mozprofile ---------- -# -APP4TARGET=mozprofile -APP4DEPN=makefile.mk -APP4STDLIBS+=$(SHARE_LIBS) -APP4OBJS= $(SHARE_OBJS) $(OBJ)$/mozprofile.obj - -# -# ---------- performance ---------- -# -APP5TARGET=performance -APP5DEPN=makefile.mk -APP5STDLIBS+=$(SHARE_LIBS) -APP5OBJS= $(OBJ)$/util.obj $(OBJ)$/performance.obj - -# -# ---------- jflatfilter ---------- -# -PACKAGE= com$/sun$/star$/xml$/security$/eval -JARFILES= ridl.jar jurt.jar unoil.jar juh.jar -JAVAFILES:= $(shell @ls *.java) -JAVACLASSFILES= $(CLASSDIR)$/$(PACKAGE)$/JavaFlatFilter.class -JARCLASSDIRS= $(PACKAGE) -JARTARGET= jflatfilter.jar -JARCOMPRESS= TRUE - - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -ALLTAR : $(BIN)$/demo.rdb - -$(JAVACLASSFILES) : $(JAVAFILES) - -REGISTERLIBS= \ - dynamicloader.uno$(DLLPOST) \ - namingservice.uno$(DLLPOST) \ - bootstrap.uno$(DLLPOST) \ - sax.uno$(DLLPOST) \ - $(DLLPRE)mozab2$(DLLPOST) - -$(BIN)$/demo.rdb: \ - makefile.mk \ - $(foreach,i,$(REGISTERLIBS) $(SOLARSHAREDBIN)$/$(i)) - -rm -f $@ $(BIN)$/regcomp.rdb $(BIN)$/demo.tmp - $(REGCOMP) -register -r $(BIN)$/demo.tmp -c "$(strip $(REGISTERLIBS))" - $(REGCOMP) -register -r $(BIN)$/demo.tmp -c $(DLLPRE)xsec_fw$(DLLPOST) - $(REGCOMP) -register -r $(BIN)$/demo.tmp -c $(DLLPRE)xsec_xmlsec$(DLLPOST) - $(REGMERGE) $(BIN)$/demo.tmp / $(SOLARBINDIR)/types.rdb - mv $(BIN)$/demo.tmp $@ - - diff --git a/xmlsecurity/tools/demo/manifest b/xmlsecurity/tools/demo/manifest deleted file mode 100644 index 93cb7d908..000000000 --- a/xmlsecurity/tools/demo/manifest +++ /dev/null @@ -1 +0,0 @@ -RegistrationClassName: com.sun.star.xml.security.eval.JavaFlatFilter diff --git a/xmlsecurity/tools/demo/mozprofile.cxx b/xmlsecurity/tools/demo/mozprofile.cxx deleted file mode 100644 index a6326018f..000000000 --- a/xmlsecurity/tools/demo/mozprofile.cxx +++ /dev/null @@ -1,110 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_xmlsecurity.hxx" - -#include "util.hxx" - -#include -#include -#include -#include - -#include -#include -#include - -using namespace ::com::sun::star; - -int SAL_CALL main( int argc, char **argv ) -{ - fprintf( stdout, "\nTesting Mozilla Profile Detection...\n\nOpenOffice.org will use the first detected profile.\nResults might be different when started in OOo program folder!\n" ) ; - - uno::Reference< lang::XMultiServiceFactory > xMSF = CreateDemoServiceFactory(); - if ( !xMSF.is() ) - { - fprintf( stdout, "\n\nERROR: Can't create Service Factory\n" ); - exit (-1); - } - - uno::Reference xMozillaBootstrap( xMSF->createInstance(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.mozilla.MozillaBootstrap" ) ) ), uno::UNO_QUERY ); - if ( !xMozillaBootstrap.is() ) - { - fprintf( stdout, "\n\nERROR: Can't create Mozilla Bootstrap Service\n" ); - exit (-1); - } - - int nProducts = 4; - mozilla::MozillaProductType productTypes[4] = { mozilla::MozillaProductType_Thunderbird, mozilla::MozillaProductType_Mozilla, mozilla::MozillaProductType_Firefox, mozilla::MozillaProductType_Default }; - for ( int i = 0; i < nProducts; i++) - { - if ( i == 0 ) - fprintf( stdout, "\nThunderbird: " ); - else if ( i == 1 ) - fprintf( stdout, "\nMozilla: " ); - else if ( i == 2 ) - fprintf( stdout, "\nFireFox: " ); - else - fprintf( stdout, "\nDefault: " ); - - ::rtl::OUString profile = xMozillaBootstrap->getDefaultProfile(productTypes[i]); - if ( profile.getLength() ) - { - ::rtl::OUString profilepath = xMozillaBootstrap->getProfilePath(productTypes[i],profile); - fprintf( stdout, "Name=%s, Path=%s", rtl::OUStringToOString( profile , RTL_TEXTENCODING_ASCII_US ).getStr(), rtl::OUStringToOString( profilepath , RTL_TEXTENCODING_ASCII_US ).getStr() ); - } - else - { - fprintf( stdout, "NOT FOUND" ); - } - } - - /* - * creates a signature helper - */ - XMLSignatureHelper aSignatureHelper( xMSF ); - - /* - * creates a security context. - */ - rtl::OUString aCryptoToken; - bool bInit = aSignatureHelper.Init( aCryptoToken ); - if ( !bInit ) - { - fprintf( stdout, "\n\nERROR: Unable to initialize security environment.\n\n" ); - } - else - { - fprintf( stdout, "\n\nSecurity environment can be initialized successfully.\n\n" ); - } - - return 0; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/tools/demo/multisigdemo.cxx b/xmlsecurity/tools/demo/multisigdemo.cxx deleted file mode 100644 index f5d2b9565..000000000 --- a/xmlsecurity/tools/demo/multisigdemo.cxx +++ /dev/null @@ -1,239 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_xmlsecurity.hxx" - -#include -#include "util.hxx" - -#include -#include - -#include -#include -#include "xmlsecurity/baseencoding.hxx" -#include -#include - -using namespace ::com::sun::star; - -long denyVerifyHandler( void *, void * ) -{ - return 0; -} - -long startVerifyHandler( void *, void * ) -{ - return QueryVerifySignature(); -} - -int SAL_CALL main( int argc, char **argv ) -{ - if( argc < 5 ) - { - fprintf( stderr, "Usage: %s []\n" , argv[0] ) ; - return -1 ; - } - - uno::Reference< lang::XMultiServiceFactory > xMSF = CreateDemoServiceFactory(); - - rtl::OUString aSIGFileName = rtl::OUString::createFromAscii(argv[1]); - rtl::OUString aSIGFileName2 = rtl::OUString::createFromAscii(argv[2]); - rtl::OUString aXMLFileName = rtl::OUString::createFromAscii(argv[3]); - rtl::OUString aBINFileName = rtl::OUString::createFromAscii(argv[4]); - rtl::OUString aCryptoToken; - if ( argc >= 7 ) - aCryptoToken = rtl::OUString::createFromAscii(argv[6]); - - sal_Int32 nSecurityId; - uno::Reference< io::XOutputStream > xOutputStream; - uno::Reference< io::XInputStream > xInputStream; - bool bDone; - SignatureInformations signatureInformations; - uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler> xDocumentHandler; - - // -------- START ------- - - XMLSignatureHelper aSignatureHelper( xMSF ); - - bool bInit = aSignatureHelper.Init( aCryptoToken ); - if ( !bInit ) - { - fprintf( stderr, "Error initializing security context!\n" ); - return -1; - } - - fprintf( stdout, "\n\nTEST MISSION 1: Create the first signature file\n"); - - aSignatureHelper.StartMission(); - - /* - * select a private key certificate - */ - uno::Reference< xml::crypto::XSecurityEnvironment > xSecurityEnvironment = aSignatureHelper.GetSecurityEnvironment(); - uno::Sequence< uno::Reference< ::com::sun::star::security::XCertificate > > xPersonalCerts = xSecurityEnvironment->getPersonalCertificates() ; - - fprintf( stdout, "\nPlease select two certificates:\n" ); - - for ( int nSig = 0; nSig < 2; nSig++ ) - { - // New security ID for signature... - nSecurityId = aSignatureHelper.GetNewSecurityId(); - - // Select certificate... - uno::Reference< ::com::sun::star::security::XCertificate > xPersonalCert = getCertificateFromEnvironment( xSecurityEnvironment, true ); - aSignatureHelper.SetX509Certificate( - nSecurityId, xPersonalCert->getIssuerName(), - bigIntegerToNumericString( xPersonalCert->getSerialNumber()), - baseEncode(xPersonalCert->getEncoded(), BASE64)); - aSignatureHelper.AddForSigning( nSecurityId, aXMLFileName, aXMLFileName, sal_False ); - aSignatureHelper.AddForSigning( nSecurityId, aBINFileName, aBINFileName, sal_True ); - aSignatureHelper.SetDateTime( nSecurityId, Date(), Time() ); - } - /* - * creates signature - */ - xOutputStream = OpenOutputStream( aSIGFileName ); - bDone = aSignatureHelper.CreateAndWriteSignature( xOutputStream ); - if ( !bDone ) - fprintf( stderr, "\nSTATUS MISSION 1: Error creating Signature!\n" ); - else - fprintf( stdout, "\nSTATUS MISSION 1: Signature successfully created!\n" ); - - aSignatureHelper.EndMission(); - - - fprintf( stdout, "\n\nTEST MISSION 2: Transfer the second signature to a new signature file\n"); - - /* - * You can use an uninitialized SignatureHelper to perform this mission. - */ - - /* - * configures the start-verify handler. Don't need to verify for transfering... - */ - aSignatureHelper.SetStartVerifySignatureHdl( Link( NULL, denyVerifyHandler ) ); - aSignatureHelper.StartMission(); - - xInputStream = OpenInputStream( aSIGFileName ); - bDone = aSignatureHelper.ReadAndVerifySignature( xInputStream ); - xInputStream->closeInput(); - - if ( !bDone ) - fprintf( stderr, "\nSTATUS MISSION 2: Error in reading Signature!\n" ); - else - fprintf( stdout, "\nSTATUS MISSION 2: Signature successfully transfered!\n" ); - - /* - * get all signature information - */ - signatureInformations = aSignatureHelper.GetSignatureInformations(); - - /* - * write the first signature into the second signature file. - */ - - xOutputStream = OpenOutputStream( aSIGFileName2 ); - xDocumentHandler = aSignatureHelper.CreateDocumentHandlerWithHeader( xOutputStream); - aSignatureHelper.ExportSignature( xDocumentHandler, signatureInformations[1]); - aSignatureHelper.CloseDocumentHandler( xDocumentHandler); - aSignatureHelper.EndMission(); - - fprintf( stdout, "\n\nTEST MISSION 3: Insert a new signature to the first signature file\n"); - - aSignatureHelper.StartMission(); - - nSecurityId = aSignatureHelper.GetNewSecurityId(); - - // Select certificate... - uno::Reference< ::com::sun::star::security::XCertificate > xPersonalCert = getCertificateFromEnvironment( xSecurityEnvironment, true ); - aSignatureHelper.SetX509Certificate( - nSecurityId, xPersonalCert->getIssuerName(), - bigIntegerToNumericString( xPersonalCert->getSerialNumber()), - baseEncode(xPersonalCert->getEncoded(), BASE64)); - aSignatureHelper.AddForSigning( nSecurityId, aXMLFileName, aXMLFileName, sal_False ); - aSignatureHelper.AddForSigning( nSecurityId, aBINFileName, aBINFileName, sal_True ); - aSignatureHelper.SetDateTime( nSecurityId, Date(), Time() ); - - - xOutputStream = OpenOutputStream( aSIGFileName ); - xDocumentHandler = aSignatureHelper.CreateDocumentHandlerWithHeader( xOutputStream); - - aSignatureHelper.ExportSignature( xDocumentHandler, signatureInformations[0]); - bDone = aSignatureHelper.CreateAndWriteSignature( xDocumentHandler ); - aSignatureHelper.ExportSignature( xDocumentHandler, signatureInformations[1]); - aSignatureHelper.CloseDocumentHandler( xDocumentHandler); - - if ( !bDone ) - fprintf( stderr, "\nSTATUS MISSION 3: Error creating Signature!\n" ); - else - fprintf( stdout, "\nSTATUS MISSION 3: Signature successfully created!\n" ); - - aSignatureHelper.EndMission(); - - fprintf( stdout, "\n\nTEST MISSION 4 : Verify the first signature file\n"); - - aSignatureHelper.SetStartVerifySignatureHdl( Link( NULL, startVerifyHandler ) ); - - aSignatureHelper.StartMission(); - - xInputStream = OpenInputStream( aSIGFileName ); - bDone = aSignatureHelper.ReadAndVerifySignature( xInputStream ); - xInputStream->closeInput(); - - if ( !bDone ) - fprintf( stderr, "\nSTATUS MISSION 4: Error verifying Signatures!\n" ); - else - fprintf( stdout, "\nSTATUS MISSION 4: All choosen Signatures veryfied successfully!\n" ); - - aSignatureHelper.EndMission(); - - QueryPrintSignatureDetails( aSignatureHelper.GetSignatureInformations(), aSignatureHelper.GetSecurityEnvironment() ); - - fprintf( stdout, "\n\nTEST MISSION 5: Verify the second signature file\n"); - - aSignatureHelper.StartMission(); - - xInputStream = OpenInputStream( aSIGFileName2 ); - bDone = aSignatureHelper.ReadAndVerifySignature( xInputStream ); - xInputStream->closeInput(); - - if ( !bDone ) - fprintf( stderr, "\nSTATUS MISSION 5: Error verifying Signatures!\n" ); - else - fprintf( stdout, "\nSTATUS MISSION 5: All choosen Signatures veryfied successfully!\n" ); - - aSignatureHelper.EndMission(); - - QueryPrintSignatureDetails( aSignatureHelper.GetSignatureInformations(), aSignatureHelper.GetSecurityEnvironment() ); - - return 0; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/tools/demo/performance.cxx b/xmlsecurity/tools/demo/performance.cxx deleted file mode 100644 index 1ed6a4da9..000000000 --- a/xmlsecurity/tools/demo/performance.cxx +++ /dev/null @@ -1,1874 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_xmlsecurity.hxx" - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include - - -#ifndef INCLUDED_VECTOR -#include -#define INCLUDED_VECTOR -#endif - -#ifndef INCLUDED_STACK -#include -#define INCLUDED_STACK -#endif - -/* xml security framework components */ -#define SIGNATURECREATOR_COMPONENT "com.sun.star.xml.crypto.sax.SignatureCreator" -#define SIGNATUREVERIFIER_COMPONENT "com.sun.star.xml.crypto.sax.SignatureVerifier" -#define JAVAFLATFILTER_COMPONENT "com.sun.star.xml.crypto.eval.JavaFlatFilter" -#define SAXEVENTKEEPER_COMPONENT "com.sun.star.xml.crypto.sax.SAXEventKeeper" - -/* java based bridge components */ -#define SEINITIALIZER_JAVA_COMPONENT "com.sun.star.xml.security.bridge.jxsec.SEInitializer_JxsecImpl" -#define XMLSIGNATURE_JAVA_COMPONENT "com.sun.star.xml.security.bridge.jxsec.XMLSignature_JxsecImpl" -#define XMLDOCUMENTWRAPPER_JAVA_COMPONENT "com.sun.star.xml.security.bridge.jxsec.XMLDocumentWrapper_JxsecImpl" - -/* c based bridge components */ -#define SEINITIALIZER_C_COMPONENT "com.sun.star.xml.crypto.SEInitializer" -#define XMLSIGNATURE_C_COMPONENT "com.sun.star.xml.crypto.XMLSignature" -#define XMLDOCUMENT_C_COMPONENT "com.sun.star.xml.wrapper.XMLDocumentWrapper" - -/* security related elements and attributes */ -#define SIGNATURE_STR "Signature" -#define REFERENCE_STR "Reference" -#define SIGNEDINFO_STR "SignedInfo" -#define KEYINFO_STR "KeyInfo" -#define KEYVALUE_STR "KeyValue" -#define KEYNAME_STR "KeyName" -#define X509DATA_STR "X509Data" -#define ENCRYPTEDKEY_STR "EncryptedKey" -#define RETRIEVALMETHOD_STR "RetrievalMethod" -#define OTHER_ELEMENT_STR "OTHER_ELEMENT_STR" -#define REFNUM_ATTR_STR "refNum" -#define URI_ATTR_STR "URI" - - -#define RTL_ASCII_USTRINGPARAM( asciiStr ) asciiStr, strlen( asciiStr ), RTL_TEXTENCODING_ASCII_US - -namespace cssu = com::sun::star::uno; -namespace cssl = com::sun::star::lang; -namespace cssb = com::sun::star::beans; -namespace cssi = com::sun::star::io; -namespace cssxc = com::sun::star::xml::crypto; -namespace cssxs = com::sun::star::xml::sax; -namespace cssxw = com::sun::star::xml::wrapper; -namespace cssxcsax = com::sun::star::xml::csax; - - -using namespace ::com::sun::star; - - -class XSecTester; - -/* - * The XSecTester class is a C++ version of SecurityFramworkController.java - * - */ - -class SecurityEntity -{ -private: - static int m_nNextSecurityId; - rtl::OUString m_ouKeyURI; - -protected: - com::sun::star::uno::Reference< - com::sun::star::lang::XMultiServiceFactory > mxMSF; - - com::sun::star::uno::Reference< - com::sun::star::xml::crypto::sax::XReferenceResolvedListener > - m_xReferenceListener; - - com::sun::star::uno::Reference< - com::sun::star::xml::crypto::sax::XSecuritySAXEventKeeper > - m_xSAXEventKeeper; - - com::sun::star::uno::Reference< - com::sun::star::xml::crypto::XXMLSecurityContext > - m_xXMLSecurityContext; - - com::sun::star::uno::Reference< - com::sun::star::xml::crypto::XXMLSignature > - m_xXMLSignature; - - int m_nSecurityId; - -private: - int getNextSecurityId() const; - -protected: - SecurityEntity( - const com::sun::star::uno::Reference< - com::sun::star::xml::crypto::sax::XSecuritySAXEventKeeper >& - xSAXEventKeeper, - const com::sun::star::uno::Reference< - com::sun::star::xml::crypto::XXMLSecurityContext >& - xXMLSecurityContext, - const com::sun::star::uno::Reference< - com::sun::star::xml::crypto::XXMLSignature >& - xXMLSignature, - const com::sun::star::uno::Reference< - com::sun::star::lang::XMultiServiceFactory >& - rsMSF); - -public: - void setKeyId(int nId); - - int getSecurityId() const; - - com::sun::star::uno::Reference< - com::sun::star::xml::crypto::sax::XReferenceResolvedListener > - getReferenceListener() const; - - bool setKey( const rtl::OUString& ouUri, bool bIsExporting ); - - void setKeyURI(const rtl::OUString& ouUri); - - bool endMission(); -}; - - -class SignatureEntity : public SecurityEntity -{ -private: - std::vector< rtl::OUString > m_vReferenceIds; - int m_nSignatureElementCollectorId; - - bool hasReference(const rtl::OUString& ouUri) const; - -public: - SignatureEntity( - const com::sun::star::uno::Reference< - com::sun::star::xml::crypto::sax::XSecuritySAXEventKeeper >& - xSAXEventKeeper, - bool bIsExporting, - XSecTester* pListener, - const com::sun::star::uno::Reference< - com::sun::star::xml::crypto::XXMLSecurityContext >& - xXMLSecurityContext, - const com::sun::star::uno::Reference< - com::sun::star::xml::crypto::XXMLSignature >& - xXMLSignature, - const com::sun::star::uno::Reference< - com::sun::star::lang::XMultiServiceFactory >& - rsMSF); - ~SignatureEntity(){}; - - void setReferenceNumber() const; - bool setReference( const rtl::OUString& ouUri, bool bIsExporting ) const; - void addReferenceURI( const rtl::OUString& ouUri ); -}; - -struct AncestorEvent -{ - AncestorEvent(sal_Int32 nAttrNum) : aAttributeList(nAttrNum), bIsStartElement(false) {}; - - bool bIsStartElement; - rtl::OUString ouName; - - com::sun::star::uno::Sequence< - com::sun::star::xml::csax::XMLAttribute > - aAttributeList; -}; - -class XSecTester : public cppu::WeakImplHelper4 -< - com::sun::star::xml::crypto::sax::XSignatureCreationResultListener, - com::sun::star::xml::crypto::sax::XSignatureVerifyResultListener, - com::sun::star::xml::crypto::sax::XSAXEventKeeperStatusChangeListener, - com::sun::star::xml::sax::XDocumentHandler -> -{ -private: - com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > mxMSF; - - sal_Int32 m_nTotalSignatureNumber; - sal_Int32 m_nSuccessfulSignatureNumber; - - com::sun::star::uno::Reference< - com::sun::star::xml::sax::XDocumentHandler > - m_xExportHandler; - - com::sun::star::uno::Reference< - com::sun::star::xml::crypto::sax::XSecuritySAXEventKeeper > - m_xSAXEventKeeper; - - com::sun::star::uno::Reference< - com::sun::star::xml::wrapper::XXMLDocumentWrapper > - m_xXMLDocumentWrapper; - - com::sun::star::uno::Reference< - com::sun::star::xml::sax::XDocumentHandler > - m_xOutputHandler; - - com::sun::star::uno::Reference< - com::sun::star::xml::sax::XParser > - m_xSaxParser; - - std::stack< void* > m_stCurrentPath; - std::stack< bool > m_stCurrentPathType; - - std::vector< AncestorEvent* > m_vAncestorEvents; - std::vector< SignatureEntity* > m_vSignatureList; - - std::vector< rtl::OUString > m_vUnsolvedReferenceURIs; - std::vector< int > m_vUnsolvedReferenceKeeperIds; - std::vector< int > m_vUnsolvedReferenceRefNums; - - bool m_bIsExporting; - bool m_bIsBlocking; - - bool m_bIsInsideCollectedElement; - bool m_bIsSAXEventKeeperOnTheSAXChain; - - com::sun::star::uno::Reference< - com::sun::star::xml::crypto::XXMLSecurityContext > - m_xXMLSecurityContext; - - com::sun::star::uno::Reference< - com::sun::star::xml::crypto::XXMLSignature > - m_xXMLSignature; - - rtl::OUString m_ouJavaCryptokenDir; - rtl::OUString m_ouCCryptokenDir; - rtl::OUString m_ouXMLDocumentWrapperComponentName; - -private: - com::sun::star::uno::Reference< - com::sun::star::io::XOutputStream > - createOutputStream( const rtl::OUString& ouFile ); - - rtl::OUString parseFile( - const rtl::OUString& ouInputFileName, - const rtl::OUString& ouOutputFileName, - bool bIsExporting, - bool bIsJavaBased); - - void changeOutput(); - - bool foundSecurityRelated(); - - void findKeyOrReference(SecurityEntity* pSecurityEntity, const rtl::OUString& ouUri, bool bIsFindKey); - - bool checkSecurityElement( - const rtl::OUString& ouLocalName, - const com::sun::star::uno::Reference< - com::sun::star::xml::sax::XAttributeList>& xAttribs); - - void checkReference( - const rtl::OUString& ouLocalName, - const com::sun::star::uno::Reference< - com::sun::star::xml::sax::XAttributeList>& xAttribs, - const rtl::OUString& ouId); - - void endMission(); - - void addStartAncestorEvent( - const rtl::OUString& ouName, - const com::sun::star::uno::Reference< - com::sun::star::xml::sax::XAttributeList>& xAttribs); - - void addEndAncestorEvent( const rtl::OUString& ouName ); - - void flushAncestorEvents( - const com::sun::star::uno::Reference< - com::sun::star::xml::sax::XDocumentHandler >& xDocumentHandler); - - void sendAncestorStartElementEvent( - const rtl::OUString& ouName, - const com::sun::star::uno::Sequence< - com::sun::star::xml::csax::XMLAttribute >& xAttrList, - const com::sun::star::uno::Reference< - com::sun::star::xml::sax::XDocumentHandler >& xDocumentHandler) const; - - void sendAncestorEndElementEvent( - const rtl::OUString& ouName, - const com::sun::star::uno::Reference< - com::sun::star::xml::sax::XDocumentHandler >& xDocumentHandler) const; - - std::vector< AncestorEvent* >::const_iterator checkAncestorStartElementEvent( - const std::vector< AncestorEvent* >::const_iterator& ii, - const com::sun::star::uno::Reference< - com::sun::star::xml::sax::XDocumentHandler >& xDocumentHandler) const; - -public: - XSecTester(const com::sun::star::uno::Reference& rxMSF) - : mxMSF(rxMSF), m_bIsExporting(false), m_bIsBlocking(false), - m_bIsInsideCollectedElement(false), m_bIsSAXEventKeeperOnTheSAXChain(false) - { - }; - - virtual ~XSecTester(){}; - - /* XSignatureCreationResultListener */ - virtual void SAL_CALL signatureCreated( - sal_Int32 securityId, - com::sun::star::xml::crypto::SecurityOperationStatus creationResult ) - throw (com::sun::star::uno::RuntimeException); - - /* XSignatureVerifyResultListener */ - virtual void SAL_CALL signatureVerified( - sal_Int32 securityId, - com::sun::star::xml::crypto::SecurityOperationStatus verifyResult ) - throw (com::sun::star::uno::RuntimeException); - - /* XSAXEventKeeperStatusChangeListener */ - virtual void SAL_CALL blockingStatusChanged( sal_Bool isBlocking ) - throw (com::sun::star::uno::RuntimeException); - virtual void SAL_CALL collectionStatusChanged( - sal_Bool isInsideCollectedElement ) - throw (com::sun::star::uno::RuntimeException); - virtual void SAL_CALL bufferStatusChanged( sal_Bool isBufferEmpty ) - throw (com::sun::star::uno::RuntimeException); - - /* XXMLSecTester */ - virtual rtl::OUString SAL_CALL transfer_without_sec( - const rtl::OUString& inputFileName, - const rtl::OUString& outputFileName, - sal_Bool isBridgeInvolved) - throw (com::sun::star::uno::RuntimeException); - virtual rtl::OUString SAL_CALL export_xml( - const rtl::OUString& inputFileName, - const rtl::OUString& outputFileName, - sal_Bool isJavaBased) - throw (com::sun::star::uno::RuntimeException); - virtual rtl::OUString SAL_CALL import_xml( - const rtl::OUString& inputFileName, - const rtl::OUString& outputFileName, - sal_Bool isJavaBased) - throw (com::sun::star::uno::RuntimeException); - - virtual void SAL_CALL setCryptoDir( - const rtl::OUString & javaDirName, - const rtl::OUString & cDirName) - throw (com::sun::star::uno::RuntimeException); - - /* XDocumentHandler */ - virtual void SAL_CALL endDocument() - throw (com::sun::star::uno::RuntimeException); - virtual void SAL_CALL startDocument() - throw (com::sun::star::uno::RuntimeException); - virtual void SAL_CALL characters(const class rtl::OUString&) - throw (com::sun::star::uno::RuntimeException); - virtual void SAL_CALL processingInstruction(const rtl::OUString&, const rtl::OUString&) - throw (com::sun::star::uno::RuntimeException); - virtual void SAL_CALL ignorableWhitespace(const rtl::OUString&) - throw (com::sun::star::uno::RuntimeException); - virtual void SAL_CALL startElement( - const rtl::OUString&, - const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >&) - throw (com::sun::star::uno::RuntimeException); - virtual void SAL_CALL endElement(const rtl::OUString&) - throw (com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setDocumentLocator( - const com::sun::star::uno::Reference< com::sun::star::xml::sax::XLocator >&) - throw (com::sun::star::uno::RuntimeException); -}; - -rtl::OUString XSecTester::parseFile( - const rtl::OUString& ouInputFileName, - const rtl::OUString& ouOutputFileName, - bool bIsExporting, - bool bIsJavaBased) -{ - rtl::OUString ouMessage; - - cssu::Reference xInputStream = OpenInputStream(ouInputFileName); - - if (xInputStream != NULL ) - { - /* initialization */ - rtl::OUString SEInitializer_comp; - rtl::OUString XMLSignature_comp; - rtl::OUString tokenPath; - cssu::Reference < cssxc::XSEInitializer > xSEInitializer; - - if (bIsJavaBased) - { - SEInitializer_comp = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SEINITIALIZER_JAVA_COMPONENT )); - XMLSignature_comp = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XMLSIGNATURE_JAVA_COMPONENT)); - m_ouXMLDocumentWrapperComponentName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XMLDOCUMENTWRAPPER_JAVA_COMPONENT )); - tokenPath = m_ouJavaCryptokenDir; - } - else - { - SEInitializer_comp = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SEINITIALIZER_C_COMPONENT )); - XMLSignature_comp = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XMLSIGNATURE_C_COMPONENT)); - m_ouXMLDocumentWrapperComponentName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XMLDOCUMENT_C_COMPONENT )); - tokenPath = m_ouCCryptokenDir; - } - - xSEInitializer = cssu::Reference < cssxc::XSEInitializer > ( - mxMSF->createInstance( SEInitializer_comp ), - cssu::UNO_QUERY ); - - m_xXMLSignature = cssu::Reference ( - mxMSF->createInstance( XMLSignature_comp ), - cssu::UNO_QUERY ); - - if ( xSEInitializer.is() && m_xXMLSignature.is()) - { - /* create SAX Parser */ - const rtl::OUString sSaxParser ( - RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Parser") ); - m_xSaxParser = cssu::Reference < cssxs::XParser > ( mxMSF->createInstance( sSaxParser ), cssu::UNO_QUERY ); - - /* create SAX Writer */ - const rtl::OUString sSaxWriter ( - RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Writer") ); - cssu::Reference < cssi::XActiveDataSource > xSaxWriter - ( mxMSF->createInstance( sSaxWriter ), cssu::UNO_QUERY ); - - cssu::Reference< cssi::XOutputStream > xOutputStream = OpenOutputStream(ouOutputFileName); - xSaxWriter->setOutputStream( xOutputStream ); - - cssxs::InputSource aInput; - aInput.sSystemId = ouInputFileName; - aInput.aInputStream = xInputStream; - - cssu::Reference < cssxs::XDocumentHandler > xSaxWriterHandler( xSaxWriter, cssu::UNO_QUERY); - - m_xXMLSecurityContext = - xSEInitializer->createSecurityContext(tokenPath); - - m_bIsExporting = bIsExporting; - m_xExportHandler = xSaxWriterHandler; - m_xOutputHandler = xSaxWriterHandler; - - m_xXMLDocumentWrapper = NULL; - m_xSAXEventKeeper = NULL; - m_bIsSAXEventKeeperOnTheSAXChain = false; - - m_bIsBlocking = false; - m_bIsInsideCollectedElement = false; - - OSL_ASSERT(m_vSignatureList.empty()); - OSL_ASSERT(m_vUnsolvedReferenceURIs.empty()); - OSL_ASSERT(m_vUnsolvedReferenceKeeperIds.empty()); - OSL_ASSERT(m_vUnsolvedReferenceRefNums.empty()); - OSL_ASSERT(m_stCurrentPath.empty()); - OSL_ASSERT(m_stCurrentPathType.empty()); - OSL_ASSERT(m_vAncestorEvents.empty()); - - changeOutput(); - - /* foundSecurityRelated(); */ - - /* Begin to parse */ - TimeValue startTime, endTime; - osl_getSystemTime( &startTime ); - - xSaxWriterHandler->startDocument(); - - if (m_bIsExporting) - { - m_xSaxParser->setDocumentHandler(this); - m_xSaxParser->parseStream(aInput); - } - else - { - m_xSaxParser->setDocumentHandler(this); - m_xSaxParser->parseStream(aInput); - } - - endMission(); - xSaxWriterHandler->endDocument(); - - osl_getSystemTime( &endTime ); - - flushAncestorEvents( NULL ); - - // Bug in SAXWriter, done in endDocument() - // xOutputStream->closeOutput(); - xInputStream->closeInput(); - - - /* - * Free the security context - */ - xSEInitializer->freeSecurityContext(m_xXMLSecurityContext); - m_xXMLSecurityContext = NULL; - - /* Calculate the time */ - double diff = ((double)((endTime.Nanosec + endTime.Seconds*1000000000.0) - - (startTime.Nanosec + startTime.Seconds*1000000000.0))) / - ((double)1000000000.0); - - char buf[32]; - sprintf(buf, "%.2f", diff); - ouMessage += rtl::OUString(RTL_ASCII_USTRINGPARAM(buf)); - } - else - { - ouMessage += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("N/A")); - } - - } - else - { - ouMessage += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-")); - } - - return ouMessage; -} - -/* XSignatureCreationResultListener */ -void SAL_CALL XSecTester::signatureCreated( - sal_Int32 securityId, - cssxc::SecurityOperationStatus creationResult ) - throw (cssu::RuntimeException) -{ - m_nTotalSignatureNumber++; - if (creationResult == cssxc::SecurityOperationStatus_OPERATION_SUCCEEDED) - { - m_nSuccessfulSignatureNumber++; - } -} - -/* XSignatureVerifyResultListener */ -void SAL_CALL XSecTester::signatureVerified( - sal_Int32 securityId, - cssxc::SecurityOperationStatus verifyResult ) - throw (cssu::RuntimeException) -{ - m_nTotalSignatureNumber++; - if (verifyResult == cssxc::SecurityOperationStatus_OPERATION_SUCCEEDED) - { - m_nSuccessfulSignatureNumber++; - } -} - -/* XSAXEventKeeperStatusChangeListener */ -void SAL_CALL XSecTester::blockingStatusChanged( sal_Bool isBlocking ) - throw (cssu::RuntimeException) -{ - this->m_bIsBlocking = isBlocking; -} - -void SAL_CALL XSecTester::collectionStatusChanged( sal_Bool isInsideCollectedElement ) - throw (cssu::RuntimeException) -{ - this->m_bIsInsideCollectedElement = isInsideCollectedElement; - - if ( !m_bIsInsideCollectedElement && !m_bIsBlocking) - { - m_bIsSAXEventKeeperOnTheSAXChain = false; - } - else - { - m_bIsSAXEventKeeperOnTheSAXChain = true; - } - changeOutput(); -} - -void SAL_CALL XSecTester::bufferStatusChanged( sal_Bool isBufferEmpty ) - throw (cssu::RuntimeException) -{ - if (isBufferEmpty) - { - m_xXMLDocumentWrapper = NULL; - - m_xSAXEventKeeper = NULL; - m_bIsSAXEventKeeperOnTheSAXChain = false; - changeOutput(); - } -} - -/* XXMLSecTester */ -rtl::OUString SAL_CALL XSecTester::export_xml( const rtl::OUString& inputFileName, const rtl::OUString& outputFileName, sal_Bool isJavaBased) - throw (cssu::RuntimeException) -{ - rtl::OUString ouMessage; - - m_nTotalSignatureNumber = 0; - m_nSuccessfulSignatureNumber = 0; - - ouMessage += parseFile(inputFileName, outputFileName, sal_True, isJavaBased); - - rtl::OUString ouRemark = rtl::OUString::valueOf(m_nSuccessfulSignatureNumber) + - rtl::OUString(RTL_ASCII_USTRINGPARAM( "/" )) - + rtl::OUString::valueOf(m_nTotalSignatureNumber); - ouMessage += rtl::OUString(RTL_ASCII_USTRINGPARAM("\t")) + ouRemark; - - return ouMessage; -} - -rtl::OUString SAL_CALL XSecTester::import_xml( const rtl::OUString& inputFileName, const rtl::OUString& outputFileName, sal_Bool isJavaBased) - throw (cssu::RuntimeException) -{ - rtl::OUString ouMessage; - - m_nTotalSignatureNumber = 0; - m_nSuccessfulSignatureNumber = 0; - - ouMessage += parseFile(inputFileName, outputFileName, sal_False, isJavaBased); - - rtl::OUString ouRemark = rtl::OUString::valueOf(m_nSuccessfulSignatureNumber) + - rtl::OUString(RTL_ASCII_USTRINGPARAM( "/" )) - + rtl::OUString::valueOf(m_nTotalSignatureNumber); - ouMessage += rtl::OUString(RTL_ASCII_USTRINGPARAM("\t")) + ouRemark; - - return ouMessage; -} - -rtl::OUString SAL_CALL XSecTester::transfer_without_sec( - const rtl::OUString& inputFileName, - const rtl::OUString& outputFileName, - sal_Bool isBridgeInvolved) - throw (cssu::RuntimeException) -{ - rtl::OUString ouMessage; - - cssu::Reference< cssi::XInputStream > xInputStream = OpenInputStream(inputFileName); - - if (xInputStream != NULL ) - { - /* create SAX Parser */ - const rtl::OUString sSaxParser ( - RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Parser") ); - m_xSaxParser = cssu::Reference < cssxs::XParser > ( mxMSF->createInstance( sSaxParser ), cssu::UNO_QUERY ); - - /* create SAX Writer */ - const rtl::OUString sSaxWriter ( - RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Writer") ); - cssu::Reference < cssi::XActiveDataSource > xSaxWriter - ( mxMSF->createInstance( sSaxWriter ), cssu::UNO_QUERY ); - cssu::Reference < cssxs::XDocumentHandler > xSaxWriterHandler( - xSaxWriter, cssu::UNO_QUERY); - - if (!isBridgeInvolved) - { - /* connect the SAX Parser and the SAX Writer */ - m_xSaxParser->setDocumentHandler ( xSaxWriterHandler ); - } - else - { - /* create Java Flat Filter */ - const rtl::OUString sJavaFlatFilter( - RTL_CONSTASCII_USTRINGPARAM( JAVAFLATFILTER_COMPONENT ) ); - cssu::Reference < cssxs::XParser > xJavaFilterParser - ( mxMSF->createInstance( sJavaFlatFilter ), cssu::UNO_QUERY ); - cssu::Reference < cssxs::XDocumentHandler > xJavaFilterHandler( - xJavaFilterParser, cssu::UNO_QUERY ); - - if ( !xJavaFilterParser.is() ) - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NO JAVA")); - - /* connect the SAX Parser, the Java Flat Filter and the SAX Writer */ - xJavaFilterParser->setDocumentHandler( xSaxWriterHandler ); - m_xSaxParser->setDocumentHandler ( xJavaFilterHandler ); - } - - - /* set output stream */ - cssu::Reference< cssi::XOutputStream > xOutputStream = - OpenOutputStream(outputFileName); - xSaxWriter->setOutputStream( xOutputStream ); - - /* prepare input stream */ - cssxs::InputSource aInput; - aInput.sSystemId = inputFileName; - aInput.aInputStream = xInputStream; - - TimeValue startTime, endTime; - osl_getSystemTime( &startTime ); - - m_xSaxParser->parseStream ( aInput ); - - // xOutputStream->closeOutput(); - xInputStream->closeInput(); - - osl_getSystemTime( &endTime ); - - double diff = ((double)((endTime.Nanosec + endTime.Seconds*1000000000.0) - - (startTime.Nanosec + startTime.Seconds*1000000000.0)))/((double)1000000000.0); - char buf[32]; - sprintf(buf, "%.2f", diff); - ouMessage += rtl::OUString(RTL_ASCII_USTRINGPARAM(buf)); - } - - return ouMessage; -} - -void SAL_CALL XSecTester::setCryptoDir(const rtl::OUString & javaDirName, const rtl::OUString & cDirName) - throw (cssu::RuntimeException) -{ - m_ouJavaCryptokenDir = javaDirName; - m_ouCCryptokenDir = cDirName; -} - - -cssu::Reference< cssu::XInterface > SAL_CALL XSecTester_createInstance( - const cssu::Reference< cssl::XMultiServiceFactory > & rSMgr) - throw( cssu::Exception ) -{ - return (cppu::OWeakObject*) new XSecTester( rSMgr ); -} - -int SecurityEntity::m_nNextSecurityId = 1; - -SecurityEntity::SecurityEntity( - const cssu::Reference& xSAXEventKeeper, - const cssu::Reference& xXMLSecurityContext, - const cssu::Reference& xXMLSignature, - const cssu::Reference< cssl::XMultiServiceFactory > &rsMSF) - :m_xSAXEventKeeper(xSAXEventKeeper), - m_xXMLSecurityContext(xXMLSecurityContext), - m_xXMLSignature(xXMLSignature), - mxMSF(rsMSF), - m_ouKeyURI(RTL_ASCII_USTRINGPARAM("")) -{ - m_nSecurityId = getNextSecurityId(); -} - -int SecurityEntity::getNextSecurityId() const -{ - int nId = m_nNextSecurityId++; - return nId; -} - -void SecurityEntity::setKeyId(int nId) -{ - cssu::Reference keyCollector (m_xReferenceListener, cssu::UNO_QUERY); - keyCollector->setKeyId(nId); -} - - -void SecurityEntity::setKeyURI(const rtl::OUString& ouUri) -{ - m_ouKeyURI = ouUri; -} - -cssu::Reference SecurityEntity::getReferenceListener() const -{ - return m_xReferenceListener; -} - -int SecurityEntity::getSecurityId() const -{ - return m_nSecurityId; -} - -bool SecurityEntity::setKey(const rtl::OUString& ouUri, bool bIsExporting) -{ - bool rc = false; - - if (m_ouKeyURI != rtl::OUString(RTL_ASCII_USTRINGPARAM("")) && - m_ouKeyURI == ouUri) - { - int nKeeperId = m_xSAXEventKeeper->addSecurityElementCollector( - bIsExporting ? - (cssxc::sax::ElementMarkPriority_BEFOREMODIFY): - (cssxc::sax::ElementMarkPriority_AFTERMODIFY), - true); - - setKeyId(nKeeperId); - m_xSAXEventKeeper->setSecurityId(nKeeperId, m_nSecurityId); - - cssu::Reference xReferenceResolvedBroadcaster - (m_xSAXEventKeeper, cssu::UNO_QUERY); - xReferenceResolvedBroadcaster->addReferenceResolvedListener(nKeeperId, - m_xReferenceListener); - - rc = true; - } - - return rc; -} - -bool SecurityEntity::endMission() -{ - cssu::Reference xMissionTaker - (m_xReferenceListener, cssu::UNO_QUERY); - - return xMissionTaker->endMission(); -} - -SignatureEntity::SignatureEntity( - const cssu::Reference& xSAXEventKeeper, - bool bIsExporting, - XSecTester* pListener, - const cssu::Reference& xXMLSecurityContext, - const cssu::Reference& xXMLSignature, - const cssu::Reference< cssl::XMultiServiceFactory >& rsMSF) - :SecurityEntity(xSAXEventKeeper, - xXMLSecurityContext, - xXMLSignature, - rsMSF) -{ - if (bIsExporting) - { - m_nSignatureElementCollectorId = - m_xSAXEventKeeper->addSecurityElementCollector( - cssxc::sax::ElementMarkPriority_AFTERMODIFY, - true); - - m_xSAXEventKeeper->setSecurityId(m_nSignatureElementCollectorId, m_nSecurityId); - - m_xReferenceListener = cssu::Reference< cssxc::sax::XReferenceResolvedListener >( - mxMSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SIGNATURECREATOR_COMPONENT ))), - cssu::UNO_QUERY); - - cssu::Reference xInitialization(m_xReferenceListener, cssu::UNO_QUERY); - - cssu::Sequence args(5); - char buf[16]; - - sprintf(buf, "%d", m_nSecurityId); - args[0] = cssu::makeAny(rtl::OUString(RTL_ASCII_USTRINGPARAM(buf))); - args[1] = cssu::makeAny(m_xSAXEventKeeper); - - sprintf(buf, "%d", m_nSignatureElementCollectorId); - args[2] = cssu::makeAny(rtl::OUString(RTL_ASCII_USTRINGPARAM(buf))); - args[3] = cssu::makeAny(m_xXMLSecurityContext->getSecurityEnvironment()); - args[4] = cssu::makeAny(m_xXMLSignature); - - xInitialization->initialize(args); - - int nBlockerId = m_xSAXEventKeeper->addBlocker(); - m_xSAXEventKeeper->setSecurityId(nBlockerId, m_nSecurityId); - - cssu::Reference xBlockerMonitor(m_xReferenceListener, cssu::UNO_QUERY); - xBlockerMonitor->setBlockerId(nBlockerId); - - cssu::Reference< cssxc::sax::XSignatureCreationResultBroadcaster > xSignatureCreationResultBroadcaster - (m_xReferenceListener, cssu::UNO_QUERY); - xSignatureCreationResultBroadcaster->addSignatureCreationResultListener(pListener); - } - else - { - m_nSignatureElementCollectorId = - m_xSAXEventKeeper->addSecurityElementCollector( - cssxc::sax::ElementMarkPriority_BEFOREMODIFY, - false); - - m_xSAXEventKeeper->setSecurityId(m_nSignatureElementCollectorId, m_nSecurityId); - - m_xReferenceListener = cssu::Reference< cssxc::sax::XReferenceResolvedListener >( - mxMSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SIGNATUREVERIFIER_COMPONENT ))), - cssu::UNO_QUERY); - - cssu::Reference xInitialization(m_xReferenceListener, cssu::UNO_QUERY); - - cssu::Sequence args(5); - char buf[16]; - - sprintf(buf, "%d", m_nSecurityId); - args[0] = cssu::makeAny(rtl::OUString(RTL_ASCII_USTRINGPARAM(buf))); - args[1] = cssu::makeAny(m_xSAXEventKeeper); - - sprintf(buf, "%d", m_nSignatureElementCollectorId); - args[2] = cssu::makeAny(rtl::OUString(RTL_ASCII_USTRINGPARAM(buf))); - args[3] = cssu::makeAny(m_xXMLSecurityContext); - args[4] = cssu::makeAny(m_xXMLSignature); - xInitialization->initialize(args); - - cssu::Reference< cssxc::sax::XSignatureVerifyResultBroadcaster > xSignatureVerifyResultBroadcaster - (m_xReferenceListener, cssu::UNO_QUERY); - xSignatureVerifyResultBroadcaster->addSignatureVerifyResultListener(pListener); - } - - cssu::Reference xReferenceResolvedBroadcaster - (m_xSAXEventKeeper, cssu::UNO_QUERY); - xReferenceResolvedBroadcaster->addReferenceResolvedListener( - m_nSignatureElementCollectorId, m_xReferenceListener); -} - -void SignatureEntity::addReferenceURI(const rtl::OUString& ouUri) -{ - m_vReferenceIds.push_back(ouUri); -} - -void SignatureEntity::setReferenceNumber() const -{ - cssu::Reference xReferenceCollector - (m_xReferenceListener, cssu::UNO_QUERY); - xReferenceCollector->setReferenceCount(m_vReferenceIds.size()); -} - -bool SignatureEntity::hasReference(const rtl::OUString& ouUri) const -{ - bool rc = false; - - std::vector::const_iterator ii; - for (ii = m_vReferenceIds.begin(); ii != m_vReferenceIds.end(); ++ii) - { - if (ouUri == *ii) - { - rc = true; - break; - } - } - - return rc; -} - -bool SignatureEntity::setReference(const rtl::OUString& ouUri, bool bIsExporting) const -{ - bool rc = false; - - if (hasReference(ouUri)) - { - int nKeeperId = m_xSAXEventKeeper->addSecurityElementCollector( - bIsExporting ? - (cssxc::sax::ElementMarkPriority_AFTERMODIFY): - (cssxc::sax::ElementMarkPriority_BEFOREMODIFY), - false); - - m_xSAXEventKeeper->setSecurityId(nKeeperId, m_nSecurityId); - - cssu::Reference xReferenceResolvedBroadcaster - (m_xSAXEventKeeper, cssu::UNO_QUERY); - xReferenceResolvedBroadcaster->addReferenceResolvedListener(nKeeperId, m_xReferenceListener); - - cssu::Reference xReferenceCollector - (m_xReferenceListener, cssu::UNO_QUERY); - xReferenceCollector->setReferenceId(nKeeperId); - - rc = true; - } - - return rc; -} - -/* XDocumentHandler */ -void SAL_CALL XSecTester::startDocument() - throw (cssu::RuntimeException) -{ -} - -void SAL_CALL XSecTester::endDocument() - throw (cssu::RuntimeException) -{ -} - -void SAL_CALL XSecTester::characters(const class rtl::OUString & chars) - throw (cssu::RuntimeException) -{ - m_xExportHandler->characters(chars); -} - -void SAL_CALL XSecTester::processingInstruction(const rtl::OUString & target, const rtl::OUString &data) - throw (cssu::RuntimeException) -{ - m_xExportHandler->processingInstruction(target, data); -} - -void SAL_CALL XSecTester::ignorableWhitespace(const rtl::OUString &) - throw (cssu::RuntimeException) -{ - -} - -void SAL_CALL XSecTester::startElement(const rtl::OUString & name, const cssu::Reference &xAttribs) - throw (cssu::RuntimeException) -{ - rtl::OUString ouIdAttr = xAttribs->getValueByName( - rtl::OUString(RTL_ASCII_USTRINGPARAM("id"))); - - if (ouIdAttr == NULL) - { - ouIdAttr = xAttribs->getValueByName( - rtl::OUString(RTL_ASCII_USTRINGPARAM("Id"))); - } - - bool bHasIdAttr = (ouIdAttr != NULL && ouIdAttr.getLength() > 0 ); - bool needResend = false; - - if (bHasIdAttr || name.equalsAscii( SIGNATURE_STR )) - { - if (foundSecurityRelated() && ! m_bIsExporting) - { - needResend = true; - } - } - - if ( !m_bIsSAXEventKeeperOnTheSAXChain ) - { - addStartAncestorEvent(name, xAttribs); - } - - bool bSuppressingForwarding = checkSecurityElement(name, xAttribs); - - checkReference(name, xAttribs, ouIdAttr); - - if (needResend) - { - m_xSAXEventKeeper->setNextHandler(NULL); - - cssu::Reference xSAXEventKeeperHandler - (m_xSAXEventKeeper, cssu::UNO_QUERY); - - xSAXEventKeeperHandler->startElement(name, xAttribs); - m_xSAXEventKeeper->setNextHandler(this); - } - - if (!bSuppressingForwarding) - { - m_xExportHandler->startElement(name, xAttribs); - } -} - -void SAL_CALL XSecTester::endElement(const rtl::OUString& name) - throw (cssu::RuntimeException) -{ - if (!m_stCurrentPath.empty()) - { - void* pSignedInfo = m_stCurrentPath.top(); - bool bIsStringType = m_stCurrentPathType.top(); - - m_stCurrentPath.pop(); - m_stCurrentPathType.pop(); - - if (bIsStringType && !strcmp((const char *)pSignedInfo, SIGNEDINFO_STR)) - { - if (!m_stCurrentPath.empty()) - { - void* pSignature = m_stCurrentPath.top(); - bIsStringType = m_stCurrentPathType.top(); - - if (!bIsStringType && pSignature != NULL) - { - ((SignatureEntity *) pSignature)->setReferenceNumber(); - } - } - } - } - - if ( !m_bIsSAXEventKeeperOnTheSAXChain ) - { - addEndAncestorEvent(name); - } - - m_xExportHandler->endElement(name); -} - -void SAL_CALL XSecTester::setDocumentLocator( const cssu::Reference& ) - throw (cssu::RuntimeException) -{ -} - -void XSecTester::changeOutput() -{ - if (m_bIsExporting) - { - if (m_bIsSAXEventKeeperOnTheSAXChain) - { - m_xExportHandler = cssu::Reference - (m_xSAXEventKeeper, cssu::UNO_QUERY); - - m_xSAXEventKeeper->setNextHandler(NULL); - - flushAncestorEvents(m_xExportHandler); - - m_xSAXEventKeeper->setNextHandler(m_xOutputHandler); - } - else - { - m_xExportHandler = m_xOutputHandler; - } - } - else - { - if (m_bIsSAXEventKeeperOnTheSAXChain) - { - cssu::Reference xSAXEventKeeperHandler - (m_xSAXEventKeeper, cssu::UNO_QUERY); - - m_xSAXEventKeeper->setNextHandler(NULL); - - flushAncestorEvents(xSAXEventKeeperHandler); - - m_xSaxParser->setDocumentHandler(xSAXEventKeeperHandler); - m_xSAXEventKeeper->setNextHandler(this); - } - else - { - m_xSaxParser->setDocumentHandler(this); - } - - } -} - -bool XSecTester::foundSecurityRelated() -{ - if (m_xSAXEventKeeper == NULL) - { - m_bIsBlocking = false; - m_bIsInsideCollectedElement = false; - - m_xXMLDocumentWrapper = cssu::Reference - (mxMSF->createInstance( m_ouXMLDocumentWrapperComponentName ), - cssu::UNO_QUERY); - - m_xSAXEventKeeper = cssu::Reference< cssxc::sax::XSecuritySAXEventKeeper > - (mxMSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SAXEVENTKEEPER_COMPONENT ))), - cssu::UNO_QUERY); - - cssu::Reference xInitialization(m_xSAXEventKeeper, cssu::UNO_QUERY); - - cssu::Sequence arg(1); - arg[0] = cssu::makeAny(m_xXMLDocumentWrapper); - xInitialization->initialize(arg); - - cssu::Reference - xSAXEventKeeperStatusChangeBroadcaster(m_xSAXEventKeeper, cssu::UNO_QUERY); - xSAXEventKeeperStatusChangeBroadcaster->addSAXEventKeeperStatusChangeListener(this); - } - - bool rc = false; - - if (!m_bIsSAXEventKeeperOnTheSAXChain) - { - rc = true; - } - - m_bIsSAXEventKeeperOnTheSAXChain=true; - changeOutput(); - - return rc; -} - -void XSecTester::findKeyOrReference(SecurityEntity* pSecurityEntity, const rtl::OUString& ouUri, bool bIsFindingKey) -{ - std::vector::iterator ii_referenceURIs; - std::vector::iterator ii_referenceKeeperIds; - std::vector::iterator ii_referenceRefNums; - - for (ii_referenceURIs = m_vUnsolvedReferenceURIs.begin(), - ii_referenceKeeperIds = m_vUnsolvedReferenceKeeperIds.begin(), - ii_referenceRefNums = m_vUnsolvedReferenceRefNums.begin(); - ii_referenceURIs != m_vUnsolvedReferenceURIs.end(); ) - { - rtl::OUString ouReferenceUri = *ii_referenceURIs; - - if (ouReferenceUri == ouUri) - { - int nKeeperId = *ii_referenceKeeperIds; - int nRefNum = *ii_referenceRefNums; - - if ( bIsFindingKey ) - { - int nClonedKeeperId = m_xSAXEventKeeper->cloneElementCollector( - nKeeperId, - m_bIsExporting? - (cssxc::sax::ElementMarkPriority_BEFOREMODIFY): - (cssxc::sax::ElementMarkPriority_AFTERMODIFY)); - - pSecurityEntity->setKeyId(nClonedKeeperId); - - m_xSAXEventKeeper->setSecurityId(nClonedKeeperId, pSecurityEntity->getSecurityId()); - - cssu::Reference - xReferenceResolvedBroadcaster(m_xSAXEventKeeper, cssu::UNO_QUERY); - xReferenceResolvedBroadcaster->addReferenceResolvedListener( - nClonedKeeperId, - pSecurityEntity->getReferenceListener()); - } - else - { - int nClonedKeeperId = m_xSAXEventKeeper->cloneElementCollector( - nKeeperId, - m_bIsExporting? - (cssxc::sax::ElementMarkPriority_AFTERMODIFY): - (cssxc::sax::ElementMarkPriority_BEFOREMODIFY)); - - m_xSAXEventKeeper->setSecurityId(nClonedKeeperId, pSecurityEntity->getSecurityId()); - - cssu::Reference - xReferenceResolvedBroadcaster - (m_xSAXEventKeeper, cssu::UNO_QUERY); - xReferenceResolvedBroadcaster->addReferenceResolvedListener( - nClonedKeeperId, - pSecurityEntity->getReferenceListener()); - - cssu::Reference xReferenceCollector - (pSecurityEntity->getReferenceListener(), cssu::UNO_QUERY); - xReferenceCollector->setReferenceId(nClonedKeeperId); - } - - nRefNum--; - if (nRefNum == 0) - { - m_xSAXEventKeeper->removeElementCollector(nKeeperId); - - ii_referenceURIs = m_vUnsolvedReferenceURIs.erase(ii_referenceURIs); - ii_referenceKeeperIds = m_vUnsolvedReferenceKeeperIds.erase(ii_referenceKeeperIds); - ii_referenceRefNums = m_vUnsolvedReferenceRefNums.erase(ii_referenceRefNums); - } - else - { - (*ii_referenceRefNums) = nRefNum; - - ++ii_referenceURIs; - ++ii_referenceKeeperIds; - ++ii_referenceRefNums; - } - - if (bIsFindingKey) - { - break; - } - } - else - { - ++ii_referenceURIs; - ++ii_referenceKeeperIds; - ++ii_referenceRefNums; - } - } -} - -bool XSecTester::checkSecurityElement( - const rtl::OUString& ouLocalName, - const cssu::Reference& xAttribs) -{ - bool rc = false; - - if (ouLocalName.equalsAscii(SIGNATURE_STR)) - { - SignatureEntity* pSignatureEntity = new SignatureEntity( - m_xSAXEventKeeper, - m_bIsExporting, - this, - m_xXMLSecurityContext, - m_xXMLSignature, - mxMSF); - - m_vSignatureList.push_back(pSignatureEntity); - - m_stCurrentPath.push(pSignatureEntity); - m_stCurrentPathType.push(false); - } - else if (ouLocalName.equalsAscii(REFERENCE_STR)) - { - if (!m_stCurrentPath.empty()) - { - void* pSignedInfo = m_stCurrentPath.top(); - bool bIsStringType = m_stCurrentPathType.top(); - - m_stCurrentPath.pop(); - m_stCurrentPathType.pop(); - - if (bIsStringType && !m_stCurrentPath.empty()) - { - void* pSignature = m_stCurrentPath.top(); - bool bIsStringType2 = m_stCurrentPathType.top(); - - if (!strcmp((const char*)pSignedInfo, SIGNEDINFO_STR) && !bIsStringType2) - { - rtl::OUString ouUri = xAttribs->getValueByName - (rtl::OUString(RTL_ASCII_USTRINGPARAM( URI_ATTR_STR ))); - - if (ouUri.matchAsciiL("#", 1, 0)) - { - rtl::OUString uri = ouUri.copy(1); - SignatureEntity* pSignatureEntity = (SignatureEntity *)pSignature; - - if (uri != NULL && uri.getLength()>0) - { - pSignatureEntity->addReferenceURI(uri); - findKeyOrReference(pSignatureEntity, uri, true); - } - } - } - } - m_stCurrentPath.push(pSignedInfo); - m_stCurrentPathType.push(bIsStringType); - } - m_stCurrentPath.push( (void *)REFERENCE_STR); - m_stCurrentPathType.push(true); - } - else if(ouLocalName.equalsAscii(KEYVALUE_STR) || - ouLocalName.equalsAscii(KEYNAME_STR) || - ouLocalName.equalsAscii(X509DATA_STR) || - ouLocalName.equalsAscii(ENCRYPTEDKEY_STR)) - { - if (!m_stCurrentPath.empty()) - { - void* pKeyInfo = m_stCurrentPath.top(); - bool bIsStringType = m_stCurrentPathType.top(); - - m_stCurrentPath.pop(); - m_stCurrentPathType.pop(); - - if (bIsStringType && !m_stCurrentPath.empty()) - { - bool bIsStringType2 = m_stCurrentPathType.top(); - - if (!bIsStringType2) - { - SecurityEntity *pSecurityEntity = - (SecurityEntity *) (m_stCurrentPath.top()); - pSecurityEntity->setKeyId(0); - } - } - - m_stCurrentPath.push(pKeyInfo); - m_stCurrentPathType.push(bIsStringType); - } - - m_stCurrentPath.push((void *)KEYVALUE_STR); - m_stCurrentPathType.push(true); - } - else if(ouLocalName.equalsAscii(RETRIEVALMETHOD_STR)) - { - if (!m_stCurrentPath.empty()) - { - void* pKeyInfo = m_stCurrentPath.top(); - bool bIsStringType = m_stCurrentPathType.top(); - - m_stCurrentPath.pop(); - m_stCurrentPathType.pop(); - - if (bIsStringType && !m_stCurrentPath.empty()) - { - bool bIsStringType2 = m_stCurrentPathType.top(); - - if (!bIsStringType2) - { - SecurityEntity *pSecurityEntity = - (SecurityEntity *) m_stCurrentPath.top(); - rtl::OUString ouUri = xAttribs->getValueByName( - rtl::OUString(RTL_ASCII_USTRINGPARAM( URI_ATTR_STR ))); - - if (!strcmp((const char *)pKeyInfo, KEYINFO_STR) && - ouUri != NULL && ouUri.getLength()>0) - { - pSecurityEntity->setKeyURI(ouUri); - findKeyOrReference(pSecurityEntity, ouUri, true); - } - } - - } - - m_stCurrentPath.push(pKeyInfo); - m_stCurrentPathType.push(bIsStringType); - } - - m_stCurrentPath.push((void *)RETRIEVALMETHOD_STR); - m_stCurrentPathType.push(true); - } - else if(ouLocalName.equalsAscii(KEYINFO_STR)) - { - m_stCurrentPath.push((void *)KEYINFO_STR); - m_stCurrentPathType.push(true); - } - else if(ouLocalName.equalsAscii(SIGNEDINFO_STR)) - { - m_stCurrentPath.push((void *)SIGNEDINFO_STR); - m_stCurrentPathType.push(true); - } - else - { - m_stCurrentPath.push((void *)OTHER_ELEMENT_STR); - m_stCurrentPathType.push(true); - } - - return rc; -} - -void XSecTester::checkReference( - const rtl::OUString& ouLocalName, - const cssu::Reference& xAttribs, - const rtl::OUString& ouId) -{ - rtl::OUString refNumStr = - xAttribs->getValueByName(rtl::OUString(RTL_ASCII_USTRINGPARAM(REFNUM_ATTR_STR))); - - if (ouId != NULL && ouId.getLength()>0 ) - { - int nRefNum = 999; - if (refNumStr != NULL && refNumStr.getLength()>0 ) - { - nRefNum = refNumStr.toInt32(); - } - - int nLength = m_vSignatureList.size(); - for (int i = 0; isetReference(ouId, m_bIsExporting)) - { - nRefNum--; - } - - if (pSignatureEntity->setKey(ouId, m_bIsExporting)) - { - nRefNum--; - } - } - - if (nRefNum>0) - { - int nKeeperId; - - if (ouLocalName.equalsAscii(ENCRYPTEDKEY_STR)) - { - nKeeperId = m_xSAXEventKeeper->addSecurityElementCollector( - m_bIsExporting ? - (cssxc::sax::ElementMarkPriority_BEFOREMODIFY): - (cssxc::sax::ElementMarkPriority_AFTERMODIFY), - true); - } - else - { - nKeeperId = m_xSAXEventKeeper->addSecurityElementCollector( - m_bIsExporting? - (cssxc::sax::ElementMarkPriority_AFTERMODIFY): - (cssxc::sax::ElementMarkPriority_BEFOREMODIFY), - false); - } - - m_vUnsolvedReferenceURIs.push_back(ouId); - m_vUnsolvedReferenceKeeperIds.push_back(nKeeperId); - m_vUnsolvedReferenceRefNums.push_back(nRefNum); - } - } -} - -void XSecTester::endMission() -{ - while (!m_vSignatureList.empty()) - { - if (!m_vSignatureList.empty()) - { - SignatureEntity * pSignatureEntity = m_vSignatureList.at(0); - m_vSignatureList.erase(m_vSignatureList.begin()); - pSignatureEntity->endMission(); - delete pSignatureEntity; - } - } - - while (!m_vUnsolvedReferenceURIs.empty()) - { - int nKeeperId = m_vUnsolvedReferenceKeeperIds.at(0); - m_xSAXEventKeeper->removeElementCollector(nKeeperId); - m_vUnsolvedReferenceURIs.erase(m_vUnsolvedReferenceURIs.begin()); - m_vUnsolvedReferenceKeeperIds.erase(m_vUnsolvedReferenceKeeperIds.begin()); - m_vUnsolvedReferenceRefNums.erase(m_vUnsolvedReferenceRefNums.begin()); - } -} - -void XSecTester::addStartAncestorEvent( - const rtl::OUString& ouName, - const cssu::Reference< cssxs::XAttributeList >& xAttribs) -{ - sal_Int32 nLength = xAttribs->getLength(); - AncestorEvent* ancestorEvent = new AncestorEvent( nLength ); - - ancestorEvent->bIsStartElement = true; - ancestorEvent->ouName = ouName; - - for (int i = 0; iaAttributeList[i]).sName = xAttribs->getNameByIndex((short)i); - (ancestorEvent->aAttributeList[i]).sValue =xAttribs->getValueByIndex((short)i); - } - - m_vAncestorEvents.push_back(ancestorEvent); -} - -void XSecTester::addEndAncestorEvent(const rtl::OUString& ouName) -{ - AncestorEvent* ancestorEvent = new AncestorEvent(0); - - ancestorEvent->bIsStartElement = false; - ancestorEvent->ouName = ouName; - - m_vAncestorEvents.push_back(ancestorEvent); -} - -void XSecTester::sendAncestorStartElementEvent( - const rtl::OUString& ouName, - const cssu::Sequence< cssxcsax::XMLAttribute >& attrList, - const cssu::Reference< cssxs::XDocumentHandler >& xDocumentHandler) const -{ - SvXMLAttributeList* pAttributeList = new SvXMLAttributeList(); - cssu::Reference < cssxs::XAttributeList > xAttrList - = cssu::Reference< cssxs::XAttributeList > (pAttributeList); - - sal_Int32 nLength = attrList.getLength(); - - for (int i = 0; iAddAttribute( attrList[i].sName, attrList[i].sValue); - } - - xDocumentHandler->startElement(ouName, xAttrList); -} - -void XSecTester::sendAncestorEndElementEvent( - const rtl::OUString& ouName, - const cssu::Reference< cssxs::XDocumentHandler >& xDocumentHandler) const -{ - xDocumentHandler->endElement(ouName); -} - -std::vector< AncestorEvent* >::const_iterator XSecTester::checkAncestorStartElementEvent( - const std::vector< AncestorEvent* >::const_iterator& ii, - const cssu::Reference< cssxs::XDocumentHandler >& xDocumentHandler) const -{ - std::vector< AncestorEvent* >::const_iterator next = ii+1; - - if (next == m_vAncestorEvents.end()) - { - sendAncestorStartElementEvent( - (*ii)->ouName, (*ii)->aAttributeList, xDocumentHandler); - } - else - { - while ((next != m_vAncestorEvents.end()) && ((*next)->bIsStartElement)) - { - next = checkAncestorStartElementEvent(next, xDocumentHandler); - } - - if (next != m_vAncestorEvents.end()) - { - ++next; - } - } - - return next; -} - -void XSecTester::flushAncestorEvents( - const cssu::Reference< cssxs::XDocumentHandler >& xDocumentHandler) -{ - std::vector< AncestorEvent* >::const_iterator ii; - - if (xDocumentHandler != NULL) - { - ii = m_vAncestorEvents.begin(); - - while (ii != m_vAncestorEvents.end()) - { - AncestorEvent* ancestorEvent = *ii; - - if (ancestorEvent->bIsStartElement) - { - ii = checkAncestorStartElementEvent(ii, xDocumentHandler); - } - else - { - sendAncestorEndElementEvent((*ii)->ouName, xDocumentHandler); - ++ii; - } - } - } - - /* free the ancestor events list */ - std::vector< AncestorEvent* >::iterator jj; - - while (!m_vAncestorEvents.empty()) - { - jj = m_vAncestorEvents.begin(); - delete *jj; - m_vAncestorEvents.erase(jj); - } -} - -/* - * Get the length of a file in a platform independant fashion - */ -int getLength(const char *pInputFileName) -{ - int nSize = 0; - std::ifstream data(pInputFileName); - - data.seekg(0, std::ios_base::end); - nSize = data.tellg(); - - return nSize; -} - -void outputHeader() -{ - fprintf(stderr, "%16s%4s%8s%12s%12s%12s%12s\n", "File Name", "E/I", "Size", "-C++", "-Java", "Forw-O", "No S/E"); - fprintf(stderr, "===============================================================================\n"); -} - -/* - * print the output on the screen as well as in the GNUPlot data file - */ -void output(const rtl::OUString& ouInputFileName, - const rtl::OUString& ouTime_C, - const rtl::OUString& ouTime_Java, - const rtl::OUString& ouTime_NoSecurity, - const rtl::OUString& ouTime_JavaForwardOnly, - const rtl::OUString& ouRemark_C, - const rtl::OUString& ouRemark_Java, - bool bIsExporting) -{ - int nSize = getLength(rtl::OString(ouInputFileName, ouInputFileName.getLength(), RTL_TEXTENCODING_ASCII_US).getStr()); - std::ofstream data; - - /* print screen */ - int nPosition = ouInputFileName.lastIndexOf('\\'); - rtl::OUString fileName = ouInputFileName.copy(nPosition + 1); - - fprintf(stderr, "%16s", rtl::OString(fileName, fileName.getLength(), RTL_TEXTENCODING_ASCII_US).getStr()); - - fprintf(stderr, "%4s", bIsExporting?"E":"I"); - fprintf(stderr, "%7dK", nSize/1024); - fprintf(stderr, "%8s %3s", - rtl::OString(ouTime_C, ouTime_C.getLength(), RTL_TEXTENCODING_ASCII_US).getStr(), - rtl::OString(ouRemark_C, ouRemark_C.getLength(), RTL_TEXTENCODING_ASCII_US).getStr()); - fprintf(stderr, "%8s %3s", - rtl::OString(ouTime_Java, ouTime_Java.getLength(), RTL_TEXTENCODING_ASCII_US).getStr(), - rtl::OString(ouRemark_Java, ouRemark_Java.getLength(), RTL_TEXTENCODING_ASCII_US).getStr()); - fprintf(stderr, "%12s", rtl::OString(ouTime_JavaForwardOnly, ouTime_JavaForwardOnly.getLength(), RTL_TEXTENCODING_ASCII_US).getStr()); - fprintf(stderr, "%12s", rtl::OString(ouTime_NoSecurity, ouTime_NoSecurity.getLength(), RTL_TEXTENCODING_ASCII_US).getStr()); - fprintf(stderr, "\n"); - - /* output the data as GNUPlot data file */ - /* - char str[32]; - sprintf(str, "%d %s", nSize, rtl::OString(ouTime_C, ouTime_C.getLength(), RTL_TEXTENCODING_ASCII_US).getStr()); - data.open("d:\\time_vs_size.txt", std::ios::app); - data << str << std::endl; - data.close(); - - sprintf(str, "%d %s", nSize, rtl::OString(ouTime_Java, ouTime_Java.getLength(), RTL_TEXTENCODING_ASCII_US).getStr()); - data.open("d:\\time_vs_size_without_sec.txt", std::ios::app); - data << str << std::endl; - data.close(); - */ -} - -int main( int argc, char **argv ) -{ - if (argc < 3) - { - fprintf(stderr, "Usage: testtool [] []\n"); - exit (-1); - } - - rtl::OUString aExportBatchFile = rtl::OUString::createFromAscii(argv[1]); - rtl::OUString aImportBatchFile = rtl::OUString::createFromAscii(argv[2]); - rtl::OUString aCPPCryptoToken; - if ( argc > 3 ) - aCPPCryptoToken = rtl::OUString::createFromAscii(argv[3]); - rtl::OUString aJavaCryptoToken; - if ( argc > 4 ) - aJavaCryptoToken = rtl::OUString::createFromAscii(argv[4]); - - try - { - uno::Reference< lang::XMultiServiceFactory > xMSF = CreateDemoServiceFactory(); - - XSecTester* pTester = new XSecTester( xMSF ); - uno::Reference< xml::sax::XDocumentHandler > xKeepARef = pTester; - - pTester->setCryptoDir( aJavaCryptoToken, aCPPCryptoToken ); - - rtl::OUString ouTime_C, ouTime_Java, ouTime_NoSecurity, ouTime_JavaForwardOnly; - rtl::OUString ouInputFileName; - rtl::OUString outputFileName1; - rtl::OUString outputFileName2; - rtl::OUString ouRemark_C, ouRemark_Java; - - outputHeader(); - - std::ifstream batch_export, batch_import; - - batch_export.open(OUStringToOString( aExportBatchFile, RTL_TEXTENCODING_ASCII_US ).getStr()); - - const int MAX_LINE = 80; - char line[MAX_LINE + 1]; - - while (batch_export.getline(line, MAX_LINE)) - { - ouInputFileName = rtl::OUString::createFromAscii(line); - int nPosition = ouInputFileName.lastIndexOf('.'); - int nPosition1; - - /* - * export the file with signautre/encryption (C++) - */ - outputFileName1 = ouInputFileName.copy(0, nPosition) + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-ex.xml")); - ouTime_C = pTester->export_xml(ouInputFileName, outputFileName1, sal_False); - nPosition1 = ouTime_C.lastIndexOf('\t'); - ouRemark_C = ouTime_C.copy(nPosition1 + 1); - ouTime_C = ouTime_C.copy(0, nPosition1); - - /* - * export the file with signautre/encryption (Java) - */ - outputFileName1 = ouInputFileName.copy(0, nPosition) + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-ex2.xml")); - ouTime_Java = pTester->export_xml(ouInputFileName, outputFileName1, sal_True); - nPosition1 = ouTime_Java.lastIndexOf('\t'); - ouRemark_Java = ouTime_Java.copy(nPosition1 + 1); - ouTime_Java = ouTime_Java.copy(0, nPosition1); - - /* - * export the file without signautre/encryption - */ - outputFileName2 = ouInputFileName.copy(0, nPosition) + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-ex-no.xml")); - ouTime_NoSecurity = pTester->transfer_without_sec(ouInputFileName, outputFileName2, sal_False); - - /* - * export the file with Java Flat Filter - */ - outputFileName2 = ouInputFileName.copy(0, nPosition) + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-ex-jf.xml")); - ouTime_JavaForwardOnly = pTester->transfer_without_sec(ouInputFileName, outputFileName2, sal_True); - - /* - * print output - */ - output(ouInputFileName, ouTime_C, ouTime_Java, ouTime_NoSecurity, ouTime_JavaForwardOnly, ouRemark_C, ouRemark_Java, true); - } - - batch_export.close(); - - batch_import.open(OUStringToOString( aImportBatchFile, RTL_TEXTENCODING_ASCII_US ).getStr()); - - while (batch_import.getline(line, MAX_LINE)) - { - ouInputFileName = rtl::OUString::createFromAscii(line); - int nPosition = ouInputFileName.lastIndexOf('.'); - int nPosition1; - - /* - * import the file with signautre/encryption (C++) - */ - outputFileName1 = ouInputFileName.copy(0, nPosition) + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-im.xml")); - ouTime_C = pTester->import_xml(ouInputFileName, outputFileName1, sal_False); - nPosition1 = ouTime_C.lastIndexOf('\t'); - ouRemark_C = ouTime_C.copy(nPosition1 + 1); - ouTime_C = ouTime_C.copy(0, nPosition1); - - /* - * import the file with signautre/encryption (Java) - */ - outputFileName1 = ouInputFileName.copy(0, nPosition) + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-im2.xml")); - ouTime_Java = pTester->import_xml(ouInputFileName, outputFileName1, sal_True); - nPosition1 = ouTime_Java.lastIndexOf('\t'); - ouRemark_Java = ouTime_Java.copy(nPosition1 + 1); - ouTime_Java = ouTime_Java.copy(0, nPosition1); - - /* - * import the file without signautre/encryption - */ - outputFileName2 = ouInputFileName.copy(0, nPosition) + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-im-no.xml")); - ouTime_NoSecurity = pTester->transfer_without_sec(ouInputFileName, outputFileName2, sal_False); - - /* - * import the file without signautre/encryption - */ - - outputFileName2 = ouInputFileName.copy(0, nPosition) + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-im-jf.xml")); - ouTime_JavaForwardOnly = pTester->transfer_without_sec(ouInputFileName, outputFileName2, sal_True); - - /* - * print output - */ - output(ouInputFileName, ouTime_C, ouTime_Java, ouTime_NoSecurity, ouTime_JavaForwardOnly, ouRemark_C, ouRemark_Java, false); - } - - batch_import.close(); - - fprintf(stderr, "\n"); - } - catch( cssu::Exception& e ) - { - fprintf( stderr , "\nEXCEPTION! Error Message: %s\n" , - rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() ) ; - } - - return 0; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/tools/demo/readme.txt b/xmlsecurity/tools/demo/readme.txt deleted file mode 100644 index 33b5e56cc..000000000 --- a/xmlsecurity/tools/demo/readme.txt +++ /dev/null @@ -1,22 +0,0 @@ -How to use the demo programs -================================= - - -PERFORMANCE -------------------------------- - -This program is for evaluating the performance of the XML Security framework. - -You can use the sample files from tools/examples: - -run "performance eval_export.txt eval_import.txt" - -The export file list includes all files need to be signed, and the import file list include all files need to be verified. - -JavaFlatFilter: -Used to test performance with Java. -Currently it doesn't work, seems to be because of JavaFramework doesn't work in stand alone program. - -In case you want to try it: -- set CLASSPATH=e:\Solar\r\j2sdk1.4.1_03\jre\lib;d:\x\juh.jar;d:\x\jurt.jar;d:\x\ridl.jar;d:\x\unoil.jar;d:\x\java_uno.jar -- regcomp -register -r demo.rdb -c file://d/x/jflatfilter.jar -br demo.rdb \ No newline at end of file diff --git a/xmlsecurity/tools/demo/signdemo.cxx b/xmlsecurity/tools/demo/signdemo.cxx deleted file mode 100644 index 723a8df0b..000000000 --- a/xmlsecurity/tools/demo/signdemo.cxx +++ /dev/null @@ -1,159 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_xmlsecurity.hxx" - -#include "util.hxx" - -#include -#include -#include -#include - -#include -#include -#include "xmlsecurity/baseencoding.hxx" - -using namespace ::com::sun::star; - -int SAL_CALL main( int argc, char **argv ) -{ - if( argc < 4 ) - { - fprintf( stderr, "Usage: %s []\n" , argv[0] ) ; - return -1 ; - } - - rtl::OUString aSIGFileName = rtl::OUString::createFromAscii(argv[1]); - rtl::OUString aXMLFileName = rtl::OUString::createFromAscii(argv[2]); - rtl::OUString aBINFileName = rtl::OUString::createFromAscii(argv[3]); - rtl::OUString aCryptoToken; - if ( argc >= 5 ) - aCryptoToken = rtl::OUString::createFromAscii(argv[4]); - - uno::Reference< lang::XMultiServiceFactory > xMSF = CreateDemoServiceFactory(); - - /* - * creates a signature helper - */ - XMLSignatureHelper aSignatureHelper( xMSF ); - - /* - * creates a security context. - */ - bool bInit = aSignatureHelper.Init( aCryptoToken ); - if ( !bInit ) - { - fprintf( stderr, "Error initializing security context!\n" ); - return -1; - } - - aSignatureHelper.StartMission(); - - /* - * select a private key certificate - */ - sal_Int32 i; - sal_Int32 nEnvCount = aSignatureHelper.GetSecurityEnvironmentNumber(); - if( nEnvCount == 0 ) - { - fprintf( stdout, "\nNo SecurityEnvironment found!\n" ) ; - return -1; - } - - uno::Sequence< uno::Reference< xml::crypto::XSecurityEnvironment > > xSecurityEnvironments(nEnvCount) ; - for( i=0; i < nEnvCount; i++ ) - xSecurityEnvironments[i] = aSignatureHelper.GetSecurityEnvironmentByIndex(i); - - fprintf( stdout, "\nSelect a SecurityEnvironment:\n" ) ; - for( i = 0; i < nEnvCount; i ++ ) - fprintf( stdout, "\n[%d] %s", i+1, rtl::OUStringToOString( xSecurityEnvironments[i]->getSecurityEnvironmentInformation() ,RTL_TEXTENCODING_ASCII_US ).getStr()); - - sal_Int32 nEnvIndex = QuerySelectNumber( 1, nEnvCount ) -1; - - uno::Reference< ::com::sun::star::security::XCertificate > xPersonalCert = getCertificateFromEnvironment(xSecurityEnvironments[nEnvIndex], true); - - if ( !xPersonalCert.is() ) - { - fprintf( stdout, "No certificate choosen - exit.\n" ); - return (-2); - } - - /* - * creates a new signature id - */ - sal_Int32 nSecurityId = aSignatureHelper.GetNewSecurityId(); - - /* - * configures the X509 certificate - */ - aSignatureHelper.SetX509Certificate( - nSecurityId, nEnvIndex, - xPersonalCert->getIssuerName(), - bigIntegerToNumericString( xPersonalCert->getSerialNumber()), - baseEncode(xPersonalCert->getEncoded(), BASE64)); - - /* - * configures date/time - */ - aSignatureHelper.SetDateTime( nSecurityId, Date(), Time()); - - /* - * signs the xml stream - */ - aSignatureHelper.AddForSigning( nSecurityId, aXMLFileName, aXMLFileName, sal_False ); - - /* - * signs the binary stream - */ - aSignatureHelper.AddForSigning( nSecurityId, aBINFileName, aBINFileName, sal_True ); - - /* - * creates signature - */ - uno::Reference< io::XOutputStream > xOutputStream = OpenOutputStream( aSIGFileName ); - bool bDone = aSignatureHelper.CreateAndWriteSignature( xOutputStream ); - - if ( !bDone ) - { - fprintf( stderr, "\nSTATUS: Error creating Signature!\n" ); - } - else - { - fprintf( stdout, "\nSTATUS: Signature successfully created!\n" ); - } - - aSignatureHelper.EndMission(); - - QueryPrintSignatureDetails( aSignatureHelper.GetSignatureInformations(), aSignatureHelper.GetSecurityEnvironment() ); - - return 0; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/tools/demo/util.cxx b/xmlsecurity/tools/demo/util.cxx deleted file mode 100644 index a7c222e52..000000000 --- a/xmlsecurity/tools/demo/util.cxx +++ /dev/null @@ -1,114 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_xmlsecurity.hxx" - -#include "util.hxx" - -#include - -#include -#include -#include -#include -#include - -namespace cssu = com::sun::star::uno; -namespace cssl = com::sun::star::lang; -namespace cssxc = com::sun::star::xml::crypto; -namespace cssi = com::sun::star::io; - -using namespace ::com::sun::star; - -cssu::Reference< cssl::XMultiServiceFactory > CreateDemoServiceFactory() -{ - cssu::Reference< cssl::XMultiServiceFactory > xMSF; - - try - { - cssu::Reference< cssl::XMultiComponentFactory > xLocalServiceManager = NULL ; - cssu::Reference< cssu::XComponentContext > xLocalComponentContext = NULL ; - - cssu::Reference< ::com::sun::star::registry::XSimpleRegistry > xSimpleRegistry - = ::cppu::createSimpleRegistry(); - OSL_ENSURE( xSimpleRegistry.is(), - "serviceManager - " - "Cannot create simple registry" ) ; - - xSimpleRegistry->open(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("demo.rdb")), sal_True, sal_False); - OSL_ENSURE( xSimpleRegistry->isValid() , - "serviceManager - " - "Cannot open xml security registry rdb" ) ; - - xLocalComponentContext = ::cppu::bootstrap_InitialComponentContext( xSimpleRegistry ) ; - OSL_ENSURE( xLocalComponentContext.is() , - "serviceManager - " - "Cannot create intial component context" ) ; - - xLocalServiceManager = xLocalComponentContext->getServiceManager() ; - OSL_ENSURE( xLocalServiceManager.is() , - "serviceManager - " - "Cannot create intial service manager" ) ; - - xMSF = cssu::Reference< cssl::XMultiServiceFactory >(xLocalServiceManager, cssu::UNO_QUERY) ; - - ::comphelper::setProcessServiceFactory( xMSF ); - } - catch( cssu::Exception& e ) - { - fprintf( stderr , "Error creating ServiceManager, Exception is %s\n" , rtl::OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ; - exit (-1); - } - - return xMSF; -} - -::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > OpenInputStream( const ::rtl::OUString& rStreamName ) -{ - SvFileStream* pStream = new SvFileStream( rStreamName, STREAM_READ ); - pStream->Seek( STREAM_SEEK_TO_END ); - sal_uLong nBytes = pStream->Tell(); - pStream->Seek( STREAM_SEEK_TO_BEGIN ); - SvLockBytesRef xLockBytes = new SvLockBytes( pStream, sal_True ); - uno::Reference< io::XInputStream > xInputStream = new utl::OInputStreamHelper( xLockBytes, nBytes ); - - return xInputStream; - -} - -::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > OpenOutputStream( const ::rtl::OUString& rStreamName ) -{ - SvFileStream* pStream = new SvFileStream( rStreamName, STREAM_WRITE ); - SvLockBytesRef xLockBytes = new SvLockBytes( pStream, sal_True ); - uno::Reference< io::XOutputStream > xOutputStream = new utl::OOutputStreamHelper( xLockBytes ); - - return xOutputStream; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/tools/demo/util.hxx b/xmlsecurity/tools/demo/util.hxx deleted file mode 100644 index 151f8691c..000000000 --- a/xmlsecurity/tools/demo/util.hxx +++ /dev/null @@ -1,53 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include - -#include -#include - -// Get the demo.rdb servcie manager... -::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > CreateDemoServiceFactory(); - -// Ask user to show more signature details... -void QueryPrintSignatureDetails( const SignatureInformations& SignatureInformations, ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment > ); - -// Query value from user. -int QuerySelectNumber( int nMin, int nMax ); - -// Ask to verify the signature -long QueryVerifySignature(); - -// Open In/Output Stream -::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > OpenInputStream( const ::rtl::OUString& rStreamName ); -::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > OpenOutputStream( const ::rtl::OUString& rStreamName ); - -::rtl::OUString getSignatureInformations( const SignatureInformations& SignatureInformations, ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment > xSecurityEnvironment ); -::com::sun::star::uno::Reference< ::com::sun::star::security::XCertificate > getCertificateFromEnvironment( ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment > xSecurityEnvironment, sal_Bool nType); - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/tools/demo/util2.cxx b/xmlsecurity/tools/demo/util2.cxx deleted file mode 100644 index 3e390c477..000000000 --- a/xmlsecurity/tools/demo/util2.cxx +++ /dev/null @@ -1,429 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_xmlsecurity.hxx" - -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - -namespace cssu = com::sun::star::uno; -namespace cssl = com::sun::star::lang; -namespace cssxc = com::sun::star::xml::crypto; -namespace cssi = com::sun::star::io; - -using namespace ::com::sun::star; - -/** convert util::DateTime to ISO Date String */ -void convertDateTime( ::rtl::OUStringBuffer& rBuffer, - const com::sun::star::util::DateTime& rDateTime ) -{ - String aString( String::CreateFromInt32( rDateTime.Year ) ); - aString += '-'; - if( rDateTime.Month < 10 ) - aString += '0'; - aString += String::CreateFromInt32( rDateTime.Month ); - aString += '-'; - if( rDateTime.Day < 10 ) - aString += '0'; - aString += String::CreateFromInt32( rDateTime.Day ); - - if( rDateTime.Seconds != 0 || - rDateTime.Minutes != 0 || - rDateTime.Hours != 0 ) - { - aString += 'T'; - if( rDateTime.Hours < 10 ) - aString += '0'; - aString += String::CreateFromInt32( rDateTime.Hours ); - aString += ':'; - if( rDateTime.Minutes < 10 ) - aString += '0'; - aString += String::CreateFromInt32( rDateTime.Minutes ); - aString += ':'; - if( rDateTime.Seconds < 10 ) - aString += '0'; - aString += String::CreateFromInt32( rDateTime.Seconds ); - if ( rDateTime.HundredthSeconds > 0) - { - aString += ','; - if (rDateTime.HundredthSeconds < 10) - aString += '0'; - aString += String::CreateFromInt32( rDateTime.HundredthSeconds ); - } - } - - rBuffer.append( aString ); -} - -::rtl::OUString printHexString(cssu::Sequence< sal_Int8 > data) -{ - int length = data.getLength(); - ::rtl::OUString result; - - char number[4]; - for (int j=0; j& xSecurityEnvironment ) -{ - char* status[50] = { - "STATUS_UNKNOWN", - "OPERATION_SUCCEEDED", - "RUNTIMEERROR_FAILED", - "ENGINE_FAILED", - "MALLOC_FAILED", - "STRDUP_FAILED", - "CRYPTO_FAILED", - "XML_FAILED", - "XSLT_FAILED", - "IO_FAILED", - "DISABLED", - "NOT_IMPLEMENTED", - "INVALID_SIZE", - "INVALID_DATA", - "INVALID_RESULT", - "INVALID_TYPE", - "INVALID_OPERATION", - "INVALID_STATUS", - "INVALID_FORMAT", - "DATA_NOT_MATCH", - "INVALID_NODE", - "INVALID_NODE_CONTENT", - "INVALID_NODE_ATTRIBUTE", - "MISSING_NODE_ATTRIBUTE", - "NODE_ALREADY_PRESENT", - "UNEXPECTED_NODE", - "NODE_NOT_FOUND", - "INVALID_TRANSFORM", - "INVALID_TRANSFORM_KEY", - "INVALID_URI_TYPE", - "TRANSFORM_SAME_DOCUMENT_REQUIRED", - "TRANSFORM_DISABLED", - "INVALID_KEY_DATA", - "KEY_DATA_NOT_FOUND", - "KEY_DATA_ALREADY_EXIST", - "INVALID_KEY_DATA_SIZE", - "KEY_NOT_FOUND", - "KEYDATA_DISABLED", - "MAX_RETRIEVALS_LEVEL", - "MAX_RETRIEVAL_TYPE_MISMATCH", - "MAX_ENCKEY_LEVEL", - "CERT_VERIFY_FAILED", - "CERT_NOT_FOUND", - "CERT_REVOKED", - "CERT_ISSUER_FAILED", - "CERT_NOT_YET_VALID", - "CERT_HAS_EXPIRED", - "DSIG_NO_REFERENCES", - "DSIG_INVALID_REFERENCE", - "ASSERTION"}; - - rtl::OUString result; - - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Security Id : ")) - +rtl::OUString::valueOf(infor.nSecurityId) - +rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")); - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Status : [")) - +rtl::OUString::valueOf((sal_Int32)(infor.nStatus)) - +rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("] ")) - +rtl::OUString::createFromAscii(status[infor.nStatus]) - +rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")); - - const SignatureReferenceInformations& rInfors = infor.vSignatureReferenceInfors; - int i; - int size = rInfors.size(); - - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("--References :\n")); - for (i=0; i0) - { - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("--X509IssuerName :\n")); - result += infor.ouX509IssuerName; - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")); - } - - if (infor.ouX509SerialNumber.getLength()>0) - { - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("--X509SerialNumber :\n")); - result += infor.ouX509SerialNumber; - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")); - } - - if (infor.ouX509Certificate.getLength()>0) - { - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("--X509Certificate :\n")); - result += infor.ouX509Certificate; - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")); - } - - if (infor.ouSignatureValue.getLength()>0) - { - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("--SignatureValue :\n")); - result += infor.ouSignatureValue; - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")); - } - - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("--Date :\n")); - - ::rtl::OUStringBuffer buffer; - convertDateTime( buffer, infor.stDateTime ); - result += buffer.makeStringAndClear(); - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")); - - if (infor.ouX509IssuerName.getLength()>0 && infor.ouX509SerialNumber.getLength()>0 && xSecurityEnvironment.is()) - { - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("--Certificate Path :\n")); - cssu::Reference< ::com::sun::star::security::XCertificate > xCert = xSecurityEnvironment->getCertificate( infor.ouX509IssuerName, numericStringToBigInteger(infor.ouX509SerialNumber) ); - cssu::Sequence < cssu::Reference< ::com::sun::star::security::XCertificate > > xCertPath; - if(! xCert.is() ) - { - fprintf(stdout , " xCert is NULL , so can not buildCertificatePath\n"); - return result ; - } - else - { - xCertPath = xSecurityEnvironment->buildCertificatePath( xCert ) ; - } - - for( int i = 0; i < xCertPath.getLength(); i++ ) - { - result += xCertPath[i]->getSubjectName(); - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n Subject public key algorithm : ")); - result += xCertPath[i]->getSubjectPublicKeyAlgorithm(); - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n Signature algorithm : ")); - result += xCertPath[i]->getSignatureAlgorithm(); - - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n Subject public key value : ")); - cssu::Sequence< sal_Int8 > keyValue = xCertPath[i]->getSubjectPublicKeyValue(); - result += printHexString(keyValue); - - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n Thumbprint (SHA1) : ")); - cssu::Sequence< sal_Int8 > SHA1Thumbprint = xCertPath[i]->getSHA1Thumbprint(); - result += printHexString(SHA1Thumbprint); - - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n Thumbprint (MD5) : ")); - cssu::Sequence< sal_Int8 > MD5Thumbprint = xCertPath[i]->getMD5Thumbprint(); - result += printHexString(MD5Thumbprint); - - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n <<\n")); - } - - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n Key Usage : ")); - sal_Int32 usage = xCert->getCertificateUsage(); - - if (usage & ::com::sun::star::security::KeyUsage::DIGITAL_SIGNATURE) - { - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DIGITAL_SIGNATURE ")); - } - - if (usage & ::com::sun::star::security::KeyUsage::NON_REPUDIATION) - { - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NON_REPUDIATION ")); - } - - if (usage & ::com::sun::star::security::KeyUsage::KEY_ENCIPHERMENT) - { - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KEY_ENCIPHERMENT ")); - } - - if (usage & ::com::sun::star::security::KeyUsage::DATA_ENCIPHERMENT) - { - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATA_ENCIPHERMENT ")); - } - - if (usage & ::com::sun::star::security::KeyUsage::KEY_AGREEMENT) - { - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KEY_AGREEMENT ")); - } - - if (usage & ::com::sun::star::security::KeyUsage::KEY_CERT_SIGN) - { - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KEY_CERT_SIGN ")); - } - - if (usage & ::com::sun::star::security::KeyUsage::CRL_SIGN) - { - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CRL_SIGN ")); - } - - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")); - } - - result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")); - return result; -} - -::rtl::OUString getSignatureInformations( - const SignatureInformations& SignatureInformations, - cssu::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment > xSecurityEnvironment ) -{ - rtl::OUString result; - int i; - int size = SignatureInformations.size(); - - for (i=0; i - getCertificateFromEnvironment( ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment > xSecurityEnvironment , sal_Bool nType) -{ - cssu::Sequence< cssu::Reference< ::com::sun::star::security::XCertificate > > xPersonalCerts ; - int length = 0; - int i; - - // add By CP - sal_uInt16 encoding ; - rtl_Locale *pLocale = NULL ; - osl_getProcessLocale( &pLocale ) ; - encoding = osl_getTextEncodingFromLocale( pLocale ) ; - // CP end - - if( nType != sal_False ) - xPersonalCerts = xSecurityEnvironment->getPersonalCertificates() ; - else - return NULL; // not support then; - - length = xPersonalCerts.getLength(); - if(length == 0) - { - fprintf( stdout, "\nNo certificate found!\n" ) ; - return NULL; - } - - fprintf( stdout, "\nSelect a certificate:\n" ) ; - for( i = 0; i < length; i ++ ) - { - rtl::OUString xxxIssuer; - rtl::OUString xxxSubject; - rtl::OString yyyIssuer; - rtl::OString yyySubject; - - xxxIssuer=xPersonalCerts[i]->getIssuerName(); - yyyIssuer=rtl::OUStringToOString( xxxIssuer, encoding ); - - xxxSubject=xPersonalCerts[i]->getSubjectName(); - yyySubject=rtl::OUStringToOString( xxxSubject, encoding ); - - fprintf( stdout, "\n%d:\nsubject=[%s]\nissuer=[%s]\n", - i+1, - yyySubject.getStr(), - yyyIssuer.getStr()); - } - - int sel = QuerySelectNumber( 1, length ) -1; - return xPersonalCerts[sel] ; -} - -void QueryPrintSignatureDetails( const SignatureInformations& SignatureInformations, ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment > rSecEnv ) -{ - char cShowDetails; - fprintf( stdout, "\nDisplay details (y/n) [y]?" ); - fflush( stdout ); - fscanf( stdin, "%c", &cShowDetails); - if ( cShowDetails == 'y' ) - { - rtl_Locale *pLocale = NULL ; - osl_getProcessLocale( &pLocale ) ; - sal_uInt16 encoding = osl_getTextEncodingFromLocale( pLocale ) ; - - fprintf( stdout, "------------- Signature details START -------------\n" ); - fprintf( stdout, "%s", - rtl::OUStringToOString( - getSignatureInformations( SignatureInformations, rSecEnv), - encoding).getStr()); - - fprintf( stdout, "------------- Signature details END -------------\n" ); - } -} - -int QuerySelectNumber( int nMin, int nMax ) -{ - fprintf( stdout, "\n" ) ; - int sel = 0; - do - { - fprintf( stdout, "\nSelect <%d-%d>:", nMin, nMax ) ; - fflush( stdout ); - fscanf( stdin, "%d", &sel ) ; - } while( ( sel < nMin ) || ( sel > nMax ) ); - - return sel; -} - -long QueryVerifySignature() -{ - char answer; - fprintf( stdout, "\nFound a signature - verify this one (y/n) [y]?" ); - fflush( stdout ); - fscanf( stdin, "%c", &answer); - return (answer == 'n')?0:1; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/tools/demo/verifydemo.cxx b/xmlsecurity/tools/demo/verifydemo.cxx deleted file mode 100644 index f4af57ab7..000000000 --- a/xmlsecurity/tools/demo/verifydemo.cxx +++ /dev/null @@ -1,111 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_xmlsecurity.hxx" - -#include "util.hxx" - -#include -#include - -#include - -using namespace ::com::sun::star; - -long startVerifyHandler( void *, void * ) -{ - return QueryVerifySignature(); -} - -int SAL_CALL main( int argc, char **argv ) -{ - if( argc < 2 ) - { - fprintf( stderr, "Usage: %s []\n" , argv[0] ) ; - return -1 ; - } - - rtl::OUString aSIGFileName = rtl::OUString::createFromAscii(argv[1]); - rtl::OUString aCryptoToken; - if ( argc >= 3 ) - aCryptoToken = rtl::OUString::createFromAscii(argv[2]); - - uno::Reference< lang::XMultiServiceFactory > xMSF = CreateDemoServiceFactory(); - - - /* - * creates a signature helper - */ - XMLSignatureHelper aSignatureHelper( xMSF ); - - /* - * creates a security context. - */ - bool bInit = aSignatureHelper.Init( aCryptoToken ); - if ( !bInit ) - { - fprintf( stderr, "Error initializing security context!" ); - return -1; - } - - /* - * configures the start-verify handler - */ - aSignatureHelper.SetStartVerifySignatureHdl( Link( NULL, startVerifyHandler ) ); - - aSignatureHelper.StartMission(); - - /* - * verifies the signature - */ - uno::Reference< io::XInputStream > xInputStream = OpenInputStream( aSIGFileName ); - bool bDone = aSignatureHelper.ReadAndVerifySignature( xInputStream ); - - /* - * closes the signature stream - */ - xInputStream->closeInput(); - - if ( !bDone ) - { - fprintf( stderr, "\nSTATUS: Error verifying Signature!\n" ); - } - else - { - fprintf( stdout, "\nSTATUS: All choosen Signatures veryfied successfully!\n" ); - } - - aSignatureHelper.EndMission(); - - QueryPrintSignatureDetails( aSignatureHelper.GetSignatureInformations(), aSignatureHelper.GetSecurityEnvironment() ); - - return 0; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/tools/examples/demo-sample.gif b/xmlsecurity/tools/examples/demo-sample.gif deleted file mode 100644 index 92b2a025f..000000000 Binary files a/xmlsecurity/tools/examples/demo-sample.gif and /dev/null differ diff --git a/xmlsecurity/tools/examples/demo-sample.sxw b/xmlsecurity/tools/examples/demo-sample.sxw deleted file mode 100644 index dc1472129..000000000 Binary files a/xmlsecurity/tools/examples/demo-sample.sxw and /dev/null differ diff --git a/xmlsecurity/tools/examples/demo-sample.xml b/xmlsecurity/tools/examples/demo-sample.xml deleted file mode 100644 index c4c1cd00b..000000000 --- a/xmlsecurity/tools/examples/demo-sample.xml +++ /dev/null @@ -1,3 +0,0 @@ - - -abc \ No newline at end of file diff --git a/xmlsecurity/tools/examples/enc-1.xml b/xmlsecurity/tools/examples/enc-1.xml deleted file mode 100644 index 8d6551421..000000000 --- a/xmlsecurity/tools/examples/enc-1.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - The encrypted data is Hello, World! - - - - - - - - - CN=Test Issuer - 123450001 - - - - - - - - - - - - - Hello, World! - - diff --git a/xmlsecurity/tools/examples/enc-2.xml b/xmlsecurity/tools/examples/enc-2.xml deleted file mode 100644 index e56d2300a..000000000 --- a/xmlsecurity/tools/examples/enc-2.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - The encrypted data is Hello, World! - - - - - - - - - CN=Test Issuer - 123450001 - - - - - - - - - - - - - - Hello, World! - - - - - - - - - CN=Test Issuer - 123450001 - - - - - - - - - - - - - - This is an embeded encryption! - - - - diff --git a/xmlsecurity/tools/examples/eval_export.txt b/xmlsecurity/tools/examples/eval_export.txt deleted file mode 100644 index cec4a2225..000000000 --- a/xmlsecurity/tools/examples/eval_export.txt +++ /dev/null @@ -1,7 +0,0 @@ -warmup.xml -sign-0.xml -sign-1.xml -sign-2.xml -sign-3.xml -sign-4.xml -sign-5.xml \ No newline at end of file diff --git a/xmlsecurity/tools/examples/eval_import.txt b/xmlsecurity/tools/examples/eval_import.txt deleted file mode 100644 index e789fe3cd..000000000 --- a/xmlsecurity/tools/examples/eval_import.txt +++ /dev/null @@ -1,14 +0,0 @@ -warmup-ex.xml -sign-0-ex.xml -sign-1-ex.xml -sign-2-ex.xml -sign-3-ex.xml -sign-4-ex.xml -sign-5-ex.xml -warmup-ex2.xml -sign-0-ex2.xml -sign-1-ex2.xml -sign-2-ex2.xml -sign-3-ex2.xml -sign-4-ex2.xml -sign-5-ex2.xml \ No newline at end of file diff --git a/xmlsecurity/tools/examples/evaluate_win.bat b/xmlsecurity/tools/examples/evaluate_win.bat deleted file mode 100644 index 9567e9a2d..000000000 --- a/xmlsecurity/tools/examples/evaluate_win.bat +++ /dev/null @@ -1,138 +0,0 @@ -call env_win.bat - -@echo off -echo ============================================= -echo step - 1 create a temporary folder -echo ============================================= -@echo on -%TEMP_DRIVE% -cd / -mkdir %TEMP_FOLDER% - -@echo off -echo ============================================= -echo step - 2 copy the xsecsim.rdb -echo ============================================= -@echo on - -cp %WS_PATH%/xmlsecurity/wntmsci8.pro/bin/xsecsim.rdb %TEMP_DRIVE%/%TEMP_FOLDER%/. - -@echo off -echo ============================================= -echo step - 3 copy services.rdb and types.rdb -echo ============================================= -@echo on - -cp %SO_DRIVE%/%SO_PATH%/program/services.rdb %TEMP_DRIVE%/%TEMP_FOLDER%/. -cp %SO_DRIVE%/%SO_PATH%/program/types.rdb %TEMP_DRIVE%/%TEMP_FOLDER%/. - -@echo off -echo ============================================= -echo step - 4 add types.rdb, xsecsim.rdb to services.rdb -echo ============================================= -@echo on - -cd %TEMP_FOLDER% -regmerge services.rdb / types.rdb -regmerge services.rdb / xsecsim.rdb - -@echo off -echo ============================================= -echo step - 5 register new component -echo ============================================= -@echo on - -mkdir windows.plt -cp %WS_PATH%/xmlsecurity/wntmsci8.pro/bin/xsec_sim.dll windows.plt/. -cp %WS_PATH%/xmlsecurity/wntmsci8.pro/bin/xsecsim.rdb windows.plt/. -cp %WS_PATH%/xmlsecurity/wntmsci8.pro/class/jflatfilter.jar windows.plt/. -zip xsec_sim.zip windows.plt\*.* -rm -R windows.plt - -%SO_DRIVE% -cd %SO_DRIVE%/%SO_PATH%/program -pkgchk -s %TEMP_DRIVE%/%TEMP_FOLDER%/xsec_sim.zip - -%TEMP_DRIVE% - -@echo off -echo ============================================= -echo step - 6 copy dynamic libraries -echo ============================================= -@echo on - -cp %SO_DRIVE%/%SO_PATH%/program/*.dll ./. - -@echo off -echo ============================================= -echo step - 7 copy testtool program -echo ============================================= -@echo on - -cp %WS_PATH%/xmlsecurity/wntmsci8.pro/bin/testtool.exe ./. - -@echo off -echo ============================================= -echo step - 8 start OpenOffice -echo ============================================= -@echo on - -@echo off -echo please start up OpenOffice with "-accept=socket,host=0,port=2002;urp;" -pause Press Enter when finished... -@echo on - -@echo off -echo ============================================= -echo step - 9 run the testtool program -echo ============================================= -@echo on - -mkdir examples -cd examples -cp %WS_PATH%/xmlsecurity/tools/examples/warmup.xml ./. -cp %WS_PATH%/xmlsecurity/tools/examples/sign-0.xml ./. -cp %WS_PATH%/xmlsecurity/tools/examples/sign-1.xml ./. -cp %WS_PATH%/xmlsecurity/tools/examples/sign-2.xml ./. -cp %WS_PATH%/xmlsecurity/tools/examples/sign-3.xml ./. -cp %WS_PATH%/xmlsecurity/tools/examples/sign-4.xml ./. -cp %WS_PATH%/xmlsecurity/tools/examples/sign-5.xml ./. -cd .. -cp %WS_PATH%/xmlsecurity/tools/examples/eval_import.txt ./. -cp %WS_PATH%/xmlsecurity/tools/examples/eval_export.txt ./. - -testtool %WS_PATH%/xmlsecurity/tools/cryptoken/jks/testToken.jks %WS_PATH%/xmlsecurity/tools/cryptoken/nss %TEMP_DRIVE%/%TEMP_FOLDER%/eval_export.txt %TEMP_DRIVE%/%TEMP_FOLDER%/eval_import.txt - -@echo off -echo ============================================= -echo step - 10 stop OpenOffice -echo ============================================= -@echo on - -@echo off -echo please stop the OpenOffice application -pause Press Enter when finished... -@echo on - -@echo off -echo ============================================= -echo step - 11 remove new component -echo ============================================= -@echo on - -rm %SO_DRIVE%/%SO_PATH%/user/uno_packages/xsec_sim.zip -%SO_DRIVE% -cd %SO_DRIVE%/%SO_PATH%/program - -pkgchk -s -d xsec_sim.zip - -%TEMP_DRIVE% - -@echo off -echo ============================================= -echo step - 12 remove the temporary folder -echo ============================================= -@echo on - -cd .. -rm -R %TEMP_FOLDER% diff --git a/xmlsecurity/tools/examples/readme.txt b/xmlsecurity/tools/examples/readme.txt deleted file mode 100644 index 1a0c16882..000000000 --- a/xmlsecurity/tools/examples/readme.txt +++ /dev/null @@ -1,7 +0,0 @@ - - -How to use the uno tools - -The /xmlsecurity/tools/examples/uno_win.bat provide the portrait of this procedure under 4NT in windows platform. -If you want to use it, you need to configure all marcos to your local setting. - diff --git a/xmlsecurity/tools/examples/s-in-e-1.xml b/xmlsecurity/tools/examples/s-in-e-1.xml deleted file mode 100644 index c08839a1b..000000000 --- a/xmlsecurity/tools/examples/s-in-e-1.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - a signature in an encryption. - - - - - - - - - CN=Test Issuer - 123450001 - - - - - - - - - - - - - - Hello, World! the Following is a Signature - - - - - - - - - - - - - - CN=Test Issuer - 123450005 - - - - - Signed Data - - - diff --git a/xmlsecurity/tools/examples/s-in-e-2.xml b/xmlsecurity/tools/examples/s-in-e-2.xml deleted file mode 100644 index 29e3e45df..000000000 --- a/xmlsecurity/tools/examples/s-in-e-2.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - a signature in an encryption. - - - - - - - - - CN=Test Issuer - 123450001 - - - - - - - - - - - - - - Hello, World! the Following is a Signature - - - - - - - - - - - - - - CN=Test Issuer - 123450005 - - - - - - Signed Data - - diff --git a/xmlsecurity/tools/examples/sign-0.xml b/xmlsecurity/tools/examples/sign-0.xml deleted file mode 100644 index 7fc834f8f..000000000 --- a/xmlsecurity/tools/examples/sign-0.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - CN=Test Issuer - 123450005 - - - - - - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - - - \ No newline at end of file diff --git a/xmlsecurity/tools/examples/sign-1.xml b/xmlsecurity/tools/examples/sign-1.xml deleted file mode 100644 index c6e1a40dc..000000000 --- a/xmlsecurity/tools/examples/sign-1.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - CN=Test Issuer - 123450005 - - - - - - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - - - \ No newline at end of file diff --git a/xmlsecurity/tools/examples/sign-2.xml b/xmlsecurity/tools/examples/sign-2.xml deleted file mode 100644 index e3da49f22..000000000 --- a/xmlsecurity/tools/examples/sign-2.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - CN=Test Issuer - 123450005 - - - - - - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - - - \ No newline at end of file diff --git a/xmlsecurity/tools/examples/sign-3.xml b/xmlsecurity/tools/examples/sign-3.xml deleted file mode 100644 index 61a9f3cf3..000000000 --- a/xmlsecurity/tools/examples/sign-3.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - CN=Test Issuer - 123450005 - - - - - - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - - - \ No newline at end of file diff --git a/xmlsecurity/tools/examples/sign-4.xml b/xmlsecurity/tools/examples/sign-4.xml deleted file mode 100644 index b84500450..000000000 --- a/xmlsecurity/tools/examples/sign-4.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - CN=Test Issuer - 123450005 - - - - - - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - - - \ No newline at end of file diff --git a/xmlsecurity/tools/examples/sign-5.xml b/xmlsecurity/tools/examples/sign-5.xml deleted file mode 100644 index 46cb6d609..000000000 --- a/xmlsecurity/tools/examples/sign-5.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - CN=Test Issuer - 123450005 - - - - - - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - -Programmer's ManualPlanned OutlinePreface (3 Pages)First Steps (24 Pages)Programming with UNOFields of Application for UNOGetting StartedRequired FilesConfigurationFirst ConnectionHow to get Objects in [PRODUCTNAME]How to work with ObjectsExampleServicesQuerying InterfacesUsing PropertiesElementAccessSimple TypesStringsEnums and Constant GroupsStructsAnySequenceHow to find the solution for a problemFinding your Way through the API ReferenceCommon MechanismsTextTableDrawingUNO in Professional Projects (145)IntroductionUNO/API constituents: How UNOIDL/API, ServiceManager, Bridges, CoreReflection work togetherAPI ConceptsAPI is a language independent, abstract specification for UNO objects which are used in [PRODUCTNAME]Types in the API ReferenceSimple TypesThe Any TypeInterfacesServicesModulesStructsConstant Groups and EnumsSequencesExceptionsAPI PrinciplesRelationship between Specification, Implementation and InstancesObject CompositionUNO ConceptsUNO is an environment for networked object communicationInterprocess ConnectionsServiceManager and ComponentContextUsing UNO InterfacesUsing PropertiesUsing Collections and ContainersEvent ModelException HandlingLifetime ControlObject IdentityLanguage BindingsIntroduction for language bindingJava Language BindingC++ BindingAccess for [PRODUCTNAME] BasicAutomationWriting UNO componentsSpecifying a new ComponentUNOIDL language specificationImplementing a ComponentComponent Development BasicsIntroductionMandatory interfaces: XInterface, XServiceInfo ((from UseInterfaces.CoreInterfaces))"Should be implemented" interfaces: XTypeProvider ((from UseInterfaces.CoreInterfaces ))optional interface: XMain for standalone executionSimple Component in JavaGetting the service manager ((Chapter Java components from unoBindingJava))simple component chapterC++ Component((Automation Component?))Deployment Options for ComponentsComponent RegistrationService Manager ConfigurationXSet InterfaceAdding components during runtime, particularly interesting during developmentServiceManager ContentDynamically modifying the ServiceManagerBootstrapping the Service Manager ((from CppBind chapter))Simple Test ApplicationConfiguring Your Application with Bootstrap ParametersThe UNO ExecutableStandalone Runtime EnvironmentThe UNO executable and XMainConfiguring the Java Runtime EnvironmentThe office and Java ((from UnoBindingJava))Advanced UNODesign PatternsBridging conceptsRequirements for Language Bindings and BridgesNew Scripting EnginesServiceManager and loaderSpecial Interfaces for internal useXUNOTunnelXAggregationUNO Reflection APITypeLibrary and TypeProvidersDifferences from CorbaOffice DevelopmentGlobal Object StructureDesktop EnvironmentFrames and Frame HierarchiesFrame-Controller-Model ParadigmLoading and Saving Office ComponentsDispatch FrameworkCommon FeaturesCommon DialogsDocumentInfoStylesSearch and ReplaceNumber FormatsPackage File FormatsInternationalizationLinguisticSystem IntegrationClipboardFile PickerBridging to the Window SystemText Documents (51,5 Pages)OverviewHandling Text FilesWorking with Text DocumentsNavigatingUsing TextTablesText FieldsBookmarksIndexes and Index MarksReference MarksFootnotes and EndnotesShape Objects in TextRedlineRubyGlobal Document FeaturesControlling a Text DocumentSpreadsheet DocumentsOverviewHandling Spreadsheet FilesWorking with Spreadsheet DocumentsNavigatingEditing SpreadsheetsGlobal Document FeaturesControlling a Spreadsheet DocumentExtending Capabilities of Spreadsheet DocumentsDrawings and PresentationsOverviewHandling Draw/Impress FilesSavingPrintingRunning PresentationsWorking with a Draw/Impress DocumentNavigatingWorking with Draw/Impress DocumentsGlobal Document FeaturesControlling a Draw/Impress DocumentChartsChart BasicsCreating a Chart DocumentEditing a Chart DocumentCommon Diagram APIDifferent Chart TypesExtending Capabilities of Chart DocumentsBasic and DialogsIntroductionLibrary OrganizationIDE with Dialogs and EventsUsing [PRODUCTNAME] BasicToolkit Controls and their PropertiesCreating Dialogs at RuntimeDatabase AccessFeatures of the [PRODUCTNAME] Database IntegrationCapabilitiesSDBC, SDBCX, SDB ArchitectureAccessing Datasources with [PRODUCTNAME]DataSourcesAdding and Editing Datasources Establishing a ConnectionGetting ConnectionsDriver specificsConnection PoolingWorking with Saved QueriesWorking with DataExecuting StatementsResultsetsMetadataRowsetsWorking with the Database DesignUsing DDL to change the DB DesignUsing SDBCX to access the DB DesignUsing DBMS FeaturesStored ProceduresTransaction HandlingExecuting Prepared StatementsWriting Database DriversFormsConceptsModels and ViewsForm Elements in the Document ModelSpecial Form ComponentsEventsData AwarenessRecipesMaking it easier to work with a FormControlling the Data InputCollecting Data automaticallyTaking Advantage of Database Server FeaturesAdding new FunctionalityHandling ErrorsUCBPurpose of UCBAccessing ContentsOpening Folder ContentsOpening Document Contents as StreamsWorking with Content PropertiesCreating, Moving and Copying Document and Folder ContentsWorking with Additional CommandsWriting a Content Provider[PRODUCTNAME] ConfigurationAccessing configuration dataWriting Configuration DataAppendix - - - \ No newline at end of file diff --git a/xmlsecurity/tools/examples/uno_win.bat b/xmlsecurity/tools/examples/uno_win.bat deleted file mode 100644 index 6d1f74ada..000000000 --- a/xmlsecurity/tools/examples/uno_win.bat +++ /dev/null @@ -1,23 +0,0 @@ -call env_win.bat - -@echo off -echo ============================================= -echo step - 1 start OpenOffice -echo ============================================= -@echo on - -@echo off -echo please start up OpenOffice with "-accept=socket,host=0,port=2002;urp;" -pause Press Enter when finished... -@echo on - -@echo off -echo ============================================= -echo step - 2 run the testtool class -echo ============================================= -@echo on - -cp %WS_PATH%/xmlsecurity/tools/uno/current.gif ./. -java -classpath %WS_PATH%/xmlsecurity/%OUTPUTDIR%/class;%SO_CLASSPATHPATH%/rt.jar;%SO_CLASSPATHPATH%/java_uno.jar;%SO_CLASSPATHPATH%/jurt.jar;%SO_CLASSPATHPATH%/unoil.jar;%SO_CLASSPATHPATH%/ridl.jar;%SO_CLASSPATHPATH%/juh.jar com.sun.star.xml.security.uno.TestTool %WS_PATH%/xmlsecurity/tools/cryptoken/jks/testToken.jks "" -rm ./current.gif - diff --git a/xmlsecurity/tools/examples/warmup.xml b/xmlsecurity/tools/examples/warmup.xml deleted file mode 100644 index 70abf5cd4..000000000 --- a/xmlsecurity/tools/examples/warmup.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - CN=Test Issuer - 123450005 - - - - - - -你好 - - - \ No newline at end of file diff --git a/xmlsecurity/tools/standalone/csfit/certmngr.cxx b/xmlsecurity/tools/standalone/csfit/certmngr.cxx deleted file mode 100644 index a8ada2d60..000000000 --- a/xmlsecurity/tools/standalone/csfit/certmngr.cxx +++ /dev/null @@ -1,191 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_xmlsecurity.hxx" - -#include -#include "helper.hxx" - -#include "libxml/tree.h" -#include "libxml/parser.h" -#ifndef XMLSEC_NO_XSLT -#include "libxslt/xslt.h" -#endif - -#include "securityenvironment_nssimpl.hxx" - -#include - - -#include "nspr.h" -#include "prtypes.h" - -#include "pk11func.h" -#include "cert.h" -#include "cryptohi.h" -#include "certdb.h" -#include "nss.h" - -#include "xmlsec/strings.h" -#include "xmlsec/xmltree.h" - -#include - -using namespace ::rtl ; -using namespace ::cppu ; -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::io ; -using namespace ::com::sun::star::ucb ; -using namespace ::com::sun::star::beans ; -using namespace ::com::sun::star::document ; -using namespace ::com::sun::star::lang ; -using namespace ::com::sun::star::security ; -using namespace ::com::sun::star::xml::wrapper ; -using namespace ::com::sun::star::xml::crypto ; - -int SAL_CALL main( int argc, char **argv ) -{ - CERTCertDBHandle* certHandle ; - PK11SlotInfo* slot ; - - if( argc != 3 ) { - fprintf( stderr, "Usage: %s < CertDir > \n\n" , argv[0] ) ; - return 1 ; - } - - for( ; getchar() != 'q' ; ) { - slot = NULL ; - - //Initialize NSPR and NSS - PR_Init( PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 1 ) ; - PK11_SetPasswordFunc( PriPK11PasswordFunc ) ; - if( NSS_Init( argv[1] ) != SECSuccess ) { - fprintf( stderr , "### cannot intialize NSS!\n" ) ; - goto done ; - } - - certHandle = CERT_GetDefaultCertDB() ; - slot = PK11_GetInternalKeySlot() ; - - if( PK11_NeedLogin( slot ) ) { - SECStatus nRet = PK11_Authenticate( slot, PR_TRUE, NULL ); - if( nRet != SECSuccess ) { - fprintf( stderr , "### cannot authehticate the crypto token!\n" ) ; - goto done ; - } - } - - - try { - Reference< XMultiComponentFactory > xManager = NULL ; - Reference< XComponentContext > xContext = NULL ; - - xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[2] ) ) ; - OSL_ENSURE( xManager.is() , - "ServicesManager - " - "Cannot get service manager" ) ; - - //Create security environment - //Build Security Environment - Reference< XInterface > xsecenv = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl")), xContext ) ; - OSL_ENSURE( xsecenv.is() , - "Signer - " - "Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ; - - Reference< XSecurityEnvironment > xSecEnv( xsecenv , UNO_QUERY ) ; - OSL_ENSURE( xSecEnv.is() , - "Signer - " - "Cannot get interface of \"XSecurityEnvironment\" from service \"xsec.SecurityEnvironment\"" ) ; - - //Setup key slot and certDb - Reference< XUnoTunnel > xEnvTunnel( xsecenv , UNO_QUERY ) ; - OSL_ENSURE( xEnvTunnel.is() , - "Signer - " - "Cannot get interface of \"XUnoTunnel\" from service \"xsec.SecurityEnvironment\"" ) ; - - SecurityEnvironment_NssImpl* pSecEnv = ( SecurityEnvironment_NssImpl* )xEnvTunnel->getSomething( SecurityEnvironment_NssImpl::getUnoTunnelId() ) ; - OSL_ENSURE( pSecEnv != NULL , - "Signer - " - "Cannot get implementation of \"xsec.SecurityEnvironment\"" ) ; - - pSecEnv->setCryptoSlot( slot ) ; - pSecEnv->setCertDb( certHandle ) ; - - //Get personal certificate - Sequence < Reference< XCertificate > > xPersonalCerts = pSecEnv->getPersonalCertificates() ; - Sequence < Reference< XCertificate > > xCertPath ; - for( int i = 0; i < xPersonalCerts.getLength(); i ++ ) { - //Print the certificate infomation. - fprintf( stdout, "\nPersonal Certificate Info\n" ) ; - fprintf( stdout, "\tCertificate Issuer[%s]\n", OUStringToOString( xPersonalCerts[i]->getIssuerName(), RTL_TEXTENCODING_ASCII_US ).getStr() ) ; - fprintf( stdout, "\tCertificate Serial Number[%s]\n", OUStringToOString( bigIntegerToNumericString( xPersonalCerts[i]->getSerialNumber() ), RTL_TEXTENCODING_ASCII_US ).getStr() ) ; - fprintf( stdout, "\tCertificate Subject[%s]\n", OUStringToOString( xPersonalCerts[i]->getSubjectName(), RTL_TEXTENCODING_ASCII_US ).getStr() ) ; - - //build the certificate path - xCertPath = pSecEnv->buildCertificatePath( xPersonalCerts[i] ) ; - //Print the certificate path. - fprintf( stdout, "\tCertificate Path\n" ) ; - for( int j = 0; j < xCertPath.getLength(); j ++ ) { - fprintf( stdout, "\t\tCertificate Authority Subject[%s]\n", OUStringToOString( xCertPath[j]->getSubjectName(), RTL_TEXTENCODING_ASCII_US ).getStr() ) ; - } - - //Get the certificate - Sequence < sal_Int8 > serial = xPersonalCerts[i]->getSerialNumber() ; - Reference< XCertificate > xcert = pSecEnv->getCertificate( xPersonalCerts[i]->getIssuerName(), xPersonalCerts[i]->getSerialNumber() ) ; - if( !xcert.is() ) { - fprintf( stdout, "The personal certificate is not in the certificate database\n" ) ; - } - - //Get the certificate characters - sal_Int32 chars = pSecEnv->getCertificateCharacters( xPersonalCerts[i] ) ; - fprintf( stdout, "The certificate characters are %d\n", chars ) ; - - //Get the certificate status - sal_Int32 validity = pSecEnv->verifyCertificate( xPersonalCerts[i] ) ; - fprintf( stdout, "The certificate validities are %d\n", validity ) ; - } - } catch( Exception& e ) { - fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ; - goto done ; - } - -done: - if( slot != NULL ) - PK11_FreeSlot( slot ) ; - - PK11_LogoutAll() ; - NSS_Shutdown() ; - - } - - return 0; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/tools/standalone/csfit/decrypter.cxx b/xmlsecurity/tools/standalone/csfit/decrypter.cxx deleted file mode 100644 index c0c80c50d..000000000 --- a/xmlsecurity/tools/standalone/csfit/decrypter.cxx +++ /dev/null @@ -1,274 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_xmlsecurity.hxx" - -#include -#include "helper.hxx" - -#include "libxml/tree.h" -#include "libxml/parser.h" -#ifndef XMLSEC_NO_XSLT -#include "libxslt/xslt.h" -#endif - - -#include "securityenvironment_nssimpl.hxx" -#include "xmlelementwrapper_xmlsecimpl.hxx" - -#include "nspr.h" -#include "prtypes.h" - -#include "pk11func.h" -#include "cert.h" -#include "cryptohi.h" -#include "certdb.h" -#include "nss.h" - -#include "xmlsec/strings.h" -#include "xmlsec/xmltree.h" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - - -using namespace ::rtl ; -using namespace ::cppu ; -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::io ; -using namespace ::com::sun::star::ucb ; -using namespace ::com::sun::star::beans ; -using namespace ::com::sun::star::document ; -using namespace ::com::sun::star::lang ; -using namespace ::com::sun::star::registry ; -using namespace ::com::sun::star::xml::wrapper ; -using namespace ::com::sun::star::xml::crypto ; - - -int SAL_CALL main( int argc, char **argv ) -{ - CERTCertDBHandle* certHandle = NULL ; - PK11SlotInfo* slot = NULL ; - xmlDocPtr doc = NULL ; - xmlNodePtr tplNode ; - xmlNodePtr tarNode ; - FILE* dstFile = NULL ; - - - if( argc != 5 ) { - fprintf( stderr, "Usage: %s < CertDir > \n\n" , argv[0] ) ; - return 1 ; - } - - //Init libxml and libxslt libraries - xmlInitParser(); - LIBXML_TEST_VERSION - xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS; - xmlSubstituteEntitiesDefault(1); - - #ifndef XMLSEC_NO_XSLT - xmlIndentTreeOutput = 1; - #endif // XMLSEC_NO_XSLT - - - //Initialize NSPR and NSS - PR_Init( PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 1 ) ; - PK11_SetPasswordFunc( PriPK11PasswordFunc ) ; - if( NSS_Init( argv[1] ) != SECSuccess ) { - fprintf( stderr , "### cannot intialize NSS!\n" ) ; - goto done ; - } - - certHandle = CERT_GetDefaultCertDB() ; - slot = PK11_GetInternalKeySlot() ; - - //Load XML document - doc = xmlParseFile( argv[2] ) ; - if( doc == NULL || xmlDocGetRootElement( doc ) == NULL ) { - fprintf( stderr , "### Cannot load template xml document!\n" ) ; - goto done ; - } - - //Find the encryption template - tplNode = xmlSecFindNode( xmlDocGetRootElement( doc ), xmlSecNodeEncryptedData, xmlSecEncNs ) ; - if( tplNode == NULL ) { - fprintf( stderr , "### Cannot find the encryption template!\n" ) ; - goto done ; - } - - - try { - Reference< XMultiComponentFactory > xManager = NULL ; - Reference< XComponentContext > xContext = NULL ; - - xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[4] ) ) ; - - //Create encryption template - Reference< XInterface > tplElement = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ; - OSL_ENSURE( tplElement.is() , - "Decryptor - " - "Cannot get service instance of \"xsec.XMLElementWrapper\"" ) ; - - Reference< XXMLElementWrapper > xTplElement( tplElement , UNO_QUERY ) ; - OSL_ENSURE( xTplElement.is() , - "Decryptor - " - "Cannot get interface of \"XXMLElementWrapper\" from service \"xsec.XMLElementWrapper\"" ) ; - - Reference< XUnoTunnel > xTplEleTunnel( xTplElement , UNO_QUERY ) ; - OSL_ENSURE( xTplEleTunnel.is() , - "Decryptor - " - "Cannot get interface of \"XUnoTunnel\" from service \"xsec.XMLElementWrapper\"" ) ; - - XMLElementWrapper_XmlSecImpl* pTplElement = ( XMLElementWrapper_XmlSecImpl* )xTplEleTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ) ; - OSL_ENSURE( pTplElement != NULL , - "Decryptor - " - "Cannot get implementation of \"xsec.XMLElementWrapper\"" ) ; - - pTplElement->setNativeElement( tplNode ) ; - - //Build XML Encryption template - Reference< XInterface > enctpl = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLEncryptionTemplate")), xContext ) ; - OSL_ENSURE( enctpl.is() , - "Decryptor - " - "Cannot get service instance of \"xsec.XMLEncryptionTemplate\"" ) ; - - Reference< XXMLEncryptionTemplate > xTemplate( enctpl , UNO_QUERY ) ; - OSL_ENSURE( xTemplate.is() , - "Decryptor - " - "Cannot get interface of \"XXMLEncryptionTemplate\" from service \"xsec.XMLEncryptionTemplate\"" ) ; - - //Import the encryption template - xTemplate->setTemplate( xTplElement ) ; - - //Create security environment - //Build Security Environment - Reference< XInterface > xsecenv = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl")), xContext ) ; - OSL_ENSURE( xsecenv.is() , - "Decryptor - " - "Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ; - - Reference< XSecurityEnvironment > xSecEnv( xsecenv , UNO_QUERY ) ; - OSL_ENSURE( xSecEnv.is() , - "Decryptor - " - "Cannot get interface of \"XSecurityEnvironment\" from service \"xsec.SecurityEnvironment\"" ) ; - - //Setup key slot and certDb - Reference< XUnoTunnel > xEnvTunnel( xsecenv , UNO_QUERY ) ; - OSL_ENSURE( xEnvTunnel.is() , - "Decryptor - " - "Cannot get interface of \"XUnoTunnel\" from service \"xsec.SecurityEnvironment\"" ) ; - - SecurityEnvironment_NssImpl* pSecEnv = ( SecurityEnvironment_NssImpl* )xEnvTunnel->getSomething( SecurityEnvironment_NssImpl::getUnoTunnelId() ) ; - OSL_ENSURE( pSecEnv != NULL , - "Decryptor - " - "Cannot get implementation of \"xsec.SecurityEnvironment\"" ) ; - - pSecEnv->setCryptoSlot( slot ) ; - pSecEnv->setCertDb( certHandle ) ; - - - //Build XML Security Context - Reference< XInterface > xmlsecctx = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_NssImpl")), xContext ) ; - OSL_ENSURE( xmlsecctx.is() , - "Decryptor - " - "Cannot get service instance of \"xsec.XMLSecurityContext\"" ) ; - - Reference< XXMLSecurityContext > xSecCtx( xmlsecctx , UNO_QUERY ) ; - OSL_ENSURE( xSecCtx.is() , - "Decryptor - " - "Cannot get interface of \"XXMLSecurityContext\" from service \"xsec.XMLSecurityContext\"" ) ; - - xSecCtx->setSecurityEnvironment( xSecEnv ) ; - - - //Get encrypter - Reference< XInterface > xmlencrypter = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLEncryption_NssImpl")), xContext ) ; - OSL_ENSURE( xmlencrypter.is() , - "Decryptor - " - "Cannot get service instance of \"xsec.XMLEncryption\"" ) ; - - Reference< XXMLEncryption > xEncrypter( xmlencrypter , UNO_QUERY ) ; - OSL_ENSURE( xEncrypter.is() , - "Decryptor - " - "Cannot get interface of \"XXMLEncryption\" from service \"xsec.XMLEncryption\"" ) ; - - - //Perform decryption - Reference< XXMLElementWrapper> xDecrRes = xEncrypter->decrypt( xTemplate , xSecCtx ) ; - OSL_ENSURE( xDecrRes.is() , - "Decryptor - " - "Cannot decrypt the xml document" ) ; - } catch( Exception& e ) { - fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ; - goto done ; - } - - dstFile = fopen( argv[3], "w" ) ; - if( dstFile == NULL ) { - fprintf( stderr , "### Can not open file %s\n", argv[3] ) ; - goto done ; - } - - //Save result - xmlDocDump( dstFile, doc ) ; - -done: - if( dstFile != NULL ) - fclose( dstFile ) ; - - if( slot != NULL ) - PK11_FreeSlot( slot ) ; - - PK11_LogoutAll() ; - NSS_Shutdown() ; - - /* Shutdown libxslt/libxml */ - #ifndef XMLSEC_NO_XSLT - xsltCleanupGlobals(); - #endif /* XMLSEC_NO_XSLT */ - xmlCleanupParser(); - - return 0; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/tools/standalone/csfit/encrypter.cxx b/xmlsecurity/tools/standalone/csfit/encrypter.cxx deleted file mode 100644 index efdd6164a..000000000 --- a/xmlsecurity/tools/standalone/csfit/encrypter.cxx +++ /dev/null @@ -1,311 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_xmlsecurity.hxx" - -#include -#include "helper.hxx" - -#include "libxml/tree.h" -#include "libxml/parser.h" -#ifndef XMLSEC_NO_XSLT -#include "libxslt/xslt.h" -#endif - -#include "securityenvironment_nssimpl.hxx" -#include "xmlelementwrapper_xmlsecimpl.hxx" - -#include "nspr.h" -#include "prtypes.h" - -#include "pk11func.h" -#include "cert.h" -#include "cryptohi.h" -#include "certdb.h" -#include "nss.h" - -#include "xmlsec/strings.h" -#include "xmlsec/xmltree.h" - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace ::rtl ; -using namespace ::cppu ; -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::io ; -using namespace ::com::sun::star::ucb ; -using namespace ::com::sun::star::beans ; -using namespace ::com::sun::star::document ; -using namespace ::com::sun::star::lang ; -using namespace ::com::sun::star::registry ; -using namespace ::com::sun::star::xml::wrapper ; -using namespace ::com::sun::star::xml::crypto ; - -int SAL_CALL main( int argc, char **argv ) -{ - CERTCertDBHandle* certHandle ; - PK11SlotInfo* slot = NULL ; - PK11SymKey* symKey = NULL ; - xmlDocPtr doc = NULL ; - xmlNodePtr tplNode ; - xmlNodePtr tarNode ; - FILE* dstFile = NULL ; - - if( argc != 7 ) { - fprintf( stderr, "Usage: %s < CertDir > \n\n" , argv[0] ) ; - return 1 ; - } - - //Init libxml and libxslt libraries - xmlInitParser(); - LIBXML_TEST_VERSION - xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS; - xmlSubstituteEntitiesDefault(1); - - #ifndef XMLSEC_NO_XSLT - xmlIndentTreeOutput = 1; - #endif // XMLSEC_NO_XSLT - - //Initialize NSPR and NSS - PR_Init( PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 1 ) ; - PK11_SetPasswordFunc( PriPK11PasswordFunc ) ; - if( NSS_Init( argv[1] ) != SECSuccess ) { - fprintf( stderr , "### cannot intialize NSS!\n" ) ; - goto done ; - } - - certHandle = CERT_GetDefaultCertDB() ; - slot = PK11_GetInternalKeySlot() ; - - symKey = PK11_KeyGen( slot , CKM_DES3_CBC, NULL, 128, NULL ) ; - if( symKey == NULL ) { - fprintf( stderr , "### cannot create symmetric key!\n" ) ; - goto done ; - } - - //Load XML document - doc = xmlParseFile( argv[2] ) ; - if( doc == NULL || xmlDocGetRootElement( doc ) == NULL ) { - fprintf( stderr , "### Cannot load template xml document!\n" ) ; - goto done ; - } - - //Find the encryption template - tplNode = xmlSecFindNode( xmlDocGetRootElement( doc ), xmlSecNodeEncryptedData, xmlSecEncNs ) ; - if( tplNode == NULL ) { - fprintf( stderr , "### Cannot find the encryption template!\n" ) ; - goto done ; - } - - //Find the encryption template - tarNode = xmlSecFindNode( xmlDocGetRootElement( doc ), ( const unsigned char*)argv[4], ( const unsigned char*)argv[5] ) ; - if( tarNode == NULL ) { - fprintf( stderr , "### Cannot find the encryption target!\n" ) ; - goto done ; - } - - try { - Reference< XMultiComponentFactory > xManager = NULL ; - Reference< XComponentContext > xContext = NULL ; - - xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[6] ) ) ; - - //Create encryption template - Reference< XInterface > tplElement = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ; - OSL_ENSURE( tplElement.is() , - "Encryptor - " - "Cannot get service instance of \"xsec.XMLElementWrapper\"" ) ; - - Reference< XXMLElementWrapper > xTplElement( tplElement , UNO_QUERY ) ; - OSL_ENSURE( xTplElement.is() , - "Encryptor - " - "Cannot get interface of \"XXMLElementWrapper\" from service \"xsec.XMLElementWrapper\"" ) ; - - Reference< XUnoTunnel > xTplEleTunnel( xTplElement , UNO_QUERY ) ; - OSL_ENSURE( xTplEleTunnel.is() , - "Encryptor - " - "Cannot get interface of \"XUnoTunnel\" from service \"xsec.XMLElementWrapper\"" ) ; - - XMLElementWrapper_XmlSecImpl* pTplElement = ( XMLElementWrapper_XmlSecImpl* )xTplEleTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ) ; - OSL_ENSURE( pTplElement != NULL , - "Encryptor - " - "Cannot get implementation of \"xsec.XMLElementWrapper\"" ) ; - - pTplElement->setNativeElement( tplNode ) ; - - //Create encryption target element - Reference< XInterface > tarElement = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ; - OSL_ENSURE( tarElement.is() , - "Encryptor - " - "Cannot get service instance of \"xsec.XMLElementWrapper\"" ) ; - - Reference< XXMLElementWrapper > xTarElement( tarElement , UNO_QUERY ) ; - OSL_ENSURE( xTarElement.is() , - "Encryptor - " - "Cannot get interface of \"XXMLElementWrapper\" from service \"xsec.XMLElementWrapper\"" ) ; - - Reference< XUnoTunnel > xTarEleTunnel( xTarElement , UNO_QUERY ) ; - OSL_ENSURE( xTarEleTunnel.is() , - "Encryptor - " - "Cannot get interface of \"XUnoTunnel\" from service \"xsec.XMLElementWrapper\"" ) ; - - XMLElementWrapper_XmlSecImpl* pTarElement = ( XMLElementWrapper_XmlSecImpl* )xTarEleTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ) ; - OSL_ENSURE( pTarElement != NULL , - "Encryptor - " - "Cannot get implementation of \"xsec.XMLElementWrapper\"" ) ; - - pTarElement->setNativeElement( tarNode ) ; - - - //Build XML Encryption template - Reference< XInterface > enctpl = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLEncryptionTemplate")), xContext ) ; - OSL_ENSURE( enctpl.is() , - "Encryptor - " - "Cannot get service instance of \"xsec.XMLEncryptionTemplate\"" ) ; - - Reference< XXMLEncryptionTemplate > xTemplate( enctpl , UNO_QUERY ) ; - OSL_ENSURE( xTemplate.is() , - "Encryptor - " - "Cannot get interface of \"XXMLEncryptionTemplate\" from service \"xsec.XMLEncryptionTemplate\"" ) ; - - //Import the encryption template - xTemplate->setTemplate( xTplElement ) ; - xTemplate->setTarget( xTarElement ) ; - - //Create security environment - //Build Security Environment - Reference< XInterface > xsecenv = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl")), xContext ) ; - OSL_ENSURE( xsecenv.is() , - "Encryptor - " - "Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ; - - Reference< XSecurityEnvironment > xSecEnv( xsecenv , UNO_QUERY ) ; - OSL_ENSURE( xSecEnv.is() , - "Encryptor - " - "Cannot get interface of \"XSecurityEnvironment\" from service \"xsec.SecurityEnvironment\"" ) ; - - //Setup key slot and certDb - Reference< XUnoTunnel > xEnvTunnel( xsecenv , UNO_QUERY ) ; - OSL_ENSURE( xEnvTunnel.is() , - "Encryptor - " - "Cannot get interface of \"XUnoTunnel\" from service \"xsec.SecurityEnvironment\"" ) ; - - SecurityEnvironment_NssImpl* pSecEnv = ( SecurityEnvironment_NssImpl* )xEnvTunnel->getSomething( SecurityEnvironment_NssImpl::getUnoTunnelId() ) ; - OSL_ENSURE( pSecEnv != NULL , - "Encryptor - " - "Cannot get implementation of \"xsec.SecurityEnvironment\"" ) ; - - pSecEnv->setCryptoSlot( slot ) ; - pSecEnv->setCertDb( certHandle ) ; - pSecEnv->adoptSymKey( symKey ) ; - - - //Build XML Security Context - Reference< XInterface > xmlsecctx = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_NssImpl")), xContext ) ; - OSL_ENSURE( xmlsecctx.is() , - "Encryptor - " - "Cannot get service instance of \"xsec.XMLSecurityContext\"" ) ; - - Reference< XXMLSecurityContext > xSecCtx( xmlsecctx , UNO_QUERY ) ; - OSL_ENSURE( xSecCtx.is() , - "Encryptor - " - "Cannot get interface of \"XXMLSecurityContext\" from service \"xsec.XMLSecurityContext\"" ) ; - - xSecCtx->setSecurityEnvironment( xSecEnv ) ; - - //Get encrypter - Reference< XInterface > xmlencrypter = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLEncryption_NssImpl")), xContext ) ; - OSL_ENSURE( xmlencrypter.is() , - "Encryptor - " - "Cannot get service instance of \"xsec.XMLEncryption\"" ) ; - - Reference< XXMLEncryption > xEncrypter( xmlencrypter , UNO_QUERY ) ; - OSL_ENSURE( xEncrypter.is() , - "Encryptor - " - "Cannot get interface of \"XXMLEncryption\" from service \"xsec.XMLEncryption\"" ) ; - - //perform encryption - xTemplate = xEncrypter->encrypt( xTemplate , xSecCtx ) ; - OSL_ENSURE( xTemplate.is() , - "Encryptor - " - "Cannot encrypt the xml document" ) ; - } catch( Exception& e ) { - fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ; - goto done ; - } - - dstFile = fopen( argv[3], "w" ) ; - if( dstFile == NULL ) { - fprintf( stderr , "### Can not open file %s\n", argv[3] ) ; - goto done ; - } - - //Save result - xmlDocDump( dstFile, doc ) ; - -done: - if( dstFile != NULL ) - fclose( dstFile ) ; - - if( symKey != NULL ) { - PK11_FreeSymKey( symKey ) ; - } - - if( slot != NULL ) - PK11_FreeSlot( slot ) ; - - PK11_LogoutAll() ; - NSS_Shutdown() ; - - /* Shutdown libxslt/libxml */ - #ifndef XMLSEC_NO_XSLT - xsltCleanupGlobals(); - #endif /* XMLSEC_NO_XSLT */ - xmlCleanupParser(); - - return 0; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/tools/standalone/csfit/helper.cxx b/xmlsecurity/tools/standalone/csfit/helper.cxx deleted file mode 100644 index 6487f89cf..000000000 --- a/xmlsecurity/tools/standalone/csfit/helper.cxx +++ /dev/null @@ -1,268 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_xmlsecurity.hxx" - -#include "helper.hxx" -#include "osl/diagnose.h" -#include "rtl/ustring.h" -/*#include "libxml/xmlstring.h" -*/ - -/*- - * Helper : create a input stream from a file - */ -Reference< XInputStream > createStreamFromFile( const OUString sFile ) -{ - const sal_Char* pcFile ; - OString aString ; - - aString = OUStringToOString( sFile , RTL_TEXTENCODING_ASCII_US ) ; - pcFile = aString.getStr() ; - if( pcFile != NULL ) { - FILE *f = fopen( pcFile , "rb" ); - Reference< XInputStream > r; - - if( f ) { - fseek( f , 0 , SEEK_END ); - int nLength = ftell( f ); - fseek( f , 0 , SEEK_SET ); - - Sequence seqIn(nLength); - fread( seqIn.getArray() , nLength , 1 , f ); - - r = Reference< XInputStream > ( new OInputStream( seqIn ) ); - fclose( f ); - } - return r; - } else { - return NULL ; - } - - return NULL ; -} - -/*- - * Helper : set a output stream to a file - */ -Reference< XOutputStream > createStreamToFile( const OUString sFile ) -{ - const sal_Char* pcFile ; - OString aString ; - - aString = OUStringToOString( sFile , RTL_TEXTENCODING_ASCII_US ) ; - pcFile = aString.getStr() ; - if( pcFile != NULL ) - return Reference< XOutputStream >( new OOutputStream( pcFile ) ) ; - else - return NULL ; -} - -/*- - * Helper : get service manager and context - */ -Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext >& xContext , OUString sUnoUrl , OUString sRdbUrl ) throw( RuntimeException , Exception ) -{ - Reference< XMultiComponentFactory > xLocalServiceManager = NULL ; - Reference< XComponentContext > xLocalComponentContext = NULL ; - Reference< XMultiComponentFactory > xUsedServiceManager = NULL ; - Reference< XComponentContext > xUsedComponentContext = NULL ; - - OSL_ENSURE( sUnoUrl.getLength() , - "serviceManager - " - "No uno URI specified" ) ; - - OSL_ENSURE( sRdbUrl.getLength() , - "serviceManager - " - "No rdb URI specified" ) ; - - if( sUnoUrl.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "local" ) ) ) { - Reference< XSimpleRegistry > xSimpleRegistry = createSimpleRegistry(); - OSL_ENSURE( xSimpleRegistry.is() , - "serviceManager - " - "Cannot create simple registry" ) ; - - //xSimpleRegistry->open(OUString(RTL_CONSTASCII_USTRINGPARAM("xmlsecurity.rdb")), sal_False, sal_False); - xSimpleRegistry->open(sRdbUrl, sal_True, sal_False); - OSL_ENSURE( xSimpleRegistry->isValid() , - "serviceManager - " - "Cannot open xml security registry rdb" ) ; - - xLocalComponentContext = bootstrap_InitialComponentContext( xSimpleRegistry ) ; - OSL_ENSURE( xLocalComponentContext.is() , - "serviceManager - " - "Cannot create intial component context" ) ; - - xLocalServiceManager = xLocalComponentContext->getServiceManager() ; - OSL_ENSURE( xLocalServiceManager.is() , - "serviceManager - " - "Cannot create intial service manager" ) ; - - /*- - * Because of the exception rasied from - * ucbhelper/source/provider/provconf.cxx, lin 323 - * I do not use the content broker at present - ******************************************************************** - //init ucb - if( ::ucb::ContentBroker::get() == NULL ) { - Reference< lang::XMultiServiceFactory > xSvmg( xLocalServiceManager , UNO_QUERY ) ; - OSL_ENSURE( xLocalServiceManager.is() , - "serviceManager - " - "Cannot get multi-service factory" ) ; - - Sequence< Any > args( 2 ) ; - args[ 0 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY1_LOCAL )) ; - args[ 1 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY2_OFFICE )) ; - if( ! ::ucb::ContentBroker::initialize( xSvmg , args ) ) { - throw RuntimeException( OUString(RTL_CONSTASCII_USTRINGPARAM("Cannot inlitialize ContentBroker")) , Reference< XInterface >() , Any() ) ; - } - } - ********************************************************************/ - - xUsedComponentContext = xLocalComponentContext ; - xUsedServiceManager = xLocalServiceManager ; - } else { - Reference< XComponentContext > xLocalComponentContext = defaultBootstrap_InitialComponentContext() ; - OSL_ENSURE( xLocalComponentContext.is() , - "serviceManager - " - "Cannot create intial component context" ) ; - - Reference< XMultiComponentFactory > xLocalServiceManager = xLocalComponentContext->getServiceManager(); - OSL_ENSURE( xLocalServiceManager.is() , - "serviceManager - " - "Cannot create intial service manager" ) ; - - Reference< XInterface > urlResolver = - xLocalServiceManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.UnoUrlResolver")) , xLocalComponentContext ) ; - OSL_ENSURE( urlResolver.is() , - "serviceManager - " - "Cannot get service instance of \"bridge.UnoUrlResolver\"" ) ; - - Reference< XUnoUrlResolver > xUnoUrlResolver( urlResolver , UNO_QUERY ) ; - OSL_ENSURE( xUnoUrlResolver.is() , - "serviceManager - " - "Cannot get interface of \"XUnoUrlResolver\" from service \"bridge.UnoUrlResolver\"" ) ; - - Reference< XInterface > initialObject = xUnoUrlResolver->resolve( sUnoUrl ) ; - OSL_ENSURE( initialObject.is() , - "serviceManager - " - "Cannot resolve uno url" ) ; - - /*- - * Method 1: with Naming Service - ******************************************************************** - Reference< XNamingService > xNamingService( initialObject , UNO_QUERY ) ; - OSL_ENSURE( xNamingService.is() , - "serviceManager - " - "Cannot get interface of \"XNamingService\" from URL resolver" ) ; - - Reference< XInterface > serviceManager = - xNamingService->getRegisteredObject( OUString(RTL_CONSTASCII_USTRINGPARAM("StarOffice.ServiceManager")) ) ; - OSL_ENSURE( serviceManager.is() , - "serviceManager - " - "Cannot get service instance of \"StarOffice.ServiceManager\"" ) ; - - xUsedServiceManager = Reference< XMultiComponentFactory >( serviceManager , UNO_QUERY ); - OSL_ENSURE( xUsedServiceManager.is() , - "serviceManager - " - "Cannot get interface of \"XMultiComponentFactory\" from service \"StarOffice.ServiceManager\"" ) ; - - Reference< XPropertySet > xPropSet( xUsedServiceManager , UNO_QUERY ) ; - OSL_ENSURE( xPropSet.is() , - "serviceManager - " - "Cannot get interface of \"XPropertySet\" from service \"StarOffice.ServiceManager\"" ) ; - - xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xUsedComponentContext ; - OSL_ENSURE( xUsedComponentContext.is() , - "serviceManager - " - "Cannot create remote component context" ) ; - - ********************************************************************/ - - /*- - * Method 2: with Componnent context - ******************************************************************** - Reference< XPropertySet > xPropSet( initialObject , UNO_QUERY ) ; - OSL_ENSURE( xPropSet.is() , - "serviceManager - " - "Cannot get interface of \"XPropertySet\" from URL resolver" ) ; - - xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xUsedComponentContext ; - OSL_ENSURE( xUsedComponentContext.is() , - "serviceManager - " - "Cannot create remote component context" ) ; - - xUsedServiceManager = xUsedComponentContext->getServiceManager(); - OSL_ENSURE( xUsedServiceManager.is() , - "serviceManager - " - "Cannot create remote service manager" ) ; - ********************************************************************/ - - /*- - * Method 3: with Service Manager - ********************************************************************/ - xUsedServiceManager = Reference< XMultiComponentFactory >( initialObject , UNO_QUERY ); - OSL_ENSURE( xUsedServiceManager.is() , - "serviceManager - " - "Cannot create remote service manager" ) ; - - Reference< XPropertySet > xPropSet( xUsedServiceManager , UNO_QUERY ) ; - OSL_ENSURE( xPropSet.is() , - "serviceManager - " - "Cannot get interface of \"XPropertySet\" from service \"StarOffice.ServiceManager\"" ) ; - - xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xUsedComponentContext ; - OSL_ENSURE( xUsedComponentContext.is() , - "serviceManager - " - "Cannot create remote component context" ) ; - /********************************************************************/ - } - - xContext = xUsedComponentContext ; - return xUsedServiceManager ; -} - -char* PriPK11PasswordFunc( - PK11SlotInfo *slot , - PRBool retry , - void* arg -) { - char* passwd = NULL ; - - if( retry != PR_TRUE ) { - passwd = ( char* )PORT_Alloc( 20 ) ; - printf( "Input Password:\n" ) ; - scanf( "%s" , passwd ) ; - printf( "The passwod is [%s]\n" , passwd ) ; - } - - return passwd ; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/tools/standalone/csfit/helper.hxx b/xmlsecurity/tools/standalone/csfit/helper.hxx deleted file mode 100644 index a8d52fbb1..000000000 --- a/xmlsecurity/tools/standalone/csfit/helper.hxx +++ /dev/null @@ -1,241 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include -/*#include -*/ - -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -using namespace ::rtl ; -using namespace ::cppu ; -using namespace ::com::sun::star ; -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::io ; -using namespace ::com::sun::star::ucb ; -using namespace ::com::sun::star::beans ; -using namespace ::com::sun::star::document ; -using namespace ::com::sun::star::lang ; -using namespace ::com::sun::star::bridge ; -using namespace ::com::sun::star::registry ; -using namespace ::com::sun::star::task ; -using namespace ::com::sun::star::xml ; -using namespace ::com::sun::star::xml::wrapper ; -using namespace ::com::sun::star::xml::sax ; - - -/** - * Helper: Implementation of XInputStream - */ -class OInputStream : public WeakImplHelper1 < XInputStream > -{ - public: - OInputStream( const Sequence< sal_Int8 >&seq ) : m_seq( seq ), nPos( 0 ) {} - - virtual sal_Int32 SAL_CALL readBytes( - Sequence< sal_Int8 >& aData , - sal_Int32 nBytesToRead - ) throw( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException ) - { - nBytesToRead = ( nBytesToRead > m_seq.getLength() - nPos ) ? - m_seq.getLength() - nPos : - nBytesToRead ; - aData = Sequence< sal_Int8 > ( &( m_seq.getConstArray()[nPos] ), nBytesToRead ) ; - nPos += nBytesToRead ; - return nBytesToRead ; - } - - virtual sal_Int32 SAL_CALL readSomeBytes( - ::com::sun::star::uno::Sequence< sal_Int8 >& aData , - sal_Int32 nMaxBytesToRead - ) throw( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException ) - { - return readBytes( aData, nMaxBytesToRead ) ; - } - - virtual void SAL_CALL skipBytes( - sal_Int32 nBytesToSkip - ) throw( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException ) - { - // not implemented - } - - virtual sal_Int32 SAL_CALL available( - void - ) throw( NotConnectedException, IOException, RuntimeException ) - { - return m_seq.getLength() - nPos ; - } - - virtual void SAL_CALL closeInput( - void - ) throw( NotConnectedException, IOException, RuntimeException ) - { - // not needed - } - - private: - sal_Int32 nPos; - Sequence< sal_Int8> m_seq; -} ; - -/** - * Helper : create a input stream from a file - */ -Reference< XInputStream > createStreamFromFile( const OUString sFile ) ; - -/** - * Helper: Implementation of XOutputStream - */ -class OOutputStream : public WeakImplHelper1 < XOutputStream > -{ - public: - OOutputStream( const char *pcFile ) { - strcpy( m_pcFile , pcFile ) ; - m_f = 0 ; - } - - virtual void SAL_CALL writeBytes( - const Sequence< sal_Int8 >& aData - ) throw( NotConnectedException , BufferSizeExceededException , RuntimeException ) { - if( !m_f ) { - m_f = fopen( m_pcFile , "w" ) ; - } - - fwrite( aData.getConstArray() , 1 , aData.getLength() , m_f ) ; - } - - virtual void SAL_CALL flush( - void - ) throw( NotConnectedException , BufferSizeExceededException , RuntimeException ) { - fflush( m_f ) ; - } - - virtual void SAL_CALL closeOutput( - void - ) throw( NotConnectedException , BufferSizeExceededException , RuntimeException ) { - fclose( m_f ) ; - m_f = 0 ; - } - - private: - char m_pcFile[256]; - FILE *m_f; -} ; - -/** - * Helper: Implementation of XUriBinding - */ -class OUriBinding : public WeakImplHelper1 < ::com::sun::star::xml::crypto::XUriBinding > -{ - public: - OUriBinding() { - //Do nothing - } - - OUriBinding( - ::rtl::OUString& aUri, - ::com::sun::star::uno::Reference< com::sun::star::io::XInputStream >& aInputStream ) { - m_vUris.push_back( aUri ) ; - m_vStreams.push_back( aInputStream ) ; - } - - virtual void SAL_CALL setUriBinding( - const ::rtl::OUString& aUri , - const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& aInputStream - ) throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException ) { - m_vUris.push_back( aUri ) ; - m_vStreams.push_back( aInputStream ) ; - } - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getUriBinding( const ::rtl::OUString& uri ) throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException ) { - ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > xInputStream ; - - int size = m_vUris.size() ; - for( int i = 0 ; i m_vUris ; - std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > > m_vStreams ; -} ; - -/** - * Helper : set a output stream to a file - */ -Reference< XOutputStream > createStreamToFile( const OUString sFile ) ; - -/** - * Helper : get service manager and context - */ -Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext >& xContext , OUString sUnoUrl , OUString sRdbUrl ) throw( RuntimeException , Exception ) ; - -/** - * Helper : Get password function for PKCS11 slot - */ -char* PriPK11PasswordFunc( PK11SlotInfo *slot , PRBool retry , void* arg ) ; - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/tools/standalone/csfit/makefile.mk b/xmlsecurity/tools/standalone/csfit/makefile.mk deleted file mode 100644 index 36efa47ff..000000000 --- a/xmlsecurity/tools/standalone/csfit/makefile.mk +++ /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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=xmlsecurity -TARGET=xmlsecurity-cxsfit -ENABLE_EXCEPTIONS=TRUE -NO_BSYMBOLIC=TRUE -TARGETTYPE=CUI -LIBTARGET=NO - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/target.pmk - - -.IF "$(CRYPTO_ENGINE)" == "nss" - -MOZ_INC = $(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla -NSS_INC = $(MOZ_INC)$/nss -NSPR_INC = $(MOZ_INC)$/nspr - -CDEFS += -DXMLSEC_CRYPTO_NSS -DXMLSEC_NO_XSLT -SOLARINC += \ - -I$(MOZ_INC) \ - -I$(NSPR_INC) \ - -I$(NSS_INC) \ - -I$(PRJ)$/source$/xmlsec \ - -I$(PRJ)$/source$/xmlsec$/nss - -# --- Files -------------------------------------------------------- - -SHARE_LIBS = \ - $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(SALHELPERLIB) \ - $(SALLIB) - -.IF "$(GUI)"=="WNT" -SHARE_LIBS+= "ixml2.lib" "nss3.lib" "nspr4.lib" "libxmlsec.lib" "libxmlsec-nss.lib" "xsec_xmlsec.lib" -.ELSE -SHARE_LIBS+= "-lxml2" "-lnss3" "-lnspr4" "-lxmlsec1" "-lxmlsec1-nss" "-lxsec_xmlsec" -.ENDIF - -SHARE_OBJS = \ - $(OBJ)$/helper.obj - -# -# The 1st application -# - -APP2TARGET= signer -APP2OBJS= \ - $(SHARE_OBJS) \ - $(OBJ)$/signer.obj - -.IF "$(OS)" == "LINUX" -APP2STDLIBS+= -lstdc++ -.ENDIF - -APP2STDLIBS+= \ - $(SHARE_LIBS) - -# -# The 2nd application -# -APP3TARGET= encrypter -APP3OBJS= \ - $(SHARE_OBJS) \ - $(OBJ)$/encrypter.obj - -.IF "$(OS)" == "LINUX" -APP3STDLIBS+= -lstdc++ -.ENDIF - -APP3STDLIBS+= \ - $(SHARE_LIBS) - -# -# The 3rd application -# -APP4TARGET= verifier -APP4OBJS= \ - $(SHARE_OBJS) \ - $(OBJ)$/verifier.obj - -.IF "$(OS)" == "LINUX" -APP4STDLIBS+= -lstdc++ -.ENDIF - -APP4STDLIBS+= \ - $(SHARE_LIBS) - -# -# The 4th application -# -APP5TARGET= decrypter -APP5OBJS= \ - $(SHARE_OBJS) \ - $(OBJ)$/decrypter.obj - -.IF "$(OS)" == "LINUX" -APP5STDLIBS+= -lstdc++ -.ENDIF - -APP5STDLIBS+= \ - $(SHARE_LIBS) - -# -# The 5th application -# -APP6TARGET= certmngr -APP6OBJS= \ - $(SHARE_OBJS) \ - $(OBJ)$/certmngr.obj - -.IF "$(OS)" == "LINUX" -APP6STDLIBS+= -lstdc++ -.ENDIF - -APP6STDLIBS+= \ - $(SHARE_LIBS) - -.ENDIF - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/xmlsecurity/tools/standalone/csfit/signer.cxx b/xmlsecurity/tools/standalone/csfit/signer.cxx deleted file mode 100644 index 0dfcc48c4..000000000 --- a/xmlsecurity/tools/standalone/csfit/signer.cxx +++ /dev/null @@ -1,372 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_xmlsecurity.hxx" - -#include -#include "helper.hxx" - -#include "libxml/tree.h" -#include "libxml/parser.h" -#ifndef XMLSEC_NO_XSLT -#include "libxslt/xslt.h" -#endif - -#include "securityenvironment_nssimpl.hxx" -#include "xmlelementwrapper_xmlsecimpl.hxx" - -#include "nspr.h" -#include "prtypes.h" - -#include "pk11func.h" -#include "cert.h" -#include "cryptohi.h" -#include "certdb.h" -#include "nss.h" - -#include "xmlsec/strings.h" -#include "xmlsec/xmltree.h" - -#include - -#include -#include -#include -#include -#include -#include -#include - -using namespace ::rtl ; -using namespace ::cppu ; -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::io ; -using namespace ::com::sun::star::ucb ; -using namespace ::com::sun::star::beans ; -using namespace ::com::sun::star::document ; -using namespace ::com::sun::star::lang ; -using namespace ::com::sun::star::xml::wrapper ; -using namespace ::com::sun::star::xml::crypto ; - - -int SAL_CALL main( int argc, char **argv ) -{ - CERTCertDBHandle* certHandle ; - PK11SlotInfo* slot ; - xmlDocPtr doc ; - xmlNodePtr tplNode ; - xmlNodePtr tarNode ; - xmlAttrPtr idAttr ; - xmlChar* idValue ; - xmlAttrPtr uriAttr ; - xmlChar* uriValue ; - OUString* uri ; - Reference< XUriBinding > xUriBinding ; - FILE* dstFile ; - - if( argc != 5 ) { - fprintf( stderr, "Usage: %s < CertDir > \n\n" , argv[0] ) ; - return 1 ; - } - - for( int hhh = 0 ; hhh < 10 ; hhh ++ ) { - slot = NULL ; - doc = NULL ; - uri = NULL ; - dstFile = NULL ; - - - //Init libxml and libxslt libraries - xmlInitParser(); - LIBXML_TEST_VERSION - xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS; - xmlSubstituteEntitiesDefault(1); - - #ifndef XMLSEC_NO_XSLT - xmlIndentTreeOutput = 1; - #endif // XMLSEC_NO_XSLT - - - //Initialize NSPR and NSS - PR_Init( PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 1 ) ; - PK11_SetPasswordFunc( PriPK11PasswordFunc ) ; - if( NSS_Init( argv[1] ) != SECSuccess ) { - fprintf( stderr , "### cannot intialize NSS!\n" ) ; - goto done ; - } - - certHandle = CERT_GetDefaultCertDB() ; - slot = PK11_GetInternalKeySlot() ; - - if( PK11_NeedLogin( slot ) ) { - SECStatus nRet = PK11_Authenticate( slot, PR_TRUE, NULL ); - if( nRet != SECSuccess ) { - fprintf( stderr , "### cannot authehticate the crypto token!\n" ) ; - goto done ; - } - } - - //Load XML document - doc = xmlParseFile( argv[2] ) ; - if( doc == NULL || xmlDocGetRootElement( doc ) == NULL ) { - fprintf( stderr , "### Cannot load template xml document!\n" ) ; - goto done ; - } - - //Find the signature template - tplNode = xmlSecFindNode( xmlDocGetRootElement( doc ), xmlSecNodeSignature, xmlSecDSigNs ) ; - if( tplNode == NULL ) { - fprintf( stderr , "### Cannot find the signature template!\n" ) ; - goto done ; - } - - //Find the element with ID attribute - //Here we only try to find the "document" node. - tarNode = xmlSecFindNode( xmlDocGetRootElement( doc ), ( xmlChar* )"document", ( xmlChar* )"http://openoffice.org/2000/office" ) ; - if( tarNode == NULL ) { - tarNode = xmlSecFindNode( xmlDocGetRootElement( doc ), ( xmlChar* )"document", NULL ) ; - } - - //Find the "id" attrbute in the element - if( tarNode != NULL ) { - if( ( idAttr = xmlHasProp( tarNode, ( xmlChar* )"id" ) ) != NULL ) { - //NULL - } else if( ( idAttr = xmlHasProp( tarNode, ( xmlChar* )"Id" ) ) != NULL ) { - //NULL - } else { - idAttr = NULL ; - } - } - - //Add ID to DOM - if( idAttr != NULL ) { - idValue = xmlNodeListGetString( tarNode->doc, idAttr->children, 1 ) ; - if( idValue == NULL ) { - fprintf( stderr , "### the ID value is NULL!\n" ) ; - goto done ; - } - - if( xmlAddID( NULL, doc, idValue, idAttr ) == NULL ) { - fprintf( stderr , "### Can not add the ID value!\n" ) ; - goto done ; - } - } - - //Reference handler - //Find the signature reference - tarNode = xmlSecFindNode( tplNode, xmlSecNodeReference, xmlSecDSigNs ) ; - if( tarNode == NULL ) { - fprintf( stderr , "### Cannot find the signature reference!\n" ) ; - goto done ; - } - - //Find the "URI" attrbute in the reference - uriAttr = xmlHasProp( tarNode, ( xmlChar* )"URI" ) ; - if( tarNode == NULL ) { - fprintf( stderr , "### Cannot find URI of the reference!\n" ) ; - goto done ; - } - - //Get the "URI" attrbute value - uriValue = xmlNodeListGetString( tarNode->doc, uriAttr->children, 1 ) ; - if( uriValue == NULL ) { - fprintf( stderr , "### the URI value is NULL!\n" ) ; - goto done ; - } - - if( strchr( ( const char* )uriValue, '/' ) != NULL && strchr( ( const char* )uriValue, '#' ) == NULL ) { - fprintf( stdout , "### Find a stream URI [%s]\n", uriValue ) ; - // uri = new ::rtl::OUString( ( const sal_Unicode* )uriValue ) ; - uri = new ::rtl::OUString( ( const sal_Char* )uriValue, xmlStrlen( uriValue ), RTL_TEXTENCODING_ASCII_US ) ; - } - - if( uri != NULL ) { - fprintf( stdout , "### Find the URI [%s]\n", OUStringToOString( *uri , RTL_TEXTENCODING_ASCII_US ).getStr() ) ; - Reference< XInputStream > xStream = createStreamFromFile( *uri ) ; - if( !xStream.is() ) { - fprintf( stderr , "### Can not get the URI stream!\n" ) ; - goto done ; - } - - xUriBinding = new OUriBinding( *uri, xStream ) ; - } - - try { - Reference< XMultiComponentFactory > xManager = NULL ; - Reference< XComponentContext > xContext = NULL ; - - xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[4] ) ) ; - OSL_ENSURE( xManager.is() , - "ServicesManager - " - "Cannot get service manager" ) ; - - //Create signature template - Reference< XInterface > element = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ; - OSL_ENSURE( element.is() , - "Signer - " - "Cannot get service instance of \"wrapper.XMLElementWrapper\"" ) ; - - Reference< XXMLElementWrapper > xElement( element , UNO_QUERY ) ; - OSL_ENSURE( xElement.is() , - "Signer - " - "Cannot get interface of \"XXMLElement\" from service \"xsec.XMLElement\"" ) ; - - Reference< XUnoTunnel > xEleTunnel( xElement , UNO_QUERY ) ; - OSL_ENSURE( xEleTunnel.is() , - "Signer - " - "Cannot get interface of \"XUnoTunnel\" from service \"xsec.XMLElement\"" ) ; - - XMLElementWrapper_XmlSecImpl* pElement = ( XMLElementWrapper_XmlSecImpl* )xEleTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ) ; - OSL_ENSURE( pElement != NULL , - "Signer - " - "Cannot get implementation of \"xsec.XMLElement\"" ) ; - - //Set signature template - pElement->setNativeElement( tplNode ) ; - - //Build XML Signature template - Reference< XInterface > signtpl = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLSignatureTemplate")) , xContext ) ; - OSL_ENSURE( signtpl.is() , - "Signer - " - "Cannot get service instance of \"xsec.XMLSignatureTemplate\"" ) ; - - Reference< XXMLSignatureTemplate > xTemplate( signtpl , UNO_QUERY ) ; - OSL_ENSURE( xTemplate.is() , - "Signer - " - "Cannot get interface of \"XXMLSignatureTemplate\" from service \"xsec.XMLSignatureTemplate\"" ) ; - - //Import the signature template - xTemplate->setTemplate( xElement ) ; - - //Import the URI/Stream binding - if( xUriBinding.is() ) - xTemplate->setBinding( xUriBinding ) ; - - //Create security environment - //Build Security Environment - Reference< XInterface > xsecenv = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl")), xContext ) ; - OSL_ENSURE( xsecenv.is() , - "Signer - " - "Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ; - - Reference< XSecurityEnvironment > xSecEnv( xsecenv , UNO_QUERY ) ; - OSL_ENSURE( xSecEnv.is() , - "Signer - " - "Cannot get interface of \"XSecurityEnvironment\" from service \"xsec.SecurityEnvironment\"" ) ; - - //Setup key slot and certDb - Reference< XUnoTunnel > xEnvTunnel( xsecenv , UNO_QUERY ) ; - OSL_ENSURE( xElement.is() , - "Signer - " - "Cannot get interface of \"XUnoTunnel\" from service \"xsec.SecurityEnvironment\"" ) ; - - SecurityEnvironment_NssImpl* pSecEnv = ( SecurityEnvironment_NssImpl* )xEnvTunnel->getSomething( SecurityEnvironment_NssImpl::getUnoTunnelId() ) ; - OSL_ENSURE( pSecEnv != NULL , - "Signer - " - "Cannot get implementation of \"xsec.SecurityEnvironment\"" ) ; - - pSecEnv->setCryptoSlot( slot ) ; - pSecEnv->setCertDb( certHandle ) ; - - //Build XML Security Context - Reference< XInterface > xmlsecctx = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_NssImpl")), xContext ) ; - OSL_ENSURE( xsecenv.is() , - "Signer - " - "Cannot get service instance of \"xsec.XMLSecurityContext\"" ) ; - - Reference< XXMLSecurityContext > xSecCtx( xmlsecctx , UNO_QUERY ) ; - OSL_ENSURE( xSecCtx.is() , - "Signer - " - "Cannot get interface of \"XXMLSecurityContext\" from service \"xsec.XMLSecurityContext\"" ) ; - - xSecCtx->setSecurityEnvironment( xSecEnv ) ; - - //Generate XML signature - Reference< XInterface > xmlsigner = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_NssImpl")), xContext ) ; - OSL_ENSURE( xmlsigner.is() , - "Signer - " - "Cannot get service instance of \"xsec.XMLSignature\"" ) ; - - Reference< XXMLSignature > xSigner( xmlsigner , UNO_QUERY ) ; - OSL_ENSURE( xSigner.is() , - "Signer - " - "Cannot get interface of \"XXMLSignature\" from service \"xsec.XMLSignature\"" ) ; - - //perform signature - xTemplate = xSigner->generate( xTemplate , xSecCtx ) ; - OSL_ENSURE( xTemplate.is() , - "Signer - " - "Cannot generate the xml signature" ) ; - } catch( Exception& e ) { - fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ; - goto done ; - } - - dstFile = fopen( argv[3], "w" ) ; - if( dstFile == NULL ) { - fprintf( stderr , "### Can not open file %s\n", argv[3] ) ; - goto done ; - } - - //Save result - xmlDocDump( dstFile, doc ) ; - -done: - if( uri != NULL ) - delete uri ; - - if( dstFile != NULL ) - fclose( dstFile ) ; - - if( doc != NULL ) - xmlFreeDoc( doc ) ; - - if( slot != NULL ) - PK11_FreeSlot( slot ) ; - - PK11_LogoutAll() ; - NSS_Shutdown() ; - - /* Shutdown libxslt/libxml */ - #ifndef XMLSEC_NO_XSLT - xsltCleanupGlobals(); - #endif /* XMLSEC_NO_XSLT */ - xmlCleanupParser(); - - } - - return 0; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/tools/standalone/csfit/util/makefile.mk b/xmlsecurity/tools/standalone/csfit/util/makefile.mk deleted file mode 100644 index ee030fd35..000000000 --- a/xmlsecurity/tools/standalone/csfit/util/makefile.mk +++ /dev/null @@ -1,174 +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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/..$/..$/.. - -PRJNAME=xmlsecurity -TARGET=xmlsecurity-secfit-boot -TARGETTYPE=GUI - -GEN_HID=TRUE -APP2NOSAL=TRUE - -# --- Settings ----------------------------------------------------------- -USE_JAVAVER=TRUE - -.INCLUDE : settings.mk - -VERINFONAME=verinfo - -.INCLUDE : target.mk -.INCLUDE : $(PRJ)$/util$/target.pmk - -# ------------------------------------------------------------------------- -# --- Targets ------------------------------------------------------------- - -ALLTAR : $(BIN)$/boot_services.rdb - -REGISTERLIBS= \ - i18npool.uno$(DLLPOST) \ - $(DLLPRE)tk$(DLLPOSTFIX)$(DLLPOST) \ - $(DLLPRE)mcnttype$(DLLPOST) - -# $(DLLPRE)i18n$(DLLPOSTFIX)$(DLLPOST) \ -# $(DLLPRE)i18npool$(DLLPOSTFIX)$(DLLPOST) \ -# $(DLLPRE)tk$(DLLPOSTFIX)$(DLLPOST) \ -# $(DLLPRE)mcnttype$(DLLPOST) - -# Additional libraries -DLLPRE_NO= -REGISTERLIBS+= \ - $(DLLPRE_NO)dynamicloader.uno$(DLLPOST) \ - $(DLLPRE_NO)namingservice.uno$(DLLPOST) \ - $(DLLPRE_NO)bootstrap.uno$(DLLPOST) \ - $(DLLPRE)xsec_fw$(DLLPOST) \ - $(DLLPRE)xsec_xmlsec$(DLLPOST) - -.IF "$(GUI)" == "UNX" -MY_DLLDIR=$(SOLARLIBDIR) -REGISTERLIBS+= \ - $(DLLPRE)dtransX11$(DLLPOSTFIX)$(DLLPOST) - -.ELSE # "$(GUI)" == "UNX" -.IF "$(GUI)"=="WNT" - -MY_DLLDIR=$(SOLARBINDIR) -REGISTERLIBS+= \ - $(DLLPRE)sysdtrans$(DLLPOST) \ - $(DLLPRE)ftransl$(DLLPOST) \ - $(DLLPRE)dnd$(DLLPOST) - -.ELSE # "$(GUI)"=="WNT" - - @echo "**********************************************************" - @echo "*** unknown platform: don't know which librarys to use ***" - @echo "**********************************************************" - force_dmake_to_error -.ENDIF # "$(GUI)"=="WNT" -.ENDIF # "$(GUI)" == "UNX" - -.IF "$(SOLAR_JAVA)" != "" -.IF "$(JAVANUMVER)" >= "000100040000" -# native libraries, which are only necessary, when java shall run within setup -REGISTERLIBS_JAVA= \ - javavm.uno$(DLLPOST) \ - javaloader.uno$(DLLPOST) - -# add here java components, which shall run with setup -REGISTERJARS=\ - java_uno_accessbridge.jar -# xsec_jxsec.jar - -# jar-files, which regcomp needs so that it can use java -REGCOMP_JARS=unoil.jar java_uno.jar ridl.jar jurt.jar juh.jar - -# CLASSPATH, which regcomp needs to be run -# $(SOLARLIBDIR) needs to be included in case Java components are registered, -# because java_uno.jar needs to find the native java_uno shared library: -MY_CLASSPATH_TMP=$(foreach,i,$(REGCOMP_JARS) $(SOLARBINDIR)$/$i)$(PATH_SEPERATOR)$(SOLARLIBDIR)$(PATH_SEPERATOR)$(XCLASSPATH) -REGCOMP_CLASSPATH=$(strip $(subst,!,$(PATH_SEPERATOR) $(MY_CLASSPATH_TMP:s/ /!/))) - -.IF "$(GUI)"!="WNT" -DOLLAR_SIGN=\$$ -MY_JAVA_COMPPATH=file://$(SOLARBINDIR) -.IF "$(OS)"=="MACOSX" -REGCOMP_ENV=\ - setenv CLASSPATH $(REGCOMP_CLASSPATH) && \ - setenv DYLD_LIBRARY_PATH $(DYLD_LIBRARY_PATH):$(JDKLIB) -.ELSE -REGCOMP_ENV=\ - setenv CLASSPATH $(REGCOMP_CLASSPATH) && \ - setenv LD_LIBRARY_PATH $(LD_LIBRARY_PATH):$(JDKLIB) -.ENDIF -.ELSE # "$(GUI)" != "WNT" -.IF "$(USE_SHELL)" != "4nt" -DOLLAR_SIGN=\$$ -REGCOMP_ENV=\ - setenv CLASSPATH "$(strip $(subst,\,/ $(shell @guw.pl echo $(REGCOMP_CLASSPATH))))" && \ - setenv PATH "$(PATH):$(JREPATH)" -MY_JAVA_COMPPATH=$(strip $(subst,\,/ file:///$(shell @guw.pl echo $(SOLARBINDIR)))) -.ELSE # "$(USE_SHELL)" != "4nt" -DOLLAR_SIGN=$$ -REGCOMP_ENV=\ - set CLASSPATH=$(REGCOMP_CLASSPATH) && \ - set PATH=$(PATH);$(JREPATH) -MY_JAVA_COMPPATH=$(strip $(subst,\,/ file:///$(SOLARBINDIR))) -.ENDIF # "$(USE_SHELL)" != "4nt" -.ENDIF # "$(GUI)"!="WNT" -.ENDIF # "$(JAVANUMVER)" >= "000100040000" -.ENDIF # "$(SOLAR_JAVA)" != "" - -$(BIN)$/boot_services.rdb: \ - makefile.mk \ - $(foreach,i,$(REGISTERLIBS) $(MY_DLLDIR)$/$(i)) \ - $(foreach,i,$(REGISTERLIBS_JAVA) $(MY_DLLDIR)$/$(i)) - -rm -f $@ $(BIN)$/regcomp.rdb $(BIN)$/boot_services.tmp -# register the native libraries - $(REGCOMP) -register -r $(BIN)$/boot_services.tmp -c "$(strip $(REGISTERLIBS))" -.IF "$(SOLAR_JAVA)" != "" -.IF "$(OS)"!="MACOSX" -.IF "$(JAVANUMVER)" >= "000100040000" - $(REGCOMP) -register -r $(BIN)$/boot_services.tmp -c "$(strip $(REGISTERLIBS_JAVA))" -# prepare a registry which regcomp can work on (types+java services) - $(REGCOMP) -register -r $(BIN)$/regcomp.rdb -c "$(strip $(REGISTERLIBS_JAVA))" - $(REGMERGE) $(BIN)$/regcomp.rdb / $(SOLARBINDIR)/udkapi.rdb -# now do the registration - $(REGCOMP_ENV) && \ - $(REGCOMP) -br $(BIN)$/regcomp.rdb \ - -register \ - -r $(BIN)$/boot_services.tmp \ - -l com.sun.star.loader.Java2 \ - -env:UNO_JAVA_COMPPATH=$(MY_JAVA_COMPPATH) \ - $(foreach,i,$(REGISTERJARS) -c vnd.sun.star.expand:$(DOLLAR_SIGN)UNO_JAVA_COMPPATH/$(i)) -# $(foreach,i,$(REGISTERJARS) -c vnd.sun.star.expand:$(DOLLAR_SIGN)UNO_JAVA_COMPPATH/$(i)) -c $(MY_JAVA_COMPPATH)$/xsec_jxsec.jar - -.ENDIF # "$(JAVANUMVER)" >= "000100040000" -.ENDIF # "$(OS)" != "MACOSX" -.ENDIF # "$(SOLAR_JAVA)" != "" -# to have a transaction, move it now to the final name - $(REGMERGE) $(BIN)$/boot_services.tmp / $(SOLARBINDIR)/types.rdb - mv $(BIN)$/boot_services.tmp $@ - diff --git a/xmlsecurity/tools/standalone/csfit/verifier.cxx b/xmlsecurity/tools/standalone/csfit/verifier.cxx deleted file mode 100644 index caa74beed..000000000 --- a/xmlsecurity/tools/standalone/csfit/verifier.cxx +++ /dev/null @@ -1,342 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_xmlsecurity.hxx" - -#include -#include "helper.hxx" - -#include "libxml/tree.h" -#include "libxml/parser.h" -#ifndef XMLSEC_NO_XSLT -#include "libxslt/xslt.h" -#endif - -#include "securityenvironment_nssimpl.hxx" -#include "xmlelementwrapper_xmlsecimpl.hxx" - -#include "nspr.h" -#include "prtypes.h" - -#include "pk11func.h" -#include "cert.h" -#include "cryptohi.h" -#include "certdb.h" -#include "nss.h" - -#include "xmlsec/strings.h" -#include "xmlsec/xmltree.h" - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace ::rtl ; -using namespace ::cppu ; -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::io ; -using namespace ::com::sun::star::ucb ; -using namespace ::com::sun::star::beans ; -using namespace ::com::sun::star::document ; -using namespace ::com::sun::star::lang ; -using namespace ::com::sun::star::registry ; -using namespace ::com::sun::star::xml::wrapper ; -using namespace ::com::sun::star::xml::crypto ; - - -int SAL_CALL main( int argc, char **argv ) -{ - CERTCertDBHandle* certHandle = NULL ; - PK11SlotInfo* slot = NULL ; - xmlDocPtr doc = NULL ; - xmlNodePtr tplNode ; - xmlNodePtr tarNode ; - xmlAttrPtr idAttr ; - xmlChar* idValue ; - xmlAttrPtr uriAttr ; - xmlChar* uriValue ; - OUString* uri = NULL ; - Reference< XUriBinding > xUriBinding ; - - if( argc != 4 ) { - fprintf( stderr, "Usage: %s < CertDir > \n" , argv[0] ) ; - return 1 ; - } - - //Init libxml and libxslt libraries - xmlInitParser(); - LIBXML_TEST_VERSION - xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS; - xmlSubstituteEntitiesDefault(1); - - #ifndef XMLSEC_NO_XSLT - xmlIndentTreeOutput = 1; - #endif // XMLSEC_NO_XSLT - - - //Initialize NSPR and NSS - PR_Init( PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 1 ) ; - PK11_SetPasswordFunc( PriPK11PasswordFunc ) ; - if( NSS_Init( argv[1] ) != SECSuccess ) { - fprintf( stderr , "### cannot intialize NSS!\n" ) ; - return 1 ; - } - - certHandle = CERT_GetDefaultCertDB() ; - slot = PK11_GetInternalKeySlot() ; - - //Load XML document - doc = xmlParseFile( argv[2] ) ; - if( doc == NULL || xmlDocGetRootElement( doc ) == NULL ) { - fprintf( stderr , "### Cannot load template xml document!\n" ) ; - goto done ; - } - - //Find the signature template - tplNode = xmlSecFindNode( xmlDocGetRootElement( doc ), xmlSecNodeSignature, xmlSecDSigNs ) ; - if( tplNode == NULL ) { - fprintf( stderr , "### Cannot find the signature template!\n" ) ; - goto done ; - } - - //Find the element with ID attribute - tarNode = xmlSecFindNode( xmlDocGetRootElement( doc ), ( xmlChar* )"document", ( xmlChar* )"http://openoffice.org/2000/office" ) ; - if( tarNode == NULL ) { - tarNode = xmlSecFindNode( xmlDocGetRootElement( doc ), ( xmlChar* )"document", NULL ) ; - } - - //Find the "id" attrbute in the element - if( tarNode != NULL ) { - if( ( idAttr = xmlHasProp( tarNode, ( xmlChar* )"id" ) ) != NULL ) { - //NULL - } else if( ( idAttr = xmlHasProp( tarNode, ( xmlChar* )"Id" ) ) != NULL ) { - //NULL - } else { - idAttr = NULL ; - } - } - - //Add ID to DOM - if( idAttr != NULL ) { - idValue = xmlNodeListGetString( tarNode->doc, idAttr->children, 1 ) ; - if( idValue == NULL ) { - fprintf( stderr , "### the ID value is NULL!\n" ) ; - goto done ; - } - - if( xmlAddID( NULL, doc, idValue, idAttr ) == NULL ) { - fprintf( stderr , "### Can not add the ID value!\n" ) ; - goto done ; - } - } - - //Reference handler - //Find the signature reference - tarNode = xmlSecFindNode( tplNode, xmlSecNodeReference, xmlSecDSigNs ) ; - if( tarNode == NULL ) { - fprintf( stderr , "### Cannot find the signature reference!\n" ) ; - goto done ; - } - - //Find the "URI" attrbute in the reference - uriAttr = xmlHasProp( tarNode, ( xmlChar* )"URI" ) ; - if( tarNode == NULL ) { - fprintf( stderr , "### Cannot find URI of the reference!\n" ) ; - goto done ; - } - - //Get the "URI" attrbute value - uriValue = xmlNodeListGetString( tarNode->doc, uriAttr->children, 1 ) ; - if( uriValue == NULL ) { - fprintf( stderr , "### the URI value is NULL!\n" ) ; - goto done ; - } - - if( strchr( ( const char* )uriValue, '/' ) != NULL && strchr( ( const char* )uriValue, '#' ) == NULL ) { - fprintf( stdout , "### Find a stream URI [%s]\n", uriValue ) ; - // uri = new ::rtl::OUString( ( const sal_Unicode* )uriValue ) ; - uri = new ::rtl::OUString( ( const sal_Char* )uriValue, xmlStrlen( uriValue ), RTL_TEXTENCODING_ASCII_US ) ; - } - - if( uri != NULL ) { - fprintf( stdout , "### Find the URI [%s]\n", OUStringToOString( *uri , RTL_TEXTENCODING_ASCII_US ).getStr() ) ; - Reference< XInputStream > xStream = createStreamFromFile( *uri ) ; - if( !xStream.is() ) { - fprintf( stderr , "### Can not get the URI stream!\n" ) ; - goto done ; - } - - xUriBinding = new OUriBinding( *uri, xStream ) ; - } - - - try { - Reference< XMultiComponentFactory > xManager = NULL ; - Reference< XComponentContext > xContext = NULL ; - - xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[3] ) ) ; - - //Create signature template - Reference< XInterface > element = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ; - OSL_ENSURE( element.is() , - "Verifier - " - "Cannot get service instance of \"xsec.XMLElementWrapper\"" ) ; - - Reference< XXMLElementWrapper > xElement( element , UNO_QUERY ) ; - OSL_ENSURE( xElement.is() , - "Verifier - " - "Cannot get interface of \"XXMLElementWrapper\" from service \"xsec.XMLElementWrapper\"" ) ; - - Reference< XUnoTunnel > xEleTunnel( xElement , UNO_QUERY ) ; - OSL_ENSURE( xEleTunnel.is() , - "Verifier - " - "Cannot get interface of \"XUnoTunnel\" from service \"xsec.XMLElement\"" ) ; - - XMLElementWrapper_XmlSecImpl* pElement = ( XMLElementWrapper_XmlSecImpl* )xEleTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ) ; - OSL_ENSURE( pElement != NULL , - "Verifier - " - "Cannot get implementation of \"xsec.XMLElementWrapper\"" ) ; - - //Set signature template - pElement->setNativeElement( tplNode ) ; - - //Build XML Signature template - Reference< XInterface > signtpl = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLSignatureTemplate")), xContext ) ; - OSL_ENSURE( signtpl.is() , - "Verifier - " - "Cannot get service instance of \"xsec.XMLSignatureTemplate\"" ) ; - - Reference< XXMLSignatureTemplate > xTemplate( signtpl , UNO_QUERY ) ; - OSL_ENSURE( xTemplate.is() , - "Verifier - " - "Cannot get interface of \"XXMLSignatureTemplate\" from service \"xsec.XMLSignatureTemplate\"" ) ; - - //Import the signature template - xTemplate->setTemplate( xElement ) ; - - //Import the URI/Stream binding - if( xUriBinding.is() ) - xTemplate->setBinding( xUriBinding ) ; - - //Create security environment - //Build Security Environment - Reference< XInterface > xsecenv = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_NssImpl")), xContext ) ; - OSL_ENSURE( xsecenv.is() , - "Verifier - " - "Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ; - - Reference< XSecurityEnvironment > xSecEnv( xsecenv , UNO_QUERY ) ; - OSL_ENSURE( xSecEnv.is() , - "Verifier - " - "Cannot get interface of \"XSecurityEnvironment\" from service \"xsec.SecurityEnvironment\"" ) ; - - //Setup key slot and certDb - Reference< XUnoTunnel > xEnvTunnel( xsecenv , UNO_QUERY ) ; - OSL_ENSURE( xElement.is() , - "Verifier - " - "Cannot get interface of \"XUnoTunnel\" from service \"xsec.SecurityEnvironment\"" ) ; - - SecurityEnvironment_NssImpl* pSecEnv = ( SecurityEnvironment_NssImpl* )xEnvTunnel->getSomething( SecurityEnvironment_NssImpl::getUnoTunnelId() ) ; - OSL_ENSURE( pSecEnv != NULL , - "Verifier - " - "Cannot get implementation of \"xsec.SecurityEnvironment\"" ) ; - - pSecEnv->setCryptoSlot( slot ) ; - pSecEnv->setCertDb( certHandle ) ; - - //Build XML Security Context - Reference< XInterface > xmlsecctx = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_NssImpl")), xContext ) ; - OSL_ENSURE( xsecenv.is() , - "Verifier - " - "Cannot get service instance of \"xsec.XMLSecurityContext\"" ) ; - - Reference< XXMLSecurityContext > xSecCtx( xmlsecctx , UNO_QUERY ) ; - OSL_ENSURE( xSecCtx.is() , - "Verifier - " - "Cannot get interface of \"XXMLSecurityContext\" from service \"xsec.XMLSecurityContext\"" ) ; - - xSecCtx->setSecurityEnvironment( xSecEnv ) ; - - //Generate XML signature - Reference< XInterface > xmlsigner = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_NssImpl")), xContext ) ; - OSL_ENSURE( xmlsigner.is() , - "Verifier - " - "Cannot get service instance of \"xsec.XMLSignature\"" ) ; - - Reference< XXMLSignature > xSigner( xmlsigner , UNO_QUERY ) ; - OSL_ENSURE( xSigner.is() , - "Verifier - " - "Cannot get interface of \"XXMLSignature\" from service \"xsec.XMLSignature\"" ) ; - - - //perform validation - sal_Bool valid = xSigner->validate( xTemplate , xSecCtx ) ; - if( !valid ) { - printf( "Signature is INVALID!\n" ) ; - } else { - printf( "Signature is VALID!\n" ) ; - } - } catch( Exception& e ) { - fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ; - goto done ; - } - -done : - if( doc != NULL ) - xmlFreeDoc( doc ) ; - - if( slot != NULL ) - PK11_FreeSlot( slot ) ; - - PK11_LogoutAll() ; - NSS_Shutdown() ; - - /* Shutdown libxslt/libxml */ - #ifndef XMLSEC_NO_XSLT - xsltCleanupGlobals(); - #endif /* XMLSEC_NO_XSLT */ - xmlCleanupParser(); - - return 0 ; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/tools/standalone/mscsfit/certmngr.cxx b/xmlsecurity/tools/standalone/mscsfit/certmngr.cxx deleted file mode 100644 index 501a859ee..000000000 --- a/xmlsecurity/tools/standalone/mscsfit/certmngr.cxx +++ /dev/null @@ -1,154 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/** -- C++ Source File -- **/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_xmlsecurity.hxx" -#include -#include "helper.hxx" - -#include "libxml/tree.h" -#include "libxml/parser.h" -#ifndef XMLSEC_NO_XSLT -#include "libxslt/xslt.h" -#endif - -#include "securityenvironment_mscryptimpl.hxx" - -#include - -#include "xmlsec/strings.h" -#include "xmlsec/xmltree.h" -#include "xmlsec/mscrypto/app.h" - -#include - -using namespace ::rtl ; -using namespace ::cppu ; -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::io ; -using namespace ::com::sun::star::ucb ; -using namespace ::com::sun::star::beans ; -using namespace ::com::sun::star::document ; -using namespace ::com::sun::star::lang ; -using namespace ::com::sun::star::security ; -using namespace ::com::sun::star::xml::wrapper ; -using namespace ::com::sun::star::xml::crypto ; - -int SAL_CALL main( int argc, char **argv ) -{ - const char* n_pCertStore ; - HCERTSTORE n_hStoreHandle ; - - if( argc != 3 && argc != 2 ) { - fprintf( stderr, "Usage: %s \n" , argv[0] ) ; - fprintf( stderr, "Or: \t%s < Cert Store Name >\n\n" , argv[0] ) ; - return 1 ; - } - - //Initialize the crypto engine - if( argc == 3 ) { - n_pCertStore = argv[2] ; - n_hStoreHandle = CertOpenSystemStore( NULL, n_pCertStore ) ; - if( n_hStoreHandle == NULL ) { - fprintf( stderr, "Can not open the system cert store %s\n", n_pCertStore ) ; - return 1 ; - } - } else { - n_pCertStore = NULL ; - n_hStoreHandle = NULL ; - } - //xmlSecMSCryptoAppInit( n_pCertStore ) ; - - try { - Reference< XMultiComponentFactory > xManager = NULL ; - Reference< XComponentContext > xContext = NULL ; - - xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[1] ) ) ; - OSL_ENSURE( xManager.is() , - "ServicesManager - " - "Cannot get service manager" ) ; - - //Create security environment - //Build Security Environment - Reference< XInterface > xsecenv = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_MSCryptImpl")), xContext ) ; - OSL_ENSURE( xsecenv.is() , - "Signer - " - "Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ; - - Reference< XSecurityEnvironment > xSecEnv( xsecenv , UNO_QUERY ) ; - OSL_ENSURE( xSecEnv.is() , - "Signer - " - "Cannot get interface of \"XSecurityEnvironment\" from service \"xsec.SecurityEnvironment\"" ) ; - - Reference< XUnoTunnel > xEnvTunnel( xsecenv , UNO_QUERY ) ; - OSL_ENSURE( xEnvTunnel.is() , - "Signer - " - "Cannot get interface of \"XUnoTunnel\" from service \"xsec.SecurityEnvironment\"" ) ; - - SecurityEnvironment_MSCryptImpl* pSecEnv = ( SecurityEnvironment_MSCryptImpl* )xEnvTunnel->getSomething( SecurityEnvironment_MSCryptImpl::getUnoTunnelId() ) ; - OSL_ENSURE( pSecEnv != NULL , - "Signer - " - "Cannot get implementation of \"xsec.SecurityEnvironment\"" ) ; - - //Setup key slot and certDb - if( n_hStoreHandle != NULL ) { - pSecEnv->setCryptoSlot( n_hStoreHandle ) ; - pSecEnv->setCertDb( n_hStoreHandle ) ; - } else { - pSecEnv->enableDefaultCrypt( sal_True ) ; - } - - //Get personal certificate - Sequence < Reference< XCertificate > > xPersonalCerts = pSecEnv->getPersonalCertificates() ; - OSL_ENSURE( xPersonalCerts.hasElements() , - "getPersonalCertificates - " - "No personal certificates found\n" ) ; - - Sequence < Reference< XCertificate > > xCertPath ; - for( int i = 0; i < xPersonalCerts.getLength(); i ++ ) { - //Print the certificate infomation. - fprintf( stdout, "\nPersonal Certificate Info\n" ) ; - fprintf( stdout, "\tCertificate Issuer[%s]\n", OUStringToOString( xPersonalCerts[i]->getIssuerName(), RTL_TEXTENCODING_ASCII_US ).getStr() ) ; - fprintf( stdout, "\tCertificate Serial Number[%s]\n", OUStringToOString( bigIntegerToNumericString( xPersonalCerts[i]->getSerialNumber() ), RTL_TEXTENCODING_ASCII_US ).getStr() ) ; - fprintf( stdout, "\tCertificate Subject[%s]\n", OUStringToOString( xPersonalCerts[i]->getSubjectName(), RTL_TEXTENCODING_ASCII_US ).getStr() ) ; - - //build the certificate path - xCertPath = pSecEnv->buildCertificatePath( xPersonalCerts[i] ) ; - //Print the certificate path. - fprintf( stdout, "\tCertificate Path\n" ) ; - for( int j = 0; j < xCertPath.getLength(); j ++ ) { - fprintf( stdout, "\t\tCertificate Authority Subject[%s]\n", OUStringToOString( xCertPath[j]->getSubjectName(), RTL_TEXTENCODING_ASCII_US ).getStr() ) ; - } - - //Get the certificate - Sequence < sal_Int8 > serial = xPersonalCerts[i]->getSerialNumber() ; - Reference< XCertificate > xcert = pSecEnv->getCertificate( xPersonalCerts[i]->getIssuerName(), xPersonalCerts[i]->getSerialNumber() ) ; - if( !xcert.is() ) { - fprintf( stdout, "The personal certificate is not in the certificate database\n" ) ; - } - - //Get the certificate characters - sal_Int32 chars = pSecEnv->getCertificateCharacters( xPersonalCerts[i] ) ; - fprintf( stdout, "The certificate characters are %d\n", chars ) ; - - //Get the certificate status - sal_Int32 validity = pSecEnv->verifyCertificate( xPersonalCerts[i] ) ; - fprintf( stdout, "The certificate validities are %d\n", validity ) ; - - } - } catch( Exception& e ) { - fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ; - goto done ; - } - -done: - if( n_hStoreHandle != NULL ) - CertCloseStore( n_hStoreHandle, CERT_CLOSE_STORE_FORCE_FLAG ) ; - - //xmlSecMSCryptoAppShutdown() ; - - return 0; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/tools/standalone/mscsfit/decrypter.cxx b/xmlsecurity/tools/standalone/mscsfit/decrypter.cxx deleted file mode 100644 index 56ac2ea7c..000000000 --- a/xmlsecurity/tools/standalone/mscsfit/decrypter.cxx +++ /dev/null @@ -1,248 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/** -- C++ Source File -- **/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_xmlsecurity.hxx" -#include -#include "helper.hxx" - -#include "libxml/tree.h" -#include "libxml/parser.h" -#ifndef XMLSEC_NO_XSLT -#include "libxslt/xslt.h" -#endif - - -#include "securityenvironment_mscryptimpl.hxx" -#include "xmlelementwrapper_xmlsecimpl.hxx" - -#include "nspr.h" -#include "prtypes.h" - -#include "pk11func.h" -#include "cert.h" -#include "cryptohi.h" -#include "certdb.h" -#include "nss.h" - -#include "xmlsec/strings.h" -#include "xmlsec/xmltree.h" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - - -using namespace ::rtl ; -using namespace ::cppu ; -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::io ; -using namespace ::com::sun::star::ucb ; -using namespace ::com::sun::star::beans ; -using namespace ::com::sun::star::document ; -using namespace ::com::sun::star::lang ; -using namespace ::com::sun::star::registry ; -using namespace ::com::sun::star::xml::wrapper ; -using namespace ::com::sun::star::xml::crypto ; - - -int SAL_CALL main( int argc, char **argv ) -{ - CERTCertDBHandle* certHandle = NULL ; - PK11SlotInfo* slot = NULL ; - xmlDocPtr doc = NULL ; - xmlNodePtr tplNode ; - xmlNodePtr tarNode ; - FILE* dstFile = NULL ; - - - if( argc != 5 ) { - fprintf( stderr, "Usage: %s < CertDir > \n\n" , argv[0] ) ; - return 1 ; - } - - //Init libxml and libxslt libraries - xmlInitParser(); - LIBXML_TEST_VERSION - xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS; - xmlSubstituteEntitiesDefault(1); - - #ifndef XMLSEC_NO_XSLT - xmlIndentTreeOutput = 1; - #endif // XMLSEC_NO_XSLT - - - //Initialize NSPR and NSS - PR_Init( PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 1 ) ; - PK11_SetPasswordFunc( PriPK11PasswordFunc ) ; - if( NSS_Init( argv[1] ) != SECSuccess ) { - fprintf( stderr , "### cannot intialize NSS!\n" ) ; - goto done ; - } - - certHandle = CERT_GetDefaultCertDB() ; - slot = PK11_GetInternalKeySlot() ; - - //Load XML document - doc = xmlParseFile( argv[2] ) ; - if( doc == NULL || xmlDocGetRootElement( doc ) == NULL ) { - fprintf( stderr , "### Cannot load template xml document!\n" ) ; - goto done ; - } - - //Find the encryption template - tplNode = xmlSecFindNode( xmlDocGetRootElement( doc ), xmlSecNodeEncryptedData, xmlSecEncNs ) ; - if( tplNode == NULL ) { - fprintf( stderr , "### Cannot find the encryption template!\n" ) ; - goto done ; - } - - - try { - Reference< XMultiComponentFactory > xManager = NULL ; - Reference< XComponentContext > xContext = NULL ; - - xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[4] ) ) ; - - //Create encryption template - Reference< XInterface > tplElement = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.xsec.XMLElementWrapper")) , xContext ) ; - OSL_ENSURE( tplElement.is() , - "Decryptor - " - "Cannot get service instance of \"xsec.XMLElementWrapper\"" ) ; - - Reference< XXMLElementWrapper > xTplElement( tplElement , UNO_QUERY ) ; - OSL_ENSURE( xTplElement.is() , - "Decryptor - " - "Cannot get interface of \"XXMLElementWrapper\" from service \"xsec.XMLElementWrapper\"" ) ; - - Reference< XUnoTunnel > xTplEleTunnel( xTplElement , UNO_QUERY ) ; - OSL_ENSURE( xTplEleTunnel.is() , - "Decryptor - " - "Cannot get interface of \"XUnoTunnel\" from service \"xsec.XMLElementWrapper\"" ) ; - - XMLElementWrapper_XmlSecImpl* pTplElement = ( XMLElementWrapper_XmlSecImpl* )xTplEleTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ) ; - OSL_ENSURE( pTplElement != NULL , - "Decryptor - " - "Cannot get implementation of \"xsec.XMLElementWrapper\"" ) ; - - pTplElement->setNativeElement( tplNode ) ; - - //Build XML Encryption template - Reference< XInterface > enctpl = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.xsec.XMLEncryptionTemplate")), xContext ) ; - OSL_ENSURE( enctpl.is() , - "Decryptor - " - "Cannot get service instance of \"xsec.XMLEncryptionTemplate\"" ) ; - - Reference< XXMLEncryptionTemplate > xTemplate( enctpl , UNO_QUERY ) ; - OSL_ENSURE( xTemplate.is() , - "Decryptor - " - "Cannot get interface of \"XXMLEncryptionTemplate\" from service \"xsec.XMLEncryptionTemplate\"" ) ; - - //Import the encryption template - xTemplate->setTemplate( xTplElement ) ; - - //Create security environment - //Build Security Environment - Reference< XInterface > xsecenv = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.xsec.SecurityEnvironment")), xContext ) ; - OSL_ENSURE( xsecenv.is() , - "Decryptor - " - "Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ; - - Reference< XSecurityEnvironment > xSecEnv( xsecenv , UNO_QUERY ) ; - OSL_ENSURE( xSecEnv.is() , - "Decryptor - " - "Cannot get interface of \"XSecurityEnvironment\" from service \"xsec.SecurityEnvironment\"" ) ; - - //Setup key slot and certDb - Reference< XUnoTunnel > xEnvTunnel( xsecenv , UNO_QUERY ) ; - OSL_ENSURE( xEnvTunnel.is() , - "Decryptor - " - "Cannot get interface of \"XUnoTunnel\" from service \"xsec.SecurityEnvironment\"" ) ; - - SecurityEnvironment_XmlSecImpl* pSecEnv = ( SecurityEnvironment_XmlSecImpl* )xEnvTunnel->getSomething( SecurityEnvironment_XmlSecImpl::getUnoTunnelId() ) ; - OSL_ENSURE( pSecEnv != NULL , - "Decryptor - " - "Cannot get implementation of \"xsec.SecurityEnvironment\"" ) ; - - pSecEnv->setCryptoSlot( slot ) ; - pSecEnv->setCertDb( certHandle ) ; - - - //Build XML Security Context - Reference< XInterface > xmlsecctx = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.xsec.XMLSecurityContext")), xContext ) ; - OSL_ENSURE( xmlsecctx.is() , - "Decryptor - " - "Cannot get service instance of \"xsec.XMLSecurityContext\"" ) ; - - Reference< XXMLSecurityContext > xSecCtx( xmlsecctx , UNO_QUERY ) ; - OSL_ENSURE( xSecCtx.is() , - "Decryptor - " - "Cannot get interface of \"XXMLSecurityContext\" from service \"xsec.XMLSecurityContext\"" ) ; - - xSecCtx->setSecurityEnvironment( xSecEnv ) ; - - - //Get encrypter - Reference< XInterface > xmlencrypter = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.xsec.XMLEncryption")), xContext ) ; - OSL_ENSURE( xmlencrypter.is() , - "Decryptor - " - "Cannot get service instance of \"xsec.XMLEncryption\"" ) ; - - Reference< XXMLEncryption > xEncrypter( xmlencrypter , UNO_QUERY ) ; - OSL_ENSURE( xEncrypter.is() , - "Decryptor - " - "Cannot get interface of \"XXMLEncryption\" from service \"xsec.XMLEncryption\"" ) ; - - - //Perform decryption - Reference< XXMLElementWrapper> xDecrRes = xEncrypter->decrypt( xTemplate , xSecCtx ) ; - OSL_ENSURE( xDecrRes.is() , - "Decryptor - " - "Cannot decrypt the xml document" ) ; - } catch( Exception& e ) { - fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ; - goto done ; - } - - dstFile = fopen( argv[3], "w" ) ; - if( dstFile == NULL ) { - fprintf( stderr , "### Can not open file %s\n", argv[3] ) ; - goto done ; - } - - //Save result - xmlDocDump( dstFile, doc ) ; - -done: - if( dstFile != NULL ) - fclose( dstFile ) ; - - if( slot != NULL ) - PK11_FreeSlot( slot ) ; - - PK11_LogoutAll() ; - NSS_Shutdown() ; - - /* Shutdown libxslt/libxml */ - #ifndef XMLSEC_NO_XSLT - xsltCleanupGlobals(); - #endif /* XMLSEC_NO_XSLT */ - xmlCleanupParser(); - - return 0; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx b/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx deleted file mode 100644 index 621836275..000000000 --- a/xmlsecurity/tools/standalone/mscsfit/encrypter.cxx +++ /dev/null @@ -1,310 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/** -- C++ Source File -- **/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_xmlsecurity.hxx" -#include -#include "helper.hxx" - -#include "libxml/tree.h" -#include "libxml/parser.h" -#ifndef XMLSEC_NO_XSLT -#include "libxslt/xslt.h" -#endif - -#include "securityenvironment_mscryptimpl.hxx" -#include "xmlelementwrapper_xmlsecimpl.hxx" - -#include "xmlsec/strings.h" -#include "xmlsec/mscrypto/app.h" -#include "xmlsec/xmltree.h" - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace ::rtl ; -using namespace ::cppu ; -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::io ; -using namespace ::com::sun::star::ucb ; -using namespace ::com::sun::star::beans ; -using namespace ::com::sun::star::document ; -using namespace ::com::sun::star::lang ; -using namespace ::com::sun::star::registry ; -using namespace ::com::sun::star::xml::wrapper ; -using namespace ::com::sun::star::xml::crypto ; - -int SAL_CALL main( int argc, char **argv ) -{ - const char* n_pCertStore ; - HCERTSTORE n_hStoreHandle ; - - xmlDocPtr doc = NULL ; - xmlNodePtr tplNode ; - xmlNodePtr tarNode ; - FILE* dstFile = NULL ; - - HCRYPTPROV hCryptProv = NULL ; - HCRYPTKEY symKey = NULL ; - - if( argc != 6 && argc != 7 ) { - fprintf( stderr, "Usage: %s \n\n" , argv[0] ) ; - fprintf( stderr, "Usage: %s < Cert Store Name >\n\n" , argv[0] ) ; - return 1 ; - } - - //Init libxml and libxslt libraries - xmlInitParser(); - LIBXML_TEST_VERSION - xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS; - xmlSubstituteEntitiesDefault(1); - - #ifndef XMLSEC_NO_XSLT - xmlIndentTreeOutput = 1; - #endif // XMLSEC_NO_XSLT - - //Initialize the crypto engine - if( argc == 7 ) { - n_pCertStore = argv[6] ; - n_hStoreHandle = CertOpenSystemStore( NULL, n_pCertStore ) ; - if( n_hStoreHandle == NULL ) { - fprintf( stderr, "Can not open the system cert store %s\n", n_pCertStore ) ; - return 1 ; - } - } else { - n_pCertStore = NULL ; - n_hStoreHandle = NULL ; - } - xmlSecMSCryptoAppInit( n_pCertStore ) ; - - //Create encryption key. - //CryptAcquireContext( &hCryptProv , NULL , NULL , PROV_RSA_FULL , CRYPT_DELETEKEYSET ) ; - //CryptAcquireContext( &hCryptProv , "MyTempKeyContainer" , NULL , PROV_RSA_FULL , CRYPT_DELETEKEYSET ) ; - - if( !CryptAcquireContext( &hCryptProv , NULL , NULL , PROV_RSA_FULL , CRYPT_VERIFYCONTEXT ) ) { - fprintf( stderr, "### cannot get crypto provider context!\n" ); - goto done ; - } - - if( !CryptGenKey( hCryptProv, CALG_RC4, 0x00800000 | CRYPT_EXPORTABLE, &symKey ) ) { - fprintf( stderr , "### cannot create symmetric key!\n" ) ; - goto done ; - } - - //Load XML document - doc = xmlParseFile( argv[1] ) ; - if( doc == NULL || xmlDocGetRootElement( doc ) == NULL ) { - fprintf( stderr , "### Cannot load template xml document!\n" ) ; - goto done ; - } - - //Find the encryption template - tplNode = xmlSecFindNode( xmlDocGetRootElement( doc ), xmlSecNodeEncryptedData, xmlSecEncNs ) ; - if( tplNode == NULL ) { - fprintf( stderr , "### Cannot find the encryption template!\n" ) ; - goto done ; - } - - //Find the encryption template - tarNode = xmlSecFindNode( xmlDocGetRootElement( doc ), ( const unsigned char*)argv[3], ( const unsigned char*)argv[4] ) ; - if( tarNode == NULL ) { - fprintf( stderr , "### Cannot find the encryption target!\n" ) ; - goto done ; - } - - try { - Reference< XMultiComponentFactory > xManager = NULL ; - Reference< XComponentContext > xContext = NULL ; - - xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[5] ) ) ; - - //Create encryption template - Reference< XInterface > tplElement = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ; - OSL_ENSURE( tplElement.is() , - "Encryptor - " - "Cannot get service instance of \"xsec.XMLElementWrapper\"" ) ; - - Reference< XXMLElementWrapper > xTplElement( tplElement , UNO_QUERY ) ; - OSL_ENSURE( xTplElement.is() , - "Encryptor - " - "Cannot get interface of \"XXMLElementWrapper\" from service \"xsec.XMLElementWrapper\"" ) ; - - Reference< XUnoTunnel > xTplEleTunnel( xTplElement , UNO_QUERY ) ; - OSL_ENSURE( xTplEleTunnel.is() , - "Encryptor - " - "Cannot get interface of \"XUnoTunnel\" from service \"xsec.XMLElementWrapper\"" ) ; - - XMLElementWrapper_XmlSecImpl* pTplElement = ( XMLElementWrapper_XmlSecImpl* )xTplEleTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ) ; - OSL_ENSURE( pTplElement != NULL , - "Encryptor - " - "Cannot get implementation of \"xsec.XMLElementWrapper\"" ) ; - - pTplElement->setNativeElement( tplNode ) ; - - //Create encryption target element - Reference< XInterface > tarElement = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ; - OSL_ENSURE( tarElement.is() , - "Encryptor - " - "Cannot get service instance of \"xsec.XMLElementWrapper\"" ) ; - - Reference< XXMLElementWrapper > xTarElement( tarElement , UNO_QUERY ) ; - OSL_ENSURE( xTarElement.is() , - "Encryptor - " - "Cannot get interface of \"XXMLElementWrapper\" from service \"xsec.XMLElementWrapper\"" ) ; - - Reference< XUnoTunnel > xTarEleTunnel( xTarElement , UNO_QUERY ) ; - OSL_ENSURE( xTarEleTunnel.is() , - "Encryptor - " - "Cannot get interface of \"XUnoTunnel\" from service \"xsec.XMLElementWrapper\"" ) ; - - XMLElementWrapper_XmlSecImpl* pTarElement = ( XMLElementWrapper_XmlSecImpl* )xTarEleTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ) ; - OSL_ENSURE( pTarElement != NULL , - "Encryptor - " - "Cannot get implementation of \"xsec.XMLElementWrapper\"" ) ; - - pTarElement->setNativeElement( tarNode ) ; - - - //Build XML Encryption template - Reference< XInterface > enctpl = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLEncryptionTemplate")), xContext ) ; - OSL_ENSURE( enctpl.is() , - "Encryptor - " - "Cannot get service instance of \"xsec.XMLEncryptionTemplate\"" ) ; - - Reference< XXMLEncryptionTemplate > xTemplate( enctpl , UNO_QUERY ) ; - OSL_ENSURE( xTemplate.is() , - "Encryptor - " - "Cannot get interface of \"XXMLEncryptionTemplate\" from service \"xsec.XMLEncryptionTemplate\"" ) ; - - //Import the encryption template - xTemplate->setTemplate( xTplElement ) ; - xTemplate->setTarget( xTarElement ) ; - - //Create security environment - //Build Security Environment - Reference< XInterface > xsecenv = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_MSCryptImpl")), xContext ) ; - OSL_ENSURE( xsecenv.is() , - "Encryptor - " - "Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ; - - Reference< XSecurityEnvironment > xSecEnv( xsecenv , UNO_QUERY ) ; - OSL_ENSURE( xSecEnv.is() , - "Encryptor - " - "Cannot get interface of \"XSecurityEnvironment\" from service \"xsec.SecurityEnvironment\"" ) ; - - //Setup key slot and certDb - Reference< XUnoTunnel > xEnvTunnel( xsecenv , UNO_QUERY ) ; - OSL_ENSURE( xEnvTunnel.is() , - "Encryptor - " - "Cannot get interface of \"XUnoTunnel\" from service \"xsec.SecurityEnvironment\"" ) ; - - SecurityEnvironment_MSCryptImpl* pSecEnv = ( SecurityEnvironment_MSCryptImpl* )xEnvTunnel->getSomething( SecurityEnvironment_MSCryptImpl::getUnoTunnelId() ) ; - OSL_ENSURE( pSecEnv != NULL , - "Encryptor - " - "Cannot get implementation of \"xsec.SecurityEnvironment\"" ) ; - - //Setup key slot and certDb - if( n_hStoreHandle != NULL ) { - pSecEnv->setCryptoSlot( n_hStoreHandle ) ; - pSecEnv->setCertDb( n_hStoreHandle ) ; - } else { - pSecEnv->enableDefaultCrypt( sal_True ) ; - } - - pSecEnv->adoptSymKey( symKey ) ; - - - //Build XML Security Context - Reference< XInterface > xmlsecctx = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_MSCryptImpl")), xContext ) ; - OSL_ENSURE( xmlsecctx.is() , - "Encryptor - " - "Cannot get service instance of \"xsec.XMLSecurityContext\"" ) ; - - Reference< XXMLSecurityContext > xSecCtx( xmlsecctx , UNO_QUERY ) ; - OSL_ENSURE( xSecCtx.is() , - "Encryptor - " - "Cannot get interface of \"XXMLSecurityContext\" from service \"xsec.XMLSecurityContext\"" ) ; - - xSecCtx->addSecurityEnvironment( xSecEnv ) ; - - //Get encrypter - Reference< XInterface > xmlencrypter = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLEncryption_MSCryptImpl")), xContext ) ; - OSL_ENSURE( xmlencrypter.is() , - "Encryptor - " - "Cannot get service instance of \"xsec.XMLEncryption\"" ) ; - - Reference< XXMLEncryption > xEncrypter( xmlencrypter , UNO_QUERY ) ; - OSL_ENSURE( xEncrypter.is() , - "Encryptor - " - "Cannot get interface of \"XXMLEncryption\" from service \"xsec.XMLEncryption\"" ) ; - - //perform encryption - xTemplate = xEncrypter->encrypt( xTemplate , xSecEnv ) ; - OSL_ENSURE( xTemplate.is() , - "Encryptor - " - "Cannot encrypt the xml document" ) ; - - - com::sun::star::xml::crypto::SecurityOperationStatus m_nStatus = xTemplate->getStatus(); - if (m_nStatus == SecurityOperationStatus_OPERATION_SUCCEEDED) - { - fprintf( stdout, "Operation succeeds.\n") ; - } - else - { - fprintf( stdout, "Operation fails.\n") ; - } - } catch( Exception& e ) { - fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ; - goto done ; - } - - dstFile = fopen( argv[2], "w" ) ; - if( dstFile == NULL ) { - fprintf( stderr , "### Can not open file %s\n", argv[2] ) ; - goto done ; - } - - //Save result - xmlDocDump( dstFile, doc ) ; - -done: - if( dstFile != NULL ) - fclose( dstFile ) ; - - if( symKey != NULL ) { - CryptDestroyKey( symKey ) ; - } - - if( hCryptProv != NULL ) { - CryptReleaseContext( hCryptProv, 0 ) ; - } - - if( n_hStoreHandle != NULL ) - CertCloseStore( n_hStoreHandle, CERT_CLOSE_STORE_FORCE_FLAG ) ; - - /* Shutdown libxslt/libxml */ - #ifndef XMLSEC_NO_XSLT - xsltCleanupGlobals(); - #endif /* XMLSEC_NO_XSLT */ - xmlCleanupParser(); - - return 0; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/tools/standalone/mscsfit/helper.cxx b/xmlsecurity/tools/standalone/mscsfit/helper.cxx deleted file mode 100644 index 9a7b4bb75..000000000 --- a/xmlsecurity/tools/standalone/mscsfit/helper.cxx +++ /dev/null @@ -1,222 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -#include "helper.hxx" -#include "osl/diagnose.h" -#include "rtl/ustring.h" - -/*- - * Helper : create a input stream from a file - */ -Reference< XInputStream > createStreamFromFile( const OUString sFile ) -{ - const sal_Char* pcFile ; - OString aString ; - - aString = OUStringToOString( sFile , RTL_TEXTENCODING_ASCII_US ) ; - pcFile = aString.getStr() ; - if( pcFile != NULL ) { - FILE *f = fopen( pcFile , "rb" ); - Reference< XInputStream > r; - - if( f ) { - fseek( f , 0 , SEEK_END ); - int nLength = ftell( f ); - fseek( f , 0 , SEEK_SET ); - - Sequence seqIn(nLength); - fread( seqIn.getArray() , nLength , 1 , f ); - - r = Reference< XInputStream > ( new OInputStream( seqIn ) ); - fclose( f ); - } - return r; - } else { - return NULL ; - } - - return NULL ; -} - -/*- - * Helper : set a output stream to a file - */ -Reference< XOutputStream > createStreamToFile( const OUString sFile ) -{ - const sal_Char* pcFile ; - OString aString ; - - aString = OUStringToOString( sFile , RTL_TEXTENCODING_ASCII_US ) ; - pcFile = aString.getStr() ; - if( pcFile != NULL ) - return Reference< XOutputStream >( new OOutputStream( pcFile ) ) ; - else - return NULL ; -} - -/*- - * Helper : get service manager and context - */ -Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext >& xContext , OUString sUnoUrl , OUString sRdbUrl ) throw( RuntimeException , Exception ) -{ - Reference< XMultiComponentFactory > xLocalServiceManager = NULL ; - Reference< XComponentContext > xLocalComponentContext = NULL ; - Reference< XMultiComponentFactory > xUsedServiceManager = NULL ; - Reference< XComponentContext > xUsedComponentContext = NULL ; - - OSL_ENSURE( sUnoUrl.getLength() , - "serviceManager - " - "No uno URI specified" ) ; - - OSL_ENSURE( sRdbUrl.getLength() , - "serviceManager - " - "No rdb URI specified" ) ; - - if( sUnoUrl.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "local" ) ) ) { - Reference< XSimpleRegistry > xSimpleRegistry = createSimpleRegistry(); - OSL_ENSURE( xSimpleRegistry.is() , - "serviceManager - " - "Cannot create simple registry" ) ; - - //xSimpleRegistry->open(OUString(RTL_CONSTASCII_USTRINGPARAM("xmlsecurity.rdb")), sal_False, sal_False); - xSimpleRegistry->open(sRdbUrl, sal_True, sal_False); - OSL_ENSURE( xSimpleRegistry->isValid() , - "serviceManager - " - "Cannot open xml security registry rdb" ) ; - - xLocalComponentContext = bootstrap_InitialComponentContext( xSimpleRegistry ) ; - OSL_ENSURE( xLocalComponentContext.is() , - "serviceManager - " - "Cannot create intial component context" ) ; - - xLocalServiceManager = xLocalComponentContext->getServiceManager() ; - OSL_ENSURE( xLocalServiceManager.is() , - "serviceManager - " - "Cannot create intial service manager" ) ; - - /*- - * Because of the exception rasied from - * ucbhelper/source/provider/provconf.cxx, lin 323 - * I do not use the content broker at present - ******************************************************************** - //init ucb - if( ::ucb::ContentBroker::get() == NULL ) { - Reference< lang::XMultiServiceFactory > xSvmg( xLocalServiceManager , UNO_QUERY ) ; - OSL_ENSURE( xLocalServiceManager.is() , - "serviceManager - " - "Cannot get multi-service factory" ) ; - - Sequence< Any > args( 2 ) ; - args[ 0 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY1_LOCAL )) ; - args[ 1 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY2_OFFICE )) ; - if( ! ::ucb::ContentBroker::initialize( xSvmg , args ) ) { - throw RuntimeException( OUString(RTL_CONSTASCII_USTRINGPARAM("Cannot inlitialize ContentBroker")) , Reference< XInterface >() , Any() ) ; - } - } - ********************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_xmlsecurity.hxx" - - xUsedComponentContext = xLocalComponentContext ; - xUsedServiceManager = xLocalServiceManager ; - } else { - Reference< XComponentContext > xLocalComponentContext = defaultBootstrap_InitialComponentContext() ; - OSL_ENSURE( xLocalComponentContext.is() , - "serviceManager - " - "Cannot create intial component context" ) ; - - Reference< XMultiComponentFactory > xLocalServiceManager = xLocalComponentContext->getServiceManager(); - OSL_ENSURE( xLocalServiceManager.is() , - "serviceManager - " - "Cannot create intial service manager" ) ; - - Reference< XInterface > urlResolver = - xLocalServiceManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.UnoUrlResolver")) , xLocalComponentContext ) ; - OSL_ENSURE( urlResolver.is() , - "serviceManager - " - "Cannot get service instance of \"bridge.UnoUrlResolver\"" ) ; - - Reference< XUnoUrlResolver > xUnoUrlResolver( urlResolver , UNO_QUERY ) ; - OSL_ENSURE( xUnoUrlResolver.is() , - "serviceManager - " - "Cannot get interface of \"XUnoUrlResolver\" from service \"bridge.UnoUrlResolver\"" ) ; - - Reference< XInterface > initialObject = xUnoUrlResolver->resolve( sUnoUrl ) ; - OSL_ENSURE( initialObject.is() , - "serviceManager - " - "Cannot resolve uno url" ) ; - - /*- - * Method 1: with Naming Service - ******************************************************************** - Reference< XNamingService > xNamingService( initialObject , UNO_QUERY ) ; - OSL_ENSURE( xNamingService.is() , - "serviceManager - " - "Cannot get interface of \"XNamingService\" from URL resolver" ) ; - - Reference< XInterface > serviceManager = - xNamingService->getRegisteredObject( OUString(RTL_CONSTASCII_USTRINGPARAM("StarOffice.ServiceManager")) ) ; - OSL_ENSURE( serviceManager.is() , - "serviceManager - " - "Cannot get service instance of \"StarOffice.ServiceManager\"" ) ; - - xUsedServiceManager = Reference< XMultiComponentFactory >( serviceManager , UNO_QUERY ); - OSL_ENSURE( xUsedServiceManager.is() , - "serviceManager - " - "Cannot get interface of \"XMultiComponentFactory\" from service \"StarOffice.ServiceManager\"" ) ; - - Reference< XPropertySet > xPropSet( xUsedServiceManager , UNO_QUERY ) ; - OSL_ENSURE( xPropSet.is() , - "serviceManager - " - "Cannot get interface of \"XPropertySet\" from service \"StarOffice.ServiceManager\"" ) ; - - xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xUsedComponentContext ; - OSL_ENSURE( xUsedComponentContext.is() , - "serviceManager - " - "Cannot create remote component context" ) ; - - ********************************************************************/ - - /*- - * Method 2: with Componnent context - ******************************************************************** - Reference< XPropertySet > xPropSet( initialObject , UNO_QUERY ) ; - OSL_ENSURE( xPropSet.is() , - "serviceManager - " - "Cannot get interface of \"XPropertySet\" from URL resolver" ) ; - - xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xUsedComponentContext ; - OSL_ENSURE( xUsedComponentContext.is() , - "serviceManager - " - "Cannot create remote component context" ) ; - - xUsedServiceManager = xUsedComponentContext->getServiceManager(); - OSL_ENSURE( xUsedServiceManager.is() , - "serviceManager - " - "Cannot create remote service manager" ) ; - ********************************************************************/ - - /*- - * Method 3: with Service Manager - ********************************************************************/ - xUsedServiceManager = Reference< XMultiComponentFactory >( initialObject , UNO_QUERY ); - OSL_ENSURE( xUsedServiceManager.is() , - "serviceManager - " - "Cannot create remote service manager" ) ; - - Reference< XPropertySet > xPropSet( xUsedServiceManager , UNO_QUERY ) ; - OSL_ENSURE( xPropSet.is() , - "serviceManager - " - "Cannot get interface of \"XPropertySet\" from service \"StarOffice.ServiceManager\"" ) ; - - xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xUsedComponentContext ; - OSL_ENSURE( xUsedComponentContext.is() , - "serviceManager - " - "Cannot create remote component context" ) ; - /********************************************************************/ - } - - xContext = xUsedComponentContext ; - return xUsedServiceManager ; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/tools/standalone/mscsfit/helper.hxx b/xmlsecurity/tools/standalone/mscsfit/helper.hxx deleted file mode 100644 index 3fe345ffd..000000000 --- a/xmlsecurity/tools/standalone/mscsfit/helper.hxx +++ /dev/null @@ -1,204 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -using namespace ::rtl ; -using namespace ::cppu ; -using namespace ::com::sun::star ; -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::io ; -using namespace ::com::sun::star::ucb ; -using namespace ::com::sun::star::beans ; -using namespace ::com::sun::star::document ; -using namespace ::com::sun::star::lang ; -using namespace ::com::sun::star::bridge ; -using namespace ::com::sun::star::registry ; -using namespace ::com::sun::star::task ; -using namespace ::com::sun::star::xml ; -using namespace ::com::sun::star::xml::wrapper ; -using namespace ::com::sun::star::xml::sax ; - - -/** - * Helper: Implementation of XInputStream - */ -class OInputStream : public WeakImplHelper1 < XInputStream > -{ - public: - OInputStream( const Sequence< sal_Int8 >&seq ) : m_seq( seq ), nPos( 0 ) {} - - virtual sal_Int32 SAL_CALL readBytes( - Sequence< sal_Int8 >& aData , - sal_Int32 nBytesToRead - ) throw( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException ) - { - nBytesToRead = ( nBytesToRead > m_seq.getLength() - nPos ) ? - m_seq.getLength() - nPos : - nBytesToRead ; - aData = Sequence< sal_Int8 > ( &( m_seq.getConstArray()[nPos] ), nBytesToRead ) ; - nPos += nBytesToRead ; - return nBytesToRead ; - } - - virtual sal_Int32 SAL_CALL readSomeBytes( - ::com::sun::star::uno::Sequence< sal_Int8 >& aData , - sal_Int32 nMaxBytesToRead - ) throw( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException ) - { - return readBytes( aData, nMaxBytesToRead ) ; - } - - virtual void SAL_CALL skipBytes( - sal_Int32 nBytesToSkip - ) throw( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException ) - { - // not implemented - } - - virtual sal_Int32 SAL_CALL available( - void - ) throw( NotConnectedException, IOException, RuntimeException ) - { - return m_seq.getLength() - nPos ; - } - - virtual void SAL_CALL closeInput( - void - ) throw( NotConnectedException, IOException, RuntimeException ) - { - // not needed - } - - private: - sal_Int32 nPos; - Sequence< sal_Int8> m_seq; -} ; - -/** - * Helper : create a input stream from a file - */ -Reference< XInputStream > createStreamFromFile( const OUString sFile ) ; - -/** - * Helper: Implementation of XOutputStream - */ -class OOutputStream : public WeakImplHelper1 < XOutputStream > -{ - public: - OOutputStream( const char *pcFile ) { - strcpy( m_pcFile , pcFile ) ; - m_f = 0 ; - } - - virtual void SAL_CALL writeBytes( - const Sequence< sal_Int8 >& aData - ) throw( NotConnectedException , BufferSizeExceededException , RuntimeException ) { - if( !m_f ) { - m_f = fopen( m_pcFile , "w" ) ; - } - - fwrite( aData.getConstArray() , 1 , aData.getLength() , m_f ) ; - } - - virtual void SAL_CALL flush( - void - ) throw( NotConnectedException , BufferSizeExceededException , RuntimeException ) { - fflush( m_f ) ; - } - - virtual void SAL_CALL closeOutput( - void - ) throw( NotConnectedException , BufferSizeExceededException , RuntimeException ) { - fclose( m_f ) ; - m_f = 0 ; - } - - private: - char m_pcFile[256]; - FILE *m_f; -} ; - -/** - * Helper: Implementation of XUriBinding - */ -class OUriBinding : public WeakImplHelper1 < ::com::sun::star::xml::crypto::XUriBinding > -{ - public: - OUriBinding() { - //Do nothing - } - - OUriBinding( - ::rtl::OUString& aUri, - ::com::sun::star::uno::Reference< com::sun::star::io::XInputStream >& aInputStream ) { - m_vUris.push_back( aUri ) ; - m_vStreams.push_back( aInputStream ) ; - } - - virtual void SAL_CALL setUriBinding( - const ::rtl::OUString& aUri , - const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& aInputStream - ) throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException ) { - m_vUris.push_back( aUri ) ; - m_vStreams.push_back( aInputStream ) ; - } - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getUriBinding( const ::rtl::OUString& uri ) throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException ) { - ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > xInputStream ; - - int size = m_vUris.size() ; - for( int i = 0 ; i m_vUris ; - std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > > m_vStreams ; -} ; - -/** - * Helper : set a output stream to a file - */ -Reference< XOutputStream > createStreamToFile( const OUString sFile ) ; - -/** - * Helper : get service manager and context - */ -Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext >& xContext , OUString sUnoUrl , OUString sRdbUrl ) throw( RuntimeException , Exception ) ; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/tools/standalone/mscsfit/makefile.mk b/xmlsecurity/tools/standalone/mscsfit/makefile.mk deleted file mode 100644 index ce8be6685..000000000 --- a/xmlsecurity/tools/standalone/mscsfit/makefile.mk +++ /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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=xmlsecurity -TARGET=xmlsecurity-mscxsfit -ENABLE_EXCEPTIONS=TRUE -NO_BSYMBOLIC=TRUE -LIBTARGET=NO - - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/target.pmk - -.IF "$(CRYPTO_ENGINE)" == "mscrypto" - -CDEFS += -DXMLSEC_CRYPTO_MSCRYPTO -DXMLSEC_NO_XSLT -SOLARINC += \ - -I$(PRJ)$/source$/xmlsec \ - -I$(PRJ)$/source$/xmlsec$/mscrypt - -# --- Files -------------------------------------------------------- - -SHARE_LIBS = \ - $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(SALLIB) - -.IF "$(GUI)"=="WNT" -SHARE_LIBS+= "libxml2.lib" "crypt32.lib" "advapi32.lib" "libxmlsec.lib" "libxmlsec-mscrypto.lib" "xsec_xmlsec.lib" "xs_comm.lib" "xs_mscrypt.lib" -.ELSE -SHARE_LIBS+= "-lxml2" "-lnss3" "-lnspr4" "-lxmlsec1" "-lxmlsec1-nss" "-lxsec_xmlsec" "-lxs_comm" "-lxs_nss" -.ENDIF - -SHARE_OBJS = \ - $(OBJ)$/helper.obj - -# -# The 1st application -# - -APP2TARGET= signer -APP2OBJS= \ - $(SHARE_OBJS) \ - $(OBJ)$/signer.obj - -.IF "$(OS)" == "LINUX" -APP2STDLIBS+= -lstdc++ -.ENDIF - -APP2STDLIBS+= \ - $(SHARE_LIBS) - -# -# The 2nd application -# -APP3TARGET= encrypter -APP3OBJS= \ - $(SHARE_OBJS) \ - $(OBJ)$/encrypter.obj - -.IF "$(OS)" == "LINUX" -APP3STDLIBS+= -lstdc++ -.ENDIF - -APP3STDLIBS+= \ - $(SHARE_LIBS) - -# -# The 3rd application -# -APP4TARGET= verifier -APP4OBJS= \ - $(SHARE_OBJS) \ - $(OBJ)$/verifier.obj - -.IF "$(OS)" == "LINUX" -APP4STDLIBS+= -lstdc++ -.ENDIF - -APP4STDLIBS+= \ - $(SHARE_LIBS) - -# -# The 5th application -# -APP6TARGET= certmngr -APP6OBJS= \ - $(SHARE_OBJS) \ - $(OBJ)$/certmngr.obj - -.IF "$(OS)" == "LINUX" -APP6STDLIBS+= -lstdc++ -.ENDIF - -APP6STDLIBS+= \ - $(SHARE_LIBS) - -.ENDIF - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/xmlsecurity/tools/standalone/mscsfit/signer.cxx b/xmlsecurity/tools/standalone/mscsfit/signer.cxx deleted file mode 100644 index d515e0a7f..000000000 --- a/xmlsecurity/tools/standalone/mscsfit/signer.cxx +++ /dev/null @@ -1,344 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/** -- C++ Source File -- **/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_xmlsecurity.hxx" -#include -#include "helper.hxx" - -#include "libxml/tree.h" -#include "libxml/parser.h" -#ifndef XMLSEC_NO_XSLT -#include "libxslt/xslt.h" -#endif - -#include "securityenvironment_mscryptimpl.hxx" -#include "xmlelementwrapper_xmlsecimpl.hxx" - -#include "xmlsec/strings.h" -#include "xmlsec/mscrypto/app.h" -#include "xmlsec/xmltree.h" - -#include - -#include -#include -#include -#include -#include -#include -#include - -using namespace ::rtl ; -using namespace ::cppu ; -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::io ; -using namespace ::com::sun::star::ucb ; -using namespace ::com::sun::star::beans ; -using namespace ::com::sun::star::document ; -using namespace ::com::sun::star::lang ; -using namespace ::com::sun::star::xml::wrapper ; -using namespace ::com::sun::star::xml::crypto ; - - -int SAL_CALL main( int argc, char **argv ) -{ - const char* n_pCertStore ; - HCERTSTORE n_hStoreHandle ; - - xmlDocPtr doc = NULL ; - xmlNodePtr tplNode ; - xmlNodePtr tarNode ; - xmlAttrPtr idAttr ; - xmlChar* idValue ; - xmlAttrPtr uriAttr ; - xmlChar* uriValue ; - OUString* uri = NULL ; - Reference< XUriBinding > xUriBinding ; - FILE* dstFile = NULL ; - - if( argc !=4 && argc != 5 ) { - fprintf( stderr, "Usage: %s \n" , argv[0] ) ; - fprintf( stderr, "Or: \t%s < Cert Store Name >\n\n" , argv[0] ) ; - return 1 ; - } - - for( int hhh = 0 ; hhh < 4 ; hhh ++ ) { - - //Init libxml and libxslt libraries - xmlInitParser(); - LIBXML_TEST_VERSION - xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS; - xmlSubstituteEntitiesDefault(1); - - #ifndef XMLSEC_NO_XSLT - xmlIndentTreeOutput = 1; - #endif // XMLSEC_NO_XSLT - - //Initialize the crypto engine - if( argc == 5 ) { - n_pCertStore = argv[4] ; - n_hStoreHandle = CertOpenSystemStore( NULL, n_pCertStore ) ; - if( n_hStoreHandle == NULL ) { - fprintf( stderr, "Can not open the system cert store %s\n", n_pCertStore ) ; - return 1 ; - } - } else { - n_pCertStore = NULL ; - n_hStoreHandle = NULL ; - } - xmlSecMSCryptoAppInit( n_pCertStore ) ; - - //Load XML document - doc = xmlParseFile( argv[1] ) ; - if( doc == NULL || xmlDocGetRootElement( doc ) == NULL ) { - fprintf( stderr , "### Cannot load template xml document!\n" ) ; - goto done ; - } - - //Find the signature template - tplNode = xmlSecFindNode( xmlDocGetRootElement( doc ), xmlSecNodeSignature, xmlSecDSigNs ) ; - if( tplNode == NULL ) { - fprintf( stderr , "### Cannot find the signature template!\n" ) ; - goto done ; - } - - //Find the element with ID attribute - //Here we only try to find the "document" node. - tarNode = xmlSecFindNode( xmlDocGetRootElement( doc ), ( xmlChar* )"document", ( xmlChar* )"http://openoffice.org/2000/office" ) ; - if( tarNode == NULL ) { - tarNode = xmlSecFindNode( xmlDocGetRootElement( doc ), ( xmlChar* )"document", NULL ) ; - } - - //Find the "id" attrbute in the element - if( tarNode != NULL ) { - if( ( idAttr = xmlHasProp( tarNode, ( xmlChar* )"id" ) ) != NULL ) { - //NULL - } else if( ( idAttr = xmlHasProp( tarNode, ( xmlChar* )"Id" ) ) != NULL ) { - //NULL - } else { - idAttr = NULL ; - } - } - - //Add ID to DOM - if( idAttr != NULL ) { - idValue = xmlNodeListGetString( tarNode->doc, idAttr->children, 1 ) ; - if( idValue == NULL ) { - fprintf( stderr , "### the ID value is NULL!\n" ) ; - goto done ; - } - - if( xmlAddID( NULL, doc, idValue, idAttr ) == NULL ) { - fprintf( stderr , "### Can not add the ID value!\n" ) ; - goto done ; - } - } - - //Reference handler - //Find the signature reference - tarNode = xmlSecFindNode( tplNode, xmlSecNodeReference, xmlSecDSigNs ) ; - if( tarNode == NULL ) { - fprintf( stderr , "### Cannot find the signature reference!\n" ) ; - goto done ; - } - - //Find the "URI" attrbute in the reference - uriAttr = xmlHasProp( tarNode, ( xmlChar* )"URI" ) ; - if( tarNode == NULL ) { - fprintf( stderr , "### Cannot find URI of the reference!\n" ) ; - goto done ; - } - - //Get the "URI" attrbute value - uriValue = xmlNodeListGetString( tarNode->doc, uriAttr->children, 1 ) ; - if( uriValue == NULL ) { - fprintf( stderr , "### the URI value is NULL!\n" ) ; - goto done ; - } - - if( strchr( ( const char* )uriValue, '/' ) != NULL && strchr( ( const char* )uriValue, '#' ) == NULL ) { - fprintf( stdout , "### Find a stream URI [%s]\n", uriValue ) ; - // uri = new ::rtl::OUString( ( const sal_Unicode* )uriValue ) ; - uri = new ::rtl::OUString( ( const sal_Char* )uriValue, xmlStrlen( uriValue ), RTL_TEXTENCODING_ASCII_US ) ; - } - - if( uri != NULL ) { - fprintf( stdout , "### Find the URI [%s]\n", OUStringToOString( *uri , RTL_TEXTENCODING_ASCII_US ).getStr() ) ; - Reference< XInputStream > xStream = createStreamFromFile( *uri ) ; - if( !xStream.is() ) { - fprintf( stderr , "### Can not get the URI stream!\n" ) ; - goto done ; - } - - xUriBinding = new OUriBinding( *uri, xStream ) ; - } - - try { - Reference< XMultiComponentFactory > xManager = NULL ; - Reference< XComponentContext > xContext = NULL ; - - xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[3] ) ) ; - OSL_ENSURE( xManager.is() , - "ServicesManager - " - "Cannot get service manager" ) ; - - //Create signature template - Reference< XInterface > element = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ; - OSL_ENSURE( element.is() , - "Signer - " - "Cannot get service instance of \"wrapper.XMLElementWrapper\"" ) ; - - Reference< XXMLElementWrapper > xElement( element , UNO_QUERY ) ; - OSL_ENSURE( xElement.is() , - "Signer - " - "Cannot get interface of \"XXMLElement\" from service \"xsec.XMLElement\"" ) ; - - Reference< XUnoTunnel > xEleTunnel( xElement , UNO_QUERY ) ; - OSL_ENSURE( xEleTunnel.is() , - "Signer - " - "Cannot get interface of \"XUnoTunnel\" from service \"xsec.XMLElement\"" ) ; - - XMLElementWrapper_XmlSecImpl* pElement = ( XMLElementWrapper_XmlSecImpl* )xEleTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ) ; - OSL_ENSURE( pElement != NULL , - "Signer - " - "Cannot get implementation of \"xsec.XMLElement\"" ) ; - - //Set signature template - pElement->setNativeElement( tplNode ) ; - - //Build XML Signature template - Reference< XInterface > signtpl = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLSignatureTemplate")) , xContext ) ; - OSL_ENSURE( signtpl.is() , - "Signer - " - "Cannot get service instance of \"xsec.XMLSignatureTemplate\"" ) ; - - Reference< XXMLSignatureTemplate > xTemplate( signtpl , UNO_QUERY ) ; - OSL_ENSURE( xTemplate.is() , - "Signer - " - "Cannot get interface of \"XXMLSignatureTemplate\" from service \"xsec.XMLSignatureTemplate\"" ) ; - - //Import the signature template - xTemplate->setTemplate( xElement ) ; - - //Import the URI/Stream binding - if( xUriBinding.is() ) - xTemplate->setBinding( xUriBinding ) ; - - //Create security environment - //Build Security Environment - Reference< XInterface > xsecenv = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_MSCryptImpl")), xContext ) ; - OSL_ENSURE( xsecenv.is() , - "Signer - " - "Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ; - - Reference< XSecurityEnvironment > xSecEnv( xsecenv , UNO_QUERY ) ; - OSL_ENSURE( xSecEnv.is() , - "Signer - " - "Cannot get interface of \"XSecurityEnvironment\" from service \"xsec.SecurityEnvironment\"" ) ; - - //Setup key slot and certDb - Reference< XUnoTunnel > xEnvTunnel( xsecenv , UNO_QUERY ) ; - OSL_ENSURE( xElement.is() , - "Signer - " - "Cannot get interface of \"XUnoTunnel\" from service \"xsec.SecurityEnvironment\"" ) ; - - SecurityEnvironment_MSCryptImpl* pSecEnv = ( SecurityEnvironment_MSCryptImpl* )xEnvTunnel->getSomething( SecurityEnvironment_MSCryptImpl::getUnoTunnelId() ) ; - OSL_ENSURE( pSecEnv != NULL , - "Signer - " - "Cannot get implementation of \"xsec.SecurityEnvironment\"" ) ; - - //Setup key slot and certDb - if( n_hStoreHandle != NULL ) { - pSecEnv->setCryptoSlot( n_hStoreHandle ) ; - pSecEnv->setCertDb( n_hStoreHandle ) ; - } else { - pSecEnv->enableDefaultCrypt( sal_True ) ; - } - - //Build XML Security Context - Reference< XInterface > xmlsecctx = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_MSCryptImpl")), xContext ) ; - OSL_ENSURE( xsecenv.is() , - "Signer - " - "Cannot get service instance of \"xsec.XMLSecurityContext\"" ) ; - - Reference< XXMLSecurityContext > xSecCtx( xmlsecctx , UNO_QUERY ) ; - OSL_ENSURE( xSecCtx.is() , - "Signer - " - "Cannot get interface of \"XXMLSecurityContext\" from service \"xsec.XMLSecurityContext\"" ) ; - - xSecCtx->addSecurityEnvironment( xSecEnv ) ; - - //Generate XML signature - Reference< XInterface > xmlsigner = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_MSCryptImpl")), xContext ) ; - OSL_ENSURE( xmlsigner.is() , - "Signer - " - "Cannot get service instance of \"xsec.XMLSignature\"" ) ; - - Reference< XXMLSignature > xSigner( xmlsigner , UNO_QUERY ) ; - OSL_ENSURE( xSigner.is() , - "Signer - " - "Cannot get interface of \"XXMLSignature\" from service \"xsec.XMLSignature\"" ) ; - - //perform signature - xTemplate = xSigner->generate( xTemplate , xSecEnv ) ; - OSL_ENSURE( xTemplate.is() , - "Signer - " - "Cannot generate the xml signature" ) ; - - SecurityOperationStatus m_nStatus = xTemplate->getStatus(); - - if (m_nStatus == SecurityOperationStatus_OPERATION_SUCCEEDED) - { - fprintf( stdout, "Operation succeeds.\n") ; - } - else - { - fprintf( stdout, "Operation fails.\n") ; - } - } catch( Exception& e ) { - fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ; - goto done ; - } - - dstFile = fopen( argv[2], "w" ) ; - if( dstFile == NULL ) { - fprintf( stderr , "### Can not open file %s\n", argv[2] ) ; - goto done ; - } - - //Save result - xmlDocDump( dstFile, doc ) ; - -done: - if( uri != NULL ) - delete uri ; - - if( dstFile != NULL ) - fclose( dstFile ) ; - - if( doc != NULL ) - xmlFreeDoc( doc ) ; - - if( n_hStoreHandle != NULL ) - CertCloseStore( n_hStoreHandle, CERT_CLOSE_STORE_FORCE_FLAG ) ; - - xmlSecMSCryptoAppShutdown() ; - - /* Shutdown libxslt/libxml */ - #ifndef XMLSEC_NO_XSLT - xsltCleanupGlobals(); - #endif /* XMLSEC_NO_XSLT */ - xmlCleanupParser(); - - } - - return 0; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/tools/standalone/mscsfit/util/makefile.mk b/xmlsecurity/tools/standalone/mscsfit/util/makefile.mk deleted file mode 100644 index 16236ab60..000000000 --- a/xmlsecurity/tools/standalone/mscsfit/util/makefile.mk +++ /dev/null @@ -1,174 +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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/..$/..$/.. - -PRJNAME=xmlsecurity -TARGET=xmlsecurity-mscsfit-boot -TARGETTYPE=GUI - -GEN_HID=TRUE -APP2NOSAL=TRUE - -# --- Settings ----------------------------------------------------------- -USE_JAVAVER=TRUE - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/target.pmk - -VERINFONAME=verinfo - -.INCLUDE : target.mk - -# ------------------------------------------------------------------------- -# --- Targets ------------------------------------------------------------- - -ALLTAR : $(BIN)$/boot_services.rdb - -REGISTERLIBS= \ - i18npool.uno$(DLLPOST) \ - $(DLLPRE)tk$(DLLPOSTFIX)$(DLLPOST) \ - $(DLLPRE)mcnttype$(DLLPOST) - -# $(DLLPRE)i18n$(DLLPOSTFIX)$(DLLPOST) \ -# $(DLLPRE)i18npool$(DLLPOSTFIX)$(DLLPOST) \ -# $(DLLPRE)tk$(DLLPOSTFIX)$(DLLPOST) \ -# $(DLLPRE)mcnttype$(DLLPOST) - -# Additional libraries -DLLPRE_NO= -REGISTERLIBS+= \ - $(DLLPRE_NO)dynamicloader.uno$(DLLPOST) \ - $(DLLPRE_NO)namingservice.uno$(DLLPOST) \ - $(DLLPRE_NO)bootstrap.uno$(DLLPOST) \ - $(DLLPRE)xsec_fw$(DLLPOST) \ - $(DLLPRE)xsec_xmlsec$(DLLPOST) - -.IF "$(GUI)" == "UNX" -MY_DLLDIR=$(SOLARLIBDIR) -REGISTERLIBS+= \ - $(DLLPRE)dtransX11$(DLLPOSTFIX)$(DLLPOST) - -.ELSE # "$(GUI)" == "UNX" -.IF "$(GUI)"=="WNT" - -MY_DLLDIR=$(SOLARBINDIR) -REGISTERLIBS+= \ - $(DLLPRE)sysdtrans$(DLLPOST) \ - $(DLLPRE)ftransl$(DLLPOST) \ - $(DLLPRE)dnd$(DLLPOST) - -.ELSE # "$(GUI)"=="WNT" - - @echo "**********************************************************" - @echo "*** unknown platform: don't know which librarys to use ***" - @echo "**********************************************************" - force_dmake_to_error -.ENDIF # "$(GUI)"=="WNT" -.ENDIF # "$(GUI)" == "UNX" - -.IF "$(SOLAR_JAVA)" != "" -.IF "$(JAVANUMVER)" >= "000100040000" -# native libraries, which are only necessary, when java shall run within setup -REGISTERLIBS_JAVA= \ - javavm.uno$(DLLPOST) \ - javaloader.uno$(DLLPOST) - -# add here java components, which shall run with setup -REGISTERJARS=\ - java_uno_accessbridge.jar -# xsec_jxsec.jar - -# jar-files, which regcomp needs so that it can use java -REGCOMP_JARS=unoil.jar java_uno.jar ridl.jar jurt.jar juh.jar - -# CLASSPATH, which regcomp needs to be run -# $(SOLARLIBDIR) needs to be included in case Java components are registered, -# because java_uno.jar needs to find the native java_uno shared library: -MY_CLASSPATH_TMP=$(foreach,i,$(REGCOMP_JARS) $(SOLARBINDIR)$/$i)$(PATH_SEPERATOR)$(SOLARLIBDIR)$(PATH_SEPERATOR)$(XCLASSPATH) -REGCOMP_CLASSPATH=$(strip $(subst,!,$(PATH_SEPERATOR) $(MY_CLASSPATH_TMP:s/ /!/))) - -.IF "$(GUI)"!="WNT" -DOLLAR_SIGN=\$$ -MY_JAVA_COMPPATH=file://$(SOLARBINDIR) -.IF "$(OS)"=="MACOSX" -REGCOMP_ENV=\ - setenv CLASSPATH $(REGCOMP_CLASSPATH) && \ - setenv DYLD_LIBRARY_PATH $(DYLD_LIBRARY_PATH):$(JDKLIB) -.ELSE -REGCOMP_ENV=\ - setenv CLASSPATH $(REGCOMP_CLASSPATH) && \ - setenv LD_LIBRARY_PATH $(LD_LIBRARY_PATH):$(JDKLIB) -.ENDIF -.ELSE # "$(GUI)" != "WNT" -.IF "$(USE_SHELL)" != "4nt" -DOLLAR_SIGN=\$$ -REGCOMP_ENV=\ - setenv CLASSPATH "$(strip $(subst,\,/ $(shell @guw.pl echo $(REGCOMP_CLASSPATH))))" && \ - setenv PATH "$(PATH):$(JREPATH)" -MY_JAVA_COMPPATH=$(strip $(subst,\,/ file:///$(shell @guw.pl echo $(SOLARBINDIR)))) -.ELSE # "$(USE_SHELL)" != "4nt" -DOLLAR_SIGN=$$ -REGCOMP_ENV=\ - set CLASSPATH=$(REGCOMP_CLASSPATH) && \ - set PATH=$(PATH);$(JREPATH) -MY_JAVA_COMPPATH=$(strip $(subst,\,/ file:///$(SOLARBINDIR))) -.ENDIF # "$(USE_SHELL)" != "4nt" -.ENDIF # "$(GUI)"!="WNT" -.ENDIF # "$(JAVANUMVER)" >= "000100040000" -.ENDIF # "$(SOLAR_JAVA)" != "" - -$(BIN)$/boot_services.rdb: \ - makefile.mk \ - $(foreach,i,$(REGISTERLIBS) $(MY_DLLDIR)$/$(i)) \ - $(foreach,i,$(REGISTERLIBS_JAVA) $(MY_DLLDIR)$/$(i)) - -rm -f $@ $(BIN)$/regcomp.rdb $(BIN)$/boot_services.tmp -# register the native libraries - $(REGCOMP) -register -r $(BIN)$/boot_services.tmp -c "$(strip $(REGISTERLIBS))" -.IF "$(SOLAR_JAVA)" != "" -.IF "$(OS)"!="MACOSX" -.IF "$(JAVANUMVER)" >= "000100040000" - $(REGCOMP) -register -r $(BIN)$/boot_services.tmp -c "$(strip $(REGISTERLIBS_JAVA))" -# prepare a registry which regcomp can work on (types+java services) - $(REGCOMP) -register -r $(BIN)$/regcomp.rdb -c "$(strip $(REGISTERLIBS_JAVA))" - $(REGMERGE) $(BIN)$/regcomp.rdb / $(SOLARBINDIR)/udkapi.rdb -# now do the registration - $(REGCOMP_ENV) && \ - $(REGCOMP) -br $(BIN)$/regcomp.rdb \ - -register \ - -r $(BIN)$/boot_services.tmp \ - -l com.sun.star.loader.Java2 \ - -env:UNO_JAVA_COMPPATH=$(MY_JAVA_COMPPATH) \ - $(foreach,i,$(REGISTERJARS) -c vnd.sun.star.expand:$(DOLLAR_SIGN)UNO_JAVA_COMPPATH/$(i)) -# $(foreach,i,$(REGISTERJARS) -c vnd.sun.star.expand:$(DOLLAR_SIGN)UNO_JAVA_COMPPATH/$(i)) -c $(MY_JAVA_COMPPATH)$/xsec_jxsec.jar - -.ENDIF # "$(JAVANUMVER)" >= "000100040000" -.ENDIF # "$(OS)" != "MACOSX" -.ENDIF # "$(SOLAR_JAVA)" != "" -# to have a transaction, move it now to the final name - $(REGMERGE) $(BIN)$/boot_services.tmp / $(SOLARBINDIR)/types.rdb - mv $(BIN)$/boot_services.tmp $@ - diff --git a/xmlsecurity/tools/standalone/mscsfit/verifier.cxx b/xmlsecurity/tools/standalone/mscsfit/verifier.cxx deleted file mode 100644 index 6ba703da5..000000000 --- a/xmlsecurity/tools/standalone/mscsfit/verifier.cxx +++ /dev/null @@ -1,329 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/** -- C++ Source File -- **/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_xmlsecurity.hxx" -#include -#include "helper.hxx" - -#include "libxml/tree.h" -#include "libxml/parser.h" -#ifndef XMLSEC_NO_XSLT -#include "libxslt/xslt.h" -#endif - -#include "securityenvironment_mscryptimpl.hxx" -#include "xmlelementwrapper_xmlsecimpl.hxx" - -#include "xmlsec/strings.h" -#include "xmlsec/mscrypto/app.h" -#include "xmlsec/xmltree.h" - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace ::rtl ; -using namespace ::cppu ; -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::io ; -using namespace ::com::sun::star::ucb ; -using namespace ::com::sun::star::beans ; -using namespace ::com::sun::star::document ; -using namespace ::com::sun::star::lang ; -using namespace ::com::sun::star::registry ; -using namespace ::com::sun::star::xml::wrapper ; -using namespace ::com::sun::star::xml::crypto ; - - -int SAL_CALL main( int argc, char **argv ) -{ - const char* n_pCertStore ; - HCERTSTORE n_hStoreHandle ; - - xmlDocPtr doc = NULL ; - xmlNodePtr tplNode ; - xmlNodePtr tarNode ; - xmlAttrPtr idAttr ; - xmlChar* idValue ; - xmlAttrPtr uriAttr ; - xmlChar* uriValue ; - OUString* uri = NULL ; - Reference< XUriBinding > xUriBinding ; - - if( argc !=3 && argc != 4 ) { - fprintf( stderr, "Usage: %s \n" , argv[0] ) ; - fprintf( stderr, "Or: \t%s < Cert Store Name >\n\n" , argv[0] ) ; - return 1 ; - } - - for( int hhh = 0 ; hhh < 1 ; hhh ++ ) { - - //Init libxml and libxslt libraries - xmlInitParser(); - LIBXML_TEST_VERSION - xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS; - xmlSubstituteEntitiesDefault(1); - - #ifndef XMLSEC_NO_XSLT - xmlIndentTreeOutput = 1; - #endif // XMLSEC_NO_XSLT - - //Initialize the crypto engine - if( argc == 4 ) { - n_pCertStore = argv[3] ; - n_hStoreHandle = CertOpenSystemStore( NULL, n_pCertStore ) ; - if( n_hStoreHandle == NULL ) { - fprintf( stderr, "Can not open the system cert store %s\n", n_pCertStore ) ; - return 1 ; - } - } else { - n_pCertStore = NULL ; - n_hStoreHandle = NULL ; - } - xmlSecMSCryptoAppInit( n_pCertStore ) ; - - //Load XML document - doc = xmlParseFile( argv[1] ) ; - if( doc == NULL || xmlDocGetRootElement( doc ) == NULL ) { - fprintf( stderr , "### Cannot load template xml document!\n" ) ; - goto done ; - } - - //Find the signature template - tplNode = xmlSecFindNode( xmlDocGetRootElement( doc ), xmlSecNodeSignature, xmlSecDSigNs ) ; - if( tplNode == NULL ) { - fprintf( stderr , "### Cannot find the signature template!\n" ) ; - goto done ; - } - - //Find the element with ID attribute - tarNode = xmlSecFindNode( xmlDocGetRootElement( doc ), ( xmlChar* )"document", ( xmlChar* )"http://openoffice.org/2000/office" ) ; - if( tarNode == NULL ) { - tarNode = xmlSecFindNode( xmlDocGetRootElement( doc ), ( xmlChar* )"document", NULL ) ; - } - - //Find the "id" attrbute in the element - if( tarNode != NULL ) { - if( ( idAttr = xmlHasProp( tarNode, ( xmlChar* )"id" ) ) != NULL ) { - //NULL - } else if( ( idAttr = xmlHasProp( tarNode, ( xmlChar* )"Id" ) ) != NULL ) { - //NULL - } else { - idAttr = NULL ; - } - } - - //Add ID to DOM - if( idAttr != NULL ) { - idValue = xmlNodeListGetString( tarNode->doc, idAttr->children, 1 ) ; - if( idValue == NULL ) { - fprintf( stderr , "### the ID value is NULL!\n" ) ; - goto done ; - } - - if( xmlAddID( NULL, doc, idValue, idAttr ) == NULL ) { - fprintf( stderr , "### Can not add the ID value!\n" ) ; - goto done ; - } - } - - //Reference handler - //Find the signature reference - tarNode = xmlSecFindNode( tplNode, xmlSecNodeReference, xmlSecDSigNs ) ; - if( tarNode == NULL ) { - fprintf( stderr , "### Cannot find the signature reference!\n" ) ; - goto done ; - } - - //Find the "URI" attrbute in the reference - uriAttr = xmlHasProp( tarNode, ( xmlChar* )"URI" ) ; - if( tarNode == NULL ) { - fprintf( stderr , "### Cannot find URI of the reference!\n" ) ; - goto done ; - } - - //Get the "URI" attrbute value - uriValue = xmlNodeListGetString( tarNode->doc, uriAttr->children, 1 ) ; - if( uriValue == NULL ) { - fprintf( stderr , "### the URI value is NULL!\n" ) ; - goto done ; - } - - if( strchr( ( const char* )uriValue, '/' ) != NULL && strchr( ( const char* )uriValue, '#' ) == NULL ) { - fprintf( stdout , "### Find a stream URI [%s]\n", uriValue ) ; - // uri = new ::rtl::OUString( ( const sal_Unicode* )uriValue ) ; - uri = new ::rtl::OUString( ( const sal_Char* )uriValue, xmlStrlen( uriValue ), RTL_TEXTENCODING_ASCII_US ) ; - } - - if( uri != NULL ) { - fprintf( stdout , "### Find the URI [%s]\n", OUStringToOString( *uri , RTL_TEXTENCODING_ASCII_US ).getStr() ) ; - Reference< XInputStream > xStream = createStreamFromFile( *uri ) ; - if( !xStream.is() ) { - fprintf( stderr , "### Can not get the URI stream!\n" ) ; - goto done ; - } - - xUriBinding = new OUriBinding( *uri, xStream ) ; - } - - - try { - Reference< XMultiComponentFactory > xManager = NULL ; - Reference< XComponentContext > xContext = NULL ; - - xManager = serviceManager( xContext , OUString(RTL_CONSTASCII_USTRINGPARAM("local")), OUString::createFromAscii( argv[2] ) ) ; - - //Create signature template - Reference< XInterface > element = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl")) , xContext ) ; - OSL_ENSURE( element.is() , - "Verifier - " - "Cannot get service instance of \"xsec.XMLElementWrapper\"" ) ; - - Reference< XXMLElementWrapper > xElement( element , UNO_QUERY ) ; - OSL_ENSURE( xElement.is() , - "Verifier - " - "Cannot get interface of \"XXMLElementWrapper\" from service \"xsec.XMLElementWrapper\"" ) ; - - Reference< XUnoTunnel > xEleTunnel( xElement , UNO_QUERY ) ; - OSL_ENSURE( xEleTunnel.is() , - "Verifier - " - "Cannot get interface of \"XUnoTunnel\" from service \"xsec.XMLElement\"" ) ; - - XMLElementWrapper_XmlSecImpl* pElement = ( XMLElementWrapper_XmlSecImpl* )xEleTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ) ; - OSL_ENSURE( pElement != NULL , - "Verifier - " - "Cannot get implementation of \"xsec.XMLElementWrapper\"" ) ; - - //Set signature template - pElement->setNativeElement( tplNode ) ; - - //Build XML Signature template - Reference< XInterface > signtpl = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.crypto.XMLSignatureTemplate")), xContext ) ; - OSL_ENSURE( signtpl.is() , - "Verifier - " - "Cannot get service instance of \"xsec.XMLSignatureTemplate\"" ) ; - - Reference< XXMLSignatureTemplate > xTemplate( signtpl , UNO_QUERY ) ; - OSL_ENSURE( xTemplate.is() , - "Verifier - " - "Cannot get interface of \"XXMLSignatureTemplate\" from service \"xsec.XMLSignatureTemplate\"" ) ; - - //Import the signature template - xTemplate->setTemplate( xElement ) ; - - //Import the URI/Stream binding - if( xUriBinding.is() ) - xTemplate->setBinding( xUriBinding ) ; - - //Create security environment - //Build Security Environment - Reference< XInterface > xsecenv = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_MSCryptImpl")), xContext ) ; - OSL_ENSURE( xsecenv.is() , - "Verifier - " - "Cannot get service instance of \"xsec.SecurityEnvironment\"" ) ; - - Reference< XSecurityEnvironment > xSecEnv( xsecenv , UNO_QUERY ) ; - OSL_ENSURE( xSecEnv.is() , - "Verifier - " - "Cannot get interface of \"XSecurityEnvironment\" from service \"xsec.SecurityEnvironment\"" ) ; - - //Setup key slot and certDb - Reference< XUnoTunnel > xEnvTunnel( xsecenv , UNO_QUERY ) ; - OSL_ENSURE( xElement.is() , - "Verifier - " - "Cannot get interface of \"XUnoTunnel\" from service \"xsec.SecurityEnvironment\"" ) ; - - SecurityEnvironment_MSCryptImpl* pSecEnv = ( SecurityEnvironment_MSCryptImpl* )xEnvTunnel->getSomething( SecurityEnvironment_MSCryptImpl::getUnoTunnelId() ) ; - OSL_ENSURE( pSecEnv != NULL , - "Verifier - " - "Cannot get implementation of \"xsec.SecurityEnvironment\"" ) ; - - //Setup key slot and certDb - if( n_hStoreHandle != NULL ) { - pSecEnv->setCryptoSlot( n_hStoreHandle ) ; - pSecEnv->setCertDb( n_hStoreHandle ) ; - } else { - pSecEnv->enableDefaultCrypt( sal_True ) ; - } - - //Build XML Security Context - Reference< XInterface > xmlsecctx = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_MSCryptImpl")), xContext ) ; - OSL_ENSURE( xsecenv.is() , - "Verifier - " - "Cannot get service instance of \"xsec.XMLSecurityContext\"" ) ; - - Reference< XXMLSecurityContext > xSecCtx( xmlsecctx , UNO_QUERY ) ; - OSL_ENSURE( xSecCtx.is() , - "Verifier - " - "Cannot get interface of \"XXMLSecurityContext\" from service \"xsec.XMLSecurityContext\"" ) ; - - xSecCtx->addSecurityEnvironment( xSecEnv ) ; - - //Generate XML signature - Reference< XInterface > xmlsigner = - xManager->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_MSCryptImpl")), xContext ) ; - OSL_ENSURE( xmlsigner.is() , - "Verifier - " - "Cannot get service instance of \"xsec.XMLSignature\"" ) ; - - Reference< XXMLSignature > xSigner( xmlsigner , UNO_QUERY ) ; - OSL_ENSURE( xSigner.is() , - "Verifier - " - "Cannot get interface of \"XXMLSignature\" from service \"xsec.XMLSignature\"" ) ; - - - //perform validation - xTemplate = xSigner->validate( xTemplate , xSecCtx ) ; - - com::sun::star::xml::crypto::SecurityOperationStatus m_nStatus = xTemplate->getStatus(); - - if (m_nStatus == SecurityOperationStatus_OPERATION_SUCCEEDED) - { - fprintf( stdout, "Operation succeeds.\n") ; - } - else - { - fprintf( stdout, "Operation fails.\n") ; - } - } catch( Exception& e ) { - fprintf( stderr , "Error Message: %s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ) ; - goto done ; - } - -done : - if( uri != NULL ) - delete uri ; - - if( doc != NULL ) - xmlFreeDoc( doc ) ; - - if( n_hStoreHandle != NULL ) - CertCloseStore( n_hStoreHandle, CERT_CLOSE_STORE_FORCE_FLAG ) ; - - xmlSecMSCryptoAppShutdown() ; - - /* Shutdown libxslt/libxml */ - #ifndef XMLSEC_NO_XSLT - xsltCleanupGlobals(); - #endif /* XMLSEC_NO_XSLT */ - xmlCleanupParser(); - - } - - return 0 ; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/tools/standalone/readme.txt b/xmlsecurity/tools/standalone/readme.txt deleted file mode 100644 index 8ea7fa2ff..000000000 --- a/xmlsecurity/tools/standalone/readme.txt +++ /dev/null @@ -1,19 +0,0 @@ -How to use the standalone program - -After building, there is two programs named jsfit.dsig.signer and jsfit.dsig.verifier under the class folder, these two program are used to test the jsr based bridge component. - -After installation, you need do following step to launch the program. - -1) create a temporary folder - -2) copy services.rdb, types.rdb and setup_services.rdb from the /program folder to the temporary folder, - -3) in the temporary folder, merge both the types.rdb and the setup_services.rdb into the services.rdb. - -4) register jsr-based component into services.rdb - -5) run the signer program - -6) run the verifier program - -7) remove the temporary folder diff --git a/xmlsecurity/tools/uno/AdapterNode.java b/xmlsecurity/tools/uno/AdapterNode.java deleted file mode 100644 index b42b7a3b3..000000000 --- a/xmlsecurity/tools/uno/AdapterNode.java +++ /dev/null @@ -1,165 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package com.sun.star.xml.security.uno; - -import org.w3c.dom.Node; -import org.w3c.dom.Attr; -import org.w3c.dom.NamedNodeMap; - - -/* - * This class wraps a DOM node and returns the text we want to - * display in the tree. It also returns children, index values, - * and child counts. - */ -class AdapterNode -{ - private Node m_domNode; - static final int ELEMENT_TYPE = Node.ELEMENT_NODE; - - /* - * An array of names for DOM node-types - */ - static final String[] typeName = { - "none", - "Element", - "Attr", - "Text", - "CDATA", - "EntityRef", - "Entity", - "ProcInstr", - "Comment", - "Document", - "DocType", - "DocFragment", - "Notation", - }; - - protected Node getNode() - { - return m_domNode; - } - - /* - * Construct an Adapter node from a DOM node - */ - protected AdapterNode(org.w3c.dom.Node node) - { - m_domNode = node; - } - - /* - * Return children, index, and count values - */ - protected int index(AdapterNode child) - { - int count = childCount(); - for (int i=0; i - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package com.sun.star.xml.security.uno; - -import java.util.Vector; -import com.sun.star.xml.sax.XAttributeList; - -/** - * Class to construct an attribute list, and provide a XAttributeList - * interface. - * - * @author Michael Mi - * @version %I%, %G% - */ -public class AttributeListHelper implements com.sun.star.xml.sax.XAttributeList -{ - private Vector m_AttributeList; - - public AttributeListHelper() - { - m_AttributeList = new Vector(); - } - - public void clear() - { - m_AttributeList.removeAllElements(); - } - - public void setAttribute(String name, String type, String value) - { - int nLength = m_AttributeList.size(); - boolean bFound = false; - - for (int i=0; i=0 && index - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package com.sun.star.xml.security.uno; - -import org.w3c.dom.Document; -import javax.swing.event.TreeModelListener; -import javax.swing.event.TreeModelEvent; -import javax.swing.tree.TreePath; -import java.util.Enumeration; -import java.util.Vector; - -/* - * This adapter converts the current Document (a DOM) into - * a JTree model. - */ -class DomToTreeModelAdapter - implements javax.swing.tree.TreeModel -{ - private Document m_document; - private Vector m_listenerList = new Vector(); - - public DomToTreeModelAdapter(Document document) - { - m_document = document; - } - - /* - * Basic TreeModel operations - */ - public Object getRoot() - { - return new AdapterNode(m_document); - } - - public boolean isLeaf(Object aNode) - { - boolean rc = true; - - /* - * Determines whether the icon shows up to the left. - * Return true for any node with no children. - */ - AdapterNode node = (AdapterNode) aNode; - - if (node.childCount() > 0) - { - rc = false; - } - - return rc; - } - - public int getChildCount(Object parent) - { - AdapterNode node = (AdapterNode) parent; - return node.childCount(); - } - - public Object getChild(Object parent, int index) - { - AdapterNode node = (AdapterNode) parent; - return node.child(index); - } - - public int getIndexOfChild(Object parent, Object child) - { - AdapterNode node = (AdapterNode) parent; - return node.index((AdapterNode) child); - } - - public void valueForPathChanged(TreePath path, Object newValue) - { - /* - * Null. We won't be making changes in the GUI - * If we did, we would ensure the new value was really new, - * adjust the model, and then fire a TreeNodesChanged event. - */ - } - - public void addTreeModelListener(TreeModelListener listener) - { - if ( listener != null - && ! m_listenerList.contains( listener ) ) - { - m_listenerList.addElement( listener ); - } - } - - public void removeTreeModelListener(TreeModelListener listener) - { - if ( listener != null ) - { - m_listenerList.removeElement( listener ); - } - } - - public void fireTreeNodesChanged( TreeModelEvent e ) - { - Enumeration listeners = m_listenerList.elements(); - while ( listeners.hasMoreElements() ) - { - TreeModelListener listener = - (TreeModelListener) listeners.nextElement(); - listener.treeNodesChanged( e ); - } - } - - public void fireTreeNodesInserted( TreeModelEvent e ) - { - Enumeration listeners = m_listenerList.elements(); - while ( listeners.hasMoreElements() ) - { - TreeModelListener listener = - (TreeModelListener) listeners.nextElement(); - listener.treeNodesInserted( e ); - } - } - - public void fireTreeNodesRemoved( TreeModelEvent e ) - { - Enumeration listeners = m_listenerList.elements(); - while ( listeners.hasMoreElements() ) - { - TreeModelListener listener = - (TreeModelListener) listeners.nextElement(); - listener.treeNodesRemoved( e ); - } - } - - public void fireTreeStructureChanged( TreeModelEvent e ) - { - Enumeration listeners = m_listenerList.elements(); - while ( listeners.hasMoreElements() ) - { - TreeModelListener listener = - (TreeModelListener) listeners.nextElement(); - listener.treeStructureChanged( e ); - } - } -} - diff --git a/xmlsecurity/tools/uno/EncryptionEntity.java b/xmlsecurity/tools/uno/EncryptionEntity.java deleted file mode 100644 index 49e1c8630..000000000 --- a/xmlsecurity/tools/uno/EncryptionEntity.java +++ /dev/null @@ -1,218 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package com.sun.star.xml.security.uno; - -/* uno classes */ -import com.sun.star.uno.UnoRuntime; -import com.sun.star.lang.XMultiComponentFactory; -import com.sun.star.lang.XInitialization; -import com.sun.star.uno.XComponentContext; - -import com.sun.star.xml.crypto.*; -import com.sun.star.xml.crypto.sax.*; - -/* - * this class maintains the data for an encryption operation. - */ -class EncryptionEntity extends SecurityEntity -{ - private int m_nEncryptionElementCollectorId; - - EncryptionEntity( - XSecuritySAXEventKeeper xSAXEventKeeper, - boolean isExporting, - Object resultListener, - XXMLSecurityContext xXMLSecurityContext, - XXMLSignature xXMLSignature, - XXMLEncryption xXMLEncryption, - XMultiComponentFactory xRemoteServiceManager, - XComponentContext xRemoteContext) - { - super(xSAXEventKeeper, xXMLSecurityContext, xXMLSignature, - xXMLEncryption, xRemoteServiceManager, xRemoteContext); - - m_nEncryptionElementCollectorId = m_xSAXEventKeeper.addSecurityElementCollector( - ElementMarkPriority.AFTERMODIFY, - true); - - m_xSAXEventKeeper.setSecurityId(m_nEncryptionElementCollectorId, m_nSecurityId); - - if (isExporting) - { - try - { - /* - * creates a Encryptor. - */ - Object encryptor = m_xRemoteServiceManager.createInstanceWithContext( - TestTool.ENCRYPTOR_COMPONENT, m_xRemoteContext); - - m_xReferenceResolvedListener = - (XReferenceResolvedListener)UnoRuntime.queryInterface( - XReferenceResolvedListener.class, encryptor); - - /* - * initializes the Encryptor. - */ - XInitialization xInitialization = - (XInitialization)UnoRuntime.queryInterface( - XInitialization.class, m_xReferenceResolvedListener); - Object args[]=new Object[5]; - args[0] = new Integer(m_nSecurityId).toString(); - args[1] = m_xSAXEventKeeper; - args[2] = new Integer(m_nEncryptionElementCollectorId).toString(); - args[3] = m_xXMLSecurityContext.getSecurityEnvironment(); - args[4] = m_xXMLEncryption; - xInitialization.initialize(args); - - /* - * sets encryption result listener. - */ - XEncryptionResultBroadcaster m_xEncryptionResultBroadcaster = - (XEncryptionResultBroadcaster)UnoRuntime.queryInterface( - XEncryptionResultBroadcaster.class, m_xReferenceResolvedListener); - m_xEncryptionResultBroadcaster.addEncryptionResultListener( - (XEncryptionResultListener)UnoRuntime.queryInterface( - XEncryptionResultListener.class, resultListener)); - } - catch( com.sun.star.uno.Exception e) - { - e.printStackTrace(); - } - } - else - { - try{ - /* - * creates a Decryptor. - */ - Object decryptor = m_xRemoteServiceManager.createInstanceWithContext( - TestTool.DECRYPTOR_COMPONENT, m_xRemoteContext); - - m_xReferenceResolvedListener = - (XReferenceResolvedListener)UnoRuntime.queryInterface( - XReferenceResolvedListener.class, decryptor); - - /* - * initializes the Decryptor. - */ - XInitialization xInitialization = (XInitialization)UnoRuntime.queryInterface(XInitialization.class, m_xReferenceResolvedListener); - Object args[]=new Object[5]; - args[0] = new Integer(m_nSecurityId).toString(); - args[1] = m_xSAXEventKeeper; - args[2] = new Integer(m_nEncryptionElementCollectorId).toString(); - args[3] = m_xXMLSecurityContext; - args[4] = m_xXMLEncryption; - xInitialization.initialize(args); - - /* - * sets decryption result listener. - */ - XDecryptionResultBroadcaster m_xDecryptionResultBroadcaster = - (XDecryptionResultBroadcaster)UnoRuntime.queryInterface( - XDecryptionResultBroadcaster.class, m_xReferenceResolvedListener); - m_xDecryptionResultBroadcaster.addDecryptionResultListener( - (XDecryptionResultListener)UnoRuntime.queryInterface( - XDecryptionResultListener.class, resultListener)); - } - catch( com.sun.star.uno.Exception e) - { - e.printStackTrace(); - } - } - - /* - * creates a Blocker. - */ - int blockerId = m_xSAXEventKeeper.addBlocker(); - m_xSAXEventKeeper.setSecurityId(blockerId, m_nSecurityId); - - try - { - XBlockerMonitor xBlockerMonitor = (XBlockerMonitor)UnoRuntime.queryInterface( - XBlockerMonitor.class, m_xReferenceResolvedListener); - xBlockerMonitor.setBlockerId(blockerId); - } - catch( com.sun.star.uno.Exception e) - { - e.printStackTrace(); - } - - /* - * configures the resolve listener for the encryption template. - */ - XReferenceResolvedBroadcaster xReferenceResolvedBroadcaster = - (XReferenceResolvedBroadcaster)UnoRuntime.queryInterface( - XReferenceResolvedBroadcaster.class, m_xSAXEventKeeper); - xReferenceResolvedBroadcaster.addReferenceResolvedListener(m_nEncryptionElementCollectorId, m_xReferenceResolvedListener); - } - - /* - * add the reference to this encryption. - * - * 1. askes the SAXEventKeeper to add a ElementCollector to for the new - * referenced element; - * 2. configures this ElementCollector's security id; - * 3. tells the SAXEventKeeper which listener will receive the reference - * resolved notification. - * 4. notifies the SignatureCollector about the reference id. - */ - protected boolean setReference(boolean isExporting) - { - boolean rc = false; - - int referenceId = m_xSAXEventKeeper.addSecurityElementCollector( - isExporting? - (ElementMarkPriority.AFTERMODIFY):(ElementMarkPriority.BEFOREMODIFY), - true); - - m_xSAXEventKeeper.setSecurityId(referenceId, m_nSecurityId); - - XReferenceResolvedBroadcaster xReferenceResolvedBroadcaster = - (XReferenceResolvedBroadcaster)UnoRuntime.queryInterface( - XReferenceResolvedBroadcaster.class, m_xSAXEventKeeper); - xReferenceResolvedBroadcaster.addReferenceResolvedListener( - referenceId, m_xReferenceResolvedListener); - - try - { - XReferenceCollector xReferenceCollector = - (XReferenceCollector)UnoRuntime.queryInterface( - XReferenceCollector.class, m_xReferenceResolvedListener); - xReferenceCollector.setReferenceId(referenceId); - } - catch( com.sun.star.uno.Exception e) - { - e.printStackTrace(); - rc = false; - } - - return rc; - } -} - diff --git a/xmlsecurity/tools/uno/ParsingThread.java b/xmlsecurity/tools/uno/ParsingThread.java deleted file mode 100644 index adffbb271..000000000 --- a/xmlsecurity/tools/uno/ParsingThread.java +++ /dev/null @@ -1,248 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package com.sun.star.xml.security.uno; - -import org.w3c.dom.Node; -import com.sun.star.xml.sax.XDocumentHandler; -import org.w3c.dom.Attr; -import org.w3c.dom.NamedNodeMap; - -/* - * this class is used to parse a document into SAX events - */ -class ParsingThread -{ - /* - * the Node which will be handled with in the next step - */ - private Node m_node; - - /* - * the event to be handled in the next step. - * true means endElement event, false otherwise. - */ - private boolean m_bIsEndEvent; - - /* - * the document handler which receives generated SAX events - */ - private XDocumentHandler m_xDocumentHandler; - - /* - * the TestTool which receives UI feedbacks - */ - private TestTool m_testTool; - - - ParsingThread(Node node, XDocumentHandler xDocumentHandler, TestTool testTool) - { - m_node = node; - m_xDocumentHandler = xDocumentHandler; - m_testTool = testTool; - - m_bIsEndEvent = false; - } - - /* - * changes the document handler. - */ - protected void setHandler(XDocumentHandler xDocumentHandler) - { - this.m_xDocumentHandler = xDocumentHandler; - } - - /* - * sends the next SAX event. - * when there is no further step, then false is returned, - * otherwise, true returned. - */ - protected boolean nextStep() - { - boolean rc = true; - - try - { - String message; - int type = m_node.getNodeType(); - if (!m_bIsEndEvent) - /* - * the next event is not a endElement event. - */ - { - switch (type) - { - case Node.DOCUMENT_NODE: /* startDocument */ - m_testTool.updatesCurrentSAXEventInformation("startDocument"); - m_xDocumentHandler.startDocument(); - m_testTool.updatesUIs(); - break; - case Node.ELEMENT_NODE: /* startElement */ - String nodeName = m_node.getNodeName(); - message = "startElement:"+nodeName; - NamedNodeMap attrs = m_node.getAttributes(); - - AttributeListHelper attributeListHelper = new AttributeListHelper(); - - int length = attrs.getLength(); - for (int i=0; i - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package com.sun.star.xml.security.uno; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.Text; -import org.w3c.dom.ProcessingInstruction; - -/* uno classes */ -import com.sun.star.xml.sax.XDocumentHandler; -import com.sun.star.xml.sax.XAttributeList; - -/* - * this class is used to collect all received SAX events - * into a DOM document. - */ -class SAXEventCollector implements XDocumentHandler -{ - /* - * the document which keeps received SAX events - */ - private Document m_document; - - /* - * the current Element to which the next received - * SAX event will be added. - */ - private Node m_currentElement; - - /* - * the TestTool which receives UI feedbacks - */ - private TestTool m_testTool; - - /* - * whether displays information on console. - */ - private boolean m_systemDisplay; - - SAXEventCollector(TestTool testTool) - { - this(testTool, false); - } - - SAXEventCollector(TestTool testTool, boolean sysDis) - { - m_systemDisplay = sysDis; - m_testTool = testTool; - - DocumentBuilderFactory factory = - DocumentBuilderFactory.newInstance(); - - try - { - DocumentBuilder builder = factory.newDocumentBuilder(); - m_document = builder.newDocument(); - - m_currentElement = m_document; - } - catch (ParserConfigurationException pce) { - pce.printStackTrace(); - } - } - - protected Document getDocument() - { - return m_document; - } - - protected Node getCurrentElement() - { - return m_currentElement; - } - - /* - * XDocumentHandler - */ - public void startDocument () - { - } - - public void endDocument() - { - } - - public void startElement (String str, com.sun.star.xml.sax.XAttributeList xattribs) - { - Element newElement = m_document.createElement(str); - - if (xattribs !=null) - { - int length = xattribs.getLength(); - for (short i=0; i "+m_currentElement.toString()); - } - - if (m_testTool != null) - { - m_testTool.updatesUIs(); - } - } - - public void characters(String str) - { - Text newText = m_document.createTextNode(str); - m_currentElement.appendChild(newText); - if (m_testTool != null) - { - m_testTool.updatesUIs(); - } - } - - public void ignorableWhitespace(String str) - { - } - - public void processingInstruction(String aTarget, String aData) - { - ProcessingInstruction newPI - = m_document.createProcessingInstruction(aTarget, aData); - m_currentElement.appendChild(newPI); - if (m_testTool != null) - { - m_testTool.updatesUIs(); - } - } - - public void setDocumentLocator (com.sun.star.xml.sax.XLocator xLocator ) - throws com.sun.star.xml.sax.SAXException - { - } -} - diff --git a/xmlsecurity/tools/uno/SAXEventPrinter.java b/xmlsecurity/tools/uno/SAXEventPrinter.java deleted file mode 100644 index 7dc518a3f..000000000 --- a/xmlsecurity/tools/uno/SAXEventPrinter.java +++ /dev/null @@ -1,320 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package com.sun.star.xml.security.uno; - -import org.w3c.dom.Node; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Attr; -import org.w3c.dom.NodeList; -import java.io.IOException; -import java.io.FileOutputStream; - -/* uno classes */ -import com.sun.star.xml.sax.XDocumentHandler; -import com.sun.star.xml.sax.XAttributeList; - -/* - * The SAXEventPrinter class is used to print out received - * SAX event stream. - */ -class SAXEventPrinter implements XDocumentHandler -{ - /* - * how many spaces as the indent of line - */ - private int m_nIndent; - - /* - * whether a NEW LINE character need to be appended to - * each line - */ - private boolean m_bIsFormatted; - - /* - * the output stream to write - */ - private FileOutputStream m_fileOutputStream; - - SAXEventPrinter(FileOutputStream fileOutputStream, boolean isFormatted) - { - m_nIndent = 0; - m_fileOutputStream = fileOutputStream; - m_bIsFormatted = isFormatted; - } - - protected static void outputIndent(int m_nIndent, FileOutputStream fileOutputStream) - throws IOException - { - for (int i=0; i".getBytes()); - - if (isFormatted) - { - fileOutputStream.write("\n".getBytes()); - } - - break; - - case Node.TEXT_NODE: - message = node.getNodeValue(); - if (message != null ) - { - if (isFormatted) - { - outputIndent(indent, fileOutputStream); - } - - fileOutputStream.write(node.getNodeValue().getBytes("UTF-8")); - - if (isFormatted) - { - fileOutputStream.write("\n".getBytes()); - } - } - break; - - case Node.PROCESSING_INSTRUCTION_NODE: - if (isFormatted) - { - outputIndent(indent, fileOutputStream); - } - - fileOutputStream.write("".getBytes()); - - if (isFormatted) - { - fileOutputStream.write("\n".getBytes()); - } - - break; - default: - break; - } - } - } - - /* - * XDocumentHandler - */ - public void startDocument () - { - } - - public void endDocument() - { - } - - public void startElement (String str, com.sun.star.xml.sax.XAttributeList xattribs) - { - try - { - String message; - - message = new String("<"+str); - if (xattribs !=null) - { - int length = xattribs.getLength(); - for (short i=0; i".getBytes()); - - if (m_bIsFormatted) - { - m_fileOutputStream.write("\n".getBytes()); - } - } - catch (IOException e) - { - e.printStackTrace(); - } - } - - public void characters(String str) - { - try - { - if (m_bIsFormatted) - { - outputIndent(m_nIndent, m_fileOutputStream); - } - - m_fileOutputStream.write(str.getBytes("UTF-8")); - - if (m_bIsFormatted) - { - m_fileOutputStream.write("\n".getBytes()); - } - } - catch (IOException e) - { - e.printStackTrace(); - } - } - - public void ignorableWhitespace(String str) - { - } - - public void processingInstruction(String aTarget, String aData) - { - try - { - if (m_bIsFormatted) - { - outputIndent(m_nIndent, m_fileOutputStream); - } - - m_fileOutputStream.write("".getBytes()); - - if (m_bIsFormatted) - { - m_fileOutputStream.write("\n".getBytes()); - } - } - catch (IOException e) - { - e.printStackTrace(); - } - } - - public void setDocumentLocator (com.sun.star.xml.sax.XLocator xLocator ) - throws com.sun.star.xml.sax.SAXException - { - } -} diff --git a/xmlsecurity/tools/uno/SecurityEntity.java b/xmlsecurity/tools/uno/SecurityEntity.java deleted file mode 100644 index 8f6e66551..000000000 --- a/xmlsecurity/tools/uno/SecurityEntity.java +++ /dev/null @@ -1,202 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package com.sun.star.xml.security.uno; - -/* uno classes */ -import com.sun.star.uno.UnoRuntime; -import com.sun.star.lang.XMultiComponentFactory; -import com.sun.star.uno.XComponentContext; - -import com.sun.star.xml.crypto.*; -import com.sun.star.xml.crypto.sax.*; - -/* - * this class maintains the data for a security operation. - */ -class SecurityEntity -{ - /* - * the security id, which identifies this security entity - * uniquely. - */ - private static int m_nNextSecurityId = 1; - protected int m_nSecurityId; - - /* - * xml security related components - */ - protected XXMLSecurityContext m_xXMLSecurityContext; - protected XXMLSignature m_xXMLSignature; - protected XXMLEncryption m_xXMLEncryption; - protected XMultiComponentFactory m_xRemoteServiceManager; - protected XComponentContext m_xRemoteContext; - protected XReferenceResolvedListener m_xReferenceResolvedListener; - protected XSecuritySAXEventKeeper m_xSAXEventKeeper; - - /* - * the uri of the key material of this security entity - */ - private String m_keyURI; - - SecurityEntity( - XSecuritySAXEventKeeper xSAXEventKeeper, - XXMLSecurityContext xXMLSecurityContext, - XXMLSignature xXMLSignature, - XXMLEncryption xXMLEncryption, - XMultiComponentFactory xRemoteServiceManager, - XComponentContext xRemoteContext) - { - m_xSAXEventKeeper = xSAXEventKeeper; - m_xXMLSecurityContext = xXMLSecurityContext; - m_xXMLSignature = xXMLSignature; - m_xXMLEncryption = xXMLEncryption; - m_xRemoteServiceManager = xRemoteServiceManager; - m_xRemoteContext = xRemoteContext; - - m_nSecurityId = getNextSecurityId(); - m_keyURI = null; - } - -/************************************************************************************** - * private methods - **************************************************************************************/ - - /* - * generates a new security id. - */ - private static int getNextSecurityId() - { - int id = m_nNextSecurityId++; - return id; - } - -/************************************************************************************** - * protected methods - **************************************************************************************/ - - /* - * notifies the key collector about the key id, this key id - * is used to ask the SAXEventKeeper to release the bufferred - * key element. - * when the id is 0, that means there is no independant key - * element needed. - */ - protected void setKeyId(int id) - { - try - { - XKeyCollector xKeyCollector = - (XKeyCollector)UnoRuntime.queryInterface( - XKeyCollector.class, m_xReferenceResolvedListener); - xKeyCollector.setKeyId(id); - } - catch( com.sun.star.uno.Exception e) - { - e.printStackTrace(); - } - } - - /* - * set the key uri, which will be the value of the id attribute - * of the key element - */ - protected void setKeyURI(String uri) - { - m_keyURI = new String(uri); - } - - protected XReferenceResolvedListener getReferenceListener() - { - return m_xReferenceResolvedListener; - } - - protected int getSecurityId() - { - return m_nSecurityId; - } - - /* - * configures the key material to the security entity. - * - * if the uri is the key, then: - * 1. askes the SAXEventKeeper to add a ElementCollector to the key - * element; - * 2. notifies the key collector; - * 3. configures this ElementCollector's security id; - * 4. tells the SAXEventKeeper which listener will receive the reference - * resolved notification. - */ - protected boolean setKey(String uri, boolean isExporting) - { - boolean rc = false; - - if (m_keyURI != null && - m_keyURI.equals(uri)) - { - int referenceId = m_xSAXEventKeeper.addSecurityElementCollector( - isExporting? - (ElementMarkPriority.BEFOREMODIFY):(ElementMarkPriority.AFTERMODIFY), - false ); - - setKeyId(referenceId); - m_xSAXEventKeeper.setSecurityId(referenceId, m_nSecurityId); - - XReferenceResolvedBroadcaster xReferenceResolvedBroadcaster = - (XReferenceResolvedBroadcaster)UnoRuntime.queryInterface( - XReferenceResolvedBroadcaster.class, m_xSAXEventKeeper); - - xReferenceResolvedBroadcaster.addReferenceResolvedListener(referenceId, m_xReferenceResolvedListener); - - rc = true; - } - - return rc; - } - - /* - * ends this misstion, asks the security engine to clear up all - * resources. - */ - protected boolean endMission() - { - XMissionTaker xMissionTaker = - (XMissionTaker)UnoRuntime.queryInterface( - XMissionTaker.class, m_xReferenceResolvedListener); - - boolean rc = xMissionTaker.endMission(); - - m_xXMLSecurityContext = null; - m_xXMLSignature = null; - m_xXMLEncryption = null; - m_xReferenceResolvedListener = null; - m_xSAXEventKeeper = null; - - return rc; - } -} - diff --git a/xmlsecurity/tools/uno/SignatureEntity.java b/xmlsecurity/tools/uno/SignatureEntity.java deleted file mode 100644 index da69beeb4..000000000 --- a/xmlsecurity/tools/uno/SignatureEntity.java +++ /dev/null @@ -1,288 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package com.sun.star.xml.security.uno; - -import java.util.Vector; - -/* uno classes */ -import com.sun.star.uno.UnoRuntime; -import com.sun.star.lang.XMultiComponentFactory; -import com.sun.star.lang.XInitialization; -import com.sun.star.uno.XComponentContext; - -import com.sun.star.xml.crypto.*; -import com.sun.star.xml.crypto.sax.*; - -/* - * this class maintains the data for a signature operation. - */ -class SignatureEntity extends SecurityEntity -{ - private Vector m_vReferenceIds; - private int m_nSignatureElementCollectorId; - - SignatureEntity( - XSecuritySAXEventKeeper xSAXEventKeeper, - boolean isExporting, - Object resultListener, - XXMLSecurityContext xXMLSecurityContext, - XXMLSignature xXMLSignature, - XXMLEncryption xXMLEncryption, - XMultiComponentFactory xRemoteServiceManager, - XComponentContext xRemoteContext) - { - super(xSAXEventKeeper, xXMLSecurityContext, xXMLSignature, - xXMLEncryption, xRemoteServiceManager, xRemoteContext); - - m_vReferenceIds = new Vector(); - - if (isExporting) - { - m_nSignatureElementCollectorId = m_xSAXEventKeeper.addSecurityElementCollector( - ElementMarkPriority.AFTERMODIFY, - true); - - m_xSAXEventKeeper.setSecurityId(m_nSignatureElementCollectorId, m_nSecurityId); - - try - { - /* - * creates a SignatureCreator. - */ - Object signatureCreator = m_xRemoteServiceManager.createInstanceWithContext( - TestTool.SIGNATURECREATOR_COMPONENT, m_xRemoteContext); - - m_xReferenceResolvedListener = - (XReferenceResolvedListener)UnoRuntime.queryInterface( - XReferenceResolvedListener.class, signatureCreator); - - /* - * initializes the SignatureCreator. - */ - XInitialization xInitialization = - (XInitialization)UnoRuntime.queryInterface( - XInitialization.class, m_xReferenceResolvedListener); - - Object args[]=new Object[5]; - args[0] = new Integer(m_nSecurityId).toString(); - args[1] = m_xSAXEventKeeper; - args[2] = new Integer(m_nSignatureElementCollectorId).toString(); - args[3] = m_xXMLSecurityContext.getSecurityEnvironment(); - args[4] = m_xXMLSignature; - xInitialization.initialize(args); - - /* - * creates a Blocker. - */ - int blockerId = m_xSAXEventKeeper.addBlocker(); - m_xSAXEventKeeper.setSecurityId(blockerId, m_nSecurityId); - - XBlockerMonitor xBlockerMonitor = (XBlockerMonitor)UnoRuntime.queryInterface( - XBlockerMonitor.class, m_xReferenceResolvedListener); - xBlockerMonitor.setBlockerId(blockerId); - - /* - * sets signature creation result listener. - */ - XSignatureCreationResultBroadcaster xSignatureCreationResultBroadcaster = - (XSignatureCreationResultBroadcaster)UnoRuntime.queryInterface( - XSignatureCreationResultBroadcaster.class, m_xReferenceResolvedListener); - xSignatureCreationResultBroadcaster.addSignatureCreationResultListener( - (XSignatureCreationResultListener)UnoRuntime.queryInterface( - XSignatureCreationResultListener.class, resultListener)); - } - catch( com.sun.star.uno.Exception e) - { - e.printStackTrace(); - } - - } - else - { - m_nSignatureElementCollectorId = m_xSAXEventKeeper.addSecurityElementCollector( - ElementMarkPriority.BEFOREMODIFY, false); - - m_xSAXEventKeeper.setSecurityId(m_nSignatureElementCollectorId, m_nSecurityId); - - try - { - /* - * creates a SignatureVerifier. - */ - Object signatureVerifier = m_xRemoteServiceManager.createInstanceWithContext( - TestTool.SIGNATUREVERIFIER_COMPONENT, m_xRemoteContext); - - m_xReferenceResolvedListener = - (XReferenceResolvedListener)UnoRuntime.queryInterface( - XReferenceResolvedListener.class, signatureVerifier); - - /* - * initializes the SignatureVerifier. - */ - XInitialization xInitialization = - (XInitialization)UnoRuntime.queryInterface( - XInitialization.class, m_xReferenceResolvedListener); - Object args[]=new Object[5]; - args[0] = new Integer(m_nSecurityId).toString(); - args[1] = m_xSAXEventKeeper; - args[2] = new Integer(m_nSignatureElementCollectorId).toString(); - args[3] = m_xXMLSecurityContext; - args[4] = m_xXMLSignature; - xInitialization.initialize(args); - - /* - * sets signature verify result listener. - */ - XSignatureVerifyResultBroadcaster xSignatureVerifyResultBroadcaster = - (XSignatureVerifyResultBroadcaster)UnoRuntime.queryInterface( - XSignatureVerifyResultBroadcaster.class, m_xReferenceResolvedListener); - xSignatureVerifyResultBroadcaster.addSignatureVerifyResultListener( - (XSignatureVerifyResultListener)UnoRuntime.queryInterface( - XSignatureVerifyResultListener.class, resultListener)); - } - catch( com.sun.star.uno.Exception e) - { - e.printStackTrace(); - } - } - - /* - * configures the resolve listener for the signature template. - */ - XReferenceResolvedBroadcaster xReferenceResolvedBroadcaster = - (XReferenceResolvedBroadcaster)UnoRuntime.queryInterface( - XReferenceResolvedBroadcaster.class, m_xSAXEventKeeper); - xReferenceResolvedBroadcaster.addReferenceResolvedListener( - m_nSignatureElementCollectorId, m_xReferenceResolvedListener); - } - -/************************************************************************************** - * private methods - **************************************************************************************/ - - /* - * checks whether this signature has a reference with - * the particular id. - */ - private boolean hasReference(String id) - { - boolean rc = false; - - int length = m_vReferenceIds.size(); - for (int i=0; i - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package com.sun.star.xml.security.uno; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import java.io.File; -import java.io.IOException; -import java.io.FileOutputStream; -import java.io.FileInputStream; -import java.io.InputStream; -import java.io.ByteArrayInputStream; -import java.io.UnsupportedEncodingException; - -import org.w3c.dom.Document; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - -/* Basic GUI components */ -import javax.swing.JFrame; -import javax.swing.JPanel; -import javax.swing.JScrollPane; -import javax.swing.JTree; -import javax.swing.JButton; -import javax.swing.JCheckBox; -import javax.swing.JTextArea; -import javax.swing.JTextField; -import javax.swing.JFileChooser; -import javax.swing.ToolTipManager; -import javax.swing.JTable; -import javax.swing.JLabel; -import javax.swing.BorderFactory; - -/* GUI components for right-hand side */ -import javax.swing.JSplitPane; -import javax.swing.JOptionPane; -import javax.swing.JTabbedPane; - - -/* GUI support classes */ -import java.awt.BorderLayout; -import java.awt.Dimension; -import java.awt.Container; -import java.awt.Toolkit; -import java.awt.event.WindowEvent; -import java.awt.event.WindowAdapter; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; - -/* For creating borders */ -import javax.swing.border.EmptyBorder; -import javax.swing.border.BevelBorder; -import javax.swing.border.CompoundBorder; - -/* For creating a TreeModel */ -import javax.swing.tree.TreePath; -import java.util.Vector; - -/* UNO classes */ -import com.sun.star.uno.UnoRuntime; -import com.sun.star.bridge.XUnoUrlResolver; -import com.sun.star.lang.XMultiComponentFactory; -import com.sun.star.beans.XPropertySet; -import com.sun.star.uno.XComponentContext; -import com.sun.star.xml.sax.XDocumentHandler; - -import com.sun.star.xml.crypto.*; -import com.sun.star.xml.crypto.sax.*; - -public class TestTool extends JFrame implements ActionListener -{ - /* - * xml security framewrok component names - */ - public static String SIGNATURECREATOR_COMPONENT = "com.sun.star.xml.crypto.sax.SignatureCreator"; - public static String SIGNATUREVERIFIER_COMPONENT = "com.sun.star.xml.crypto.sax.SignatureVerifier"; - public static String ENCRYPTOR_COMPONENT = "com.sun.star.xml.crypto.sax.Encryptor"; - public static String DECRYPTOR_COMPONENT = "com.sun.star.xml.crypto.sax.Decryptor"; - public static String SAXEVENTKEEPER_COMPONENT = "com.sun.star.xml.crypto.sax.SAXEventKeeper"; - - /* - * Java-based component names - */ - public static String SEINITIALIZER_COMPONENT_JAVA = "com.sun.star.xml.security.bridge.jxsec.SEInitializer_JxsecImpl"; - public static String XMLSIGNATURE_COMPONENT_JAVA = "com.sun.star.xml.security.bridge.jxsec.XMLSignature_JxsecImpl"; - public static String XMLENCRYPTION_COMPONENT_JAVA = "com.sun.star.xml.security.bridge.jxsec.XMLEncryption_JxsecImpl"; - public static String XMLDOCUMENTWRAPPER_COMPONENT_JAVA = "com.sun.star.xml.security.bridge.jxsec.XMLDocumentWrapper_JxsecImpl"; - - /* - * C-based component names - */ - public static String SEINITIALIZER_COMPONENT_C = "com.sun.star.xml.crypto.SEInitializer"; - public static String XMLSIGNATURE_COMPONENT_C = "com.sun.star.xml.crypto.XMLSignature"; - public static String XMLENCRYPTION_COMPONENT_C = "com.sun.star.xml.crypto.XMLEncryption"; - public static String XMLDOCUMENTWRAPPER_COMPONENT_C = "com.sun.star.xml.wrapper.XMLDocumentWrapper"; - - /* url resolver name */ - public static String UNOURLRESOLVER = "com.sun.star.bridge.UnoUrlResolver"; - - /* - * connection URL - */ - private String m_unoURL = "uno:socket,host=localhost,port=2002;urp;StarOffice.ServiceManager"; - - /* key file */ - private String m_javaTokenFile = null; - private String m_nssTokenPath = null; - - /* User Interfaces */ - private JButton m_goButton; - private JButton m_stepButton; - private JButton m_startButton; - private JButton m_openButton; - private JCheckBox m_isExportingButton; - private JCheckBox m_isJavaComponentButton; - private JButton m_saveButton; - private JButton m_batchButton; - private JTree m_leftTree; - private JTextArea m_leftTextArea; - private JTree m_middleTree; - private JTree m_rightTree; - private JTabbedPane m_leftTabPane; - private JTextArea m_bufferNodeTextArea; - private JLabel m_saxChainLabel; - private JTextField m_saxEventText; - private JTable m_unsolvedReferenceTable; - - /* - * whether a batch file is running, - * if so, no message box is popped up - */ - private boolean m_bIsBatchRunning = false; - - /* - * whether the UI needs to be updated. - * when user click the "go" button, the UI needs - * not to be updated step by step for performance - * reason - */ - private boolean m_bIsUIUpdateSuppressed = false; - - /* - * three DOM tree adapter - */ - private DomToTreeModelAdapter m_leftTreeModelAdapter; - private DomToTreeModelAdapter m_middleTreeModelAdapter; - private DomToTreeModelAdapter m_rightTreeModelAdapter; - - /* - * the current directory, which reserves the default - * location when user open/save a file. - */ - private File m_currentDirectory = null; - - /* - * the log file - */ - private FileOutputStream m_logFileOutputStream = null; - - /* - * the thread which is parsing the current XML - * file - */ - private ParsingThread m_parsingThread; - - /* - * whether is exporting or importing - */ - private boolean m_bIsExporting; - - /* - * whether java based component or c based component - * is used now - */ - private boolean m_bIsJavaBased; - - /* - * XML security component interface - */ - private XComponentContext m_xRemoteContext = null; - private XMultiComponentFactory m_xRemoteServiceManager = null; - private XXMLSecurityContext m_xXMLSecurityContext = null; - private XXMLSignature m_xXMLSignature = null; - private XXMLEncryption m_xXMLEncryption = null; - private XSEInitializer m_xSEInitializer = null; - - /* - * SAX event collector for the middle tree and the right tree - */ - private SAXEventCollector m_rightTreeEventCollector = null; - private SAXEventCollector m_middleTreeEventCollector = null; - - /* - * security framework controller - */ - private XMLSecurityFrameworkController m_xmlSecurityFrameworkController = null; - - /* org.w3c.dom.Document */ - private Document m_document; - - /* represents whether "Go" or "Step" */ - private boolean stepMode = true; - -/************************************************************************************** - * private methods - **************************************************************************************/ - - - /****************************************************************************** - * UI related methods - ******************************************************************************/ - - /* - * initalizes the UI. - */ - private void initUI() - { - m_leftTreeModelAdapter = new DomToTreeModelAdapter(m_document); - m_middleTreeModelAdapter = new DomToTreeModelAdapter(m_document); - m_rightTreeModelAdapter = new DomToTreeModelAdapter(m_document); - - m_parsingThread = null; - - m_leftTree.setModel(m_leftTreeModelAdapter); - m_middleTree.setModel(m_middleTreeModelAdapter); - m_rightTree.setModel(m_rightTreeModelAdapter); - } - - /* - * constructs the user interface. - */ - private Container buildUI(int width, int height) - { - JPanel mainPanel = new JPanel(); - - int frameHeight = height-40; - int leftWindowWidth = (width-40)/3; - int middleWindowWidth = leftWindowWidth; - int rightWindowWidth = leftWindowWidth; - int leftPaneWidth = leftWindowWidth+middleWindowWidth; - int frameWidth = leftPaneWidth + rightWindowWidth; - - /* Make a nice border */ - EmptyBorder emptyBorder = new EmptyBorder(5,5,5,5); - BevelBorder bevelBorder = new BevelBorder(BevelBorder.LOWERED); - CompoundBorder compoundBorder = new CompoundBorder(emptyBorder,bevelBorder); - mainPanel.setBorder(new CompoundBorder(compoundBorder,emptyBorder)); - - /* Set up the tree */ - m_leftTreeModelAdapter = new DomToTreeModelAdapter(m_document); - m_middleTreeModelAdapter = new DomToTreeModelAdapter(m_document); - m_rightTreeModelAdapter = new DomToTreeModelAdapter(m_document); - - m_leftTree = new JTree(m_leftTreeModelAdapter); - m_leftTextArea = new JTextArea(); - m_middleTree = new JTree(m_middleTreeModelAdapter); - m_rightTree = new JTree(m_rightTreeModelAdapter); - - ToolTipManager.sharedInstance().registerComponent(m_leftTree); - ToolTipManager.sharedInstance().registerComponent(m_middleTree); - ToolTipManager.sharedInstance().registerComponent(m_rightTree); - - /* Builds left tab pane */ - JScrollPane leftTreePane = new JScrollPane(m_leftTree); - JScrollPane leftTextPane = new JScrollPane(m_leftTextArea); - m_leftTabPane= new JTabbedPane(); - m_leftTabPane.add("Tree View",leftTreePane); - m_leftTabPane.add("Text View",leftTextPane); - - /* Builds middle tree pane */ - JScrollPane middleTreePane = new JScrollPane(m_middleTree); - - /* Builds right tree pane */ - JScrollPane rightTreePane = new JScrollPane(m_rightTree); - rightTreePane.setBorder(BorderFactory.createCompoundBorder( - BorderFactory.createTitledBorder("Result"), - BorderFactory.createEmptyBorder(8,8,8,8))); - - m_leftTabPane.setPreferredSize( - new Dimension( leftWindowWidth, frameHeight )); - middleTreePane.setPreferredSize( - new Dimension( middleWindowWidth, frameHeight )); - rightTreePane.setPreferredSize( - new Dimension( rightWindowWidth, frameHeight )); - - /* Builds the SAX event text box */ - m_saxEventText = new JTextField(); - - /* Builds the unsolved reference table */ - m_unsolvedReferenceTable = new JTable( - new UnsolvedReferenceTableModel(this)); - - /* Builds the BufferNode information text area */ - m_bufferNodeTextArea = new JTextArea(); - - /* Builds the SAX chain information label */ - m_saxChainLabel = new JLabel(); - - /* Builds the left pane */ - JPanel tabPaneWithSaxEventPane = new JPanel(); - tabPaneWithSaxEventPane.setLayout(new BorderLayout()); - tabPaneWithSaxEventPane.add("Center",m_leftTabPane); - tabPaneWithSaxEventPane.add("South",new JScrollPane(m_saxEventText)); - - JSplitPane leftPane = - new JSplitPane( JSplitPane.VERTICAL_SPLIT, - tabPaneWithSaxEventPane, - new JScrollPane(m_unsolvedReferenceTable)); - leftPane.setBorder(BorderFactory.createCompoundBorder( - BorderFactory.createTitledBorder("Original"), - BorderFactory.createEmptyBorder(8,8,8,8))); - - leftPane.setContinuousLayout( true ); - leftPane.setDividerLocation( frameHeight*2/3 ); - leftPane.setPreferredSize( - new Dimension( leftWindowWidth, frameHeight )); - - /* Builds the middle pane */ - JPanel bufferNodeWithSaxChainPane = new JPanel(); - bufferNodeWithSaxChainPane.setLayout(new BorderLayout()); - bufferNodeWithSaxChainPane.add("Center",m_bufferNodeTextArea); - bufferNodeWithSaxChainPane.add("South",new JScrollPane(m_saxChainLabel)); - - JSplitPane middlePane = - new JSplitPane( JSplitPane.VERTICAL_SPLIT, - middleTreePane, - new JScrollPane(bufferNodeWithSaxChainPane)); - - middlePane.setBorder(BorderFactory.createCompoundBorder( - BorderFactory.createTitledBorder("Insight SAXEventKeeper"), - BorderFactory.createEmptyBorder(8,8,8,8))); - - middlePane.setContinuousLayout( true ); - middlePane.setDividerLocation( frameHeight/2+5 ); - middlePane.setPreferredSize( - new Dimension( middleWindowWidth, frameHeight )); - - /* Builds the whole frame pane */ - JSplitPane leftWithMiddlePane = - new JSplitPane( JSplitPane.HORIZONTAL_SPLIT, - leftPane, - middlePane ); - leftWithMiddlePane.setContinuousLayout( true ); - leftWithMiddlePane.setDividerLocation( leftWindowWidth ); - leftWithMiddlePane.setPreferredSize( - new Dimension( leftPaneWidth + 10, frameHeight+10 )); - - JSplitPane framePane = - new JSplitPane( JSplitPane.HORIZONTAL_SPLIT, - leftWithMiddlePane, - rightTreePane ); - - - framePane.setContinuousLayout( true ); - framePane.setDividerLocation(leftPaneWidth+10 ); - framePane.setPreferredSize( - new Dimension( frameWidth + 20, frameHeight+10 )); - - /* Adds all GUI components to the main panel */ - mainPanel.setLayout(new BorderLayout()); - mainPanel.add("Center", framePane ); - - m_openButton = new JButton("Open..."); - m_openButton.addActionListener(this); - - m_goButton = new JButton("Go!"); - m_goButton.addActionListener(this); - - m_stepButton = new JButton("Step"); - m_stepButton.addActionListener(this); - - m_startButton = new JButton("Start"); - m_startButton.addActionListener(this); - m_startButton.setEnabled(false); - - m_isExportingButton = new JCheckBox("export, not import", true); - m_isJavaComponentButton = new JCheckBox("use java component", false); - - m_saveButton = new JButton("Save..."); - m_saveButton.addActionListener(this); - - m_batchButton = new JButton("Batch..."); - m_batchButton.addActionListener(this); - - JPanel buttonPanel = new JPanel(); - buttonPanel.add(m_batchButton); - buttonPanel.add(m_openButton); - buttonPanel.add(m_startButton); - buttonPanel.add(m_goButton); - buttonPanel.add(m_stepButton); - buttonPanel.add(m_isExportingButton); - buttonPanel.add(m_isJavaComponentButton); - buttonPanel.add(m_saveButton); - - mainPanel.add("South", buttonPanel); - - enableGoButton(false); - - return mainPanel; - } - - /* - * enables/disables the Go(and Step) button. - */ - private void enableGoButton(boolean enabled) - { - m_goButton.setEnabled(enabled); - m_stepButton.setEnabled(enabled); - } - - /* - * updates the unsolved reference information. - */ - private void updatesUnsolvedReferencesInformation() - { - m_unsolvedReferenceTable.setModel(new UnsolvedReferenceTableModel(this)); - } - - /* - * adjusts the view of the tree in order to make the - * particular Node into the focus tree leaf. - */ - private void updatesTree(Node node, JTree tree) - { - int i=0; - int currentLine = 0; - - while (i= 3) - { - if (argv[2].startsWith("-b")) - { - fileName = argv[2].substring(2); - hasBatch = true; - } - else - { - fileName = argv[2]; - hasFile = true; - } - } - - tt = new TestTool(); - tt.m_javaTokenFile = new String(argv[0]); - tt.m_nssTokenPath = new String(argv[1]); - tt.connectSO(null); - - /* Set up a GUI framework */ - JFrame myFrame = new JFrame("XML Security Components Tester"); - myFrame.addWindowListener( - new WindowAdapter() { - public void windowClosing(WindowEvent e) {System.exit(0);} - } - ); - - myFrame.setContentPane(tt.buildUI(screenSize.width, screenSize.height)); - myFrame.pack(); - int w = screenSize.width-30; - int h = screenSize.height-30; - myFrame.setLocation(screenSize.width/2 - w/2, - screenSize.height/2 - h/2); - myFrame.setSize(w, h); - myFrame.setVisible(true); - - if (hasFile) - { - tt.parseFile(new File(fileName)); - } - else if (hasBatch) - { - tt.runBatch(new File(fileName)); - } - } -} - diff --git a/xmlsecurity/tools/uno/UnsolvedReferenceTableModel.java b/xmlsecurity/tools/uno/UnsolvedReferenceTableModel.java deleted file mode 100644 index a5a38c393..000000000 --- a/xmlsecurity/tools/uno/UnsolvedReferenceTableModel.java +++ /dev/null @@ -1,89 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package com.sun.star.xml.security.uno; - -import javax.swing.table.AbstractTableModel; - -/* - * this class is used to maintain the unsolved reference - * table. - */ -class UnsolvedReferenceTableModel extends AbstractTableModel -{ - private String[] m_columnNames = {"id", - "refNum", - "EC's id"}; - - private TestTool m_testTool; - - UnsolvedReferenceTableModel(TestTool testTool) - { - m_testTool = testTool; - } - - public String getColumnName(int col) - { - return m_columnNames[col].toString(); - } - - public int getRowCount() - { - return m_testTool.getUnsolvedReferenceIds().size(); - } - - public int getColumnCount() - { - return m_columnNames.length; - } - - public Object getValueAt(int row, int col) - { - if (col == 0) - { - return (String)m_testTool.getUnsolvedReferenceIds().elementAt(row); - } - else if (col == 1) - { - return ((Integer)m_testTool.getUnsolvedReferenceRefNum().elementAt(row)).toString(); - } - else if (col == 2) - { - return ((Integer)m_testTool.getUnsolvedReferenceKeeperIds().elementAt(row)).toString(); - } - else - { - return null; - } - } - - public boolean isCellEditable(int row, int col) - { - return false; - } -} - diff --git a/xmlsecurity/tools/uno/XMLFileFilter.java b/xmlsecurity/tools/uno/XMLFileFilter.java deleted file mode 100644 index 765de1fc5..000000000 --- a/xmlsecurity/tools/uno/XMLFileFilter.java +++ /dev/null @@ -1,79 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package com.sun.star.xml.security.uno; - -import java.io.File; -import javax.swing.filechooser.FileFilter; - -/* - * this class is used as a file filter for the XML file - * (*.xml) and the batch file (*.txt). - */ -class XMLFileFilter extends FileFilter -{ - public static String getExtension(File f) - { - String ext = null; - String s = f.getName(); - int i = s.lastIndexOf('.'); - - if (i > 0 && i < s.length() - 1) { - ext = s.substring(i+1).toLowerCase(); - } - - return ext; - } - - public boolean accept(File f) - { - boolean rc = false; - - if (f.isDirectory()) - { - rc = true; - } - else - { - String extension = getExtension(f); - if (extension != null) - { - if (extension.equals("xml") || extension.equals("txt")) - { - rc = true; - } - } - } - - return rc; - } - - public String getDescription() - { - return "XML and batch files (.xml,.txt)"; - } -} diff --git a/xmlsecurity/tools/uno/XMLSecurityFrameworkController.java b/xmlsecurity/tools/uno/XMLSecurityFrameworkController.java deleted file mode 100644 index ed512ed08..000000000 --- a/xmlsecurity/tools/uno/XMLSecurityFrameworkController.java +++ /dev/null @@ -1,1085 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package com.sun.star.xml.security.uno; - -import java.util.Stack; -import java.util.Vector; - -/* uno classes */ -import com.sun.star.uno.UnoRuntime; -import com.sun.star.lang.XMultiComponentFactory; -import com.sun.star.lang.XInitialization; -import com.sun.star.uno.XComponentContext; -import com.sun.star.xml.sax.XDocumentHandler; -import com.sun.star.xml.sax.XAttributeList; -import com.sun.star.xml.sax.SAXException; - -import com.sun.star.xml.crypto.*; -import com.sun.star.xml.crypto.sax.*; -import com.sun.star.xml.wrapper.*; - -/* - * the XMLSecurityFrameworkController class is used to controll the xml security framework. - */ -public class XMLSecurityFrameworkController - implements XDocumentHandler, XSignatureCreationResultListener, XSignatureVerifyResultListener, - XEncryptionResultListener, XDecryptionResultListener, XSAXEventKeeperStatusChangeListener -{ - /* - * UNO framework component - */ - private XMultiComponentFactory m_xRemoteServiceManager; - private XComponentContext m_xRemoteContext; - - /* - * xml security related UNO components - */ - private XSecuritySAXEventKeeper m_xSAXEventKeeper; - private XXMLDocumentWrapper m_xXMLDocumentWrapper; - private XDocumentHandler m_xOutputHandler; - private XXMLSecurityContext m_xXMLSecurityContext; - private XXMLSignature m_xXMLSignature; - private XXMLEncryption m_xXMLEncryption; - - /* - * used to reserve the current SAX ancestor path - */ - private Stack m_currentPath; - - /* - * maintains all SignatureEntities. - */ - private Vector m_signatureList; - - /* - * maintains all EncryptionEntities. - */ - private Vector m_encryptionList; - - /* - * maintains all unsolved reference Ids. - * These ids are strings which is the value of the id attribute - * of the referenced element. - */ - private Vector m_vUnsolvedReferenceIds; - - /* - * maintains all unsolved reference keeper ids. - * The keeper id is used to uniquely identify a bufferred element - * by the SAXEventKeeper. - */ - private Vector m_vUnsolvedReferencedKeeperIds; - - /* - * maintains the left time that each unsolved reference can be - * claimed. - */ - private Vector m_vUnsolvedReferenceRefNum; - - /* - * whether exporting or importing - */ - private boolean m_bIsExporting; - - /* - * whether java or c - */ - private boolean m_bIsJavaBased; - - /* - * whether the SAXEventKeeper is blocking - */ - private boolean m_bIsBlocking; - - /* - * whether it is collecting a bufferred element - */ - private boolean m_bIsInsideCollectedElement; - - /* - * whether a SAXEventKeeper is in the SAX chain - */ - private boolean m_bSAXEventKeeperIncluded; - - /* - * the ParsingThread used to parse the document - */ - private ParsingThread m_parsingThread; - - /* - * the next document handler that will receives SAX events - * from the parsing thread. - * if the SAXEventKeeper is on the SAX chain, then this - * variable will be the SAXEventKeeper, otherwise, this - * variable will be the xOutputHandler. - */ - private XDocumentHandler m_xExportHandler; - - /* - * the TestTool used to feedback information - */ - private TestTool m_testTool; - - /* - * for encryption target - */ - private boolean m_bIsEncryptionTarget; - private EncryptionEntity m_EncryptionForTarget; - - XMLSecurityFrameworkController( - TestTool testTool, - boolean bIsExporting, - boolean bIsJavaBased, - XDocumentHandler xOutputHandler, - ParsingThread parsingThread, - XXMLSecurityContext xXMLSecurityContext, - XXMLSignature xXMLSignature, - XXMLEncryption xXMLEncryption, - XMultiComponentFactory xRemoteServiceManager, - XComponentContext xRemoteContext) - { - m_bIsExporting = bIsExporting; - m_bIsJavaBased = bIsJavaBased; - - m_xOutputHandler = xOutputHandler; - m_xXMLSecurityContext = xXMLSecurityContext; - m_xXMLSignature = xXMLSignature; - m_xXMLEncryption = xXMLEncryption; - m_xRemoteServiceManager = xRemoteServiceManager; - m_xRemoteContext = xRemoteContext; - - m_testTool = testTool; - m_parsingThread = parsingThread; - - m_signatureList = new Vector(); - m_encryptionList = new Vector(); - - m_vUnsolvedReferenceIds = new Vector(); - m_vUnsolvedReferencedKeeperIds = new Vector(); - m_vUnsolvedReferenceRefNum = new Vector(); - - m_xXMLDocumentWrapper = null; - m_xSAXEventKeeper = null; - - m_bSAXEventKeeperIncluded = false; - m_bIsBlocking = false; - m_bIsInsideCollectedElement = false; - - m_bIsEncryptionTarget = false; - m_EncryptionForTarget = null; - - changeOutput(); - - m_currentPath = new Stack(); - - foundSecurityRelated(); - } - -/************************************************************************************** - * private methods - **************************************************************************************/ - - /* - * changes the output document handler. - */ - private void changeOutput() - { - if (m_bIsExporting) - { - m_parsingThread.setHandler(this); - - /* - * If the SAXEventKeeper is in the SAX chain, then redirects output - * to the SAXEventKeeper, otherwise, to the m_xOutputHandler - */ - if (m_bSAXEventKeeperIncluded) - { - m_xExportHandler = (XDocumentHandler)UnoRuntime.queryInterface( - XDocumentHandler.class, m_xSAXEventKeeper); - m_xSAXEventKeeper.setNextHandler(m_xOutputHandler); - - m_testTool.updatesSAXChainInformation("XMLExporter -> SAXEventKeeper -> SAXWriter"); - } - else - { - m_xExportHandler = m_xOutputHandler; - m_testTool.updatesSAXChainInformation("XMLExporter -> SAXWriter"); - } - } - else - { - if (m_bSAXEventKeeperIncluded) - { - m_parsingThread.setHandler( - (XDocumentHandler)UnoRuntime.queryInterface(XDocumentHandler.class, m_xSAXEventKeeper)); - m_xSAXEventKeeper.setNextHandler(this); - m_testTool.updatesSAXChainInformation("SAXParser -> SAXEventKeeper -> XMLImporter"); - } - else - { - m_parsingThread.setHandler(this); - m_testTool.updatesSAXChainInformation("SAXParser -> XMLImporter"); - } - m_xExportHandler = m_xOutputHandler; - } - } - - /* - * handles the situation when a security related element is found. - * if the SAXEventKeeper is not initialized, then creates a - * SAXEventKeeper. - * the return value represents whether the SAXEventKeeper is newly - * created. - */ - private boolean foundSecurityRelated() - { - if (m_xSAXEventKeeper == null) - { - m_testTool.showMessage("Message from : "+ - (m_bIsExporting?"XMLExporter":"XMLImporter")+ - "\n\nA security related content found, a SAXEventKeeper is created.\n "); - - m_bIsBlocking = false; - m_bIsInsideCollectedElement = false; - - try - { - /* - * creates an XMLDocumentWrapper component. - */ - Object xmlDocumentObj = null; - - if (m_bIsJavaBased) - { - xmlDocumentObj = m_xRemoteServiceManager.createInstanceWithContext( - TestTool.XMLDOCUMENTWRAPPER_COMPONENT_JAVA, m_xRemoteContext); - } - else - { - xmlDocumentObj = m_xRemoteServiceManager.createInstanceWithContext( - TestTool.XMLDOCUMENTWRAPPER_COMPONENT_C, m_xRemoteContext); - } - - m_xXMLDocumentWrapper = (XXMLDocumentWrapper)UnoRuntime.queryInterface( - XXMLDocumentWrapper.class, xmlDocumentObj); - - /* - * creates a SAXEventKeeper component. - */ - Object saxEventKeeperObj = m_xRemoteServiceManager.createInstanceWithContext( - TestTool.SAXEVENTKEEPER_COMPONENT, m_xRemoteContext); - - m_xSAXEventKeeper = - (XSecuritySAXEventKeeper)UnoRuntime.queryInterface( - XSecuritySAXEventKeeper.class, saxEventKeeperObj); - - /* - * initializes the SAXEventKeeper component with the XMLDocumentWrapper component. - */ - XInitialization xInitialization = - (XInitialization)UnoRuntime.queryInterface( - XInitialization.class, m_xSAXEventKeeper); - Object args[]=new Object[1]; - args[0] = m_xXMLDocumentWrapper; - xInitialization.initialize(args); - } - catch( com.sun.star.uno.Exception e) - { - e.printStackTrace(); - } - - /* - * configures the SAXEventKeeper's status change listener. - */ - XSAXEventKeeperStatusChangeBroadcaster xSaxEventKeeperStatusChangeBroadcaster = - (XSAXEventKeeperStatusChangeBroadcaster)UnoRuntime.queryInterface( - XSAXEventKeeperStatusChangeBroadcaster.class, m_xSAXEventKeeper); - xSaxEventKeeperStatusChangeBroadcaster.addSAXEventKeeperStatusChangeListener(this); - } - - boolean rc = !m_bSAXEventKeeperIncluded; - - /* - * changes the export document handler. - */ - m_bSAXEventKeeperIncluded=true; - changeOutput(); - - return rc; - } - - /* - * finds key element or referenced element for a signature. - */ - private void findKeyOrReference(SecurityEntity signatureEntity, String uriStr, boolean isFindingKey) - { - int i=0; - - while (i0) - { - signatureEntity.addReferenceId(uriStr); - findKeyOrReference(signatureEntity, uriStr, false); - } - } - } - } - m_currentPath.push(signedInfo); - } - m_currentPath.push(localName); - } - else if(localName.equals("KeyValue") || - localName.equals("KeyName") || - localName.equals("X509Data") || - localName.equals("EncryptedKey")) - { - if (!m_currentPath.empty()) - { - Object keyInfo = m_currentPath.pop(); - - if (!m_currentPath.empty()) - { - Object objSorE = m_currentPath.peek(); - - if ((objSorE instanceof SignatureEntity) && keyInfo.toString().equals("KeyInfo")) - /* - * this element is the key element of a signature. - */ - { - SignatureEntity signatureEntity = (SignatureEntity)objSorE; - signatureEntity.setKeyId(0); - } - else if ((objSorE instanceof EncryptionEntity) && keyInfo.toString().equals("KeyInfo")) - /* - * this element is the key element of an encryption. - */ - { - EncryptionEntity theEncryption = (EncryptionEntity)objSorE; - theEncryption.setKeyId(0); - } - } - m_currentPath.push(keyInfo); - } - - m_currentPath.push(localName); - } - else if(localName.equals("RetrievalMethod")) - { - if (!m_currentPath.empty()) - { - Object keyInfo = m_currentPath.pop(); - - if (!m_currentPath.empty()) - { - Object objSorE = m_currentPath.peek(); - - if ((objSorE instanceof SignatureEntity) && keyInfo.toString().equals("KeyInfo")) - /* - * this element is the RetrievalMethod element in a signature, - * which will include the key uri of this signature. - */ - { - String uriStr = xattribs.getValueByName("URI"); - SignatureEntity signatureEntity = (SignatureEntity)objSorE; - - if (uriStr != null && uriStr.length()>0) - { - signatureEntity.setKeyURI(uriStr); - findKeyOrReference(signatureEntity,uriStr, true); - } - } - else if ((objSorE instanceof EncryptionEntity) && keyInfo.toString().equals("KeyInfo")) - /* - * this element is the RetrievalMethod element in an encryption, - * which will include the key uri of this encryption. - */ - { - String uriStr = xattribs.getValueByName("URI"); - EncryptionEntity theEncryption = (EncryptionEntity)objSorE; - - if (uriStr != null && uriStr.length()>0) - { - theEncryption.setKeyURI(uriStr); - findKeyOrReference(theEncryption, uriStr, true); - } - } - } - m_currentPath.push(keyInfo); - } - m_currentPath.push(localName); - } - else if (localName.equals("EncryptedData")) /* || localName.equals("EncryptedKey")) */ - /* - * this element is an Encryption element. - */ - { - EncryptionEntity theEncryption = new EncryptionEntity( - m_xSAXEventKeeper, - m_bIsExporting, - this, - m_xXMLSecurityContext, - m_xXMLSignature, - m_xXMLEncryption, - m_xRemoteServiceManager, - m_xRemoteContext); - - m_encryptionList.add(theEncryption); - - if (m_bIsExporting) - { - m_currentPath.push(theEncryption); - } - else - { - String uriStr = xattribs.getValueByName("keyURI"); - if (uriStr != null && uriStr.length()>0) - { - theEncryption.setKeyURI(uriStr); - findKeyOrReference(theEncryption,uriStr, true); - } - else - { - theEncryption.setKeyId(0); - } - - rc = true; - } - } - else - /* - * not a security related element. - */ - { - m_currentPath.push(localName); - } - - return rc; - } - - /* - * checks whether a startElement event is referenced by any security entity. - */ - private void checkReference(String localName, com.sun.star.xml.sax.XAttributeList xattribs, String id) - { - String refNumStr = xattribs.getValueByName("refNum"); - - if ( m_bIsEncryptionTarget ) - { - m_EncryptionForTarget.setReference(m_bIsExporting); - m_bIsEncryptionTarget = false; - } - - if (id != null && id.length()>0 ) - /* - * only if this element has id attribute, then it can be referenced by - * a security entity. - */ - { - /* - * if this element has an "refNum" attribute, then the value will be - * the max referencing number on this element, otherwise, set the max - * referencing number to 999. - */ - int refNum = 999; - - if (refNumStr != null && refNumStr.length()>0 ) - { - refNum = new Integer(refNumStr).intValue(); - } - - int length; - - /* - * searches the signature list to check whether any sigture has - * reference on this element. - */ - length = m_signatureList.size(); - for (int i=0; i0) - { - int keeperId; - - if (localName.equals("EncryptedKey")) - { - keeperId = m_xSAXEventKeeper.addSecurityElementCollector( - m_bIsExporting? - (ElementMarkPriority.BEFOREMODIFY):(ElementMarkPriority.AFTERMODIFY), - true); - } - else - { - keeperId = m_xSAXEventKeeper.addSecurityElementCollector( - m_bIsExporting? - (ElementMarkPriority.AFTERMODIFY):(ElementMarkPriority.BEFOREMODIFY), - false); - } - - m_vUnsolvedReferenceIds.add(id); - m_vUnsolvedReferencedKeeperIds.add(new Integer(keeperId)); - m_vUnsolvedReferenceRefNum.add(new Integer(refNum)); - } - } - } - - /* - * configures the output handler. - */ - private void setOutputHandler(XDocumentHandler handler) - { - m_xOutputHandler = handler; - changeOutput(); - } - - -/************************************************************************************** - * protected methods - **************************************************************************************/ - - /* - * methods used to transfer unsolved reference information. - */ - protected Vector getUnsolvedReferenceIds() - { - return m_vUnsolvedReferenceIds; - } - - protected Vector getUnsolvedReferenceKeeperIds() - { - return m_vUnsolvedReferencedKeeperIds; - } - - protected Vector getUnsolvedReferenceRefNum() - { - return m_vUnsolvedReferenceRefNum; - } - - protected String getBufferNodeTreeInformation() - { - if (m_xSAXEventKeeper != null) - { - return m_xSAXEventKeeper.printBufferNodeTree(); - } - else - { - return null; - } - } - - protected void getDocument(XDocumentHandler handler) - { - if (m_xXMLDocumentWrapper != null) - { - try - { - m_xXMLDocumentWrapper.getTree(handler); - } - catch(SAXException e) - { - e.printStackTrace(); - } - } - } - - protected void endMission() - { - while (m_signatureList.size()>0 || m_encryptionList.size()>0) - { - if (m_signatureList.size()>0) - { - SignatureEntity signatureEntity = (SignatureEntity)m_signatureList.elementAt(0); - m_signatureList.remove(0); - signatureEntity.endMission(); - } - else if (m_encryptionList.size()>0) - { - EncryptionEntity theEncryption = (EncryptionEntity)m_encryptionList.elementAt(0); - m_encryptionList.remove(0); - theEncryption.endMission(); - } - } - - while (m_vUnsolvedReferenceIds.size()>0) - { - int keeperId = ((Integer)m_vUnsolvedReferencedKeeperIds.elementAt(0)).intValue(); - m_xSAXEventKeeper.removeElementCollector(keeperId); - m_vUnsolvedReferenceIds.remove(0); - m_vUnsolvedReferencedKeeperIds.remove(0); - m_vUnsolvedReferenceRefNum.remove(0); - } - - m_xSAXEventKeeper.setNextHandler(null); - - XSAXEventKeeperStatusChangeBroadcaster xSaxEventKeeperStatusChangeBroadcaster = - (XSAXEventKeeperStatusChangeBroadcaster)UnoRuntime.queryInterface( - XSAXEventKeeperStatusChangeBroadcaster.class, m_xSAXEventKeeper); - xSaxEventKeeperStatusChangeBroadcaster.addSAXEventKeeperStatusChangeListener(null); - - m_xSAXEventKeeper = null; - m_xXMLDocumentWrapper = null; - m_xOutputHandler = null; - m_xXMLSecurityContext = null; - m_xXMLSignature = null; - m_xXMLEncryption = null; - - m_xExportHandler = null; - m_parsingThread.setHandler(null); - } - -/************************************************************************************** - * public methods - **************************************************************************************/ - - /* - * XDocumentHandler - */ - public void startDocument() - { - try{ - m_xExportHandler.startDocument(); - } - catch( com.sun.star.xml.sax.SAXException e) - { - e.printStackTrace(); - } - - } - - public void endDocument() - { - try{ - m_xExportHandler.endDocument(); - } - catch( com.sun.star.xml.sax.SAXException e) - { - e.printStackTrace(); - } - } - - public void startElement (String str, com.sun.star.xml.sax.XAttributeList xattribs) - { - try{ - String idAttr = xattribs.getValueByName("id"); - if (idAttr == null) - { - idAttr = xattribs.getValueByName("Id"); - } - - boolean hasIdAttr = (idAttr != null && idAttr.length()>0 ); - boolean needResend = false; - - if (hasIdAttr || - (str.equals("Signature")||str.equals("EncryptedData")))/* || str.equals("EncryptedKey"))) */ - { - if (foundSecurityRelated() && !m_bIsExporting) - { - needResend = true; - } - } - - boolean suppressToNext = checkSecurityElement(str, xattribs); - - checkReference(str, xattribs, idAttr); - - if (needResend) - { - m_xSAXEventKeeper.setNextHandler(null); - - XDocumentHandler saxEventKeeperHandler = - (XDocumentHandler)UnoRuntime.queryInterface( - XDocumentHandler.class, m_xSAXEventKeeper); - saxEventKeeperHandler.startElement(str, xattribs); - m_xSAXEventKeeper.setNextHandler((XDocumentHandler)this); - } - - if (!suppressToNext) - { - m_xExportHandler.startElement(str, xattribs); - } - } - catch( com.sun.star.xml.sax.SAXException e) - { - e.printStackTrace(); - } - } - - public void endElement(String str) - { - if (!m_currentPath.empty()) - { - Object obj = m_currentPath.pop(); - - if (obj.toString().equals("SignedInfo")) - { - if (!m_currentPath.empty()) - { - Object objSignature = m_currentPath.peek(); - if (objSignature != null && objSignature instanceof SignatureEntity) - { - ((SignatureEntity)objSignature).setReferenceNumber(); - } - } - } - else if (obj instanceof EncryptionEntity) - { - m_bIsEncryptionTarget = true; - m_EncryptionForTarget = (EncryptionEntity)obj; - - } - } - - try{ - m_xExportHandler.endElement(str); - } - catch( com.sun.star.xml.sax.SAXException e) - { - e.printStackTrace(); - } - } - - public void characters(String str) - { - try{ - m_xExportHandler.characters(str); - } - catch( com.sun.star.xml.sax.SAXException e) - { - e.printStackTrace(); - } - } - - public void ignorableWhitespace(String str) - { - } - - public void processingInstruction(String aTarget, String aData) - { - try{ - m_xExportHandler.processingInstruction(aTarget, aData); - } - catch( com.sun.star.xml.sax.SAXException e) - { - e.printStackTrace(); - } - } - - public void setDocumentLocator (com.sun.star.xml.sax.XLocator xLocator ) - throws com.sun.star.xml.sax.SAXException - { - } - - - /* - * XSignatureCreationResultListener - */ - public void signatureCreated(int securityId, SecurityOperationStatus creationResult) - { - String message = new String(); - message += "A Signature is created:"; - message += "\nSecurity Id = "+securityId; - message += "\nCreation result = "+((creationResult==SecurityOperationStatus.OPERATION_SUCCEEDED)?"Succeed":"Fail"); - - m_testTool.showMessage("Message from : SignatureCreator\n\n"+message+"\n "); - } - - /* - * XSignatureVerifyResultListener - */ - public void signatureVerified(int securityId, SecurityOperationStatus verifyResult) - { - String message = new String(); - message += "A Signature is verified:"; - message += "\nSecurity Id = "+securityId; - message += "\nVerify result = "+((verifyResult==SecurityOperationStatus.OPERATION_SUCCEEDED)?"Succeed":"Fail"); - - m_testTool.showMessage("Message from : SignatureVerifier\n\n"+message+"\n "); - } - - /* - * XEncryptionResultListener - */ - public void encrypted(int securityId, SecurityOperationStatus encryptionResult) - { - String message = new String(); - message += "An EncryptedData is encrypted:"; - message += "\nSecurity Id = "+securityId; - message += "\nEncrypt result = "+((encryptionResult==SecurityOperationStatus.OPERATION_SUCCEEDED)?"Succeed":"Fail"); - - m_testTool.showMessage("Message from : Encryptor\n\n"+message+"\n "); - } - - /* - * XDecryptionResultListener methods - */ - public void decrypted(int securityId, SecurityOperationStatus decryptionResult) - { - String message = new String(); - message += "An EncryptedData is decrypted:"; - message += "\nSecurity Id = "+securityId; - message += "\nDecrypt result = "+((decryptionResult==SecurityOperationStatus.OPERATION_SUCCEEDED)?"Succeed":"Fail"); - - m_testTool.showMessage("Message from : Decryptor\n\n"+message+"\n "); - } - - /* - * XSAXEventKeeperStatusChangeListener methods - */ - public void blockingStatusChanged(boolean isBlocking) - { - m_testTool.showMessage("Message from : SAXEventKeeper\n\n"+ - (isBlocking?"The SAX event stream is blocked.":"The SAX event stream is unblocked.")+ - "\n "); - - this.m_bIsBlocking = isBlocking; - } - - public void collectionStatusChanged(boolean isInsideCollectedElement) - { - m_testTool.showMessage("Message from : SAXEventKeeper\n\n"+ - (isInsideCollectedElement?"Begin to buffer data ...":"End of data bufferring.")+ - "\n "); - - /* - this.m_bIsInsideCollectedElement = isInsideCollectedElement; - - if ( !m_bIsInsideCollectedElement && !m_bIsBlocking) - { - m_bSAXEventKeeperIncluded = false; - } - else - { - m_bSAXEventKeeperIncluded = true; - } - changeOutput(); - */ - } - - public void bufferStatusChanged(boolean isBufferEmpty) - { - m_testTool.showMessage("Message from : SAXEventKeeper\n\n"+ - (isBufferEmpty?"All bufferred data are released, the SAXEventKeeper is destroyed.":"buffer data appears.")+ - "\n "); - /* - if (isBufferEmpty) - { - m_xXMLDocumentWrapper = null; - m_xSAXEventKeeper = null; - m_bSAXEventKeeperIncluded = false; - changeOutput(); - } - */ - } -} - diff --git a/xmlsecurity/tools/uno/XMLTreeCellRanderer.java b/xmlsecurity/tools/uno/XMLTreeCellRanderer.java deleted file mode 100644 index 567ba2111..000000000 --- a/xmlsecurity/tools/uno/XMLTreeCellRanderer.java +++ /dev/null @@ -1,85 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package com.sun.star.xml.security.uno; - -import javax.swing.tree.DefaultTreeCellRenderer; -import org.w3c.dom.Node; -import javax.swing.ImageIcon; -import java.awt.Component; -import javax.swing.JTree; - -/* - * a TreeCellRender which can show a graph on the current - * tree node. - */ -class XMLTreeCellRanderer extends DefaultTreeCellRenderer -{ - /* - * the icon for the current Node - */ - private ImageIcon m_currentIcon; - - /* - * the current Node - */ - private Node m_currentNode; - - XMLTreeCellRanderer(Node currentNode) - { - m_currentNode = currentNode; - m_currentIcon = new ImageIcon("current.gif"); - } - - public Component getTreeCellRendererComponent( - JTree tree, - Object value, - boolean sel, - boolean expanded, - boolean leaf, - int row, - boolean hasFocus) - { - super.getTreeCellRendererComponent( - tree, value, sel, - expanded, leaf, row, - hasFocus); - - if (((AdapterNode)value).getNode() == m_currentNode) - { - setIcon(m_currentIcon); - setToolTipText("This is the current element."); - } - else - { - setToolTipText(null); /* no tool tip */ - } - - return this; - } -} - diff --git a/xmlsecurity/tools/uno/current.gif b/xmlsecurity/tools/uno/current.gif deleted file mode 100644 index 92b2a025f..000000000 Binary files a/xmlsecurity/tools/uno/current.gif and /dev/null differ diff --git a/xmlsecurity/tools/uno/makefile.mk b/xmlsecurity/tools/uno/makefile.mk deleted file mode 100644 index e919e44ea..000000000 --- a/xmlsecurity/tools/uno/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 -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJNAME = xmlsecurity -TARGET = xmlsecurity-uno -PACKAGE = com$/sun$/star$/xml$/security$/uno -PRJ = ..$/.. - -USE_JAVAVER:=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/target.pmk - -JARFILES = java_uno.jar jurt.jar unoil.jar ridl.jar juh.jar -JAVAFILES := $(shell @ls *.java) -JAVACLASSFILES= $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) - -# --- Targets ------------------------------------------------------ - - -.INCLUDE : target.mk - -- cgit v1.2.3