1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27#ifndef __com_sun_star_xforms_XFormsUIHelper1_idl__ 28#define __com_sun_star_xforms_XFormsUIHelper1_idl__ 29 30#ifndef __com_sun_star_uno_XInterface_idl__ 31#include <com/sun/star/uno/XInterface.idl> 32#endif 33 34#ifndef __com_sun_star_xml_dom_XNode_idl__ 35#include <com/sun/star/xml/dom/XNode.idl> 36#endif 37 38#ifndef __com_sun_star_beans_XPropertySet_idl__ 39#include <com/sun/star/beans/XPropertySet.idl> 40#endif 41 42#ifndef __com_sun_star_container_XIndexAccess_idl__ 43#include <com/sun/star/container/XSet.idl> 44#endif 45 46#ifndef __com_sun_star_xforms_XDataTypeRepository_idl__ 47#include <com/sun/star/xforms/XDataTypeRepository.idl> 48#endif 49 50#ifndef __com_sun_star_xml_dom_XDocument_idl__ 51#include <com/sun/star/xml/dom/XDocument.idl> 52#endif 53 54#ifndef __com_sun_star_xml_dom_XDocument_idl__ 55#include <com/sun/star/xml/dom/XNode.idl> 56#endif 57 58#ifndef __com_sun_star_frame_XModel_idl__ 59#include <com/sun/star/frame/XModel.idl> 60#endif 61 62#ifndef __com_sun_star_xforms_XModel_idl__ 63#include <com/sun/star/xforms/XModel.idl> 64#endif 65 66 67//============================================================================= 68 69module com { module sun { module star { module xforms { 70 71//============================================================================= 72 73/** provide several helper methods for the UI 74 75 <b>This interfaces is for UI use only, and will likely be unsupported in 76 future versions.</p> 77*/ 78interface XFormsUIHelper1 79{ 80 string getDefaultServiceNameForNode( [in] com::sun::star::xml::dom::XNode xNode ); 81 82 string getDefaultBindingExpressionForNode( [in] com::sun::star::xml::dom::XNode xNode ); 83 84 string getNodeDisplayName( [in] com::sun::star::xml::dom::XNode xNode, 85 [in] boolean bDetail ); 86 87 string getNodeName( [in] com::sun::star::xml::dom::XNode xNode ); 88 89 string getBindingName( [in] com::sun::star::beans::XPropertySet xBinding, 90 [in] boolean bDetail ); 91 92 string getSubmissionName( [in] com::sun::star::beans::XPropertySet xSubm, 93 [in] boolean bDetail ); 94 95 // Creates a new binding based on the one passed as argument. 96 // The new binding does *not* contribute to the MIPs table and acts 97 // as a propertyset in disguise, which is what the UI needs this object for... 98 com::sun::star::beans::XPropertySet cloneBindingAsGhost( [in] com::sun::star::beans::XPropertySet binding ); 99 100 void removeBindingIfUseless( [in] com::sun::star::beans::XPropertySet xBinding ); 101 102 // handle instances 103 104 com::sun::star::xml::dom::XDocument newInstance( [in] string sName, 105 [in] string sURL, 106 [in] boolean bURLOnce ); 107 108 void renameInstance( [in] string sFrom, [in] string sTo, 109 [in] string sURL, 110 [in] boolean bURLOnce ); 111 112 void removeInstance( [in] string sName ); 113 114 115 // handle models 116 com::sun::star::xforms::XModel newModel( [in] com::sun::star::frame::XModel xModel, 117 [in] string sName ); 118 void renameModel( [in] com::sun::star::frame::XModel xModel, 119 [in] string sFrom, [in] string sTo ); 120 void removeModel( [in] com::sun::star::frame::XModel xModel, 121 [in] string sName ); 122 123 124 // DOM helpers 125 com::sun::star::xml::dom::XNode 126 createElement( [in] com::sun::star::xml::dom::XNode xParent, 127 [in] string sName ); 128 com::sun::star::xml::dom::XNode 129 createAttribute( [in] com::sun::star::xml::dom::XNode xParent, 130 [in] string sName ); 131 132 com::sun::star::xml::dom::XNode renameNode( 133 [in] com::sun::star::xml::dom::XNode xNode, 134 [in] string sName ); 135 136 com::sun::star::beans::XPropertySet getBindingForNode( 137 [in] com::sun::star::xml::dom::XNode xNode, 138 [in] boolean bCreate ); 139 140 void removeBindingForNode( 141 [in] com::sun::star::xml::dom::XNode xNode ); 142 143 string getResultForExpression( 144 [in] com::sun::star::beans::XPropertySet xBinding, 145 [in] boolean bIsBindingExpression, 146 [in] string sExpression ); 147 148 boolean isValidXMLName( [in] string sName ); 149 150 boolean isValidPrefixName( [in] string sName ); 151 152 void setNodeValue( 153 [in] com::sun::star::xml::dom::XNode xNode, 154 [in] string sValue ); 155 156}; 157 158//============================================================================= 159 160}; }; }; }; 161 162/*============================================================================= 163 164=============================================================================*/ 165#endif 166