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