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_document_XDocumentInfo_idl__ 28#define __com_sun_star_document_XDocumentInfo_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_lang_ArrayIndexOutOfBoundsException_idl__ 35#include <com/sun/star/lang/ArrayIndexOutOfBoundsException.idl> 36#endif 37 38//============================================================================= 39 40module com { module sun { module star { module document { 41 42//============================================================================= 43/** provides access to the user fields for the information regarding the 44 document 45 46 <p> 47 These fields are special one of the set of available document properties. 48 Other ones are accessed as properties (by using the interface 49 <type scope="com::sun::star::beans">XPropertySet</type>) of service 50 <type>DocumentInfo</type>. 51 </p> 52 53 @deprecated Use <type>XDocumentProperties</type> instead. 54 55 @see DocumentInfo 56 @see StandaloneDocumentInfo 57 @see com::sun::star::beans::XPropertySet 58 */ 59published interface XDocumentInfo: com::sun::star::uno::XInterface 60{ 61 //------------------------------------------------------------------------- 62 /** provides information about count of available fields 63 64 <p> 65 This count marks the top range of possible requests for get/set 66 any of these fields. Range = [0..count-1] 67 </p> 68 69 @returns 70 current count 71 */ 72 short getUserFieldCount(); 73 74 //------------------------------------------------------------------------- 75 /** returns the name of an user field 76 77 @param Index 78 specifies the position of requested field 79 Range = [0..count-1] 80 81 @returns 82 the name of the requested field 83 84 @throws com::sun::star::lang::ArrayIndexOutOfBoundsException 85 if <var>Index</var> don't fit range of [0..count-1] 86 */ 87 string getUserFieldName( [in] short Index ) 88 raises( com::sun::star::lang::ArrayIndexOutOfBoundsException ); 89 90 //------------------------------------------------------------------------- 91 /** returns the value of an user field 92 93 @param Index 94 specifies the position of requested field 95 Range = [0..count-1] 96 97 @returns 98 the value of the requested field 99 100 @throws com::sun::star::lang::ArrayIndexOutOfBoundsException 101 if <var>Index</var> don't fit range of [0..count-1] 102 */ 103 string getUserFieldValue( [in] short Index ) 104 raises( com::sun::star::lang::ArrayIndexOutOfBoundsException ); 105 106 //------------------------------------------------------------------------- 107 /** changes the name of one of the user fields 108 109 @param Index 110 specifies the position of requested field 111 Range = [0..count-1] 112 113 @param Name 114 the new name for this field to be set 115 116 @throws com::sun::star::lang::ArrayIndexOutOfBoundsException 117 if <var>Index</var> don't fit range of [0..count-1] 118 */ 119 void setUserFieldName( 120 [in] short Index , 121 [in] string Name ) 122 raises( com::sun::star::lang::ArrayIndexOutOfBoundsException ); 123 124 //------------------------------------------------------------------------- 125 /** changes the value of one of the user fields 126 127 @param Index 128 specifies the position of requested field 129 Range = [0..count-1] 130 131 @param Value 132 the new value for this field to be set 133 134 @throws com::sun::star::lang::ArrayIndexOutOfBoundsException 135 if <var>Index</var> don't fit range of [0..count-1] 136 */ 137 void setUserFieldValue( 138 [in] short Index , 139 [in] string Value ) 140 raises( com::sun::star::lang::ArrayIndexOutOfBoundsException ); 141}; 142 143//============================================================================= 144 145}; }; }; }; 146 147#endif 148