diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:51:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:51:28 +0000 |
commit | 940b4d1848e8c70ab7642901a68594e8016caffc (patch) | |
tree | eb72f344ee6c3d9b80a7ecc079ea79e9fba8676d /offapi/com/sun/star/xml/wrapper | |
parent | Initial commit. (diff) | |
download | libreoffice-upstream.tar.xz libreoffice-upstream.zip |
Adding upstream version 1:7.0.4.upstream/1%7.0.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'offapi/com/sun/star/xml/wrapper')
4 files changed, 293 insertions, 0 deletions
diff --git a/offapi/com/sun/star/xml/wrapper/XMLDocumentWrapper.idl b/offapi/com/sun/star/xml/wrapper/XMLDocumentWrapper.idl new file mode 100644 index 000000000..753403555 --- /dev/null +++ b/offapi/com/sun/star/xml/wrapper/XMLDocumentWrapper.idl @@ -0,0 +1,42 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_xml_wrapper_xmldocumentwrapper_idl_ +#define __com_sun_star_xml_wrapper_xmldocumentwrapper_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> +#include <com/sun/star/xml/wrapper/XXMLDocumentWrapper.idl> +#include <com/sun/star/lang/XInitialization.idl> + +module com { module sun { module star { module xml { module wrapper { + +/** + * Service of XMLDocumentWrapper + */ +service XMLDocumentWrapper { + interface com::sun::star::xml::wrapper::XXMLDocumentWrapper ; + interface com::sun::star::lang::XInitialization ; +}; + +} ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/wrapper/XMLElementWrapper.idl b/offapi/com/sun/star/xml/wrapper/XMLElementWrapper.idl new file mode 100644 index 000000000..c48fd68df --- /dev/null +++ b/offapi/com/sun/star/xml/wrapper/XMLElementWrapper.idl @@ -0,0 +1,44 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_xml_wrapper_xmlelementwrapper_idl_ +#define __com_sun_star_xml_wrapper_xmlelementwrapper_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> +#include <com/sun/star/xml/wrapper/XXMLElementWrapper.idl> +#include <com/sun/star/lang/XUnoTunnel.idl> +#include <com/sun/star/lang/XInitialization.idl> + +module com { module sun { module star { module xml { module wrapper { + +/** + * Service of XMLElementWrapper + */ +service XMLElementWrapper { + interface com::sun::star::xml::wrapper::XXMLElementWrapper ; + interface com::sun::star::lang::XUnoTunnel; + interface com::sun::star::lang::XInitialization ; +}; + +} ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/wrapper/XXMLDocumentWrapper.idl b/offapi/com/sun/star/xml/wrapper/XXMLDocumentWrapper.idl new file mode 100644 index 000000000..6be5167f0 --- /dev/null +++ b/offapi/com/sun/star/xml/wrapper/XXMLDocumentWrapper.idl @@ -0,0 +1,164 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_xml_wrapper_xxmldocumentwrapper_idl_ +#define __com_sun_star_xml_wrapper_xxmldocumentwrapper_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> +#include <com/sun/star/xml/sax/XDocumentHandler.idl> + +module com { module sun { module star { module xml { module wrapper { + +interface XXMLElementWrapper; + +/** + * Interface of XML Document Wrapper. + * <p> + * When converting SAX events into a DOM tree, this interface is + * used to manipulate the DOM data in UNO perspective. + * <p> + * Every language has its own methods to manipulate its native DOM + * data structure, this interface provides a common method set which + * each language have to implement. + * <p> + * In another word, this interface wraps language dependent methods, + * then other component can manipulate DOM data through UNO methods. + */ +interface XXMLDocumentWrapper : com::sun::star::uno::XInterface +{ + /** + * Gets the current element. + * + * @return the current element in the SAX event stream + */ + XXMLElementWrapper getCurrentElement(); + + /** + * Sets the current element. + * <p> + * When the current element is replaced outside of this interface, then + * uses this method can update the current element pointer. + * + * @param element the new current element + */ + void setCurrentElement([in] XXMLElementWrapper element); + + /** + * Removes the current element. + * <p> + * When the current element is removed, then its parent element becomes + * the new current element. + */ + void removeCurrentElement(); + + /** + * Checks whether an element is the current element. + * + * @param node the element to be checked + * @return <code>true</code> if the node is the current element, + * <code>false</code> otherwise + */ + boolean isCurrent([in] XXMLElementWrapper node); + + /** + * Checks whether the current element is empty. + * + * @return <code>true</code> if the current element is empty, + * <code>false</code> otherwise + */ + boolean isCurrentElementEmpty(); + + /** + * Gets the name of the element. + * + * @param node the element whose name will be gotten + * @return the name of the element + */ + string getNodeName([in] XXMLElementWrapper node); + + /** + * Clears all useless element in a branch of the DOM tree along the + * tree order. + * + * @param node the start point of the branch to clear + * @param reservedDescendants an array including all elements that + * need to be reserved (along their + * ancestor path) + * @param stopAtNode the stop element. The operation have + * to interrupt when this element is met + * during clearing + */ + void clearUselessData( + [in] XXMLElementWrapper node, + [in] sequence< XXMLElementWrapper > reservedDescendants, + [in] XXMLElementWrapper stopAtNode); + + /** + * Collapses a tree path + * <p> + * Each element in the ancestor path of the node will be checked, + * if this element is empty, then deletes it. + * + * @param node the start point of the path from where the tree + * path will be collapsed + */ + void collapse([in] XXMLElementWrapper node); + + /** + * Converts a part of the DOM tree into SAX events. + * + * @param handler the document handler which will receive + * generated SAX events + * @param saxEventKeeperHandler the SAXEventKeeper connecting with + * this XMLDocumentHandler + * @param startNode the start point to generate SAX events + * @param endNode the end point where to stop generating + */ + void generateSAXEvents( + [in] com::sun::star::xml::sax::XDocumentHandler handler, + [in] com::sun::star::xml::sax::XDocumentHandler saxEventKeeperHandler, + [in] XXMLElementWrapper startNode, + [in] XXMLElementWrapper endNode) + raises( com::sun::star::xml::sax::SAXException ); + + /** + * Converts the whole DOM tree into a SAX event stream. + * + * @param handler the document handler which will receive the SAX event + * stream + */ + void getTree([in] com::sun::star::xml::sax::XDocumentHandler handler) + raises( com::sun::star::xml::sax::SAXException ); + + /** + * Rebuild the ID attribute in the branch starting from the particular + * element. + * + * @param node the root element of the branch whose ID link will be + * built + */ + void rebuildIDLink([in] XXMLElementWrapper node); +}; + +} ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/xml/wrapper/XXMLElementWrapper.idl b/offapi/com/sun/star/xml/wrapper/XXMLElementWrapper.idl new file mode 100644 index 000000000..abddd84b3 --- /dev/null +++ b/offapi/com/sun/star/xml/wrapper/XXMLElementWrapper.idl @@ -0,0 +1,43 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_xml_wrapper_xxmlelementwrapper_idl_ +#define __com_sun_star_xml_wrapper_xxmlelementwrapper_idl_ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/uno/Exception.idl> + +module com { module sun { module star { module xml { module wrapper { + +/** + * Interface of XML Element Wrapper. + * <p> + * This interface is used to wrap an element information, which + * make it enable to transfer the element information between + * different languages, such as C++/Java. + */ +interface XXMLElementWrapper : com::sun::star::uno::XInterface +{ +} ; + +} ; } ; } ; } ; } ; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |