1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22#ifndef __com_sun_star_text_XAutoTextContainer_idl__
23#define __com_sun_star_text_XAutoTextContainer_idl__
24
25#include <com/sun/star/container/ElementExistException.idl>
26#include <com/sun/star/container/NoSuchElementException.idl>
27#include <com/sun/star/container/XNameAccess.idl>
28#include <com/sun/star/lang/IllegalArgumentException.idl>
29#include <com/sun/star/text/XAutoTextGroup.idl>
30
31module com {  module sun {  module star {  module text {
32
33/** handles blocks of <type>AutoTextEntry</type>.
34    @see AutoTextContainer
35*/
36published interface XAutoTextContainer: com::sun::star::container::XNameAccess
37{
38    /** creates a new AutoText group.
39
40    @param aGroupName the name of the <type>AutoTextContainer</type>
41
42    <p>The name must follow the pattern <code>groupname*pathid</code>, where:</p>
43
44    <ul>
45        <li><code>groupname</code> should contain only alphanumeric characters
46            (A-Za-z0-9), underscore (_) or space (0x20)</li>
47        <li>an asterisk (*) delimiter separates the group name from the path
48            identifier</li>
49        <li><code>pathid</code> is a number (0 or 1) identifying the directory
50        where the AutoText file is stored. Paths are stored in the Office
51        configuration and accessed through
52        <member scope="com::sun::star::util">PathSettings::AutoText</member>.
53            <ul>
54                <li>0 indicates the path of the <b>Office Basis</b> layer</li>
55                <li>1 indicates the path of the <b>user</b> directory</li>
56            </ul>
57        </li>
58    </ul>
59    If only <code>groupname</code> is specified, the path defaults to 0, the
60    <b>Office Basis</b> layer.</br>Note that in some systems the user may lack of
61    write access to the Office Basis directory.
62
63    @example
64
65    <ul>
66        <li><code>standard*0</code></br>the "standard" AutoTextGroup in the Office Basis layer</li>
67        <li><code>template</code></br>the "template" AutoTextGroup in the Office Basis layer</li>
68        <li><code>mytexts*1</code></br>the "mytexts" AutoTextGroup in the user directory</li>
69    </ul>
70
71    */
72    com::sun::star::text::XAutoTextGroup insertNewByName( [in] string aGroupName )
73            raises( com::sun::star::lang::IllegalArgumentException,
74                    com::sun::star::container::ElementExistException );
75
76    /** deletes the specified AutoText group.
77        @param aGroupName see the documentation for <member>XAutoTextContainer::insertNewByName()</member>
78    */
79    void removeByName( [in] string aGroupName )
80            raises( com::sun::star::container::NoSuchElementException );
81
82};
83
84}; }; }; };
85
86#endif
87